项目搭建

This commit is contained in:
18390123501 2024-05-14 10:44:28 +08:00
parent b14bc6c25b
commit cd582926b3
233 changed files with 46984 additions and 0 deletions

23
.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
.DS_Store
node_modules/
unpackage/
dist/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.project
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*

16
.hbuilderx/launch.json Normal file
View File

@ -0,0 +1,16 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

73
api/config.js Normal file
View File

@ -0,0 +1,73 @@
import {
toast
} from "/tool/index.js"
export default {
baseUrl: 'https://syjk.yhy.ren/xcx-test/', // 生产
post(url, param) {
return this.ajax('post', url, param)
},
get(url, param) {
return this.ajax('get', url, param)
},
put(url, param) {
return this.ajax('put', url, param)
},
getUrl(url) {
return `${this.baseUrl}${url}`
},
setHeader(url) {
let header = {
'content-type': 'application/x-www-form-urlencoded',
'clientType': 'h5'
}
if (url.indexOf('application') != -1) header['content-type'] = 'application/json'
return header
},
setParams(param) {
const openId = uni.getStorageSync('openId') || ''
const userId = param.userId || uni.getStorageSync('userId') || ''
param['openId'] = openId
param['token'] = openId
param['userId'] = userId
return param
},
setUrlParams(isUrlParam, param, url) {
if (!isUrlParam) return ''
let str = []
for (let i in param) {
str.push(i + '=' + param[i])
}
return `${(url.indexOf('?')!=-1?'&':'?')}${str.join('&')}`
},
ajax(type, url, param = {}) {
return new Promise((resolve, reject) => {
let requestData = this.setParams(param.data || {})
let urlObj = this.setUrlParams(param.isUrlParam, requestData, url)
let request = {
url: `${this.baseUrl}${url}${urlObj}`,
method: type,
header: this.setHeader(url),
sslVerify: false,
dataType: 'json',
timeout: 300000,
data: requestData,
success: (response) => {
if (response.data.code == 500) {
return toast(response.data.msg)
}
let is = typeof response === 'object'
let data = response.data
resolve(is ? data : response)
},
fail: (err) => {
reject(err)
},
}
uni.request(request)
})
},
}

88
api/index.js Normal file
View File

@ -0,0 +1,88 @@
import ajax from './config'
export default { // 所有接口
// 心理评估接口
list: (param) => ajax.post('psychology/dict/list', param), // 获取心理主页数据
introduInfo: (param) => ajax.post('psychology/paperwork/introduInfo', param), // 心理评估文案表
subjectList: (param) => ajax.post('psychology/subject/subjectList', param), // 心里评估题目
tempSave: (param) => ajax.post('psychology/paperUserSave/tempSave?application=true', param), // 评估答题暂存
pagerUserByCode: (param) => ajax.post('psychology/paperUserSave/pagerUserByCode', param), //根据评估类型查询评估答题试卷
savePaper: (param) => ajax.post('psychology/paperUserSave/savePaper?application=true', param), //评估答题保存
anewQuery: (param) => ajax.post('psychology/paperUserSave/anewQuery', param), //重新填写
queryResult: (param) => ajax.post('psychology/result/queryResult', param), //心理评估结果查看
queryDimensionFactors: (param) => ajax.post('psychology/factor/queryDimensionFactors', param), //查询雷达因子
queryResultByCode: (param) => ajax.post('psychology/scale/queryResultByCode', param), //心理评估结果等级
assessmentReport: (param) => ajax.get('psychology/dict/assessmentReport', param), //心理评估报告
assessmentResult: (param) => ajax.get('psychology/dict/assessmentResult', param), //心理评估详情
typeList: (param) => ajax.get('diggmindUser/typeList', param), //查询格米分类
diggmindUserList: (param) => ajax.post('diggmindUser/list?application=true', param), //根据分类查询列表
details: (param) => ajax.get('diggmindUser/details', param), //评估详情
startAssessment: (param) => ajax.get('diggmindUser/startAssessment', param), //问卷地址
reportAddress: (param) => ajax.get('diggmindUser/reportAddress', param), //报告地址
getDiseaseResult: (param) => ajax.get('disease-assess-subject/getDiseaseResult', param), //基础评估结果
// 风险评估接口
selectDictList: (param) => ajax.get('disease-assess-dict/selectDictList', param), //查询疾病字典
getUserExtInfo: (param) => ajax.get('sysUser/userExt/getUserExtInfo', param), // 获取用户扩展信息
saveUserExtInfo: (param) => ajax.post('sysUser/userExt/saveUserExtInfo?application=true', param), //修改用户扩展信息
selectBasisAssessInfo: (param) => ajax.get('disease-assess-subject/selectBasisAssessInfo', param), //查询题目生成疾病试卷
selectPaperList: (param) => ajax.get('disease-assess-subject/selectPaperList', param), //试卷查询
basisAssessSaveJson: (param) => ajax.post('disease-assess-subject/basisAssessSaveJson', param), //保存试卷 暂存试卷
getDiseaseResult: (param) => ajax.get('disease-assess-subject/getDiseaseResult', param), //评估结果
generatePaper: (param) => ajax.get('disease-assess-subject/generatePaper', param), //试卷查询,重新生成试卷
getAssessReport: (param) => ajax.get('disease-assess-subject/getAssessReport', param), //评估报告
getDiseaseContent: (param) => ajax.get('disease-assess-subject/getDiseaseContent', param), //评估报告内容
saveDictList: (param) => ajax.get('disease-paper-save/selectDictList', param), //风险评估报告
getUserAssessReport: (param) => ajax.get('disease-paper-save/getUserAssessReport', param), //评估报告查询
getFamilyMemberByMemberId: (param) => ajax.get('member/familyMember/getFamilyMemberByMemberId', param), //评估报告查询
selectHealthyGuide: (param) => ajax.get('disease-assess-subject/selectHealthyGuide', param), //评估报告
selectTaskIntegral: (param) => ajax.get('integral/userIntegralFlow/selectTaskIntegral', param), //查询本次评估预计生成的积分
selectFoodsSubjectList: (param) => ajax.get(`disease-plan/selectFoodsSubjectList`, param), // 生成饮食试卷
beingGenerated: (param) => ajax.get('dis-day-task/beingGenerated', param),
openDayTaskDetail: (param) => ajax.post(`dis-day-task/openDayTaskDetail`, param), // 开启计划
selectQuestAll: (param) => ajax.get('psychological/psychological-plan-question/selectQuestAll',
param), //获取加入计划的所有问卷题目
queryEmotionQuest: (param) => ajax.get('psychological/psychological-plan-question/queryEmotionQuest',
param), //查询情绪问卷
queryStressManagement: (param) => ajax.get('psychological/psychological-plan-question/queryStressManagement',
param), //查询减压问卷
selectQuestById: (param) => ajax.get('psychological/psychological-plan-question/selectQuestById',
param), //获取每日任务单独问卷题目
insertQuestResult: (param) => ajax.post(
'psychological/psychological-plan-question/insertQuestResult?application=true', param), //保存问卷
getPsychologicalResult: (param) => ajax.get('psychological/psychological-plan-question/getPsychologicalResult',
param), //用户心理加入计划评估综合报告
getBeliefResult: (param) => ajax.get('psychological/psychological-plan-question/getBeliefResult',
param), //用户心理睡眠个人信念和态度量结果
getInsomniaResult: (param) => ajax.get('psychological/psychological-plan-question/getInsomniaResult',
param), //查询用户心理失眠程度结果
getPsychologyInfo: (param) => ajax.get('psychological/psychological-plan-question/getPsychologyInfo',
param), // 查询焦虑情绪评估结果或焦虑自评结果 15,16,32问卷类型
getEmotionalInfo: (param) => ajax.get('psychological/psychological-plan-question/getEmotionalInfo',
param), // 查询情绪智力量表结果
// 14天减压
getSimpleResponse: (param) => ajax.get('psychological/psychological-plan-question/getSimpleResponse',
param), // 查询简易应答量表结果
getResultEmotion: (param) => ajax.get('api/psychological/task/getResultEmotion', param),
getEmotionManagement: (param) => ajax.get('psychological/psychological-plan-question/getEmotionManagement',
param), // 评估结果页面查询
getStressManagement: (param) => ajax.get('psychological/psychological-plan-question/getStressManagement',
param), // 评估结果页面查询
getAssessInfo: (param) => ajax.get('disease-assess-subject/getAssessInfo', param), // 查询评估信息
getUserAnalysisReport: (param) => ajax.get('ExaminingReport/getUserAnalysisReport', param), // 查看体检报告集合
queryQuestionAll: (param) => ajax.get('/api/questionnaire/queryQuestionAll', param), // 获取问卷列表
questSelectQuestById: (param) => ajax.get('/api/questionnaire/selectQuestById', param), // 获取问卷题目
saveAnswer: (param) => ajax.post('/api/questionnaire/saveAnswer?application=true', param), // 保存问卷
appLogin: (param) => ajax.get('userLogin/login/appLogin', param), // App手机号登陆
hasLifestyleAssessment: (param) => ajax.get('dis-day-task/hasLifestyleAssessment', param), //查询生活方式评估状态
sendTheVerificationCodeApp: (param) => ajax.get('sysUser/sendTheVerificationCodeApp', param), // 发送手机号验证码
selectFoodsInfo: (param) => ajax.get(`doodsInfo/selectFoodsInfo`, param), // 查询食材详情
selectDictListByFoodList: (param) => ajax.get('disease-assess-dict/selectDictListByFoodList', param), //查询疾病字典
getDiseaseFoodsLevel: (param) => ajax.get(`healthTools/getDiseaseFoodsLevel`, param), //食物榜单
getFoodTypes: (param) => ajax.get('healthTools/getFoodTypes', param),
selectFoodsList: (param) => ajax.get(`healthTools/selectFoodsList`, param), //食物成分
queryEeFoodType: (param) => ajax.get(`zksr.zksrservice.eefood/yh-ee-food-type/queryEeFoodType`, param), //查询ee屏食物类型
queryEeFoodInfo: (param) => ajax.get(`zksr.zksrservice.eefood/yh-ee-food-info/queryEeFoodInfo`, param), //查询食物信息
queryEeFoodInfoDetails: (param) => ajax.get(`zksr.zksrservice.eefood/yh-ee-food-info/queryEeFoodInfoDetails`, param), //查询食物信息详情
setSaveActivity: (param) => ajax.post('zksr.zksrservice.autonomous/autonomous-plan-activity/saveActivity?application=true', param), // 保存问卷
uploadImg: () => ajax.getUrl('qiniu/uploadImg'), //上传图片
}

47
api/regist.js Normal file
View File

@ -0,0 +1,47 @@
import ajax from './config'
export default {
// 查询事项列表
queryUserMattersTypes: (param) => ajax.get(
'zksr.zksrservice.autonomous/autonomous-plan-matters-type/queryUserMattersTypes', param),
// 查询事项列表
queryMatters: (param) => ajax.get('zksr.zksrservice.autonomous/autonomous-plan-matters/queryMatters', param),
// 查询热门事项
queryMattersHot: (param) => ajax.get('zksr.zksrservice.autonomous/autonomous-plan-matters/queryMattersHot', param),
// 保存事项
saveMatters: (param) => ajax.post(
'zksr.zksrservice.autonomous/autonomous-plan-matters/saveMatters?application=true', param),
//保存自主计划
saveFollowing: (param) => ajax.post(
'zksr.zksrservice.autonomous/autonomous-plan-user-following/saveFollowing?application=true', param),
// 保存自主计划用户日记
saveDiaryList: (param) => ajax.post(
'zksr.zksrservice.autonomous/autonomous-plan-diary/saveDiaryList?application=true', param),
// 分页查询自主计划用户日记
queryDiaryList: (param) => ajax.get('zksr.zksrservice.autonomous/autonomous-plan-diary/queryDiaryList', param),
// 删除自主计划用户日记
delDiary: (param) => ajax.post('zksr.zksrservice.autonomous/autonomous-plan-diary/delDiary', param),
// 查询事项列表
queryMattersName: (param) => ajax.get('zksr.zksrservice.autonomous/autonomous-plan-user-following/queryMattersName',
param),
//保存意外事件
savePlanAccident: (param) => ajax.post(
'zksr.zksrservice.autonomous/autonomous-plan-accident/savePlanAccident?application=true', param),
// 时间选择
timeListNew: (param) => ajax.get('dataDetection/dataDetectionType/timeListNew', param),
// 查询周统计
queryWeekSummary: (param) => ajax.get('zksr.zksrservice.autonomous/autonomous-plan-user-following/queryWeekSummary',
param),
// 查询用户计划
queryFollowing: (param) => ajax.get('zksr.zksrservice.autonomous/autonomous-plan-user-following/queryFollowing',
param),
// 修改自主计划
updAutonomousPlanTask: (param) => ajax.post(
'zksr.zksrservice.autonomous/autonomous-plan-user-following/updAutonomousPlanTask?application=true', param),
// 操作任务状态
operationalTaskStatus: (param) => ajax.post(
'zksr.zksrservice.autonomous/autonomous-plan-user-following/operationalTaskStatus', param),
// 删除自主计划
delAutonomousPlanTask: (param) => ajax.post(
'zksr.zksrservice.autonomous/autonomous-plan-user-following/delAutonomousPlanTask', param),
}

39
api/smoke.js Normal file
View File

@ -0,0 +1,39 @@
import ajax from './config'
export default {
// 戒烟首页
userSmokingHome: (param) => ajax.get('userSmoking/home', param),
//烟瘾来袭
smokingCravingAdd: (param) => ajax.post('smokingCraving/add', param),
//重置戒烟
userSmokingReset: (param) => ajax.post('userSmoking/reset', param),
//开始戒烟
userSmokingAdd: (param) => ajax.post('userSmoking/add', param),
//本人日记列表
smokingDiaryList: (param) => ajax.get('smokingDiary/list', param),
//日记保存
smokingDiaryAdd: (param) => ajax.post('smokingDiary/add', param),
// 删除自主计划用户日记
smokingDiaryDelete: (param) => ajax.post('smokingDiary/delete', param),
//时光穿梭
timeTravel: (param) => ajax.get('userSmoking/timeTravel', param),
//健康恢复评分
healthRecoveryScore: (param) => ajax.get('userSmoking/healthRecoveryScore', param),
//尼古丁成瘾评估问卷
questionSmokingList: (param) => ajax.get('questionSmoking/list', param),
//尼古丁评估提交
smokingReportAdd: (param) => ajax.post('smokingReport/add', param),
//根据id获得尼古丁评估记录
getById: (param) => ajax.get('smokingReport/getById', param),
//尼古丁评估列表
smokingReportList: (param) => ajax.get('smokingReport/list', param),
//烟瘾统计图
cartogram: (param) => ajax.get('smokingCraving/cartogram', param),
//烟瘾统计图
cheatsList: (param) => ajax.get('userSmoking/cheatsList', param),
//新增学习记录
smokingSecretAdd: (param) => ajax.post('smokingSecret/add', param),
//我的戒烟数据
smokingCessationData: (param) => ajax.get('userSmoking/smokingCessationData', param),
//判断用户是否第一次进入某个页面
getUserFirstInto: (param) => ajax.get('sysUser/getUserFirstInto', param),
}

81
babel.config.js Normal file
View File

@ -0,0 +1,81 @@
const webpack = require('webpack')
const plugins = []
if (process.env.UNI_OPT_TREESHAKINGNG) {
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js'))
}
if (
(
process.env.UNI_PLATFORM === 'app-plus' &&
process.env.UNI_USING_V8
) ||
(
process.env.UNI_PLATFORM === 'h5' &&
process.env.UNI_H5_BROWSER === 'builtin'
)
) {
const path = require('path')
const isWin = /^win/.test(process.platform)
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
const input = normalizePath(process.env.UNI_INPUT_DIR)
try {
plugins.push([
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'),
{
file (file) {
file = normalizePath(file)
if (file.indexOf(input) === 0) {
return path.relative(input, file)
}
return false
}
}
])
} catch (e) { }
}
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
process.UNI_LIBRARIES.forEach(libraryName => {
plugins.push([
'import',
{
'libraryName': libraryName,
'customName': (name) => {
return `${libraryName}/lib/${name}/${name}`
}
}
])
})
if (process.env.UNI_PLATFORM !== 'h5') {
plugins.push('@babel/plugin-transform-runtime')
}
const config = {
presets: [
[
'@vue/app',
{
modules: webpack.version[0] > 4 ? 'auto' : 'commonjs',
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
}
]
],
plugins
}
const UNI_H5_TEST = '**/@dcloudio/uni-h5/dist/index.umd.min.js'
if (process.env.NODE_ENV === 'production') {
config.overrides = [{
test: UNI_H5_TEST,
compact: true,
}]
} else {
config.ignore = [UNI_H5_TEST]
}
module.exports = config

203
npminstall-debug.log Normal file
View File

@ -0,0 +1,203 @@
{
root: 'D:\\songtao\\risk-assessment',
registry: 'https://registry.npmmirror.com',
pkgs: [
{
name: 'node-sass',
version: 'latest',
type: 'tag',
alias: undefined,
arg: [Result]
}
],
production: false,
cacheStrict: false,
cacheDir: 'C:\\Users\\SY\\.npminstall_tarball',
env: {
npm_config_registry: 'https://registry.npmmirror.com',
npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\SY\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","node-sass","--save"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\SY\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","node-sass","--save"]}',
npm_config_user_agent: 'npminstall/7.11.1 npm/? node/v14.18.1 win32 x64',
npm_config_cache: 'C:\\Users\\SY\\.npminstall_tarball',
NODE: 'D:\\nodejs\\node.exe',
npm_node_execpath: 'D:\\nodejs\\node.exe',
npm_execpath: 'D:\\node\\nodejs\\node_global\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js',
npm_config_userconfig: 'C:\\Users\\SY\\.cnpmrc',
npm_config_disturl: 'https://cdn.npmmirror.com/binaries/node',
npm_config_r: 'https://registry.npmmirror.com',
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
RE2_DOWNLOAD_SKIP_PATH: 'true',
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
npm_rootpath: 'D:\\songtao\\risk-assessment',
INIT_CWD: 'D:\\songtao\\risk-assessment'
},
binaryMirrors: {
ENVS: {
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
RE2_DOWNLOAD_SKIP_PATH: 'true',
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs'
},
'@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
'@tensorflow/tfjs-node': {
replaceHostFiles: [Array],
replaceHostRegExpMap: [Object],
replaceHostMap: [Object]
},
cypress: {
host: 'https://cdn.npmmirror.com/binaries/cypress',
newPlatforms: [Object]
},
'utf-8-validate': {
host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}'
},
xprofiler: {
remote_path: './xprofiler/v{version}/',
host: 'https://cdn.npmmirror.com/binaries'
},
leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' },
couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' },
gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' },
sqlite3: {
host: 'https://cdn.npmmirror.com/binaries/sqlite3',
remote_path: 'v{version}'
},
'@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' },
grpc: {
host: 'https://cdn.npmmirror.com/binaries',
remote_path: '{name}/v{version}'
},
'grpc-tools': { host: 'https://cdn.npmmirror.com/binaries' },
wrtc: {
host: 'https://cdn.npmmirror.com/binaries',
remote_path: '{name}/v{version}'
},
fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' },
'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' },
'flow-bin': {
replaceHost: 'https://github.com/facebook/flow/releases/download/v',
host: 'https://cdn.npmmirror.com/binaries/flow/v'
},
'jpegtran-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin'
},
'cwebp-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/cwebp-bin'
},
'zopflipng-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin'
},
'optipng-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/optipng-bin'
},
mozjpeg: {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin'
},
gifsicle: {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin'
},
'pngquant-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/pngquant-bin',
replaceHostMap: [Object]
},
'pngcrush-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin'
},
'jpeg-recompress-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin'
},
'advpng-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/advpng-bin'
},
'pngout-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/pngout-bin'
},
'jpegoptim-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin'
},
argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' },
'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' },
'ali-usb_ctl': { host: 'https://cdn.npmmirror.com/binaries/ali-usb_ctl' },
'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' },
'libpg-query': { host: 'https://cdn.npmmirror.com/binaries' }
},
forbiddenLicenses: null,
flatten: false,
proxy: undefined,
prune: false,
disableFallbackStore: false,
workspacesMap: Map(0) {},
enableWorkspace: false,
workspaceRoot: 'D:\\songtao\\risk-assessment',
isWorkspaceRoot: true,
isWorkspacePackage: false,
offline: false,
strictSSL: true,
ignoreScripts: false,
foregroundScripts: false,
ignoreOptionalDependencies: false,
detail: false,
forceLinkLatest: false,
trace: false,
engineStrict: false,
registryOnly: false,
client: false,
autoFixVersion: [Function: autoFixVersion]
}

114
package.json Normal file
View File

@ -0,0 +1,114 @@
{
"name": "risk-assessment",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "npm run dev:h5",
"build": "npm run build:h5",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
"build:mp-jd": "cross-env NODE_ENV=production UNI_PLATFORM=mp-jd vue-cli-service uni-build",
"build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build",
"build:mp-lark": "cross-env NODE_ENV=production UNI_PLATFORM=mp-lark vue-cli-service uni-build",
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:mp-xhs": "cross-env NODE_ENV=production UNI_PLATFORM=mp-xhs vue-cli-service uni-build",
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
"dev:mp-jd": "cross-env NODE_ENV=development UNI_PLATFORM=mp-jd vue-cli-service uni-build --watch",
"dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch",
"dev:mp-lark": "cross-env NODE_ENV=development UNI_PLATFORM=mp-lark vue-cli-service uni-build --watch",
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch",
"dev:mp-xhs": "cross-env NODE_ENV=development UNI_PLATFORM=mp-xhs vue-cli-service uni-build --watch",
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
},
"dependencies": {
"@dcloudio/uni-app": "^2.0.2-3081220230817001",
"@dcloudio/uni-app-plus": "^2.0.2-3081220230817001",
"@dcloudio/uni-h5": "^2.0.2-3081220230817001",
"@dcloudio/uni-i18n": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-360": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-alipay": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-baidu": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-jd": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-kuaishou": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-lark": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-qq": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-toutiao": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-vue": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-weixin": "^2.0.2-3081220230817001",
"@dcloudio/uni-mp-xhs": "^2.0.2-3081220230817001",
"@dcloudio/uni-quickapp-native": "^2.0.2-3081220230817001",
"@dcloudio/uni-quickapp-webview": "^2.0.2-3081220230817001",
"@dcloudio/uni-stacktracey": "^2.0.2-3081220230817001",
"@dcloudio/uni-stat": "^2.0.2-3081220230817001",
"@vue/shared": "^3.0.0",
"autoprefixer": "^8.0.0",
"core-js": "^3.8.3",
"flyio": "^0.6.2",
"less": "^4.2.0",
"less-loader": "^11.1.3",
"markdown-it-vue": "^1.1.7",
"postcss": "^8.4.31",
"postcss-loader": "^7.3.3",
"vue": ">= 2.6.14 < 2.7",
"vue-markdown": "^2.2.4",
"vuex": "^3.2.0"
},
"devDependencies": {
"@dcloudio/types": "^3.3.2",
"@dcloudio/uni-automator": "^2.0.2-3081220230817001",
"@dcloudio/uni-cli-i18n": "^2.0.2-3081220230817001",
"@dcloudio/uni-cli-shared": "^2.0.2-3081220230817001",
"@dcloudio/uni-helper-json": "*",
"@dcloudio/uni-migration": "^2.0.2-3081220230817001",
"@dcloudio/uni-template-compiler": "^2.0.2-3081220230817001",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.2-3081220230817001",
"@dcloudio/vue-cli-plugin-uni": "^2.0.2-3081220230817001",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.2-3081220230817001",
"@dcloudio/webpack-uni-mp-loader": "^2.0.2-3081220230817001",
"@dcloudio/webpack-uni-pages-loader": "^2.0.2-3081220230817001",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"babel-plugin-import": "^1.11.0",
"cross-env": "^7.0.2",
"jest": "^25.4.0",
"node-sass": "^4.14.1",
"postcss-comment": "^2.0.0",
"sass": "^1.69.2",
"sass-loader": "^7.3.1",
"vue-template-compiler": ">= 2.6.14 < 2.7"
},
"browserslist": [
"Android >= 4.4",
"ios >= 9"
],
"uni-app": {
"scripts": {}
}
}

27
postcss.config.js Normal file
View File

@ -0,0 +1,27 @@
const path = require('path')
const webpack = require('webpack')
const config = {
parser: require('postcss-comment'),
plugins: [
require('postcss-import')({
resolve (id, basedir, importOptions) {
if (id.startsWith('~@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
} else if (id.startsWith('@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2))
} else if (id.startsWith('/') && !id.startsWith('//')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1))
}
return id
}
}),
require('autoprefixer')({
remove: process.env.UNI_PLATFORM !== 'h5'
}),
require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
]
}
if (webpack.version[0] > 4) {
delete config.parser
}
module.exports = config

31
public/index.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script>
</script>
</html>

11
shims-uni.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
/// <reference types='@dcloudio/types' />
import Vue from 'vue'
declare module "vue/types/options" {
type Hooks = App.AppInstance & Page.PageInstance;
interface ComponentOptions<V extends Vue> extends Hooks {
/**
*
*/
mpType?: string;
}
}

4
shims-vue.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare module "*.vue" {
import Vue from 'vue'
export default Vue
}

93
src/App.vue Normal file
View File

@ -0,0 +1,93 @@
<script>
export default {
onLaunch: function(option) {
console.log('option',option);
uni.setStorageSync('userId', option.query.userId)
uni.setStorageSync('openId', option.query.openId)
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
@import "../styles/style.css";
/*每个页面公共css */
page {
background: #F4F5F7;
font-size: 32rpx;
}
/* 取消左右上下滑动样式 */
/* #ifdef H5 */
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
/* #endif */
@keyframes progross1 {
to {
transform: rotate(360deg);
}
}
@keyframes progross2 {
to {
transform: rotate(0deg);
}
}
.uni-searchbar__text-placeholder,
.uniui-search {
color: #666 !important;
}
.uni-searchbar__box {
border: 1px solid #3AAFB8 !important;
}
.placeholder {
height: 100rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
}
.btnList {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
background-color: #fff;
box-shadow: 0 0 10rpx rgba(0, 0, 0, .1);
display: flex;
align-items: center;
height: 110rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.btn {
color: #fff;
text-align: center;
line-height: 80rpx;
background-color: $uni-color;
border-radius: 40rpx;
flex: 1;
margin: 0 32rpx;
font-weight: bold;
}
}
</style>

View File

@ -0,0 +1,558 @@
<template>
<view class="cmd-progress cmd-progress-default" :class="setStatusClass">
<block v-if="type == 'circle' || type == 'dashboard'">
<view class="cmd-progress cmd-progress-default" :class="setStatusClass">
<view class="cmd-progress-inner" :style="setCircleStyle">
<!-- 绘制圈 start -->
<!-- #ifdef H5 -->
<svg viewBox="0 0 100 100" class="cmd-progress-circle">
<path :d="setCirclePath" stroke="#f3f3f3" :stroke-linecap="strokeShape" :stroke-width="strokeWidth"
fill-opacity="0" class="cmd-progress-circle-trail" :style="setCircleTrailStyle"></path>
<path :d="setCirclePath" :stroke-linecap="strokeShape" :stroke-width="strokeWidth" fill-opacity="0" class="cmd-progress-circle-path"
:style="setCirclePathStyle"></path>
</svg>
<!-- #endif -->
<!-- #ifndef H5 -->
<text :style="setCircle"></text>
<!-- #endif -->
<!-- 绘制圈 end -->
<!-- 状态文本 start -->
<block v-if="showInfo">
<text class="cmd-progress-text" :title="setFormat">
<block v-if="status != 'success' && status != 'exception' && setProgress < 100">{{setFormat}}</block>
<!-- #ifdef H5 -->
<svg v-if="status == 'exception'" viewBox="64 64 896 896" data-icon="close" width="1em" height="1em" fill="currentColor"
aria-hidden="true">
<path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path>
</svg>
<svg v-if="status == 'success' || setProgress == 100" viewBox="64 64 896 896" data-icon="check" width="1em"
height="1em" fill="currentColor" aria-hidden="true" :style="{'color': strokeColor ? strokeColor : ''}">
<path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"></path>
</svg>
<!-- #endif -->
<!-- #ifndef H5 -->
<text v-if="status == 'exception' || status == 'success' || setProgress == 100" :style="setCircleIcon"></text>
<!-- #endif -->
</text>
</block>
<!-- 状态文本 end -->
</view>
</view>
</block>
<block v-if="type == 'line'">
<!-- 进度条 start -->
<view class="cmd-progress-outer">
<view class="cmd-progress-inner" :style="{'border-radius': strokeShape == 'square' ? 0 : '100px'}">
<view class="cmd-progress-bg" :style="setLineStyle"></view>
<view v-if="successPercent" class="cmd-progress-success-bg" :style="setLineSuccessStyle"></view>
</view>
</view>
<!-- 进度条 end -->
<!-- 进度条是否显示信息 start -->
<block v-if="showInfo">
<text class="cmd-progress-text" :title="setFormat">
<block v-if="status != 'success' && status != 'exception' && setProgress < 100">{{setFormat}}</block>
<!-- #ifdef H5 -->
<svg v-if="status == 'exception'" viewBox="64 64 896 896" data-icon="close-circle" width="1em" height="1em"
fill="currentColor" aria-hidden="true">
<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path>
</svg>
<svg v-if="status == 'success' || setProgress == 100" viewBox="64 64 896 896" data-icon="check-circle" width="1em"
height="1em" fill="currentColor" aria-hidden="true" :style="{'color': strokeColor ? strokeColor : ''}">
<path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path>
</svg>
<!-- #endif -->
<!-- #ifndef H5 -->
<text v-if="status == 'exception' || status == 'success' || setProgress == 100" :style="setLineStatusIcon"></text>
<!-- #endif -->
</text>
</block>
<!-- 进度条是否显示信息 end -->
</block>
</view>
</template>
<script>
/**
* 进度条组件
* @description 显示一个操作完成的百分比时为用户显示该操作的当前进度和状态
* @tutorial https://ext.dcloud.net.cn/plugin?id=259
* @property {String} type 进度类型 - 线型line圆圈形circle仪表盘dashboard默认线型line
* @property {Number} percent 进度百分比值 - 显示范围0-100 可能数比较大就需要自己转成百分比的值
* @property {Number} success-percent 进度已完成的百分几 - 仅支持进度线型line
* @property {String} status 进度状态 - 涌动active仅支持线型line正常normal完成success失败exception默认正常normal
* @property {Boolean} show-info 进度状态信息 - 是否显示进度数值或状态图标默认true
* @property {Number} stroke-width 进度线条的宽度 - 建议在条线的宽度范围1-50与进度条显示宽度有关默认8
* @property {String} stroke-color 进度线条的颜色 - 渐变色仅支持线型line
* @property {String} stroke-shape 进度线条两端的形状 - round方块直角square默认圆round
* @property {Number} width 进度画布宽度 - 仅支持圆圈形circle仪表盘dashboard默认80
* @property {String} gap-degree 进度圆形缺口角度 - 可取值 0 ~ 360,仅支持圆圈形circle仪表盘dashboard
* @property {String} gap-position 进度圆形缺口位置 - 可取值'top', 'bottom', 'left', 'right',仅支持圆圈形circle仪表盘dashboard
* @example <cmd-progress :percent="30"></cmd-progress>
*/
export default {
name: 'cmd-progress',
props: {
/**
* 类型默认line可选 line circle dashboard
*/
type: {
validator: val => {
return ['line', 'circle', 'dashboard'].includes(val);
},
default: 'line'
},
/**
* 百分比
*/
percent: {
type: Number,
default: 0
},
/**
* 已完成的分段百分仅支持类型line
*/
successPercent: {
type: Number,
default: 0
},
/**
* 是否显示进度数值或状态图标
*/
showInfo: {
type: Boolean,
default: true
},
/**
* 进度状态可选normal success exception active仅支持类型line
*/
status: {
validator: val => {
return ['normal', 'success', 'exception', 'active'].includes(val);
},
default: 'normal'
},
/**
* 条线的宽度1-50与width有关
*/
strokeWidth: {
type: Number,
default: 6
},
/**
* 条线的颜色渐变色仅支持类型line
*/
strokeColor: {
type: String,
default: ''
},
/**
* 条线两端的形状 可选'round', 'square'
*/
strokeShape: {
validator: val => {
return ['round', 'square'].includes(val);
},
default: 'round'
},
/**
* 圆形进度条画布宽度,支持类型circle dashboard
*/
width: {
type: Number,
default: 80
},
/**
* 圆形进度条缺口角度可取值 0 ~ 360,支持类型circle dashboard
*/
gapDegree: {
type: Number,
default: 0
},
/**
* 圆形进度条缺口位置,可取值'top', 'bottom', 'left', 'right' ,支持类型circle dashboard
*/
gapPosition: {
validator: val => {
return ['top', 'bottom', 'left', 'right'].includes(val);
},
default: 'top'
}
},
computed: {
/**
* 如果需要自定义格式就在这改
*/
setFormat() {
return `${this.setProgress}%`;
},
/**
* 设置显示进度值禁止小于0和超过100
*/
setProgress() {
let percent = this.percent;
if (!this.percent || this.percent < 0) {
percent = 0;
} else if (this.percent >= 100) {
percent = 100;
}
return percent;
},
/**
* 进度圈svg大小
*/
setCircleStyle() {
return `width: ${this.width}px;
height: ${this.width}px;
fontSize: ${this.width * 0.15 + 6}px;`
},
/**
* 圈底色
*/
setCircleTrailStyle() {
const radius = 50 - this.strokeWidth / 2;
const len = Math.PI * 2 * radius;
const gapDeg = this.gapDegree || (this.type === 'dashboard' && 75);
return `stroke-dasharray: ${len - (gapDeg||0)}px, ${len}px;
stroke-dashoffset: -${(gapDeg||0) / 2}px;
transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;`
},
/**
* 圈进度
*/
setCirclePathStyle() {
const radius = 50 - this.strokeWidth / 2;
const len = Math.PI * 2 * radius;
const gapDeg = this.gapDegree || (this.type === 'dashboard' && 75);
return `stroke: ${this.strokeColor};
stroke-dasharray: ${(this.setProgress / 100) * (len - (gapDeg||0))}px, ${len}px;
stroke-dashoffset: -${(gapDeg||0) / 2}px;
transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;`
},
/**
* 绘制圈
*/
setCirclePath() {
const radius = 50 - this.strokeWidth / 2;
let beginPositionX = 0;
let beginPositionY = -radius;
let endPositionX = 0;
let endPositionY = -2 * radius;
const gapPos = (this.type === 'dashboard' && 'bottom') || this.gapPosition || 'top';
switch (gapPos) {
case 'left':
beginPositionX = -radius;
beginPositionY = 0;
endPositionX = 2 * radius;
endPositionY = 0;
break;
case 'right':
beginPositionX = radius;
beginPositionY = 0;
endPositionX = -2 * radius;
endPositionY = 0;
break;
case 'bottom':
beginPositionY = radius;
endPositionY = 2 * radius;
break;
default:
break;
}
return `M 50,50 m ${beginPositionX},${beginPositionY} a ${radius},${radius} 0 1 1 ${endPositionX},${-endPositionY} a ${radius},${radius} 0 1 1 ${-endPositionX},${endPositionY}`;
},
// #ifndef H5
/**
* 非H5端绘制进度圈svg转base URL
*/
setCircle() {
const radius = 50 - this.strokeWidth / 2;
const len = Math.PI * 2 * radius;
const gapDeg = this.gapDegree || (this.type === 'dashboard' && 75);
let currentColor = '#108ee9'
//
if (this.status == 'exception') {
currentColor = '#f5222d'
}
//
if (this.status == 'success' || this.setProgress >= 100 || this.strokeColor) {
currentColor = this.strokeColor || '#52c41a'
}
let svgToBase =
`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' class='cmd-progress-circle'%3E%3Cpath d='${this.setCirclePath}' stroke='%23f3f3f3' stroke-linecap='${this.strokeShape}' stroke-width='${this.strokeWidth}' fill-opacity='0' class='cmd-progress-circle-trail' style='stroke-dasharray: ${len - (gapDeg||0)}px, ${len}px;stroke-dashoffset: -${(gapDeg||0) / 2}px;transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;'%3E%3C/path%3E%3Cpath d='${this.setCirclePath}' stroke-linecap='${this.strokeShape}' stroke-width='${this.strokeWidth}' fill-opacity='0' class='cmd-progress-circle-path' style='stroke: ${escape(currentColor)};stroke-dasharray: ${(this.setProgress / 100) * (len - (gapDeg||0))}px, ${len}px;stroke-dashoffset: -${(gapDeg||0) / 2}px;transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;'%3E%3C/path%3E%3C/svg%3E`
return `background-image: url("${svgToBase}");
background-size: cover;
display: inline-block;
${this.setCircleStyle}`;
},
/**
* 设置进度圈状态图标
*/
setCircleIcon() {
let currentColor = '#108ee9'
let svgToBase = ''
//
if (this.status == 'exception') {
currentColor = '#f5222d'
svgToBase =
`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='close' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z'%3E%3C/path%3E %3C/svg%3E`;
}
//
if (this.status == 'success' || this.setProgress >= 100) {
currentColor = this.strokeColor || '#52c41a'
svgToBase =
`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='check' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z'%3E%3C/path%3E %3C/svg%3E`;
}
return `background-image: url("${svgToBase}");
background-size: cover;
display: inline-block;
width: 1em;
height: 1em;`;
},
// #endif
/**
* 设置进度条样式
*/
setLineStyle() {
return `width: ${this.setProgress}%;
height: ${this.strokeWidth}px;
background: ${this.strokeColor};
border-radius: ${this.strokeShape === 'square' ? 0 : '100px'};`;
},
/**
* 设置已完成分段进度
*/
setLineSuccessStyle() {
let successPercent = this.successPercent;
if (!this.successPercent || this.successPercent < 0 || this.setProgress < this.successPercent) {
successPercent = 0;
} else if (this.successPercent >= 100) {
successPercent = 100;
}
return `width: ${successPercent}%;
height: ${this.strokeWidth}px;
border-radius: ${this.strokeShape === 'square' ? 0 : '100px'};`;
},
// #ifndef H5
/**
* 设置进度条状态图标
*/
setLineStatusIcon() {
let currentColor = '#108ee9'
let svgToBase = ''
//
if (this.status == 'exception') {
currentColor = '#f5222d'
svgToBase =
`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='close-circle' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z'%3E%3C/path%3E %3C/svg%3E`;
}
//
if (this.status == 'success' || this.setProgress >= 100) {
currentColor = this.strokeColor || '#52c41a'
svgToBase =
`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='check-circle' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z'%3E%3C/path%3E %3C/svg%3E`;
}
return `background-image: url("${svgToBase}");
background-size: cover;
display: inline-block;
width: 1em;
height: 1em;`;
},
// #endif
/**
* 状态样式
*/
setStatusClass() {
let statusClass = [];
//
if (this.status == 'exception') {
statusClass.push('cmd-progress-status-exception')
}
//
if (this.status == 'success' || this.setProgress >= 100) {
statusClass.push('cmd-progress-status-success')
}
//
if (this.status == 'active') {
statusClass.push('cmd-progress-status-active')
}
//
if (this.showInfo) {
statusClass.push('cmd-progress-show-info')
}
//
if (this.type === 'line') {
statusClass.push('cmd-progress-line')
}
//
if (this.type === 'circle' || this.type === 'dashboard') {
statusClass.push('cmd-progress-circle')
}
statusClass.push('cmd-progress-status-normal')
return statusClass;
}
}
}
</script>
<style>
.cmd-progress {
box-sizing: border-box;
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
}
.cmd-progress-line {
width: 100%;
font-size: 28upx;
position: relative;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.cmd-progress-outer {
display: inline-block;
width: 100%;
margin-right: 0;
padding-right: 0;
}
.cmd-progress-show-info .cmd-progress-outer {
flex: 1;
}
.cmd-progress-inner {
display: inline-block;
width: 100%;
background-color: #f5f5f5;
border-radius: 200upx;
vertical-align: middle;
position: relative;
}
.cmd-progress-circle-trail {
stroke: #f5f5f5;
}
.cmd-progress-circle-path {
stroke: #1890ff;
animation: appear 0.3s;
}
.cmd-progress-success-bg,
.cmd-progress-bg {
background-color: #1890ff;
transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;
position: relative;
}
.cmd-progress-success-bg {
background-color: #52c41a;
position: absolute;
top: 0;
left: 0;
}
.cmd-progress-text {
word-break: normal;
width: 60upx;
text-align: left;
margin-left: 16upx;
vertical-align: middle;
display: inline-block;
white-space: nowrap;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
}
.cmd-progress-status-active .cmd-progress-bg:before {
content: "";
opacity: 0;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #fff;
border-radius: 20upx;
-webkit-animation: cmd-progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;
animation: cmd-progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}
.cmd-progress-status-exception .cmd-progress-bg {
background-color: #f5222d;
}
.cmd-progress-status-exception .cmd-progress-text {
color: #f5222d;
}
.cmd-progress-status-exception .cmd-progress-circle-path {
stroke: #f5222d;
}
.cmd-progress-status-success .cmd-progress-bg {
background-color: #52c41a;
}
.cmd-progress-status-success .cmd-progress-text {
color: #52c41a;
}
.cmd-progress-status-success .cmd-progress-circle-path {
stroke: #52c41a;
}
.cmd-progress-circle .cmd-progress-inner {
position: relative;
line-height: 1;
background-color: transparent;
}
.cmd-progress-circle .cmd-progress-text {
display: block;
position: absolute;
width: 100%;
text-align: center;
line-height: 1;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
left: 0;
margin: 0;
color: rgba(0, 0, 0, 0.65);
white-space: normal;
}
.cmd-progress-circle .cmd-progress-status-exception .cmd-progress-text {
color: #f5222d;
}
.cmd-progress-circle .cmd-progress-status-success .cmd-progress-text {
color: #52c41a;
}
@keyframes cmd-progress-active {
0% {
opacity: 0.1;
width: 0;
}
20% {
opacity: 0.5;
width: 0;
}
100% {
opacity: 0;
width: 100%;
}
}
</style>

View File

@ -0,0 +1,531 @@
<template>
<view class="canvas">
<view ref="Content" class="theContent">
<slot></slot>
</view>
<canvas canvas-id="myCanvas" id="myCanvas" @onReady="onCanvasReady"
:style="{ width: width + 'px', height: height + 'px' }"></canvas>
</view>
</template>
<!--
list参数说明
图片渲染
type: 'image',
x: X轴位置,
y: Y轴位置,
path: 图片路径,
width: 图片宽度,
height: 图片高度,
rotate: 旋转角度
mode:'center' 居中自适应
shape: 形状默认无可选值circle 圆形 如果是number,则生成圆角矩形
area: {x,y,width,height} // shape使areashape
矩形渲染
type: 'square',
x: X轴位置,
y: Y轴位置,
width: 图片宽度,
height: 图片高度,
rotate: 旋转角度
shape: 形状默认无可选值circle 圆形 如果是number,则生成圆角矩形
fillStyle:填充的背景样式
area: {x,y,width,height} // shape使areashape
文字渲染
type: 'text',
x: X轴位置,
y: Y轴位置,
text: 文本内容,
size: 字体大小,
textBaseline 基线 默认top 可选值'top''bottom''middle''normal'
color: 颜色
多行文字渲染
type: 'textarea',
x: X轴位置,
y: Y轴位置,
width换行的宽度
height: 高度溢出会展示...
lineSpace: 行间距
text: 文本内容,
size: 字体大小,
textBaseline 基线 默认top 可选值'top''bottom''middle''normal'
color: 颜色
-->
<script>
let timer = null;
export default {
name: "Poster",
props: {
//
list: {
type: Array,
required: true,
},
// ()
width: {
type: [Number, String],
default: uni.getSystemInfoSync().windowWidth * 2,
},
// ()
height: {
type: [Number, String],
default: uni.getSystemInfoSync().windowHeight * 2,
},
//
backgroundColor: {
type: String,
default: "rgba(255,255,255)",
},
},
emit: ["on-success", "on-error"],
data() {
return {
posterUrl: "",
renderList: [],
ctx: null, //
counter: -1, //
drawPathQueue: [], //
};
},
watch: {
drawPathQueue(newVal, oldVal) {
//
const fillText = (textOptions) => {
this.ctx.setFillStyle(textOptions.color);
this.ctx.setFontSize(textOptions.size);
this.ctx.setTextBaseline(textOptions.textBaseline || "top");
this.ctx.fillText(textOptions.text, textOptions.x, textOptions.y);
};
//
const fillParagraph = (textOptions) => {
this.ctx.setFontSize(textOptions.size);
let tempOptions = JSON.parse(JSON.stringify(textOptions));
//
tempOptions.lineSpace = tempOptions.lineSpace ? tempOptions.lineSpace : 10;
//
let str = textOptions.text;
//
let lineCount = Math.floor((tempOptions.height + tempOptions.lineSpace) / (tempOptions.size +
tempOptions.lineSpace));
//
let lineWidth = 0;
let lastSubStrIndex = 0; //
//
let strArr = str.split("");
let drawArr = [];
let text = "";
while (strArr.length) {
let word = strArr.shift();
text += word;
let textWidth = this.ctx.measureText(text).width;
if (textWidth > textOptions.width) {
//
text = text.substr(0, text.length - 1);
drawArr.push(text);
text = "";
// strArr
strArr.unshift(word);
} else if (!strArr.length) {
drawArr.push(text);
}
}
if (drawArr.length > lineCount) {
//
drawArr.length = lineCount;
let pointWidth = this.ctx.measureText("...").width;
let wordWidth = 0;
let wordArr = drawArr[drawArr.length - 1].split("");
let words = "";
while (pointWidth > wordWidth) {
words += wordArr.pop();
wordWidth = this.ctx.measureText(words).width;
}
drawArr[drawArr.length - 1] = wordArr.join("") + "...";
}
//
for (let i = 0; i < drawArr.length; i++) {
let _h = i > 0 ? tempOptions.size + tempOptions.lineSpace : 0;
tempOptions.y = tempOptions.y + _h; // y
tempOptions.text = drawArr[i]; //
fillText(tempOptions);
}
};
const roundRect = (x, y, w, h, r) => {
//
this.ctx.beginPath();
// 齿使 transparent
// 使 fill stroke
this.ctx.setFillStyle("transparent");
// ctx.setStrokeStyle('transparent')
//
this.ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
// border-top
this.ctx.moveTo(x + r, y);
this.ctx.lineTo(x + w - r, y);
this.ctx.lineTo(x + w, y + r);
//
this.ctx.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2);
// border-right
this.ctx.lineTo(x + w, y + h - r);
this.ctx.lineTo(x + w - r, y + h);
//
this.ctx.arc(x + w - r, y + h - r, r, 0, Math.PI * 0.5);
// border-bottom
this.ctx.lineTo(x + r, y + h);
this.ctx.lineTo(x, y + h - r);
//
this.ctx.arc(x + r, y + h - r, r, Math.PI * 0.5, Math.PI);
// border-left
this.ctx.lineTo(x, y + r);
this.ctx.lineTo(x + r, y);
// 使 fill stroke
this.ctx.fill();
// ctx.stroke()
this.ctx.closePath();
//
this.ctx.clip();
};
//
const adaptiveImg = (img, x, y, mode) => {
const {
imgW: w,
imgH: h,
width: dWidth,
height: dHeight
} = img;
let dw = dWidth / w; //canvas
let dh = dHeight / h; //canvas
//
if ((w > dWidth && h > dHeight) || (w < dWidth && h < dHeight)) {
if (dw > dh) {
this.ctx.drawImage(img.path, 0, (h - dHeight / dw) / 2, w, dHeight / dw, x, y, dWidth,
dHeight);
} else {
this.ctx.drawImage(img.path, (w - dWidth / dh) / 2, 0, dWidth / dh, h, x, y, dWidth,
dHeight);
}
} else {
//
if (w < dWidth) {
this.ctx.drawImage(img.path, 0, (h - dHeight / dw) / 2, w, dHeight / dw, x, y, dWidth,
dHeight);
} else {
this.ctx.drawImage(img.path, (w - dWidth / dh) / 2, 0, dWidth / dh, h, x, y, dWidth,
dHeight);
}
}
//
// this.ctx.drawImage(img.path, sx, sy, sWidth, sHeight, x, y, dWidth, dHeight);
// this.ctx.drawImage(img.path, x, y, temp.dWidth, temp.dHeight);
};
//
this.ctx.setFillStyle(this.backgroundColor);
this.ctx.fillRect(0, 0, this.width, this.height);
/* 所有元素入队则开始绘制 */
if (newVal.length === this.renderList.length) {
if (newVal.length == 0) {
this.$emit("on-error", {
msg: "数据为空",
});
return;
}
try {
// console.log('' + JSON.stringify(newVal));
for (let i = 0; i < this.drawPathQueue.length; i++) {
for (let j = 0; j < this.drawPathQueue.length; j++) {
let current = this.drawPathQueue[j];
/* 按顺序绘制 */
if (current.index === i) {
/* 文本绘制 */
if (current.type === "text") {
fillText(current);
this.counter--;
}
/* 多行文本 */
if (current.type === "textarea") {
console.log("开始绘制...textarea");
fillParagraph(current);
this.counter--;
}
/* 多行文本 */
if (current.type === "text") {
console.log("开始绘制...square");
this.ctx.save(); //
this.ctx.beginPath(); //
// save
//
let offsetX = current.x + Number(current.width) / 2;
let offsetY = current.y + Number(current.height) / 2;
this.ctx.translate(offsetX, offsetY);
let degrees = current.rotate ? Number(current.rotate) % 360 : 0;
this.ctx.rotate((degrees * Math.PI) / 180);
this.ctx.fillStyle = current.fillStyle;
this.ctx.fillRect(current.x - offsetX, current.y - offsetY, current.width, current
.height);
this.ctx.closePath();
this.ctx.restore(); //
this.counter--;
}
/* 图片绘制 */
if (current.type === "image") {
console.log("开始绘制...image");
if (current.area) {
//
this.ctx.save();
this.ctx.beginPath(); //
this.ctx.rect(current.area.x, current.area.y, current.area.width, current.area
.height);
this.ctx.clip();
//
let offsetX = current.x + Number(current.width) / 2;
let offsetY = current.y + Number(current.height) / 2;
this.ctx.translate(offsetX, offsetY);
let degrees = current.rotate ? Number(current.rotate) % 360 : 0;
this.ctx.rotate((degrees * Math.PI) / 180);
this.ctx.drawImage(current.path, current.x - offsetX, current.y - offsetY,
current.width, current.height);
this.ctx.closePath();
this.ctx.restore(); //
} else if (current.shape == "circle") {
this.ctx.save(); //
this.ctx.beginPath(); //
// x,y false
let width = current.width / 2 + current.x;
let height = current.height / 2 + current.y;
let r = current.width / 2;
this.ctx.arc(width, height, r, 0, Math.PI * 2);
this.ctx.lineTo(current.x, current.y);
this.ctx.fill();
// save
this.ctx.clip();
//
let offsetX = current.x + Number(current.width) / 2;
let offsetY = current.y + Number(current.height) / 2;
this.ctx.translate(offsetX, offsetY);
let degrees = current.rotate ? Number(current.rotate) % 360 : 0;
this.ctx.rotate((degrees * Math.PI) / 180);
current.mode ?
adaptiveImg(current, current.x - offsetX, current.y - offsetY, current
.mode) :
this.ctx.drawImage(current.path, current.x - offsetX, current.y - offsetY,
current.width, current.height);
this.ctx.closePath();
this.ctx.restore(); //
} else if (typeof current.shape == "number") {
this.ctx.save(); //
this.ctx.beginPath(); //
roundRect(current.x, current.y, current.width, current.height, current.shape);
// save
//
let offsetX = current.x + Number(current.width) / 2;
let offsetY = current.y + Number(current.height) / 2;
this.ctx.translate(offsetX, offsetY);
let degrees = current.rotate ? Number(current.rotate) % 360 : 0;
this.ctx.rotate((degrees * Math.PI) / 180);
current.mode ?
adaptiveImg(current, current.x - offsetX, current.y - offsetY, current
.mode) :
this.ctx.drawImage(current.path, current.x - offsetX, current.y - offsetY,
current.width, current.height);
this.ctx.closePath();
this.ctx.restore(); //
} else {
this.ctx.drawImage(current.path, current.x, current.y, current.width, current
.height);
}
this.counter--;
}
}
}
}
} catch (err) {
console.log(err);
this.$emit("on-error", err);
}
}
},
counter(newVal, oldVal) {
if (newVal === 0) {
this.$nextTick(() => {
this.ctx.draw(false, (draw) => {
uni.canvasToTempFilePath({
canvasId: "myCanvas",
success: (res) => {
// H5tempFilePath base64
console.log("图片已保存至本地:", res.tempFilePath);
this.posterUrl = res.tempFilePath;
this.$emit("on-success", res.tempFilePath);
},
fail: (error) => {
this.$emit("on-error", error);
},
},
this
);
});
})
}
},
},
mounted() {
// this.generateImg();
// console.log('mounted');
},
methods: {
// #ifdef MP-ALIPAY
onCanvasReady() {
const query = my.createSelectorQuery();
query
.select("#myCanvas")
.node()
.exec((res) => {
const canvas = res[0].node;
const ctx = canvas.getContext("2d");
});
},
// #endif
/**
* @param {*} elClass 元素名称
* @param {*} slot 是否采用slot方式
* @param {*} startX X偏移
* @param {*} startY Y偏移
* @return {*}
*/
createForElRect(elClass = "Poster", slot = true, startX = 0, startY = 0) {
uni
.createSelectorQuery()
.selectAll("." + elClass)
.fields({
dataset: true,
size: true,
rect: true,
value: true,
scrollOffset: true,
properties: ["src", "mode"],
computedStyle: ["margin", "padding", "backgroundColor", "fontSize", "color", "fontWeight",
"borderRadius"
],
context: true,
},
(res) => {
let list = [];
const sys = uni.getSystemInfoSync();
let multiple = sys.windowWidth / this.width;
res.forEach((val, index) => {
let src = val.src || val.dataset.enode || "";
let type = val.src ? "image" : val.dataset.etype || "textarea";
let text = val.dataset.enode || "";
let size = val.fontSize.replace("px", "") || 13;
let shape = val.borderRadius == "50%" ? "circle" : val.borderRadius.replace("px",
"") * 2;
let x = (startX + val.left - (slot ? sys.screenWidth : 0)) / multiple;
let y = (startY + val.top) / multiple;
y = (startY + val.top - (slot ? 50 : 0)) / multiple;
// #ifdef H5
y = (startY + val.top) / multiple;
// #endif
list.push({
type: type,
shape,
text,
mode: "center",
x,
y,
path: src,
width: val.width / multiple,
height: val.height / multiple,
size: size / multiple,
color: val.color,
});
});
let canvas = uni.createCanvasContext("myCanvas", this);
this.ctx = canvas;
this.renderList = [...this.list, ...list];
this.generateImg();
}
)
.exec();
},
create() {
let canvas = uni.createCanvasContext("myCanvas", this);
this.ctx = canvas;
this.renderList = this.list;
this.generateImg();
},
async generateImg() {
this.counter = this.renderList.length;
this.drawPathQueue = [];
const getImgInfo = async (current) => {
return new Promise((resolve, reject) => {
uni.getImageInfo ?
uni.getImageInfo({
src: current.path,
success: (res) => {
current.path = res.path;
current.imgW = res.width;
current.imgH = res.height;
// this.drawPathQueue.push(current);
resolve(current);
},
}) :
resolve(current);
});
};
const delayedLog = async (v, i) => {
let current = this.renderList[i];
current.index = i;
/* 如果是文本直接放入队列 */
if (current.type === "text" || current.type === "textarea" || current.type === "square") {
// this.drawPathQueue.push(current);
return current;
} else {
return await getImgInfo(current);
/* 图片需获取本地缓存path放入队列 */
}
};
const processArray = async (array) => {
// map array to promises
const promises = array.map((v, i) => delayedLog(v, i));
// wait until all promises are resolved
const allData = await Promise.all(promises);
return allData;
};
this.drawPathQueue = await processArray(this.renderList);
},
saveImg() {
uni.canvasToTempFilePath({
canvasId: "myCanvas",
success: (res) => {
// H5tempFilePath base64
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: () => {
console.log("save success");
},
});
},
},
this
);
},
},
};
</script>
<style lang="scss" scoped>
.canvas {
position: fixed;
top: 100rpx;
left: 750rpx;
width: 100vw;
background: #fff;
}
.theContent {}
</style>

View File

@ -0,0 +1,717 @@
<template>
<view class="date">
<view class="head" :style="{'display':hidden?'none':''}">
<view class="icon" @click="switch_month_week('prev',true)"><text style="color: #999;"
class="iconfont icon-fanhui" /></view>
<view class="title">{{nowYear+'年'+nowMonth+'月'}}</view>
<view class="icon" @click="switch_month_week('next',true)"><text style="color: #999;"
class="iconfont next icon-fanhui" /></view>
</view>
<view class="date_dl">
<view class="dd" v-for="(item,index) in week" :key="index">{{item}}</view>
</view>
<swiper :style="{height:(retract ? 2 * 50 : 520 ) + 'rpx'}" :current="current" circular @change="change_date">
<swiper-item>
<view class="date_dl" v-show="!retract || index == to_prev_week_index"
v-for="(item,index) in week_list_prev_co" :key="index" v-if="index<6">
<view class="dd" @click="item_click(vo,index,key)" v-for="(vo,key) in item" :key="key">
<view class="num"
:class="[vo.today ? 'today' : '',vo.type == 'month' ? 'month' : (retract ? '' : 'disabled')]">
{{customDate==currenDate&&vo.today?'今':vo.day}}
</view>
<view v-show="vo.dot && (vo.type == 'month' || retract)" class="dot"></view>
</view>
</view>
<view @click="open" class="tagWidth">
<uni-icons type="bottom" v-if="retract" size="16"></uni-icons>
<uni-icons type="top" v-else size="16"></uni-icons>
</view>
</swiper-item>
<swiper-item>
<view class="date_dl" v-show="!retract || index == to_week_index" v-for="(item,index) in week_list"
:key="index" v-if="index<6">
<view class="dd" @click="item_click(vo,index,key)" v-for="(vo,key) in item" :key="key">
<view class="num"
:class="[vo.today ? 'today' : '',vo.type == 'month' ? 'month' : (retract ? '' : 'disabled')]">
{{customDate==currenDate&&vo.today?'今':vo.day}}
</view>
<view v-show="vo.dot && (vo.type == 'month' || retract)" class="dot"></view>
</view>
</view>
<view @click="open" class="tagWidth">
<uni-icons type="bottom" v-if="retract" size="16"></uni-icons>
<uni-icons type="top" v-else size="16"></uni-icons>
</view>
</swiper-item>
<swiper-item>
<view class="date_dl" v-show="!retract || index == to_next_week_index"
v-for="(item,index) in week_list_next_co" :key="index" v-if="index<6">
<view class="dd" @click="item_click(vo,index,key)" v-for="(vo,key) in item" :key="key">
<view class="num"
:class="[vo.today ? 'today' : '',vo.type == 'month' ? 'month' : (retract ? '' : 'disabled')]">
{{customDate==currenDate&&vo.today?'今':vo.day}}
</view>
<view v-show="vo.dot && (vo.type == 'month' || retract)" class="dot"></view>
</view>
</view>
<view @click="open" class="tagWidth">
<uni-icons type="bottom" v-if="retract" size="16"></uni-icons>
<uni-icons type="top" v-else size="16"></uni-icons>
</view>
</swiper-item>
</swiper>
</view>
</template>
<script>
import {
formatTime
} from "/tool/index.js"
export default {
props: {
value: {
type: [String, Number],
default: '',
},
dot_lists: {
type: Array,
default: () => {
return [];
}
},
hidden: {
type: Boolean,
default: false
},
customDate: {
type: String,
default: ''
}
},
data() {
return {
dateTime:'',
currenDate: formatTime(new Date()).split(' ')[0], //
debug: false,
week: ['日', '一', '二', '三', '四', '五', '六'],
week_list: [],
week_list_prev: [],
week_list_prev_week: [],
week_list_next: [],
week_list_next_week: [],
now_date: '',
start_date: '',
end_date: '',
prev_date: '',
next_date: '',
nowYear: '',
nowMonth: '',
nowDay: '',
retract: true,
to_week_index: 0,
to_prev_week_index: 0,
to_next_week_index: 0,
nowTime: 0,
dot_list: [],
current: 1,
date: '',
}
},
watch: {
value(value) {
this.get_date(this.date_parse(value));
},
dot_lists: {
immediate: true,
handler(value) {
this.dot_list = value;
this.set_doc_lists_update()
}
}
},
computed: {
week_list_prev_co() {
return this.retract ? this.week_list_prev_week : this.week_list_prev
},
week_list_next_co() {
return this.retract ? this.week_list_next_week : this.week_list_next
}
},
created() {
this.init();
},
methods: {
change(item, key) {
let value = {
fulldate: this.date.replace(/-(\d)(?!\d)/g, '-0$1'),
item
};
this.$emit('change', value, key)
},
init() {
console.log(this.value)
if (this.value) {
this.get_date(this.date_parse(this.value));
} else {
this.get_date();
}
this.doc_list_update();
this.update_month();
},
open() {
this.retract = !this.retract;
this.get_date(this.nowTime);
this.set_to_day('week_list_prev')
this.set_to_day('week_list_next')
this.change_week();
if (this.retract) {
this.update_swiper_item('week')
} else {
this.update_swiper_item('month')
}
this.set_doc_lists_update();
},
change_week() {
if (this.to_week_index < this.week_list.length - 1) {
this.to_next_week_index = this.to_week_index + 1;
this.week_list_next_week = this.week_list;
} else {
this.to_next_week_index = 0;
this.week_list_next_week = this.week_list_next;
}
if (this.to_week_index == 0) {
this.update_month();
// if(){
let next_day = this.week_list_prev[this.week_list_prev.length - 1][6].day;
// }
this.to_prev_week_index = this.week_list_prev.length - 1 - Math.ceil(next_day / 7);
this.week_list_prev_week = JSON.parse(JSON.stringify(this.week_list_prev));
} else {
this.to_prev_week_index = this.to_week_index - 1;
this.week_list_prev_week = this.week_list;
}
// if(this.current == 1){
// }
// let to_week_index = this.to_week_index;
// if(this.current == 2){
// this.to_next_week_index = this.to_week_index;
// this.to_week_index = this.to_week_index - 1;
// this.to_prev_week_index = this.to_next_week_index + 1;
// }else if(this.current == 0){
// this.to_next_week_index = this.to_week_index;
// this.to_week_index = this.to_week_index - 1;
// this.to_prev_week_index = this.to_next_week_index + 1;
// }
},
change_date_week(type) {
let week_list = this.week_list;
let to_week_index = this.to_week_index;
if (type == 'prev') {
this.to_week_index = this.to_prev_week_index;
this.to_prev_week_index = this.to_next_week_index
this.to_next_week_index = to_week_index;
this.week_list = this.week_list_prev_week
this.week_list_prev_week = this.week_list_next_week;
this.week_list_next_week = week_list;
} else if (type == 'next') {
this.to_week_index = this.to_next_week_index;
this.to_next_week_index = this.to_prev_week_index
this.to_prev_week_index = to_week_index;
this.week_list = this.week_list_next_week
this.week_list_next_week = this.week_list_prev_week;
this.week_list_prev_week = week_list;
}
this.set_to_day_all();
},
change_date_month(type) {
let week_list = this.week_list;
if (type == 'prev') {
this.week_list = this.week_list_prev
this.week_list_prev = this.week_list_next;
this.week_list_next = week_list;
} else if (type == 'next') {
this.week_list = this.week_list_next
this.week_list_next = this.week_list_prev;
this.week_list_prev = week_list;
}
},
change_date(e) {
let primary_current = this.current
let current = e.detail.current;
this.current = current;
if (primary_current - current == -1 || primary_current - current == 2) {
if (this.retract) {
this.switch_month_week('next')
this.change_week()
if (primary_current - current == -1 && current != 1) {
this.change_date_week('prev')
} else if (primary_current - current == 2) {
this.change_date_week('next')
}
} else {
this.get_date(this.get_month('next'));
this.update_month();
if (primary_current - current == -1 && current != 1) {
this.change_date_month('prev')
} else if (primary_current - current == 2) {
this.change_date_month('next')
}
}
} else {
if (this.retract) {
this.switch_month_week('prev')
this.change_week()
if (primary_current - current == 1 && current != 1) {
this.change_date_week('next')
} else if (primary_current - current == -2) {
this.change_date_week('prev')
}
} else {
this.get_date(this.get_month('prev'));
this.update_month();
if (primary_current - current == 1 && current != 1) {
this.change_date_month('next')
} else if (primary_current - current == -2) {
this.change_date_month('prev')
}
}
}
this.set_to_day_all();
this.set_doc_lists_update();
this.change()
},
update_month() {
this.get_date(this.get_month('prev'), 'prev');
this.get_date(this.get_month('next'), 'next');
},
set_doc_lists_update() {
this.doc_list_update('week_list');
this.doc_list_update('week_list_prev');
this.doc_list_update('week_list_next');
this.doc_list_update('week_list_prev_week')
this.doc_list_update('week_list_next_week')
},
doc_list_update(week_list = 'week_list') {
let list = [];
this[week_list].map((item, index) => {
list.push(item.map((vo, key) => {
if (this.dot_list.indexOf(vo.date) > -1 || this.dot_list.indexOf(vo.date
.replace(/-(\d)(?!\d)/g, '-0$1')) > -1) {
vo.dot = true;
} else {
vo.dot = false;
}
return {
...vo
}
}))
})
this[week_list] = list;
},
set_to_day(type) {
let list = [];
this[type].map((item, index) => {
list.push(item.map((vo, key) => {
if (vo.date == `${this.date}`) {
vo.today = true;
} else {
vo.today = false;
}
return {
...vo
};
}))
})
this[type] = list;
},
item_click(item, item_index = -1) {
if (!this.retract && item.type !== 'month') {
return false;
}
this.date = item.date;;
if (item.type == 'month') {
this.nowDay = item.day;
if (item_index >= 0) this.to_week_index = item_index;
} else if (this.retract) {
this.nowDay = item.day;
}
let now_arr = item.date.split('-')
this.nowYear = now_arr[0];
this.nowMonth = now_arr[1];
this.nowDay = now_arr[2];
this.set_to_day_all(item_index);
this.nowTime = this.date_parse(`${item.date}`);
this.change(item, 3)
this.set_doc_lists_update();
},
set_to_day_all(item_index) {
this.set_to_day('week_list')
this.set_to_day('week_list_prev')
this.set_to_day('week_list_next')
this.set_to_day('week_list_prev_week')
this.set_to_day('week_list_next_week')
},
get_month(type) {
let nowMonth = this.nowMonth;
let nowYear = this.nowYear;
let nowDay = this.nowDay;
if (type == 'prev') {
if (nowMonth == 1) {
nowMonth = 12;
nowYear = nowYear - 1;
} else {
nowMonth--;
}
} else if (type == 'next') {
if (nowMonth == 12) {
nowMonth = 1;
nowYear = nowYear + 1;
} else {
nowMonth++;
}
}
let days = this.get_month_days(nowMonth, nowYear);
if (nowDay > days) {
nowDay = days;
}
return this.date_parse(`${nowYear}-${nowMonth}-${nowDay}`);
},
date_parse(str) {
return Date.parse(str.replace(/-(\d)(?!\d)/g, '-0$1'));
},
switch_month_week(type = 'next', update_week = false) {
if (this.retract) {
if (type == 'prev') {
this.get_date(this.nowTime - 86400 * 7 * 1000);
} else if (type == 'next') {
this.get_date(this.nowTime + 86401 * 7 * 1000);
}
if (update_week) {
this.update_swiper_item('week');
this.set_doc_lists_update();
}
} else {
this.get_date(this.get_month(type))
this.update_swiper_item('month');
}
this.set_doc_lists_update();
this.set_to_day_all();
if (update_week) {
this.change(type)
}
},
update_swiper_item(type = 'month') {
if (type == 'month') {
if (this.current == 0) {
this.change_date_month('next')
} else if (this.current == 2) {
this.change_date_month('prev')
}
} else if (type == 'week') {
if (this.current == 0) {
this.change_date_week('next')
} else if (this.current == 2) {
this.change_date_week('prev')
}
}
},
next() {
this.get_date(this.next_date)
},
get_date(value = this.customDate, type = 'same') {
let date = new Date();
if (value) {
date = new Date(value);
}
let nowMonth = date.getMonth() + 1,
nowYear = date.getFullYear(),
nowDay = date.getDate(),
nowTime = date.getTime(),
nowWeek = date.getDay();
let days = this.get_month_days(nowMonth, nowYear);
let start_date = new Date(nowYear, nowMonth - 1, 1);
let end_date = new Date(nowYear, nowMonth - 1, days);
let prev_date = new Date(start_date.getTime() - 1);
let prev_date_days = prev_date.getDate();
let next_date = new Date(end_date.getTime() + 86401 * 1000);
let next_date_days = next_date.getDate();
let start_week = start_date.getDay();
let date_arrs = [];
let week_list = [];
let count_days = 35;
for (let i = prev_date_days - start_week + 1; i <= prev_date_days; i++) {
date_arrs.push({
day: i,
type: 'prev',
date: `${prev_date.getFullYear()}-${prev_date.getMonth()+1}-${i}`
})
}
for (let i = 1; i <= days; i++) {
date_arrs.push({
day: i,
type: 'month',
today: i == nowDay ? true : false,
date: `${nowYear}-${nowMonth}-${i}`
})
if (i == nowDay && type == 'same') {
this.date = `${nowYear}-${nowMonth}-${i}`;
}
}
if (this.debug) console.log(value, date, this.date,
`${next_date.getFullYear()}-${next_date.getMonth()+1}-${next_date.getDate()}`)
let date_arrs_length = date_arrs.length;
// if(date_arrs_length > 35){
count_days = 42;
// }
for (let i = 1; i <= count_days - date_arrs_length; i++) {
date_arrs.push({
day: i,
type: 'next',
date: `${next_date.getFullYear()}-${next_date.getMonth()+1}-${i}`
})
}
for (let i = 0; i < date_arrs.length / 7; i++) {
let arr = [];
for (let j = 0; j < 7; j++) {
if (date_arrs[i * 7 + j].today) {
if (type == 'same') {
this.to_week_index = i
}
}
arr.push(date_arrs[i * 7 + j]);
}
week_list.push(arr);
}
if (type == 'same') {
this.week_list = week_list;
this.nowYear = nowYear;
this.nowMonth = nowMonth;
this.nowDay = nowDay;
this.nowTime = nowTime;
this.start_date = start_date;
this.end_date = end_date;
this.prev_date = prev_date;
this.next_date = next_date;
} else if (type == 'prev') {
this.week_list_prev = week_list;
} else if (type == 'next') {
this.week_list_next = week_list;
}
},
get_month_days(nowMonth, nowYear) {
let month_arr = [1, 3, 5, 7, 8, 10, 12];
let days = 0;
if (nowMonth == 2) {
if (nowYear % 4 == 0) {
days = 29;
} else {
days = 28;
}
} else if (month_arr.indexOf(nowMonth) >= 0) {
days = 31;
} else {
days = 30;
}
return days;
}
}
}
</script>
<style lang="less">
@import (less) '../../static/lx-calendar/fonts/iconfont.css';
@color: #FE8025;
@color_disabled: #f1f1f1;
@color_standard: #333;
@color_border: #f5f5f5;
.date {
width: 100%;
}
.head {
display: flex;
align-items: center;
height: 100rpx;
justify-content: center;
justify-content: space-between;
padding: 0 40rpx;
border-bottom: 1rpx solid @color_border;
color: @color_standard;
.title {
width: 200rpx;
font-size: 26rpx;
text-align: center;
color: #112950;
font-weight: 600;
}
.icon {
display: block;
.next {
transform: rotate(180deg);
display: block;
}
}
}
.retract {
display: flex;
justify-content: center;
align-items: center;
height: 50rpx;
;
.iconfont {
transform: rotate(270deg);
&.retract_icon {
transform: rotate(90deg);
}
}
}
.tagWidth {
width: 100%;
background: #fff;
text-align: center;
margin-top: -12rpx;
}
.date_dl {
display: flex;
width: 100%;
.dd {
flex: 1;
text-align: center;
height: 80rpx;
font-size: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
.num {
width: 60rpx;
height: 60rpx;
border-radius: 35%;
line-height: 60rpx;
font-size: 26rpx;
font-weight: 600;
&.disabled {
color: @color_disabled;
}
&.month {
color: @color_standard;
}
&.today {
background: @color;
color: #fff;
font-size: 28rpx;
}
}
.dot {
width: 8rpx;
height: 8rpx;
border-radius: 50%;
background: @color;
position: absolute;
top: 20rpx;
right: 30rpx;
transform: translateX(-50%);
}
}
}
</style>

View File

@ -0,0 +1,42 @@
<template>
<view class="history-false" :style="{'margin-top':marginTop+'%','padding-top':paddingTop+'%'}">
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/selfRegistration/nothing.png"></image>
</view>
<!-- <view>{{context}}</view> -->
</view>
</template>
<script>
export default {
props: {
context: {
type: String,
default: '暂无数据~'
},
marginTop:{
type: Number,
default: 0
},
paddingTop:{
type: Number,
default: 50
}
}
}
</script>
<style scoped lang="scss">
.history-false {
image {
width: 512rpx;
height: 512rpx;
}
view {
font-size: 28upx;
color: #999;
text-align: center;
}
}
</style>

50
src/lx-calendar.md Normal file
View File

@ -0,0 +1,50 @@
# 日历组件 lx-calendar可选择周与月支持左右滑动切换
```
<template>
<view class="content">
<lxCalendar @change="change"></lxCalendar>
</view>
</template>
<script>
import lxCalendar from '../../components/lx-calendar/lx-calendar.vue'
export default {
components:{
lxCalendar,
},
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
change(e){
console.log(e);
}
}
}
</script>
```
事件 | 说明
---|---
change | 日期改变时执行
参数 | 类型 | 说明
---|---|---
value | 字符串 | 选中的日期
dot_lists | 数组 | 显示点的日期

19
src/main.js Normal file
View File

@ -0,0 +1,19 @@
import Vue from 'vue'
import App from './App'
import API from '/api/index.js'
import SMOKE from '/api/smoke.js'
import REGIST from '/api/regist.js'
Vue.config.productionTip = false
Vue.prototype.$API = API
Vue.prototype.$SMOKE = SMOKE
Vue.prototype.$REGIST = REGIST
App.mpType = 'app'
Vue.prototype.$preventClick = function(times = 2000) { // 防抖
if (this._CLICK) return true;
this._CLICK = true
setTimeout(() => this._CLICK = false, times)
}
const app = new Vue({
...App
})
app.$mount(); //为了兼容小程序及app端必须这样写才有效果

81
src/manifest.json Normal file
View File

@ -0,0 +1,81 @@
{
"name" : "",
"appid" : "__UNI__8AEA607",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
/* 5+App */
"usingComponents" : true,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"modules" : {},
/* */
"distribute" : {
/* */
"android" : {
/* android */
"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.READ_CONTACTS\"/>",
"<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\"/>"
]
},
"ios" : {},
/* ios */
"sdkConfigs" : {}
}
},
/* SDK */
"quickapp" : {},
/* */
"mp-weixin" : {
/* */
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"mp-qq" : {
"usingComponents" : true
},
"h5" : {
"router" : {
"base" : "test-risk-assessment"
}
}
}

362
src/pages.json Normal file
View File

@ -0,0 +1,362 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/detail/detail",
"style": {
"navigationBarTitleText": "评估详情页"
}
},
{
"path": "pages/psychological-assessment/index/index",
"style": {
"navigationBarTitleText": "心理评估"
}
},
{
"path": "pages/psychological-assessment/result/result",
"style": {
"navigationBarTitleText": "评估报告"
}
},
{
"path": "pages/health-risks/basicReport/basicReport",
"style": {
"navigationBarTitleText": "生活方式评估报告"
}
},
{
"path": "pages/health-risks/evaluationResults/evaluationResults",
"style": {
"navigationBarTitleText": "评估报告"
}
},
{
"path": "pages/health-risks/index/index",
"style": {
"navigationBarTitleText": "评估问卷"
}
},
{
"path": "pages/health-risks/guideDetails/guideDetails",
"style": {
"navigationBarTitleText": "指南详情"
}
},
{
"path": "pages/plan-questionnaire/diseaseIndex/diseaseIndex",
"style": {
"navigationBarTitleText": "问卷"
}
},
{
"path": "pages/plan-questionnaire/psychologicalIndex/psychologicalIndex",
"style": {
"navigationBarTitleText": "问卷"
}
},
{
"path": "pages/plan-questionnaire/planningReport/planningReport",
"style": {
"navigationBarTitleText": "评估报告",
"onReachBottomDistance": 50
}
},
{
"path": "pages/plan-questionnaire/moodRequest/moodRequest",
"style": {
"navigationBarTitleText": "评估报告",
"onReachBottomDistance": 50
}
}
],
"globalStyle": {
"navigationBarTitleText": "鲨鱼云康",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
"subPackages": [{
"root": "pages/quitSmoking",
"pages": [{
"path": "index/index",
"style": {
"navigationBarTitleText": "戒烟圈"
}
},
{
"path": "smokingDiary/smokingDiary",
"style": {
"navigationBarTitleText": "戒烟日记",
"onReachBottomDistance": 50
}
},
{
"path": "smokingTips/smokingTips",
"style": {
"navigationBarTitleText": "时光穿梭"
}
},
{
"path": "statistics/statistics",
"style": {
"navigationBarTitleText": "烟瘾数据统计"
}
},
{
"path": "smokingSituation/smokingSituation",
"style": {
"navigationBarTitleText": "吸烟情况"
}
},
{
"path": "recoveryScore/recoveryScore",
"style": {
"navigationBarTitleText": "健康恢复评分"
}
},
{
"path": "result/result",
"style": {
"navigationBarTitleText": "尼古丁依赖程度"
}
},
{
"path": "content/content",
"style": {
"navigationBarTitleText": "填写内容"
}
},
{
"path": "evaluationRecord/evaluationRecord",
"style": {
"navigationBarTitleText": "评估记录"
}
},
{
"path": "timeTravel/timeTravel",
"style": {
"navigationBarTitleText": "时光穿梭"
}
},
{
"path": "question/question",
"style": {
"navigationBarTitleText": "问卷"
}
},
{
"path": "scriptsList/scriptsList",
"style": {
"navigationBarTitleText": "秘籍"
}
},
{
"path": "scriptsLearn/scriptsLearn",
"style": {
"navigationBarTitleText": "学习"
}
},
{
"path": "scriptsDetail/scriptsDetail",
"style": {
"navigationBarTitleText": "详情"
}
},
{
"path": "cessationData/cessationData",
"style": {
"navigationBarTitleText": "我的戒烟数据"
}
}
]
}, {
"root": "pages/selfRegistration",
"pages": [{
"path": "index/index",
"style": {
"navigationBarTitleText": "问卷调查"
}
}, {
"path": "templateSelection/templateSelection",
"style": {
"navigationBarTitleText": "任务选择"
}
}, {
"path": "editTemplate/editTemplate",
"style": {
"navigationBarTitleText": "编辑任务"
}
}, {
"path": "actionList/actionList",
"style": {
"navigationBarTitleText": "行动列表"
}
}, {
"path": "planningCycle/planningCycle",
"style": {
"navigationBarTitleText": "计划周期"
}
}, {
"path": "dailyTasks/dailyTasks",
"style": {
"navigationBarTitleText": "每日任务"
}
}, {
"path": "planDiary/planDiary",
"style": {
"navigationBarTitleText": "计划日记",
"onReachBottomDistance": 50
}
}, {
"path": "content/content",
"style": {
"navigationBarTitleText": "填写内容"
}
}, {
"path": "eventRecording/eventRecording",
"style": {
"navigationBarTitleText": "事件记录"
}
},
{
"path": "planningReport/planningReport",
"style": {
"navigationBarTitleText": "计划报告"
}
}
]
},
{
"root": "pages/selfRegistration2",
"pages": [{
"path": "index/index",
"style": {
"navigationBarTitleText": "问卷调查"
}
}, {
"path": "templateSelection/templateSelection",
"style": {
"navigationBarTitleText": "任务选择"
}
}, {
"path": "actionList/actionList",
"style": {
"navigationBarTitleText": "行动列表"
}
}, {
"path": "planningCycle/planningCycle",
"style": {
"navigationBarTitleText": "计划周期"
}
}, {
"path": "dailyTasks/dailyTasks",
"style": {
"navigationBarTitleText": "每日任务"
}
},
{
"path": "aplanning/aplanning",
"style": {
"navigationBarTitleText": "创建自主计划活动"
}
}
]
},
{
"root": "pages/agreement",
"pages": [{
"path": "userAgreement",
"style": {
"navigationBarTitleText": "用户协议"
}
}, {
"path": "privacyPolicy",
"style": {
"navigationBarTitleText": "隐私政策"
}
}, {
"path": "serviceAgreement",
"style": {
"navigationBarTitleText": "会员服务协议"
}
}, {
"path": "children",
"style": {
"navigationBarTitleText": "儿童隐私协议"
}
}, {
"path": "web-view",
"style": {
"navigationBarTitleText": ""
}
}
]
}, {
"root": "pages/reports",
"pages": [{
"path": "reports",
"style": {
"navigationBarTitleText": "报告分析"
}
}]
}, {
"root": "pages/scanCodeEvaluation",
"pages": [{
"path": "detail/detail",
"style": {
"navigationBarTitleText": "生活方式评估"
}
},{
"path": "health-risks/basicReport/basicReport",
"style": {
"navigationBarTitleText": "生活方式报告"
}
},{
"path": "health-risks/index/index",
"style": {
"navigationBarTitleText": "生活方式评估"
}
}]
}, {
"root": "pages/hairtailScreen",
"pages": [{
"path": "bestFood/index/index",
"style": {
"navigationBarTitleText": "最佳食物"
}
},{
"path": "bestFood/detail/detail",
"style": {
"navigationBarTitleText": ""
}
},{
"path": "foodIngredients/index/index",
"style": {
"navigationBarTitleText": ""
}
},{
"path": "foodIngredients/detail/detail",
"style": {
"navigationBarTitleText": ""
}
},{
"path": "exchangePortion/index/index",
"style": {
"navigationBarTitleText": ""
}
},{
"path": "exchangePortion/detail/detail",
"style": {
"navigationBarTitleText": ""
}
}]
}]
}

View File

@ -0,0 +1,171 @@
<template>
<div class="contioner">
<h3 class="cneter">鲨鱼云康儿童个人信息保护规则及监护人须知</h3>
<p>本政策仅适用于湖南鲨鱼健康有限公司
的鲨鱼云康App提供的产品或服务包括您访问鲨鱼云康App使用平台提供的服务</p>
<p>版本生效日期:2024年01月15日</p>
<p>最近更新日期:2024年01月15日</p>
<p>湖南鲨鱼健康有限公司(鲨鱼云康我们)深知儿童(指未满十四周岁的未成年人下同)个人信息和隐私安全的重要性
鲨鱼云康隐私政策的基础上我们希望通过鲨鱼云康儿童个人信息保护规则及监护人须知(以下简称本政策)说明我们在收集和使用儿童个人信息时对应的处理规则等相关事宜
您作为您孩子的父母或其他监护人 ((1)法定监护人(2)指定监护人 (3)遗嘱监护人(4)委托监护人以下统称为监护人)
请在您或您孩子使用鲨鱼云康产品及服务(定义详见鲨鱼云康隐私政策)前务必仔细阅读并透彻理解本政策在确认充分理解并同意全部条款后再开始使用或允许您的孩子使用</p>
<p>目录</p>
<p>我们如何收集和使用儿童个人信息</p>
<p>我们如何共享转让公开披露儿童个人信息</p>
<p>我们如何储存儿童个人信息</p>
<p>我们如何保护儿童个人信息</p>
<p>本政策的修订</p>
<p>如何联系我们</p>
<p>监护人特别说明<p>
<p>监护人是指对无民事行为能力人和限制民
事行为能力人的人身财产和其他一切合法权益
负有监护职责的人您需要理解和配合我们
保您的孩子在您的同意和指导下使用鲨鱼云康服务
和向我们提交个人信息我们将根据本政策采取
特殊措施保护我们获得的您孩子的个人信息
果您不同意本政策的内容请您要求您的孩子立
即停止访问或使用鲨鱼云康产品及服务<p>
<p>儿童特别说明<p>
<p>本政策中的儿童是指年龄不满14周岁的人
任何儿童参加网上活动都应事先取得监护人
的同意如果您是儿童请务必通知您的监护人
共同阅读本政策并在您使用鲨鱼云康服务提交
个人信息之前寻求您的监护人的同意和指导
本政策适用于我们在中华人民共和国境内通
过网络从事收集存储使用转移分享和披
露儿童个人信息等活动包含鲨鱼云康App鲨鱼云康
小程序鲨鱼云康或鲨鱼云康关联公司物联网家电设
网站及微信小程序等本政策为在鲨鱼云康
隐私政策基础上制定的特别规则鲨鱼云康
隐私政策如有不一致之处以本规则为准
本规则未载明之处则参照适用鲨鱼云康隐私政
<p>
<p>在阅读完本政策后如对本政策或与本政策
相关的事宜有任何问题可通过本政策
何联系我们章节所列的反馈渠道联系我们
们会尽快作出解答<p>
<h3>我们如何收集和使用儿童个人信息</h3>
<p>()我们会严格履行法律法规规定的儿童个人信息保护义务与责任遵循正当必要知情同意目的明确安全保障依法利用的原则在征得监护人的同意后收集和使用儿童个人信息:</p>
<p>1为了更好地保护儿童的权益我们可能向监护
人收集更多信息(例如姓名身份证户口本或
其他监护关系证明)以便进一步验证监护人与
儿童的监护关系</p>
<p>2您在使用鲨鱼云康服务中主动向我们提供您孩子
的个人信息例如您在我们为您提供的评论
区及其他信息发布功能下分享的您孩子的照片或
视频视为您已经同意我们收集和按照本政策的
内容收集和使用您孩子的个人信息</p>
<p>()您或您的孩子在使用鲨鱼云康服务过程
我们为向您或者您的孩子提供鲨鱼云康服务
提供个性化展示或推荐以及为您的账户提供安全
保障等目的我们可能还会收集和使用其他儿童
个人信息有关具休的使用目的收集个人信息
的范围以及拒绝提供相应信息的后果请您查阅
鲨鱼云康隐私政策
我们如何收集和使用
您的个人信息章节进行详细了解此外我们
也会通过CookiesSDK等同类技术自动收集您
或您孩子的个人信息具体请您查阅鲨鱼云康隐私政策我们如何使用 Cookie 和同类技
进行详细了解如我们需要超出上述范围收
集和使用儿童个人信息我们将再次征得监护人
的同意</p>
<p>请您注意某些情形下我们将无法识别收集
和处理的个人信息是否属于儿童个人信息比如
通过计算机信息系统自动留存处理信息且无法识
别所留存处理的信息属于儿童个人信息的(如在
匿名浏览过程中的浏览记录等)等我们将按照
鲨鱼云康隐私政策收集和处理用户的个人信
</p>
<p>()征得授权同意的例外</p>
<p>根据相关法律法规规定以下情形中收集儿
童的信息无需征得儿童监护人的授权同意:</p>
<p>(1)与我们履行法律法规规定的义务相关的;</p>
<p>(2)与国家安全国防安全公共安全公共卫
重大公共利益有关的;</p>
<p>(3)与犯罪侦查起诉审判和判决执行等有关
;</p>
<p>(4)出于维护儿童您或其他个人的生命
产等重大合法权益但又很难得到您本人同意的;</p>
<p>(5)所收集的信息是儿童或监护人自行向社会公
众公开的;</p>
<p>(6)从合法公开披露的信息中收集信息的如合
法的新闻报道政府信息公开等渠道;</p>
<p>(7)根据与您或您的孩子签订和履行相关协议或
其他书面文件所必需的;</p>
<p>(8)用于维护鲨鱼云康服务的安全稳定运行所必需的例如发现处置鲨鱼云康服务的故障;</p>
<p>(9)学术研究机构基于公共利益开展统计或学术
研究所必要且对外提供学术研究或描述的结果
对结果中所包含的信息进行去标识化处理
;</p>
<p>(10)法律法规规定的其他情形</p>
<h3>我们如何共享转让公开披露您的个人信息</h3>
<p>我们承诺对儿童个人信息进行严格保密仅在符合本政策说明和您明确授权同意的情况下对外共享儿童个人信息
为了提升信息处理效率降低信息处理成本或提高信息处理准确性我们可能会委托有能力的我们的关联公司或其他专业机构代表我们来处理儿童个人信息
具体请参见鲨鱼云康隐私政策我们如何共享转让公开披露您的信息部分</p>
<p>()如果为了本政策所述目的而需要将儿
童个人信息共享至第三方我们将评估该第三方
收集儿童个人信息的合法性正当性必要性</p>
<p>()我们将要求第三方对儿童个人信息采
取保护措施并且严格遵守相关法律法规与监管
要求我们会要求接收儿童个人信息的第三方遵
守严格的保密义务及采取有效的保密措施禁止
其将这些儿童个人信息用于未经儿童及其监护人
授权的用途并要求受托公司依法履行以下业务:</p>
<p>1按照法律行政法规的规定和我们的要求处理儿童个人信息;</p>
<p>2协助我们回应儿童监护人提出的申请;</p>
<p>3采取措施保障信息安全并在发生儿童个人信息泄露安全事件时及时向我们反馈;</p>
<p>4委托关系解除时及时删除儿童个人信息;</p>
<p>5不得转委托;</p>
<p>6其他依法应当履行的儿童个人信息保护义务</p>
<p>()另外我们会按照法律法规的要求征得您的同意或确认第三方已经征得您同意</p>
<h3>我们如何储存儿童个人信息</h3>
<p>()我们在中华人民共和国境内运营中收集和产生的儿童个人信息将存储在中国境内以下情形下我们会在履行了法律规定的义务后向境外的组织或个人提供儿童的个人信息:</p>
<p>1适用的法律有明确规定;</p>
<p>2获得您的明确授权;</p>
<p>3您或者您的孩子通过互联网进行跨境交易等个人主动行为</p>
<p>针对以上情形我们会通过合同等形式确保以不低于本政策规定的程度保护儿童的个人信息</p>
<p>()我们会采取合理可行的措施尽力避免收集和处理无关的儿童的个人信息我们只会在达成本政策所述目的所需的期限内保留儿童的个人信息
除非法律有强制的留存要求关于我们如何确定儿童个人信息存储期限请参见鲨鱼云康隐私政策我们如何保护您的个人信息如我们终止服务或运营
我们将及时停止继续收集儿童个人信息的活动同时会遵守相关法律法规要求提前向监护人通知并在终止服务或运营后对儿童的个人信息进行删除或匿名化处理
但法律法规或监管部门另有规定的除外</p>
<h3>我们如何保护儿童个人信息</h3>
<p>我们非常重视儿童的隐私安全并采取一切合理可行的措施保护儿童个人信息:</p>
<p>()我们会严格控制儿童个人信息的访问权限对可能接触到儿童个人信息的工作人员采取最小够用授权原则并采取技术措施对工作人员处理儿童个人信息的行为进行记录和管控避免违法复制下载儿童个人信息</p>
<p>()我们已制定儿童个人信息安全事件应急预案会定期组织内部相关人员进行应急响应培训和应急演练使其掌握岗位职责和应急处置策略和规程
在不幸发生儿童个人信息安全事件后我们将按照法律法规的要求及时向儿童及其监护人告知:安全事件的基本情况和可能的影响
我们已采取或将要采取的处置措施儿童及其监护人可自主防范和降低风险的建议对儿童及其监护人的补救措施等我们将及时将事件相关情况以APP推送通知
发送邮件/短消息等方式告知儿童及其监护人难以逐一告知时我们会采取合理有效的方式发布相关警示信息同时我们还将按照监管部门要求
主动上报儿童个人信息安全事件的处置情况若儿童及其监护人的合法权益受损我们将承担相应的法律责任</p>
<p>()如您希望了解更多请查阅鲨鱼云康隐私政策我们如何保护您的个人信息章节详细了解我们如何采取了哪些措施保护儿童个人信息</p>
<h3>本政策的修订</h3>
<p>我们可能会根据鲨鱼云康服务的更新情况及法律法规的相关要求适时修改本政策的条款该等修改构成本政策的一部分
我们会在专门页面[鲨鱼云康客户端-我的-设置-关于鲨鱼云康-隐私政策对应链接中展示最新修改版本
由于鲨鱼云康的用户较多对于重大变更我们还会提供更为显著的通知(包括通过网站或客户端首页公示的方式进行通知甚至向您提供弹窗提示)
具体详见鲨鱼云康隐私政策第八条本政策如何更新的规定</p>
<h3>如何联系我们</h3>
<p>如您和您的孩子对本政策存在任何疑问或对于儿童个人信息处理存在任何投诉意见请通过以下渠道联系我们
我们将在收到问题意见或建议并验证监护人和/或儿童身份后的十五天内回复您的请求:</p>
<p>电子邮件: 841382055@qq.com</p>
<p>电话: 400-833-3131</p>
<p>注册地址:湖南省长沙市岳麓区梅溪湖街道泉水路461号长沙健康医疗大数据产业孵化基地3-1栋2楼201</p>
</div>
</template>
<script>
</script>
<style lang="scss" scoped>
.contioner {
padding: 30rpx;
}
.cneter {
text-align: center;
}
p {
text-indent: 2rem;
letter-spacing: 3px;
font-weight: 500;
}
</style>

View File

@ -0,0 +1,633 @@
<template>
<div class="contioner">
<h3 class="cneter">鲨鱼云康隐私政策</h3>
<p>本政策仅适用于湖南鲨鱼健康有限公司的鲨鱼云康App提供的产品或服务包括您访问鲨鱼云康App使用平台提供的服务湖南鲨鱼健康有限公司(鲨鱼云康湖南鲨鱼健康科技有限公司)</p>
<p>最近更新日期: 2024年01月15日版本号为V1.00</p>
<p>版本生效日期: 2024年01月15日</p>
<p>本政策将帮助您了解以下内容</p>
<p>政策声明</p>
<p>湖南鲨鱼健康科技有限公司如何收集和使用您的个人信息</p>
<p>湖南鲨鱼健康科技有限公司如何共享转让公开披露您的个人信息</p>
<p>湖南鲨鱼健康科技有限公司如何保护您的个人信息</p>
<p>湖南鲨鱼健康科技有限公司如何处理儿童的个人信息</p>
<p>湖南鲨鱼健康科技有限公司如何使用 Cookie 和同类技术</p>
<p>您的权利</p>
<p>您的个人信息如何储存及超出储存期限处理办法</p>
<p>本政策如何更新</p>
<p>如何联系湖南鲨鱼健康科技有限公司</p>
<p>
湖南鲨鱼健康科技有限公司深知个人信息对您的重要性并会尽全力
保护您的个人信息安全可靠湖南鲨鱼健康科技有限公司致力于维持您
对湖南鲨鱼健康科技有限公司的信任恪守以下原则保护您的个人信
:权责一致原则目的明确原则选择同意原
最少够用原则确保安全原则主体参与原
公开透明原则同时鲨鱼云康承诺湖南鲨鱼健康科技有限公司将按
业界成熟的安全标准采取相应的安全保护措施
来保护您的个人信息
</p>
<h4>
请在使用湖南鲨鱼健康科技有限公司的产品 (或服务) 仔细阅读
并了解本隐私政策并确保您已充分了解且
同意湖南鲨鱼健康科技有限公司处理您个人信息的目的方式和范围
</h4>
<h3>政策声明</h3>
<p>
1.1本隐私政策适用于引用或链接本政策的与鲨鱼云康或鲨鱼云康相关联公司家电有关的设备网站客户端小程序即鲨鱼云康App鲨鱼云康小程序鲨鱼云康或鲨鱼云康关联公司物联网家电设备网站及微信小程序等特别需要提醒你的是鲨鱼云康App鲨鱼云康小程序为统一帐号体系您在两者中任意平台注册帐号都可通过该帐号登录另一平台并享受相关服务此外需要特别说明的是本协议不适用于第三方向您提供的服务例如通过鲨鱼云康平台跳转到第三方网站客户端或程序您向该第三方服务商提供的个人信息不适用本协议
</p>
<h3>湖南鲨鱼健康科技有限公司如何收集和使用您的个人信息</h3>
<p>
个人信息是指以电子或者其他方式记录的能够
单独或者与其他信息结合识别特定自然人身份或
者反映特定自然人活动情况的各种信息
<h4>鲨鱼云康仅
会出于本政策所述的以下目的收集和使用您的
个人信息处理个人信息的目的包括:</h4>
</p>
<p>1.创建您的鲨鱼云康账号</p>
<p>2.能够发现和对设备进行配网</p>
<p>3能够控制和使用设备</p>
<p>4.进行语音识别与控制</p>
<p>5.提供基于地理位置的服务</p>
<p>6.处理您的订单</p>
<p>7.评估与分析App产品功能与服务情况</p>
<p>8.进行通知或推送</p>
<p>9.提供App安全保障</p>
<p>10.其它鲨鱼云康服务</p>
<p>
<h4>如果处理个人信息的目的方式和种类发生变
更的鲨鱼云康将重新取得您的同意以下罗列某些
特殊的个人信息属于个人敏感信息如实时画面
与录像信息在提供前您需要谨慎考虑确保准确</h4>鲨鱼云康会对敏感信息单独征得您的同意并按国家要求加强安全保密处理
</p>
<span>()您向湖南鲨鱼健康科技有限公司提供的信息</span>
<p>
当您注册鲨鱼云康账户及您在使用鲨鱼云康平台时提供
的相关服务时填写及/或提交的信息包括您的电话号码电子邮箱
</p>
<p>
鲨鱼云康将通过鲨鱼云康页面向您展示需要您提交的信息届时以页面展示为准如果您不使用某些服务则无需提供相关信息对于您明确拒绝使用关闭或退出的特定业务功能App在您打开该业务功能或相关系统权限时将会再次询问您是否您是否同意开启相关权限且App在更新升级后不会更改原有的系统权限设置
</p>
<span>()在您使用服务过程中收集的信息</span>
<h4>
为实现向您提供湖南鲨鱼健康科技有限公司产品及服务的附加功能您可以选择单独同意或不同意湖南鲨鱼健康科技有限公司收集使用的信息如您拒绝提供您将无法正常使用相关附加功能或无法达到湖南鲨鱼健康科技有限公司拟达到的功能效果不会影响您使用湖南鲨鱼健康科技有限公司的基本功能
</h4>
<p>湖南鲨鱼健康科技有限公司收集您使用产品和服务的相关信息包括:</p>
<p>
2.1湖南鲨鱼健康科技有限公司会在根据您在软件安装及使用汇总授
予的具体权限接收并记录您所使用的智能设备
相关信息包括您的登录账号信息 (帐号
头像信息)手机相关信息 (硬件设备标识
(imsiimeimeid设备硬件序列号SIM 卡标
OAIDMac 地址Android ID)手机型号
系统版本信息系统语言手机所设置的国家或
地区应用商店的版本号手机屏幕尺寸及分辨
CPU及显示设备相关信息) 连接智能设备过
程中收集的信息:基于您需要链接的智能设备的
类型湖南鲨鱼健康科技有限公司可能会收集: Wi-Fi信息 (SSID
BSSIDWi-Fi的Mac 地址Wi-Fi 密码) 设备
Mac 地址设备ID设备蓝牙 Mac 地址)
备唯一标识字符您对软硬件的使用记录软硬
件故障信息数据包括您的IP地址访问日期和
时间语言软硬件特征信息地理位置如您
下载或使用鲨鱼云康或其关联公司客户端软件鲨鱼云康
可能会读取与您位置和移动设备相关的信息
括设备型号操作系统设备识别码分辨率
电信运营商为实现向您提供湖南鲨鱼健康科技有限公司产品及/或服务
的必要的功能您须授权湖南鲨鱼健康科技有限公司手机使用的必要
的信息如您拒绝提供相应信息您将无法正常
使用湖南鲨鱼健康科技有限公司的产品及/或服务
</p>
<p>
2.2除上述信息外湖南鲨鱼健康科技有限公司还可能为了提供服务
及改进服务质量服务个性化的合理需要而收集
您的其他信息包括您与湖南鲨鱼健康科技有限公司的客户服务团队联
系时您提供的相关信息您参与问卷调查活动时
向湖南鲨鱼健康科技有限公司提供的问卷答复信息以及您与鲨鱼云康的关
联方合作伙伴之间互动时湖南鲨鱼健康科技有限公司收集的相关信
与此同时
<h4>为提高您使用鲨鱼云康平台服务时的
安全性预防钓鱼网站欺诈和木马病毒湖南鲨鱼健康科技有限公司可
能会通过了解或记录一些您的网络使用习惯
常用的软件信息来判断您账户的风险并可能会
记录一些湖南鲨鱼健康科技有限公司认为有风险的URL</h4>为实现向您提
供湖南鲨鱼健康科技有限公司产品及服务的附加功能您可选择单独后
意或不同意湖南鲨鱼健康科技有限公司收集使用的信息如您拒绝提
您将无法正常使用相关附加功能或无法达到
湖南鲨鱼健康科技有限公司拟达到的效果不会影响您使用湖南鲨鱼健康科技有限公司的基本
功能
</p>
<p>以下为相关应用场景/业务功能及影响:</p>
<p>服务预约:根据用户填写的信息提供相关保养投诉咨询报修报装移机服务;</p>
<p>附近门店: 根据用户定位判断该地区门店位置;</p>
<p>下单:用于生成订单时显示订单中的物流信息并同步物流配送;</p>
<p>库存: 根据用户定位判断该地区商品储货情况</p>
<p>涉及的各项业务功能实际收集的个人信息类型与隐私政策所描述内容一致且不会超出隐私政策所述范围</p>
<p>2.3针对设备使用过程中的信息收集包括您
设备的硬件性能状态功能信息包括设备
名称设备ID(DID)
固件版本号设备安装
位置 (如客厅) 设备时区存储卡信息 (如存
储状态剩余容量存储开关录制模式)
幕信息 (如清晰度您设置的缩放比例)清扫
信息 (如地图清扫轨迹清扫区域清扫面
清扫时长清扫模式日期和时间) 轨迹
信息 (如录像日期录像时间触发事件录像
视频时长人物行动轨迹)睡眠信息 (如人数
信息睡眠数据心率呼吸体动敏感隐私生
理数据)电量信息设备使用过程中收集的信
您可以通过在App上操作删除设备的方式
将对应设备这部分信息进行同步删除</p>
<p>2.3.1设备设置信息:湖南鲨鱼健康科技有限公司可能会收集与设备
设置相关的信息包括人数信息人员位置信
以及其他各项您已经同意并授权的身体数据
指标信息为了更好的提供智能家居服务在设
备使用过程中会根据您的操作习惯在取得您授
权的前提下进行设备自动控制</p>
<p>2.3.2网络信息:湖南鲨鱼健康科技有限公司能会在您的设备连接
到网络时收集网络相关信息包括设备当前连接
Wi-Fi的模式(局域网模式远程模式)设备分
配的IP地址Wi-Fi信号强度接收的Wi-Fi信号强
弱指标 (即设备RSSI) MAC地址以及您主动
提供的Wi-Fi名称(SSID)
Wi-Fi密码NAS网络
存储您的此类信息会加密存放在安全的服务器
且仅会在您授权同意的范围内使用</p>
<p>2.3.3语音信息:部分设备具有语音控制功
您可以通过语音与相关设备进行互动当您
激活或唤醒智能设备后湖南鲨鱼健康科技有限公司会自动接收并记录
您与设备交互产生的语音数据用于识别指令以
及转化为文本从而实现语音识别语音控制功
并进行优化请注意
语音识别系统在识别
您的指令时对声音信息进行采集过程中可能会
捕捉到非指令的若干语音信息 (例如聊天
)请您尽可能在安静环境下使用以免发出
有控制指令外的其他语音消息若您不同意湖南鲨鱼健康科技有限公司
收集上述信息您可以选择不唤醒语音设备或禁
用语音功能但禁用后您将无法使用语音识别或
控制功能</p>
<p>2.3.4图像及视频信息:如果您使用摄像头或
带有内置摄像头的设备在您添加并开启设备
摄像头基于对您住所的安全考虑设备会自
动录制视频在您使用相关功能时湖南鲨鱼健康科技有限公司会收集
您与绑定设备的视频音频会话图像相关信
请放心您的数据不会用于其他任何目的
若您不提供此类信息将无法使用摄像头相关服
务功能</p>
<p>2.3.5扫地机器人-清扫信息: 湖南鲨鱼健康科技有限公司可能收集您
设备清扫的相关信息这些信息可能以日志的形
式存在例如清扫数据: 包括地图清扫轨
清扫区域清扫面积清扫时长清扫模
日期和时间您的设备和服务器端只保存最
近20条清扫数据您可以选择通过app删除其中
的信息日志信息还包括:设备的运行状态和异常情况下传感器工作数据或错误信息
这些信息将在服务器中安全地保存至多180天到期后将自动删除;
可清扫区域信息:App端地图手动设置的可清
扫区域信息例如:地图上设置的禁区虚拟
合并/分割房间;
房间区域设置信息:针对地图上所划分的各个
房间区域设置清扫吸力拖地水量信息;
其他设置信息:勿扰模式预约清扫次数和
清扫顺序多地图管理设置,
其他信息:选择的语音包配件寿命剩余可用
时长</p>
<p>2.3.6AI微感器-轨迹信息: 设备会根据触发事
件录制视频人物轨迹包括区域有变动有人移
智能场景触发因此湖南鲨鱼健康科技有限公司可能会收集与录像
有关的信息包括录像日期录像时间触发事
录像视频时长人物行动轨迹</p>
<p>2.3.7睡眠检测仪-睡眠信息: 湖南鲨鱼健康科技有限公司可能会收集与设备设置相关的信息
包括人数信息睡眠数据心率呼吸体动敏感隐私生理数据
以及其他各项您已经同意并授权的身体数据指标信息为了更好的提供智能家居服务
在设备使用过程中会根据您的操作习惯在取得您授权的前提下进行设备自动控制</p>
<p>2.3.8空调-电量信息:湖南鲨鱼健康科技有限公司可能会收集与设备相关的电量信息这些信息会以报告的形式展示电量数据为估算值仅供参考</p>
<p>2.4 鲨鱼云康App可能会调用您的设备权限以下是调用权限对应的业务功能
湖南鲨鱼健康科技有限公司调用的目的以及调用前向您询问的情况您可以在设备的设置功能中选择关闭部分或全部权限
从而拒绝湖南鲨鱼健康科技有限公司调用相关权限</p>
<div class="marginTop-lg flex table">
<div class="text-center border-right" style="width: 50px;">设备权限</div>
<div class="text-center border-right flex-sub">对应业务</div>
<div class="flex-sub text-center border-right">调用权限目的</div>
<div class="text-center border-right" style="width: 50px;">是否询问</div>
</div>
<div class="flex">
<div class="line text-center" style="width: 50px;">存储</div>
<div class="line text-center flex-sub">插件更新;图片信息存储;APP升级</div>
<div class="line flex-sub text-center">访问设备上的照片媒体内容和文件</div>
<div class="line text-center" style="width: 50px;"></div>
</div>
<div class="flex">
<div class="line text-center" style="width: 50px;">相机</div>
<div class="line text-center flex-sub">添加设备;个人头像;拍照</div>
<div class="line flex-sub text-center">使用相机进行扫描二维码进行设备配网更改个人信息上传头像</div>
<div class="line text-center" style="width: 50px;"></div>
</div>
<div class="flex">
<div class="line text-center" style="width: 50px;">麦克风</div>
<div class="line text-center flex-sub">语音控制</div>
<div class="line flex-sub text-center">语音控制设备与带语音的设备进行对话</div>
<div class="line text-center" style="width: 50px;"></div>
</div>
<div class="flex">
<div class="line text-center" style="width: 50px;">位置信息</div>
<div class="line text-center flex-sub">定位服务添加设备</div>
<div class="line flex-sub text-center">获取用户位置信息提供服务(如天气服务)添加设备时用户发现附近WiFi或蓝牙列表</div>
<div class="line text-center" style="width: 50px;"></div>
</div>
<div class="flex">
<div class="line text-center" style="width: 50px;">开启蓝牙</div>
<div class="line text-center flex-sub">蓝牙设备配网</div>
<div class="line flex-sub text-center">采用蓝牙模块与协议配网的设备进行设备配网</div>
<div class="line text-center" style="width: 50px;"></div>
</div>
<div class="flex">
<div class="line text-center" style="width: 50px;">电话</div>
<div class="line text-center flex-sub">拨打电话</div>
<div class="line flex-sub text-center">拨打客服电话</div>
<div class="line text-center" style="width: 50px;"></div>
</div>
<div class="flex">
<div class="line text-center" style="width: 50px;">获取应用列表</div>
<div class="line text-center flex-sub">第三方登录</div>
<div class="line flex-sub text-center">允许App获取手机中已安装的应用信息</div>
<div class="line text-center" style="width: 50px;"></div>
</div>
<div class="flex">
<div class="line text-center" style="width: 50px;">通知</div>
<div class="line text-center flex-sub">消息中心</div>
<div class="line flex-sub text-center">对系统和设备消息进行通知</div>
<div class="line text-center" style="width: 50px;">Android: ios:</div>
</div>
<p>2.5为识别您的设备ID并预防恶意程序及反作弊提高服务安全性保障运营质量及效率湖南鲨鱼健康科技有限公司会收集您的设备信息
(包括设备序列号IMEIMEIDAndroidIDIMSIGUIDMAC地址)您安装的应用信息或运行中的进程信息</p>
<p>2.6您在使用湖南鲨鱼健康科技有限公司的服务时若您想分享您喜欢的内容至第三方App湖南鲨鱼健康科技有限公司需要判断是否安装了第三方App以便为您提供正确的分享功能湖南鲨鱼健康科技有限公司采用合并链路技术进行技术推送在启动App初始化后湖南鲨鱼健康科技有限公司会读取已安装应用列表当一个设备有多个APP的推送链路同时活跃时湖南鲨鱼健康科技有限公司会随机合并成一条链路以达到为您省电省流量的目的因此需获得应用列表信息
</p>
<p>2.7 在您使用App时会获取方向传感器陀螺仪设备传感器信息用于鉴别您是否为真实用户在您使用录像照相相关功能时会获取加速度设备传感器信息用于获取拍摄手机角度</p>
<p>2.8桌面小组件功能</p>
<p>为向您提供快捷便利的智能设备控制体验在设备品类支持的情况下在您点击进入设备扩展程序前可通过添加相应设备的桌面小组件便捷查看设备的运行状态(如当前空调是开机或关机状态)本应用须使用自启动能力将存在一定频率通过系统发送广播唤醒本应用自启动或关联启动行为该为实现功能及服务所必要桌面小组件功能由您自行选择是否添加您添加后也可在手机系统环境下直接移除桌面小组件在未添加设备桌面小组件情况下则不会有自启动或关联启动行为
</p>
<p>2.9快捷控制功能</p>
<p>为向您提供快捷便利的智能设备控制体验在设备品类支持的情况下在您点击进入设备扩展程序前通过鲨鱼云康应用快捷卡片入口可以实现智能设备控制以及智能设备状态查询的功能湖南鲨鱼健康科技有限公司会收集以下信息:</p>
<p>设备联网状态:以供您查看设备连接状态根据联网状态展示不同操作界面;</p>
<p>设备状态信息:以使您查看设备状态并实现设备控制</p>
<p>如果您通过鲨鱼云康平台连接了可检测人体轨迹的设备等湖南鲨鱼健康科技有限公司还需收集:</p>
<p>设备周围环境相关信息:以使您准确的查看设备传感器检测到的周围环境相关信息例如温度湿度PM2.5以及是否有人经过等</p>
<p>()湖南鲨鱼健康科技有限公司还可能收集其他无法识别到特定个人的信息 (即不属于个人信息的信息)例如您使用特定服务时产生的统计类数据如用户的操作行为 (包括点击页面跳转浏览时间)
账号下设备信息(包括设备品类数目功能使用参数)收集此类信息的目的在于改善湖南鲨鱼健康科技有限公司向您提供的服务所收集信息的类别和数量取决于您如何使用湖南鲨鱼健康科技有限公司产品和/或服务</p>
<!-- <p>湖南鲨鱼健康科技有限公司会将此类信息汇总用于帮助湖南鲨鱼健康科技有限公司向客户提供更有用的信息了解客户对湖南鲨鱼健康科技有限公司网站产品和服务中的哪些部分最感兴趣据此将根据算法自动化决策定向推荐展示个性化的产品和服务同时客户可登录鲨鱼云康App在设置功能中关闭个性化推荐功能选择非定向推送信息模式就本隐私政策而言汇总数据被视为非个人信息如果湖南鲨鱼健康科技有限公司将非个人信息与个人信息结合使用则在结合使用期间此类信息将被视为个人信息
</p> -->
<p>()您充分知晓以下情形中湖南鲨鱼健康科技有限公司收集使用共享转让公开披露您的个人信息或非个人信息无需征得您的同意且湖南鲨鱼健康科技有限公司可能不会响应您提出的更正/修改删除注销撤回同意索取信息的请求:</p>
<p>4.1与国家安全国防安全有关的;</p>
<p>4.2 与公共安全公共卫生重大公共利益有关的;</p>
<p>4.3与犯罪侦查起诉审判和判决执行有关的;</p>
<p>4.4出于维护个人信息主体或其他个人的生命财产此类重大合法权益但又很难得到本人同意的;</p>
<p>4.5所收集的个人信息是个人信息主体自行向社会公众公开的;</p>
<p>4.6从合法公开披露的信息中收集的您的个人信息的如合法的新闻报道政府信息公开渠道;</p>
<p>4.7 根据您的要求签订合同所必需的;</p>
<p>4.8用于维护所提供的产品与/或服务的安全稳定运行所必需的例如发现处置产品与/或服务的故障;</p>
<p>4.9为合法的新闻报道所必需的 (为公共利益实施新闻报道舆论监督等行为在合理的范围内处理个人信息);</p>
<p>4.10学术研究机构基于公共利益开展统计或学术研究所必要且对外提供学术研究或描述的结果时对结果中所包含的个人信息进行去标识化处理的;</p>
<p>4.11法律法规规定的其他情形</p>
<p>()公测活动</p>
<p>为了给您提供良好的用户体验鲨鱼云康提供了公测活动您可以自主选择是否参加这些活动当您选择参加活动时湖南鲨鱼健康科技有限公司需要收集您主动提供的以下信息包括但不限于您的手机号码设备信息:设备标识符(IEMIIDFAAndroidIDMACOAID相关信息)
设备参数及系统信息(设备类型设备型号操作系统及硬件相关信息)位置信息:设备位置以在您获得测试资格后联系您就您的测试体验进行回访等请您放心湖南鲨鱼健康科技有限公司会对您的信息采取足够的保护措施严格遵守相关法律法规与监管要求您的手机号码和地址信息仅用于上述目的不会用作其他处理目的
</p>
<h3>湖南鲨鱼健康科技有限公司如何共享转让公开披露您的个人信息</h3>
<p>()共享</p>
<p>湖南鲨鱼健康科技有限公司不会与鲨鱼云康以外的任何公司组织和个人分享您的个人信息但以下情况除外:</p>
<p>1在获取明确同意的情况下共享:获得您的明确同意后湖南鲨鱼健康科技有限公司会与其他方共享您的个人信息</p>
<p>2湖南鲨鱼健康科技有限公司可能会根据法律法规规定或按政府主管部门的强制性要求对外共享您的个人信息</p>
<p>3与湖南鲨鱼健康科技有限公司的关联公司共享:
您的个人信息可能会与鲨鱼云康的关联公司共享湖南鲨鱼健康科技有限公司只会共享必要的个人信息且受本隐私政策中所声明目的的约束附属公司如要改变个人信息的处理目的将再次征求您的授权同意具体关联公司见下方关联的第三方SDK清单
</p>
<p>4与授权合作伙伴共享:仅为实现本政策中声明的目的湖南鲨鱼健康科技有限公司的某些服务将由授权合作伙伴提供湖南鲨鱼健康科技有限公司可能会与合作伙伴共享您的某些个人信息以提供更好的客户服务和用户体验例如在您上网购买湖南鲨鱼健康科技有限公司的产品时湖南鲨鱼健康科技有限公司必须与物流服务提供商共享您的个人信息才能安排送货或者安排合作伙伴提供服务湖南鲨鱼健康科技有限公司仅会出于合法正当必要特定明确的目的共享您的个人信息并且只会共享提供服务所必要的个人信息湖南鲨鱼健康科技有限公司的合作伙伴无权将共享的个人信息用于任何其他用途对湖南鲨鱼健康科技有限公司与之共享个人信息的公司组织和个人湖南鲨鱼健康科技有限公司会与其签署严格的保密协定要求他们按照湖南鲨鱼健康科技有限公司的说明本隐私政策以及其他任何相关的保密和安全措施来处理个人信息
</p>
<p>5针对第三方SDK使用湖南鲨鱼健康科技有限公司将基于不同步用户个人数据为前提授权合作伙伴获取有关业务信息同时针对第三方的SDK应用程序接口(API)软件工具开发包 (SDK)
湖南鲨鱼健康科技有限公司会进行严格的安全监测并与合作伙伴签订严格的数据保护协定令其按照湖南鲨鱼健康科技有限公司的委托目的服务说明本隐私政策以及其它任何相关的保密和安全措施来处理个人信息</p>
<p>目前湖南鲨鱼健康科技有限公司系统产品中存在的第三方SDK披露如下</p>
<div class="marginTop-lg flex table">
<div class="flex-sub text-center border-right">第三方SDK</div>
<div class="flex-sub text-center border-right">接入目的/第三方名称</div>
<div class="flex-sub text-center border-right">获取个人信息</div>
</div>
<div class="flex">
<div class="line flex-sub text-center">极光推送SDK</div>
<div class="line flex-sub text-center">
<div>
极光推送服务为APP赋予消息和通知的推送能力在集成极光推送SDK后极光推送SDK会收集使用实现服务所必须的个人信息通过加密的通道将消息和通知推送给App的终端用户极光隐私政策链接:
<span class="text-decoration"
@tap="goWeb('https://docs.jiguang.cn/jpush/client/Android/android_jghgzy')('https://docs.jiguang.cn/jpush/client/Android/android_jghgzy')">https://docs.jiguang.cn/jpush/client/Android/android_jghgzy</span>
</div>
</div>
<div class="line flex-sub text-center">
设备信息:设备标识符(IEMIIDFAAndroidIDMACOAID相关信息)应用信息(应用崩溃信息通知开关状态软件列表相关信息获取应用列表)设备参数及系统信息(设备类型设备型号操作系统及硬件相关信息);网络信息:IP地址WiFi信息基站信息位置信息:设备位置
</div>
</div>
<div class="flex">
<div class="line flex-sub text-center">极光推送SDK-华为厂商通道</div>
<div class="line flex-sub text-center">
<div>
极光推送为了提升送达率解决厂商通道的配额限制和保障消息即时送达等问题为开发者提供了多种推送策略开发者在推送管理后台可以选择合适的发送策略在API端支持开发者以厂商通道为颗粒度制定发送策略
极光隐私政策链接:<span class="text-decoration"
@tap="goWeb('https://docs.jiguang.cn/jpush/client/Android/android_jghgzy')">https://docs.jiguang.cn/jpush/client/Android/android_jghgzy</span>
</div>
</div>
<div class="line flex-sub text-center">
设备信息:设备标识符(IEMIIDFAAndroidIDMACOAID相关信息)应用信息(应用崩溃信息通知开关状态软件列表相关信息获取应用列表)设备参数及系统信息(设备类型设备型号操作系统及硬件相关信息);网络信息:IP地址WiFi信息基站信息位置信息:设备位置
</div>
</div>
<div class="flex">
<div class="line flex-sub text-center">极光推送SDK-Vivo厂商通道</div>
<div class="line flex-sub text-center">
<div>
极光推送为了提升送达率解决厂商通道的配额限制和保障消息即时送达等问题为开发者提供了多种推送策略开发者在推送管理后台可以选择合适的发送策略在API端支持开发者以厂商通道为颗粒度制定发送策略
极光隐私政策链接:<span class="text-decoration"
@tap="goWeb('https://docs.jiguang.cn/jpush/client/Android/android_jghgzy')">https://docs.jiguang.cn/jpush/client/Android/android_jghgzy</span>
</div>
</div>
<div class="line flex-sub text-center">
设备信息:设备标识符(IEMIIDFAAndroidIDMACOAID相关信息)应用信息(应用崩溃信息通知开关状态软件列表相关信息获取应用列表)设备参数及系统信息(设备类型设备型号操作系统及硬件相关信息);网络信息:IP地址WiFi信息基站信息位置信息:设备位置
</div>
</div>
<div class="flex">
<div class="line flex-sub text-center">极光推送SDK-魅族厂商通道</div>
<div class="line flex-sub text-center">
<div>
极光推送为了提升送达率解决厂商通道的配额限制和保障消息即时送达等问题为开发者提供了多种推送策略开发者在推送管理后台可以选择合适的发送策略在API端支持开发者以厂商通道为颗粒度制定发送策略
极光隐私政策链接:<span class="text-decoration"
@tap="goWeb('https://docs.jiguang.cn/jpush/client/Android/android_jghgzy')">https://docs.jiguang.cn/jpush/client/Android/android_jghgzy</span>
</div>
</div>
<div class="line flex-sub text-center">
设备信息:设备标识符(IEMIIDFAAndroidIDMACOAID相关信息)应用信息(应用崩溃信息通知开关状态软件列表相关信息获取应用列表)设备参数及系统信息(设备类型设备型号操作系统及硬件相关信息);网络信息:IP地址WiFi信息基站信息位置信息:设备位置
</div>
</div>
<div class="flex">
<div class="line flex-sub text-center">极光推送SDK-小米厂商通道</div>
<div class="line flex-sub text-center">
<div>
极光推送为了提升送达率解决厂商通道的配额限制和保障消息即时送达等问题为开发者提供了多种推送策略开发者在推送管理后台可以选择合适的发送策略在API端支持开发者以厂商通道为颗粒度制定发送策略
极光隐私政策链接:<span class="text-decoration"
@tap="goWeb('https://docs.jiguang.cn/jpush/client/Android/android_jghgzy')">https://docs.jiguang.cn/jpush/client/Android/android_jghgzy</span>
</div>
</div>
<div class="line flex-sub text-center">
设备信息:设备标识符(IEMIIDFAAndroidIDMACOAID相关信息)应用信息(应用崩溃信息通知开关状态软件列表相关信息获取应用列表)设备参数及系统信息(设备类型设备型号操作系统及硬件相关信息);网络信息:IP地址WiFi信息基站信息位置信息:设备位置
</div>
</div>
<div class="flex">
<div class="line flex-sub text-center">极光推送SDK-OPPO厂商通道</div>
<div class="line flex-sub text-center">
<div>
极光推送为了提升送达率解决厂商通道的配额限制和保障消息即时送达等问题为开发者提供了多种推送策略开发者在推送管理后台可以选择合适的发送策略在API端支持开发者以厂商通道为颗粒度制定发送策略
极光隐私政策链接:<span class="text-decoration"
@tap="goWeb('https://docs.jiguang.cn/jpush/client/Android/android_jghgzy')">https://docs.jiguang.cn/jpush/client/Android/android_jghgzy</span>
</div>
</div>
<div class="line flex-sub text-center">
设备信息:设备标识符(IEMIIDFAAndroidIDMACOAID相关信息)应用信息(应用崩溃信息通知开关状态软件列表相关信息获取应用列表)设备参数及系统信息(设备类型设备型号操作系统及硬件相关信息);网络信息:IP地址WiFi信息基站信息位置信息:设备位置
</div>
</div>
<div class="flex">
<div class="line flex-sub text-center">高德定位SDK</div>
<div class="line flex-sub text-center">
定位SDK是一套简单的LBS服务定位接口您可以使用这套定位AP获取定位结果通过定位城市获取相关的天气信息进行显示隐私政策链接:https://lbs.amap.com/pagesprivacy/
</div>
<div class="line flex-sub text-center">
手机WiFI信息;位置信息
</div>
</div>
<p>() 转让</p>
<p>湖南鲨鱼健康科技有限公司不会将您的个人信息转让给任何公司组织和个人但以下情况除外:</p>
<p>1在获取明确同意的情况下转让: 获得您的明确同意后湖南鲨鱼健康科技有限公司会向其他方转让您的个人信息</p>
<p>2在涉及合并收购或破产清算时如涉及到个人信息转让湖南鲨鱼健康科技有限公司会在要求新的持有您个人信息的公司组织继续受此隐私政策的约束否则湖南鲨鱼健康科技有限公司将要求该公司组织重新向您征求授权同意</p>
<p>()公开披露</p>
<p>湖南鲨鱼健康科技有限公司仅会在以下情况下公开披露您的个人信息</p>
<p>1获得您明确同意后</p>
<p>2基于法律的披露:在法律法律程序
讼或政府主管部门强制性要求的情况下湖南鲨鱼健康科技有限公司可
能会公开披露您的个人信息</p>
<h3>湖南鲨鱼健康科技有限公司如何保护您的个人信息</h3>
<p>湖南鲨鱼健康科技有限公司非常重视个人信息安全并采取一切合理
可行的措施保护您的个人信息相关技术与措
施包括:</p>
<p>1.数据安全技术措施</p>
<p>湖南鲨鱼健康科技有限公司已使用符合业界标准的安全防护措施保护
您提供的个人信息防止数据遭到未经授权访
公开披露使用修改损坏或丢失湖南鲨鱼健康科技有限公司
会采取一切合理可行的措施保护您的个人信
湖南鲨鱼健康科技有限公司会使用加密技术提高用户信息的安全
湖南鲨鱼健康科技有限公司会使用受信赖的保护机制防止用户信息
遭到恶意代码攻击例如在您的浏览器与
之间交换数据(如信用卡信息) 时受SSL加密
保护湖南鲨鱼健康科技有限公司会部署访问控制机制确保只有授权
人员才可访问个人信息;</p>
<p>2.其他安全措施</p>
<p>2.1 湖南鲨鱼健康科技有限公司会采取一切合理可行的措施确保未
收集无关的个人信息湖南鲨鱼健康科技有限公司只会在达成本政策所
述目的所需的期限内保留您的个人信息除非需
要延长保留期或受到法律的允许</p>
<p>2.2鲨鱼云康智能产品通过建立数据分类分级制
数据安全管理规范数据安全开发规范来管
理规范个人信息的存储和使用</p>
<p>2.3鲨鱼云康智能产品通过信息接触者保密协
监控和审计机制来对数据进行全面安全控
</p>
<p>2.4鲨鱼云康智能产品建立数据安全委员会并下
设信息保护专职部门数据安全应急响应组织来
推进和保障个人信息安全</p>
<p>2.5加强安全意识湖南鲨鱼健康科技有限公司还会举办安全和隐私保护培训课程加强员工对于保护个人信息重要性的认识</p>
<p>2.6湖南鲨鱼健康科技有限公司仅允许有必要知晓这些信息的鲨鱼云康智能产品及鲨鱼云康智能产品关联方的员工合作伙伴访问个人信息并为此设置了严格的访问权限控制和监控机制湖南鲨鱼健康科技有限公司同时要求可能接触到您个人信息的所有人员履行相应的保密义务如果未能履行这些义务可能会被追究法律责任或被中止与鲨鱼云康的合作关系湖南鲨鱼健康科技有限公司同时要求可能接触到您个人信息的所有人员履行相应的保密义务如果未能履行这些义务可能会被追究法律责任或被中止与鲨鱼云康的合作关系
</p>
<p>3.互联网并非绝对安全的环境而且电子邮件即时通讯及与其他鲨鱼云康App用户的交流方式并未加密湖南鲨鱼健康科技有限公司强烈建议您不要通过此类方式发送个人信息请使用复杂密码协助湖南鲨鱼健康科技有限公司保证您的账号安全</p>
<p>4.互联网环境并非百分之百安全湖南鲨鱼健康科技有限公司将尽力确保或担保您发送给湖南鲨鱼健康科技有限公司的任何信息的安全性</p>
<p>5.在不幸发生个人信息安全事件后湖南鲨鱼健康科技有限公司将按照法律法规的要求及时向您告知:安全事件的基本情况和可能的影响湖南鲨鱼健康科技有限公司已采取或将要采取的处置措施您可自主防范和降低风险的建议对您的补救措施湖南鲨鱼健康科技有限公司将及时将事件相关情况以邮件信函电话推送通知的方式告知您难以逐一告知个人信息主体时湖南鲨鱼健康科技有限公司会采取合理有效的方式发布公告同时湖南鲨鱼健康科技有限公司还将按照监管部门要求主动上报个人信息安全事件的处置情况
</p>
<p>6.为应对个人信息泄露损毁和丢失此类可能出现的风险鲨鱼云康智能产品制定了多项制度明确安全事件安全漏洞的分类分级标准及相应的处理流程湖南鲨鱼健康科技有限公司也为安全事件建立了专门的应急响应团队按照安全事件处置规范要求针对不同安全事件启动安全预案进行止损分析定位制定补救措施联合相关部门进行溯源和打击
</p>
<h4>7.如果您对湖南鲨鱼健康科技有限公司的个人信息保护有任何疑问可通过本隐私政策最下方约定的联系方式联系湖南鲨鱼健康科技有限公司您发现自己的个人信息泄密尤其是您的账户及密码发生泄露请您立即通过本隐私政策最下方[如何联系湖南鲨鱼健康科技有限公司]约定的联系方式联络湖南鲨鱼健康科技有限公司以便湖南鲨鱼健康科技有限公司采取相应措施
</h4>
<h3>湖南鲨鱼健康科技有限公司如何处理儿童的个人信息</h3>
<p>湖南鲨鱼健康科技有限公司的产品网站和服务主要面向成人如果没有父母或监护人的同意儿童不得创建自己的用户账户对于经父母同意而收集儿童个人信息的情况湖南鲨鱼健康科技有限公司只会在受到法律允许父母或监护人明确同意或者保护儿童所必要的情况下使用或公开披露此信息尽管当地法律和习俗对儿童的定义不同但湖南鲨鱼健康科技有限公司将不满14
周岁的任何人均视为儿童如果湖南鲨鱼健康科技有限公司发现自己在未事先获得可证实的父母同意的情况下收集了儿童的个人信息则会设法尽快删除相关数据</p>
<p>针对儿童使用鲨鱼云康产品及服务湖南鲨鱼健康科技有限公司特别制定了<span @tap="goChildren">鲨鱼云康儿童个人信息保护规则及监护人须知</span>请您仔细阅读并在充分理解并同意后使用湖南鲨鱼健康科技有限公司的产品及服务</p>
<h3>湖南鲨鱼健康科技有限公司如何使用 Cookie 和同类技术</h3>
<p>() Cookie</p>
<p>为确保网站正常运转湖南鲨鱼健康科技有限公司会在您的计算机或移动设备上存储名为Cookie的小数据文件cookie通常包含标识符站点名称以及一些号码和字符借助于
Cookie设备能够存储您的偏好或使用的智能产品数据湖南鲨鱼健康科技有限公司不会将Cookie用于本政策所述目的(分享/第三方登录)之外的任何用途您可根据自己的偏好管理或删除
Cookie您可以清除设备上保存的所有Cookie但如果您这么做则需要在每一次访问湖南鲨鱼健康科技有限公司的时候更改用户设置除Cookie外湖南鲨鱼健康科技有限公司还会在上使用信标和像素标签技术湖南鲨鱼健康科技有限公司不存在嵌入第三方代码插件收集个人信息的功能
</p>
<p>大部分网络浏览器都设有阻止Cookie的功能但如果您这么做则需要在每一次访问湖南鲨鱼健康科技有限公司的网站时亲自更改用户设置</p>
<p>()网站信标和像素标签</p>
<p>除Cookie外湖南鲨鱼健康科技有限公司还会在网站上使用网站信标和像素标签的其他同类技术例如湖南鲨鱼健康科技有限公司向您发送的电子邮件可能含有链接至湖南鲨鱼健康科技有限公司网站内容的点击URL如果您点击该链接湖南鲨鱼健康科技有限公司则会跟踪此次点击帮助湖南鲨鱼健康科技有限公司了解您的产品或服务偏好并改善客户服务网站信标通常是一种嵌入到网站或电子邮件中的透明图像借助于电子邮件中的像素标签湖南鲨鱼健康科技有限公司能够获知电子邮件是否被打开如果您不希望自己的活动以这种方式被追踪则可以随时从湖南鲨鱼健康科技有限公司的寄信名单中退订
</p>
<p>() Do Not Track (请勿追踪)</p>
<p>很多网络浏览器均设有 Do Not Track功能该功能可向网站发布 DoNot Track 请求目前主要互联网标准组织尚未设立相关政策来规定网站应如何应对此类请求但如果您的浏览器启用了DoNot
Track那么湖南鲨鱼健康科技有限公司的所有网站都会尊重您的选择</p>
<h3>您的权利</h3>
<p>按照中国相关的法律法规标准以及其他国家地区的通行做法湖南鲨鱼健康科技有限公司保障您对自己的个人信息行使以下权利:</p>
<p>() 访问您的个人信息</p>
<p>您有权访问您的个人信息法律法规规定的例外情况除外如果您想行使数据访问权可以通过以下方式自行访问:</p>
<p>账户信息--如果您希望访问或编辑您的账户中的个人资料信息和支付信息更改您的密码添加安全信息或关闭您的账户您可以通过访问鲨鱼云康App执行此类操作如果您无法通过上述链接访问这些个人信息您可以通过发送电子邮件841382055@qq.com的方式提出访问请求湖南鲨鱼健康科技有限公司将在15天内回复您的访问请求
</p>
<p>对于您在使用湖南鲨鱼健康科技有限公司的产品或服务过程中产生的其他个人信息只要湖南鲨鱼健康科技有限公司不需要过多投入湖南鲨鱼健康科技有限公司会向您提供</p>
<p>()更正您的个人信息</p>
<p>当您发现湖南鲨鱼健康科技有限公司处理的关于您的个人信息有错误时您有权要求湖南鲨鱼健康科技有限公司做出更正您可以通过()访问您的个人信息中罗列的方式提出更正申请如果您无法通过上述链接更正这些个人信息您可以随时使用鲨鱼云康App反馈问题给湖南鲨鱼健康科技有限公司或发送电子邮件至鲨鱼云康湖南鲨鱼健康科技有限公司将在15天内回复您的更正请求
</p>
<p>()删除您的个人信息</p>
<p>您有权要求湖南鲨鱼健康科技有限公司删除您的个人数据湖南鲨鱼健康科技有限公司将会根据您的删除请求进行评估若满足相应规定,湖南鲨鱼健康科技有限公司将会采取包括技术手段在内的相应步骤进行处理在以下情形中您可以通过本隐私政策最下方列明的联系方式与湖南鲨鱼健康科技有限公司取得联系向湖南鲨鱼健康科技有限公司提出删除个人信息的请求:
</p>
<p>(1)如果湖南鲨鱼健康科技有限公司处理个人信息的行为违反法律法规;</p>
<p>(2)如果湖南鲨鱼健康科技有限公司收集使用您的个人信息却未征得您的同意;</p>
<p>(3)如果湖南鲨鱼健康科技有限公司处理个人信息的行为严重违反了与您的约定;</p>
<p>(4)如果您主动注销了帐号;</p>
<p>(5)如果永久不需要湖南鲨鱼健康科技有限公司提供产品或服务;</p>
<p>(6)如果湖南鲨鱼健康科技有限公司违反与您的约定公开披露您的个人信息您有权要求湖南鲨鱼健康科技有限公司立即停止公开披露的行为并发布通知要求相关接收方删除相应的信息;</p>
<p>(7)如果湖南鲨鱼健康科技有限公司决定响应您的删除请求湖南鲨鱼健康科技有限公司将停止为您提供产品或服务根据适用法律的要求删除您的个人信息;</p>
<p>因为适用的法律和安全技术湖南鲨鱼健康科技有限公司可能无法立即从备份系统中删除相应的信息湖南鲨鱼健康科技有限公司将安全地存储您的个人信息并将其与任何进一步处理隔离直到备份可以清除或实现匿名但若您提出的要求存在无实质意义/纠缠式重复损害他人隐私权极度极端不现实的情况或者删除个人信息从技术上难以实现不符合法律法规在湖南鲨鱼健康科技有限公司评估后认为删除数据可能会导致湖南鲨鱼健康科技有限公司无法出于安全目的合法使用数据可能也会予以拒绝
</p>
<p>()获取个人信息副本</p>
<p>如您需要您的个人信息副本可以通过以下方式获取:</p>
<p>(1)您可以在鲨鱼云康App中进行个人信息副本导出操作路径为我的-设置-个人信息导出</p>
<p>(2)您可以通过本隐私政策最下方列明的联系方式与湖南鲨鱼健康科技有限公司取得联系获取</p>
<p>()改变您授权同意的范围每个业务功能需要一些基本的个人信息才能得以完成(见本政策第一部分)对于额外收集的个人信息的收集和使用您可以通过以下方式改变或收回您同意湖南鲨鱼健康科技有限公司收集您个人信息的范围
<p>每个业务功能需要一些基本的个人信息才能得以完成 (见本政策第一部分)
对于额外收集的个人信息的收集和使用您可以通过以下方式改变或收回您同意湖南鲨鱼健康科技有限公司收集您个人信息的范围1.通过解绑删除家居设备收回部分授权:2.通过App设置中关闭对应功能收回部分授权;
<p>3.通过移动设备设置功能关闭相应权限包括:存储相机麦克风位置蓝牙收回对应个人信息授权;</p>
<p>4.通过注销您的账号收回全部个人信息授权;</p>
<p>5.除上述方式外您还可以通过联系湖南鲨鱼健康科技有限公司的个人信息保护专职部门 (见本政策第九部分)处理您的个人信息</p>
<p>当您收回同意后湖南鲨鱼健康科技有限公司将不再处理相应的个人信息但您收回同意的决定不会影响此前基于您的授权而开展的个人信息处理</p>
<p>() 注销您的账号</p>
<p>您可以随时注销您的账号如有需要在登录鲨鱼云康App后可进行注销账号操作在满足注销账号条件下可直接注销账号</p>
<p>账号注销途径:</p>
<p>1进入鲨鱼云康App我的中点击右上角设置按钮进入账号与安全--账号注销</p>
<p>2选择账号注销原因点击下一步;</p>
<p>3输入手机号并获取并输入验证码后点击账号注销即注销账号成功</p>
<p>关于账号注销您需要注意的事项如下</p>
<p>1您应确保您拥有该账号的所有权有权决定该账号的注销事宜不侵犯任何第三方的合法权益如因此引发任何争议由您自行承担责任</p>
<p>2您理解并同意在注销账号之后您将无法再使用该账号无法远程控制您的设备同时账号个人资料与设备信息将会被清除且无法恢复请您在申请注销前自行备份您欲保留的本帐号信息和数据</p>
<p>3您注销账号的行为并不代表本帐号在注销前的帐号行为和相关责任得以豁免或减轻如您在使用帐号时有任何违法违规的不当行为湖南鲨鱼健康科技有限公司将对您帐号注销前的违法及不当行为保有追责的权利</p>
<p>() 响应您的上述请求</p>
<p>为保障安全您可能需要提供书面请求或以其他方式证明您的身份湖南鲨鱼健康科技有限公司可能会先要求您验证自己的身份然后再处理您的请求湖南鲨鱼健康科技有限公司将在15天内做出答复如您不满意还可以联系客服投诉</p>
<p>对于您合理的请求湖南鲨鱼健康科技有限公司原则上不收取费用但对多次重复超出合理限度的请求湖南鲨鱼健康科技有限公司将视情收取一定成本费用对于那些无端重复需要过多技术手段(例如需要开发新系统或从根本上改变现行惯例)给他人合法权益带来风险或者非常不切实际(例如涉及备份磁带上存放的信息)的请求湖南鲨鱼健康科技有限公司可能会予以拒绝
</p>
<p>在以下情形中按照法律法规要求湖南鲨鱼健康科技有限公司将无法响应您的请求:</p>
<p>1与国家安全国防安全直接相关的</p>
<p>2与公共安全公共卫生重大公共利益直接相关的</p>
<p>3与犯罪侦查起诉审判和判决执行直接相关的</p>
<p>4有充分证据表明您存在主观恶意或滥用权利的</p>
<p>5响应您的请求将导致您或其他个人组织的合法权益受到严重损害的</p>
<p>6涉及商业秘密的</p>
<h3>您的个人信息如何储存及超出储存期限处理办法</h3>
<p>湖南鲨鱼健康科技有限公司在中华人民共和国境内收集和产生的个人信息将存储在中华人民共和国境内对于您个人信息的存储期限将依照法律最短期限进行处理</p>
<p>除非法律另有明文规定或经您允许湖南鲨鱼健康科技有限公司只会在本隐私政策所述目的所需的期限内保留您的个人信息为了保持服务的持续性和用户体验的一致性个人信息通常不会在单项服务完成后立即删除湖南鲨鱼健康科技有限公司会参照安全标准采取相应的安全保护措施来保护您的个人信息确保做到知情同意目的明确安全保障依法利用的原则来收集使用存储和传输您的信息到期后湖南鲨鱼健康科技有限公司会对个人信息进行删除或匿名化处理您的个人信息经过匿名化处理后将形成可以使用的流通数据湖南鲨鱼健康科技有限公司对此数据的保存和使用无需另外征得您的同意
</p>
<h3>本政策如何更新</h3>
<p>湖南鲨鱼健康科技有限公司的隐私政策可能变更未经您明确同意湖南鲨鱼健康科技有限公司不会削减您按照本隐私政策所应享有的权利湖南鲨鱼健康科技有限公司会在本页面上发布对本政策所做的任何变更并重新取得您的同意对于重大变更湖南鲨鱼健康科技有限公司还会提供更为显著的通知
(包括对于某些服务湖南鲨鱼健康科技有限公司会通过电子邮件发送通知说明隐私政策的具体变更内容)</p>
<p>本政策所指的重大变更包括:</p>
<p>1湖南鲨鱼健康科技有限公司的服务模式发生重大变化如处理个人信息的目的处理的个人信息类型个人信息的使用方式</p>
<p>2湖南鲨鱼健康科技有限公司在所有权结构组织架构方面发生重大变化如业务调整破产并购引起的所有者变更</p>
<p>3个人信息共享转让或公开披露的主要对象发生变化</p>
<p>4您参与个人信息处理方面的权利及其行使方式发生重大变化</p>
<p>5湖南鲨鱼健康科技有限公司负责处理个人信息安全的责任部门联络方式及投诉渠道发生变化时</p>
<p>6个人信息安全影响评估报告表明存在高风险时湖南鲨鱼健康科技有限公司还会将本政策的旧版本存档供您查阅</p>
<h3>如何联系湖南鲨鱼健康科技有限公司</h3>
<h4>如果您对本隐私政策有任何疑问意见或建议您可以通过如下方式与湖南鲨鱼健康科技有限公司取得联系</h4>
<h4>联系人:湖南鲨鱼健康有限公司</h4>
<h4>电子邮件: 841382055@qq.com</h4>
<h4>电话: 400-833-3131</h4>
<p>注册地址:湖南省长沙市岳麓区梅溪湖街道泉水路461号长沙健康医疗大数据产业孵化基地3-1栋2楼201</p>
<p>湖南鲨鱼健康科技有限公司设立了个人信息保护专职部门一般情况下湖南鲨鱼健康科技有限公司将在15天内回复如果您对湖南鲨鱼健康科技有限公司的回复不满意特别是湖南鲨鱼健康科技有限公司的个人信息处理行为损害了您的合法权益您还可以通过上述途径寻求解决方案</p>
<h3>十一纠纷处理</h3>
<p>如果与本公司取得联系后对我们的处理方式不满意,您可选择联系外部机构寻求帮助,包括不限于消费者协会</p>
<p>湖南省消费者协会的投诉电话:0731 8860315</p>
<p>湖南省消费者协会地址:湖南省长沙市枫林一路9号工商局内</p>
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
goChildren() {
uni.navigateTo({
url: '/pages/agreement/children'
})
},
goWeb(val) {
uni.navigateTo({
url: '/pages/agreement/web-view?url=' + val
})
},
}
}
</script>
<style lang="scss" scoped>
.contioner {
padding: 30rpx;
}
.cneter {
text-align: center;
}
p {
text-indent: 2rem;
letter-spacing: 3px;
font-weight: 500;
}
h4 {
text-indent: 2rem;
letter-spacing: 3px;
}
.line {
border-bottom: 1px solid #000;
border-right: 1px solid #000;
padding: 10px 0;
}
.line:first-child {
border-left: 1px solid #000;
}
.border-right {
border-right: 1px solid #000;
}
.table {
border-top: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #000;
background: #E6EFF1;
}
.marginTop-lg {
margin-top: 20px;
}
.flex {
display: flex;
}
.flex-sub {
flex: 1;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
word-break: break-word;
}
.text-decoration {
text-decoration: underline;
}
</style>

View File

@ -0,0 +1,320 @@
<template>
<view class="pageBox">
<view class="contoner">
<view>政策说明</view>
<view>
湖南鲨鱼健康有限公司(鲨鱼云康我们)您的信任对我们非常重要我们深知个人信息对您的重要性我们将按法律法规要求采取相应安全保护措施尽力保护您的个人信息安全可控我们致力于维持您对我们的信任恪守以下原则保护您的个人信息权责一致原则目的明确原则选择同意原则最少够用原则确保安全原则主体参与原则公开透明原则等同时我们承诺我们将按业界成熟的安全标准采取相应的安全保护措施来保护您的个人信息鉴于此鲨鱼健康服务提供者以下简称我们制定本隐私权政策下称本政策/本隐私权政策并提醒您
</view>
<view>
本政策适用于鲨鱼健康提供的所有产品服务如我们及关联公司范围详见定义部分的产品或服务中使用了鲨鱼健康提供的产品或服务例如使用鲨鱼健康账户登录但未设独立隐私权政策的则本政策同样适用于该部分产品或服务我们及关联公司就其向您提供的产品或服务单独设立有隐私权政策的则相应产品或服务适用相应隐私权政策
在使用鲨鱼健康各项产品或服务前请您务必仔细阅读并透彻理解本政策特别是以粗体/粗体下划线标识的条款您应仔细阅读在确认充分理解并同意后再开始使用如对本政策内容有任何疑问意见或建议您可通过鲨鱼健康提供的各种联系方式与我们联系
</view>
<view>第一部分 定义</view>
<view>1.1 鲨鱼健康指鲨鱼健康微信小程序
</view>
<view>1.2 鲨鱼健康服务提供者指鲨鱼健康的互联网信息及软件技术服务提供者湖南鲨鱼健康科技有限公司
</view>
<view>1.3 关联公司指湖南鲨鱼健康科技有限公司直接或间接控股或投资的公司
</view>
<view>1.4个人信息指以电子或者其他方式记录的能够单独或者与其他信息结合识别特定自然人身份或者反映特定自然人活动情况的各种信息
</view>
<view>1.5个人敏感信息指包括身份证件号码个人生物识别信息银行账号财产信息行踪轨迹交易信息14岁以下儿童信息等的个人信息我们将在本隐私权政策中对具体个人敏感信息以粗体进行显著标识
</view>
<view>1.6个人信息删除指在实现日常业务功能所涉及的系统中去除个人信息的行为使其保持不可被检索访问的状态
</view>
<view>除另有约定外本政策所用定义与鲨鱼健康用户协议中的定义具有相同的涵义
</view>
<view>第二部分 隐私权政策</view>
<view>我们如何收集和使用您的个人信息</view>
<view>我们的产品与服务包括一些核心功能可能会收集保存和使用下列与您有关的信息才能实现上述这些功能如果无法收集和使用您的相关信息您将无法享受我们提供的产品与服务
</view>
<view>
2.1.1 您在使用我们的服务时主动提供的信息
</view>
<view>1您在注册账户时主动填写的或上传的信息如您在注册账户时使用的手机号码或授权绑定的微信等以及您的昵称头像等信息</view>
<view>
2您在使用服务时主动上传的信息如您在鲨鱼健康主动记录的个人及家人的基本信息和健康档案信息包括姓名性别身高体重生日饮食运动习惯血压等您主动上传照片视频等至鲨鱼健康的互动区以及允许其他注册用户查看并可分享至其他社交软件的动态所包含的信息进行健康评估时提供的信息等
</view>
<view>
3您在兑换时提供的信息如您下单时提供的收件人信息
</view>
<view>4您主动提供给我们的客服顾问或者参加我们举办的活动时所提交的信息如您在向客服咨询时提供的信息您在参加有奖征集等鲨鱼健康已开展或者未来可能开展的活动时主动提交的信息</view>
<view>5其他您在使用我们的产品或服务时主动提供的其他信息</view>
<view>2.1.2 您在使用服务时我们主动收集的信息</view>
<view>
1设备信息我们会根据您在使用中授予的具体权限接收并记录您所使用的设备相关信息例如设备名称设备型号唯一设备标识符运营商网络类型等软硬件特征信息设备所在位置相关信息例如IP地址GPS位置以及能够提供相关信息的WLAN接入点蓝牙和基站等信息
</view>
<view>
2日志信息当您使用我们的客户端或网站提供的产品或服务时我们会自动收集您对我们服务的详细使用情况作为有关网络日志保存例如您的搜索内容浏览器类型浏览记录订单信息IP地址访问日期和时间及您访问的网页记录
</view>
<view>
3位置信息当您使用与位置有关的服务时我们可能会记录您设备所在的位置信息以便为您提供相关服务在您使用服务时我们可能会通过IP地址GPSWiFi或基站等途径获取您的地理位置信息同时您也可以随时通过相关功能设置取消当您取消该授权后我们将不再收集该信息也无法再为您提供上述与之对应的服务但除非您依照法律的规定删除了您的信息否则您的取消行为不会影响我们基于您之前的授权进行的信息的处理存储
</view>
<view>
4订单信息当您准备进行结算时鲨鱼健康系统会生成您购买该商品的订单我们将会收集您的订单信息来进行您的身份核验确定交易支付结算完成配送为您查询订单以及提供客服咨询与售后服务我们还会使用您的订单信息来判断您的交易是否存在异常以保护您的交易安全
</view>
<view>5支付信息当您下单后您可以选择与鲨鱼健康合作的微信支付通道所提供的支付服务支付时我们将收集您的第三方支付账号</view>
<view>6你的饮食运动等习惯您使用食物热量查询拍照识别语音识别运动动作运动课程查询等与饮食运动相关的功能或者根据您在客户端浏览记录及停留时间等信息搜集您的习惯</view>
<view>
7设备中的图片视频等经过您的授权我们的客户端会将您主动上传的视频图片加密上传到服务器进行存储拒绝提供该权限仅会使您无法使用上述功能但不影响鲨鱼健康其他功能与服务的正常使用除非您依照法律的规定删除了您的信息否则您的拒绝行为不会影响我们基于您之前的授权进行的信息的存储或处理
</view>
<view>
8手机相机信息经过您的授权我们的客户端会在您使用拍照功能上传图片视频等内容时可能会获取您的手机相机信息
</view>
<view>2.1.3 经过您的授权我们通过第三方获取到的您的个人信息
</view>
<view>
1为了方便用户记录/同步健康数据和步数我们还提供了同步第三方软件的健康数据的功能比如微信步数等
</view>
<view>2出于安全和防欺诈的目的针对特定账号金融交易等服务在您授权的前提下通过合法来源核实您的信息如电话号码</view>
<view>
3经您授权同意后通过第三方获取到的您的其他信息
</view>
<view>2.1.4 我们通过您绑定的智能设备所获取的信息
</view>
<view>
若您已有相关硬件设备包括智能血压仪血糖仪体脂秤等智能设备希望将硬件产品记录的信息包括但不限于血糖体重体脂率等已同意上传的个人信息及个人身体数据同步至鲨鱼健康则可以通过绑定设备或开启蓝牙功能实现如您拒绝仅会使您无法使用该功能但并不影响您正常使用鲨鱼健康的其他功能同时您也可以随时通过相关功能设置取消该权限但当您取消该授权后我们将不再收集该信息也无法再为您提供上述与之对应的服务但除非您依照法律的规定删除了您的信息否则您的取消行为不会影响我们基于您之前的授权进行的信息的处理存储
</view>
<view>2.1.5 第三方通过软件等方式主动获取的信息
</view>
<view>
为了更好的为您提供服务在您使用鲨鱼健康的部分功能时和鲨鱼健康有合作关系的第三方可能会通过SDK接口等方式获取您的部分信息包括您的设备平台设备厂商设备品牌设备识别码如IMEIMACIDFA等
等设备信息音频录制权限应用列表信息网络信息如IP地址WIFI信息等以及位置相关信息等</view>
<view>4.5 进行其他任何违法以及侵犯其他个人公司社会团体组织的合法权益的行为或者法律行政法规规章条例以及任何具有法律效力之规范所限制或禁止的其他行为</view>
<view>我们如何使用您的个人信息
</view>
<view>我们严格遵守法律法规的规定及与用户的约定将收集的信息用于以下用途若我们超出以下用途使用您的信息我们将再次向您进行说明并征得您的同意</view>
<view>2.2.1 向您提供服务比如向您提供健康评估食物信息识别及分析饮食分析健康方案您的健康档案管理等
</view>
<view>
2.2.2 满足您的个性化需求比如为了将您感兴趣的服务信息通过小程序呈现给您 或在您搜索时向您展示您可能希望找到的商品我们可能会收集您的相关信息进行数据分析以形成用户画像用来实现前述个性化推送功能
</view>
<view>
2.2.3 为您提供一致的服务对于从您的各种设备上收集到的信息我们可能会将它们进行关联我们可能会将来自某项服务的信息与来自其他服务的信息结合起来以便为您提供服务个性化内容和建议
</view>
<view>
2.2.4 安全保障比如我们会将您的信息用于身份验证安全防范反诈骗监测存档备份客户的安全服务等用途
</view>
<view>
2.2.5 评估改善我们的促销及推广活动的效果
</view>
<view>2.2.6 帮助我们设计新服务改善我们现有的服务比如我们将会对数据进行分析研究和开发与我们产品或服务的使用相关的统计信息</view>
<view>2.2.7 储存并维护与您相关的信息用于我们的业务运营例如业务统计或履行法律义务</view>
<view>2.2.8 其他征得您同意的目的情况</view>
<view>2.2.9 其他不违反任何强制性法律法规的情况</view>
<view>我们的承诺
</view>
<view>
2.3.1
请您理解我们向您提供的功能和服务是不断更新和发展的如果某一功能或服务未在前述说明中且收集了您的信息我们会通过页面提示交互流程网站公告等方式另行向您说明信息收集的内容范围和目的以征得您的同意
</view>
<view>
2.3.2
请您注意在未取得您的授权之前我们不会主动从鲨鱼健康外的第三方获取您的个人信息如未来为业务发展需要从第三方间接获取您个人信息我们会在获取前向您明示您个人信息的来源类型及使用范围如鲨鱼健康开展业务需进行的个人信息处理活动超出您原本向第三方提供个人信息时的授权同意范围我们将在处理您的该等个人信息前征得您的明示同意此外我们也将会严格遵守相关法律法规的规定并要求第三方保障其提供的信息的合法性
</view>
<view>
2.3.3在收集到您的个人信息后我们将通过技术手段及时对数据进行匿名化处理在不泄露您个人信息的前提下我们有权对匿名化处理后的用户数据库进行挖掘分析和利用包括商业性使用有权对产品/服务使用情况进行统计并与公众/第三方共享脱敏的统计信息
</view>
<view>
我们如何共享转让公开披露您的个人信息
</view>
<view>
2.4.1我们不会向其他任何公司组织和个人分享您的个人信息但以下情况除外
</view>
<view>
1在获取明确同意的情况下共享获得您的明确同意后我们会与其他方共享您的个人信息
</view>
<view>
2在法定情形下的共享我们可能会根据法律法规规定诉讼争议解决需要或按行政司法机关依法提出的要求对外共享您的个人信息
</view>
<view>
3只有共享您的信息才能实现我们的产品与/或服务的核心功能或提供您需要的服务
</view>
<view>
4与我们的关联公司共享您的个人信息可能会与我们关联公司共享我们只会共享必要的个人信息且受本隐私协议中所声明目的的约束关联公司如要改变个人信息的处理目的将再次征求您的授权同意
</view>
<view>
5与授权合作伙伴共享仅为实现本隐私协议中声明的目的我们的某些服务将由授权合作伙伴提供我们可能会与合作伙伴共享您的某些个人信息以提供更好的客户服务和用户体验例如我们请来提供第三方物流的公司可能需要采集和使用您的收货地址收货人及联系方式等信息在这种情况下这些公司必须遵守我们的数据隐私和安全要求我们仅会出于合法正当必要特定明确的目的共享您的个人信息并且只会共享提供服务所必要的个人信息
</view>
<view>
6商品或技术服务的供应商我们可能会将您的个人信息共享给支持我们功能的第三方这些支持包括为我们的供货或提供基础设施技术服务物流配送服务支付服务数据处理等我们共享这些信息的目的是可以实现我们产品与/或服务的重要功能比如我们必须与物流服务提供商共享您的订单信息才能安排送货或者我们需要将您的订单号和订单金额与第三方支付机构共享以实现其确认您的支付指令并完成支付等
</view>
<view>
7第三方商家我们必须将您的订单信息与交易有关的必要信息与第三方商家共享来实现您向其购买商品或服务的需求并促使其可以完成后续的售后服务
</view>
<view>
8对我们与之共享个人信息的公司组织和个人我们会与其签署严格的保密协定要求他们按照我们的说明本隐私协议以及其他任何相关的保密和安全措施来处理个人信息
</view>
<view>
9为了遵守法律执行或适用我们的使用条件和其他协议或者为了保护鲨鱼健康您或其他鲨鱼健康客户的权利及其财产或安全比如为防止欺诈等违法活动和减少信用风险而与其他公司和组织交换信息不过这并不包括违反本隐私政策中所作的承诺而为获利目的出售出租共享或以其它方式披露的个人信息
</view>
<view>
2.4.2 我们不会将您的个人信息转让给任何公司组织和个人但以下情况除外
</view>
<view>
1在获取您明确同意的情况下转让
</view>
<view>
2在涉及合并收购或破产清算时如涉及到个人信息转让我们会在要求新的持有您个人信息的公司组织继续受此隐私协议的约束否则我们将要求该公司组织重新向您征求授权同意
</view>
<view>
2.4.2我们仅会在以下情况下公开披露您的个人信息
</view>
<view>
1获得您明确同意或基于您的主动选择我们可能会公开披露您的个人信息
</view>
<view>
2基于法律的披露在法律法律程序诉讼或政府主管部门强制性要求的情况下我们可能会公开披露您的个人信息
</view>
<view>
2.4.3 我们如何保护您的个人信息
</view>
<view>
1我们已使用符合业界标准的安全防护措施保护您提供的个人信息防止数据遭到未经授权访问公开披露使用修改损坏或丢失我们会采取一切合理可行的措施保护您的个人信息
</view>
<view>
2我们会采取一切合理可行的措施确保未收集无关的个人信息我们只会在达成本政策所述目的所需的期限内保留您的个人信息除非需要延长保留期或受到法律的允许
</view>
<view>
3我们将采取措施确保您的信息安全但请您理解由于技术的限制以及可能存在的各种恶意手段在互联网行业即便竭尽所能加强安全措施也不可能始终保证信息百分之百的安全您接入鲨鱼健康所用的系统和通讯网络有可能因鲨鱼健康可控范围外的因素而出现问题因此您应采取积极措施保护个人信息的安全
</view>
<view>
4互联网环境并非百分之百安全我们将尽力确保或担保您发送给我们的任何信息的安全性如果我们的物理技术或管理防护设施遭到破坏导致信息被非授权访问公开披露篡改或毁坏导致您的合法权益受损我们将承担相应的法律责任
</view>
<view>
5在不幸发生个人信息安全事件后我们将按照法律法规的要求及时向您告知安全事件的基本情况和可能的影响我们已采取或将要采取的处置措施您可自主防范和降低风险的建议对您的补救措施等我们将及时将事件相关情况以电话短信推送通知等方式告知您难以逐一告知个人信息主体时我们会采取合理有效的方式发布公告同时我们还将按照监管部门要求主动上报个人信息安全事件的处置情况
</view>
<view>
您如何管理自己的信息
</view>
<view>
按照中国相关的法律法规标准以及其他国家地区的通行做法我们保障您对自己的个人信息行使以下权利
</view>
<view>
2.5.1 访问您的个人信息
</view>
<view>
1您有权访问您的个人信息法律法规规定的例外情况除外如果您想行使数据访问权可以通过以下方式自行访问
</view>
<view>
2账户信息--您可以通过访问我的访问或编辑您的个人资料信息更改密码等
</view>
<view>
3健康信息--您可以通过访问健康检测健康评估记录查看修改管理您的健康信息以及其他数据
</view>
<view>
4日记信息--您可以通过访问饮食方案运动方案查看新增修改删您的订日记信息
</view>
<view>
5如果您无法通过上述链接访问这些个人信息您可以随时使用我的-问题反馈联系我们将在7天内回复您的访问请求
</view>
<view>
2.5.2 更正您的个人信息
</view>
<view>
1当您发现我们处理的关于您的个人信息有错误时您有权要求我们做出更正您可以通过访问您的个人信息中罗列的方式提出更正申请
</view>
<view>
2如果您无法通过上述链接访问这些个人信息您可以随时使用我的-问题反馈联系我们将在7天内回复您的更正请求
</view>
<view>
2.5.3 删除您的个人信息
</view>
<view>
在以下情形中您可以向我们提出删除个人信息的请求
</view>
<view>
1如果我们处理个人信息的行为违反法律法规
</view>
<view>
2如果我们收集使用您的个人信息却未征得您的同意
</view>
<view>
3如果我们处理个人信息的行为违反了与您的约定
</view>
<view>
4如果您不再使用我们的产品或服务若我们决定响应您的删除请求我们还将同时通知从我们获得您的个人信息的实体要求其及时删除除非法律法规另有规定或这些实体获得您的独立授权当您从我们的服务中删除信息后我们可能不会立即备份系统中删除相应的信息但会在备份更新时删除这些信息
</view>
<view>
2.5.4 改变您授权同意的范围
</view>
<view>
1每个业务功能需要一些基本的个人信息才能得以完成对于额外收集的个人信息的收集和使用您可以随时给予或收回您的授权同意您可以通过修改个人设置中的授权项目改变您授权同意的范围
</view>
<view>
2当您收回同意后我们将不再处理相应的个人信息但您收回同意的决定不会影响此前基于您的授权而开展的个人信息处理
</view>
<view>
2.5.5 我们如何处理未成年人的个人信息
</view>
<view>
1我们的产品网站和服务主要面向成人如果没有父母或监护人的同意不满18周岁的未成年人不得创建自己的用户账户如您为未成年人的建议您请您的父母或监护人仔细阅读本隐私政策并在征得您的父母或监护人同意的前提下使用我们的服务或向我们提供信息
</view>
<view>
2对于经父母同意而收集未成年人个人信息的情况我们只会在受到法律允许父母或监护人明确同意或者保护未成年人所必要的情况下使用或公开披露此信息
</view>
<view>
3如果我们发现自己在未事先获得可证实的父母同意的情况下收集了未成年人的个人信息则会设法尽快删除相关数据
</view>
<view>
2.5.6 您的个人信息如何在全球范围转移
</view>
<view>
原则上我们在中华人民共和国境内收集和产生的个人信息将存储在中华人民共和国境内以下情形除外
</view>
<view>
1适用的法律有明确规定
</view>
<view>
2获得您的明确授权
</view>
<view>
3您通过互联网进行跨境交易等个人主动行为
</view>
<view>
针对以上情形我们会确保依据本隐私权政策对您的个人信息提供足够的保护
</view>
<view>
2.5.7 本隐私协议如何更新
</view>
<view>
我们可能适时会对本隐私协议进行调整或变更本隐私协议的任何更新将以在线公告系统通知等方式进行变更公告除法律法规或监管规定另有强制性规定外经调整或变更的内容一经公布立即或在公告明确的特定时间自动生效如您在隐私协议调整或变更后继续使用我们提供的任一服务或访问我们相关网站的我们相信这代表您已充分阅读理解并接受修改后的隐私协议并受其约束如您不同意调整或变更后的隐私协议请您停止使用我们提供的服务或访问我们相关网站
</view>
<view>
2.5.8 如何联系我们
</view>
<view>
如果您对本隐私协议有任何疑问通过以下方式与我们联系
</view>
<view>
电话400-833-3131
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
</style>
<style lang="scss" scoped>
.contoner {
padding: 20rpx 32rpx;
letter-spacing: 6rpx;
line-height: 50rpx;
}
</style>

View File

@ -0,0 +1,212 @@
<template>
<div class="contioner">
<h3 class="cneter">鲨鱼云康软件许可及用户服务协议</h3>
<p>欢迎您使用鲨鱼云康App!本协议仅适用于湖南鲨鱼健康有限公司的鲨鱼云康App提供的产品或服务
包括您访问鲨鱼云康App使用平台提供的服务</p>
<p>最近更新日期:2024年01月15日版本号为v1.00</p>
<p>版本生效日期:2024年01月15日</p>
<p>
在您接受鲨鱼云康软件许可及用户服务协议(以下简称协议)之前
请务必认真阅读和理解协议中规定的所有权利和限制如您未满18周岁
请与您的法定监护人一起阅读本服务条款以确保您以及您的父母或监护人充分理解本服务条款的全部内容
</p>
<p>
协议是服务用户(用户)与湖南鲨鱼健康有限公司 (鲨鱼云康册我们)之间的法律协议
用户一旦注册登录使用或以任何方式使用本协议所涉及的相关服务的行为将视为对本协议的接受即表示用户享受由协议提供的各项权利
并同意接受本协议各项条款的约束如果用户不同意本协议中的条款请不要注册登录或使用本协议相关服务
</p>
<p>鲨鱼云康有权修订本协议更新后的协议条款将公布于软件自公布之日起生效用户可重新下载安装本软件
在鲨鱼云康修改本协议条款后如果用户不接受修改后的条款请立即停止使用鲨鱼云康提供的鲨鱼云康软件和服务
用户继续使用鲨鱼云康提供的鲨鱼云康软件和服务将被视为已接受了修改后的协议
</p>
<h3>软件授权范围</h3>
<p>1.1鲨鱼云康就鲨鱼云康给予用户一项个人的不可转让不可转授权以及非独占性的许可</p>
<p>
1.2用户可以为非商业目的在单一台移动终端设备上安装使用显示运行鲨鱼云康但用户不得为商业运营目的安装使用运行鲨鱼云康如果需要进行商业性的销售复制和散发例如软件预装和捆绑必须获得鲨鱼云康的书面授权和许可
</p>
<p>1.3用户不得未经鲨鱼云康许可将鲨鱼云康安装在未经鲨鱼云康明示许可的其他终端设备上包括但不限于机顶盒游戏机电视机DVD机等</p>
<p>1.4用户可以为使用鲨鱼云康及服务的目的复制鲨鱼云康的一个副本仅用作备份备份副本必须包含原软件中含有的所有著作权信息</p>
<p>1.5除本协议明示授权外鲨鱼云康未授权给用户其他权利若用户使用其他权利时须另外取得鲨鱼云康的书面同意</p>
<h3>软件的获取安装升级卸载</h3>
<p>
2.1用户应当按照鲨鱼云康的指定网站或指定方式下载安装本软件产品谨防在非指定网站下载本软件以免移动终端设备感染能破坏用户数据和获取用户隐私信息的恶意程序如果用户从未经鲨鱼云康授权的第三方获取本软件或与本软件名称相同的安装程序鲨鱼云康无法保证该软件能够正常使用并对因此给您造成的损失不予负责
</p>
<p>2.2用户必须选择与所安装终端设备相匹配的本软件版本否则由于软件与设备型号不相匹配所导致的任何软件问题设备问题或损害均由用户自行承担</p>
<p>
2.3为了改善用户体验完善服务内容鲨鱼云康有权不时地为您提供本软件替换修改功能强化升级版本为了保证鲨鱼云康软件及服务的安全性和功能的一致性鲨鱼云康软件及服务提供者有权不向您特别通知而对软件进行更新或者对软件的部分功能效果进行改变或限制,也有权为替换修改功能强化或升级收取费用但收费将提前征得您的同意本软件在升级时视用户使用的软件版本差异鲨鱼云康提供给用户自行选择是否需要升级的提示软件新版本发布后鲨鱼云康不保证旧版本的鲨鱼云康继续可用
</p>
<p>2.4如果您不再需要使用本软件或者需要安装新版软件您可以自行卸载</p>
<h3>软件的使用规范</h3>
<p>除非法律允许或已经获得鲨鱼云康软件服务提供者的书面授权您在软件使用过程中不得从事下列行为:</p>
<p>3.1删除本软件及其他副本上一切关于版权的信息以及修改删除或避开本软件为保护知识产权而设置的技术措施</p>
<p>3.2对本软件进行反向工程如反汇编反编译或者其他试图获得本软件的源代码</p>
<p>3.3通过修改或伪造软件运行中的指令数据增加删减变动软件的功能或运行效果或者将用于上述用途的软件方法进行运营或向公众传播无论这些行为是否为商业目的</p>
<p>3.4使用本软件进行任何危害网络安全的行为包括但不限于:</p>
<p>3.4.1使用未经许可的数据或进入未经许可的服务器/账户;</p>
<p>3.4.2未经允许进入公众网络或者他人操作系统并删除修改增加存储信息;</p>
<p>3.4.3未经许可企图探查扫描测试本软件的系统或网络的弱点或其它实施破坏网络安全的行为;</p>
<p>3.4.4企图干涉破坏本软件系统或网站的正常运行故意传播恶意程序或病毒以及其他破坏干扰正常网络信息服务的行为;</p>
<p>3.4.5伪造TCP/IP数据包名称或部分名称;</p>
<p>3.4.6用户通过非鲨鱼云康公司开发授权或认可的第三方兼容软件系统登录或使用本软件及服务或制作发布传播上述工具;</p>
<p>3.4.7未经鲨鱼云康书面同意用户对软件及其中的信息擅自实施包括但不限于下列行为:使用出租出借复制修改链接转载汇编发表出版建立镜像站点擅自借助本软件发展与之有关的衍生产品作品服务插件外挂兼容互联等;
</p>
<p>3.4.8利用本软件发表传送传播储存违反当地法律法规或侵害他人知识产权商业秘密等合法权利的内容;</p>
<p>3.4.9利用本软件批量发表传送传播广告信息及垃圾信息;</p>
<p>3.5对鲨鱼云康软件及服务提供者拥有知识产权的内容进行使用出租出借复制修改链接转载江编发表出版建立镜像站点等</p>
<p>3.6对本软件或者本软件运行过程中释放到任何终端内存中的数据软件运行过程中客户端与服务器端的交互数据以及本软件运行所必需的系统数据进行复制修改增加删除挂接运行或创作任何衍生作品形式包括但不限于使用插件外挂或非鲨鱼云康软件及服务提供者授权的第三方工具服务接入本软件和相关系统
</p>
<p>3.7自行或者授权他人第三方软件对本软件及其组件模块数据进行干扰</p>
<p>3.8对鲨鱼云康或者鲨鱼云康运行过程中释放到任何终端设备内存中的数据及鲨鱼云康运行过程中客户端与服务器端的交互数据进行复制更改修改挂接运行或创作任何衍生作品形式包括但不限于使用插件外挂或非经授权的第三方工具/服务接入本软件和相关系统</p>
<p>3.9其他以任何不合法的方式为任何不合法的目的或以任何与本协议许可使用不一致的方式使用本软件和鲨鱼云康提供的其他服:以及其他未经鲨鱼云康软件及服务提供者书面授权的行为</p>
<h3>账号注册及使用</h3>
<p>4.1用户资格</p>
<p>
您确认在您开始注册使用鲨鱼云康平台服务前您已经具备中华人民共和国法律规定的与您行为相适应的民事权利能及行为能力若您不具备前述能力则您应当获得您法定监护人的同意且您的法定监护人同意接受本协议并承担由此产生的责任
此外您还需确保您不是任何国家国际组织或者地区实施的贸易限制制裁或其他法律规限制的对象否则您可能无法正常注册及使用鲨鱼云康平台服务
</p>
<p>4.2账户注册</p>
<p>4.2.1当您按照注册页面提示填写信息阅读并同意本协议并完成全部注册程序后您可获得鲨鱼云康平台帐号并成为鲨鱼云康平台用户</p>
<p>4.2.2在使用鲨鱼云康平台服务时您应当按鲨鱼云康平台页面的提示准确完整地提供您的信息以便鲨鱼云康软件及服务提供者或其他用户可与您取得有效联系您保证您提供信息的真实性及有效性</p>
<p>4.2.3您设置的昵称头像不得违反国家法律法规及鲨鱼云康平合规则的相关规定否则鲨鱼云康软件服务提供者可回收您的昵称和头像昵称回收不影响您以邮箱手机号码登录鲨鱼云康平台</p>
<p>4.3账户使用</p>
<p>4.3.1用户一旦注册成功成为用户用户将拥有一个帐号用户需要对自己在帐户中的所有活动和事件负全责如果由于用户的过失导致用户的帐号和密码脱离用户的控制则由此导致的针对用户鲨鱼云康或任何第三方造成的损害用户将承担全部责任
</p>
<p>4.3.2您有权使用您设置或确认的密码登录鲨鱼云康平台您的帐号仅限您本人使用未经鲨鱼云康软件及服务提供者同意您不得许可或转让第三方使用帐号如鲨鱼云康平台判断您的帐号使用可能危及您的账户安全及/或鲨鱼云康平台的信息安全时鲨鱼云康软件及服务提供者有权拒绝提供相应服务或终止本协议请您在使用鲨鱼云康账号时遵守法律法规的要求不侵犯任何第三人的权益尤其是字体图片等知识产权
</p>
<p>4.3.3用户有权随时更改密码用户同意若发现任何安全漏洞或非法使用用户账号的情况用户应当立即通知鲨鱼云康</p>
<p>4.3.4用户同意在未经适当授权的情况下在任何时候均不使用其他成员的账户</p>
<p>4.4更新维护</p>
<p>4.4.1您应当及时更新您提供的信息在法律法规的要求下鲨鱼云康软件及服务提供者有权对您的信息进行检查核实您应当配合提供最新真实完整合法有效的信息</p>
<p>4.4.2如鲨鱼云康软件及服务提供者按您最后一次提供的信息与您联系未果您未按鲨鱼云康平台的要求及时提供信息您提供的信息不真实不合法不完整无效的您将承担由此产生的责任与后果鲨鱼云康软件及服务提供者有权向您发出询问或要求整改的通知
</p>
<p>4.5账号安全规范</p>
<p>4.5.1您的帐号由您自行保管您需保管好您的帐号及密码并确保您在每个上网时段结束时退出登录并以正确步骤离开鲨鱼云康平台</p>
<p>4.5.2因您主动泄露帐号密码或因您遭受他人攻击诈骗等行为导致密码泄露产生的损失及后果鲨鱼云康软件及服务提供者并不承担责任您应通过司法行政等救济途径向侵权行为人追责</p>
<p>4.5.3您应对您帐号项下的所有行为负责鲨鱼云康软件及服务提供者不对你的行为承担责任</p>
<p>4.5.4如发现任何未经授权的行为或其他可能导致您帐号遭窃遗失的情形建议您立即通知鲨鱼云康软件及服务提供者您理解鲨鱼云康软件及服务提供者对您的任何请求响应需要合理时间鲨鱼云康软件及服务提供者应您请求而采取的行动可能无法避免或阻止侵害后果的形成或扩大除自身存在过错外鲨鱼云康软件及服务提供者不承担任何责任
</p>
<p>4.6 隐私保护详见隐私政策</p>
<h3>服务内容</h3>
<p>5.1鲨鱼云康网站网络服务的具体内容由鲨鱼云康根据实际情况提供包括但不限于鲨鱼云康开放平台应用商店等企业服务游戏论坛等</p>
<p>5.2用户理解并接受鲨鱼云康仅提供相关的网络服务除此之外与相关网络服务有关的设备(如个人电脑手机及其他与接入互联网或移动互联网有关的装置)及所需的费用(如为接入互联网而支付的电话费及上网费)均应由用户自行负担
</p>
<p>5.3用户应输入帐号和密码登录鲨鱼云康帐户</p>
<p>5.4除了鲨鱼云康提供的软件和服务用户还可以用鲨鱼云康帐号登录使用鲨鱼云康合作伙伴的相关服务</p>
<p>5.5您可通过智能连接服务在不同场景下使用智能设备您应理解智能连接受限于实际场景变化及设备性能的限制可能无法完全按照您的意愿达到使用目的如您使用过程中有疑问请联系鲨鱼云康客服寻求帮助</p>
<p>5.6您可按照平台提供菜谱服务自行选择烹任方式食谱内容仅供参考应结合自身实际做出适于自身条件的选择</p>
<p>5.7您理解并同意智能服务是鲨鱼云康软件及服务提供者基于现有技术提供的不能完全避免潜在技术风险导致的服务差异或不足您应自行评估判断该等服务对自身的影响不会就服务目的未达到即要求鲨鱼云康软件及服务提供者承担任何赔偿责任
</p>
<h3>使用规则</h3>
<p>6.1用户在使用本服务时应当遵守相关的法律法规包括但不限于中华人民共和国宪法中华人民共和国刑法中华人民共和国民法通则中华人民共和国合同法中华人民共和国著作权法中华人民共和国电信条例互联网信息服务管理办法互联网电子公告服务管理规定中华人民共和国保守国家秘密法中华人民共和国计算机信息系统安全保护条例计算机信息网络国际联网安全保护管理办法全国人民代表大会常务委员会关于维护互联网安全的决定及其相关的司法解释
</p>
<p>6.2用户在使用本服务的过程中必须遵守以下原则:</p>
<p>6.2.1遵守所有与网络服务有关的网络协议规定和程序;</p>
<p>6.2.2不得进行任何可能对互联网的正常运转造成不利影响的行为;</p>
<p>6.2.3不得为任何非法目的或为任何商业目的而使用本服务;</p>
<p>6.2.4不得进行任何不利于鲨鱼云康开放平台的行为;</p>
<p>6.2.5不得传输任何骚扰性的中伤他人的辱骂性的恐吓性的庸俗淫秽的或其他任何非法的信息资料;</p>
<p>6.3用户有权根据鲨鱼云康用户的规定使用鲨鱼云康账号提供的相关服务</p>
<p>6.4如果用户在使用过程中注册资料发生变更则用户应当及时更新准确的详细的注册资料</p>
<p>6.5用户应当对以用户的用户账号进行的任何行为承担法律责任包括但不限于用户本人/他人利用用户账号和密码所进行的一切行为如因用户未保管好用户的账号和密码而给鲨鱼云康及其关联公司第三方造成损失用户应当进行全额赔偿并消除影响
</p>
<p>6.6用户理解并同意在使用鲨鱼云康账号提供的各项服务时同意接受鲨鱼云康或第三方提供的各类信息服务</p>
<p>6.7 鲨鱼云康有权根据实际情况中断变更终止服务且鲨鱼云康不需对用户或任何第三方承担任何责任</p>
<p>6.8信息发布规范</p>
<p>6.8.1您在使用本软件时不得利用本软件从事以下行为包括但不限于;
<p>6.8.1.1制作复制发布传播储存违反当地法律法规的内容;</p>
<p>6.8.1.2 发布传送传播储存侵害他人名誉权肖像权知识产权商业秘密等合法权利的内容;</p>
<p>6.8.1.3虚构事实隐瞒真相以误导欺骗他人;</p>
<p>6.8.1.4发表传送传播广告信息及垃圾信息;</p>
<p>6.8.1.5从事其他违反当地法律法规的行为;</p>
<p>6.8.2您可使用本软件发表属于您原创或您有权发表的观点看法数据文字信息用户名图片照片个人信息音频视频文件链接等信息内容您必须保证您拥有您所上传信息内容的知识产权或已获得合法授权您使用本软件及服务的任何行为未侵犯任何第三方之合法权益
</p>
<p>6.8.3未经鲨鱼云康许可您不得在本软件中进行任何诸如发布广告销售商品的商业行为</p>
<h3>您理解并同意</h3>
<p>7.1
本软件同大多数互联网软件一样可能会受多种因素影响包括但不限于用户操作原因网络服务质量社会环境等;也可能会受各种安全问题的侵扰包括但不限于他人非法利用用户资料进行现实生活的骚扰;用户下载安装的其他软件或访问的其他网站中可能含有病毒本马程序或其他恶意程序威胁您的终端设备信息和数据安全继而影响本软件的正常使用等因此您应加强信息安全及个人信息的保护意识注意密码保护以免遭受损失
</p>
<p>7.2您将合法地使用本软件在使用本软件期间将遵守中华人民共和国法律您承诺不制作发布使用传播用于窃取鲨鱼云康帐号及他人个人信息或财产的恶意程序也不得利用本软件做出其他违反中华人民共和国法律法规的行为7.3鲨鱼云康会对用户是否涉嫌违反上述使用规范做出认定并根据认定结果中止终止对您的使用许可或采取其他依本约定可采取的限制措施
</p>
<p>7.4对于用户使用许可软件时发布的涉嫌违法或涉嫌侵犯他人合法权利或违反本协议的信息鲨鱼云康会直接删除</p>
<p>7.5维护软件安全与正常使用是鲨鱼云康软件及服务提供者和您的共同责任鲨鱼云康将按照行业标准合理审慎地采取必要技术措施保护您的终端设备信息和数据安全但是您承认和同意鲨鱼云康并不能就此提供完全保证7.6责任限制:鲨鱼云康软件及服务提供者不对任何间接特殊偶发惩罚或后果性损害负责无论该种责任是如何引起的以及在何种理论下触发的前述责任包括但不限于合同责任或侵权责任或者并非鲨鱼云康软件及服务提供者已知晓或应该知晓的可能损害
</p>
<h3>禁止行为</h3>
<p>用户不得利用鲨鱼云康账号发布或传播敏感信息和违反中华人民共和国法律法规政策的信息包括但不限于下列信息:</p>
<p>8.1违反宪法确定的基本原则的;</p>
<p>8.2危害中华人民共和国统一主权和领土完整的;</p>
<p>8.3 泄露中华人民共和国秘密危害中华人民共和国安全或者损害中华人民共和国荣誉和利益的;</p>
<p>8.4 煽动民族仇恨民族歧视破坏民族团结或者侵害民族风俗习惯的;</p>
<p>8.5宣扬邪教迷信的;</p>
<p>8.6 散布谣言扰乱社会秩序破坏社会稳定的;</p>
<p>8.7 宣扬淫秽赌博暴力或者教唆犯罪的;
<p>8.8侮辱或者诽谤他人侵害他人合法权益的;</p>
<p>8.9危害社会公德或者民族优秀文化传统的;</p>
<p>8.10有法律行政法规和中华人民共和国规定禁止的其他内容的</p>
<p>8.10 有法律行政法规和中华人民共和国规定禁止的其他内容的</p>
<h3>服务变更中断或终止</h3>
<p>9.1鉴于网络服务的特殊性用户同意鲨鱼云康有权根据业务发展情况随时变更中断或终止部分或全部的网络服务而无需通知用户也无需对任何用户或任何第三方承担任何责任</p>
<p>9.2用户理解鲨鱼云康需要定期或不定期地对提供网络服务的平台(如互联网网站移动网络等)或相关的设备进行检修或者维护如因此类情况而造成网络服务在合理时间内的中断鲨鱼云康无需为此承担任何责任但鲨鱼云康应尽可能事先进行通告
</p>
<p>9.3如发生下列任何一种情形鲨鱼云康有权随时中断或终止向用户提供本协议项下的网络服务(包括收费网络服务)而无需对用户或任何第三方承担任何责任:</p>
<p>9.3.1用户提供的个人资料不真实;</p>
<p>9.3.2用户违反本协议中规定的使用规则</p>
<p>9.4鲨鱼云康有权在必要时修改本协议条款协议条款一旦发生变动将会在相关页面上公布修改后的协议条款如果不同意所改动的内容用户应主动取消此项服务如果用户继续使用服务则视为接受协议条款的变动若用户不接受更新后的条款将无法接受鲨鱼云康提供的服务
</p>
<p>9.5鲨鱼云康和合作公司有权按需要修改或变更所提供的收费服务收费标准收费方式服务费及服务条款鲨鱼云康和合作公司将尽最大努力通过电邮或其他方式通知用户有关的修改或变更</p>
<h3>知识产权</h3>
<p>10.1鲨鱼云康提供的网络服务中包含的任何文本图片图形音频和/或视频资料均受版权商标和/或其它财产所有权法律的保护未经相关权利人同意上述资料均不得用于任何商业或非商业目的自行或许可任何第三方实施利用转让上述知识产权鲨鱼云康保留追究上述行为法律责任的权利
</p>
<p>10.2鲨鱼云康为提供网络服务而使用的任何软件(包括但不限于软件中所含的任何图像照片动画录像录音音乐文字和附加程序随附的帮助材料)的一切权利均属于该软件的著作权人均受您所在当地法律法规和相应的国际条约保护鲨鱼云康享有上述知识产权未经该软件的著作权人许可用户不得对该软件进行反向工程
(reverseengineer) 反向编译(decompile)或反汇编 (disassemble)等违法操作</p>
<h3>十一免责声明</h3>
<p>11.1用户确认其知悉本软件所有功能及智能管家为实现本软件各功能所进行的必要操作其根据自身需求自愿选择使用本软件及相关服务因使用本软件及相关服务所存在的风险和一切后果将完全由其自己承担本公司不承担任何责任
</p>
<p>11.2用户必须自行配备移动终端设备上网和使用电信增值业务所需的设备自行负担个人移动终端设备上网或第三方(包括但不限于电信或移动通信提供商)收取的通讯费信息费等有关费用如涉及电信增值服务的我们建议用户与用户的电信增值服务提供商确认相关的费用问题
</p>
<p>11.3用户因第三方如通讯线路故障技术问题网络移动终端设备故障系统不稳定性及其他各种不可抗力原因而遭受的一切损失鲨鱼云康及合作单位不承担责任</p>
<p>11.4本软件经过详细的测试但不能保证与所有的软硬件系统完全兼容不能保证本软件完全没有错误如果出现不兼容及软件错误的情况用户可拨打技术支持电话获得技术支持如果无法解决兼容性问题用户可以删除本软件
</p>
<p>11.5本软件同大多数互联网软件一样受包括但不限于用户原因网络服务质量社会环境等因素的差异影响可能受到各种安全问题的侵扰如他人利用用户的资料造成现实生活中的骚扰用户下载安装的其它软件或访问的其他网站中含有特洛伊木马等病毒威胁到用户的终端设备信息和数据的安全继而影响本软件的正常使用等等用户应加强信息安全及使用者资料的保护意识要注意加强密码保护以免遭致损失和骚扰
</p>
<p>11.6因用户使用本软件或要求鲨鱼云康提供特定服务时本软件可能会调用第三方系统或第三方软件支持用户的使用或访问使用或访问的结果由该第三方提供鲨鱼云康不保证通过第三方系统或第三方软件支持实现的结果的安全性准确性有效性及其他不确定的风险由此若引发的任何争议及损害鲨鱼云康不承担任何责任
</p>
<p>11.7 为了保障公司业务发展和调整的自主权鲨鱼云康公司拥有随时修改或中断服务而不需通知用户的权利鲨鱼云康行使修改或中断服务的权利不需对用户或任何第三方负责</p>
<p>11.8除法律法规有明确规定外我们将尽最大努力确保软件及其所涉及的技术及信息安全有效准确可靠但受限于现有技术请用户理解鲨鱼云康不能对此进行担保</p>
<p>11.9由于用户因下述任一情况所引起或与此有关的人身伤害或附带的间接的经济损害赔偿包括但不限于利润损失资料损失业务中断的损害赔偿或其他商业损害赔偿或损失需由用户自行承担:</p>
<p>11.9.1使用或未能使用许可软件;</p>
<p>11.9.2第三方未经许可的使用软件或更改用户的数据;</p>
<p>11.9.3用户使用软件进行的行为产生的费用及损失;</p>
<p>11.9.4用户对软件的误解;</p>
<p>11.9.5非因鲨鱼云康的原因引起的与软件有关的其他损失</p>
<p>11.10用户与其他使用软件的用户之间通过软件进行的行为因用户受误导或欺骗而导致或可能导致的任何人身或经济上的伤害或损失均由过错方依法承担所有责任</p>
<p>11.11用户使用鲨鱼云康的特定功能时包括但不限于与其他成员共享家庭或设备的功能由此产生的不良后果或经济损失鲨鱼云康将不承担责任</p>
<p>11.12为了改善用户体验完善服务内容鲨鱼云康将不断努力开发新的功能并为用户不时提供软件更新
(这些更新可能会采取软件替换修改功能强化版本升级等形式)因此服务的现有功能随时可能因版本不同或鲨鱼云康的单方判断而被增加或修改或因定期不定期的维护而暂缓提供鲨鱼云康也有权随时调整软件的名称功能展现形式等
</p>
<h3>十二法律及争议解决</h3>
<p>12.1本协议适用中华人民共和国法律</p>
<p>12.2因本协议引起的或与本协议有关的任何争议各方应友好协商解决协商不成的任何一方均应将有关争议提交至鲨鱼云康所在地有管辖权的人民法院管辖</p>
<h3>十三其他条款</h3>
<p>13.1本协议生效时间为2024年01月15日</p>
<p>13.2本协议所有条款的标题仅为阅读方便本身并无实际涵义不能作为本协议涵义解释的依据</p>
<p>13.3如果本协议中的任何条款无论因何种原因完全或部分无效或不具有执行力或违反任何适用的法律则该条款被视为删除但本协议的其余条款仍应有效并且有约束力</p>
<p>13.4鲨鱼云康有权随时根据有关法律法规的变化以及公司经营状况和经营策略的调整等修改本协议用户会在登录时收到确认信息信息会告知用户如果继续使用产品将被视为用户接受修订后的协议用户也可随时通过鲨鱼云康网站浏览最新服务协议条款当发生有关争议时以最新的协议文本为准如果不同意鲨鱼云康对本协议相关条款所做的修改用户有权停止使用网络服务如果用户继续使用网络服务则视为用户接受鲨鱼云康对本协议相关条款所做的修改
</p>
<p>13.5鲨鱼云康在法律允许最大范围对本协议拥有解释权与修改权</p>
</div>
</template>
<style lang="scss" scoped>
.contioner {
padding: 30rpx;
}
.cneter {
text-align: center;
}
p {
text-indent: 2rem;
letter-spacing: 3px;
font-weight: 500;
}
</style>

View File

@ -0,0 +1,19 @@
<template>
<web-view :src="url"></web-view>
</template>
<script>
export default{
data(){
return{
url:''
}
},
onLoad(opt){
this.url=opt.url
},
}
</script>
<style>
</style>

253
src/pages/detail/detail.vue Normal file
View File

@ -0,0 +1,253 @@
<template>
<view class="content">
<!-- 背景图片 -->
<image src="https://shayu5qny.yhy.ren/revision/earnPointsBg.png" class="earnPointsBg"></image>
<view class="contioner bg-video">
<view class="flex">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="color">
<view class="introduce text-df">
欢迎使用线上健康评估工具让我们一起探索您的健康需求吧
</view>
<view class="evaluation">
<view class="text-bold color">测评介绍</view>
<view class="flex-align" style="color: #3F4040;margin-left: 12rpx;">
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/intralTime.png" class="intralTime"></image>
<view><text class="text-bold text-xl">{{times}}</text><text class="text-sm">分钟</text>
</view>
<view class="grey text-sm margin-top-xs">简单快速</view>
</view>
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/questions.png" class="intralTime"></image>
<view><text class="text-bold text-xl">{{questionCount}}</text><text
class="text-sm"></text></view>
<view class="grey text-sm margin-top-xs">专业量表</view>
</view>
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/peoples.png" class="intralTime"></image>
<view><text class="text-bold text-xl">{{assessCount}}</text><text
class="text-sm"></text></view>
<view class="grey text-sm margin-top-xs">已完成测评</view>
</view>
</view>
</view>
</view>
</view>
<view class="flex" style="margin-top: 80rpx;">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="card">
<block v-if="shuju.diseases!='95'">
<view class="text-df grey">{{illustrate}}</view>
</block>
<block v-else>
<view class="text-bold color">说明</view>
<view class="text-df grey marginTop-sm">1填写本问卷您将获得您的专属健康报告及生活方式改善建议</view>
<view class="text-df grey margin-top-xs">2本问卷测试结果仅供您自测参考不作为医学诊断</view>
<view class="text-df grey margin-top-xs">3您的所有信息都将保密</view>
</block>
</view>
</view>
<view class="flex" style="margin-top: 80rpx;">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="card">
<view class="btn" @click="startEvaluation">开始测评</view>
</view>
</view>
<view class="literature" v-if="assessReferenceList!=null">
<view class="text-bold color">参考文献</view>
<block v-for="(item,index) in assessReferenceList" :key="index">
<view class="marginTop-sm text-df grey" v-if="null!=item.referenceUrl && ''!=item.referenceUrl">
<a v-bind:href="item.referenceUrl">[{{index+1}}]{{item.reference}}</a>
</view>
<view v-else>[{{index+1}}]{{item.reference}}</view>
</block>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: '评估问卷',
illustrate: '本测试结果仅供用户自测参考,不作为医学诊断。',
formData: '',
type: '',
times: '', //
questionCount: '', //
assessCount: '', //
shuju: null,
assessReferenceList: null, //
}
},
onLoad(options) {
// let a={
// userId: '29',
// headSculpture: 'https://sharkbaby.yhy.ren/0042fab3c00f4fae80e3d2b732a0596a.jpg',
// name: '',
// memberId: '0',
// diseases: '95',
// typed:2,
// age:18,
// }
// let b={
// userId: '29',
// headSculpture: 'https://sharkbaby.yhy.ren/0042fab3c00f4fae80e3d2b732a0596a.jpg',
// name: '',
// id: '0',
// dicCode: '15',
// typed:1,
// }
// let c={
// userId: '1855',
// headSculpture: 'https://sharkbaby.yhy.ren/0042fab3c00f4fae80e3d2b732a0596a.jpg',
// name: '',
// planId: '15',
// diseases: '103',
// }
// console.log(JSON.stringify(a))
this.shuju = JSON.parse(options.params)
this.formData = options.params
this.type = this.shuju.typed
},
onShow() {
let a, b = ''
//
if (this.shuju.typed == 1) {
a = this.shuju.dicCode
b = this.shuju.id
} else {
a = this.shuju.diseases
b = this.shuju.memberId
}
this.$API.getAssessInfo({
data: {
diseases: a, //id
memberId: b, //id
type: this.shuju.typed, // 1. 2.
userId: this.shuju.userId, //
}
}).then(res => {
this.times = res.data.times
this.questionCount = res.data.questionCount
this.assessCount = res.data.assessCount
this.assessReferenceList = res.data.assessReferenceList
})
},
methods: {
startEvaluation() {
//
if (this.type == '1') {
uni.redirectTo({
url: '/pages/psychological-assessment/index/index?params=' + this.formData
})
//
} else {
uni.redirectTo({
url: '/pages/health-risks/index/index?params=' + this.formData
})
}
},
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100vw;
height: 100vh;
background: linear-gradient(171deg, #EFFFFD 10.63%, #F4F8F7 73.62%);
}
.topContioner {
position: fixed;
top: 0;
width: 100vw;
z-index: 10;
.leftBack {
position: absolute;
left: 20rpx;
}
}
.earnPointsBg {
width: 100vw;
height: 574rpx;
position: fixed;
top: 0;
z-index: 1;
}
.contioner {
padding: 74rpx 32rpx 0;
z-index: 2;
.color {
color: #17191A;
}
.grey {
color: #909292;
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.introduce {
padding: 20rpx;
width: calc(502rpx - 40rpx);
height: calc(120rpx - 40rpx);
background: #FFFFFF;
border-radius: 0rpx 16rpx 0rpx 0rpx;
}
.evaluation {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 26rpx 34rpx 24rpx 36rpx;
margin-top: 16rpx;
width: calc(502rpx - 70rpx);
height: calc(278rpx - 50rpx);
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.intralTime {
$wh: 60rpx;
width: $wh;
height: $wh;
}
}
.card {
width: calc(502rpx - 40rpx);
padding: 20rpx;
background: #FFFFFF;
border-radius: 0rpx 16rpx 16rpx 16rpx;
.btn {
width: 424rpx;
text-align: center;
line-height: 92rpx;
background: #3AAFB8;
border-radius: 50rpx;
margin: 0 20rpx;
color: #FFFFFF;
}
}
.literature {
padding: 20rpx;
background: #FFFFFF;
border-radius: 0rpx 16rpx 16rpx 16rpx;
margin: 60rpx 0 20rpx;
}
}
</style>

View File

@ -0,0 +1,230 @@
page {
background: linear-gradient(90deg, #E3F5FF 0%, #ECF8FF 100%);
width: 1080px;
height: 1920px;
}
.pageBox {
padding: 36px 40px;
position: relative;
overflow: hidden;
.homeHide{
$wh:80px;
width: $wh;
height: $wh;
position: absolute;
bottom: 300px;
right: -40px;
image{
width: $wh;
height: $wh;
}
}
.homeShow{
$wh:80px;
width: $wh;
height: $wh;
position: absolute;
bottom: 300px;
right: 20px;
image{
width: $wh;
height: $wh;
}
}
.themColor {
color: #3AAFB8;
}
.card {
padding: 40px 40px 28px 40px;
width: calc(100% - 80px);
height: calc(1624px - 68px);
background: #FFFFFF;
.topImg{
width: 502px;
height: 290px;
margin-right: 32px;
border-radius: 16px;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
}
.leftWidth{
width: 80px;
height: 48px;
line-height: 48px;
text-align: center;
background: #11ACFF;
border-radius: 8px;
font-size: 32px;
color: #FFFFFF;
margin-right: 12px;
margin-top:10px;
}
.nameTitle{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 48px;
}
.lowHeat{
width: 48px;
height: 62px;
}
::v-deep .uni-progress-bar {
// 这主要是加上deep才能改变它原来的样式
border-radius: 50px !important;
overflow: hidden;
}
::v-deep .uni-progress-inner-bar{
background: linear-gradient( 90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50px !important;
overflow: hidden;
}
.titleOne{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 40px;
color: #17191A;
padding-top: 60px;
}
.item {
border-bottom: 1px solid #EBEDF0;
padding: 32px 0;
}
.left{
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 32px;
color: #17191A;
margin-right: 32px;
}
.right{
font-size: 32px;
color: #3F4040;
}
.yuan{
width: 12px;
height: 12px;
border-radius: 50%;
margin-right: 6px;
margin-bottom: 4px;
display: inline-block;
}
.dataList {
color: #17191A;
font-size: 32px;
.title {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 40px;
color: #17191A;
margin-top: 60px;
margin-bottom: 32px;
}
.cut{
margin: 32px 0;
width: 100%;
height: 1px;
background: #EBEDF0;
}
.right {
color: $uni-color;
}
.tags {
display: flex;
flex-wrap: wrap;
span {
padding: 0 20rpx;
margin:0 30rpx 30rpx 0;
height: 48rpx;
line-height: 48rpx;
border-radius: 10rpx;
}
}
.audio {
width: 100%;
margin-bottom: 30rpx;
audio {
width: 100%;
}
}
.context {
line-height: 44rpx;
margin-bottom: 30rpx;
padding-bottom: 30rpx;
}
.imageBox {
width: 100%;
image {
width: 100%;
border-radius: 20rpx;
margin-bottom: 30rpx;
}
}
}
}
.bottomSelect {
width: 100%;
height: 120px;
position: relative;
display: flex;
.bottomImg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
image {
width: 100%;
height: 100%;
}
}
.lineHeight{
flex: 1;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
.title {
font-size: 36px;
color: #333333;
}
.titleShow {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 40px;
color: #3AAFB8;
}
.tagWidth {
width: 160px;
height: 4px;
background: #3AAFB8;
margin-top: 12px;
}
}
.bottomBack{
width: 100%;
line-height: 76px;
text-align: center;
background: rgba(255,255,255,0.4);
border-radius: 38px;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 24px;
color: #17191A;
margin-top: 28px;
}
}

View File

@ -0,0 +1,165 @@
<template>
<view class="pageBox" v-if="pageShow">
<view class="card flex flex-direction">
<view class="flex justify-between">
<view class="topImg">
<image :src="fomeData.imgAddress"></image>
</view>
<view class="flex-sub flex justify-between flex-direction" style="margin: 24px 0 12px;">
<view class="flex">
<view class="leftWidth">{{tagLable}}</view>
<view class="nameTitle flex-sub">{{fomeData.dishName}}</view>
</view>
<view>
<span class="themColor" style="font-size: 36px;">{{fomeData.heatAmount}}</span><span
class="themColor" style="font-size: 28px;">千卡</span
style="font-size: 28px;color:#666;"><span>/100</span>
</view>
<view class="flex">
<image src="../../static/images/lowHeat.png" class="lowHeat" style="margin-right: 8px;"></image>
<view class="flex-sub" style="margin-top: 15px;">
<progress :percent="fomeData.percentage" stroke-width="8" activeColor="#36AAB1"
backgroundColor="#E5FDFF" />
</view>
<image src="../../static/images/highHeat.png" class="lowHeat" style="margin-left: 8px;"></image>
</view>
</view>
</view>
<scroll-view scroll-y class="flex-sub" style="height: 0;">
<block v-if="imgIndex==0">
<view class="titleOne">疾病人群进食提示</view>
<view class="item flex" v-if="fomeData.foodsInfo.foodsLevelB">
<span class="left"><span class="yuan" style="background: #10AB4A;"></span>优选</span>
<view class="right flex-sub">{{fomeData.foodsInfo.foodsLevelB}}</view>
</view>
<view class="item flex" v-if="fomeData.foodsInfo.foodsLevelC">
<span class="left"><span class="yuan" style="background: #F6A23D;"></span>可食</span>
<view class="right flex-sub">{{fomeData.foodsInfo.foodsLevelC}}</view>
</view>
<view class="flex" style="padding-top: 32px;" v-if="fomeData.foodsInfo.foodsLevelE">
<span class="left"><span class="yuan" style="background: #FF4545;"></span>限制</span>
<view class="right flex-sub">{{fomeData.foodsInfo.foodsLevelE}}</view>
</view>
<block v-if="fomeData.prevent!=null">
<view class="titleOne">食用说明</view>
<view style="padding-top: 32px;font-size: 32px;color: #3F4040;"
v-html="fomeData.prevent.replace(/(\r\n|\n|\r)/gm, '<br />')">
</view>
</block>
</block>
<block v-else>
<block v-for="(item,index) in fomeData.nutrientInfo" :key="index">
<view class="dataList" :style="{borderRadius:index==0?'0 0 20rpx 20rpx':''}"
v-if="item.info.length!=0">
<view class="title">{{item.name}}</view>
<block v-for="(v,i) in item.info" :key="i">
<view class="flex-between">
<view class="left">{{v.nutrientName}}</view>
<view class="right">{{v.nutrientValue}} {{v.company?v.company:''}}</view>
</view>
<view class="cut" v-if="i<item.info.length-1"></view>
</block>
</view>
<view class="dataList" style="border-radius: 0 0 20rpx 20rpx">
<view class="c_list_null" v-if="!fomeData.nutrientInfo.length">
<image src="/static/images/nth2.png" class="nth_image" mode="widthFix" />
<text class="text">暂无数据~</text>
</view>
</view>
</block>
</block>
</scroll-view>
</view>
<view class="bottomSelect">
<view class="bottomImg">
<image
:src="imgIndex==0?'https://sharkbaby.yhy.ren/leftBg.png':'https://sharkbaby.yhy.ren/rightBg.png'">
</image>
</view>
<view class="bg-video lineHeight" @tap="selectChange(0)">
<view :class="['title',imgIndex==0?'titleShow':'']">进食提示</view>
<view class="tagWidth" v-if="imgIndex==0"></view>
</view>
<view class="bg-video lineHeight" @tap="selectChange(1)">
<view :class="['title',imgIndex==1?'titleShow':'']">营养成分</view>
<view class="tagWidth" v-if="imgIndex==1"></view>
</view>
</view>
<view class="bottomBack" @tap="back">返回上一页</view>
<view class="homeHide" v-show="!isHome" @tap="backTap(0)">
<image src="../../static/images/homeHide.png"></image>
</view>
<view class="homeShow" v-show="isHome" @tap="backTap(1)">
<image src="../../static/images/homeShow.png"></image>
</view>
</view>
</template>
<script>
import {
showLoading,
hideLoading,
} from "/tool/index.js"
export default {
data() {
return {
imgIndex: 0,
tagLable: '',
fomeData: {},
id: null, //id
userId:'29',
pageShow: false,
isHome: false, //
}
},
onLoad(opt) {
this.id=opt.id
this.tagLable=opt.lableName
this.getFoodsInfo()
},
methods: {
selectChange(index) {
this.imgIndex = index
},
//
async getFoodsInfo() {
showLoading('加载中...')
let ret = await this.$API.selectFoodsInfo({
data: {
foodsId: this.id,
userId:this.userId
}
})
// 0
if (ret.data.nutrientInfo.length != 0) {
ret.data.nutrientInfo.forEach((item, index) => {
item.info = item.info.filter((item1) => item1.nutrientValue !== 0);
});
}
this.fomeData = ret.data || {}
this.$nextTick(() => {
this.pageShow = true
hideLoading()
})
},
//
back(){
history.go(-1)
},
//
backTap(e) {
if (e == 0) {
this.isHome = true
} else {
uni.reLaunch({
url: '/pages/hairtailScreen/bestFood/index/index'
})
}
},
}
}
</script>
<style scoped lang="scss">
@import './detail.scss'
</style>

View File

@ -0,0 +1,145 @@
page {
background: linear-gradient(90deg, #E3F5FF 0%, #ECF8FF 100%);
width: 1080px;
height: 1920px;
}
.pageBox {
padding: 40px;
.bestFoodBg {
width: 100%;
height: 1260px;
}
.card {
width: calc(100% - 80px);
height: calc(1260px - 88px);
background: #FFFFFF;
border-radius: 12px;
padding: 48px 40px 40px 40px;
color: #171919;
position: relative;
.preNext{
width: 100%;
position: absolute;
bottom: 40px;
left: 0;
}
.nothing{
$wh:648px;
width: $wh;
height: $wh;
margin: 0 auto;
margin-top: 160px;
image{
width: $wh;
height: $wh;
}
}
.foodImg {
width: 206px;
height: 154px;
}
.themColor {
color: #3AAFB8;
}
.rightArrow {
$wh: 48px;
width: $wh;
height: $wh;
}
.cutt {
width: 100%;
height: 1px;
background: #E9E9E9;
margin: 24px 0 12px;
}
.whiteBtn {
width: 232px;
line-height: 108px;
text-align: center;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 36px;
color: #28A6B4;
}
}
.tagWidth {
width: 317px;
height: 150px;
background: rgba(255, 255, 255, 0.4);
border-radius: 12px;
border: 1px solid #FFFFFF;
.text-four {
font-size: 40px;
}
.text-eight {
font-size: 28px;
}
}
.tagWidthShow {
background: #11ACFF;
}
.tagShow {
background: #3AAFB8 !important;
color: #FFFFFF !important;
}
.title {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32px;
margin-top: 32px;
}
.swiper {
height: 316px;
.tag {
width: 232px;
height: 108px;
background: rgba(255, 255, 255, 0.4);
border-radius: 12px 12px 12px 12px;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32px;
color: #42444F;
margin-top: 24px;
}
}
}
//设置轮播的指示点大小
::v-deep .uni-swiper-dots {
// 指示点整个区域
bottom: 0;
}
::v-deep .uni-swiper-dot {
// 指示点元素默认样式
width: 14px;
height: 14px;
}
::v-deep .uni-swiper-dot-active {
// 指示点元素激活当前选中状态样式
width: 48px;
height: 14px;
background: #28A6B4;
border-radius: 26px 26px 26px 26px;
}

View File

@ -0,0 +1,196 @@
<template>
<view class="pageBox">
<view class="bestFoodBg" v-if="oneIndex==null||name==null">
<image src="../../static/images/bestFoodBg.png" class="bestFoodBg"></image>
</view>
<view class="card" v-else>
<view class="text-center text-bold" style="font-size: 48px;margin-bottom: 28px;color: #17191A;">最佳食物列表
</view>
<block v-if="foodList.length>0">
<block v-for="(item,index) in foodList" :key="index">
<view class="flex-between align-center" @tap="goDetail(item)">
<view class="flex-contion">
<view class="foodImg" style="margin-right: 48px;">
<image :src="item.imgAddress" class="foodImg"></image>
</view>
<view>
<view style="font-size: 44px;font-weight: 500;margin-bottom: 10px;">
{{item.foodsName}}
</view>
<view>
<span class="themColor" style="font-size: 36px;">{{item.energy}}</span>
<span class="themColor" style="font-size: 28px;">千卡</span>
<span style="font-size: 28px;color:#666;">/100</span>
</view>
</view>
</view>
<view class="rightArrow">
<image src="../../static/images/rightArrow.png" class="rightArrow"></image>
</view>
</view>
<view class="cutt"></view>
</block>
<view class="flex justify-center preNext">
<view class="whiteBtn" v-if="query.pageNum>1" @tap="previousPage">上一页</view>
<view class="whiteBtn" v-if="totalWatch" @tap="nextPage">下一页</view>
</view>
</block>
<block v-if="isPageShow&&foodList.length==0">
<view class="nothing">
<image src="../../static/images/nothing.png"></image>
</view>
</block>
</view>
<view class="flex-between" style="margin-top: 40px;">
<block v-for="(item,index) in list" :key="index">
<view :class="['tagWidth flex-conter flex-direction',index==oneIndex?'tagWidthShow':'']"
@tap="oneChane(item,index)">
<view class="text-four" :style="{'color':index==oneIndex?'#fff': '#42444F'}">{{item.name}}</view>
<view class="text-eight" :style="{'color':index==oneIndex?'#fff': '#6E7477'}">{{item.subtitle}}
</view>
</view>
</block>
</view>
<view class="title">疾病选择</view>
<swiper class="swiper" circular indicator-dots indicator-color="#fff" :current="currentIndex"
@change="currentChange">
<block v-for="(item,index) in diseaseList" :key="index">
<swiper-item>
<view class="flex-between flex-wrap">
<view v-for="(item1,index1) in item" :key="index1"
:class="['tag flex-conter',name==item1.diseaseName?'tagShow':'']" @tap="twoChane(item1)">
{{item1.diseaseName}}
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
computed: {
totalWatch() {
return this.query.pageNum * 5 < this.total
}
},
data() {
return {
isPageShow: false, //
list: [{
id: 1,
name: '优选',
subtitle: 'GOOD'
}, {
id: 2,
name: '可食',
subtitle: 'OK'
}, {
id: 3,
name: '限制',
subtitle: 'NO'
}],
oneIndex: null,
currentIndex: 0, //
diseaseList: [],
name: null,
//
foodList: [],
//
query: {
diseaseIds: [],
level: '1',
pageSize: 5, //
pageNum: 1, //
userId: '29',
},
total: 0, //
}
},
onLoad() {
this.getLabel()
},
methods: {
//
getLabel() {
this.$API.selectDictListByFoodList({
data: {
userName: 'admin',
diseaseType: 0,
userId: this.query.userId,
}
}).then(res => {
this.diseaseList = this.getArr(res.data, 8)
})
},
getArr(arr, num) {
let newArr = [...arr] // splice
let list = []
for (let i = 0; i < newArr.length;) {
list.push(newArr.splice(i, num))
}
return list
},
getPageData() {
this.isPageShow = false
this.$API.getDiseaseFoodsLevel({
data: this.query
}).then(res => {
if (res.code = 200) {
this.foodList = res.rows
this.total = res.total
this.$nextTick(() => {
this.isPageShow = true
})
}
})
},
oneChane(item, index) {
if(this.name == null) return toast('请先选择疾病')
this.oneIndex = index
this.query.level = item.id
this.query.pageNum = 1
if (this.name != null) {
this.getPageData()
}
},
twoChane(item1) {
this.name = item1.diseaseName
this.query.diseaseIds[0] = item1.id
this.query.pageNum = 1
if (this.oneIndex != null) {
this.getPageData()
}
},
currentChange(e) {
this.currentIndex = e.detail.current
},
goDetail(item) {
uni.navigateTo({
url: '/pages/hairtailScreen/bestFood/detail/detail?id=' + item.id + '&lableName=' + this.list[
this.oneIndex].name
})
},
//
previousPage() {
this.query.pageNum -= 1
this.getPageData()
},
//
nextPage() {
this.query.pageNum += 1
this.getPageData()
},
}
}
</script>
<style scoped lang="scss">
@import './index.scss';
</style>

View File

@ -0,0 +1,140 @@
page {
background: linear-gradient(90deg, #E3F5FF 0%, #ECF8FF 100%);
width: 1080px;
height: 1920px;
}
.pageBox {
padding: 36px 40px;
position: relative;
overflow: hidden;
.homeHide{
$wh:80px;
width: $wh;
height: $wh;
position: absolute;
bottom: 300px;
right: -40px;
image{
width: $wh;
height: $wh;
}
}
.homeShow{
$wh:80px;
width: $wh;
height: $wh;
position: absolute;
bottom: 300px;
right: 20px;
image{
width: $wh;
height: $wh;
}
}
.themColor {
color: #3AAFB8;
}
.card {
padding: 40px 40px 28px 40px;
width: calc(100% - 80px);
height: calc(1732px - 68px);
background: #FFFFFF;
.topTitle{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: bold;
font-size: 48px;
color: #17191A;
text-align: center;
margin-bottom: 44px;
}
.topImg{
width: 100%;
height: 540px;
position: relative;
image{
width: 100%;
height: 100%;
}
.tagWidth{
width: calc(840px - 160px);
height: 118px;
padding: 0 80px;
background: rgba(255,255,255,0.9);
border-radius: 12px 12px 12px 12px;
border: 1px solid #FFFFFF;
position: absolute;
font-size: 36px;
bottom: 40px;
left: 40px;
display: flex;
justify-content: space-between;
align-items: center;
}
.greyColor{
color: #6E7477;
}
.cutt{
width: 2px;
height: 42px;
background: #6E7477;
display: inline-block;
margin-left: 24px;
}
}
.exchange{
$wh:92px;
width: $wh;
height: $wh;
margin: 0 auto;
margin-top: 60px;
margin-bottom: 60px;
image{
width: $wh;
height: $wh;
}
}
.tagBg{
width: calc(100% - 160px);
height: 118px;
background: #89CFD4;
border-radius: 12px;
font-size: 36px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 80px;
margin-bottom: 48px;
.cutt{
width: 2px;
height: 42px;
background: rgba(255,255,255,0.4);
display: inline-block;
margin-left: 24px;
}
.colorWhite{
color: rgba(255,255,255,0.8);
}
}
.bottomTitle{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32px;
color: $uni-color;
text-align: center;
}
}
.bottomBack{
width: 100%;
line-height: 76px;
text-align: center;
background: rgba(255,255,255,0.4);
border-radius: 38px;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 24px;
color: #17191A;
margin-top: 28px;
}
}

View File

@ -0,0 +1,94 @@
<template>
<view class="pageBox" v-if="pageShow">
<view class="card">
<scroll-view scroll-y style="height: 100%;">
<view class="topTitle">{{fomeData.foodTypeName}}食物列表</view>
<view class="topImg">
<image :src="fomeData.foodIcon"></image>
<view class="tagWidth">
<view class="flex align-center">
<text style="color: #42444F;">{{fomeData.foodName}}</text>
<text class="cutt"></text>
</view>
<view class="greyColor">100g</view>
<view class="greyColor">{{fomeData.foodKcal}}{{fomeData.foodUnit}}</view>
</view>
</view>
<view class="exchange">
<image src="../../static/images/exchange.png"></image>
</view>
<block v-for="(item,index) in fomeData.foodInfos" :key="index">
<view class="tagBg">
<view class="flex align-center">
<text style="color: #fff;">{{item.foodName}}</text>
<text class="cutt"></text>
</view>
<view class="colorWhite">100g</view>
<view class="colorWhite">{{item.foodKcal}}{{item.foodUnit}}</view>
</view>
</block>
<view class="bottomTitle">热量合计{{fomeData.foodKcalSum}}千卡</view>
</scroll-view>
</view>
<view class="bottomBack" @tap="back">返回上一页</view>
<view class="homeHide" v-show="!isHome" @tap="backTap(0)">
<image src="../../static/images/homeHide.png"></image>
</view>
<view class="homeShow" v-show="isHome" @tap="backTap(1)">
<image src="../../static/images/homeShow.png"></image>
</view>
</view>
</template>
<script>
import {
showLoading,
hideLoading,
} from "/tool/index.js"
export default {
data() {
return {
fomeData: {},
id: null, //id
pageShow: false,
isHome: false, //
}
},
onLoad(opt) {
this.id = opt.id
this.getFoodsInfo()
},
methods: {
//
async getFoodsInfo() {
let ret = await this.$API.queryEeFoodInfoDetails({
data: {
id: this.id
}
})
this.fomeData = ret.data || {}
this.$nextTick(() => {
this.pageShow = true
})
},
//
back() {
history.go(-1)
},
//
backTap(e) {
if (e == 0) {
this.isHome = true
} else {
uni.reLaunch({
url: '/pages/hairtailScreen/bestFood/index/index'
})
}
},
}
}
</script>
<style scoped lang="scss">
@import './detail.scss'
</style>

View File

@ -0,0 +1,188 @@
page {
background: linear-gradient(90deg, #E3F5FF 0%, #ECF8FF 100%);
width: 1080px;
height: 1920px;
}
.pageBox {
padding: 40px;
.bestFoodBg {
width: 100%;
height: 1260px;
}
.card {
width: calc(100% - 80px);
height: calc(1260px - 88px);
background: #FFFFFF;
border-radius: 12px;
padding: 48px 40px 40px 40px;
color: #171919;
position: relative;
.preNext{
width: 100%;
position: absolute;
bottom: 40px;
left: 0;
}
.nothing{
$wh:648px;
width: $wh;
height: $wh;
margin: 0 auto;
margin-top: 160px;
image{
width: $wh;
height: $wh;
}
}
.foodImg {
width: 206px;
height: 154px;
}
.themColor {
color: #3AAFB8;
}
.rightArrow {
$wh: 48px;
width: $wh;
height: $wh;
}
.cutt {
width: 100%;
height: 1px;
background: #E9E9E9;
margin: 24px 0 12px;
}
.whiteBtn {
width: 232px;
line-height: 108px;
text-align: center;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 36px;
color: #28A6B4;
}
}
.tagWidth {
width: 317px;
height: 150px;
background: rgba(255, 255, 255, 0.4);
border-radius: 12px;
border: 1px solid #FFFFFF;
.text-four {
font-size: 40px;
}
.text-eight {
font-size: 28px;
}
}
.tagWidthShow {
background: #11ACFF;
}
.tagShow {
color: #FFFFFF;
}
.tagHide{
color: #42444F;
}
.title {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32px;
margin-top: 32px;
}
.tag {
width: 232px;
height: 386px;
background: rgba(255,255,255,0.4);
border-radius: 12px 12px 12px 12px;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32px;
margin-top: 38px;
.iconSelect{
$wh:88px;
width: $wh;
height: $wh;
margin: 0 auto;
image{
width: 100%;
height: 100%;
}
}
.exchangeTag{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.search{
width: 100%;
height: 112px;
position: relative;
margin-top: 40px;
display: flex;
align-items: center;
image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.inputClass{
width: 100%;
height: 100%;
font-size: 40px;
padding-left: 40px;
}
.searchTitle{
position: absolute;
right: 66px;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 52px;
color: #FFFFFF;
}
}
}
//设置轮播的指示点大小
::v-deep .uni-swiper-dots {
// 指示点整个区域
bottom: 0;
}
::v-deep .uni-swiper-dot {
// 指示点元素默认样式
width: 14px;
height: 14px;
}
::v-deep .uni-swiper-dot-active {
// 指示点元素激活当前选中状态样式
width: 48px;
height: 14px;
background: #28A6B4;
border-radius: 26px 26px 26px 26px;
}

View File

@ -0,0 +1,164 @@
<template>
<view class="pageBox">
<view class="bestFoodBg" v-if="!isPage">
<image src="../../static/images/exchangeBg.png" class="bestFoodBg"></image>
</view>
<view class="card" v-else>
<view class="text-center text-bold" style="font-size: 48px;margin-bottom: 28px;color: #17191A;">
<text v-if="selectIndex!=null">{{diseaseList[selectIndex].foodType}}</text>食物列表
</view>
<block v-if="foodList.length>0">
<block v-for="(item,index) in foodList" :key="index">
<view class="flex-between align-center" @tap="goDetail(item)">
<view class="flex-contion">
<view class="foodImg" style="margin-right: 48px;">
<image :src="item.foodIcon" class="foodImg"></image>
</view>
<view>
<view style="font-size: 44px;font-weight: 500;margin-bottom: 10px;">{{item.foodName}}
</view>
<view>
<span class="themColor" style="font-size: 36px;">{{item.foodKcal}}</span>
<span class="themColor" style="font-size: 28px;">千卡</span>
<span style="font-size: 28px;color:#666;">/100</span>
</view>
</view>
</view>
<view class="rightArrow">
<image src="../../static/images/rightArrow.png" class="rightArrow"></image>
</view>
</view>
<view class="cutt"></view>
</block>
<view class="flex justify-center preNext">
<view class="whiteBtn" v-if="pageNum>1" @tap="previousPage">上一页</view>
<view class="whiteBtn" v-if="totalWatch" @tap="nextPage">下一页</view>
</view>
</block>
<block v-if="isPageShow&&foodList.length==0">
<view class="nothing">
<image src="../../static/images/nothing.png"></image>
</view>
</block>
</view>
<view class="search">
<image src="../../static/images/search.png"></image>
<input placeholder="搜索您想要的食物" class="inputClass" v-model="contentText" @input="input" maxlength="17" />
<view class="searchTitle" @tap="searchChange">搜索</view>
</view>
<view class="flex-between flex-wrap">
<view v-for="(item,index) in diseaseList" :key="index"
:class="['tag flex-conter bg-video',selectIndex==index?'tagShow':'tagHide']"
@tap="twoChane(item,index)">
<image v-if="selectIndex==index" src="../../static/images/exchangeTag.png" class="exchangeTag">
</image>
<view class="bg-video text-center">
<view class="iconSelect">
<image :src="selectIndex==index?item.iconNotSelect:item.iconSelect"></image>
</view>
<view style="margin-top: 16px;">{{item.foodType}}</view>
<view :style="{fontSize:'20px',color:(selectIndex==index?'rgba(255,255,255,0.6)':'')}">
{{item.english}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
computed: {
totalWatch() {
return this.pageNum * 5 < this.total
}
},
data() {
return {
diseaseList: [],
//
foodList: [],
contentText: '', //
typeCode: '', //id
selectIndex: null, //
pageSize: 5,
pageNum: 1,
isPage: false,
total: 0, //
isPageShow: false, //
}
},
onLoad() {
this.$API.queryEeFoodType({
data: {
userId: 29
}
}).then(res => {
this.diseaseList = res.data
})
},
methods: {
//
twoChane(item, index) {
this.selectIndex = index
this.typeCode = item.id
this.pageNum = 1
this.getPageData()
},
//
getPageData() {
this.isPageShow = false
this.isPage = true
this.$API.queryEeFoodInfo({
data: {
foodType: this.typeCode, //
foodName: this.contentText, //
pageNum: this.pageNum,
pageSize: this.pageSize,
}
}).then(res => {
if (res.code == 200) {
this.foodList = res.rows
this.total = res.total
this.$nextTick(() => {
this.isPageShow = true
})
}
})
},
// input
input(e) {
this.contentText = e.detail.value
},
//
searchChange() {
this.pageNum = 1
this.getPageData()
},
goDetail(item) {
uni.navigateTo({
url: '/pages/hairtailScreen/exchangePortion/detail/detail?id=' + item.id
})
},
//
previousPage() {
this.pageNum -= 1
this.getPageData()
},
//
nextPage() {
this.pageNum += 1
this.getPageData()
},
}
}
</script>
<style scoped lang="scss">
@import './index.scss';
</style>

View File

@ -0,0 +1,252 @@
page {
background: linear-gradient(90deg, #E3F5FF 0%, #ECF8FF 100%);
width: 1080px;
height: 1920px;
}
.pageBox {
padding: 36px 40px;
position: relative;
overflow: hidden;
.homeHide{
$wh:80px;
width: $wh;
height: $wh;
position: absolute;
bottom: 300px;
right: -40px;
image{
width: $wh;
height: $wh;
}
}
.homeShow{
$wh:80px;
width: $wh;
height: $wh;
position: absolute;
bottom: 300px;
right: 20px;
image{
width: $wh;
height: $wh;
}
}
.themColor {
color: #3AAFB8;
}
.card {
padding: 40px 40px 28px 40px;
width: calc(100% - 80px);
height: calc(1624px - 68px);
background: #FFFFFF;
.imgAddress{
width: 206px;
height: 154px;
margin-right: 46px;
}
.titleInter{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 44px;
color: #171919;
margin-bottom: 16px;
}
.tag{
min-width: 48px;
line-height: 80px;
background: #89CFD4;
border-radius: 8px;
padding: 0 8px;
font-size: 32px;
color: #FFFFFF;
margin-right: 12px;
}
.topImg{
width: 502px;
height: 290px;
margin-right: 32px;
border-radius: 16px;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
}
.leftWidth{
padding: 0 8px;
height: 48px;
line-height: 48px;
text-align: center;
background: #3AAFB8;
border-radius: 8px;
font-size: 32px;
color: #FFFFFF;
margin-right: 12px;
margin-top: 10px;
}
.nameTitle{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 48px;
}
.lowHeat{
width: 48px;
height: 62px;
}
::v-deep .uni-progress-bar {
// 这主要是加上deep才能改变它原来的样式
border-radius: 50px !important;
overflow: hidden;
}
::v-deep .uni-progress-inner-bar{
background: linear-gradient( 90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50px !important;
overflow: hidden;
}
.titleOne{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 40px;
color: #17191A;
padding-top: 60px;
}
.item {
border-bottom: 1px solid #EBEDF0;
padding: 32px 0;
}
.left{
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 32px;
color: #17191A;
margin-right: 32px;
}
.right{
font-size: 32px;
color: #3F4040;
}
.yuan{
width: 12px;
height: 12px;
border-radius: 50%;
margin-right: 6px;
margin-bottom: 4px;
display: inline-block;
}
.dataList {
color: #17191A;
font-size: 32px;
.title {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 40px;
color: #17191A;
margin-top: 60px;
margin-bottom: 32px;
}
.cut{
margin: 32px 0;
width: 100%;
height: 1px;
background: #EBEDF0;
}
.right {
color: $uni-color;
}
.tags {
display: flex;
flex-wrap: wrap;
span {
padding: 0 20rpx;
margin:0 30rpx 30rpx 0;
height: 48rpx;
line-height: 48rpx;
border-radius: 10rpx;
}
}
.audio {
width: 100%;
margin-bottom: 30rpx;
audio {
width: 100%;
}
}
.context {
line-height: 44rpx;
margin-bottom: 30rpx;
padding-bottom: 30rpx;
}
.imageBox {
width: 100%;
image {
width: 100%;
border-radius: 20rpx;
margin-bottom: 30rpx;
}
}
}
}
.bottomSelect {
width: 100%;
height: 120px;
position: relative;
display: flex;
.bottomImg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
image {
width: 100%;
height: 100%;
}
}
.lineHeight{
flex: 1;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
.title {
font-size: 36px;
color: #333333;
}
.titleShow {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 40px;
color: #3AAFB8;
}
.tagWidth {
width: 160px;
height: 4px;
background: #3AAFB8;
margin-top: 12px;
}
}
.bottomBack{
width: 100%;
line-height: 76px;
text-align: center;
background: rgba(255,255,255,0.4);
border-radius: 38px;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 24px;
color: #17191A;
margin-top: 28px;
}
}

View File

@ -0,0 +1,156 @@
<template>
<view class="pageBox" v-if="pageShow">
<view class="card flex flex-direction">
<view class="flex justify-between">
<view class="topImg">
<image :src="fomeData.imgAddress"></image>
</view>
<view class="flex-sub flex justify-between flex-direction" style="margin: 24px 0 12px;">
<view class="flex">
<view class="leftWidth">{{tagLable}}</view>
<view class="nameTitle flex-sub">{{fomeData.dishName}}</view>
</view>
<view>
<span class="themColor" style="font-size: 36px;">{{fomeData.heatAmount}}</span><span
class="themColor" style="font-size: 28px;">千卡</span
style="font-size: 28px;color:#666;"><span>/100</span>
</view>
<view class="flex">
<image src="../../static/images/lowHeat.png" class="lowHeat" style="margin-right: 8px;"></image>
<view class="flex-sub" style="margin-top: 15px;">
<progress :percent="fomeData.percentage" stroke-width="8" activeColor="#36AAB1"
backgroundColor="#E5FDFF" ></progress>
</view>
<image src="../../static/images/highHeat.png" class="lowHeat" style="margin-left: 8px;"></image>
</view>
</view>
</view>
<scroll-view scroll-y class="flex-sub" style="height: 0;">
<block v-if="imgIndex==0">
<block v-for="(item,index) in fomeData.nutrientInfo" :key="index">
<view class="dataList" :style="{borderRadius:index==0?'0 0 20rpx 20rpx':''}"
v-if="item.info.length!=0">
<view class="title">{{item.name}}</view>
<block v-for="(v,i) in item.info" :key="i">
<view class="flex-between">
<view class="left">{{v.nutrientName}}</view>
<view class="right">{{v.nutrientValue}} {{v.company?v.company:''}}</view>
</view>
<view class="cut" v-if="i<item.info.length-1"></view>
</block>
</view>
<view class="dataList" style="border-radius: 0 0 20rpx 20rpx">
<view class="c_list_null" v-if="!fomeData.nutrientInfo.length">
<image src="/static/images/nth2.png" class="nth_image" mode="widthFix" />
<text class="text">暂无数据~</text>
</view>
</view>
</block>
</block>
<block v-else>
<view style="padding-top: 24px;"></view>
<block v-for="(item,index) in fomeData.dishInfo" :key="index">
<view class="flex align-center" style="margin-top: 36px;">
<image :src="item.imgAddress" class="imgAddress"></image>
<view>
<view class="titleInter">{{item.dishName}}</view>
<view v-if="item.tags" class="flex flex-wrap">
<view v-for="(item2,index2) in item.tags.split('、')" class="tag">{{item2}}</view>
</view>
</view>
</view>
</block>
</block>
</scroll-view>
</view>
<view class="bottomSelect">
<view class="bottomImg">
<image
:src="imgIndex==0?'https://sharkbaby.yhy.ren/leftBg.png':'https://sharkbaby.yhy.ren/rightBg.png'">
</image>
</view>
<view class="bg-video lineHeight" @tap="selectChange(0)">
<view :class="['title',imgIndex==0?'titleShow':'']">营养成分</view>
<view class="tagWidth" v-if="imgIndex==0"></view>
</view>
<view class="bg-video lineHeight" @tap="selectChange(1)">
<view :class="['title',imgIndex==1?'titleShow':'']">菜品搭配</view>
<view class="tagWidth" v-if="imgIndex==1"></view>
</view>
</view>
<view class="bottomBack" @tap="back">返回上一页</view>
<view class="homeHide" v-show="!isHome" @tap="backTap(0)">
<image src="../../static/images/homeHide.png"></image>
</view>
<view class="homeShow" v-show="isHome" @tap="backTap(1)">
<image src="../../static/images/homeShow.png"></image>
</view>
</view>
</template>
<script>
import {
showLoading,
hideLoading,
} from "/tool/index.js"
export default {
data() {
return {
imgIndex: 0,
tagLable: '',
fomeData: {},
id: null, //id
userId: '29',
pageShow: false,
isHome: false, //
}
},
onLoad(opt) {
this.tagLable=opt.lableName
this.id = opt.id
this.getFoodsInfo()
},
methods: {
selectChange(index) {
this.imgIndex = index
},
//
async getFoodsInfo() {
let ret = await this.$API.selectFoodsInfo({
data: {
foodsId: this.id,
userId: this.userId
}
})
// 0
if (ret.data.nutrientInfo.length != 0) {
ret.data.nutrientInfo.forEach((item, index) => {
item.info = item.info.filter((item1) => item1.nutrientValue !== 0);
});
}
this.fomeData = ret.data || {}
this.$nextTick(() => {
this.pageShow = true
})
},
//
back() {
history.go(-1)
},
//
backTap(e) {
if (e == 0) {
this.isHome = true
} else {
uni.reLaunch({
url: '/pages/hairtailScreen/foodIngredients/index/index'
})
}
},
}
}
</script>
<style scoped lang="scss">
@import './detail.scss'
</style>

View File

@ -0,0 +1,191 @@
page {
background: linear-gradient(90deg, #E3F5FF 0%, #ECF8FF 100%);
width: 1080px;
height: 1920px;
}
.pageBox {
padding: 40px;
.bestFoodBg {
width: 100%;
height: 1260px;
}
.card {
width: calc(100% - 80px);
height: calc(1260px - 88px);
background: #FFFFFF;
border-radius: 12px;
padding: 48px 40px 40px 40px;
color: #171919;
position: relative;
.preNext{
width: 100%;
position: absolute;
bottom: 40px;
left: 0;
}
.nothing{
$wh:648px;
width: $wh;
height: $wh;
margin: 0 auto;
margin-top: 160px;
image{
width: $wh;
height: $wh;
}
}
.foodImg {
width: 206px;
height: 154px;
}
.themColor {
color: #3AAFB8;
}
.rightArrow {
$wh: 48px;
width: $wh;
height: $wh;
}
.cutt {
width: 100%;
height: 1px;
margin: 24px 0 12px;
}
.whiteBtn {
width: 232px;
line-height: 108px;
text-align: center;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 36px;
color: #28A6B4;
}
}
.tagWidth {
width: 317px;
height: 150px;
background: rgba(255, 255, 255, 0.4);
border-radius: 12px;
border: 1px solid #FFFFFF;
.text-four {
font-size: 40px;
}
.text-eight {
font-size: 28px;
}
}
.tagWidthShow {
background: #11ACFF;
}
.tagShow {
color: #FFFFFF;
}
.tagHide{
color: #42444F;
}
.title {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 32px;
margin-top: 32px;
}
.swiper {
height: 416px;
.tag {
width: 232px;
height: 158px;
background: rgba(255,255,255,0.4);
border-radius: 12px;
border: 1px solid #FFFFFF;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 22px;
margin-top: 24px;
.iconSelect{
$wh:68px;
width: $wh;
height: $wh;
margin: 0 auto;
image{
width: 100%;
height: 100%;
}
}
}
.ingredientsBg{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.search{
width: 100%;
height: 112px;
position: relative;
margin-top: 40px;
display: flex;
align-items: center;
image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.inputClass{
width: 100%;
height: 100%;
font-size: 40px;
padding-left: 40px;
}
.searchTitle{
position: absolute;
right: 66px;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 52px;
color: #FFFFFF;
}
}
}
//设置轮播的指示点大小
::v-deep .uni-swiper-dots {
// 指示点整个区域
bottom: 0;
}
::v-deep .uni-swiper-dot {
// 指示点元素默认样式
width: 14px;
height: 14px;
}
::v-deep .uni-swiper-dot-active {
// 指示点元素激活当前选中状态样式
width: 48px;
height: 14px;
background: #28A6B4;
border-radius: 26px 26px 26px 26px;
}

View File

@ -0,0 +1,180 @@
<template>
<view class="pageBox">
<view class="bestFoodBg" v-if="!isPage&&name==null">
<image src="../../static/images/ingredients.png" class="bestFoodBg"></image>
</view>
<view class="card" v-else>
<view class="text-center text-bold" style="font-size: 48px;margin-bottom: 28px;color: #17191A;">
<text v-if="name!=null">{{name}}</text>食物列表
</view>
<block v-if="foodList.length>0">
<block v-for="(item,index) in foodList" :key="index">
<view class="flex-between align-center" @tap="goDetail(item)">
<view class="flex-contion">
<view class="foodImg" style="margin-right: 48px;">
<image :src="item.imgAddress" class="foodImg"></image>
</view>
<view>
<view style="font-size: 44px;font-weight: 500;margin-bottom: 10px;">{{item.foodsName}}
</view>
<view>
<span class="themColor" style="font-size: 36px;">{{item.energy}}</span>
<span class="themColor" style="font-size: 28px;">千卡</span>
<span style="font-size: 28px;color:#666;">/100</span>
</view>
</view>
</view>
<view class="rightArrow">
<image src="../../static/images/rightArrow.png" class="rightArrow"></image>
</view>
</view>
<view class="cutt"></view>
</block>
<view class="flex justify-center preNext">
<view class="whiteBtn" v-if="pageNum>1" @tap="previousPage">上一页</view>
<view class="whiteBtn" v-if="totalWatch" @tap="nextPage">下一页</view>
</view>
</block>
<block v-if="isPageShow&&foodList.length==0">
<view class="nothing">
<image src="../../static/images/nothing.png"></image>
</view>
</block>
</view>
<view class="search">
<image src="../../static/images/search.png"></image>
<input placeholder="搜索您想要的食物" class="inputClass" v-model="contentText" @input="input" maxlength="17" />
<view class="searchTitle" @tap="searchChange">搜索</view>
</view>
<swiper class="swiper" circular indicator-dots indicator-color="#fff">
<block v-for="(item,index) in diseaseList" :key="index">
<swiper-item>
<view class="flex-between flex-wrap">
<view v-for="(item1,index1) in item" :key="index1"
:class="['tag flex-conter bg-video',name==item1.typeName?'tagShow':'tagHide']"
@tap="twoChane(item1)">
<image v-if="name==item1.typeName" src="../../static/images/ingredientsBg.png"
class="ingredientsBg"></image>
<view class="bg-video text-center">
<view class="iconSelect">
<image :src="name==item1.typeName?item1.imgUrl:item1.imgUrl1"></image>
</view>
<view style="margin-top: 16px;">{{item1.typeName}}</view>
<view
:style="{fontSize:'16px',color:(name==item1.typeName?'rgba(255,255,255,0.6)':'')}">
{{item1.engName}}
</view>
</view>
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
computed: {
totalWatch() {
return this.pageNum * 5 < this.total
}
},
data() {
return {
diseaseList: [],
name: null,
//
foodList: [],
contentText: '', //
typeCode: '', //id
pageSize: 5,
pageNum: 1,
isPage: false,
total: 0, //
isPageShow: false, //
}
},
onLoad() {
this.$API.getFoodTypes({
data: {
userId: 29
}
}).then(res => {
this.diseaseList = this.getArr(res.rows, 8)
})
},
methods: {
getArr(arr, num) {
let newArr = [...arr] // splice
let list = []
for (let i = 0; i < newArr.length;) {
list.push(newArr.splice(i, num))
}
return list
},
//
twoChane(item1) {
this.name = item1.typeName
this.typeCode = item1.typeCode
this.pageNum = 1
this.getPageData()
},
//
getPageData() {
this.isPageShow = false
this.$API.selectFoodsList({
data: {
foodType: this.typeCode,
foodsInfo: this.contentText,
pageNum: this.pageNum,
pageSize: this.pageSize,
}
}).then(res => {
if (res.code == 200) {
this.foodList = res.rows
this.total = res.total
this.$nextTick(() => {
this.isPageShow = true
})
}
})
},
// input
input(e) {
this.contentText = e.detail.value
},
//
searchChange() {
this.pageNum = 1
this.isPage = true
this.getPageData()
},
goDetail(item) {
uni.navigateTo({
url: '/pages/hairtailScreen/foodIngredients/detail/detail?id=' + item.id + '&lableName=' + item
.typeName
})
},
//
previousPage() {
this.pageNum -= 1
this.getPageData()
},
//
nextPage() {
this.pageNum += 1
this.getPageData()
},
}
}
</script>
<style scoped lang="scss">
@import './index.scss';
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,239 @@
.pageBox{
.bgBackground {
position: fixed;
top: 0;
right: 0;
z-index: 1;
width: 100vw;
height: 606rpx;
background: linear-gradient(145deg, #E4F5EB 0%, rgba(228, 245, 235, 0) 100%);
}
.themColor{
color: $uni-color;
}
.fontColor {
color: #17191A;
}
.contioner {
padding:58rpx 32rpx 32rpx;
position: relative;
z-index: 2;
color: #3F4040;
.riskFactor{
background: #FFFFFF;
border-radius: 16rpx;
margin-left: 12rpx;
.leftColor{
color: #3F4040;
}
.rightColor{
color: #8E9AAB;
}
.table{
background: #EBF7F8;
padding: 20rpx 0;
}
.tableList{
.line{
border-bottom: 2rpx solid #EEEEEE;
padding: 20rpx 0;
&:first-child{
border-left: 2rpx solid #EEEEEE;
border-right: 2rpx solid #EEEEEE;
}
&:nth-last-child(1){
border-left: 2rpx solid #EEEEEE;
border-right: 2rpx solid #EEEEEE;
}
}
}
}
.dotocr {
position: absolute;
top: 0;
right: 10rpx;
width: 360rpx;
height: 488rpx;
z-index: -1;
}
.topWidth {
width: 100%;
height: 32rpx;
background: #FFFFFF;
border: 7rpx solid #6ACBD1;
border-radius: 40rpx;
margin-top: 48rpx;
}
.whiteShaw {
width: calc(100% -24rpx);
background: #FFFFFF;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0, 0, 0, 0);
margin-top: -28rpx;
margin-left: 12rpx;
.topBg {
width: 100%;
height: 32rpx;
background: linear-gradient(180deg, rgba(56, 176, 184, 0.30) 0%, rgba(56, 176, 184, 0.00) 100%);
}
.contonentPadding {
padding: 16rpx 20rpx 32rpx;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0,0,0,0.1);
.planImg{
width: 100%;
height: 240rpx;
border-radius: 20rpx;
margin-top: 24rpx;
}
.sector{
width: 100%;
height: 280rpx;
}
.titlePoastion{
position: absolute;
bottom: 12rpx;
left: 48%;
transform: translateX(-50%);
.topTitle{
font-size: 56rpx;
color: #3AAFB8;
font-weight: bold;
}
.bottomTitle{
font-size: 24rpx;
color: #909292;
}
}
}
}
.leftTagOne{
width: 144rpx;
height: 16rpx;
background: linear-gradient(360deg, #38B0B8 0%, rgba(56,176,184,0) 100%);
}
.leftTagTwo{
width: 252rpx;
height: 16rpx;
background: linear-gradient(360deg, #38B0B8 0%, rgba(56,176,184,0) 100%);
}
}
.riskResults{
background: #FFFFFF;
border-radius: 20rpx;
margin-left: 12rpx;
.replace{
background: #EBF7F8;
border-radius: 20rpx;
padding: 24rpx 32rpx;
}
.leftColor{
color: #112950;
}
.rightColor{
color: #8E9AAB;
}
.charts-box {
width: 630rpx;
height: 600rpx;
}
.locationOne{
margin-left: 10%;
}
.locationTwo{
margin-left: 36%;
}
.locationThree{
margin-left: 60%;
}
.locationFour{
margin-left: 85%;
}
.location{
width: 0;
height: 0;
border-top: 20rpx solid #009DFF;
border-right: 16rpx solid transparent;
border-left: 16rpx solid transparent;
margin-bottom: 12rpx;
}
.progress{
height: 12rpx;
&:first-child{
border-radius: 50rpx 0rpx 0rpx 50rpx;
}
&:nth-last-child(1){
border-radius: 0 50rpx 50rpx 0;
}
}
}
.tagWidth {
display: inline-block;
width: 6rpx;
height: 32rpx;
background: #3AAFB8;
border-radius: 50rpx;
margin-right: 12rpx;
}
.preventionPoints{
background: #FFFFFF;
border-radius: 20rpx;
margin-left: 12rpx;
.grey {
display: inline-block;
white-space:pre-wrap;
color: #909292;
text-indent: 1rem;
line-height: 46rpx;
letter-spacing: 2rpx;
font-size: 30rpx;
}
.cutt{
width: 100%;
height: 1rpx;
background: #eee;
margin: 30rpx 0;
}
}
.bottomBtn{
position: fixed;
bottom: 0;
width: 100%;
height: 120rpx;
background: #FFFFFF;
.btn{
width: 686rpx;
height: 84rpx;
line-height: 84rpx;
text-align: center;
background: $uni-color;
border-radius: 42rpx;
color: #FFFFFF;
}
}
.btnBottom{
width: 100vw;
background-color: #fff;
box-shadow: 0 0 10rpx rgba(0, 0, 0, .1);
display: flex;
align-items: center;
height: 110rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.btn{
color: #fff;
text-align: center;
line-height: 80rpx;
background-color: $uni-color;
border-radius: 8rpx;
flex: 1;
margin: 0 20rpx;
}
}
}

View File

@ -0,0 +1,235 @@
<template>
<view class="pageBox" v-if="isShow">
<view class="bgBackground"></view>
<view class="contioner">
<view class="fontColor">{{realName}}</view>
<view class="fontColor text-bold text-xl marginTop-sm">欢迎开启您的专属健康报告</view>
<image src="https://sharkbaby.yhy.ren/maskGroup.png" class="dotocr"></image>
<view class="topWidth"></view>
<view class="whiteShaw color">
<view class="topBg"></view>
<view class="contonentPadding">
<view class="text-xl text-bold">评估结果</view>
<view class="bg-video">
<image class="sector"
:src="evaluationIndex==0?'https://sharkbaby.yhy.ren/range.png':evaluationIndex==1?'https://sharkbaby.yhy.ren/sameAs.png':'https://sharkbaby.yhy.ren/goodTwo.png'">
</image>
<view class="titlePoastion text-center">
<view class="topTitle">{{formeDate.nowRiskValue}}</view>
<view class="bottomTitle">我的健康分</view>
</view>
</view>
</view>
</view>
<!-- 各维度健康报告 -->
<!-- <view class="riskResults marginTop-sm padding marginBottom-sm">
<view class="text-xl text-bold">各维度健康报告</view>
<view class="leftTagTwo marginBottom"></view>
<block v-for="(item,index) in formeDate.listMap" :key="index">
<view class="replace text-sm marginBottom-sm">
<view class="marginBottom-sm">{{item.name}}</view>
<view class="location"
:class="formeDate.listMap[index].level==1?'locationOne':formeDate.listMap[index].level==2?'locationTwo':formeDate.listMap[index].level==3?'locationThree':'locationFour'">
</view>
<view class="flex-contion text-xs marginBottom-sm">
<block v-for="(item1,index1) in formeDate.listMap" :key="index1">
<block v-if="index1<4">
<view class="flex-sub progress" :style="{background:item1.bgColor}">
</view>
</block>
</block>
</view>
<view class="flex-contion text-xs text-center">
<block v-for="(item2,index2) in formeDate.listMap" :key="index2">
<block v-if="index2<4">
<view class="flex-sub">{{item2.proressName}}</view>
</block>
</block>
</view>
</view>
</block>
</view> -->
<!-- 习惯分析 -->
<view class="riskFactor marginTop-lg padding">
<view class="flex-contion marginBottom">
<text class="tagWidth"></text>
<text class="leftColor text-xl text-bold">习惯分析</text>
</view>
<view class="flex table text-lg text-bold">
<view class="flex-sub text-center">习惯类别</view>
<view class="flex-sub text-center">个数</view>
<view class="flex-sub text-center">内容</view>
</view>
<block v-for="(item1,index1) in formeDate.habitList" :key="index1">
<view class="tableList flex text-sm">
<view class="line flex-sub flex-conter" style="color: #3F4040;">{{item1.habitType}}</view>
<view class="line flex-sub flex-conter" :style="{'color':index1==0?'#3F4040':'#FF7B7B'}">
{{item1.score}}</view>
<view class="line flex-sub text-center" style="color: #17191A;">{{item1.habitName}}</view>
</view>
</block>
</view>
<block v-if="formeDate.assessList.length>0">
<!-- 相关风险因素 -->
<view class="riskFactor marginTop-sm padding">
<view class="flex-contion marginBottom">
<text class="tagWidth"></text>
<text class="leftColor text-xl text-bold">可改变的危险因素</text>
</view>
<view class="flex table text-lg text-bold">
<view class="flex-sub text-center">危险因素</view>
<view class="flex-sub text-center">本次评估</view>
<view class="flex-sub text-center">理想水平</view>
</view>
<block v-for="(item1,index1) in formeDate.assessList" :key="index1">
<view class="tableList flex text-sm">
<!-- 危险因素 -->
<view class="line flex-sub flex-conter" style="color: #17191A;">{{item1.name}}</view>
<!-- 本次评估 -->
<view class="line flex-sub flex-conter" style="color:#D95959">
{{item1.newAssess}}
</view>
<!-- 理想水平 -->
<view class="line flex-sub text-center" style="color: #3F4040;">{{item1.idealValue}}</view>
</view>
</block>
</view>
<view class="preventionPoints padding marginTop" v-if="formeDate.suggest.length!=0">
<view class="text-xl text-bold">目前状况</view>
<view class="leftTagOne marginBottom"></view>
<block v-for="(item,index) in formeDate.suggest" :key="index">
<view class="flex-contion marginBottom-sm">
<text class="tagWidth"></text>
<text class="text-bold">step {{index+1}}</text>
</view>
<view class="marginBottom-sm text-df text-bold">{{item.typeList[0]}}</view>
<view class="marginBottom-sm text-df text-bold">{{item.typeList[1]}}</view>
<view class="grey" v-html="item.name" style="text-indent: 2rem;"></view>
<view class="cutt" style="text-indent: 2rem;" v-if="index<formeDate.suggest.length-1"></view>
</block>
</view>
</block>
<view class="preventionPoints padding marginTop">
<view class="text-xl text-bold">评估建议</view>
<view class="leftTagOne marginBottom"></view>
<view class="grey">{{formeDate.riskDesc}}</view>
</view>
</view>
<view class="btnBottom">
<view class="btn" @tap="goPage">查看个人自主计划</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
//
realName: '',
//
formeDate: {},
userParameters: {}, //
//
evaluationIndex: null,
isShow: false, //
memberId: '',
userId: '',
}
},
onLoad(opt) {
let a = {
userId: '7692',
headSculpture: 'https://sharkbaby.yhy.ren/0042fab3c00f4fae80e3d2b732a0596a.jpg',
name: '的',
memberId: '0',
}
console.log(JSON.stringify(a))
let data = JSON.parse(decodeURIComponent(opt.params))
if (data.userParameters) {
this.userParameters = JSON.parse(data.userParameters)
} else {
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
}
// memberId0
if (data.memberId != '0') {
this.userParameters.userId = data.memberId
} else {
this.userParameters.userId = data.userId //id
}
}
this.memberId = data.memberId // 0 id
this.realName = data.name // 0 id
this.getInfo()
},
methods: {
getInfo() {
let that = this
showLoading('加载中...')
that.$API.getDiseaseResult({
data: {
diseaseId: '95',
...this.userParameters,
}
}).then((res) => {
that.formeDate = res.data
let index;
let score = Number(res.data.nowRiskValue)
if (score >= 0 && score < 42) {
index = 0
} else if (score >= 42 && score <= 68) {
index = 1
} else {
index = 2
}
this.evaluationIndex = index
that.$set(that, 'isShow', true)
if (res.data.listMap.length == 7) {
res.data.listMap[0].bgColor = "#009DFF"
res.data.listMap[1].bgColor = "#3AAFB8"
res.data.listMap[2].bgColor = "#FDA92A"
res.data.listMap[3].bgColor = "#F87C7C"
res.data.listMap[0].proressName = "健康"
res.data.listMap[1].proressName = "低风险"
res.data.listMap[2].proressName = "中风险"
res.data.listMap[3].proressName = "高风险"
}
if (res.data.suggest.length > 0) {
res.data.suggest.map(item => {
item.typeList = item.type.split(" ")
})
}
hideLoading()
})
},
//
backChange() {
uni.navigateBack()
},
//
viewPlan() {
setTimeout(() => {
uni.reLaunch({
url: '/pages/tabBar/project/project'
})
}, 0)
},
//
goPage() {
uni.reLaunch({
url: '/pages/selfRegistration/index/index?userId=' + this.userParameters.userId+ "&riskId=" + this.formeDate.id
})
},
}
}
</script>
<style lang="scss" scoped>
@import './basicReport.scss';
</style>

View File

@ -0,0 +1,374 @@
.bgBackground {
position: fixed;
top: 0;
right: 0;
z-index: 1;
width: 100vw;
height: 606rpx;
background: linear-gradient(145deg, #E4F5EB 0%, rgba(228, 245, 235, 0) 100%);
}
.themColor {
color: $uni-color;
}
.rightImg{
$wh:32rpx;
width: $wh;
height: $wh;
}
.contioner {
padding: 32rpx;
position: relative;
z-index: 2;
color: #3F4040;
.avter {
$wh: 64rpx;
width: $wh;
height: $wh;
margin-right: 20rpx;
border-radius: 50%;
}
.dotocr {
width: 218rpx;
height: 212rpx;
}
.topWidth {
width: 100%;
height: 32rpx;
background: #FFFFFF;
border: 7rpx solid #6ACBD1;
border-radius: 40rpx;
}
.whiteShaw {
width: calc(100% -24rpx);
background: #FFFFFF;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0, 0, 0, 0);
margin: -28rpx 0 50rpx 12rpx;
.topBg {
width: 100%;
height: 32rpx;
background: linear-gradient(180deg, rgba(56, 176, 184, 0.30) 0%, rgba(56, 176, 184, 0.00) 100%);
}
.contonentPadding {
padding: 16rpx 20rpx 32rpx;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0,0,0,0.1);
.gardenClass{
position: absolute;
left: 0;
bottom: -20rpx;
width: 100%;
.circle3 {
width: 44rpx;
height: 22rpx;
border-radius: 0 0 50rpx 50rpx;
background: #FFFFFF;
}
}
.tabClass{
width: 480rpx;
height: 80rpx;
margin: 0 auto;
margin-bottom: 32rpx;
background: #EBF7F8;
border-radius: 16rpx;
color: #3F4040;
font-size: 36rpx;
display: flex;
justify-content: space-between;
align-items: center;
.whiteBg{
width: 228rpx;
margin: 0 8rpx;
line-height: 68rpx;
text-align: center;
background: #FFFFFF;
border-radius: 16rpx;
color: $uni-color;
}
}
.seriesTag{
width: 160rpx;
text-align: center;
height: 80rpx;
line-height: 80rpx;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
color: #FFFFFF;
border-radius: 0 50rpx 50rpx 0;
}
.assressTag{
display: inline-block;
padding: 2rpx 8rpx;
background: #E8FDFF;
border-radius: 8rpx;
color: $uni-color;
font-size: 36rpx;
margin-top: 16rpx;
}
.greyBg{
text-indent: 2rem;
padding: 24rpx 20rpx;
background: #EBF7F8;
border-radius: 16rpx;
font-size: 28rpx;
color: #3F4040;
margin-top: 32rpx;
}
.srcoll{
width: calc(100% - 60rpx);
white-space: nowrap;
padding: 0 30rpx;
}
.tagBg{
display: inline-block;
padding: 0 20rpx;
height: 60rpx;
line-height: 60rpx;
background: #F6F6F6;
border-radius: 50rpx;
color: #909292;
margin-right: 14rpx;
}
.tagBgShaw{
border: 2rpx solid #3AAFB8;
color: #3F4040;
}
.chartsBox{
width: 400rpx;
height: 400rpx;
}
}
}
}
.pageBox {
.tagWidth {
display: inline-block;
width: 6rpx;
height: 32rpx;
background: #3AAFB8;
border-radius: 50rpx;
margin-right: 12rpx;
}
.riskResults {
background: #FFFFFF;
margin-left: 12rpx;
border-radius: 16rpx;
.leftColor {
color: #112950;
}
.rightColor {
color: #8E9AAB;
}
.charts-box {
width: 630rpx;
height: 500rpx;
}
.location {
width: 34rpx;
height: 42rpx;
}
.progress {
height: 12rpx;
margin-right: 2rpx;
&:first-child {
border-radius: 50rpx 0rpx 0rpx 50rpx;
}
&:nth-last-child(1) {
border-radius: 0 50rpx 50rpx 0;
margin-right: 0rpx;
}
}
.lifeStyle {
padding: 20rpx 30rpx;
background: #EBF7F8;
border-radius: 20rpx;
.leftColor {
color: #17191A;
}
.rightColor {
color: #ECA13B;
}
.fontColor {
color: #3F4040;
}
.lineHeight {
line-height: 38rpx;
}
}
}
.riskFactor {
background: #FFFFFF;
margin-left: 12rpx;
border-radius: 16rpx;
.leftColor {
color: #17191A;
}
.rightColor {
color: #8E9AAB;
}
.table {
background: #EBF7F8;
padding: 20rpx 0;
color: #17191A;
}
.tableList {
.line {
border-bottom: 2rpx solid #EEEEEE;
padding: 20rpx 0;
color: #17191A;
&:first-child {
border-left: 2rpx solid #E6EFF1;
border-right: 2rpx solid #E6EFF1;
}
&:nth-last-child(1) {
border-left: 2rpx solid #E6EFF1;
border-right: 2rpx solid #E6EFF1;
}
}
}
}
.diseaseProfile {
background: #FFFFFF;
margin-left: 12rpx;
border-radius: 16rpx;
color: #3F4040;
.fontColor {
line-height: 38rpx;
}
}
.preventionPoints {
background: #FFFFFF;
margin-left: 12rpx;
border-radius: 16rpx;
color: #3F4040;
.fontColor {
line-height: 38rpx;
}
.btn {
width: 188rpx;
line-height: 80rpx;
text-align: center;
background: #d8eff1;
border-radius: 50rpx;
color: $uni-color;
font-size: 30rpx;
}
}
.perfect {
background: #FFFFFF;
border-radius: 16rpx;
margin-left: 12rpx;
color: #3F4040;
.title {
color: #112950;
font-size: 32rpx;
}
.circular {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #E93A00;
}
.circular1 {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: $uni-color;
}
.fontColor {
color: #17191A;
}
.rightColor {
color: $uni-color;
}
.cut {
width: 100%;
height: 1rpx;
background: #E9E9E9;
margin-top: 24rpx;
}
}
.text-sm {
font-size: 24rpx;
}
.text-df {
font-size: 28rpx;
}
.text-lg {
font-size: 32rpx;
}
.locationOne {
margin-left: 10%;
}
.locationTwo {
margin-left: 36%;
}
.locationThree {
margin-left: 60%;
}
.locationFour {
margin-left: 85%;
}
.location {
width: 0;
height: 0;
border-top: 20rpx solid #009DFF;
border-right: 16rpx solid transparent;
border-left: 16rpx solid transparent;
margin-bottom: 12rpx;
}
.progress {
height: 12rpx;
margin-right: 2rpx;
&:first-child {
border-radius: 50rpx 0rpx 0rpx 50rpx;
}
&:nth-last-child(1) {
border-radius: 0 50rpx 50rpx 0;
margin-right: 0rpx;
}
}
}

View File

@ -0,0 +1,525 @@
<template>
<view class="pageBox">
<view class="bgBackground"></view>
<view class="contioner" v-if="isShow">
<view class="flex-align">
<view>
<view class="flex-contion">
<image :src="userProfile" class="avter"></image>
<view class="text-bold fontColor">Hi{{userName}}</view>
</view>
<view class="fontColor text-bold text-xl margin-top-xs">欢迎开启您的专属健康报告</view>
</view>
<image src="https://shayu5qny.yhy.ren/dotocr.png" class="dotocr"></image>
</view>
<view class="topWidth"></view>
<view class="whiteShaw color">
<view class="topBg"></view>
<view class="contonentPadding bg-video">
<view class="tabClass">
<view :class="[tabIndex==0?'whiteBg':'flex-sub text-center']" @tap="tabChange(0)">评估详情</view>
<view :class="[tabIndex==1?'whiteBg':'flex-sub text-center']" @tap="tabChange(1)">健康指南</view>
</view>
<block v-if="cardList.length>1">
<scroll-view scroll-x class="srcoll marginBottom" scroll-with-animation
:scroll-left="scrollLeft" @scroll="scroll">
<block v-for="(item,index) in cardList" :key="index">
<view :class="['tagBg',cardIndex==index?'tagBgShaw':'']" @tap="cardChange(index)">
{{item.diseaseName}}
</view>
</block>
</scroll-view>
</block>
<block v-if="tabIndex==0">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">
您的本次评估结果为
<text class="themColor" v-if="title=='肥胖症'">0级</text>
<text v-else
:style="{'color':series==1?'#269452':series==2?'#34BA5F':series==3?'#FFD540':series==4?'#F9BB00':series==5?'#FF6B2E': '#E93A00'}">
{{series==1?'低风险':series==2?'较低风险':series==3?'中等风险':series==4?'较高风险':series==5?'高风险': '疑似已患'}}
</text>
</text>
</view>
<block v-if="title!='肥胖症'">
<view class="flex-align">
<view>
<view class="seriesTag"><text style="font-size: 60rpx;">{{series}}</text></view>
<view style="width: 232rpx;">
<view class="assressTag">{{title}}评估</view>
</view>
</view>
<view class="chartsBox">
<qiun-data-charts type="funnel" :opts="optsFunnel" :chartData="chartDataFunnel" />
</view>
</view>
</block>
<view class="greyBg">{{card.riskInfo}}</view>
<!-- 肥胖症进度条 -->
<view class="card padding" v-if="card.diseaseName=='肥胖症'">
<view class="text-sm marginBottom-sm">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">BMI</text>
</view>
<!-- 位置 -->
<view class="location"
:class="card.nowRiskLevel=='体重消瘦'?'locationOne':card.nowRiskLevel=='体重正常'?'locationTwo':card.nowRiskLevel=='体重超重'?'locationThree':'locationFour'"
src="/pages/assessment/static/images/location.png"></view>
<!-- 进度条 -->
<view class="flex-contion text-xs marginBottom-sm">
<block v-for="(item1,index1) in listMap" :key="index1">
<view class="flex-sub progress" :style="{background:item1.bgColor}"></view>
</block>
</view>
<view class="flex-contion text-xs text-center">
<block v-for="(item2,index2) in listMap" :key="index2">
<view class="flex-sub">{{item2.proressName}}</view>
</block>
</view>
</view>
</view>
</block>
<block v-else>
<!-- 您做的不好的地方请改善 -->
<view class="perfect marginTop-sm">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">您做的不好的地方请改善</text>
</view>
<block v-for="(item1,index1) in healthList.qnameMap.isNoHealth" :key="index1">
<view class="flex-align marginTop" @click="goDetails(item1)">
<view class="flex-contion">
<view class="circular marginRight-sm"></view>
<view class="fontColor text-df">{{item1.riskValue}}</view>
</view>
<image src="../static/images/right.png" class="rightImg"></image>
</view>
<view class="cut" v-if="index1<healthList.qnameMap.isNoHealth.length-1"></view>
</block>
</view>
</block>
<view class="flex gardenClass">
<view v-for="(garden,gardenIndex) in todos" :key="gardenIndex" class="circle3"></view>
</view>
</view>
</view>
<block v-if="tabIndex==0">
<block v-for="(item,index) in cardList" :key="index">
<!-- 风险结果 -->
<view class="riskResults marginTop-sm padding" v-if="index==cardIndex&&card.specialShow!='现已患'">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">风险结果</text>
</view>
<!-- 雷达图 -->
<view class="charts-box" v-if="isChart">
<qiun-data-charts type="radar" inScrollView :opts="opt" :chartData="chartData" canvas2d
@tap="tap" />
</view>
<!-- 生活方式水平 -->
<view class="lifeStyle">
<view class="text-lg marginBottom-sm">
<text class="leftColor text-bold">现有生活方式水平风险</text>
<text class="rightColor text-bold margin-left-xs">{{card.nowRiskLevel}}</text>
</view>
<view class="fontColor lineHeight text-df lettSpacing">
{{card.nowRiskDesc}}
</view>
<view class="text-lg marginBottom-sm marginTop-lg">
<text class="leftColor text-bold">健康生活方式可降低风险</text>
<text class="rightColor text-bold margin-left-xs">{{card.idealRiskLevel}}</text>
</view>
<view class="fontColor lineHeight text-df lettSpacing">
{{card.idealRiskDesc}}
</view>
</view>
</view>
<!-- 相关风险因素 -->
<view class="riskFactor marginTop-sm padding" v-if="index==cardIndex">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">相关危险因素</text>
</view>
<view class="marginTop-lg flex table text-df">
<view class="flex-sub text-center">危险因素</view>
<view class="flex-sub text-center">本次评估</view>
<view class="flex-sub text-center">理想水平</view>
</view>
<block v-for="(item1,index1) in card.assessList" :key="index1">
<view class="tableList flex text-df">
<!-- 危险因素 -->
<view class="line flex-sub text-center">{{item1.name}}</view>
<!-- 本次评估 -->
<view class="line flex-sub text-center"
:style="{'color':item1.isError==1&&item1.name.indexOf('家族史')<0?'#D95959':''}">
{{item1.newAssess}}
</view>
<!-- 理想水平 -->
<view class="line flex-sub text-center">{{item1.idealValue}}</view>
</view>
</block>
</view>
<!-- 疾病简介 -->
<view class="diseaseProfile marginTop-sm padding" v-if="index==cardIndex">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">疾病简介</text>
</view>
<view class="fontColor text-df marginTop-sm lettSpacing">
{{card.diseaseIntroduce}}
</view>
</view>
<!-- 防止要点 -->
<view class="preventionPoints marginTop-sm padding" v-if="index==cardIndex">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">{{(diseaseId != 111 && diseaseId != 106) ? '防治要点' : '指导建议'}}</text>
</view>
<view class="fontColor text-df marginTop-sm lettSpacing" v-if="card.prevent!=null">
{{card.prevent}}
</view>
<view class="flex-align marginTop-lg"
v-if="card.dietUrl!=null||card.motionUrl!=null||card.psychologyUrl!=null">
<view class="btn" @click="guidance(card.dietUrl)" v-if="card.dietUrl!=null">饮食指导</view>
<view class="btn" @click="guidance(card.motionUrl)" v-if="card.motionUrl!=null">运动指导</view>
<view class="btn" @click="guidance(card.psychologyUrl)" v-if="card.psychologyUrl!=null">心理指导
</view>
</view>
</view>
</block>
</block>
<!-- 健康指南显示 -->
<block v-else>
<!-- 达到理想目标风险下降率为 -->
<view class="perfect marginTop-sm padding" v-if="healthList.assessList.length!=0">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">达到理想目标风险下降率为</text>
</view>
<block v-for="(item1,index1) in healthList.assessList" :key="index1">
<view class="flex-align text-df" style="margin-top: 24rpx;">
<view class="leftColor">{{item1.name}}</view>
<view class="rightColor">{{item1.pre}}</view>
</view>
<!-- 分割线 -->
<view class="cut" v-if="index1<healthList.assessList.length-1"></view>
</block>
</view>
<!-- 您做的好的地方请保持 -->
<view class="perfect marginTop-sm padding">
<view class="flex-contion marginBottom-sm text-xl">
<text class="tagWidth"></text>
<text class="text-bold">您做的好的地方请保持</text>
</view>
<block v-for="(item1,index1) in healthList.qnameMap.isHealth" :key="index1">
<view class="flex-contion marginTop">
<view class="circular1 marginRight-sm"></view>
<view class="fontColor text-df">{{item1}}</view>
</view>
<view class="cut" v-if="index1<healthList.qnameMap.isHealth.length-1"></view>
</block>
</view>
</block>
<block v-if="cardList.length==0">
<nothing :marginTop='40' context='暂无评估数据~'></nothing>
</block>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading,
goPage
} from "/tool/index.js"
export default {
data() {
return {
isShow: false, //
todos:['','','','','','','','','','','','','','','',''],
userParameters: {}, //
tabIndex: 0, //
scrollLeft: 0, //
title: '', //
memberId: '', // 0 id
card: {
assessList: []
},
cardList: [],
//
cardIndex: 0,
//
listMap: [{
bgColor: "#009DFF",
proressName: "偏瘦"
}, {
bgColor: "#3AAFB8",
proressName: "正常"
}, {
bgColor: "#FDA92A",
proressName: "超重"
}, {
bgColor: "#F87C7C",
proressName: "肥胖"
}],
opt: {
fontSize: 10,
legend: {
position: "bottom",
},
extra: {
radar: {
border: true,
gridCount: 5,
max: 100,
gridColor: ''
},
},
},
//
chartData: {},
chartDataFunnel: {},
optsFunnel: {
color: ["#269452", "#34BA5F", "#FFD540", "#F9BB00", "#FF6B2E", "#E93A00"],
dataLabel: false,
loadingType: 0,
padding: [0, 5, 0, 15],
enableScroll: false,
legend: {
show: false
},
extra: {
funnel: {
activeOpacity: 0.3,
activeWidth: 10,
border: true,
borderWidth: 2,
borderColor: "#FFFFFF",
fillOpacity: 1,
labelAlign: "left",
type: "pyramid"
}
}
},
userProfile: '', //
userName: '', //
cno: '',
diseaseId: '0', //id
isAll: false,
series: '', //
healthList: {},
isChart: false, //
}
},
onLoad(opt) {
let data = JSON.parse(decodeURIComponent(opt.params))
this.memberId = data.memberId // 0 id
this.cno = data.cno
if (data.diseases == '') {
this.diseaseId = '0'
} else {
this.diseaseId = data.diseases
}
if (data.userParameters) {
this.userParameters = JSON.parse(data.userParameters) //
} else {
this.userParameters.userId = data.userId //id
}
this.userProfile = data.headSculpture //
this.userName = data.name //
this.getInfo()
},
methods: {
getFunnelData() {
//
//
let res = {
series: [{
data: [{
"name": "",
"centerText": "",
"value": 40
}, {
"name": "",
"centerText": "",
"value": 35
}, {
"name": "",
"centerText": "",
"value": 25
}, {
"name": "",
"centerText": "",
"value": 20
}, {
"name": "",
"centerText": "",
"value": 15
}, {
"name": "",
"centerText": "",
"value": 8
}]
}]
};
this.chartDataFunnel = JSON.parse(JSON.stringify(res));
},
// tab
tabChange(index) {
this.tabIndex = index
},
tap() {
console.log('点击了图标')
},
//
async getInfo() {
showLoading('加载中...')
let that = this
let ret = []
//
if (that.cno != '') {
ret = await that.$API.getAssessReport({
data: {
...that.userParameters,
cno: that.cno,
memberId: that.memberId,
diseaseId: that.diseaseId
}
})
that.isAll = false
that.healthList = ret.data[ret.data.length - 1] //
ret.data.splice(-1, 1) //
if (ret.data[0].diseaseName == '肥胖症') {
//
if (that.healthList.assessList.length > 0) {
that.healthList.assessList.map((item, index) => {
if (item.name == '肥胖症') {
that.healthList.assessList.splice(index, 1)
}
})
}
}
} else {
//
ret = await that.$API.getAssessReport({
data: {
deptId: 2,
...that.userParameters,
memberId: that.memberId
}
})
that.isAll = true
}
//
that.cardList = ret.data
if (that.isAll) {
let res = await this.$API.selectHealthyGuide({
data: {
...that.userParameters,
memberId: this.memberId,
diseaseId: 90
}
})
if (res.code == 200 && res.data) {
//
if (res.data.assessList.length > 0) {
res.data.assessList.map((item, index) => {
if (item.name == '肥胖症') {
res.data.assessList.splice(index, 1)
}
})
}
that.healthList = res.data //
}
}
that.cardChange(0)
},
//
backChange() {
uni.navigateBack()
},
getServerData() {
this.chartData.series[0].name = '当前风险'
this.chartData.series[1].name = '理想风险'
this.chartData.categories.map((item, index) => {
if (item.length > 4) {
this.chartData.categories[index] = item.substring(0, 4) + '...'
}
})
this.isShow = true
this.isChart = true
},
//
cardChange(index) {
showLoading('加载中...')
this.cardIndex = index
this.diseaseId = this.cardList[index].diseaseId
this.scrollLeft = (index - 1) * 68 //
this.title = this.cardList[index].diseaseName //
this.getDiseaseContent()
this.series = this.cardList[index].specialShowType
this.isChart = false
},
//
async getDiseaseContent() {
let ret = await this.$API.getDiseaseContent({
data: {
...this.userParameters,
deptId: 2,
memberId: this.memberId,
diseaseId: this.diseaseId,
}
})
if (ret.code == 200 && ret.data) {
this.card = ret.data
hideLoading()
this.isShow = true
}
this.series = ret.data.specialShowType //
//
this.chartData = JSON.parse(JSON.stringify(ret.data.qnameMap));
this.getServerData()
this.getFunnelData();
},
//
scroll(e) {
this.scrollLeft = e.detail.scrollLeft
},
//
viewPlan() {
uni.reLaunch({
url: '/pages/tabBar/project/project'
})
},
//
goDetails(item1) {
let data = {
riskName: item1.riskName,
riskValue: item1.riskValue,
ideaKey: item1.ideaKey,
ideaValue: item1.ideaValue,
name: item1.name,
}
goPage(['health-risks', 'guideDetails'], {
formData: JSON.stringify(data)
})
},
//
guidance(id) {
if (window.Android) {
window.Android.guidance(id)
}
if (window.webkit) {
window.webkit.messageHandlers.guidance.postMessage(id);
}
},
}
}
</script>
<style lang="scss" scoped>
@import './evaluationResults.scss';
</style>

View File

@ -0,0 +1,83 @@
<template>
<view class="pageBox">
<view class="contioner">
<view class="topCard">
<view class="flex-align text-xl">
<view class="flex-contion">
<view class="tagWidth"></view>
<view>{{formData.riskName}}</view>
</view>
<view class="fontColor">{{formData.riskValue}}</view>
</view>
<view class="cutt"></view>
<view class="text-three marginTop-sm">
<text>{{formData.ideaKey}}:</text>
<text class="margin-left-xs">{{formData.ideaValue}}</text>
</view>
</view>
<view class="topCard" style="margin-top: 24rpx;">
<view class="flex-contion">
<view class="tagWidth"></view>
<view class="text-xl">改善方法</view>
</view>
<view class="cutt"></view>
<view class="text-three">{{formData.name}}</text></view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
formData: '',
}
},
onLoad(options) {
this.formData = JSON.parse(options.formData)
}
}
</script>
<style lang="scss" scoped>
.pageBox {
width: 100vw;
min-height: 100vh;
display: flex;
flex-direction: column;
color: #3F4040;
.contioner {
padding: 32rpx;
}
.topCard {
padding: 32rpx 32rpx 40rpx 32rpx;
background: #FFFFFF;
border-radius: 20rpx;
.text-three {
font-size: 30rpx;
}
.tagWidth {
width: 6rpx;
height: 32rpx;
background: $uni-color;
border-radius: 4rpx;
margin-right: 12rpx;
}
.cutt {
width: 100%;
height: 2rpx;
background: #EEEEEE;
margin: 16rpx 0 18rpx 0;
}
.fontColor {
color: #F5973F;
}
}
}
</style>

View File

@ -0,0 +1,266 @@
page{
background: #F3F4F6;
}
.pageBox{
.color{
color: #17191A;
}
.inputPopup{
background: #FFF;
padding: 20rpx;
height: 200rpx;
}
.inputClass{
border: 2rpx solid #3AAFB8;
line-height: 64rpx;
height: 64rpx;
border-radius: 8rpx;
padding-left: 20rpx;
margin-top: 20rpx;
}
.topPostionBg{
position: absolute;
top: 0;
right: 0;
width: 100vw;
height: 528rpx;
background: linear-gradient(155deg, #E4F5EB 0%, rgba(228,245,235,0) 100%);
}
.staging{
width: 470rpx;
height: calc(580rpx - 42rpx);
border-radius: 48rpx;
background: #FFF;
padding: 22rpx 32rpx 20rpx;
.bg{
width: 100%;
height: 224rpx;
background: linear-gradient(180deg, #D8FCFF 0%, #FFF 100%);
position: absolute;
top: 0;
left: 0;
border-radius: 48rpx 48rpx 0 0;
}
.stagingBackground{
width: 268rpx;
height: 166rpx;
}
.threeSix{
margin-top: 36rpx;
}
.oneTwo{
margin-top: 12rpx;
}
.stagBtn{
width: calc(406rpx - 278rpx);
padding: 10rpx 138rpx 10rpx 140rpx;
border-radius: 50rpx;
border: 2rpx solid $uni-color;
background: $uni-color;
margin: 0 auto;
color: #FFF;
margin-top: 32rpx;
}
.colorGrey{
color: #909292;
margin-top: 32rpx;
}
}
.contioner{
padding: 32rpx;
.backBottom{
position: fixed;
bottom: 10vh;
right: 34rpx;
padding: 12rpx 32rpx;
border-radius: 50rpx;
background: #FFF;
box-shadow: 0 8rpx 8rpx 0 rgba(4, 70, 74, 0.14);
display: flex;
align-items: center;
image{
$wh:24rpx;
width: $wh;
height: $wh;
margin-right: 8rpx;
}
}
.topCard{
padding: 12rpx;
margin-top: 48rpx;
border-radius: 32rpx;
background: #FFFFFF;
.headSculpture{
$wh:112rpx;
width: $wh;
height: $wh;
background: #F3F4F6;
border-radius: 50%;
border: 6rpx solid #FFFFFF;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -52rpx;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
image{
$wh:100rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.border{
border: 1rpx dotted #3AAFB8;
border-radius: 20rpx;
.cut{
display: inline-block;
width: 4rpx;
height: 20rpx;
margin: 0 12rpx;
background: $uni-color;
}
.top{
margin-top: 72rpx;
color: $uni-color;
}
.tag{
padding: 0 20rpx;
line-height: 40rpx;
border-radius: 4rpx;
background: #F3F4F6;
color: #909292;
font-size: 24rpx;
}
}
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.tagWidth{
width: 48rpx;
height: 8rpx;
background: #EFF9F8;
border-radius: 50rpx;
margin-right: 12rpx;
margin-top: 20rpx;
display: inline-block;
}
.tagBgShaw{
background: $uni-color;
}
.introduce {
padding: 20rpx;
width: calc(502rpx - 40rpx);
background: #FFFFFF;
border-radius: 0rpx 16rpx 0rpx 0rpx;
}
.borderBottom{
border-radius: 0rpx 16rpx 16rpx 16rpx;
}
.rightGet{
width: 136rpx;
line-height: 48rpx;
text-align: center;
background: linear-gradient(180deg, #FDC674 0%, #FF9A02 100%);
border-radius: 50rpx;
color: #FFFFFF;
font-size: 24rpx;
margin-left: 38rpx;
}
.evaluation {
width: calc(502rpx - 40rpx);
padding: 20rpx;
margin-top: 16rpx;
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.greyTag{
padding: 18rpx 40rpx;
background: #F8F8F8;
border-radius: 16rpx;
margin-top: 20rpx;
color: #3F4040;
.tegWidth{
width: 2rpx;
height: 24rpx;
background: #CCCCCC;
margin: 0 24rpx;
display: inline-block;
}
}
.shawDown{
background: #EFF9F8;
color: $uni-color;
}
.cut{
margin-top: 32rpx;
width: 100%;
height: 1rpx;
background: #eee;
}
.greyColor{
color: grey;
}
.qding{
width: 320rpx;
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
margin: 0 auto;
color: #FFFFFF;
margin-top: 20rpx;
}
.pickerTag{
padding: 0 24rpx 0 20rpx;
height: 62rpx;
background: #F8F8F8;
border-radius: 8rpx;
margin: 20rpx 0;
color: #909292;
font-size: 24rpx;
}
.pickerShow{
background: #EFF9F8;
color: #3AAFB8;
}
}
.rightLayOut{
display: flex;
align-items: center;
margin-top: 32rpx;
.leftTag{
padding: 20rpx 32rpx;
background: #3AAFB8;
border-radius: 16rpx 0rpx 16rpx 16rpx;
color: #FFFFFF;
margin-right: 24rpx;
}
.rightAvter{
$wh:80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.bottomBtn{
position: fixed;
bottom: 20rpx;
width: calc(100% - 64rpx);
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
color: #FFFFFF;
margin-top: 80rpx;
}
}
}

View File

@ -0,0 +1,961 @@
<template>
<view class="pageBox" v-if="pageShow">
<view class="topPostionBg"></view>
<block v-if="temporarily">
<uni-popup type="center" ref="center" :isMaskClick="false">
<view class="staging bg-video">
<view class="bg"></view>
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/stagingBackground.png" class="stagingBackground"></image>
</view>
<view class="text-xxl text-center threeSix text-bold">温馨提示</view>
<view class="text-center text-sm oneTwo">发现您还有一份填了一半的问卷呢</view>
<view class="text-center text-sm">请告诉我您想怎么处理</view>
<view class="stagBtn margin-top-xs" @tap="continueChange">继续填写</view>
<view class="text-center text-df colorGrey" @tap="againQuestion">重新填写</view>
</view>
</uni-popup>
</block>
<view class="contioner" v-else>
<view class="topCard bg-video">
<view class="headSculpture">
<image src="https://shayu5qny.yhy.ren/youngerSister.png"></image>
</view>
<view class="border text-center bg-video">
<view class="top text-df text-bold">
<text class="color">鲨鱼宝宝</text>
<text class="cut"></text>
<text>专属评估客服</text>
</view>
<view class="flex-conter margin-top-xs marginBottom">
<view class="tag marginRight-xs">{{(allCount*15/60).toFixed(0)}}分钟</view>
<view class="tag marginRight-xs">{{allCount}}</view>
<view class="tag marginRight-xs" v-if="subTopic.length>0">父子题</view>
<view class="tag" v-if="integral!=0">积分奖励</view>
</view>
</view>
</view>
<scroll-view scroll-y :style="{'height':srcollHeight}" :scroll-top="scrollView" @scroll="scroll"
scroll-with-animation>
<view class="next" style="padding-top: 32rpx;"></view>
<block v-for="(item,index) in cardRadio" :key="index">
<view v-show="item.hidden">
<view class="flex bg-video" style="margin-top: 32rpx;">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="color flex-sub">
<view class="introduce text-df">
<view v-html="(index + 1)+':'+item.subjectInfo"></view>
<view class="text-sm margin-top-xs" style="color: #5878B4;" v-if="item.memo!=null">
{{item.memo}}
</view>
</view>
<!-- 单选样式 -->
<block v-if="item.subjectType=='0'">
<view class="evaluation">
<view class="text-df">单选</view>
<block v-for="(item1,index1) in item.diseaseAssessSubjectOption" :key="index1">
<view :class="['greyTag',item1.hidden?'shawDown':'']"
@tap="cardChange(index,index1,item1)">
<text class="text-bold">{{item1.optionCode}}</text>
<text class="tegWidth"></text>
<text>{{item1.optionValue}}</text>
</view>
</block>
</view>
</block>
<!-- 多选样式 -->
<block v-if="item.subjectType=='1'">
<view class="evaluation">
<view class="text-df">多选</view>
<checkbox-group>
<label v-for="(item1,index1) in item.diseaseAssessSubjectOption"
:key="item1.id" @tap="multipleChange(index,index1,item1)">
<view :class="['greyTag flex-contion',item1.hidden?'shawDown':'']">
<checkbox color="#3AAFB8" :value="item1.optionCode"
:checked="item1.hidden" />
<view class="marginLeft-sm">{{item1.optionValue}}</view>
</view>
</label>
</checkbox-group>
<view class="qding" @tap="nextMulQuestion(index)">确认</view>
</view>
</block>
<!-- 填空样式 -->
<block v-if="item.subjectType=='2'||item.subjectType=='4'">
<view class="evaluation">
<view class="text-df">填空</view>
<block v-for="(item1,index1) in item.diseaseAssessSubjectOption" :key="index1">
<view class="marginTop-sm" v-if="item.subjectType=='2'">
{{item1.optionValue}}
</view>
<view @tap="inputChange(item.subjectInfo,
item1.optionCode!=''&&item1.optionCode!=null?item1.optionCode:item1.defaultValue,
index,index1)" :class="['inputClass',(item1.optionCode==''||item1.optionCode==null)&&(
item1.defaultValue==''||item1.defaultValue==null)?'greyColor':'']">
{{item1.optionCode!=''&&item1.optionCode!=null?item1.optionCode:
item1.defaultValue!=''&&item1.defaultValue!=null?item1.defaultValue:'请输入'}}
</view>
</block>
<view class="qding" @tap="nextBlanQuestion(index)">确认</view>
</view>
</block>
<!-- 时间选择器样式 -->
<block v-if="item.subjectType=='5'">
<view class="evaluation">
<block v-for="(item1,index1) in item.diseaseAssessSubjectOption" :key="index1">
<view class="marginTop-sm text-df" style="color: #909292;">
{{item1.optionValue}}
</view>
<picker mode="time" :value="item1.optionCode"
@change="bindTimeChange($event,item1)">
<view :class="['pickerTag flex-between align-center',item1.optionCode!=''?'pickerShow':'']">
<view>
{{item1.optionCode==''?'请选择':item1.optionCode}}
</view>
<uni-icons type="right" size="14" :style="{'color':item1.optionCode==''?'#909292':'#3AAFB8'}"></uni-icons>
</view>
</picker>
</block>
<view class="qding" @tap="pickerQuestion(index)">确认</view>
</view>
</block>
</view>
</view>
<view class="flex justify-end" :class="['quest'+index]" v-if="item.defaultValue!=''">
<view class="rightLayOut">
<view class="leftTag flex-sub">{{item.defaultValue}}</view>
<image :src="userProfile" class="rightAvter">
</image>
</view>
</view>
</view>
</block>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
<uni-popup type="top" ref="inputRef" @maskClick="close">
<view class="inputPopup">
<view class="text-df">{{inputTitle}}</view>
<block v-if="inputTitle!='请填写以下常规医学指标检查结果'&&inputTitle!='请填写以下医学指标检查结果'&&inputTitle!='请填写胃功能检查结果'">
<block v-if="inputTitle!='请填写 骨密度检查指标-T值'">
<input placeholder="请输入" type="number" @input="inputChange1" :value="inputValue"
:focus="focus" @confirm="close" class="inputClass" />
</block>
<block v-else>
<input placeholder="请输入" type="text" @input="inputChange1" :value="inputValue"
:focus="focus" confirm-type="完成" @confirm="close" class="inputClass" />
</block>
</block>
<block v-else>
<input :value="inputValue" type="digit" placeholder="请输入" :focus="focus" @input="inputChange1"
@confirm="close" class="inputClass" />
</block>
</view>
</uni-popup>
<view class="bottomBtn" @tap="submitMultiple" v-if="isNext">生成评估报告</view>
<!-- 返回底部 -->
<view class="backBottom" @tap="goBottom" v-show="scrollGun<600&&isBottom">
<image src="https://shayu5qny.yhy.ren/Frame.png"></image>
<view class="text-sm themColor">返回底部</view>
</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
pageShow: false, //
isBumit: false, //
userParameters: {}, //
queShow: 0, //
//
diseases: '',
//
isNext: false,
//
waist: null,
//
hipline: null,
//
questionObject: {},
//
key: '',
//
value: '',
//
cardRadio: [],
//
subTopic: [],
//
temporarily: false,
// id
generationId: '',
//
checkItem: {},
allCount: '', //
userProfile: '', //
memberId: '', // 0 id
memberName: '', //
memberImg: '', //
memberAge: '', //
age: '', //
srcollHeight: "", //
scrollView: 0, //
scrollGun: 0, //
fixedHeight: 100000, //
integral: null,
isBottom: false, //
inptuIndex: 0, //
inptuIndex1: 0, //
inputValue: '', //
inputTitle: '', //
focus: false, //
}
},
onLoad(options) {
let data = JSON.parse(decodeURIComponent(options.params))
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
}
this.userParameters.userId = data.userId //id
this.diseases = data.diseases //
this.memberId = data.memberId // 0 id
this.age = data.age //
this.userName = data.name //
this.userProfile = data.headSculpture //
//
this.temporaryAata()
this.selectIntegral()
},
//
beforeDestroy() {
if (!this.isBumit) {
this.temporaryQuestion()
}
},
methods: {
//
selectIntegral() {
this.$API.selectTaskIntegral({
data: {
...this.userParameters,
assessIds: this.diseases, //
typeId: 1, //id 1
}
}).then(res => {
this.integral = res.data
})
},
//
questClass(index) {
this.queShow = index + 1 //
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".quest" + index).boundingClientRect((data) => {
this.scrollView = parseInt(this.scrollGun + data.top - 82)
}).exec();
if (index > 3) {
this.isBottom = true
}
}, 100)
},
//
scroll(e) {
this.scrollGun = e.target.scrollTop
},
//
goBottom() {
let num = this.fixedHeight++
this.scrollView = num
},
//
Height() {
const query = uni.createSelectorQuery().in(this);
query.select(".next").boundingClientRect((data) => {
//
this.srcollHeight = uni.getSystemInfoSync().windowHeight - data.top - 18 + "px";
}).exec();
},
//
temporaryAata() {
let that = this
let a = this.userParameters
if (that.memberId != '0') {
a.userId = this.memberId
}
that.$API.selectPaperList({
data: {
...a,
diseseaId: that.diseases
}
}).then((res) => {
if (res.data == null) {
that.getInfo()
} else {
// id
that.generationId = res.data.id
that.queShow = parseInt(res.data.lastSubCode) //
that.$set(that, 'temporarily', true)
that.pageShow = true
setTimeout(() => {
that.$refs.center.open()
}, 100)
}
})
},
//
async getInfo() {
let that = this
showLoading('加载中...')
let ret = await that.$API.selectBasisAssessInfo({
data: {
...this.userParameters,
diseases: that.diseases,
memberId: that.memberId,
}
})
this.allCount = ret.data.subject.length //
const isSubject = ret.data.subject.findIndex(item => item.hidden == true)
ret.data.subject.map((item, index) => {
//
if (item.isTopSubject == 0 && item.id != 603) {
//
that.cardRadio.push(item)
}
if (item.isTopSubject == 1) {
//
that.subTopic.push(item)
}
if (isSubject != -1) { //
//
if (item.subjectType == '1' && item.hidden && item.id != 612) {
const index = item.diseaseAssessSubjectOption.findIndex(item => {
return item.hidden == true
})
if (index == -1) {
item.diseaseAssessSubjectOption[item.diseaseAssessSubjectOption.length - 1]
.hidden = true
} else {
item.diseaseAssessSubjectOption[item.diseaseAssessSubjectOption.length - 1]
.hidden = false
}
}
}
})
const isSubjects = ret.data.subject.findIndex(item => item.hidden == true)
that.cardRadio.map((item, index) => {
if (isSubjects != -1) { //
//
if (item.subjectType == '0' && item.hidden) {
const index11 = item.diseaseAssessSubjectOption.findIndex(item1 => {
return item1.hidden == true
})
if (index11 != -1) {
item.defaultValue = item.diseaseAssessSubjectOption[index11].optionCode + '.' +
item.diseaseAssessSubjectOption[index11].optionValue
}
}
//
if (item.subjectType == '1' && item.hidden) {
let a = []
item.diseaseAssessSubjectOption.map((items, indexs) => {
if (items.hidden) {
a.push(items.optionValue)
}
})
item.defaultValue = a.toString()
}
//
if (item.subjectType == '2' || item.subjectType == '4') {
if (item.diseaseAssessSubjectOption.length == 1) {
//
if (item.diseaseAssessSubjectOption[0].optionCode != null && item
.diseaseAssessSubjectOption[0].optionCode != '') {
item.defaultValue = item.diseaseAssessSubjectOption[0].optionValue + ':' +
item
.diseaseAssessSubjectOption[0].optionCode
}
} else {
let a = []
item.diseaseAssessSubjectOption.map((items, indexs) => {
if (items.optionCode != '' && items.optionCode != null) {
a.push(items.optionValue + ':' + items
.optionCode) //
} else {
a.push(items.optionValue + ':' + items
.defaultValue) //
}
})
item.defaultValue = a.toString()
}
}
}
})
that.subTopic.map((item, index) => {
if (isSubjects != -1) { //
//
if (item.subjectType == '0' && item.hidden) {
const index11 = item.diseaseAssessSubjectOption.findIndex(item1 => {
return item1.hidden == true
})
item.defaultValue = item.diseaseAssessSubjectOption[index11].optionCode + '.' +
item.diseaseAssessSubjectOption[index11].optionValue
}
//
if (item.subjectType == '2' || item.subjectType == '4') {
if (item.diseaseAssessSubjectOption.length == 1) {
//
if (item.diseaseAssessSubjectOption[0].optionCode != null) {
item.defaultValue = item.diseaseAssessSubjectOption[0].optionValue + ':' +
item
.diseaseAssessSubjectOption[0].optionCode
}
} else {
let a = []
item.diseaseAssessSubjectOption.map((items, indexs) => {
if (items.optionCode != '' && items.optionCode != null) {
a.push(items.optionValue + ':' + items
.optionCode) //
} else {
a.push(items.optionValue + ':' + items
.defaultValue) //
}
})
item.defaultValue = a.toString()
}
}
}
})
that.cardRadio.map((item, index) => {
if (index == 0) {
item.hidden = true
} else {
item.hidden = false
}
})
if (ret.data.topPaperSave != null) {
that.questionObject = JSON.parse(ret.data.topPaperSave.paperJson)
}
that.pageShow = true
//
setTimeout(() => {
that.Height()
hideLoading()
}, 100)
},
//
inputChange(value, value1, index, index1) {
this.inputTitle = value
this.inputValue = value1
this.inptuIndex = index
this.inptuIndex1 = index1
this.$refs.inputRef.open()
this.$nextTick(() => {
this.focus = true
})
},
//
close() {
this.focus = false
this.cardRadio[this.inptuIndex].diseaseAssessSubjectOption[this.inptuIndex1].optionCode = this.inputValue
},
//
inputChange1(e, item1) {
this.inputValue = e.detail.value
},
//
nextBlanQuestion(index) {
let that = this;
for (var i = 0; i < that.cardRadio[index].diseaseAssessSubjectOption.length; i++) {
if (that.cardRadio[index].diseaseAssessSubjectOption[i].optionCode == '' || that.cardRadio[index]
.diseaseAssessSubjectOption[i].optionCode == null) {
return toast('请先填写')
}
}
let value = that.cardRadio[index].diseaseAssessSubjectOption[0].optionCode
//
const reg = /^\d*$/;
const regs = /^[+-]?(0|([1-9]\d*))(\.\d{1})?$/
let subType = that.cardRadio[index].subjectCode
if ((subType == 'waist' || subType == 'height') && !reg.test(value)) {
if (subType == 'waist') {
return toast('腰围只能输入整数')
} else {
return toast('身高只能输入整数')
}
}
if (subType == 'weight' && !regs.test(value)) {
return toast('体重只能输入一位整数')
}
// memberId0
if (that.cardRadio[index].subjectCode == 'smoke_begin_age' || that.cardRadio[index].subjectCode ==
'smoke_end_age') {
if (value > this.age || value == 0) return toast(value > this.age ? '不能大于当前的年龄' :
'不能为0')
}
let data = that.cardRadio[index].diseaseAssessSubjectOption
if (data.length == 1) {
//
that.key = that.cardRadio[index].subjectCode
that.$set(that.questionObject, that.key, value)
that.cardRadio[index].defaultValue = data[0].optionValue + ':' + data[0].optionCode
} else {
let a = []
for (var i = 0; i < data.length; i++) {
let key = data[i].qcode
if (data[i].optionCode != '' && data[i].optionCode != null) {
a.push(data[i].optionValue + ':' + data[i].optionCode) //
//
this.$set(this.questionObject, key, data[i].optionCode)
} else {
a.push(data[i].optionValue + ':' + data[i].defaultValue) //
this.$set(this.questionObject, key, data[i].defaultValue)
}
}
that.$set(that.cardRadio[index], 'defaultValue', a.toString())
}
//
if (index == that.cardRadio.length - 1) {
that.$set(that.cardRadio[index], 'hidden', true)
return that.$set(that, 'isNext', true)
} else {
that.$set(that.cardRadio[index + 1], 'hidden', true)
}
that.questClass(index)
},
//
cardChange(index, index1, item1) {
let that = this
//
that.key = that.cardRadio[index].diseaseAssessSubjectOption[index1].qcode
that.value = that.cardRadio[index].diseaseAssessSubjectOption[index1].optionCode
that.$set(that.cardRadio[index], 'defaultValue', item1.optionCode + '.' + item1.optionValue)
if (that.key.indexOf("sport_in") != -1) {
if (that.key.indexOf("sport_freq") != -1) {
let keys = that.key.split(",");
keys.map((item) => {
that.$set(that.questionObject, item.split(":")[0], item.split(":")[1])
})
} else {
let keys = that.key.split(":");
that.$set(that.questionObject, keys[0], keys[1])
}
} else {
that.$set(that.questionObject, that.key, that.value)
}
//
let oldIndex = -1;
//
that.cardRadio[index].diseaseAssessSubjectOption.map((item, ind) => {
if (item.hidden) {
oldIndex = ind;
}
//
if (ind == index1) {
item.hidden = true
} else {
item.hidden = false
}
})
if (oldIndex != -1) {
//
let oldZiti = this.fuyon(that.cardRadio[index].id, oldIndex + 1);
//
const isSelect = that.cardRadio.findIndex(item => item.parentCode == that.cardRadio[index].id)
if (oldZiti.length > 0) {
//
oldZiti.map((item, oldZi) => {
if (isSelect != -1) {
that.cardRadio.splice(index + 1 + (oldZiti.length - oldZi - 1), 1);
}
for (let key in that.questionObject) {
if (item.subjectCode == key) {
Reflect.deleteProperty(that.questionObject, key)
}
}
const idx = that.subTopic.findIndex(val => val.id == item.id)
})
}
}
let num = this.fuyon(that.cardRadio[index].id, that.cardRadio[index].diseaseAssessSubjectOption[index1]
.optionCode);
//
this.matching(num, index + 1)
//
if (index == that.cardRadio.length - 1) {
that.$set(that.cardRadio[index], 'hidden', true)
that.$set(that, 'isNext', true)
} else {
that.$set(that.cardRadio[index + 1], 'hidden', true)
}
that.questClass(index)
},
//
matching(num, index1) {
var that = this
//
num.map((item, index) => {
that.cardRadio.splice(index1 + index, 0, item);
})
},
//
fuyon(id, code) {
let num = []
//
this.subTopic.map((item) => {
if (item.parentCode == id && item.parentSign.indexOf(code) > -1) {
num.push(item)
}
})
return num;
},
//
jinru() {
let num = []
let b = []
this.cardRadio.map((item, index) => {
item.diseaseAssessSubjectOption.map((item1, index1) => {
//
this.subTopic.map((item2, index2) => {
if (item1.hidden && item2.parentCode == item.id && item2.parentSign
.indexOf(item.diseaseAssessSubjectOption[index1].optionCode) > -1
) {
num.push(item2)
b.push(index)
}
})
})
})
if (num.length > 0) {
num.map((item3, index3) => {
this.cardRadio.splice(b[index3] + 1 + index3, 0, item3);
})
}
this.cardRadio.map((item, index) => {
if (index <= this.queShow) {
item.hidden = true
} else {
item.hidden = false
}
})
},
//
multipleChange(index, index1, item1) {
let that = this
let data = that.cardRadio[index].diseaseAssessSubjectOption
if (index1 == data.length - 1 && !data[index1].hidden) {
data.map(item => {
item.hidden = false
})
data[index1].hidden = true
} else {
data[index1].hidden = !data[index1].hidden
data[data.length - 1].hidden = false
}
},
//
nextMulQuestion(index) {
let that = this;
let b = []
that.cardRadio[index].diseaseAssessSubjectOption.map(ite => {
if (ite.hidden) {
b.push(ite)
}
})
if (b.length == 0) return toast('请选择')
if (index == that.cardRadio.length - 1) {
that.cardRadio[index].hidden = true
that.$set(that, 'isNext', true)
} else {
that.cardRadio[index + 1].hidden = true
}
let data = that.cardRadio[index].diseaseAssessSubjectOption
let a = []
//
for (var i = 0; i < data.length; i++) {
if (data[i].hidden) {
a.push(data[i].optionValue)
}
if (data[i].hidden && i < data.length - 1) { //
that.$set(that.questionObject, data[i].qcode, '1')
that.$set(that.questionObject, data[data.length - 1].qcode, '2')
} else if (data[i].hidden) { //
that.$set(that.questionObject, data[i].qcode, '1')
data.map((item, indexs) => {
if (indexs < data.length - 1) {
that.$set(that.questionObject, item.qcode, '2')
}
})
} else if (i < data.length - 1) {
that.$set(that.questionObject, data[i].qcode, '2')
}
}
that.cardRadio[index].defaultValue = a.toString()
that.questClass(index)
},
//
hivChange(index1, index) {
this.cardRadio[index].diseaseAssessSubjectOption[index1].hidden = !this.cardRadio[index]
.diseaseAssessSubjectOption[index1].hidden
this.$forceUpdate()
},
//
submitHiv(index, val) {
let that = this
if (that.cardRadio[index].subjectCode == 'hiv_his') {
let data = that.cardRadio[index].diseaseAssessSubjectOption
//
for (var i = 0; i < data.length; i++) {
if (data[i].hidden) {
that.$set(that.questionObject, data[i].qcode, 1)
} else {
that.$set(that.questionObject, data[i].qcode, 2)
}
}
}
},
//
bindTimeChange(e, item1) {
item1.optionCode = e.detail.value
},
//
pickerQuestion(index) {
let data = this.cardRadio[index].diseaseAssessSubjectOption
if (data[0].optionCode == '' || data[1].optionCode == '') return toast('请先选择')
if (data[0].optionCode == data[1].optionCode) return toast('开始时间不能等于结束时间')
let hour = this.calculateMinutes(data[0].optionCode, data[1].optionCode) //
let a = []
for (var i = 0; i < data.length; i++) {
let key = data[i].qcode
a.push(data[i].optionValue + ':' + data[i].optionCode) //
//
this.$set(this.questionObject, key, data[i].optionCode)
}
this.$set(this.cardRadio[index], 'defaultValue', a.toString())
let oldZiti = this.pickerFuyon('first'); //
//
if (oldZiti.length > 0) {
//
oldZiti.map((item, oldZi) => {
this.cardRadio.splice(index + 1 + (oldZiti.length - oldZi - 1), 1);
for (let key in this.questionObject) {
if (item.subjectCode == key) {
Reflect.deleteProperty(this.questionObject, key)
}
}
})
}
// 7
if (oldZiti.length == 0 && hour < 7) {
let num = this.pickerFuyon('last'); //
this.matching(num, index + 1) //
}
this.$set(this.cardRadio[index + 1], 'hidden', true)
this.questClass(index)
console.log(this.questionObject, 'this.questionObject')
},
//
pickerFuyon(value) {
let num = []
//
if (value == 'first') {
this.cardRadio.map((item) => {
if (item.id == 695 || item.id == 694) {
num.push(item)
}
})
} else {
//
this.subTopic.map((item) => {
if (item.id == 695 || item.id == 694) {
num.push(item)
}
})
}
return num;
},
calculateMinutes(time1, time2) {
//
const hours1 = time1.split(':').reduce((acc, value) => acc * 60 + parseInt(value, 10), 0);
const hours2 = time2.split(':').reduce((acc, value) => acc * 60 + parseInt(value, 10), 0);
//
let diff = 0
let num = 0
if (time2 < time1) {
diff = 24 - (hours1 / 60) + (hours2 / 60)
} else {
diff = Math.abs(hours2 - hours1) / 60
}
return diff;
},
//
async submitMultiple() {
this.isBumit = true //
if (this.$preventClick()) return
let a = []
this.cardRadio.map(item => {
if (item.hidden) {
a.push(item)
}
})
for (var i = 0; i < a.length; i++) {
if (a[i].defaultValue == "") {
return toast('请将题目填写完')
}
}
let that = this
showLoading('提交中')
if(that.questionObject == "1"){
}else{
if(that.questionObject){
}else{
that.questionObject.sport_time = "4"
}
}
let questionObject = JSON.stringify(that.questionObject)
let reg = await that.$API.basisAssessSaveJson({
data: {
...that.userParameters,
diseases: that.diseases,
subjectJson: questionObject,
subType: '1',
memberId: that.memberId
}
})
hideLoading()
if (reg.code == 200) {
if (this.diseases == '95') {
let b = {
userParameters: JSON.stringify(this.userParameters), //
name: this.userName,
memberId: this.memberId, // 0 id
}
uni.redirectTo({
url: '/pages/health-risks/basicReport/basicReport?params=' + JSON
.stringify(b)
})
} else {
let b = {
memberId: this.memberId, // 0 id
userParameters: JSON.stringify(this.userParameters), //
headSculpture: this.userProfile,
name: this.userName,
cno: reg.data,
diseases: '',
}
uni.redirectTo({
url: '/pages/health-risks/evaluationResults/evaluationResults?params=' + JSON
.stringify(b)
})
}
} else {
toast(reg.msg ? reg.msg : '生成报告异常')
}
},
//
temporaryQuestion() {
if (this.$preventClick()) return
let that = this
let a = that.cardRadio
let b = []
if (that.subTopic.length > 0) {
that.subTopic.map(item => {
let res = a.filter(it => Number(it.parentCode) === item.parentCode);
if (res.length > 0) {
item = res[0]
}
})
a.map((item, index) => {
//
if (item.id == 603 && that.age < 35) {
that.$set(that.questionObject, item.diseaseAssessSubjectOption[0].qcode,
'1')
}
if (item.isTopSubject == 0) {
//
b.push(item)
}
})
that.subTopic.map(item => {
b.push(item)
})
that.cardRadio = b
}
let paperJson = JSON.stringify(that.cardRadio)
let ret = that.$API.basisAssessSaveJson({
data: {
...that.userParameters,
diseases: that.diseases, //
memberId: that.memberId, //id
subjectJson: paperJson, //
lastSubCode: that.queShow, //
subType: '0', //1 0
}
})
},
//
async continueChange() {
if (this.$preventClick()) return
let that = this
let ret = await this.$API.generatePaper({
data: {
...that.userParameters,
paperId: that.generationId, //id
memberId: that.memberId
}
})
that.temporarily = false
that.allCount = ret.data.subject.length //
if (ret.data.topPaperSave != null) {
that.questionObject = JSON.parse(ret.data.topPaperSave.paperJson)
}
ret.data.subject.map((item, index) => {
//
if (item.id == 603 && that.age < 35) {
that.$set(that.questionObject, item.diseaseAssessSubjectOption[0].qcode,
'1')
}
//
if (item.isTopSubject == 1 && item.id != 603) {
//
that.subTopic.push(item)
}
if (item.isTopSubject == 0) {
//
that.cardRadio.push(item)
}
})
that.jinru()
setTimeout(() => {
that.Height() //
that.scrollView = 100000
}, 100)
},
//
againQuestion() {
if (this.$preventClick()) return
this.cardRadio = []
this.subTopic = []
this.temporarily = false
this.getInfo()
},
}
}
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

25
src/pages/index/index.vue Normal file
View File

@ -0,0 +1,25 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,265 @@
.pageBox {
.color{
color: #17191A;
}
.topPostionBg{
position: absolute;
top: 0;
right: 0;
width: 100vw;
height: 528rpx;
background: linear-gradient(155deg, #E4F5EB 0%, rgba(228,245,235,0) 100%);
}
.contioner{
padding: 32rpx;
.backBottom{
position: fixed;
bottom: 10vh;
right: 34rpx;
padding: 12rpx 32rpx;
border-radius: 50rpx;
background: #FFF;
box-shadow: 0 8rpx 8rpx 0 rgba(4, 70, 74, 0.14);
display: flex;
align-items: center;
image{
$wh:24rpx;
width: $wh;
height: $wh;
margin-right: 8rpx;
}
}
.topCard{
padding: 12rpx;
margin-top: 48rpx;
border-radius: 32rpx;
background: #FFFFFF;
.headSculpture{
$wh:112rpx;
width: $wh;
height: $wh;
background: #F3F4F6;
border-radius: 50%;
border: 6rpx solid #FFFFFF;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -52rpx;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
image{
$wh:100rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.border{
border: 1rpx dotted #3AAFB8;
border-radius: 20rpx;
.cut{
display: inline-block;
width: 4rpx;
height: 20rpx;
margin: 0 12rpx;
background: $uni-color;
}
.top{
margin-top: 72rpx;
color: $uni-color;
}
.tag{
padding: 0 20rpx;
line-height: 40rpx;
border-radius: 4rpx;
background: #F3F4F6;
color: #909292;
font-size: 24rpx;
}
}
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.introduce {
padding: 20rpx;
width: calc(502rpx - 40rpx);
background: #FFFFFF;
border-radius: 0rpx 16rpx 0rpx 0rpx;
}
.borderBottom{
border-radius: 0rpx 16rpx 16rpx 16rpx;
}
.rightGet{
width: 136rpx;
line-height: 48rpx;
text-align: center;
background: linear-gradient(180deg, #FDC674 0%, #FF9A02 100%);
border-radius: 50rpx;
color: #FFFFFF;
font-size: 24rpx;
margin-left: 38rpx;
}
.evaluation {
width: calc(502rpx - 40rpx);
padding: 20rpx;
margin-top: 16rpx;
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.greyTag{
padding: 18rpx 40rpx;
background: #F8F8F8;
border-radius: 16rpx;
margin-top: 20rpx;
color: #3F4040;
.tegWidth{
width: 2rpx;
height: 24rpx;
background: #CCCCCC;
margin: 0 24rpx;
display: inline-block;
}
.tagWidth{
$wh:40rpx;
width: $wh;
height: $wh;
margin-right: 32rpx;
border: 4rpx solid #DCDCDC;
border-radius: 6rpx;
}
.tagShaw{
border: 4rpx solid $uni-color;
background: $uni-color;
}
}
.shawDown{
background: #EFF9F8;
color: $uni-color;
}
.cut{
margin-top: 32rpx;
width: 100%;
height: 1rpx;
background: #eee;
}
.fenge{
width: 2rpx;
height: 80rpx;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
background: #eee;
}
.inputClass{
border: 2rpx solid #3AAFB8;
line-height: 64rpx;
height: 64rpx;
border-radius: 8rpx;
padding:0 20rpx;
margin-top: 20rpx;
}
.cutt {
width: 2rpx;
height: 32rpx;
background: #323232;
opacity: 0.2;
margin-right: 20rpx;
}
.qding{
width: 320rpx;
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
margin: 0 auto;
color: #FFFFFF;
margin-top: 20rpx;
}
}
.rightLayOut{
display: flex;
align-items: center;
margin-top: 32rpx;
.leftTag{
padding: 20rpx 32rpx;
background: #3AAFB8;
border-radius: 16rpx 0rpx 16rpx 16rpx;
color: #FFFFFF;
margin-right: 24rpx;
}
.rightAvter{
$wh:80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.bottomBtn{
position: fixed;
bottom: 20rpx;
width: calc(100% - 64rpx);
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
color: #FFFFFF;
margin-top: 80rpx;
}
}
.pupupCard {
width: 650rpx;
min-height: 854rpx;
border-radius: 16rpx;
padding: 0 0 20rpx;
overflow: hidden;
font-size: 28rpx;
position: relative;
color: #333333;
.drawerBg {
position: absolute;
top: 0;
right: 0;
z-index: -1;
width: 100%;
height: 100%;
}
.drawerLogo {
width: 236rpx;
height: 266rpx;
margin-top: 40rpx;
}
.wenTitle {
font-size: 40rpx;
font-weight: bold;
margin-top: 38rpx;
}
.bottomTitle {
text-indent: 2rem;
padding: 16rpx 32rpx 6rpx;
letter-spacing: 3rpx;
line-height: 50rpx;
}
.btn {
width: 328rpx;
line-height: 80rpx;
text-align: center;
background: #3AAFB8;
border-radius: 50rpx;
color: #FFFFFF;
}
}
}

View File

@ -0,0 +1,582 @@
<template>
<view class="pageBox" v-if="pageShow" @touchmove.stop="">
<view class="topPostionBg"></view>
<view class="contioner">
<view class="topCard bg-video">
<view class="headSculpture">
<image src="https://shayu5qny.yhy.ren/youngerSister.png"></image>
</view>
<view class="border text-center bg-video">
<view class="top text-df text-bold">
<text class="color">鲨鱼宝宝</text>
<text class="cut"></text>
<text>专属评估客服</text>
</view>
<view class="flex-conter margin-top-xs marginBottom">
<view class="tag marginRight-xs">{{(totalNumber*15/60).toFixed(0)}}分钟</view>
<view class="tag marginRight-xs">{{totalNumber}}</view>
<view class="tag marginRight-xs" v-if="subTopic.length>0">父子题</view>
</view>
</view>
</view>
<scroll-view scroll-y :style="{'height':srcollHeight}" :scroll-top="scrollView" @scroll="scroll"
scroll-with-animation>
<view class="next" style="padding-top: 32rpx;"></view>
<block v-for="(item,index) in cardRadio" :key="index">
<view v-show="item.hidden">
<view class="flex bg-video" style="margin-top: 32rpx;">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="color flex-sub">
<view class="introduce text-df">
<view>{{index + 1 }}: {{item.subjectInfo}}</view>
<view class="text-sm margin-top-xs" style="color: #5878B4;" v-if="item.memo!=null">
{{item.memo}}
</view>
</view>
<!-- 单选样式 -->
<block v-if="item.subjectType=='0'">
<view class="evaluation">
<view class="text-df">单选</view>
<block v-for="(item1,index1) in item.diseaseAssessSubjectOption" :key="index1">
<view :class="['greyTag',item1.hidden?'shawDown':'']"
@click="cardChange(index,index1,item1)">
<text class="text-bold">{{item1.optionCode}}</text>
<text class="tegWidth"></text>
<text>{{item1.optionValue}}</text>
</view>
</block>
</view>
</block>
<!-- 多选样式 -->
<block v-if="item.subjectType=='1'">
<view class="evaluation">
<view class="text-df">多选</view>
<block v-for="(item1,index1) in item.diseaseAssessSubjectOption" :key="index1">
<view :class="['greyTag flex-contion',item1.hidden?'shawDown':'']"
@tap="multipleChange(index,index1)">
<view v-if="!item1.hidden" class="tagWidth"></view>
<view v-else class="tagWidth tagShaw flex-conter">
<uni-icons type="checkmarkempty" color="#fff"></uni-icons>
</view>
<view class="flex-sub">{{item1.optionValue}}</view>
</view>
</block>
<view class="qding" @tap="nextMulQuestion(index)">确认</view>
</view>
</block>
<!-- 填空样式 -->
<block v-if="item.subjectType=='2'">
<view class="evaluation">
<view class="text-df">填空</view>
<view class="inputClass flex-between align-center text-lg">
<input placeholder="请输入" type="number" @input="inputChange"
:value="pulseNum" />
<view class="flex-contion">
<view class="cutt"></view>
<view></view>
</view>
</view>
<view class="qding" @tap="nextBlanQuestion(index)">确认</view>
</view>
</block>
</view>
</view>
<view class="flex justify-end" :class="['quest'+index]" v-if="item.defaultValue!=''">
<view class="rightLayOut">
<view class="leftTag flex-sub">{{item.defaultValue}}</view>
<image :src="userProfile" class="rightAvter"></image>
</view>
</view>
</view>
</block>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
<view class="bottomBtn" @tap="submitMultiple" v-if="isNext">完成答题</view>
<!-- 返回底部 -->
<view class="backBottom" @tap="goBottom" v-show="scrollGun<600&&isBottom">
<image src="https://shayu5qny.yhy.ren/Frame.png"></image>
<view class="text-sm themColor">返回底部</view>
</view>
</view>
<uni-popup ref="popup">
<view class="pupupCard">
<image src="https://shayu5qny.yhy.ren/drawerBg.png" class="drawerBg"></image>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/drawerLogo.png" class="drawerLogo"></image>
</view>
<view class="text-center wenTitle">温馨提示</view>
<view class="bottomTitle">
尊贵的用户<text
style="color: #3AAFB8;">{{nickname}}</text>您好欢迎参加此次健康管理计划为了提高您参与计划过程中的安全性预防运动损伤情况的发生当出现以下状况时请立刻停止运动并寻求专业人员帮助
</view>
<view style="padding: 0rpx 32rpx 24rpx;letter-spacing: 3rpx;">
<view>1 处于疾病发作急性期时</view>
<view class="margin-top-xs">2 运动过程中出现头晕胸闷心悸眼花等异常情况时</view>
<view class="margin-top-xs">3 出现关节肌肉刺痛时注意肌肉酸痛为正常现象</view>
</view>
<view class="flex-conter">
<view class="btn" @tap="submit">确定</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
userParameters: {}, //
pageShow: false, //
srcollHeight: "", //
scrollView: 0, //
scrollGun: 0, //
fixedHeight: 100000, //
isBottom: false, //
userProfile: '', //
nickname: '', //
pulseNum: '', //
totalNumber: '', //
//
diseases: '',
//
isNext: false,
//
questionObject: {},
//
key: '',
//
value: '',
//
cardRadio: [],
//
subTopic: [],
// id
planId: '',
//
lastObj: {},
//
tk_num: 0,
//
monitor: false,
currentFive: null, //
toiceList: [], //
}
},
onLoad(opt) {
let data = JSON.parse(decodeURIComponent(opt.params))
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
}
this.userParameters.userId = data.userId //id
this.planId = data.planId // id
this.diseases = data.diseases //
this.nickname = data.name //
this.userProfile = data.headSculpture //
this.getPlanInfo()
},
methods: {
//
Height() {
const query = uni.createSelectorQuery().in(this);
query.select(".next").boundingClientRect((data) => {
//
this.srcollHeight = uni.getSystemInfoSync().windowHeight - data.top - 18 + "px";
}).exec();
},
//
questClass(index) {
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".quest" + index).boundingClientRect((data) => {
this.scrollView = parseInt(this.scrollGun + data.top - 142)
if (index > 3) {
this.isBottom = true
}
}).exec();
}, 100)
},
//
scroll(e) {
this.scrollGun = e.target.scrollTop
},
//
goBottom() {
let num = this.fixedHeight++
this.scrollView = num
},
//
async getPlanInfo() {
let that = this
let ret = await that.$API.selectFoodsSubjectList({
data: {
...this.userParameters,
planId: that.planId,
}
})
this.totalNumber = ret.data.length //
ret.data.map((item) => {
item.defaultValue = ''
if (item.isTopSubject == 0) {
//
that.cardRadio.push(item)
} else {
//
that.subTopic.push(item)
}
//
if (item.subjectCode == 'foods_deviation') {
that.currentFive = item
}
})
that.cardRadio[0].hidden = true
//
const sugIndex = that.cardRadio.findIndex(item => item.subjectCode == 'monitor_sug_ex')
that.lastObj = that.cardRadio[sugIndex]
that.pageShow = true
//
setTimeout(() => {
that.Height()
}, 100)
},
//
cardChange(index, index1, item1) {
let that = this
that.$set(that.cardRadio[index], 'defaultValue', item1.optionCode + '.' + item1.optionValue)
//
that.key = that.cardRadio[index].diseaseAssessSubjectOption[index1].qcode
that.value = that.cardRadio[index].diseaseAssessSubjectOption[index1].optionCode
if (that.key.indexOf("sport_in") != -1) {
if (that.key.indexOf("sport_freq") != -1) {
let keys = that.key.split(",");
keys.map((item) => {
that.$set(that.questionObject, item.split(":")[0], item.split(":")[1])
})
} else {
let keys = that.key.split(":");
that.$set(that.questionObject, keys[0], keys[1])
}
} else {
that.$set(that.questionObject, that.key, that.value)
}
//
let oldIndex = -1;
that.cardRadio[index].diseaseAssessSubjectOption.map((item, ind) => {
if (item.hidden) {
oldIndex = ind;
}
//
if (ind == index1) {
item.hidden = true
} else {
item.hidden = false
}
})
if (oldIndex != -1) {
//
let oldZiti = this.fuyon(that.cardRadio[index].id, oldIndex + 1);
if (oldZiti.length > 0) {
//
oldZiti.map((item, oldZi) => {
that.cardRadio.splice(index + 1 + (oldZiti.length - oldZi - 1), 1);
})
}
}
// //
const cardIndex = that.cardRadio.findIndex(item => item.subjectClass == 3)
//
const sugIndex = that.cardRadio.findIndex(item => item.subjectCode == 'monitor_sug_ex')
if (!this.monitor) {
if (that.questionObject.monitor_sug_mo == 2 || that.questionObject.monitor_sug_mo == 3 || that
.questionObject.monitor_sug_mo == 4 || that.questionObject.monitor_sug_st == 1 || that
.questionObject.monitor_sug_st == 3) {
this.monitor = true
that.cardRadio.splice(sugIndex, 1)
}
}
//
if (that.cardRadio[index].id == 665 || that.cardRadio[index].id == 666 || that.cardRadio[index].id ==
667 || that.cardRadio[index].id == 668 || that.cardRadio[index].id == 669 || that.cardRadio[index]
.id == 670 || that.cardRadio[index].id == 671) {
if (that.cardRadio[index].diseaseAssessSubjectOption[index1].optionCode == 1) {
return that.isNext = true
} else {
that.isNext = false
}
}
if (that.cardRadio[index].id == 672 || that.cardRadio[index].id == 664) {
if (that.cardRadio[index].diseaseAssessSubjectOption[index1].optionCode == 1) {
that.isNext = false
} else {
return that.isNext = true
}
}
let num = this.fuyon(that.cardRadio[index].id, that.cardRadio[index].diseaseAssessSubjectOption[index1]
.optionCode);
//
this.matching(num, index + 1)
//
if (index == that.cardRadio.length - 1) {
that.$set(that.cardRadio[index], 'hidden', true)
return that.$set(that, 'isNext', true)
} else {
that.$set(that.cardRadio[index + 1], 'hidden', true)
}
that.questClass(index)
// setTimeout(() => {
// if (that.cardRadio.length - 1 == index) return that.submitMultiple()
// }, 100)
},
//
matching(num, index1) {
var that = this
//
num.map((item, index) => {
that.cardRadio.splice(index1 + index, 0, item);
})
},
//
fuyon(id, code) {
let num = []
//
this.subTopic.map((item) => {
const codeArr = item.parentSign.split(",")
const codeIndex = codeArr.findIndex(item => item == code)
if (item.parentCode == id && codeIndex != -1) {
num.push(item)
}
})
return num;
},
//
multipleChange(index, index1) {
let that = this
let list = []
//
let data = that.cardRadio[index].diseaseAssessSubjectOption
//
if (that.cardRadio[index].subjectCode == 'foods_allergy' && data[index1].qcode != 'jw') {
data.map(item => {
if (item.hidden) {
list.push(item)
}
})
if (list.length > 2 && !data[index1].hidden) return toast('不能超过三个过敏项')
}
//
if (data[index1].qcode == 'jw') {
for (var i = 0; i < data.length; i++) {
//
if (i != data.length - 1) {
data[i].hidden = false
} else {
data[i].hidden = true
}
}
} else {
//
if (data[data.length - 1].qcode == 'jw' && data[data.length - 1].hidden) {
data[data.length - 1].hidden = false
}
data[index1].hidden = !data[index1].hidden
}
//
for (var i = 0; i < data.length; i++) {
if (data[i].hidden && i < data.length - 1) {
that.$set(that.questionObject, data[i].qcode, '1')
} else if (data[i].hidden) {
data.map((item, indexs) => {
if (indexs < data.length - 1) {
that.$set(that.questionObject, item.qcode, '2')
}
})
} else if (i < data.length - 1) {
that.$set(that.questionObject, data[i].qcode, '2')
}
}
},
//
nextMulQuestion(index) {
let that = this;
let b = []
that.cardRadio[index].diseaseAssessSubjectOption.map(ite => {
if (ite.hidden) {
b.push(ite)
}
})
if (b.length == 0) return toast('请选择')
//
if (that.cardRadio[index + 1].subjectCode != 'weight_target') {
if (that.cardRadio[index].subjectCode == 'foods_allergy' && that.questionObject.foods_allergy_v ==
'1') {
that.questionObject.foods_deviation = '2'
that.zhushi('删除')
//
} else if (that.cardRadio[index].subjectCode == 'foods_allergy' && that.questionObject
.foods_allergy_v != '1') {
that.zhushi('新增')
}
//
} else {
if (that.questionObject.foods_allergy_v == '1') {
that.questionObject.foods_deviation = '2'
that.zhushi('删除')
} else {
that.zhushi('新增体重')
}
}
if (index == that.cardRadio.length - 1) {
that.cardRadio[index].hidden = true
that.$set(that, 'isNext', true)
} else {
that.cardRadio[index + 1].hidden = true
}
let data = that.cardRadio[index].diseaseAssessSubjectOption
let a = []
data.map(item => {
if (item.hidden) {
a.push(item.optionValue)
}
})
that.cardRadio[index].defaultValue = a.toString()
that.questClass(index)
},
//
inputChange(e) {
this.pulseNum = e.detail.value
},
//
nextBlanQuestion(index) {
let that = this;
if (that.pulseNum == '') return toast('请填写')
//
that.key = that.cardRadio[index].subjectCode
that.$set(that.questionObject, that.key, that.pulseNum)
if (Number(that.questionObject.sport_pulse) * 4 < 55) {
that.cardRadio.map((dataItem, dataIndex) => {
if (dataIndex == index + 1) {
that.toiceList = that.cardRadio.slice(dataIndex, that.cardRadio.length - 1)
}
})
that.cardRadio.splice(index + 1)
that.$set(that, 'isNext', true)
that.$set(that.cardRadio[index], 'defaultValue', that.pulseNum + '次')
that.submitMultiple()
return
}
if (that.tk_num == 0 && Number(that.questionObject.sport_pulse) * 4 >= 105) {
uni.showModal({
title: '提示',
content: '建议静坐5min后复测',
success: function(res) {
that.$set(that, 'tk_num', 1)
}
});
return
}
if (that.tk_num == 1 && Number(Number(that.questionObject.sport_pulse) * 4) >= 150) {
that.cardRadio.map((dataItem, dataIndex) => {
if (dataIndex == index + 1) {
that.toiceList = that.cardRadio.slice(dataIndex, that.cardRadio.length - 1)
}
})
that.cardRadio.splice(index + 1)
that.$set(that, 'isNext', true)
that.$set(that.cardRadio[index], 'defaultValue', that.pulseNum + '次')
that.submitMultiple()
return
}
//
if (index == that.cardRadio.length - 2) {
that.$set(that.cardRadio[index], 'hidden', true)
that.$set(that, 'isNext', true)
} else {
if (that.toiceList.length == 0) {
that.cardRadio.map((dataItem, dataIndex) => {
if (dataIndex == index + 1) {
that.toiceList = that.cardRadio.slice(dataIndex, that.cardRadio.length - 1)
}
})
} else {
that.toiceList.map(dataItem => {
that.cardRadio.push(dataItem)
})
}
that.$set(that, 'isNext', false)
that.$set(that.cardRadio[index + 1], 'hidden', true)
}
that.$set(that.cardRadio[index], 'defaultValue', that.pulseNum + '次')
that.questClass(index)
},
zhushi(val) {
this.cardRadio.map((item, index) => {
if (val == '删除') {
if (item.subjectCode == 'foods_deviation') {
this.cardRadio.splice(index, 1)
}
} else {
//
if (item.subjectCode == 'foods_allergy') {
if (val == '新增') {
if (this.cardRadio[index + 1].subjectCode != 'foods_deviation') {
this.cardRadio.splice(index + 1, 0, this
.currentFive) //splice(,0,1,2,3)
}
} else {
if (this.cardRadio[index + 2].subjectCode != 'foods_deviation') {
this.cardRadio.splice(index + 2, 0, this
.currentFive) //splice(,0,1,2,3)
}
}
}
}
})
},
//
submitMultiple() {
const index = this.cardRadio.length
let that = this
let questionObject = JSON.stringify(that.questionObject)
that.$refs.popup.open() //
that.$API.beingGenerated({
data: {
...that.userParameters,
planId: that.planId,
buildStatus: 1
}
}).then(tores => {
that.$API.openDayTaskDetail({
data: {
...that.userParameters,
diseaseId: that.diseases,
subjectJson: questionObject,
planId: that.planId,
}
})
})
},
//
submit() {
this.$refs.popup.close()
if (window.Android) {
window.Android.submit()
}
if (window.webkit) {
window.webkit.messageHandlers.submit.postMessage("");
}
},
}
}
</script>
<style lang="scss" scoped>
@import './diseaseIndex.scss'
</style>

View File

@ -0,0 +1,182 @@
.pageBox {
background: linear-gradient(180deg, #E4F5EB 0.01%, rgba(228, 245, 235, 0.00) 20%);
.topWidth {
width: 100%;
height: 32rpx;
background: #FFFFFF;
border: 7rpx solid #6ACBD1;
border-radius: 40rpx;
}
.tagWidth {
display: inline-block;
width: 6rpx;
height: 32rpx;
background: #3AAFB8;
border-radius: 50rpx;
margin-right: 8rpx;
}
.greyBg{
padding: 24rpx 20rpx;
background: #EBF7F8;
border-radius: 16rpx;
text-indent: 2rem;
}
.whiteShaw {
width: calc(100% -24rpx);
background: #FFFFFF;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0, 0, 0, 0);
margin-top: -28rpx;
margin-left: 12rpx;
.topBg {
width: 100%;
height: 32rpx;
background: linear-gradient(180deg, rgba(56, 176, 184, 0.30) 0%, rgba(56, 176, 184, 0.00) 100%);
}
.contonentPadding {
padding: 16rpx 20rpx 32rpx;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0,0,0,0.1);
.charts-box {
width: 630rpx;
height: 500rpx;
}
}
}
.charts-box {
width: 100%;
height: 300px;
}
.lineHeight {
font-size: 28rpx;
line-height: 44rpx;
text-indent: 2rem;
}
.card{
padding: 32rpx 20rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin-top: 32rpx;
margin-left: 12rpx;
}
.leftImg {
width: 112rpx;
height: 112rpx;
border-radius: 8rpx;
margin-right: 20rpx;
}
.contioner {
padding: 32rpx 20rpx;
color: #3F4040;
.titleBg {
background: #EBF7F8;
border-radius: 16rpx;
padding: 20rpx;
line-height: 44rpx;
font-size: 28rpx;
}
.text-indent{
text-indent: 2rem;
}
.location {
width: 34rpx;
height: 42rpx;
}
.averImage {
$wh: 40rpx;
width: $wh;
height: $wh;
border-radius: 50rpx;
}
.progress {
height: 12rpx;
margin-right: 2rpx;
&:first-child {
border-radius: 50rpx 0rpx 0rpx 50rpx;
}
&:nth-last-child(1) {
border-radius: 0 50rpx 50rpx 0;
margin-right: 0rpx;
}
}
.title {
color: #686E75;
border-bottom: 2rpx solid #686E75;
}
.tableList {
.line {
border-top: 2rpx solid #EEE;
border-bottom: 2rpx solid #EEE;
padding: 20rpx 0;
color: #17191A;
&:first-child {
border-left: 2rpx solid #EEE;
border-right: 2rpx solid #EEE;
}
&:nth-last-child(1) {
border-left: 2rpx solid #EEE;
border-right: 2rpx solid #EEE;
}
}
}
}
.pupupCard {
width: 650rpx;
height: 874rpx;
border-radius: 16rpx;
overflow: hidden;
font-size: 28rpx;
position: relative;
color: #333333;
.drawerBg {
position: absolute;
top: 0;
right: 0;
z-index: -1;
width: 100%;
height: 100%;
}
.drawerLogo {
width: 236rpx;
height: 266rpx;
margin-top: 40rpx;
}
.wenTitle {
font-size: 40rpx;
font-weight: bold;
margin-top: 38rpx;
}
.bottomTitle {
text-indent: 2rem;
padding: 16rpx 32rpx 24rpx;
letter-spacing: 3rpx;
line-height: 50rpx;
}
.btn {
width: 328rpx;
line-height: 80rpx;
text-align: center;
background: #3AAFB8;
border-radius: 50rpx;
color: #FFFFFF;
}
}
}

View File

@ -0,0 +1,412 @@
<template>
<view class="pageBox" v-if="isLoading">
<!--全部计划-->
<view class="contioner">
<view class="topWidth"></view>
<view class="whiteShaw color">
<view class="topBg"></view>
<view class="contonentPadding">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl">您的抑郁情绪量表为 {{depression.resultLevelRemark}}</text>
</view>
<!-- 结论 -->
<view class="titleBg padding text-sm marginTop-lg text-indent">
{{depression.resultInfo}}
</view>
<!-- 建议 -->
<view class="text-sm marginTop-sm">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl">建议</text>
</view>
<view class="lineHeight marginTop-sm">
{{depression.resultProposal}}
</view>
</view>
<!-- 指导 -->
<view class="flex-contion marginTop-sm">
<text class="tagWidth"></text>
<text class="text-xl">指导</text>
</view>
<block v-for="(item,index) in depression.directionInfo" :key="item.directionUrl">
<view class="marginTop flex-contion" @tap="goHealthBook(item.directionUrl)">
<image :src="item.directionImg" class="leftImg"></image>
<view class="flex-sub">{{item.directionName}}</view>
</view>
</block>
</view>
</view>
<view class="card padding marginBottom-sm">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl">您的焦虑情绪量表为 {{anxiety.resultLevelRemark}}</text>
</view>
<!-- 结论 -->
<view class="titleBg padding text-sm marginTop-lg text-indent">
{{anxiety.resultInfo}}
</view>
<!-- 建议 -->
<view class="text-sm marginTop-sm">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl">建议</text>
</view>
<view class="lineHeight marginTop-sm">
{{anxiety.resultProposal}}
</view>
</view>
<!-- 指导 -->
<view class="flex-contion marginTop-sm">
<text class="tagWidth"></text>
<text class="text-xl">指导</text>
</view>
<block v-for="(item,index) in anxiety.directionInfo" :key="item.directionUrl">
<view class="marginTop flex-contion" @tap="goHealthBook(item.directionUrl)">
<image :src="item.directionImg" class="leftImg"></image>
<view class="flex-sub">{{item.directionName}}</view>
</view>
</block>
</view>
<!-- 14天情绪 -->
<view class="card padding" v-if="type==1||type==46">
<view class="flex-contion marginBottom-sm">
<text class="tagWidth"></text>
<text class="text-xl">情绪智力量表</text>
</view>
<view class="flex">
<view class="flex-sub text-center" style="background: #EBF7F8;padding: 20rpx 0;">情绪名称</view>
<view class="flex-sub text-center" style="background: #EBF7F8;padding: 20rpx 0;">得分</view>
</view>
<block v-for="(item1,index1) in scoreList" :key="item1.name">
<view class="tableList flex text-sm">
<view class="line flex-sub text-center">{{item1.name}}</view>
<view class="line flex-sub text-center">{{item1.score}}</view>
</view>
</block>
<!-- 测试结果 -->
<block v-for="(item2,index2) in resultList" :key="item2.name">
<!-- 结论 -->
<view class="titleBg padding text-sm marginTop-lg">
<view class="margin-bottom-xs">{{item2.name}}:</view>
<view class="text-indent">{{item2.conclusion}}</view>
</view>
</block>
</view>
<!-- 14天压力 -->
<view class="card padding" v-if="type==2||type==47">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl">您的简易应对方式量表为 {{emotional.result}}</text>
</view>
<!-- 结论 -->
<view class="titleBg padding text-sm marginTop-lg text-indent">
{{emotional.conclusion}}
</view>
<!-- 建议 -->
<view class="text-sm marginTop-sm">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl">建议</text>
</view>
<view class="lineHeight marginTop-sm">
{{emotional.advice}}
</view>
</view>
</view>
<view class="card padding marginTop-sm" v-if="type==46||type==47">
<view class="charts-box">
<qiun-data-charts type="line" :opts="opts" :chartData="chartData" inScrollView />
</view>
</view>
</view>
<view class="placeholder"></view>
<view class="btnList">
<view class="btn" @tap="startPlanning">完成任务</view>
</view>
<!-- 触底弹框 -->
<uni-popup type="center" ref="popup" :is-mask-click="false">
<view class="pupupCard">
<image src="https://shayu5qny.yhy.ren/drawerBg.png" class="drawerBg"></image>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/drawerLogo.png" class="drawerLogo"></image>
</view>
<view class="text-center wenTitle">温馨提示</view>
<view class="bottomTitle" v-if="type == 2">
尊贵的会员<text
style="color: #3AAFB8;">{{userName}}</text>您好欢迎参加14天压力管理计划您的健康信息已经收到请您先详细阅读您的压力报告您个性化减压方案正在生成为了确保方案的科学性方案审核后次日在计划-每日任务中即可查看谢谢支持愿您有个良好心态面对压力
</view>
<view class="bottomTitle" v-else>
尊贵的会员<text
style="color: #3AAFB8;">{{userName}}</text>您好欢迎参加14天情绪管理计划您的健康信息已经收到请您先详细阅读您的情绪报告您个性化情绪管理方案正在生成为了确保方案的科学性方案审核后次日在计划-每日任务中即可查看谢谢支持愿您每天都有愉悦的心情开启美好的生活
</view>
<view class="flex-conter">
<view class="btn" @click="close">我知道了</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading,
goPage
} from "/tool/index.js"
export default {
data() {
return {
isLoading: false, //
userParameters: {}, //
isPopup: false, //
type: null, // 1 14 2 14
userName: '', //
title: '', //
anxiety: {},
depression: {},
emotional: {},
scoreList: [], //
resultList: [], //
locationOne: null, //
locationTwo: null, //
//
progressName: [{
bgColor: '#1FD3E1'
}, {
bgColor: '#FFE3A4'
}, {
bgColor: '#FFB104'
}, {
bgColor: '#FF4504'
}],
pressureName: [{
bgColor: '#1FD3E1',
name: '积极应对倾向'
}, {
bgColor: '#FFE3A4',
name: '中间应对倾向'
}, {
bgColor: '#FF4504',
name: '消极应对倾向'
}],
userPlanId: '',
taskId: '',
chartData: {},
// config-ucharts.js ['line'] opts opts
opts: {
padding: [15, 10, 0, 15],
legend: {},
xAxis: {
disableGrid: true,
},
yAxis: {
gridType: "dash",
dashLength: 2
},
extra: {
line: {
type: "straight",
width: 2,
activeType: "hollow"
}
}
}
}
},
onLoad(opt) {
let data = JSON.parse(decodeURIComponent(opt.params))
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
}
if (data.userParameters) {
this.userParameters = JSON.parse(data.userParameters) //
} else {
this.userParameters.userId = data.userId //id
}
this.type = data.type
this.userName = data.name
if (data.type == 46 || data.type == 47) {
this.userPlanId = data.userPlanId
this.taskId = data.taskId
this.getResult()
}
this.getInfo()
},
//
onReachBottom() {
if (!this.isPopup && this.type != 46 && this.type != 47) {
this.isPopup = true
setTimeout(() => {
this.$refs.popup.open()
}, 3000)
}
},
methods: {
//
getResult() {
this.$API.getResultEmotion({
data: {
...this.userParameters,
userPlanId: this.userPlanId,
taskId: this.taskId
},
}).then(res => {
let ret = {
categories: ["开始", "结束"],
series: [{
name: "",
data: res.data.anxietys
},
{
name: "",
data: res.data.depresseds
},
{
name: "",
data: res.data.emotions
}
]
};
if (this.type == 46) {
ret.series[0].name = "焦虑分数"
ret.series[1].name = "抑郁分数"
ret.series[2].name = "情绪智力分数"
} else {
ret.series[0].name = "简易应对分数"
ret.series[1].name = "感知压力分数"
ret.series[2].name = "焦虑自评分数"
}
this.chartData = JSON.parse(JSON.stringify(ret));
})
},
async getInfo() {
showLoading('加载中...')
let that = this
let ret = {}
if (this.type == 1 || this.type == 46) {
if (this.type == 1) {
this.title = '情绪报告'
} else {
this.title = '情绪对比分析'
}
if (this.type == 1) {
ret = await this.$API.getEmotionManagement({
data: this.userParameters
})
} else {
ret = await this.$API.getEmotionManagement({
data: {
...this.userParameters,
userPlanId: this.userPlanId,
taskId: this.taskId
}
})
}
this.anxiety = ret.data.anxiety
this.depression = ret.data.depression
this.emotional = ret.data.emotional
this.depression.directionInfo = JSON.parse(ret.data.depression.directionInfo)
this.anxiety.directionInfo = JSON.parse(ret.data.anxiety.directionInfo)
this.scoreList = JSON.parse(ret.data.emotional.score)
this.resultList = JSON.parse(ret.data.emotional.conclusion)
this.anxiety.tableTitle = '焦虑情绪'
this.emotional.tableTitle = '情绪智力'
this.getProgressqxu()
} else if (this.type == 2 || this.type == 47) {
if (this.type == 2) {
this.title = '减压报告'
} else {
this.title = '减压对比分析'
}
if (this.type == 2) {
ret = await this.$API.getStressManagement({
data: this.userParameters
})
} else {
ret = await this.$API.getStressManagement({
data: {
...this.userParameters,
userPlanId: this.userPlanId,
taskId: this.taskId
}
})
}
this.anxiety = ret.data.anxiety
this.depression = ret.data.depression
this.emotional = ret.data.emotional
this.depression.directionInfo = JSON.parse(ret.data.depression.directionInfo)
this.anxiety.directionInfo = JSON.parse(ret.data.anxiety.directionInfo)
this.anxiety.tableTitle = '焦虑情绪'
this.depression.tableTitle = '感知压力'
this.emotional.tableTitle = '简易应对方式'
this.getProgressjya()
}
//
if (ret.data.depression.resultLevel == 1) that.$set(that, 'locationOne', 10)
if (ret.data.depression.resultLevel == 2) that.$set(that, 'locationOne', 36)
if (ret.data.depression.resultLevel == 3) that.$set(that, 'locationOne', 60)
if (ret.data.depression.resultLevel == 4) that.$set(that, 'locationOne', 85)
if (ret.data.anxiety.resultLevel == 1) that.$set(that, 'locationTwo', 10)
if (ret.data.anxiety.resultLevel == 2) that.$set(that, 'locationTwo', 36)
if (ret.data.anxiety.resultLevel == 3) that.$set(that, 'locationTwo', 60)
if (ret.data.anxiety.resultLevel == 4) that.$set(that, 'locationTwo', 85)
this.$nextTick(() => {
that.$set(that, 'isLoading', true)
})
hideLoading()
},
//
getProgressjya() {
this.progressName[0].nameOne = '较低'
this.progressName[0].nameTwo = '无焦虑'
this.progressName[1].nameOne = '适中'
this.progressName[1].nameTwo = '轻微'
this.progressName[2].nameOne = '较高'
this.progressName[2].nameTwo = '中度'
this.progressName[3].nameOne = '非常高'
this.progressName[3].nameTwo = '重度'
},
//
getProgressqxu() {
this.progressName[0].nameOne = '无抑郁'
this.progressName[0].nameTwo = '无焦虑'
this.progressName[1].nameOne = '轻微'
this.progressName[1].nameTwo = '轻微'
this.progressName[2].nameOne = '中度'
this.progressName[2].nameTwo = '中度'
this.progressName[3].nameOne = '重度'
this.progressName[3].nameTwo = '重度'
},
//
goHealthBook(id) {
if (window.Android) {
window.Android.goHealthBook(id)
}
if (window.webkit) {
window.webkit.messageHandlers.goHealthBook.postMessage(id);
}
},
//
close() {
this.$refs.popup.close()
},
//
startPlanning() {
if (window.Android) {
window.Android.startPlanning()
}
if (window.webkit) {
window.webkit.messageHandlers.startPlanning.postMessage("");
}
},
}
}
</script>
<style lang="scss" scoped>
@import './moodRequest.scss';
</style>

View File

@ -0,0 +1,217 @@
.pageBox {
background: linear-gradient(180deg, #E4F5EB 0.01%, rgba(228, 245, 235, 0.00) 99.99%);
.topWidth {
width: 100%;
height: 32rpx;
background: #FFFFFF;
border: 7rpx solid #6ACBD1;
border-radius: 40rpx;
}
.tagWidth {
display: inline-block;
width: 6rpx;
height: 32rpx;
background: #3AAFB8;
border-radius: 50rpx;
margin-right: 8rpx;
}
.greyBg{
padding: 24rpx 20rpx;
background: #EBF7F8;
border-radius: 16rpx;
text-indent: 2rem;
}
.whiteShaw {
width: calc(100% -24rpx);
background: #FFFFFF;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0, 0, 0, 0);
margin: -28rpx 0 50rpx 12rpx;
.topBg {
width: 100%;
height: 32rpx;
background: linear-gradient(180deg, rgba(56, 176, 184, 0.30) 0%, rgba(56, 176, 184, 0.00) 100%);
}
.contonentPadding {
padding: 16rpx 20rpx 40rpx;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0,0,0,0.1);
.gardenClass{
position: absolute;
left: 0;
bottom: -20rpx;
width: 100%;
.circle3 {
width: 44rpx;
height: 22rpx;
border-radius: 0 0 50rpx 50rpx;
background: #FFFFFF;
}
}
.charts-box {
width: 630rpx;
height: 500rpx;
}
}
}
.contioner {
padding: 32rpx 20rpx;
color: #3F4040;
.title {
background: #EBF7F8;
border-radius: 16rpx;
padding: 20rpx;
text-indent: 2rem;
line-height: 44rpx;
font-size: 28rpx;
}
.titleBorder {
color: #686E75;
border-bottom: 2rpx solid #686E75;
}
.tableList {
.line {
border-top: 2rpx solid #EBF7F8;
;
border-bottom: 2rpx solid #EBF7F8;
padding: 20rpx 0;
color: #112950;
&:first-child {
border-left: 2rpx solid #EBF7F8;
border-right: 2rpx solid #EBF7F8;
}
&:nth-last-child(1) {
border-left: 2rpx solid #EBF7F8;
border-right: 2rpx solid #EBF7F8;
}
}
}
.location {
width: 34rpx;
height: 42rpx;
}
.averImage {
width: 40rpx;
height: 40rpx;
border-radius: 50rpx;
}
.progress {
height: 12rpx;
margin-right: 2rpx;
&:first-child {
border-radius: 50rpx 0rpx 0rpx 50rpx;
}
&:nth-last-child(1) {
border-radius: 0 50rpx 50rpx 0;
margin-right: 0rpx;
}
}
.lineHeight {
font-size: 28rpx;
line-height: 44rpx;
text-indent: 2rem;
}
}
.riskFactor {
background: #FFFFFF;
border-radius: 16rpx;
margin-left: 12rpx;
.leftColor {
color: #112950;
}
.rightColor {
color: #8E9AAB;
}
.table {
background: #EBF7F8;
padding: 20rpx 0;
color: #112950;
}
.averImage {
width: 40rpx;
height: 40rpx;
border-radius: 50rpx;
}
.tableList {
.line {
border-bottom: 2rpx solid #EEE;
padding: 20rpx 0;
&:first-child {
border-left: 2rpx solid #EEE;
border-right: 2rpx solid #EEE;
}
&:nth-last-child(1) {
border-left: 2rpx solid #EEE;
border-right: 2rpx solid #EEE;
}
}
}
}
.pupupCard {
width: 650rpx;
height: 874rpx;
border-radius: 16rpx;
overflow: hidden;
font-size: 28rpx;
position: relative;
color: #333333;
.drawerBg {
position: absolute;
top: 0;
right: 0;
z-index: -1;
width: 100%;
height: 100%;
}
.drawerLogo {
width: 236rpx;
height: 266rpx;
margin-top: 40rpx;
}
.wenTitle {
font-size: 40rpx;
font-weight: bold;
margin-top: 38rpx;
}
.bottomTitle {
text-indent: 2rem;
padding: 16rpx 32rpx 24rpx;
letter-spacing: 3rpx;
line-height: 50rpx;
}
.btn {
width: 328rpx;
line-height: 80rpx;
text-align: center;
background: #3AAFB8;
border-radius: 50rpx;
color: #FFFFFF;
}
}
}

View File

@ -0,0 +1,380 @@
<template>
<view class="pageBox">
<!--全部计划-->
<view class="contioner">
<block v-if="formData!=null">
<view class="topWidth"></view>
<view class="whiteShaw color">
<view class="topBg"></view>
<view class="contonentPadding bg-video">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl">您的失眠程度为<text class="themColor">{{formData.result}}</text></text>
</view>
<!-- 结论 -->
<view class="title marginTop">
<block v-if="type==0">
您本次填写的量表得分为{{formData!=null?formData.score:tableData!=null?tableData.score:requestData.score}}
{{formData.conclusion}}
</block>
<block v-else>{{formData.conclusion}}</block>
</view>
<!-- 睡眠问题 -->
<view class="text-df marginTop" v-if="formData.steepIssue!=null">{{formData.steepIssue}}
</view>
<view class="flex-contion marginTop">
<text class="tagWidth"></text>
<text class="text-xl">建议</text>
</view>
<view class="lineHeight marginTop-sm ">{{formData.advice}}</view>
<view class="flex gardenClass">
<view v-for="(garden,gardenIndex) in todos" :key="gardenIndex" class="circle3"></view>
</view>
</view>
</view>
</block>
<block v-if="tableData!=null">
<!-- 量表评分 -->
<view class="riskFactor marginTop-sm padding marginBottom-sm">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl">量表评分</text>
</view>
<!-- 结论 -->
<view class="title padding text-sm marginTop-sm">
{{tableData.result}}
</view>
<view class="marginTop-lg flex table">
<view class="flex-sub text-center text-bold">项目</view>
<view class="flex-sub text-center text-bold">分值</view>
</view>
<view class="tableList flex text-df">
<!-- 项目 -->
<view class="line flex-sub text-center">总分</view>
<!-- 分值 -->
<view class="line flex-sub text-center">{{tableData.score}}</view>
</view>
<view class="tableList flex text-df">
<view class="line flex-sub text-center">对失眠后果的估计</view>
<view class="line flex-sub text-center">{{tableData.insomniaConsequences}}</view>
</view>
<view class="tableList flex text-df">
<view class="line flex-sub text-center">对失眠的担忧</view>
<view class="line flex-sub text-center">{{tableData.insomniaAbout}}</view>
</view>
<view class="tableList flex text-df">
<view class="line flex-sub text-center">对睡眠的期待</view>
<view class="line flex-sub text-center">{{tableData.sleepExpect}}</view>
</view>
<view class="tableList flex text-df">
<view class="line flex-sub text-center">对药物使用的认识</view>
<view class="line flex-sub text-center">{{tableData.drugUse}}</view>
</view>
</view>
</block>
<block v-if="requestData!=null">
<view class="card padding">
<block v-if="type!=17">
<block v-if="type!=33">
</block>
<view class="marginBottom-sm" v-if="type==33">量表结果{{requestData.result}}</view>
<!-- 结论 -->
<view class="title padding text-sm marginTop-lg">
{{requestData.resultInfo||requestData.conclusion}}
</view>
<!-- 建议 -->
<view class="text-sm marginTop-sm" style="color: #686E75;">
<view class="text-lg marginBottom-sm" style="color: #112950;">建议</view>
<view class="lineHeight">
{{requestData.resultProposal||requestData.advice}}
</view>
</view>
<!-- 指导 -->
<block v-if="type!=33">
<view class="flex-contion marginTop-sm">
<text class="tagWidth"></text>
<text class="text-xl">指导</text>
</view>
<block v-for="(item,index) in requestData.directionInfo" :key="item.directionUrl">
<view class="marginTop flex-contion" @tap="goHealthBook">
<image :src="item.directionImg" class="leftImg"></image>
<view class="flex-sub">{{item.directionName}}</view>
</view>
</block>
</block>
</block>
<block v-else>
<view class="marginBottom-sm">情绪智力量表</view>
<block v-for="(item,index) in scoreList" :key="index">
<view class="tableList flex text-sm">
<view class="line flex-sub text-center">{{item.name}}</view>
<view class="line flex-sub text-center">{{item.score}}</view>
</view>
</block>
<!-- 结论 -->
<block v-for="(item,index) in requestList" :key="index">
<view class="margin-bottom-xs marginTop-lg">{{item.name}}</view>
<view class="title padding text-sm">
<view>{{item.conclusion}}</view>
</view>
</block>
</block>
</view>
</block>
<view style="width: 100%;height: 20rpx;"></view>
</view>
<view class="placeholder"></view>
<view class="btnList">
<view class="btn" @tap="startPlanning">完成任务</view>
</view>
<!-- 触底弹框 -->
<uni-popup type="center" ref="popup" :is-mask-click="false" v-if="type==0">
<view class="pupupCard">
<image src="https://shayu5qny.yhy.ren/drawerBg.png" class="drawerBg"></image>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/drawerLogo.png" class="drawerLogo"></image>
</view>
<view class="text-center wenTitle">温馨提示</view>
<view class="bottomTitle">
尊贵的会员<text
style="color: #3AAFB8;">{{userName}}</text>您好欢迎参加21天改善睡眠计划您的健康信息已经收到请您先详细阅读您的睡眠报告您个性化睡眠改善方案正在生成为了确保方案的科学性方案审核后次日在计划-每日任务中即可查看谢谢支持愿您有个健康的睡眠
</view>
<view class="flex-conter">
<view class="btn" @click="close">我知道了</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading,
goPage
} from "/tool/index.js"
export default {
data() {
return {
isPopup: false, //
userParameters: {}, //
userName: '', //
imgurl: '',
//
title: '',
type: 0, // 0
taskId: null, //Id
//
location: 10,
//
progressName: [{
bgColor: "#1FD3E1",
scaleName: '无显著失眠',
}, {
bgColor: "#FFE3A4",
scaleName: '轻度失眠',
}, {
bgColor: "#FFB104",
scaleName: '中度失眠',
}, {
bgColor: "#FF4504",
scaleName: '重度失眠',
}],
formData: null,
//
tableData: null,
requestData: null, //
scoreList: [], //
requestList: [], //
todos:['','','','','','','','','','','','','','','',''],
}
},
onLoad(options) {
let data = JSON.parse(decodeURIComponent(options.params))
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
}
if (data.userParameters) {
this.userParameters = JSON.parse(data.userParameters) //
} else {
this.userParameters.userId = data.userId //id
}
if (data.taskId) {
this.$set(this, 'taskId', data.taskId)
}
this.$set(this, 'userName', data.name)
this.$set(this, 'type', data.type)
this.getInfo()
},
//
onReachBottom() {
if (!this.isPopup && this.type == 0) {
setTimeout(() => {
this.$refs.popup.open()
this.isPopup = true
}, 3000)
}
},
methods: {
//
backChange() {
uni.navigateBack()
},
getInfo() {
showLoading('加载中...')
let that = this
if (that.type == 0) {
that.$API.getPsychologicalResult({
data: this.userParameters
}).then((res) => {
hideLoading()
that.title = '综合报告'
that.tableData = res.data.beliefResult
that.formData = res.data.insomniaResult
that.imgurl = res.data.avatar
that.getLocation()
})
} else if (that.type == 2) {
that.$API.getBeliefResult({
data: {
...that.userParameters,
taskId: that.taskId
}
}).then(res => {
that.title = '个人信念和态度报告'
that.tableData = res.data
that.imgurl = res.data.avatar
hideLoading()
})
} else if (that.type == 1) {
that.$API.getInsomniaResult({
data: {
...that.userParameters,
taskId: that.taskId
}
}).then(res => {
hideLoading()
that.title = '失眠严重程度指数(ISI)报告'
that.formData = res.data
that.imgurl = res.data.avatar
that.getLocation()
})
} else if (that.type == 15 || that.type == 16 || that.type == 32) {
if (that.type == 15) {
that.title = '抑郁自评评估结果报告'
that.progressName[0].scaleName = '无抑郁'
that.progressName[1].scaleName = '轻微'
that.progressName[2].scaleName = '中度'
that.progressName[3].scaleName = '重度'
} else if (that.type == 16) {
that.title = '焦虑自评评估结果报告'
that.progressName[0].scaleName = '无焦虑'
that.progressName[1].scaleName = '轻微'
that.progressName[2].scaleName = '中度'
that.progressName[3].scaleName = '重度'
} else {
that.title = '感知压力评估结果报告'
that.progressName[0].scaleName = '较低'
that.progressName[1].scaleName = '适中'
that.progressName[2].scaleName = '适中'
that.progressName[3].scaleName = '非常高'
}
that.$API.getPsychologyInfo({
data: {
...that.userParameters,
taskId: that.taskId
}
}).then(res => {
hideLoading()
that.requestData = res.data
this.requestData.directionInfo = JSON.parse(res.data.directionInfo)
that.getLocation()
})
} else if (that.type == 17) {
that.title = '情绪智力评估结果报告'
that.$API.getEmotionalInfo({
data: {
...that.userParameters,
taskId: that.taskId
}
}).then(res => {
that.requestData = res.data
this.scoreList = JSON.parse(res.data.score)
this.requestList = JSON.parse(res.data.conclusion)
hideLoading()
})
} else if (that.type == 33) {
that.title = '简易应对方式报告'
that.$API.getSimpleResponse({
data: {
...that.userParameters,
taskId: that.taskId
}
}).then(res => {
that.requestData = res.data
this.scoreList = JSON.parse(res.data.score)
hideLoading()
})
}
},
//
getLocation() {
let that = this
if (that.formData != null) {
//
if (that.formData.insomniaDegree == 0) {
that.$set(that, 'location', 10)
} else if (that.formData.insomniaDegree == 1) {
that.$set(that, 'location', 36)
} else if (that.formData.insomniaDegree == 2) {
that.$set(that, 'location', 60)
} else if (that.formData.insomniaDegree == 3) {
that.$set(that, 'location', 85)
}
} else {
//
if (that.requestData.resultLevel == 1) {
that.$set(that, 'location', 10)
} else if (that.requestData.resultLevel == 2) {
that.$set(that, 'location', 36)
} else if (that.requestData.resultLevel == 3) {
that.$set(that, 'location', 60)
} else if (that.requestData.resultLevel == 4) {
that.$set(that, 'location', 85)
}
}
},
//
goHealthBook() {
if (window.Android) {
window.Android.goHealthBook()
}
if (window.webkit) {
window.webkit.messageHandlers.goHealthBook.postMessage("");
}
},
//
close() {
this.$refs.popup.close()
},
//
startPlanning(){
if (window.Android) {
window.Android.startPlanning()
}
if (window.webkit) {
window.webkit.messageHandlers.startPlanning.postMessage("");
}
},
}
}
</script>
<style lang="scss" scoped>
@import './planningReport.scss'
</style>

View File

@ -0,0 +1,291 @@
.pageBox {
.color{
color: #17191A;
}
.topPostionBg{
position: absolute;
top: 0;
right: 0;
width: 100vw;
height: 528rpx;
background: linear-gradient(155deg, #E4F5EB 0%, rgba(228,245,235,0) 100%);
}
.contioner{
padding: 32rpx;
.backBottom{
position: fixed;
bottom: 10vh;
right: 34rpx;
padding: 12rpx 32rpx;
border-radius: 50rpx;
background: #FFF;
box-shadow: 0 8rpx 8rpx 0 rgba(4, 70, 74, 0.14);
display: flex;
align-items: center;
image{
$wh:24rpx;
width: $wh;
height: $wh;
margin-right: 8rpx;
}
}
.topCard{
padding: 12rpx;
margin-top: 48rpx;
border-radius: 32rpx;
background: #FFFFFF;
.headSculpture{
$wh:112rpx;
width: $wh;
height: $wh;
background: #F3F4F6;
border-radius: 50%;
border: 6rpx solid #FFFFFF;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -52rpx;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
image{
$wh:100rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.border{
border: 1rpx dotted #3AAFB8;
border-radius: 20rpx;
.cut{
display: inline-block;
width: 4rpx;
height: 20rpx;
margin: 0 12rpx;
background: $uni-color;
}
.top{
margin-top: 72rpx;
color: $uni-color;
}
.tag{
padding: 0 20rpx;
line-height: 40rpx;
border-radius: 4rpx;
background: #F3F4F6;
color: #909292;
font-size: 24rpx;
}
}
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.tagWidth{
width: 48rpx;
height: 8rpx;
background: #EFF9F8;
border-radius: 50rpx;
margin-right: 12rpx;
margin-top: 20rpx;
display: inline-block;
}
.tagBgShaw{
background: $uni-color;
}
.introduce {
padding: 20rpx;
width: calc(502rpx - 40rpx);
background: #FFFFFF;
border-radius: 0rpx 16rpx 0rpx 0rpx;
}
.borderBottom{
border-radius: 0rpx 16rpx 16rpx 16rpx;
}
.rightGet{
width: 136rpx;
line-height: 48rpx;
text-align: center;
background: linear-gradient(180deg, #FDC674 0%, #FF9A02 100%);
border-radius: 50rpx;
color: #FFFFFF;
font-size: 24rpx;
margin-left: 38rpx;
}
.evaluation {
width: calc(502rpx - 40rpx);
padding: 20rpx;
margin-top: 16rpx;
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.mask{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
}
.greyTag{
padding: 18rpx 40rpx;
background: #F8F8F8;
border-radius: 16rpx;
margin-top: 20rpx;
color: #3F4040;
.tegWidth{
width: 2rpx;
height: 24rpx;
background: #CCCCCC;
margin: 0 24rpx;
display: inline-block;
}
}
.shawDown{
background: #EFF9F8;
color: $uni-color;
}
.cut{
margin-top: 32rpx;
width: 100%;
height: 1rpx;
background: #eee;
}
.fenge{
width: 2rpx;
height: 80rpx;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
background: #eee;
}
.inputClass{
border: 2rpx solid #3AAFB8;
line-height: 64rpx;
height: 64rpx;
border-radius: 8rpx;
padding:0 20rpx;
margin-top: 20rpx;
}
.cutt {
width: 2rpx;
height: 32rpx;
background: #323232;
opacity: 0.2;
margin-right: 20rpx;
}
.qding{
width: 320rpx;
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
margin: 0 auto;
color: #FFFFFF;
margin-top: 20rpx;
}
.picker-view {
text-align: center;
width: 100%;
margin: 0 auto;
height: 200upx;
overflow: hidden;
font-size: 40rpx;
color: #909292;
.pickerSelected {
color: $uni-color;
}
}
.city-picker {
border-top: 2rpx solid #EEE;
border-bottom: 2rpx solid #EEE;
}
}
.rightLayOut{
display: flex;
align-items: center;
margin-top: 32rpx;
.leftTag{
padding: 20rpx 32rpx;
background: #3AAFB8;
border-radius: 16rpx 0rpx 16rpx 16rpx;
color: #FFFFFF;
margin-right: 24rpx;
}
.rightAvter{
$wh:80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.bottomBtn{
position: fixed;
bottom: 20rpx;
z-index: 10;
width: calc(100% - 64rpx);
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
color: #FFFFFF;
margin-top: 80rpx;
}
}
.pupupCard {
width: 650rpx;
min-height: 854rpx;
border-radius: 16rpx;
padding: 0 0 20rpx;
overflow: hidden;
font-size: 28rpx;
position: relative;
color: #333333;
.drawerBg {
position: absolute;
top: 0;
right: 0;
z-index: -1;
width: 100%;
height: 100%;
}
.drawerLogo {
width: 236rpx;
height: 266rpx;
margin-top: 40rpx;
}
.wenTitle {
font-size: 40rpx;
font-weight: bold;
margin-top: 38rpx;
}
.bottomTitle {
text-indent: 2rem;
padding: 16rpx 32rpx 6rpx;
letter-spacing: 3rpx;
line-height: 50rpx;
}
.btn {
width: 328rpx;
line-height: 80rpx;
text-align: center;
background: #3AAFB8;
border-radius: 50rpx;
color: #FFFFFF;
}
}
}

View File

@ -0,0 +1,672 @@
<template>
<view class="pageBox" v-if="pageShow" @touchmove.stop="">
<view class="topPostionBg"></view>
<view class="contioner">
<view class="topCard bg-video">
<view class="headSculpture">
<image src="https://shayu5qny.yhy.ren/youngerSister.png"></image>
</view>
<view class="border text-center bg-video">
<view class="top text-df text-bold">
<text class="color">鲨鱼宝宝</text>
<text class="cut"></text>
<text>专属评估客服</text>
</view>
<view class="flex-conter margin-top-xs marginBottom">
<view class="tag marginRight-xs">{{(answerList.length*15/60).toFixed(0)}}分钟</view>
<view class="tag marginRight-xs">{{answerList.length}}</view>
</view>
</view>
</view>
<scroll-view scroll-y :style="{'height':srcollHeight}" :scroll-top="scrollView" @scroll="scroll"
scroll-with-animation>
<view class="next" style="padding-top: 32rpx;"></view>
<block v-for="(item,index) in answerList" :key="index">
<view v-show="item.hidden">
<view class="flex bg-video" style="margin-top: 32rpx;">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="color flex-sub">
<!-- 标题 -->
<view class="introduce text-df">{{index + 1 }}: {{item.questionName}}</view>
<!-- 单选样式 -->
<block v-if="item.questionType==1">
<view class="evaluation">
<view class="text-df">单选</view>
<block v-for="(item1,index1) in item.options" :key="index1">
<view :class="['greyTag',item1.hidden?'shawDown':'']"
@click="cardChange(index,index1,item,item1)">
<text class="text-bold">{{item1.sort}}</text>
<text class="tegWidth"></text>
<text>{{item1.optionName}}</text>
</view>
</block>
</view>
</block>
<!-- 多选样式 -->
<block v-if="item.questionType==2">
<view class="evaluation">
<view class="text-df">多选</view>
<checkbox-group>
<label v-for="(item2,index2) in item.options" :key="item2.id"
@tap="multipleCard(item,index1)">
<view :class="['greyTag flex-contion',item2.hidden?'shawDown':'']">
<checkbox color="#3AAFB8" :value="item2.sort"
:checked="item2.hidden" />
<view class="marginLeft-sm">{{item2.optionName}}</view>
</view>
</label>
</checkbox-group>
<view class="qding" @tap="nextStep(index,item)">确认</view>
</view>
</block>
<!-- 时间滑动选择器 -->
<block v-if="item.questionType==3&&item.questionImportType==1">
<view class="evaluation">
<view class="text-df">请选择</view>
<view class="bg-video">
<picker-view class="picker-view" indicator-class="city-picker"
mask-style="background:#E6EFF1;opacity:0" :value="item.importValue1"
@change="oneChange($event,index)">
<picker-view-column>
<view class="item" v-for="(item3,index3) in hours" :key="index3"
:class="item.importValue1[0]==index3?'pickerSelected':''">
{{item3}}
</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item4,index4) in minutes" :key="index4"
:class="item.importValue1[1]==index4?'pickerSelected':''">
{{item4}}
</view>
</picker-view-column>
</picker-view>
<view class="mask" v-if="status=='1'"></view>
</view>
<view class="qding" @tap="nextStep(index,item)">确认</view>
</view>
</block>
<!--2整数数字键盘 3带小数键盘 -->
<block
v-if="item.questionType==3&&(item.questionImportType==2||item.questionImportType==3)">
<view class="evaluation">
<view class="text-df">填空</view>
<view class="inputClass flex-between align-center text-lg fontColor">
<input placeholder="请输入" v-if="item.questionImportType==2" type="number"
:disabled="status==1?true:false" @input="inputChange($event,index)"
:value="item.value" class="flex-sub" />
<input placeholder="请输入" v-else type="digit"
@input="inputChange($event,index)" :disabled="status==1?true:false"
:value="item.value" class="flex-sub" />
<view class="flex-contion">
<view class="cutt"></view>
<view>{{item.questionImportType==2?'次':'小时'}}</view>
</view>
</view>
<view class="qding" @tap="nextStep(index,item)">确认</view>
</view>
</block>
</view>
</view>
<view class="flex justify-end" :class="['quest'+index]" v-if="item.defaultValue!=''">
<view class="rightLayOut">
<view class="leftTag flex-sub">{{item.defaultValue}}</view>
<image :src="userProfile" class="rightAvter"></image>
</view>
</view>
</view>
</block>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
<view class="bottomBtn" @tap="completeAnswer" v-if="isNext&&status!='1'">
完成答题
</view>
<!-- 返回底部 -->
<view class="backBottom" @tap="goBottom" v-show="scrollGun<600&&isBottom">
<image src="https://shayu5qny.yhy.ren/Frame.png"></image>
<view class="text-sm themColor">返回底部</view>
</view>
</view>
<slot>
<Eposter :width="canvasW" :height="canvasH" @on-error="" :list="answerList"
backgroundColor="rgb(255, 255, 255)" @on-success="onSuccess" ref="Eposter">
<view class="eposter Poster1" style="padding-top: 30rpx;">
<view class="Poster1" v-for="(item,index) in answerList" :key="item.id" style="padding-top: 30rpx;">
<view :data-enode="item.questionName+':'+item.importValue1[0]+':'+item.importValue1[1]"
class="Poster1" v-if="item.questionImportType==1">
{{item.questionName+':'+item.importValue1[0]+':'+item.importValue1[1]}}
</view>
<view :data-enode="item.questionName+':'+item.value" class="Poster1" v-else>
{{item.questionName+':'+item.value}}
</view>
</view>
<view class="Poster1 marginTop" data-enode="接下来就请您在今晚就开始按照您所规划的时间规律作息吧!">
接下来就请您在今晚就开始按照您所规划的时间规律作息吧!</view>
</view>
</Eposter>
</slot>
</view>
</template>
<script>
import {
showLoading,
hideLoading,
toast
} from "/tool/index.js"
import Eposter from "@/components/evils-el-poster/Poster.vue";
export default {
components: {
Eposter
},
data() {
return {
userParameters: {}, //
pageShow: false, //
srcollHeight: "", //
scrollView: 0, //
scrollGun: 0, //
fixedHeight: 100000, //
isBottom: false, //
userId: '', //id
userName: '', //
userProfile: '', //
isNext: false, //
answerList: [], //
hours: [], //
minutes: [], //
id: null, //
questionClassId: '', //
taskId: '', //Id
userPlanId: '', //ID
status: 0, //
canvasW: 375, //
canvasH: 0, //
};
},
onLoad(opt) {
let data = JSON.parse(decodeURIComponent(opt.params))
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
}
this.userParameters.userId = data.userId //id
this.id = parseInt(data.type) //id
this.userPlanId = data.userPlanId //ID
this.userProfile = data.headSculpture //
this.userName = data.name //
//
if (data.questionClassId) {
this.questionClassId = data.questionClassId // 0 1 3
this.taskId = data.taskId //Id
this.status = data.status // 0 1 3
}
//
this.getPageData()
//
this.getTime()
},
methods: {
//
Height() {
const query = uni.createSelectorQuery().in(this);
query.select(".next").boundingClientRect((data) => {
//
this.srcollHeight = uni.getSystemInfoSync().windowHeight - data.top - 18 + "px";
}).exec();
},
//
questClass(index) {
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".quest" + index).boundingClientRect((data) => {
this.scrollView = parseInt(this.scrollGun + data.top - 82)
if (index > 3) {
this.isBottom = true
}
}).exec();
}, 0)
},
//
scroll(e) {
this.scrollGun = e.target.scrollTop
},
//
goBottom() {
let num = this.fixedHeight++
this.scrollView = num
},
getImgHh() {
showLoading('保存中...')
let that = this
var query = uni.createSelectorQuery().in(that);
setTimeout(() => {
that.canvasH = that.answerList.length * 70
that.$nextTick(() => {
that.$refs.Eposter.createForElRect('Poster1', true)
})
}, 0)
},
onSuccess(val) {
hideLoading()
wx.saveImageToPhotosAlbum({
filePath: val,
success(res1) {
uni.showToast({
title: '保存成功!',
icon: 'success',
duration: 2000
})
}
})
},
onError(err) {
hideLoading()
console.log(`err`, err);
},
//
async getPageData() {
showLoading('加载中...')
let data = {
...this.userParameters
}
let ret = []
if (this.id == 1 && this.questionClassId != 1) {
// 21
ret = await this.$API.selectQuestAll({
data
})
} else if (this.id == 2) {
// 14
ret = await this.$API.queryEmotionQuest({
data
})
} else if (this.id == 3) {
// 14
ret = await this.$API.queryStressManagement({
data
})
} else {
//
ret = await this.$API.selectQuestById({
data: {
questionClassId: this.questionClassId,
taskId: this.taskId,
userPlanId: this.userPlanId,
...this.userParameters
}
})
}
let obj = ret.data || {}
obj.map((item, index) => {
if (index == 0) {
item.hidden = true
} else {
item.hidden = false
}
console.log(item.questionType, 'questionType')
item.defaultValue = ''
// int
if (item.questionType == 3 && item.questionImportType == 1) {
item.importValue1[0] = parseInt(item.importValue1[0])
item.importValue1[1] = parseInt(item.importValue1[1])
}
})
this.answerList = obj
this.pageShow = true
//
setTimeout(() => {
this.Height()
}, 100)
hideLoading()
},
//
cardChange(index, index1, item, item1) {
let that = this
//
that.answerList[index].options.map((indData, ind) => {
//
if (ind == index1) {
indData.hidden = true
} else {
indData.hidden = false
}
})
that.nextStep(index, item, item1)
},
//
multipleCard(item, index1) {
item.options[index1].hidden = !item.options[index1].hidden
},
//
getTime() {
const date = new Date()
this.hours = []
const hour = date.getHours()
this.minutes = []
const minute = date.getMinutes()
const h = [];
const hs = [];
const m = [];
for (let i = 0; i < 24; i++) {
if (i < 10) {
hs.push('0' + i)
} else {
hs.push(i)
}
}
for (let i = 0; i < 60; i++) {
if (i < 10) {
m.push('0' + i)
} else {
m.push(i)
}
}
this.hours = h.concat(hs);
this.minutes = m;
},
//
oneChange(e, index) {
const val = e.detail.value
let a = this.hours[val[0]]
let b = this.minutes[val[1]]
this.answerList[index].importValue1 = val
this.answerList[index].value = a + ':' + b
},
//
inputChange(e, index) {
this.answerList[index].value = e.detail.value
},
//
nextStep(index, item, item1) {
//
if (item.questionType == 3 && item.questionImportType != 1) {
if (item.value == null)
return toast('请先填写!')
//
if (item.questionImportType == 3 && item.value > 24) {
return toast('时间不能超过24小时')
}
}
//
if (item.questionType == 1) {
item.defaultValue = item1.sort + '.' + item1.optionName
//
} else if (item.questionType == 2) {
let data = item.options
let a = []
data.map(ind => {
if (ind.hidden) {
a.push(ind.optionName)
}
})
item.defaultValue = a.toString()
} else {
//
if (item.questionImportType == 1) {
if (item.value == null) {
item.defaultValue = this.hours[item.importValue1[0]] + ':' + this.minutes[item.importValue1[1]]
} else {
item.defaultValue = item.value
}
//
} else {
console.log(item.value, item.questionImportType, 'item.questionImportType')
item.defaultValue = item.value + (item.questionImportType == 2 ? '次' : '小时')
}
}
//
if (index == this.answerList.length - 1) {
this.$set(item, 'hidden', true)
this.$set(this, 'isNext', true)
} else {
this.$set(this.answerList[index + 1], 'hidden', true)
}
//
if (item.questionType == 3 && item.questionImportType == 1) {
if (item.value == null) {
//
let a = this.hours[item.importValue1[0]]
let b = this.minutes[item.importValue1[1]]
item.value = a + ':' + b
}
item.hidden = true
}
this.questClass(index)
},
//
completeAnswer() {
if (this.$preventClick()) return //
let nowIndex = this.answerList.length - 1
let list = {}
let list2 = {}
let list3 = {}
//
let resqult = []
//
if ((this.id == 1 || this.id == 2 || this.id == 3 || this.id == 46 || this.id == 47) && this
.questionClassId != 1) {
//
this.answerList.map((item, index) => {
let questionCode = item.questionCode
let optionScore = null
//
if (item.questionType == 1 || item.questionType == 2) {
item.options.map((item1) => {
if (item1.hidden) {
optionScore = item1.optionScore
}
})
if (!list[item.questionClassId]) {
list[item.questionClassId] = {
[questionCode]: optionScore
};
} else {
list[item.questionClassId][questionCode] = optionScore;
}
// 3||1 3||2 3||3
} else if (item.questionType == 3) {
if (!list[item.questionClassId]) {
list[item.questionClassId] = {
[questionCode]: item.value
};
} else {
list[item.questionClassId][questionCode] = item.value;
}
}
})
Object.keys(list).map((item) => {
resqult.push({
questionId: item,
result: list[item],
})
})
//
} else {
this.answerList.map((item, index) => {
let questionCode = item.questionCode
let optionScore = null
//
if (item.questionType == 1 || item.questionType == 2) {
item.options.map((item1) => {
if (item1.hidden) {
optionScore = item1.optionScore
}
})
list[questionCode] = optionScore;
// 3||1 3||2 3||3
} else if (item.questionType == 3) {
list[questionCode] = item.value;
}
})
}
//
if ((this.id == 1 || this.id == 2 || this.id == 3) && this.answerList[nowIndex].questionType == 2) {
var falg = true;
for (var i = 0; i < this.answerList[nowIndex].options.length; i++) {
if (this.answerList[nowIndex].options[i].hidden) {
falg = false;
}
}
if (falg) return toast('请先选择!')
this.$API.insertQuestResult({
data: {
result: JSON.stringify(resqult),
userPlanId: this.userPlanId,
...this.userParameters
},
}).then(res => {
uni.showToast({
title: '加入成功!',
icon: 'success',
duration: 2000
})
let a = {
type: 0,
userParameters: JSON.stringify(this.userParameters),
name: this.userName
}
uni.redirectTo({
url: '/pages/plan-questionnaire/planningReport/planningReport?params=' + JSON
.stringify(a)
})
})
} else {
if (this.answerList[nowIndex].questionType == 1 && !this.answerList[nowIndex].hidden) return toast(
'请先选择!') //
//
if (this.answerList[nowIndex].questionType == 3 && (this.answerList[nowIndex].value == null || this
.answerList[nowIndex].value == '')) {
if (this.answerList[nowIndex].questionType == 3 && !this.answerList[nowIndex].hidden) return toast(
'请先填写!')
}
if (this.answerList[nowIndex].questionType == 2) {
//
var falg = true;
for (var i = 0; i < this.answerList[nowIndex].options.length; i++) {
if (this.answerList[nowIndex].options[i].hidden) {
falg = false;
}
}
if (falg) return toast('请先选择!')
}
let result = null
//
if ((this.id == 1 || this.id == 2 || this.id == 3 || this.id == 46 || this.id == 47) && this
.questionClassId != 1) {
result = JSON.stringify(resqult)
//
} else {
result = JSON.stringify(list)
}
showLoading('提交中...')
this.$API.insertQuestResult({
data: {
result: result,
questionId: this.questionClassId,
taskId: this.taskId,
userPlanId: this.userPlanId,
...this.userParameters
}
}).then(res => {
if (this.questionClassId != 3 && this.questionClassId != 4) {
if (this.id == 1 && this.questionClassId != 1) {
hideLoading()
//
let a = {
type: 0,
userParameters: JSON.stringify(this.userParameters),
name: this.userName
}
uni.redirectTo({
url: '/pages/plan-questionnaire/planningReport/planningReport?params=' +
JSON.stringify(a)
})
} else if (this.id == 2) {
//
setTimeout(() => {
hideLoading()
let a = {
type: 1,
userParameters: JSON.stringify(this.userParameters),
name: this.userName
}
uni.redirectTo({
url: '/pages/plan-questionnaire/moodRequest/moodRequest?params=' +
JSON.stringify(a)
})
}, 1000)
//
} else if (this.id == 3) {
setTimeout(() => {
hideLoading()
let a = {
type: 2,
userParameters: JSON.stringify(this.userParameters),
name: this.userName
}
uni.redirectTo({
url: '/pages/plan-questionnaire/moodRequest/moodRequest?params=' +
JSON.stringify(a)
})
}, 1000)
// 15
} else if (this.id == 46 || this.id == 47) {
setTimeout(() => {
hideLoading()
let a = {
type: this.id,
userParameters: JSON.stringify(this.userParameters),
name: this.userName,
userPlanId: this.userPlanId,
taskId: this.taskId
}
uni.redirectTo({
url: '/pages/plan-questionnaire/moodRequest/moodRequest?params=' +
JSON.stringify(a)
})
}, 1000)
} else {
let a = {
type: this.questionClassId,
userParameters: JSON.stringify(this.userParameters),
name: this.userName,
taskId: this.taskId
}
uni.redirectTo({
url: '/pages/plan-questionnaire/planningReport/planningReport?params=' +
JSON.stringify(a)
})
}
} else {
hideLoading()
if (this.questionClassId == 4) {
// this.getImgHh()
this.back()
} else {
uni.showToast({
title: '加入成功!',
icon: 'success',
duration: 2000
})
this.back()
}
}
})
}
},
//
back() {
if (window.Android) {
window.Android.back()
}
if (window.webkit) {
window.webkit.messageHandlers.back.postMessage("");
}
},
}
}
</script>
<style lang="scss">
@import './psychologicalIndex.scss';
</style>

View File

@ -0,0 +1,267 @@
page{
background: #F3F4F6;
}
.pageBox{
.themColor{
color: #3AAFB8;
}
$uni-color:#3AAFB8;
.color{
color: #17191A;
}
.topPostionBg{
position: absolute;
top: 0;
right: 0;
width: 100vw;
height: 528rpx;
background: linear-gradient(155deg, #E4F5EB 0%, rgba(228,245,235,0) 100%);
}
.staging{
width: 470rpx;
height: calc(580rpx - 42rpx);
border-radius: 48rpx;
background: #FFF;
padding: 22rpx 32rpx 20rpx;
.bg{
width: 100%;
height: 224rpx;
background: linear-gradient(180deg, #D8FCFF 0%, #FFF 100%);
position: absolute;
top: 0;
left: 0;
border-radius: 48rpx 48rpx 0 0;
}
.stagingBackground{
width: 268rpx;
height: 166rpx;
}
.threeSix{
margin-top: 36rpx;
}
.oneTwo{
margin-top: 12rpx;
}
.stagBtn{
width: calc(406rpx - 278rpx);
padding: 10rpx 138rpx 10rpx 140rpx;
border-radius: 50rpx;
border: 2rpx solid $uni-color;
background: $uni-color;
margin: 0 auto;
color: #FFF;
margin-top: 32rpx;
}
.colorGrey{
color: #909292;
margin-top: 32rpx;
}
}
.contioner{
padding: 32rpx;
.backBottom{
position: fixed;
bottom: 10vh;
right: 34rpx;
padding: 12rpx 32rpx;
border-radius: 50rpx;
background: #FFF;
box-shadow: 0 8rpx 8rpx 0 rgba(4, 70, 74, 0.14);
display: flex;
align-items: center;
image{
$wh:24rpx;
width: $wh;
height: $wh;
margin-right: 8rpx;
}
}
.topCard{
padding: 12rpx;
margin-top: 48rpx;
border-radius: 32rpx;
background: #FFFFFF;
.headSculpture{
$wh:112rpx;
width: $wh;
height: $wh;
background: #F3F4F6;
border-radius: 50%;
border: 6rpx solid #FFFFFF;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -52rpx;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
image{
$wh:100rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.border{
border: 1rpx dotted #3AAFB8;
border-radius: 20rpx;
.cut{
display: inline-block;
width: 4rpx;
height: 20rpx;
margin: 0 12rpx;
background: $uni-color;
}
.top{
margin-top: 72rpx;
color: $uni-color;
}
.tag{
padding: 0 20rpx;
line-height: 40rpx;
border-radius: 4rpx;
background: #F3F4F6;
color: #909292;
font-size: 24rpx;
}
}
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.introduce {
padding: 20rpx;
width: calc(502rpx - 40rpx);
background: #FFFFFF;
border-radius: 0rpx 16rpx 0rpx 0rpx;
}
.evaluation {
width: calc(502rpx - 40rpx);
padding: 20rpx;
margin-top: 16rpx;
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.greyTag{
padding: 18rpx 40rpx;
background: #F8F8F8;
border-radius: 16rpx;
margin-top: 20rpx;
.tegWidth{
width: 2rpx;
height: 24rpx;
background: #CCCCCC;
margin: 0 24rpx;
display: inline-block;
}
}
.shawDown{
background: #EFF9F8;
}
.cut{
margin-top: 32rpx;
width: 100%;
height: 1rpx;
background: #eee;
}
.fenge{
width: 2rpx;
height: 80rpx;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
background: #eee;
}
}
.rightLayOut{
display: flex;
align-items: center;
margin-top: 32rpx;
.leftTag{
padding: 20rpx 32rpx;
background: #3AAFB8;
border-radius: 16rpx 0rpx 16rpx 16rpx;
color: #FFFFFF;
margin-right: 24rpx;
}
.rightAvter{
$wh:80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.bottomBtn{
position: fixed;
bottom: 20rpx;
width: calc(100% - 64rpx);
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
color: #FFFFFF;
margin-top: 80rpx;
}
}
.centerScoll{
width: 100%;
height: calc(87vh - 184rpx);
}
.black {
width: 32rpx;
height: 32rpx;
}
.blackColor {
color: #8E9AAB;
}
.fontColor {
color: #112950;
}
.singCard {
padding: 40rpx;
background: #FFFFFF;
border-radius: 20rpx;
border: 2rpx solid #DCDEE0;
font-size: 28rpx;
color: #112950;
image {
width: 36rpx;
height: 36rpx;
}
}
.cardShadow {
color: #3AAFB8;
box-shadow: inset 0px 0px 12px 0px rgba(58, 175, 184, 0.8000);
}
.btnPostion{
background: #E6EFF1;
.next {
line-height: 84rpx;
text-align: center;
color: #FFFFFF;
background: #3AAFB8;
border-radius: 42rpx;
margin-bottom: 48rpx;
}
.temporary {
line-height: 84rpx;
text-align: center;
border-radius: 42rpx;
border: 2rpx solid #DCDEE0;
}
}
}

View File

@ -0,0 +1,744 @@
<template>
<view class="pageBox" v-if="isShow" @touchmove.stop="">
<view class="topPostionBg"></view>
<block v-if="temporarily">
<uni-popup type="center" ref="center" :isMaskClick="false">
<view class="staging bg-video">
<view class="bg"></view>
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/stagingBackground.png" class="stagingBackground"></image>
</view>
<view class="text-xxl text-center threeSix text-bold">温馨提示</view>
<view class="text-center text-sm oneTwo">发现您还有一份填了一半的问卷呢</view>
<view class="text-center text-sm">请告诉我您想怎么处理</view>
<view class="stagBtn margin-top-xs" @tap="continueChange">继续填写</view>
<view class="text-center text-df colorGrey" @tap="againQuestion">重新填写</view>
</view>
</uni-popup>
</block>
<view class="contioner" v-else>
<view class="topCard bg-video">
<view class="headSculpture">
<image src="https://shayu5qny.yhy.ren/youngerSister.png"></image>
</view>
<view class="border text-center bg-video">
<view class="top text-df text-bold">
<text class="color">鲨鱼宝宝</text>
<text class="cut"></text>
<text>专属评估客服</text>
</view>
<view class="flex-conter margin-top-xs marginBottom">
<view class="tag marginRight-xs">{{(cardRadio.length*15/60).toFixed(0)}}分钟</view>
<view class="tag marginRight-xs">{{cardRadio.length}}</view>
</view>
</view>
</view>
<scroll-view scroll-y :style="{'height':srcollHeight}" :scroll-top="scrollView" @scroll="scroll"
scroll-with-animation>
<view class="next" style="padding-top: 32rpx;"></view>
<block v-for="(item,index) in cardRadio" :key="index">
<view v-show="item.hidden">
<!-- 单选样式 -->
<view class="flex bg-video" style="margin-top: 32rpx;" v-if="dictNo!='10'">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="color">
<view class="introduce text-df">
<view>{{index + 1 }}: {{item.subInfo}}</view>
<view class="text-sm margin-top-xs" style="color: #5878B4;" v-if="item.memo!=null">
{{item.memo}}
</view>
</view>
<view class="evaluation">
<view class="text-df">单选</view>
<block v-for="(item1,index1) in item.optionList" :key="index1">
<view :class="['greyTag',item1.hidden?'shawDown':'']"
@tap="selectChange(index,index1,item,item1)">
<text class="text-bold">{{item1.optCode}}</text>
<text class="tegWidth"></text>
<text style="color: #3F4040;">{{item1.optValue}}</text>
</view>
</block>
</view>
</view>
</view>
<!-- 单选 是否选项展示样式 -->
<view class="flex bg-video" style="margin-top: 32rpx;" v-else>
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="evaluation fontColor">
<view class="text-df">{{item.subInfo}}</view>
<view class="cut"></view>
<view class="flex bg-video" style="height: 60rpx;">
<block v-for="(item1,index1) in item.optionList" :key="index1">
<view :class="['flex-sub text-center',item1.hidden?'themColor':'']"
@tap="selectChange(index,index1,item,item1)">
<text style="line-height: 80rpx;">{{item1.optValue}}</text>
</view>
</block>
<view class="fenge"></view>
</view>
</view>
</view>
<view class="flex justify-end" :class="['quest'+index]" v-if="item.defaultValue!=null">
<view class="rightLayOut">
<view class="leftTag flex-sub">{{item.defaultValue}}</view>
<image :src="userProfile" class="rightAvter"></image>
</view>
</view>
</view>
</block>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
<view class="bottomBtn" @tap="submit" v-if="isNext">生成评估报告</view>
<!-- 返回底部 -->
<view class="backBottom" @tap="goBottom" v-show="scrollGun<600&&isBottom">
<image src="https://shayu5qny.yhy.ren/Frame.png"></image>
<view class="text-sm themColor">返回底部</view>
</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
isShow: false, //
isBottom: false, //
isBumit: false, //
dictNo: '', //
userParameters: {}, //
userProfile: '', //
//
cardRadio: [],
//
temporarily: null,
//
fraction: 0,
//
subject: [],
//
chartMyList: [],
score1: 0,
score2: 0,
positive: false, //08
id: null, //id
isNext: false, //
optionQuest: [], //15
jieguo: '', //15
srcollHeight: "", //
scrollView: 0, //
scrollGun: 0, //
fixedHeight: 100000, //
}
},
onLoad(options) {
let data = JSON.parse(decodeURIComponent(options.params))
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
}
this.userParameters.userId = data.userId //id
this.userProfile = data.headSculpture //
this.userName = data.name //
this.id = data.id //0 id
this.dictNo = data.dicCode //
//
this.temporaryAata()
},
//
beforeDestroy() {
if (!this.isBumit) {
this.temporaryQuestion()
}
},
methods: {
//
Height() {
const query = uni.createSelectorQuery().in(this);
query.select(".next").boundingClientRect((data) => {
//
this.srcollHeight = uni.getSystemInfoSync().windowHeight - data.top - 18 + "px";
}).exec();
},
//
goBottom() {
let num = this.fixedHeight++
this.scrollView = num
},
//
questClass(index) {
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".quest" + index).boundingClientRect((data) => {
this.scrollView = parseInt(this.scrollGun + data.top - 82)
}).exec();
if (index > 3) {
this.isBottom = true
}
}, 100)
},
//
temporaryAata() {
let that = this
that.$API.pagerUserByCode({
data: {
...that.userParameters,
dicCode: that.dictNo,
memberId: that.id
}
}).then((res) => {
// 0 1
if (res.data.queShow == 0) {
that.getInfo()
} else {
that.temporarily = true
that.isShow = true
setTimeout(() => {
that.$refs.center.open()
}, 100)
}
})
},
//
async getInfo() {
showLoading('加载中...')
let that = this
let ret = await that.$API.subjectList({
data: {
...that.userParameters,
dictNo: that.dictNo
}
})
ret.data.map((item, index) => {
if (index == 0) {
item.hidden = true
} else {
item.hidden = false
}
})
that.$set(that, 'cardRadio', ret.data) //
that.isShow = true
//
setTimeout(() => {
that.Height()
}, 100)
hideLoading()
},
//
async againQuestion() {
let that = this
let ret = await that.$API.anewQuery({
data: {
...that.userParameters,
dictCode: that.dictNo,
memberId: that.id
}
})
ret.data[0].hidden = true
//
that.$set(that, 'cardRadio', ret.data)
that.temporarily = false
setTimeout(() => {
that.Height()
}, 100)
},
//
continueChange() {
let that = this
//
that.$API.pagerUserByCode({
data: {
...that.userParameters,
dicCode: that.dictNo,
memberId: that.id
}
}).then((res) => {
// json
var jsarr = JSON.parse(res.data.paperJson);
//
that.$set(that, 'cardRadio', jsarr)
that.temporarily = false
setTimeout(() => {
that.Height()
that.scrollView = 100000
}, 100)
})
},
//
temporaryQuestion() {
let that = this
let paperJson = JSON.stringify(that.cardRadio)
let ret = that.$API.tempSave({
data: {
...that.userParameters,
dictCode: that.dictNo, //
paperJson: paperJson, //
paperState: '0', //
queShow: 1, // 0 1
queScore: that.fraction, //
memberId: that.id
}
})
},
//
submit() {
this.isBumit = true //
if (this.$preventClick()) return
let that = this;
that.cardRadio.map((item, index) => {
item.optionList.map((item1) => {
if (item1.hidden) {
that.subject.push(item1.fraction) //
that.optionQuest.push(item1.optCode) // MBTI
}
})
})
if (that.dictNo != '07' && that.dictNo != '10') {
that.cardRadio.map((item, inx) => {
if (that.dictNo == '04' && inx < 6 && that.cardRadio[0].optionList[0].hidden) {
that.fraction = 0
} else if (that.dictNo == '04' && inx > 5 && that.cardRadio[5].optionList[0].hidden) {
that.fraction = 0
} else {
item.optionList.map((item1, inx1) => {
if (item1.hidden) {
that.fraction += item1.fraction
}
})
}
})
}
//
if (that.dictNo == '06') {
let a = [0, 1, 2, 3, 4]
let b = [5, 6, 7, 8]
let c = [9, 10, 11, 12, 13, 14]
let one = 0;
let two = 0;
let three = 0;
a.map((item) => {
one += that.subject[item]
})
b.map((item) => {
two += that.subject[item]
})
c.map((item) => {
three += that.subject[item]
})
that.chartMyList[0] = parseInt(one / a.length)
that.chartMyList[1] = parseInt(two / b.length)
that.chartMyList[2] = parseInt(three / c.length)
}
//
if (that.dictNo == '08') {
let a = [0, 3, 11, 26, 39, 41, 47, 48, 51, 52, 55, 57]
let b = [2, 8, 9, 27, 37, 44, 45, 50, 54, 64]
let c = [5, 20, 33, 35, 36, 40, 60, 68, 72]
let d = [4, 13, 14, 19, 21, 25, 28, 29, 30, 31, 53, 70, 78]
let e = [1, 16, 22, 32, 38, 56, 71, 77, 79, 85]
let f = [10, 23, 62, 66, 73, 80]
let g = [12, 24, 46, 49, 69, 74, 81]
let h = [7, 17, 42, 67, 75, 82]
let i = [6, 15, 34, 61, 76, 83, 84, 86, 87, 89]
let j = [18, 43, 58, 59, 63, 65, 88]
let one = 0;
let two = 0;
let three = 0;
let four = 0;
let five = 0;
let six = 0;
let seven = 0;
let eight = 0;
let nine = 0;
let ten = 0;
a.map((item) => {
one += that.subject[item]
})
b.map((item) => {
two += that.subject[item]
})
c.map((item) => {
three += that.subject[item]
})
d.map((item) => {
four += that.subject[item]
})
e.map((item) => {
five += that.subject[item]
})
f.map((item) => {
six += that.subject[item]
})
g.map((item) => {
seven += that.subject[item]
})
h.map((item) => {
eight += that.subject[item]
})
i.map((item) => {
nine += that.subject[item]
})
j.map((item) => {
ten += that.subject[item]
})
that.chartMyList[0] = (one / a.length).toFixed(2)
that.chartMyList[1] = (two / b.length).toFixed(2)
that.chartMyList[2] = (three / c.length).toFixed(2)
that.chartMyList[3] = (four / d.length).toFixed(2)
that.chartMyList[4] = (five / e.length).toFixed(2)
that.chartMyList[5] = (six / f.length).toFixed(2)
that.chartMyList[6] = (seven / g.length).toFixed(2)
that.chartMyList[7] = (eight / h.length).toFixed(2)
that.chartMyList[8] = (nine / i.length).toFixed(2)
that.chartMyList[9] = (ten / j.length).toFixed(2)
let abc = 0
that.subject.map((item) => {
if (item > 0) {
abc++
}
})
// 08 true false
if (that.fraction > 160 || (that.chartMyList[0] > 2 || that.chartMyList[1] > 2 || that
.chartMyList[2] > 2 || that.chartMyList[3] > 2 || that.chartMyList[4] > 2 ||
that.chartMyList[5] > 2 || that.chartMyList[6] > 2 || that.chartMyList[7] > 2 ||
that.chartMyList[8] > 2 || that.chartMyList[9] > 2) || abc > 43) {
that.positive = true
} else {
that.positive = false
}
}
//
if (that.dictNo == '10') {
let a = [5, 9, 20, 25, 33, 38, 43, 50, 51, 56]
let b = [2, 6, 12, 16, 23, 24, 26, 27, 32, 37, 42, 46, 51]
let c = [0, 4, 8, 11, 12, 15, 21, 29, 34, 39, 50, 52, 53]
let d = [3, 7, 10, 14, 17, 19, 28, 31, 36, 41, 45, 47, 55]
let e = [1, 13, 18, 22, 30, 35, 40, 44, 48, 49, 54]
let one = 0;
let two = 0;
let three = 0;
let four = 0;
let five = 0;
a.map((item) => {
one += that.subject[item]
})
b.map((item) => {
two += that.subject[item]
})
c.map((item) => {
three += that.subject[item]
})
d.map((item) => {
four += that.subject[item]
})
e.map((item) => {
five += that.subject[item]
})
that.chartMyList[0] = one
that.chartMyList[1] = two
that.chartMyList[2] = three
that.chartMyList[3] = four
that.chartMyList[4] = five
that.fraction = one + two + three + four + five
}
//
if (that.dictNo == '12') {
let a = [0, 5, 8, 11, 14, 17, 18, 21, 23, 26, 29, 33, 37]
let b = [4, 6, 13, 20, 22, 27, 32, 34, 36]
let c = [3, 7, 12, 15, 19, 24, 28, 30]
let d = [2, 9, 25, 31, 38, 39, 40]
let e = [1, 10, 16, 35]
let one = 0;
let two = 0;
let three = 0;
let four = 0;
let five = 0;
a.map((item) => {
one += that.subject[item]
})
b.map((item) => {
two += that.subject[item]
})
c.map((item) => {
three += that.subject[item]
})
d.map((item) => {
four += that.subject[item]
})
e.map((item) => {
five += that.subject[item]
})
that.chartMyList[0] = one
that.chartMyList[1] = two
that.chartMyList[2] = three
that.chartMyList[3] = four
that.chartMyList[4] = five
}
// A
if (that.dictNo == '07') {
let a = [1, 2, 5, 6, 9, 10, 13, 15, 18, 20, 21, 25, 28, 29, 33, 37, 39, 41, 43, 45, 49, 52, 53, 54, 57]
let b = [0, 3, 4, 8, 11, 14, 16, 22, 24, 26, 27, 30, 31, 34, 38, 40, 46, 56, 58, 59, 17, 35, 44, 48,
50
]
let c = [7, 12, 19, 23, 32, 36, 42, 47, 51, 55]
let one = 0;
let two = 0;
a.map((item) => {
one += that.subject[item]
})
b.map((item) => {
two += that.subject[item]
})
c.map((item) => {
that.score1 += that.subject[item]
})
that.fraction = one + two
}
//
if (that.dictNo == '11') {
that.score1 = that.subject[0] + that.subject[2] + that.subject[4] + that.subject[6] + that.subject[
8] +
that.subject[10] + that.subject[12] + that.subject[14] + that.subject[16]
that.score2 = that.subject[1] + that.subject[3] + that.subject[5] + that.subject[7] + that.subject[
9] +
that.subject[11] + that.subject[13] + that.subject[15] + that.subject[17]
}
// MBTI
if (that.dictNo == '15') {
let a = [3, 7, 11, 13, 17, 18, 21, 22, 25, 26, 33, 34, 41, 47, 53, 59, 61, 65, 66, 71, 76]
let b = [2, 4, 12, 14, 23, 28, 31, 36, 39, 43, 46, 49, 52, 54, 57, 60, 62, 72, 73, 78, 81, 82, 85, 86,
89, 92
]
let c = [5, 15, 29, 30, 37, 38, 44, 45, 50, 51, 55, 56, 63, 68, 74, 77, 79, 80, 83, 84, 87, 88, 90, 91]
let d = [0, 1, 6, 8, 9, 10, 16, 19, 20, 24, 27, 32, 35, 40, 42, 48, 58, 64, 67, 69, 70, 75]
let E = ['A', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'B', 'A', 'B', 'B', 'B', 'B', 'B', 'A', 'B', 'A',
'B', 'A'
];
let I = ['B', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'A', 'B', 'A', 'A', 'A', 'A', 'A', 'B', 'A', 'B',
'A', 'B'
];
let S = ['A', 'B', 'A', 'B', 'B', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'A', 'B', 'A', 'B',
'B', 'A', 'B', 'A', 'B', 'A', 'A'
];
let N = ['B', 'A', 'B', 'A', 'A', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'B', 'A', 'B', 'A',
'A', 'B', 'A', 'B', 'A', 'B', 'B'
];
let T = ['B', 'B', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B',
'A', 'B', 'A', 'B', 'A'
];
let F = ['A', 'A', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A',
'B', 'A', 'B', 'A', 'B'
];
let J = ['A', 'B', 'B', 'A', 'A', 'B', 'B', 'A', 'B', 'B', 'A', 'B', 'A', 'B', 'A', 'A', 'A', 'B', 'A',
'A', 'B', 'B'
];
let P = ['B', 'A', 'A', 'B', 'B', 'A', 'A', 'B', 'A', 'A', 'B', 'A', 'B', 'A', 'B', 'B', 'B', 'A', 'B',
'B', 'A', 'A'
];
let e = 0
let i = 0
let s = 0
let n = 0
let t = 0
let f = 0
let j = 0
let p = 0
a.map((item, index) => {
if (that.optionQuest[item] == E[index]) {
e += 1
}
if (that.optionQuest[item] == I[index]) {
i += 1
}
})
b.map((item, index) => {
if (that.optionQuest[item] == S[index]) {
s += 1
}
if (that.optionQuest[item] == N[index]) {
n += 1
}
})
c.map((item, index) => {
if (that.optionQuest[item] == T[index]) {
t += 1
}
if (that.optionQuest[item] == F[index]) {
f += 1
}
})
d.map((item, index) => {
if (that.optionQuest[item] == J[index]) {
j += 1
}
if (that.optionQuest[item] == P[index]) {
p += 1
}
})
let jieguoOne = ''
let jieguoTwo = ''
let jieguoThree = ''
let jieguoFour = ''
if (e > i) {
jieguoOne = 'E'
} else {
jieguoOne = 'I'
}
if (s > n) {
jieguoTwo = 'S'
} else {
jieguoTwo = 'N'
}
if (t > f) {
jieguoThree = 'T'
} else {
jieguoThree = 'F'
}
if (j > p) {
jieguoFour = 'J'
} else {
jieguoFour = 'P'
}
that.jieguo = `${jieguoOne}${jieguoTwo}${jieguoThree}${jieguoFour}`
that.chartMyList[0] = e
that.chartMyList[1] = i
that.chartMyList[2] = s
that.chartMyList[3] = n
that.chartMyList[4] = t
that.chartMyList[5] = f
that.chartMyList[6] = j
that.chartMyList[7] = p
}
//
if (that.dictNo == '23') {
let a = [0, 4, 20, 23, 24, 27, 28, 34, 35, 42, 43]
let b = [1, 7, 10, 11, 18, 26, 32, 33, 36, 37, 38, 46, 47, 48]
let c = [5, 12, 13, 15, 19, 21, 22, 29, 30, 31, 39, 44, 45]
let d = [2, 3, 6, 8, 9, 14, 16, 17, 25, 40, 41, 49]
let one = 0;
let two = 0;
let three = 0;
let four = 0;
a.map((item) => {
one += that.subject[item]
})
b.map((item) => {
two += that.subject[item]
})
c.map((item) => {
three += that.subject[item]
})
d.map((item) => {
four += that.subject[item]
})
that.chartMyList[0] = one
that.chartMyList[1] = two
that.chartMyList[2] = three
that.chartMyList[3] = four
}
let paperJson = JSON.stringify(that.cardRadio)
showLoading('提交中...')
that.$API.savePaper({
data: {
...that.userParameters,
dictCode: that.dictNo, //
paperJson: paperJson, //
dimensionFactors: that.chartMyList, //
memberId: that.id, //id
paperState: '1', //
positive: that.positive, //08
score: that.fraction, //
score1: that.score1,
score2: that.score2,
mbti: that.jieguo, //15
}
}).then((res) => {
hideLoading()
let a = {
userParameters: JSON.stringify(this.userParameters),
headSculpture: this.userProfile,
name: this.userName,
id: this.id,
dicCode: this.dictNo,
}
uni.redirectTo({
url: '/pages/psychological-assessment/result/result?params=' + JSON.stringify(a)
})
})
},
scroll(e) {
this.scrollGun = e.target.scrollTop
},
//
selectChange(index, index1, item, item1) {
let that = this
for (var i = 0; i < this.cardRadio[index].optionList.length; i++) {
//
if (i == index1) {
this.$set(this.cardRadio[index].optionList[i], 'hidden', true)
} else {
this.$set(this.cardRadio[index].optionList[i], 'hidden', false)
}
}
this.$set(this.cardRadio[index], 'defaultValue', item1.optCode + '.' + item1.optValue)
if (that.dictNo == '04') {
var falg = 0;
if (index == 0 && index1 == 0) {
for (var i = 1; i < 5; i++) {
that.cardRadio[i].hidden = false
}
that.cardRadio[5].hidden = true
} else if (index == 5 && index1 == 0) {
for (var i = 1; i < 5; i++) {
that.cardRadio[5 + i].hidden = false
}
return that.isNext = true
} else if (index == 0 || index == 5 || index == 4) {
for (var i = index; i < that.cardRadio.length; i++) {
var item = that.cardRadio[i];
if (i + 1 < that.cardRadio.length) {
if (falg == 0 || item.defaultValue) {
if (item.defaultValue) {
falg = 0;
if (i < 5 || (i >= 5 && !that.cardRadio[5].optionList[0].hidden)) {
item.hidden = true
that.cardRadio[i + 1].hidden = true
}
} else {
falg = 1;
that.cardRadio[i + 1].hidden = false
}
} else {
falg = 1;
that.cardRadio[i + 1].hidden = false
}
}
}
} else if (index + 1 < that.cardRadio.length) {
that.cardRadio[index + 1].hidden = true
}
if (index == 9) {
return that.isNext = true
}
} else {
if (that.cardRadio.length - 1 != index) {
that.cardRadio[index + 1].hidden = true
} else {
return that.isNext = true
}
}
that.questClass(index)
},
}
}
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>

View File

@ -0,0 +1,178 @@
.fontColor {
color: #17191A;
}
.grey {
color: #909292;
}
.color {
color: #3F4040;
}
.themColor {
color: #3AAFB8;
}
.redColor{
color: #F87C7C;
}
.bgBackground {
position: fixed;
top: 0;
right: 0;
z-index: 1;
width: 100vw;
height: 606rpx;
background: linear-gradient(145deg, #E4F5EB 0%, rgba(228, 245, 235, 0) 100%);
}
.contioner {
padding: 32rpx;
position: relative;
z-index: 2;
.avter {
$wh: 64rpx;
width: $wh;
height: $wh;
margin-right: 20rpx;
border-radius: 50%;
}
.dotocr {
width: 218rpx;
height: 212rpx;
}
.topWidth {
width: 100%;
height: 32rpx;
background: #FFFFFF;
border: 7rpx solid #6ACBD1;
border-radius: 40rpx;
}
.tagWidth {
display: inline-block;
width: 6rpx;
height: 32rpx;
background: #3AAFB8;
border-radius: 50rpx;
margin-right: 8rpx;
}
.greyBg{
padding: 24rpx 20rpx;
background: #EBF7F8;
border-radius: 16rpx;
text-indent: 2rem;
}
.whiteShaw {
width: calc(100% -24rpx);
background: #FFFFFF;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0, 0, 0, 0);
margin: -28rpx 0 50rpx 12rpx;
.topBg {
width: 100%;
height: 32rpx;
background: linear-gradient(180deg, rgba(56, 176, 184, 0.30) 0%, rgba(56, 176, 184, 0.00) 100%);
}
.contonentPadding {
padding: 16rpx 20rpx 32rpx;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0,0,0,0.1);
.gardenClass{
position: absolute;
left: 0;
bottom: -20rpx;
width: 100%;
.circle3 {
width: 44rpx;
height: 22rpx;
border-radius: 0 0 50rpx 50rpx;
background: #FFFFFF;
}
}
.charts-box {
width: 630rpx;
height: 500rpx;
}
}
}
.card {
margin-top: 32rpx;
padding: 32rpx 20rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin-left: 12rpx;
.leftImg {
width: 112rpx;
height: 112rpx;
border-radius: 8rpx;
margin-right: 20rpx;
}
.progress{
height: 12rpx;
margin-right: 2rpx;
&:first-child{
border-radius: 50rpx 0rpx 0rpx 50rpx;
}
&:nth-last-child(1){
border-radius: 0 50rpx 50rpx 0;
margin-right: 0rpx;
}
}
.triangle{
position: absolute;
top: -32rpx;
width: 0;
height: 0;
border-top: 20rpx solid #009DFF;
border-right: 16rpx solid transparent;
border-left: 16rpx solid transparent;
}
.positive{
color: #F5973F;
}
.cut{
margin: 32rpx 0;
width: 100%;
height: 1rpx;
background: #eee;
}
}
.proposal{
background: #FFFFFF;
border-radius: 16rpx;
margin-left: 12rpx;
.lineHeight{
line-height: 38rpx;
}
.table{
width: 30%;
border: 1rpx solid #EBF1F1;
.border-right{
width: 30%;
border-right: 1rpx solid #EBF1F1;
text-align: center;
}
.orangeBg{
background: rgba(245, 151, 63, 0.20);
}
.border-bottom{
border-bottom: 1rpx solid #EBF1F1;
}
.border-width{
width: 70% !important;
}
}
.table .border-bottom:nth-last-child(1){
border-bottom: none;
}
}
}

View File

@ -0,0 +1,432 @@
<template>
<view>
<view class="bgBackground"></view>
<view class="contioner" v-if="isLoading">
<view class="flex-align">
<view>
<view class="flex-contion">
<image :src="userProfile" class="avter"></image>
<view class="text-bold fontColor">Hi{{userName}}</view>
</view>
<view class="fontColor margin-top-xs">欢迎开启您的专属心理报告</view>
</view>
<image src="https://shayu5qny.yhy.ren/dotocr.png" class="dotocr"></image>
</view>
<view class="topWidth"></view>
<view class="whiteShaw color">
<view class="topBg"></view>
<view class="contonentPadding bg-video">
<view class="flex">
<text class="tagWidth margin-top-xs"></text>
<text class="text-xl text-bold">您的本次评估结果为
<text class="themColor" v-if="dictNo!=15">{{progressName[location-1].scaleName}}</text>
<text class="redColor" v-else>{{resultLevelRemark}}</text>
</text>
</view>
<!-- 扇形 -->
<view class="flex-contion" v-if="dictNo!=15">
<text class="tagWidth"></text>
<text class="text-xl text-bold">您的本次评估结果的分数为<text class="themColor">{{fraction}}</text></text>
</view>
<!-- 雷达图 -->
<view class="charts-box" v-show="dictNo=='06'||dictNo=='08'">
<qiun-data-charts type="radar" inScrollView :opts="opt" :chartData="chartData"
:canvas2d="true" />
</view>
<view class="charts-box" v-show="dictNo=='10'||dictNo=='12'">
<qiun-data-charts type="radar" inScrollView :opts="{legend:{show: false},extra: {radar: {border: true,gridCount: 5,max: max},
}}" :chartData="chartData" :canvas2d="true" />
</view>
<view class="greyBg text-df color" style="margin-top: 32rpx;" v-if="resultInfo!=null">
{{resultInfo}}
</view>
<view class="flex gardenClass">
<view v-for="(garden,gardenIndex) in todos" :key="gardenIndex" class="circle3"></view>
</view>
</view>
</view>
<!-- 07类型显示 -->
<block v-if="dictNo=='07'">
<view class="card padding marginTop">
<!-- 进度条颜色 -->
<view class="flex-contion text-center margin-bottom-xs" style="padding-top: 32rpx;">
<block v-for="(item,index) in progressSeven" :key="index">
<view class="flex-sub progress flex justify-center bg-video"
:style="{background:item.bgColor}">
<view class="triangle" v-if="aLocation-1==index"></view>
</view>
</block>
</view>
<!-- 底部说明 -->
<view class="flex-contion text-sm color text-center marginBottom-sm">
<block v-for="(item1,index1) in progressSeven" :key="index1">
<view class="flex-sub">{{item1.scaleName}}</view>
</block>
</view>
<!-- 结论 -->
<view class="greyBg text-df color">{{resultSevenInfo}}</view>
</view>
</block>
<!-- 建议 -->
<view class="card color" v-if="resultProposal!=null">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl text-bold">建议</text>
</view>
<view class="marginTop text-df" style="text-indent: 2rem;">{{resultProposal}}</view>
</view>
<!-- 15类型的结果 -->
<view class="proposal padding text-df marginTop-sm" v-if="dictNo=='15'">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl text-bold">得分情况</text>
</view>
<view class="flex-align marginTop">
<view>
<view>外向</view>
<view>实感</view>
<view>思考</view>
<view>判断</view>
</view>
<view class="table">
<view class="flex border-bottom">
<view class="border-right orangeBg">E</view>
<view class="flex-sub text-center">{{myChartsData[0]}}</view>
</view>
<view class="flex border-bottom">
<view class="border-right orangeBg">S</view>
<view class="flex-sub text-center">{{myChartsData[2]}}</view>
</view>
<view class="flex border-bottom">
<view class="border-right orangeBg">T</view>
<view class="flex-sub text-center">{{myChartsData[4]}}</view>
</view>
<view class="flex border-bottom">
<view class="border-right orangeBg">J</view>
<view class="flex-sub text-center">{{myChartsData[6]}}</view>
</view>
</view>
<view class="table">
<view class="flex border-bottom">
<view class="border-right border-width">{{myChartsData[1]}}</view>
<view class="flex-sub text-center orangeBg">I</view>
</view>
<view class="flex border-bottom">
<view class="border-right border-width">{{myChartsData[3]}}</view>
<view class="flex-sub text-center orangeBg">N</view>
</view>
<view class="flex border-bottom">
<view class="border-right border-width">{{myChartsData[5]}}</view>
<view class="flex-sub text-center orangeBg">F</view>
</view>
<view class="flex border-bottom">
<view class="border-right border-width">{{myChartsData[7]}}</view>
<view class="flex-sub text-center orangeBg">P</view>
</view>
</view>
<view>
<view>内向</view>
<view>直觉</view>
<view>情感</view>
<view>认知</view>
</view>
</view>
</view>
<!-- 指导 -->
<view class="card color" v-if="directions.length>0">
<view class="flex-contion">
<text class="tagWidth"></text>
<text class="text-xl text-bold">指导</text>
</view>
<block v-for="(item,index) in directions" :key="index">
<view class="marginTop flex-contion" @tap="goHealthBook(item.directionUrl)">
<image :src="item.directionImg" class="leftImg" mode="aspectFill"></image>
<view class="flex-sub text-bold">{{item.directionName}}</view>
</view>
</block>
</view>
<block v-if="dictNo=='08'||dictNo=='23'">
<block v-for="(item,index) in symptom" :key="index">
<view class="card padding text-sm marginTop-sm">
<view class="flex-align">
<view class="flex-contion text-bold">
<text class="color text-xl marginRight-sm">{{item.dimensionName}}</text>
<text class="themColor text-df">{{myChartsData[index]}}</text>
</view>
<view class="text-xl" :class="myChartsData[index]>=2?'positive':'themColor'"
v-if="dictNo!='23'">
{{myChartsData[index]>=2?'阳性':'阴性'}}
</view>
</view>
<view class="cut"></view>
<view class="text-sm contion lineHeight">{{item.dimensionInfo}}</view>
</view>
</block>
</block>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading,
goPage
} from "/tool/index.js"
export default {
data() {
return {
isLoading: false,
todos:['','','','','','','','','','','','','','','',''],
userParameters: {}, //
symptom: [], //
userName: '', //
userProfile: '', //
dictNo: '',
id: '',
dimensionCode: '',
reportId: '',
directions: [],
//
resultInfo: '',
//
resultProposal: '',
progressName: [],
//
location: null,
fraction: '',
// 07
progressSeven: [],
aLocation: '',
//
myChartsData: [],
opt: {
color: ['#3673E8', '#1DCC00'],
fontSize: 10,
legend: {
//
show: true,
position: "bottom",
},
extra: {
radar: {
border: true,
gridCount: 5,
max: 5
},
},
},
//
chartData: {},
max: 0, //
resultLevelRemark: '', //10
}
},
onLoad(options) {
let data = JSON.parse(decodeURIComponent(options.params))
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
}
if (data.userParameters) {
this.userParameters = JSON.parse(data.userParameters) //
} else {
this.userParameters.userId = data.userId //id
}
this.userProfile = data.headSculpture //
this.userName = data.name //
this.dictNo = data.dicCode //
this.id = data.id
if (data.reportId) {
this.reportId = data.reportId // id
this.dimensionCode = data.dimensionCode //
}
this.getInfo()
},
methods: {
async getInfo() {
showLoading('加载中...')
let that = this
let ret = {}
let reg = []
if (that.reportId != null && that.reportId != '') {
reg = await that.$API.assessmentResult({
data: {
...that.userParameters,
dicNo: that.dictNo,
id: that.reportId
}
})
} else {
reg = await that.$API.queryResult({
data: {
...that.userParameters,
dicNo: that.dictNo,
memberId: that.id
}
})
}
//
ret = await that.$API.queryResultByCode({
data: {
...that.userParameters,
dictCode: that.dictNo
}
})
if (that.dictNo != '07') {
//
that.$set(that, 'fraction', reg.data.score)
//
that.resultInfo = reg.data.resultInfo
//
that.resultProposal = reg.data.resultProposal
//
let jsarr = [];
if (reg.data.directionInfo != '[{}]') {
jsarr = JSON.parse(reg.data.directionInfo);
}
that.$set(that, 'location', reg.data.resultLevel)
that.$set(that, 'directions', jsarr)
if (that.dictNo != '15') {
//
that.progressName = ret.data
} else {
that.$set(that, 'resultLevelRemark', reg.data.resultLevelRemark) //
that.$set(that, 'myChartsData', JSON.parse(reg.data.dimensionInfo))
}
} else {
//
that.progressName = ret.data.gradeScales2
that.progressSeven = ret.data.gradeScales1
that.$set(that, 'aLocation', reg.data[0].resultLevel)
that.$set(that, 'location', reg.data[1].resultLevel)
//
that.$set(that, 'fraction', reg.data[0].score)
that.progressSeven[0].bgColor = "#009DFF"
that.progressSeven[1].bgColor = "#FDA92A"
that.progressSeven[2].bgColor = "#F87C7C"
//
that.resultInfo = reg.data[0].resultInfo
that.resultSevenInfo = reg.data[1].resultInfo
//
that.resultProposal = reg.data[0].resultProposal || reg.data[1].resultProposal
let jsarr;
if (reg.data[0].directionInfo != '[{}]') {
jsarr = JSON.parse(reg.data[0].directionInfo);
} else {
jsarr = JSON.parse(reg.data[1].directionInfo);
}
that.$set(that, 'directions', jsarr)
}
hideLoading()
that.$set(that, 'isLoading', true)
//
if (that.dictNo === '06' || that.dictNo === '08' || that.dictNo === '10' || that.dictNo === '12' ||
that.dictNo === '23') {
that.$set(that, 'myChartsData', JSON.parse(reg.data.dimensionInfo))
if (that.dictNo != '23') {
that.getServerData(that.myChartsData);
}
if (that.dictNo == '08' || that.dictNo == '23') {
return that.chartChange()
}
}
},
//
async chartChange() {
let that = this
var data = {}
if (this.dimensionCode != null && this.dimensionCode != '') {
data = {
data: {
dictCode: that.dictNo,
dimensionCode: that.dimensionCode
}
}
} else {
data = {
data: {
dictCode: that.dictNo
}
}
}
that.$API.queryDimensionFactors(data).then((res) => {
//
that.symptom = res.data
that.isLoading = true
})
},
getServerData(myChartsData) {
let that = this
if (that.dictNo == '06') {
let res = {
categories: ['情绪衰竭', '玩世不恭', '成就感低落'],
series: [{
name: "我的得分",
data: myChartsData,
},
{
name: "参考值",
data: [2, 2, 2],
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}
if (that.dictNo == '08') {
let res = {
categories: ['躯体化', '强迫症状', '人际敏感', '忧郁', '焦虑', '敌对', '恐怖', '偏执', '精神病性', '其他'],
series: [{
name: "我的得分",
data: myChartsData,
},
{
name: "参考值",
data: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
}
]
};
console.log(myChartsData, 'myChartsData')
this.chartData = JSON.parse(JSON.stringify(res));
}
if (that.dictNo == '10') {
this.max = Math.max.apply(null, myChartsData);
let res = {
categories: ['感觉能力', '交往能力', '运动能力', '语言能力', '自理能力'],
series: [{
name: "",
data: myChartsData,
}]
};
this.chartData = JSON.parse(JSON.stringify(res));
}
if (that.dictNo == '12') {
this.max = Math.max.apply(null, myChartsData);
let res = {
categories: ['躯体化/惊恐', '广泛焦虑', '分离焦虑', '社交恐怖', '学校恐怖'],
series: [{
name: "",
data: myChartsData,
}]
};
this.chartData = JSON.parse(JSON.stringify(res));
}
},
//
goHealthBook(id) {
if (window.Android) {
window.Android.goHealthBook(id)
}
if (window.webkit) {
window.webkit.messageHandlers.goHealthBook.postMessage(id);
}
},
}
}
</script>
<style scoped lang="scss">
@import './result.scss';
</style>

View File

@ -0,0 +1,82 @@
<template>
<view>
<view class="container">
<view class="card">
<view class="text-bold text-xl">戒烟数据</view>
<view class="flex table text-bold marginTop">
<view class="flex-sub text-center">类别</view>
<view class="flex-sub text-center">当天</view>
<view class="flex-sub text-center">本次累计</view>
</view>
<block v-for="(item1,index1) in List" :key="index1">
<view class="tableList flex text-df">
<!-- 类别 -->
<view class="line flex-sub text-center">{{item1.type}}</view>
<!-- 当天 -->
<view class="line flex-sub text-center">
{{item1.thisDay}}
</view>
<!-- 本次累计 -->
<view class="line flex-sub text-center">{{item1.thisTime}}</view>
</view>
</block>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
List: []
}
},
onLoad() {
this.$SMOKE.smokingCessationData().then(res => {
this.List = res.data
})
},
methods: {
}
}
</script>
<style scoped lang="scss">
.container {
padding: 32rpx;
color: #3F4040;
.card {
padding: 32rpx 24rpx;
border-radius: 16rpx;
background: #FFF;
}
.table {
background: #EBF7F8;
padding: 20rpx 0;
color: #17191A;
}
.tableList {
.line {
border-bottom: 2rpx solid #EEEEEE;
padding: 20rpx 0;
color: #17191A;
&:first-child {
border-left: 2rpx solid #E6EFF1;
border-right: 2rpx solid #E6EFF1;
}
&:nth-last-child(1) {
border-left: 2rpx solid #E6EFF1;
border-right: 2rpx solid #E6EFF1;
}
}
}
}
</style>

View File

@ -0,0 +1,110 @@
<template>
<view class="pageBox">
<view class="contioner">
<input placeholder="请输入标题" class="inputClass" maxlength="15" placeholder-style="color:#CDCDCD"
v-model="title" />
<textarea placeholder="写下你此刻的想法吧" class="marginTop color textClass" maxlength="600"
placeholder-style="color:#CDCDCD" v-model="content" :adjust-position="false" />
</view>
<view class="placeholder"></view>
<view class="btnList">
<view class="btn" @tap="submit">确认</view>
</view>
</view>
</template>
<script>
import {
toast
} from "/tool/index.js"
export default {
data() {
return {
title: '', //
content: '', //
}
},
methods: {
submit() {
if (this.title == '' || this.content == '') return toast('请先填写')
if (this.$preventClick()) return
this.$SMOKE.smokingDiaryAdd({
data: {
title: this.title,
content: this.content
}
}).then(res => {
toast('保存成功')
if (res.code == 200) {
setTimeout(() => {
uni.navigateBack()
}, 500)
}
})
},
}
}
</script>
<style>
page {
background: #fff;
}
</style>
<style scoped lang="scss">
.contioner {
padding: 48rpx 32rpx;
.inputClass {
width: 100%;
height: 80rpx;
line-height: 80rpx;
border-bottom: 1rpx solid #EEE;
color: #17191A;
}
.textClass {
width: 100%;
height: 800rpx;
}
.color {
color: #3F4040;
font-size: 28rpx;
}
}
.placeholder {
height: 100rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
}
.btnList {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
background-color: #fff;
box-shadow: 0 0 10rpx rgba(0, 0, 0, .1);
display: flex;
align-items: center;
height: 110rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.btn {
color: #fff;
text-align: center;
line-height: 80rpx;
background-color: $uni-color;
border-radius: 40rpx;
flex: 1;
margin: 0 32rpx;
font-weight: bold;
}
}
</style>

View File

@ -0,0 +1,127 @@
<template>
<view class="pageBox">
<view class="contioner">
<block v-for="(item,index) in List" :key="index">
<view class="card" v-if="index==0">
<view class="flex-contion" @tap="goResult(item.smokingReportId)">
<image :src="item.smokingReportLevel=='轻度依赖'?'https://shayu5qny.yhy.ren/quitSmoking/qing.png':
item.smokingReportLevel=='中度依赖'?'https://shayu5qny.yhy.ren/quitSmoking/zho.png':
'https://shayu5qny.yhy.ren/quitSmoking/zhong.png'" class="leftImg"></image>
<view class="flex-sub">
<view class="flex-align">
<view>{{item.smokingReportLevel}}</view>
<view class="text-sm">
<text
:class="['title marginRight-xs',item.smokingReportScore<=3?'oneColor':item.smokingReportScore<=6?'twoColor':'threeColor']">{{item.smokingReportScore}}</text>
</view>
</view>
<view class="text-sm greyColor">戒烟什么时候都不晚越早戒烟越好</view>
</view>
</view>
<view class="flex-align margintop-four" @tap="goAssuss">
<view class="text-df greyColor">距离上次评测{{num}}</view>
<view class="themColor flex-contion">重新评估<uni-icons type="right" color="#3AAFB8" size="20">
</uni-icons>
</view>
</view>
</view>
<view class="card flex-align marginTop" @tap="goResult(item.smokingReportId)" v-else>
<view>
<view class="text-bold">评估记录</view>
<view class="text-sm greyColor margin-top-xs">{{item.qtime}}</view>
</view>
<view class="text-sm">
<text
:class="['title marginRight-xs',item.smokingReportScore<=3?'oneColor':item.smokingReportScore<=6?'twoColor':'threeColor']">{{item.smokingReportScore}}</text>
</view>
</view>
</block>
</view>
</view>
</template>
<script>
import {
formatTime
} from "/tool/index.js"
export default {
data() {
return {
num: '', //
List: [],
date: formatTime(new Date()), //
}
},
onLoad() {
console.log(this.date)
this.$SMOKE.smokingReportList().then((res) => {
this.List = res.rows
let diffDate
let myDate_1 = Date.parse(this.date)
let myDate_2 = Date.parse(res.rows[0].qtime)
diffDate = Math.abs(myDate_1 - myDate_2)
this.num = Math.floor(diffDate / (1000 * 3600 * 24))
})
},
methods: {
//
goAssuss() {
uni.navigateTo({
url: '/pages/quitSmoking/question/question'
})
},
//
goResult(id) {
uni.navigateTo({
url: '/pages/quitSmoking/result/result?id=' + id
})
},
}
}
</script>
<style scoped lang="scss">
.contioner {
padding: 40rpx 32rpx;
.card {
padding: 32rpx 24rpx;
background: #FFF;
border-radius: 20rpx;
font-size: 28rpx;
.themColor {
color: $uni-color;
}
.greyColor {
color: #909292;
}
.leftImg {
width: 130rpx;
height: 130rpx;
border-radius: 12rpx;
margin-right: 20rpx;
}
.title {
font-size: 48rpx;
font-weight: bold;
}
.oneColor {
color: $uni-color;
}
.twoColor {
color: #FF901C;
}
.threeColor {
color: #FF4545;
}
}
}
</style>

View File

@ -0,0 +1,154 @@
.pageBox{
color: #3F4040;
.color{
color: #3F4040;
}
.fontColor{
color: #17191A;
}
.greyColor{
color: #909292;
}
.themColor{
color: $uni-color;
}
.fixedBg{
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 728rpx;
}
.contioner{
padding: 68rpx 32rpx 40rpx;
.fourSize{
font-size: 44rpx;
}
.btnWidth{
padding: 6rpx 12rpx;
margin-left: 20rpx;
font-size: 20rpx;
color: #FFF;
border-radius: 6rpx;
}
.oneBg{
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
}
.twoBg{
background: linear-gradient(270deg, #FDC674 0%, #FF9A02 100%);
}
.threeBg{
background: linear-gradient(270deg, #FDAA74 0%, #FF3F02 100%);
}
.lookBtn{
position: absolute;
top: 0;
right: -32rpx;
width: 192rpx;
height: 60rpx;
border-radius: 40rpx 0 0 40rpx;
background: #FFF;
font-size: 26rpx;
image{
width: 40rpx;
height: 40rpx;
margin-right: 4rpx;
}
}
.backgroundPlate{
position: relative;
padding: 32rpx 24rpx 24rpx;
margin-top: 32rpx;
border-radius: 20rpx;
background: linear-gradient(to right, #36AAB1, #6ACBD1);
.leftTitle{
color: #FFF;
font-size: 22rpx;
}
.sixFour{
font-size: 64rpx;
margin-top: 16rpx;
}
.eightPadding{
padding: 0 8rpx;
}
.rightBtn{
padding: 26rpx 40rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 24rpx;
background: rgba(255, 255, 255, 0.60);
.playImg{
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
margin-top: 8rpx;
}
}
.bgCard{
padding: 32rpx 26rpx;
border-radius: 20rpx;
background: #DEF3F4;
margin-top: 24rpx;
.marginLeft-four{
margin-left: 10rpx;
margin-top: 10rpx;
}
.tagCut{
width: 1rpx;
height: 80rpx;
background: #CCE0E1;
}
.love{
width: 20rpx;
height: 20rpx;
}
.branch{
width: 32rpx;
height: 32rpx;
}
.first{
width: 48rpx;
height: 32rpx;
}
.diot{
width: 30rpx;
height: 6rpx;
}
}
}
.card{
padding: 32rpx 24rpx 52rpx;
border-radius: 32rpx;
background: #FFF;
.rightImg{
width: 24rpx;
height: 24rpx;
}
.greyCut{
width: 1rpx;
height: 80rpx;
background: #EEE;
}
.ellipses{
width: 112rpx;
height: 112rpx;
}
.marginPadding{
margin:0 38rpx 0 50rpx;
margin-top: 40rpx;
}
.img{
width: 196rpx;
height: 216rpx;
}
.title{
position: absolute;
top: 24rpx;
left: 14rpx;
z-index: 1;
}
}
}
}

View File

@ -0,0 +1,323 @@
<template>
<view class="pageBox">
<image src="https://shayu5qny.yhy.ren/quitSmoking/indexBg.png" class="fixedBg"></image>
<view class="contioner bg-video">
<view class="bg-video">
<view class="fontColor fourSize text-bold flex-contion">
尼古丁依赖指数
<view v-if="dataInfo.degreeOfDependence!=''"
:class="['btnWidth',dataInfo.degreeOfDependence=='轻度依赖'?'oneBg':dataInfo.degreeOfDependence=='中度依赖'?'twoBg':'threeBg']">
{{dataInfo.degreeOfDependence=='轻度依赖'?'轻度':dataInfo.degreeOfDependence=='中度依赖'?'中度':'重度'}}
</view>
</view>
<view class="text-sm greyColor margin-top-xs" v-if="dataInfo.degreeOfDependence==''">
想知道自己的尼古丁依赖程度吗
</view>
<view class="lookBtn flex-conter" @tap="goAssuss">
<image src="https://shayu5qny.yhy.ren/quitSmoking/lookDetail.png"></image>
<text v-if="dataInfo.timer">{{dataInfo.degreeOfDependence==''?'开始评估':'查看详情'}}</text>
</view>
</view>
<view class="backgroundPlate">
<view class="flex-align">
<view class="leftTitle">
<view class="twoSize">戒烟第 <text class="text-xl eightPadding">{{dataInfo.quitSmokingDay}}</text>
</view>
<view class="sixFour">{{dataInfo.timer}}</view>
</view>
<view class="rightBtn" @tap="start">
{{dataInfo.exist==1?"重置戒烟":"开始戒烟"}}
<image
:src="dataInfo.exist==0?'https://shayu5qny.yhy.ren/quitSmoking/playBtn.png':'https://shayu5qny.yhy.ren/quitSmoking/resets.png'"
class="playImg"></image>
</view>
</view>
<view class="bgCard">
<view class="flex-align" @tap="goDetail">
<view class="text-center flex-grow">
<view class="flex-conter flex-wrap">
<!-- 寿命 时间 -->
<view class="text-bold fourSize">{{dataInfo.lifetime}}</view>
<view class="text-xs greyColor marginLeft-four">小时</view>
</view>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/quitSmoking/love.png" class="love"></image>
<text class="text-xs greyColor marginLeft-xs">寿命</text>
</view>
</view>
<view class="tagCut"></view>
<view class="text-center flex-grow">
<view class="flex-conter flex-wrap">
<!-- 少吸 -->
<view class="text-bold fourSize">{{dataInfo.smokeLess}}</view>
<view class="text-xs greyColor marginLeft-four"></view>
</view>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/quitSmoking/branch.png" class="branch"></image>
<text class="text-xs greyColor marginLeft-xs">少吸</text>
</view>
</view>
<view class="tagCut"></view>
<view class="text-center flex-grow">
<view class="flex-conter flex-wrap">
<!-- 省钱 -->
<view class="text-bold fourSize">{{dataInfo.saveMoney}}</view>
<view class="text-xs greyColor marginLeft-four"></view>
</view>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/quitSmoking/first.png" class="first"></image>
<text class="text-xs greyColor marginLeft-xs">省钱</text>
</view>
</view>
</view>
<!-- 评分 -->
<view class="flex-align marginTop-lg" @tap="goRecove">
<view class="text-sm">健康恢复评分<text class="themColor text-xl text-bold">{{dataInfo.score}}</text>
</view>
<view class="text-sm text-bold">· · ·</view>
</view>
<cmd-progress :percent="dataInfo.percentage" :showInfo="false"
stroke-color="linear-gradient(to right, #36AAB1, #6ACBD1)">
</cmd-progress>
<view class="text-xs greyColor margin-top-xs">生理烟瘾基本消除{{dataInfo.percentage}}%</view>
</view>
</view>
<view class="card marginTop">
<view class="flex-align">
<view class="text-bold text-df">烟瘾记录</view>
<view class="text-sm greyColor flex-contion" @tap="goMore">
查看更多<image src="https://shayu5qny.yhy.ren/quitSmoking/right.png" class="rightImg"></image>
</view>
</view>
<view class="flex-align marginPadding">
<view class="greyColor text-xs text-center">
<view><text class="fourSize color text-bold">{{dataInfo.tobacco}}</text></view>
<view>今日烟瘾</view>
</view>
<view class="greyCut"></view>
<view class="greyColor text-xs text-center">
<view><text class="fourSize color text-bold">{{dataInfo.addUp}}</text></view>
<view>累计次数</view>
</view>
<image src="https://shayu5qny.yhy.ren/quitSmoking/addiction.png" class="ellipses marginLeft-lg"
@tap="tobacco" style="transform: scale(0.9);"></image>
</view>
</view>
<view class="card marginTop">
<view>戒烟活动</view>
<view class="flex-align margintop-four">
<view class="bg-video" @tap="goPage(0)">
<view class="title">
<view class="text-sm fontColor text-bold">戒烟秘籍</view>
<view class="text-xs">带你轻松戒烟</view>
</view>
<image src="https://shayu5qny.yhy.ren/quitSmoking/cessation.png" class="img"></image>
</view>
<view class="bg-video" @tap="goPage(1)">
<view class="title">
<view class="text-sm fontColor text-bold">戒烟日记</view>
<view class="text-xs">记录戒烟时光</view>
</view>
<image src="https://shayu5qny.yhy.ren/quitSmoking/diary.png" class="img"></image>
</view>
<view class="bg-video" @tap="goPage(2)">
<view class="title">
<view class="text-sm fontColor text-bold">时光穿梭</view>
<view class="text-xs">享受健康生活</view>
</view>
<image src="https://shayu5qny.yhy.ren/quitSmoking/shuttle.png" class="img"></image>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
dataInfo: {},
timer: null,
birth: '', //
age: '', //
}
},
onLoad(options) {
this.birth = options.birth //
this.age = options.age //
uni.setStorageSync('userId', options.userId)
uni.setStorageSync('openId', options.openId)
},
onShow() {
this.getDataInfo()
},
onHide() {
clearInterval(this.timer)
},
methods: {
//
getDataInfo() {
showLoading('加载中...')
this.$SMOKE.userSmokingHome().then(res => {
this.dataInfo = res.data
hideLoading()
if (res.data.timer == '00:00:00') return
let a = []
a = res.data.timer.split(':')
this.startTimer(a)
})
},
//
startTimer(a) {
let seconds = parseInt(a[2]);
let minutes = parseInt(a[1]);
let hours = parseInt(a[0]);
this.timer = setInterval(() => {
seconds++;
if (seconds === 60) {
seconds = 0;
minutes++;
if (minutes === 60) {
minutes = 0;
hours++;
}
}
let timeString = (hours < 10 ? '0' + hours : hours) + ':' + (minutes < 10 ? '0' + minutes :
minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);
// 240
if (hours == 24) {
seconds = 0
minutes = 0
hours = 0
timeString = '00:00:00'
this.dataInfo.quitSmokingDay = this.dataInfo.quitSmokingDay + 1
}
this.dataInfo.timer = timeString
}, 1000);
},
//
tobacco() {
this.$SMOKE.smokingCravingAdd().then(res => {
this.dataInfo.tobacco++
this.dataInfo.addUp++
})
},
//
start() {
let that = this
//
if (this.dataInfo.exist) {
uni.showModal({
title: '',
content: '请坚持下去,每一次的尝试都是一次积累,你会越来越接近成功。',
cancelText: '点错了',
confirmText: '复吸了',
confirmColor: '#3AAFB8',
success(ret) {
if (ret.confirm) {
console.log('用户点击复吸了');
clearInterval(that.timer)
that.$SMOKE.userSmokingReset().then(res => {
console.log("重置戒烟", res)
that.dataInfo = {
exist: 0, //0 1
quitSmokingDay: 0, //
timer: '00:00:00',
lifetime: 0, //
smokeLess: 0, //
saveMoney: 0, //
score: 0, //
percentage: 0, //
tobacco: that.dataInfo.tobacco,
addUp: that.dataInfo.addUp
}
})
} else if (ret.cancel) {
console.log('用户点击点错了');
}
}
});
} else {
//
uni.navigateTo({
url: '/pages/quitSmoking/smokingSituation/smokingSituation?birth=' + this.birth + '&age=' +
this.age
})
}
},
//
goPage(index) {
if (index == 0) {
this.$SMOKE.getUserFirstInto({
data: {
routeUrl: '/pages/quitSmoking/smokingTips/smokingTips'
},
}).then(res => {
if (res.data) {
uni.navigateTo({
url: '/pages/quitSmoking/scriptsList/scriptsList'
})
} else {
uni.navigateTo({
url: '/pages/quitSmoking/smokingTips/smokingTips'
})
}
})
} else if (index == 1) {
uni.navigateTo({
url: '/pages/quitSmoking/smokingDiary/smokingDiary'
})
} else {
if (this.dataInfo.exist == 0) return toast('请先点击开始戒烟')
uni.navigateTo({
url: '/pages/quitSmoking/timeTravel/timeTravel'
})
}
},
//
goRecove() {
if (this.dataInfo.exist == 0) return toast('请先点击开始戒烟')
uni.navigateTo({
url: '/pages/quitSmoking/recoveryScore/recoveryScore'
})
},
goAssuss() {
//
if (this.dataInfo.degreeOfDependence == '') {
uni.navigateTo({
url: '/pages/quitSmoking/question/question'
})
} else {
//
uni.navigateTo({
url: '/pages/quitSmoking/evaluationRecord/evaluationRecord'
})
}
},
//
goMore() {
uni.navigateTo({
url: '/pages/quitSmoking/statistics/statistics'
})
},
//
goDetail() {
if (this.dataInfo.exist == 0) return toast('请先点击开始戒烟')
uni.navigateTo({
url: '/pages/quitSmoking/cessationData/cessationData'
})
},
},
}
</script>
<style lang="scss" scoped>
@import "./index.scss"
</style>

View File

@ -0,0 +1,267 @@
page{
background: #F3F4F6;
}
.pageBox{
.themColor{
color: #3AAFB8;
}
$uni-color:#3AAFB8;
.color{
color: #17191A;
}
.topPostionBg{
position: absolute;
top: 0;
right: 0;
width: 100vw;
height: 528rpx;
background: linear-gradient(155deg, #E4F5EB 0%, rgba(228,245,235,0) 100%);
}
.staging{
width: 470rpx;
height: calc(580rpx - 42rpx);
border-radius: 48rpx;
background: #FFF;
padding: 22rpx 32rpx 20rpx;
.bg{
width: 100%;
height: 224rpx;
background: linear-gradient(180deg, #D8FCFF 0%, #FFF 100%);
position: absolute;
top: 0;
left: 0;
border-radius: 48rpx 48rpx 0 0;
}
.stagingBackground{
width: 268rpx;
height: 166rpx;
}
.threeSix{
margin-top: 36rpx;
}
.oneTwo{
margin-top: 12rpx;
}
.stagBtn{
width: calc(406rpx - 278rpx);
padding: 10rpx 138rpx 10rpx 140rpx;
border-radius: 50rpx;
border: 2rpx solid $uni-color;
background: $uni-color;
margin: 0 auto;
color: #FFF;
margin-top: 32rpx;
}
.colorGrey{
color: #909292;
margin-top: 32rpx;
}
}
.contioner{
padding: 32rpx;
.backBottom{
position: fixed;
bottom: 10vh;
right: 34rpx;
padding: 12rpx 32rpx;
border-radius: 50rpx;
background: #FFF;
box-shadow: 0 8rpx 8rpx 0 rgba(4, 70, 74, 0.14);
display: flex;
align-items: center;
image{
$wh:24rpx;
width: $wh;
height: $wh;
margin-right: 8rpx;
}
}
.topCard{
padding: 12rpx;
margin-top: 48rpx;
border-radius: 32rpx;
background: #FFFFFF;
.headSculpture{
$wh:112rpx;
width: $wh;
height: $wh;
background: #F3F4F6;
border-radius: 50%;
border: 6rpx solid #FFFFFF;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -52rpx;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
image{
$wh:100rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.border{
border: 1rpx dotted #3AAFB8;
border-radius: 20rpx;
.cut{
display: inline-block;
width: 4rpx;
height: 20rpx;
margin: 0 12rpx;
background: $uni-color;
}
.top{
margin-top: 72rpx;
color: $uni-color;
}
.tag{
padding: 0 20rpx;
line-height: 40rpx;
border-radius: 4rpx;
background: #F3F4F6;
color: #909292;
font-size: 24rpx;
}
}
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.introduce {
padding: 20rpx;
width: calc(502rpx - 40rpx);
background: #FFFFFF;
border-radius: 0rpx 16rpx 0rpx 0rpx;
}
.evaluation {
width: calc(502rpx - 40rpx);
padding: 20rpx;
margin-top: 16rpx;
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.greyTag{
padding: 18rpx 40rpx;
background: #F8F8F8;
border-radius: 16rpx;
margin-top: 20rpx;
.tegWidth{
width: 2rpx;
height: 24rpx;
background: #CCCCCC;
margin: 0 24rpx;
display: inline-block;
}
}
.shawDown{
background: #EFF9F8;
}
.cut{
margin-top: 32rpx;
width: 100%;
height: 1rpx;
background: #eee;
}
.fenge{
width: 2rpx;
height: 80rpx;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
background: #eee;
}
}
.rightLayOut{
display: flex;
align-items: center;
margin-top: 32rpx;
.leftTag{
padding: 20rpx 32rpx;
background: #3AAFB8;
border-radius: 16rpx 0rpx 16rpx 16rpx;
color: #FFFFFF;
margin-right: 24rpx;
}
.rightAvter{
$wh:80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.bottomBtn{
position: fixed;
bottom: 20rpx;
width: calc(100% - 64rpx);
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
color: #FFFFFF;
margin-top: 80rpx;
}
}
.centerScoll{
width: 100%;
height: calc(87vh - 184rpx);
}
.black {
width: 32rpx;
height: 32rpx;
}
.blackColor {
color: #8E9AAB;
}
.fontColor {
color: #112950;
}
.singCard {
padding: 40rpx;
background: #FFFFFF;
border-radius: 20rpx;
border: 2rpx solid #DCDEE0;
font-size: 28rpx;
color: #112950;
image {
width: 36rpx;
height: 36rpx;
}
}
.cardShadow {
color: #3AAFB8;
box-shadow: inset 0px 0px 12px 0px rgba(58, 175, 184, 0.8000);
}
.btnPostion{
background: #E6EFF1;
.next {
line-height: 84rpx;
text-align: center;
color: #FFFFFF;
background: #3AAFB8;
border-radius: 42rpx;
margin-bottom: 48rpx;
}
.temporary {
line-height: 84rpx;
text-align: center;
border-radius: 42rpx;
border: 2rpx solid #DCDEE0;
}
}
}

View File

@ -0,0 +1,237 @@
<template>
<view class="pageBox" v-if="isShow" @touchmove.stop="">
<view class="topPostionBg"></view>
<view class="contioner">
<view class="topCard bg-video">
<view class="headSculpture">
<image src="https://shayu5qny.yhy.ren/youngerSister.png"></image>
</view>
<view class="border text-center bg-video">
<view class="top text-df text-bold">
<text class="color">鲨鱼宝宝</text>
<text class="cut"></text>
<text>专属评估客服</text>
</view>
<view class="flex-conter margin-top-xs marginBottom">
<view class="tag marginRight-xs">{{(cardRadio.length*15/60).toFixed(0)}}分钟</view>
<view class="tag marginRight-xs">{{cardRadio.length}}</view>
</view>
</view>
</view>
<scroll-view scroll-y :style="{'height':srcollHeight}" :scroll-top="scrollView" @scroll="scroll"
scroll-with-animation>
<view class="next" style="padding-top: 32rpx;"></view>
<block v-for="(item,index) in cardRadio" :key="index">
<view v-show="item.select">
<!-- 单选样式 -->
<view class="flex bg-video" style="margin-top: 32rpx;"
v-if="item.id==1||item.id==3||item.id==4">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="color">
<view class="introduce text-df">{{index + 1 }}: {{item.title}}</view>
<view class="evaluation">
<view class="text-df">单选</view>
<block v-for="(item1,index1) in item.sonquestion" :key="index1">
<view :class="['greyTag',item1.select?'shawDown':'']"
@tap="selectChange(index,index1,item,item1)">
<text class="text-bold">{{item1.level}}</text>
<text class="tegWidth"></text>
<text style="color: #3F4040;">{{item1.topic}}</text>
</view>
</block>
</view>
</view>
</view>
<!-- 单选 是否选项展示样式 -->
<view class="flex bg-video" style="margin-top: 32rpx;" v-else>
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="evaluation fontColor">
<view class="text-df">{{index + 1 }}:{{item.title}}</view>
<view class="cut"></view>
<view class="flex bg-video" style="height: 60rpx;">
<block v-for="(item1,index1) in item.sonquestion" :key="index1">
<view :class="['flex-sub text-center',item1.select?'themColor':'']"
@tap="selectChange(index,index1,item,item1)">
<text style="line-height: 80rpx;">{{item1.topic}}</text>
</view>
</block>
<view class="fenge"></view>
</view>
</view>
</view>
<view class="flex justify-end" :class="['quest'+index]" v-if="item.defaultValue!=null">
<view class="rightLayOut">
<view class="leftTag flex-sub">{{item.defaultValue}}</view>
<image :src="userProfile" class="rightAvter"></image>
</view>
</view>
</view>
</block>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
<view class="bottomBtn" @tap="submit" v-if="isNext">生成评估报告</view>
<!-- 返回底部 -->
<view class="backBottom" @tap="goBottom" v-show="scrollGun<600&&isBottom">
<image src="https://shayu5qny.yhy.ren/Frame.png"></image>
<view class="text-sm themColor">返回底部</view>
</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
isShow: false, //
isBottom: false, //
isNext: false,
userProfile: '', //
cardRadio: [], //
subject: [], //
srcollHeight: "", //
scrollView: 0, //
scrollGun: 0, //
fixedHeight: 100000, //
questionFive: null, //
}
},
onLoad() {
this.getInfo()
},
methods: {
//
Height() {
const query = uni.createSelectorQuery().in(this);
query.select(".next").boundingClientRect((data) => {
//
this.srcollHeight = uni.getSystemInfoSync().windowHeight - data.top - 18 + "px";
}).exec();
},
//
questClass(index) {
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".quest" + index).boundingClientRect((data) => {
this.scrollView = parseInt(this.scrollGun + data.top - 82)
}).exec();
if (index > 3) {
this.isBottom = true
}
}, 100)
},
scroll(e) {
this.scrollGun = e.target.scrollTop
},
//
goBottom() {
let num = this.fixedHeight++
this.scrollView = num
},
//
async getInfo() {
showLoading('加载中...')
let ret = await this.$SMOKE.questionSmokingList()
this.userProfile = ret.data.avatar
this.cardRadio = ret.data.list //
this.questionFive = this.cardRadio[4]
this.cardRadio[0].select = true
this.isShow = true
//
setTimeout(() => {
this.Height()
}, 100)
hideLoading()
},
//
submit() {
if (this.$preventClick()) return
if (this.cardRadio.length == 6) {
let a = []
this.cardRadio[4].sonquestion.map(item => {
if (item.select) {
a.push(item.select)
}
})
if (a.length == 0) {
return toast('请先回答第五题')
}
}
let that = this;
that.cardRadio.map((item, index) => {
item.sonquestion.map((item1) => {
if (item1.select) {
that.subject.push(item1.score) //
}
})
})
let answers5 = 0
let answers6 = ''
if (this.cardRadio.length == 6) {
answers5 = that.subject[4]
answers6 = that.subject[5]
} else {
answers5 = 0
answers6 = that.subject[4]
}
showLoading('提交中...')
that.$SMOKE.smokingReportAdd({
data: {
answers1: that.subject[0], //
answers2: that.subject[1], //
answers3: that.subject[2], //
answers4: that.subject[3], //
answers5: answers5, //
answers6: answers6, //
user_code: uni.getStorageSync('userId'), //id
}
}).then((res) => {
if (res.code == 200) {
hideLoading()
uni.redirectTo({
url: '/pages/quitSmoking/result/result?id=' + res.data.smokingReportId
})
}
})
},
//
selectChange(index, index1, item, item1) {
let that = this
for (var i = 0; i < this.cardRadio[index].sonquestion.length; i++) {
//
if (i == index1) {
this.$set(this.cardRadio[index].sonquestion[i], 'select', true)
} else {
this.$set(this.cardRadio[index].sonquestion[i], 'select', false)
}
}
if (index == 0) {
if (this.cardRadio[0].sonquestion[3].select) {
this.cardRadio.splice(4, 1)
} else {
if (this.cardRadio.length != 6) {
this.cardRadio.splice(4, 0, this.questionFive)
this.cardRadio[4].select = true
}
}
}
this.$set(this.cardRadio[index], 'defaultValue', item1.level + '.' + item1.topic)
that.questClass(index)
if (that.cardRadio.length - 1 != index) {
that.cardRadio[index + 1].select = true
} else {
return that.isNext = true
}
},
}
}
</script>
<style lang="scss" scoped>
@import './question.scss';
</style>

View File

@ -0,0 +1,146 @@
<template>
<view class="pageBox">
<image src="../static/images/fixedBg.png" class="fixedBg"></image>
<view class="contioner bg-video">
<view class="flex-align">
<view>
<view class="flex-contion">
<image :src="formData.img" class="avare marginRight"></image>
<view class="text-bold whiteColor">{{formData.name}}</view>
</view>
<view class="margin-top-xs whiteRgb">欢迎查看您的健康恢复评分</view>
</view>
<view class="whiteColor"><text class="eightSize">{{formData.score}}</text></view>
</view>
<view class="card marginTop">
<view class="text-bold text-lg">恢复评分详情</view>
<view class="flex-align marginTop">
<view class="greyBg text-center">
<view class="bg-video text-center">
<cmd-progress type="circle" :percent="formData.physiology" :width="60" :stroke-width="10"
stroke-color="#3BDEB9" :showInfo="false"></cmd-progress>
<view class="titlePoastion">
<view class="text-sm">{{formData.physiology}}%</view>
</view>
</view>
<view class="margin-top-xs">生理烟瘾基本消除</view>
</view>
<view class="greyBg text-center">
<view class="bg-video text-center">
<cmd-progress type="circle" :percent="formData.psychology" :width="60" :stroke-width="10"
stroke-color="#2780FE" :showInfo="false"></cmd-progress>
<view class="titlePoastion">
<view class="text-sm">{{formData.psychology}}%</view>
</view>
</view>
<view class="margin-top-xs">心理烟瘾基本消除</view>
</view>
</view>
<!-- <view style="width: 100%;height: 30rpx;"></view> -->
<block v-for="(item,index) in formData.scoreLists" :key="index">
<view class="flex-align text-two marginTop-lg">
<view>{{item.name}}</view>
<view class="greyColor">{{item.value}}%</view>
</view>
<cmd-progress :percent="item.value" stroke-color="#3AAFB8" :show-info="false"></cmd-progress>
</block>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
formData: {},
}
},
onLoad(option) {
if (option.time) {
this.$SMOKE.healthRecoveryScore({
data: {
time: option.time
},
}).then(res => {
this.formData = res.data
})
} else {
this.$SMOKE.healthRecoveryScore().then(res => {
this.formData = res.data
})
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
::v-deep .cmd-progress-inner{
display: block;
margin-top: 16rpx;
}
.fixedBg {
position: fixed;
width: 100vw;
height: 504rpx;
}
.contioner {
padding: 32rpx;
color: #17191A;
.whiteColor {
color: #fff;
}
.eightSize {
font-size: 80rpx;
}
.whiteRgb {
color: rgba(255, 255, 255, 0.60);
}
.fontColor {
color: #3F4040;
}
.avare {
$wh: 64rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
.card {
padding: 32rpx 24rpx;
background: #FFF;
border-radius: 20rpx;
font-size: 28rpx;
.greyBg {
padding: 22rpx 0 24rpx 0;
width: 306rpx;
border-radius: 20rpx;
background: #F8F8F8;
.titlePoastion{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
}
.text-two {
font-size: 22rpx;
}
.greyColor {
color: #909292;
}
}
}
</style>

View File

@ -0,0 +1,188 @@
<template>
<view class="pageBox">
<image src="https://shayu5qny.yhy.ren/quitSmoking/resultTop.png" class="resultTop"></image>
<view class="contioner bg-video">
<view class="card">
<view class="text-bold">尼古丁依赖程度</view>
<view class="flex margin-eight">
<view class="flex-sub text-center bg-video flex-direction flex-conter">
<view class="location" v-if="location==1">
<view class="tagWidth">{{score}}</view>
<view class="tagSan"></view>
</view>
<view class="progressBg leftBG"></view>
<view class="text-sm margin-top-xs">轻度</view>
</view>
<view class="flex-sub text-center bg-video flex-direction flex-conter">
<view class="location" v-if="location==2">
<view class="tagWidth">{{score}}</view>
<view class="tagSan"></view>
</view>
<view class="progressBg centerBG"></view>
<view class="text-sm margin-top-xs">中度</view>
</view>
<view class="flex-sub text-center bg-video flex-direction flex-conter">
<view class="location" v-if="location==3">
<view class="tagWidth">{{score}}</view>
<view class="tagSan"></view>
</view>
<view class="progressBg rightBG"></view>
<view class="text-sm margin-top-xs">重度</view>
</view>
</view>
<view class="greyBg marginTop">{{result}}</view>
</view>
<view class="card marginTop">
<view class="text-bold">戒烟意见</view>
<block v-for="(item,index) in List" :key="index">
<view class="flex marginTop">
<view class="tagYuan"></view>
<view class="text-sm flex-sub title">{{item}}</view>
</view>
</block>
</view>
<view class="btn" @tap="goHome">开启健康生活之旅</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
location: '',
score: '',
result: '',
List: ['是时候考虑一辈子的吸烟费用了,你不妨按年算算花费。', '您也许会说出得起这笔钱,但您真的不在乎花大笔的金钱破坏自己的生活吗。']
}
},
onLoad(option) {
this.$SMOKE.getById({
data: {
id: option.id //id
}
}).then((res) => {
if (res.data.smokingReportScore <= 3) {
this.location = 1
} else if (res.data.smokingReportScore <= 6) {
this.location = 2
} else {
this.location = 3
}
this.score = res.data.smokingReportScore
this.result = res.data.smokingReportLevel
this.List = res.data.smokingReportDesc.split(';')
})
},
methods: {
//
goHome() {
uni.reLaunch({
url: '/pages/quitSmoking/index/index?userId=' + uni.getStorageSync('userId')+"&openId="+uni.getStorageSync("openId")
})
},
}
}
</script>
<style scoped lang="scss">
.pageBox {
color: #3F4040;
.resultTop {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 686rpx;
}
}
.contioner {
padding: 112rpx 32rpx 32rpx;
.card {
padding: 32rpx 24rpx;
background: #FFF;
border-radius: 20rpx;
.margin-eight {
margin-top: 104rpx;
}
.progressBg {
width: 100%;
height: 12rpx;
}
.leftBG {
border-radius: 50rpx 0 0 50rpx;
background: #5DACB6;
}
.centerBG {
background: #F3B43F;
}
.rightBG {
border-radius: 0 50rpx 50rpx 0;
background: #ED6D42;
}
.location {
position: absolute;
bottom: 66rpx;
.tagWidth {
padding: 2rpx 8rpx;
font-size: 20rpx;
color: #FFF;
background: #17191A;
border-radius: 4rpx;
}
.tagSan {
margin-left: 14rpx;
width: 0;
height: 0;
border-top: 16rpx solid #17191A;
border-right: 10rpx solid transparent;
border-left: 10rpx solid transparent;
border-bottom: 0 solid transparent;
}
}
.greyBg {
padding: 24rpx;
border-radius: 16rpx;
background: #F8F8F8;
font-size: 28rpx;
color: #909292;
}
.tagYuan {
width: 10rpx;
height: 10rpx;
margin-right: 8rpx;
margin-top: 12rpx;
border-radius: 50%;
background: $uni-color;
}
.title {
letter-spacing: 4rpx;
line-height: 36rpx;
}
}
.btn {
width: 100%;
line-height: 84rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
color: #FFF;
border-radius: 50rpx;
margin-top: 48rpx;
}
}
</style>

View File

@ -0,0 +1,59 @@
<template>
<view class="pageBox">
<view class="container">
<view class="tagWidth"></view>
<markdown-it-vue-light class="md-body" :content="value" />
</view>
</view>
</template>
<script>
import MarkdownIt from "markdown-it"
import MarkdownItVueLight from 'markdown-it-vue/dist/markdown-it-vue-light.umd.min.js'
import 'markdown-it-vue/dist/markdown-it-vue-light.css'
export default {
components: {
MarkdownItVueLight
},
data() {
return {
value: '',
}
},
onLoad(option) {
this.value = JSON.parse(decodeURIComponent(option.params.replace(/%/g, '%25')))
this.$SMOKE.smokingSecretAdd({
data: {
studyId: option.secretId
}
})
},
methods: {
}
}
</script>
<style scoped lang="scss">
.pageBox {
background: linear-gradient(180deg, #F9E8D8 0%, #F3F4F6 400rpx);
padding: 32rpx;
}
.container {
position: relative;
padding: 32rpx;
color: #3F4040;
border-radius: 16rpx;
background: #FFF;
.tagWidth {
position: absolute;
top: 58rpx;
left: 24rpx;
width: 116rpx;
height: 10rpx;
background: linear-gradient(270deg, rgba(253, 198, 116, 0.00) 0%, #FF9A02 100%);
}
}
</style>

View File

@ -0,0 +1,135 @@
<template>
<view>
<view class="container">
<view class="topCard">
<view class="title orange">{{formDate.title}}</view>
<view class="margintop-four text-df orange">{{formDate.tipOne}}</view>
<image class="tagLeft" src="https://sharkbaby.yhy.ren/groups.png"></image>
<image class="tagRight" src="https://sharkbaby.yhy.ren/groups.png"></image>
</view>
<view class="card margintop-four">
<view class="text-xl text-bold">戒烟解读</view>
<block v-for="(item,index) in formDate.directoryInfos" :key="index">
<view class="orangeBg margintop-four flex-align">
<view class="text-df flex-sub marginRight-eight">
<view class="marginBottom-sm">{{index+1}}.{{item.title}}</view>
<view class="flex-contion text-xs">
<image src="https://shayu5qny.yhy.ren/quitSmoking/eyes.png" class="eyes"></image>
<view class="grey">{{item.numberOfPeople}}人学习过</view>
</view>
</view>
<view class="btn" @tap="goPage(item)">学习</view>
</view>
</block>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
formDate: {},
}
},
onLoad(options) {
this.index = parseInt(options.index)
},
onShow() {
this.$SMOKE.cheatsList().then(res => {
this.formDate = res.data[this.index]
})
},
methods: {
goPage(item) {
const instruction = JSON.stringify(item.instruction)
uni.navigateTo({
url: '/pages/quitSmoking/scriptsDetail/scriptsDetail?params=' + encodeURIComponent(
instruction) + '&secretId=' + item.secretId
})
}
}
}
</script>
<style scoped lang="scss">
.container {
padding: 32rpx;
color: #3F4040;
.topCard {
position: relative;
padding: 40rpx 24rpx 32rpx;
border-radius: 16rpx;
background: linear-gradient(#F8EBE2 0%, #fff 100%);
$width: 12rpx;
$height: 56rpx;
.tagLeft {
position: absolute;
bottom: -38rpx;
left: 48rpx;
width: $width;
height: $height;
}
.tagRight {
position: absolute;
bottom: -38rpx;
right: 48rpx;
width: $width;
height: $height;
}
.orange {
color: #724030;
line-height: 48rpx;
}
.title {
font-size: 40rpx;
font-weight: bold;
text-align: center;
}
}
.card {
padding: 32rpx 24rpx;
border-radius: 16rpx;
background: #FFF;
.orangeBg {
padding: 32rpx 24rpx;
border: 1rpx solid rgba(251, 235, 212, 1);
background: #FEF9F6;
border-radius: 16rpx;
.marginRight-eight {
margin-right: 48rpx;
}
.btn {
width: 124rpx;
line-height: 48rpx;
text-align: center;
border-radius: 32rpx;
background: #ED7143;
color: #FFF;
font-size: 24rpx;
}
.eyes {
width: 24rpx;
height: 24rpx;
margin-right: 6rpx;
}
.grey {
color: #909292;
}
}
}
}
</style>

View File

@ -0,0 +1,104 @@
<template>
<view>
<view class="container">
<view class="topCard">
<view class="title orange">戒烟秘籍说明提示</view>
<view class="margintop-four text-df orange">
在看本方法时无需刻意戒烟可以边看边吸一切遵循内心不要企图我会告诉你吸烟会让你得冠心病心脑血管病疾病高血压糖尿病肺癌如果告诉你这些有用我相信早你就戒了全世界也不会有这么多烟民了
</view>
</view>
<view class="card margintop-four">
<view class="text-xl text-bold">戒烟科普</view>
<block v-for="(item,index) in List" :key="index">
<view class="orangeBg margintop-four flex-align">
<view class="text-df flex-sub marginRight-eight">
<view class="marginBottom-sm">
{{item.title}}<text>({{item.completed}}/{{item.unfinished}})</text>
</view>
<cmd-progress :percent="item.completed/item.unfinished*100" stroke-color="#ED7143"
:show-info="false"></cmd-progress>
</view>
<view class="btn" @tap="goPage(index)">解读</view>
</view>
</block>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
List: [],
}
},
onShow() {
this.$SMOKE.cheatsList().then(res => {
this.List = res.data
})
},
methods: {
goPage(index) {
uni.navigateTo({
url: '/pages/quitSmoking/scriptsLearn/scriptsLearn?index=' + index
})
}
}
}
</script>
<style scoped lang="scss">
.container {
padding: 32rpx;
color: #3F4040;
::v-deep .cmd-progress-inner {
background-color: #FBEBD4;
}
.topCard {
padding: 40rpx 24rpx 32rpx;
border-radius: 16rpx;
background: linear-gradient(#F8EBE2 0%, #fff 100%);
.orange {
color: #724030;
line-height: 48rpx;
}
.title {
font-size: 40rpx;
font-weight: bold;
text-align: center;
}
}
.card {
padding: 32rpx 24rpx;
border-radius: 16rpx;
background: #FFF;
.orangeBg {
padding: 32rpx 24rpx;
border: 1rpx solid rgba(251, 235, 212, 1);
background: #FEF9F6;
border-radius: 16rpx;
.marginRight-eight {
margin-right: 48rpx;
}
.btn {
width: 124rpx;
line-height: 48rpx;
text-align: center;
border-radius: 32rpx;
background: #ED7143;
color: #FFF;
font-size: 24rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,164 @@
<template>
<view class="pageBox" :class="{'show':isShow}">
<view class="contioner" v-if="List.length>0">
<block v-for="(item,index) in List" :key="index">
<view class="card marginTop">
<view class="flex">
<view class="union">
<image src="https://sharkbaby.yhy.ren/jinhao.png"></image>
</view>
<view class="flex-sub word-break">
<view class="text-bold">{{item.title}}</view>
<view class="text-df title">{{item.content}}</view>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view class="greyColor text-sm">{{item.createTime}}</view>
<view class="tagWidth flex-conter" @tap="shanchu(item.id)">
<uni-icons type="trash-filled" color="#FF4545" size="18"></uni-icons>
<text>删除</text>
</view>
</view>
</view>
</block>
</view>
<nothing v-else></nothing>
<view class="fixedTag" @tap="goComment">
<image src="https://shayu5qny.yhy.ren/quitSmoking/send.png"></image>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
isShow: false,
List: [],
pageNum: 1,
}
},
onShow() {
this.getInfo()
},
onReachBottom() {
this.pageNum++
this.$SMOKE.smokingDiaryList({
data: {
pageNum: this.pageNum,
pageSize: 10
}
}).then(res => {
this.List = this.List.length < res.total ? this.List.concat(res.rows) : this.List
})
},
methods: {
getInfo(val) {
this.$SMOKE.smokingDiaryList().then(res => {
this.List = res.rows
this.isShow = true
})
},
goComment() {
uni.navigateTo({
url: '/pages/quitSmoking/content/content'
})
},
shanchu(id) {
toast('删除成功')
this.$SMOKE.smokingDiaryDelete({
data: {
id: id
}
}).then(res => {
if (res.code == 200) {
this.getInfo('删除')
}
})
},
}
}
</script>
<style scoped lang="scss">
.pageBox {
opacity: 0;
transition: opacity ease .3s;
&.show {
opacity: 1;
}
.contioner {
padding: 8rpx 32rpx;
.card {
padding: 32rpx 24rpx;
border-radius: 20rpx;
background: #FFF;
.word-break {
overflow: hidden;
word-wrap: break-word;
}
.union {
$wh: 28rpx;
width: $wh;
height: $wh;
margin-right: 12rpx;
image {
width: $wh;
height: $wh;
}
}
.title {
margin-top: 16rpx;
letter-spacing: 6rpx;
line-height: 48rpx;
color: #3F4040;
}
.cut {
width: 100%;
height: 1rpx;
background: #eee;
margin: 24rpx 0 33rpx;
}
.greyColor {
color: #909292;
}
.tagWidth {
color: #FF4545;
font-size: 24rpx;
width: 118rpx;
height: 50rpx;
border-radius: 8rpx;
border: 2rpx solid rgba(255, 69, 69, 0.40);
}
}
}
.fixedTag {
position: fixed;
bottom: 70rpx;
right: 32rpx;
image {
$wh: 104rpx;
width: $wh;
height: $wh;
}
}
}
</style>

View File

@ -0,0 +1,239 @@
<template>
<view class="pageBox">
<view class="contioner">
<view class="card marginTop">
<view class="flex-align">
<view>最后吸烟日</view>
<picker mode="date" :start="birth" :end="cuttDate" :value="date" @change="bindDateChange">
<view :class="['flex-contion',date==''?'greyColor':'']">
{{date==''?'请选择':date}}
<uni-icons type="right" color="#3AAFB8" size="22"></uni-icons>
</view>
</picker>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>最后吸烟时间</view>
<picker mode="time" :value="time" @change="bindTimeChange">
<view :class="['flex-contion',time==''?'greyColor':'']">
{{time==''?'请选择':time}}
<uni-icons type="right" color="#3AAFB8" size="22"></uni-icons>
</view>
</picker>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>烟龄</view>
<view class="flex-contion">
<input v-model="smokerAge" placeholder="请输入" type="number" class="text-df text-right" />
<text class="greyColor marginLeft-xs">()</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>吸烟量</view>
<view class="flex-contion">
<input v-model="smokingVolume" placeholder="请输入" type="number" class="text-df text-right" />
<text class="greyColor marginLeft-xs">(/)</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>烟价</view>
<view class="flex-contion">
<input v-model="cigarettePrice" placeholder="请输入" type="digit" class="text-df text-right" />
<text class="greyColor marginLeft-xs">(20/)</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>焦油含量</view>
<view class="flex-contion">
<input v-model="tar" placeholder="请输入" type="digit" class="text-df text-right" />
<text class="greyColor marginLeft-xs">(毫克/)</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>吸一支烟的时间</view>
<view class="flex-contion">
<input v-model="smokerTime" placeholder="请输入" type="digit" class="text-df text-right" />
<text class="greyColor marginLeft-xs">(分钟)</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>曾尝试戒烟几次</view>
<view class="flex-contion">
<input v-model="smokerNum" placeholder="请输入" type="number" class="text-df text-right" />
<text class="greyColor marginLeft-xs">()</text>
</view>
</view>
</view>
</view>
<view class="placeholder"></view>
<view class="btnList">
<view class="btn" @tap="submit">确认</view>
</view>
</view>
</template>
<script>
import {
toast,
formatTime,
} from "/tool/index.js"
export default {
data() {
return {
date: '', //
time: '', //
smokerAge: '', //
smokingVolume: '', //
cigarettePrice: '', //
tar: '', //
smokerTime: '', //
smokerNum: '', //
cuttDate: formatTime(new Date()).split(" ")[0], //
timeDate: formatTime(new Date()).split(" ")[1], //
birth: '', //
age: '', //
}
},
onLoad(options) {
this.birth = options.birth //
this.age = options.age //
},
methods: {
//
submit() {
if (this.date == '' || this.time == '' || this.smokerAge == '' || this.smokingVolume == '' ||
this.cigarettePrice == '' || this.tar == '' || this.smokerTime == '' || this
.smokerNum == '') return toast('请先填写完整')
if (this.date == this.cuttDate && this.time > this.timeDate) return uni.showToast({
icon: 'none',
title: '最后吸烟时间不能晚于当前时间',
duration: 3000
})
if (this.smokingVolume == 0) return toast('吸烟量为零,无需戒烟')
if (this.cigarettePrice == 0) return toast('烟价不能为零')
if (this.tar == 0) return toast('焦油含量不能为零')
if (this.smokerTime == 0) return toast('吸一支烟的时间不能为零')
//
const reg = /^\d*$/;
if (!reg.test(this.smokerAge)) {
return toast('烟龄只能输入整数')
}
if (!reg.test(this.smokingVolume)) {
return toast('吸烟量只能输入整数')
}
//
const rege = /^\d+(\.\d{0,2})?$/;
if (!rege.test(this.cigarettePrice)) {
return toast('烟价只能输入两位小数')
}
//
const regex = /^\d+(\.\d{0,1})?$/;
if (!regex.test(this.tar)) {
return toast('焦油含量只能输入一位小数')
}
if (!regex.test(this.smokerTime)) {
return toast('吸一支烟的时间只能输入一位小数')
}
if (!reg.test(this.smokerNum)) {
return toast('曾尝试戒烟几次只能输入整数')
}
if (Number(this.smokerAge) > Number(this.age)) return toast('烟龄不大于年龄')
var data = {
smokingDate: this.date + " " + this.time + ":00",
smokingAge: this.smokerAge,
smokingAmount: this.smokingVolume,
smokingPrices: this.cigarettePrice,
smokingTarContent: this.tar,
smokingAmountTime: this.smokerTime,
smokingQuitTimes: this.smokerNum
}
this.$SMOKE.userSmokingAdd({
data,
}).then(res => {
toast('保存成功')
setTimeout(() => {
uni.navigateBack()
}, 500)
})
},
//
bindDateChange(e) {
this.date = e.detail.value
},
//
bindTimeChange(e) {
this.time = e.detail.value
},
}
}
</script>
<style scoped lang="scss">
.contioner {
padding: 40rpx 32rpx;
color: #3F4040;
.rightColor {
color: #17191A;
}
.card {
padding: 32rpx 24rpx;
background: #FFF;
border-radius: 20rpx;
font-size: 28rpx;
.greyColor {
color: #909292;
}
.cut {
width: 100%;
height: 1rpx;
background: #E9E9E9;
margin: 32rpx 0;
}
}
}
.placeholder {
height: 100rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
}
.btnList {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
background-color: #fff;
box-shadow: 0 0 10rpx rgba(0, 0, 0, .1);
display: flex;
align-items: center;
height: 110rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.btn {
color: #fff;
text-align: center;
line-height: 80rpx;
background-color: $uni-color;
border-radius: 40rpx;
flex: 1;
margin: 0 32rpx;
font-weight: bold;
}
}
</style>

View File

@ -0,0 +1,128 @@
<template>
<view class="pageBox">
<image src="https://shayu5qny.yhy.ren/quitSmoking/slice.png" class="cheatsTop"></image>
<view class="content bg-video">
<view class="bg-video">
<view class="topTitle">
<view class="top">戒烟秘籍</view>
<view class="zhojian">
本人有近20年的吸烟历史吸烟给我的生活工作身体带来了很多的痛苦和烦恼我曾尝试过靠毅力戒烟逐步减量法戒烟用电子烟替代戒烟等多种方法但最终都以失败告终
</view>
<view class="zhoxia">
直到有一天我遇到了湘雅附二的一位心血管科的教授他教给了我一本戒烟武林秘籍让我成功的摆脱了香烟
</view>
<view class="zhoxia">
我将方法进行了总结希望能给准备戒烟或正在戒烟的朋友们提供一些帮助
</view>
<view class="zhoxia">
本方法具备:即时见效无论烟瘾轻重同样有效无痛苦不需要意志力不适用冲击疗法无需辅助手段或替代品效果持久稳定等特征
</view>
</view>
<image src="https://shayu5qny.yhy.ren/quitSmoking/shuxie.png" mode="widthFix" class="imgClass">
</image>
</view>
</view>
<image src="https://shayu5qny.yhy.ren/quitSmoking/cheatsBi.png" mode="widthFix" class="cheatsBi"></image>
<view class="flex-conter cheatsBtn" @tap="goMIiji">
<image src="https://shayu5qny.yhy.ren/quitSmoking/cheatsBtn.png" mode="widthFix"></image>
</view>
<image src="https://shayu5qny.yhy.ren/quitSmoking/cheatsBottom.png" class="cheatsBottom"></image>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
goMIiji() {
uni.navigateTo({
url: '/pages/quitSmoking/scriptsList/scriptsList'
})
},
}
}
</script>
<style scoped lang="scss">
.pageBox {
width: 100vw;
height: 100vh;
background: #FED9A2;
}
.cheatsTop {
position: fixed;
top: 0;
right: 0;
width: 200rpx;
height: 164rpx;
}
.content {
padding: 72rpx 8rpx 0 32rpx;
color: #724030;
z-index: 10;
.topTitle {
position: absolute;
z-index: 1;
top: 72rpx;
line-height: 50rpx;
.top {
text-align: center;
font-size: 56rpx;
font-weight: bold;
}
.zhojian {
margin-top: 64rpx;
padding: 0 40rpx;
font-size: 28rpx;
text-indent: 2rem;
}
.zhoxia {
margin-top: 40rpx;
padding: 0 40rpx;
font-size: 28rpx;
text-indent: 2rem;
}
}
.imgClass {
width: 100%;
height: 1184rpx;
}
}
.cheatsBi {
margin-top: -122rpx;
width: 160rpx;
height: 160rpx;
position: relative;
z-index: 10;
}
.cheatsBottom {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
height: 254rpx;
}
.cheatsBtn {
width: 100%;
position: fixed;
bottom: 36rpx;
z-index: 10;
image {
width: 494rpx;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

View File

@ -0,0 +1,225 @@
<template>
<view class="pageBox">
<view class="contioner">
<view class="topSelect flex-align">
<block v-for="(item,index) in List" :key="index">
<view :class="['flex-sub text-df text-center',dateIndex==index?'shaw':'']"
@tap="selectChange(index)">
{{item}}
</view>
</block>
</view>
<view class="card marginTop">
<view>连续记录数</view>
<view class="tag"></view>
<view class="charts-box">
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" :ontouch="true" />
</view>
</view>
<view class="card marginTop">
<view class="flex-align marginBottom">
<view class="flex-contion">
<view class="tagWidth"></view>
<view>烟瘾记录</view>
</view>
<view class="themColor text-six">平均{{num}}/{{this.dateIndex==0?'天':'月'}}</view>
</view>
<block v-for="(item,index) in recodeList" :key="index">
<view class="flex-align">
<view class="text-df">{{item.time}}</view>
<view class="greyColor text-xs">
<text class="themColor text-bold text-eight marginRight-xs">{{item.num}}</text>
</view>
</view>
<view class="cut" v-if="index<recodeList.length-1"></view>
</block>
</view>
</view>
</view>
</template>
<script>
import {
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
List: ['周', '月'],
dateIndex: 0, //
chartData: {},
num: '', ///
recodeList: [{
time: '凌晨00:00 ~ 02:59',
num: '',
}, {
time: '凌晨03:00 ~ 05:59',
num: '',
}, {
time: '早上06:00 ~ 08:59',
num: '',
}, {
time: '上午09:00 ~ 11:59',
num: '',
}, {
time: '中午12:00 ~ 14:59',
num: '',
}, {
time: '下午15:00~17:59',
num: '',
}, {
time: '晚上18:00~20:59',
num: '',
}, {
time: '晚上21:00~23:59',
num: '',
}], //
opts: {
color: ["#3AAFB8"],
enableScroll: true,
legend: {
show: false
},
dataLabel: false,
xAxis: {
rotateLabel: true,
marginTop: 10,
disableGrid: true,
scrollShow: true,
itemCount: 7,
scrollShow: false,
},
extra: {
column: {
type: "group",
width: 20
}
}
}
}
},
onLoad() {
this.getInfo()
},
methods: {
//
getInfo() {
showLoading('加载中...')
this.$SMOKE.cartogram({
data: {
type: this.dateIndex
},
}).then(res => {
this.num = res.data.averageHeat
this.recodeList[0].num = res.data.recode.zerototwo
this.recodeList[1].num = res.data.recode.threetofive
this.recodeList[2].num = res.data.recode.sixtoeight
this.recodeList[3].num = res.data.recode.ninetoeleven
this.recodeList[4].num = res.data.recode.twelvetofourteen
this.recodeList[5].num = res.data.recode.fifteentoseventeen
this.recodeList[6].num = res.data.recode.eighteentotwenty
this.recodeList[7].num = res.data.recode.twentyone
this.getServerData(res.data.timeList, res.data.infoList)
hideLoading()
})
},
selectChange(index) {
this.dateIndex = index
this.getInfo()
},
getServerData(timeList, infoList) {
let res = {
categories: timeList,
series: [{
name: "",
data: infoList
}]
};
this.chartData = JSON.parse(JSON.stringify(res));
},
}
}
</script>
<style scoped lang="scss">
.pageBox {
color: #3F4040;
.themColor {
color: $uni-color;
}
.text-six {
font-size: 26rpx;
}
.text-eight {
font-size: 48rpx;
}
.greyColor {
color: #909292;
}
.contioner {
padding: 40rpx 32rpx;
.topSelect {
margin-top: 20rpx;
height: calc(64rpx - 8rpx);
padding: 4rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 16rpx;
background: #EEE;
.shaw {
width: 226rpx;
height: 100%;
border-radius: 16rpx;
background: #FFF;
display: flex;
justify-content: center;
align-items: center;
}
}
.card {
padding: 32rpx 24rpx;
background: #FFF;
border-radius: 20rpx;
.tag {
width: 28rpx;
height: 4rpx;
border-radius: 50rpx;
background: #3F4040;
margin-left: 68rpx;
margin-top: 6rpx;
}
.charts-box {
width: 100%;
height: 600rpx;
}
.tagWidth {
width: 6rpx;
height: 36rpx;
border-radius: 50rpx;
background: $uni-color;
margin-right: 8rpx;
}
.cut {
width: 100%;
height: 1rpx;
background: #E9E9E9;
margin: 30rpx 0;
}
}
}
}
</style>

View File

@ -0,0 +1,216 @@
<template>
<view>
<view class="contioner">
<view class="card">
<view class="flex-conter">
欢迎来到
<view class="dateWidth">
<uni-datetime-picker v-model="single" :start="cuttDate" type="date" :clear-icon="false"
@change="maskClick">
{{single}}
</uni-datetime-picker>
</view>
<image src="https://shayu5qny.yhy.ren/quitSmoking/dateTime.png" class="dateTime"></image>
</view>
<view class="zanwu">
<image src="https://shayu5qny.yhy.ren/quitSmoking/shiguang.png"></image>
</view>
<view class="text-center blueColor">{{dataInfo.quitSmokeTime}}</view>
<view class="cut"></view>
<view class="flex-align">
<view class="text-center flex-grow">
<view>
<!-- 寿命 时间 -->
<text class="text-bold fourSize">{{dataInfo.lifetime}}</text>
<text class="text-xs greyColor marginLeft-four">小时</text>
</view>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/quitSmoking/love.png" class="love"></image>
<text class="text-xs greyColor marginLeft-xs">寿命</text>
</view>
</view>
<view class="tagCut"></view>
<view class="text-center flex-grow">
<view>
<!-- 少吸 -->
<text class="text-bold fourSize">{{dataInfo.smokeLess}}</text>
<text class="text-xs greyColor marginLeft-four"></text>
</view>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/quitSmoking/branch.png" class="branch"></image>
<text class="text-xs greyColor marginLeft-xs">少吸</text>
</view>
</view>
<view class="tagCut"></view>
<view class="text-center flex-grow">
<view>
<!-- 省钱 -->
<text class="text-bold fourSize">{{dataInfo.saveMoney}}</text>
<text class="text-xs greyColor marginLeft-four"></text>
</view>
<view class="flex-conter">
<image src="https://shayu5qny.yhy.ren/quitSmoking/first.png" class="first"></image>
<text class="text-xs greyColor marginLeft-xs">省钱</text>
</view>
</view>
</view>
<!-- 评分 -->
<view class="flex-align marginTop-lg" @tap="goPage">
<view class="text-sm">健康恢复评分<text class="themColor text-xl text-bold">{{dataInfo.score}}</text>
</view>
<view class="text-sm text-bold">· · ·</view>
</view>
<cmd-progress :percent="dataInfo.percentage" :showInfo="false"
stroke-color="linear-gradient(to right, #36AAB1, #6ACBD1)">
</cmd-progress>
<view class="text-xs greyColor margin-top-xs">生理烟瘾基本消除{{dataInfo.percentage}}%</view>
</view>
</view>
</view>
</template>
<script>
import {
formatTime,
} from "/tool/index.js"
export default {
data() {
const currentDate = this.getDate({
format: true
})
return {
single: currentDate,
dataInfo: {},
cuttDate: formatTime(new Date()).split(" ")[0], //
}
},
onLoad() {
this.getInfo()
},
methods: {
//
getInfo() {
this.$SMOKE.timeTravel({
data: {
time: this.single + ' 00:00:00'
},
}).then(res => {
this.dataInfo = res.data
})
},
getDate(type) {
const date = new Date();
let year = date.getFullYear() + 20;
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
maskClick() {
this.getInfo()
},
goPage() {
uni.navigateTo({
url: '/pages/quitSmoking/recoveryScore/recoveryScore?time=' + this.single
})
},
}
}
</script>
<style scoped lang="scss">
.contioner {
padding: 32rpx;
.card {
padding: 64rpx 24rpx 32rpx;
border-radius: 20rpx;
background: #FFF;
color: #3F4040;
.fontColor {
color: #17191A;
}
.greyColor {
color: #909292;
}
.themColor {
color: $uni-color;
}
.blueColor {
color: #3B74E2;
}
.dateTime {
$wh: 40rpx;
width: $wh;
height: $wh;
}
.dateWidth {
width: 180rpx;
text-align: center;
}
.zanwu {
$wh: 512rpx;
width: $wh;
height: $wh;
margin: 0 auto -48rpx;
margin-top: 28rpx;
image {
width: $wh;
height: $wh;
}
}
.cut {
width: 100%;
height: 2rpx;
background: #EEE;
margin: 48rpx 0;
}
.tagCut {
width: 1rpx;
height: 80rpx;
background: #CCE0E1;
}
.love {
width: 20rpx;
height: 20rpx;
}
.branch {
width: 32rpx;
height: 32rpx;
}
.first {
width: 48rpx;
height: 32rpx;
}
.diot {
width: 30rpx;
height: 6rpx;
}
.marginLeft-four {
margin-left: 4rpx;
}
}
}
</style>

View File

@ -0,0 +1,333 @@
<template>
<view class="pageBox">
<image src="https://sharkbaby.yhy.ren/reportsBg.png" class="reportsBg"></image>
<view class="bg-video card marginBottom" v-for="(item, index) in analysisReports" :key="index">
<view class="examClass flex-contion">
<image src="https://sharkbaby.yhy.ren/grade.png"></image>{{item.examClass}}
</view>
<block v-if="!item.hidden">
<view class="flex-contion text-bold margin-bottom-xs">
<view class="cutt"></view>
<view>解释</view>
</view>
<view class="greyColor">{{item.itemExplain}}</view>
<view class="flex-contion text-bold margin-bottom-xs marginTop-sm">
<view class="cutt"></view>
<view>判断</view>
</view>
<view class="greyColor" v-if="item.examClass!='血压'&&item.examClass!='血糖'&&item.examClass!='血脂'">{{item.examRang}}</view>
<block v-if="item.examClass=='血压'">
<view class="table text-df marginTop-sm marginBottom-sm">
<view class="text-center borderBottom text-bold">血压水平分类及定义</view>
<view class="flex borderBottom text-bold">
<view class="flex-sub text-center borderRight">分类</view>
<view class="flex-sub text-center borderRight">收缩压(mg)</view>
<view class="flex-sub text-center">舒张压(mmHg)</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">正常血压</view>
<view class="flex-sub text-center borderRight"><120 </view>
<view class="flex-sub text-center"><80</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">正常高值</view>
<view class="flex-sub text-center borderRight">120-139 ()</view>
<view class="flex-sub text-center">80-89</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">高血压</view>
<view class="flex-sub text-center borderRight">140 ()</view>
<view class="flex-sub text-center">290</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">1级高血压(轻度)</view>
<view class="flex-sub text-center borderRight">140-159()</view>
<view class="flex-sub text-center">90-99</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">2级高血压(中度)</view>
<view class="flex-sub text-center borderRight">160-179()</view>
<view class="flex-sub text-center">100-109</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">3级高血压(重度)</view>
<view class="flex-sub text-center borderRight">180()</view>
<view class="flex-sub text-center">110</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">单纯收缩期高血压</view>
<view class="flex-sub flex-conter borderRight">140 </view>
<view class="flex-sub flex-conter"><90</view>
</view>
<view class="text-center">:当收缩压和舒张压分属于不同级别时以较高的分级为准</view>
</view>
</block>
<!-- 血糖 -->
<block v-if="item.examClass=='血糖'">
<view class="table text-df marginTop-sm">
<view class="text-center borderBottom text-bold">糖代谢状态分类(世界卫生组织1999年)</view>
<view class="flex text-bold borderBottom">
<view class="borderRight flex-conter" style="width: 30%;">糖代谢状态</view>
<view class="flex-sub">
<view class="text-center borderBottom">静脉血浆葡萄糖(mmol/L)</view>
<view class="flex">
<text class="flex-sub borderRight text-center">空腹血糖</text>
<text class="flex-sub text-center">糖负荷后2h血糖</text>
</view>
</view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">正常血糖</view>
<view class="flex-sub text-center borderRight"><6.1</view>
<view class="flex-sub text-center"><7.8</view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">空腹血糖受损</view>
<view class="flex-sub text-center borderRight">6.1,<7.0</view>
<view class="flex-sub text-center"><7.8</view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">糖耐里减低</view>
<view class="flex-sub text-center borderRight"><7.0</view>
<view class="flex-sub text-center">7.8,<11.1</view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">糖尿病</view>
<view class="flex-sub text-center borderRight">7</view>
<view class="flex-sub text-center">>11.1</view>
</view>
<view class="text-center">;空腹血糖受损和糖耐里减低统称为糖调节受损也称糖尿病前期;空腹血糖正常参考</view>
</view>
<view class="table text-df marginTop-sm marginBottom-sm">
<view class="text-center borderBottom text-bold">糖尿病诊断标准</view>
<view class="flex borderBottom text-bold">
<view class="flex-conter borderRight" style="width: 30%;">诊断标准</view>
<view class="flex-sub text-center">静脉血浆前萄糖或糖化血红蛋白水平</view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">典型糖尿病症状</view>
<view class="flex-sub flex-conter"></view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">加上随机血糖</view>
<view class="flex-sub text-center">11.1mmol/L</view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">或加上空腹血糖</view>
<view class="flex-sub flex-conter">7.0mmol/L</view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">或加上0GTT 2h血糖</view>
<view class="flex-sub flex-conter">11.1mmol/L</view>
</view>
<view class="flex borderBottom">
<view class="text-center borderRight" style="width: 30%;">或加上糖化血红蛋白</view>
<view class="flex-sub flex-conter">6.5%</view>
</view>
<view class="text-center">无糖尿病典型症状者须改日复查确认</view>
</view>
</block>
<block v-if="item.examClass=='血脂'">
<view class="table text-df marginTop-sm marginBottom-sm">
<view class="flex borderBottom text-bold">
<view class="flex-sub text-center borderRight">分类</view>
<view class="flex-sub text-center">正常值范围</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">总胆固醇TC</view>
<view class="flex-sub flex-conter"><5.2mmol/L</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">甘油三酯TG</view>
<view class="flex-sub text-center"><1.7mmol/L</view>
</view>
<view class="flex borderBottom">
<view class="flex-sub text-center borderRight">低密度脂蛋白LDL-C</view>
<view class="flex-sub flex-conter"><3.4mmol/L</view>
</view>
<view class="flex">
<view class="flex-sub text-center borderRight">高密度脂蛋白HDL-C</view>
<view class="flex-sub flex-conter">1.04mmol/L</view>
</view>
</view>
</block>
<block v-for="(item1, index1) in item.chartList" :key="index1">
<!-- 折线图部分 -->
<view class="charts-box margin-top-xs">
<qiun-data-charts type="line" :opts="opts" canvas2d @tap="tap" :chartData="item1.seriesJson"
onmovetip :ontouch="true" tapLegend />
</view>
<view class="flex-contion text-bold" v-if="item1.trendAnalysis">
<view>趋势说明</view>
<view class="themColor">{{item1.trendAnalysis}}</view>
</view>
<view v-if="item1.conclusion!='不生成报告'" class="margin-top-xs">
<text class="text-bold themColor">结论</text><text class="greyColor">{{item1.conclusion}}</text>
</view>
</block>
</block>
<view class="bottomCard themColor flex-conter" @tap="changeClick(item)">
<text>{{item.hidden?'展开':'收起'}}</text>
<uni-icons :type="item.hidden?'bottom':'top'" color="#3AAFB8" size="24"></uni-icons>
</view>
</view>
</view>
</template>
<script>
import {
showLoading,
hideLoading,
toast
} from '/tool/index.js'
export default {
data() {
return {
analysisReports: [],
opts: {
color: ['#3AAFB8'],
xAxis: {
disableGrid: true
},
yAxis: {
gridType: "dash",
dashLength: 2
},
extra: {
area: {
type: "curve",
opacity: 0.2,
addLine: true,
width: 2,
gradient: true,
activeType: "hollow"
}
}
},
}
},
onLoad(option) {
uni.setStorageSync('userId', option.userId)
this.getUserAnalysisReport(option.id);
},
methods: {
tap() {
console.log('点击了图标')
},
changeClick(item) {
item.hidden = !item.hidden
},
getUserAnalysisReport(id) {
showLoading('加载中...')
this.$API.getUserAnalysisReport({
data: {
id
}
}).then(res => {
console.log(res);
if (res.code == 200) {
res.data.map(item => {
item.chartList.map((item1, index) => {
let a = JSON.parse(item1.seriesJson);
let splitNumber = 5;
if (a.series[0].data.length != 0) {
let max = Math.max.apply(null, a.series[0].data);
let min = Math.min.apply(null, a.series[0].data);
if ((Number(max) - Number(min) >= 5) || (Number(max) - Number(
min) == 0)) {
splitNumber = 5;
} else {
splitNumber = 1
}
}
let resData = {
categories: a.categories,
series: a.series,
splitNumber: splitNumber
};
item1.seriesJson = JSON.parse(JSON.stringify(resData));
})
})
res.data.map(item => item.hidden = false)
this.analysisReports = res.data
} else {
toast(res.msg)
}
hideLoading()
})
}
}
}
</script>
<style lang="scss" scoped>
.pageBox {
padding: 32rpx;
color: #3F4040;
.themColor {
color: $uni-color;
}
.greyColor {
color: #909292;
}
.table{
width: 100%;
border: 1rpx solid #000;
.borderRight{
border-right: 1rpx solid #000;
}
.borderBottom{
border-bottom: 1rpx solid #000;
}
}
.reportsBg {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 552rpx;
}
.card {
padding: 20rpx 24rpx 0;
border-radius: 16rpx;
background: #fff;
}
.bottomCard {
border-top: 2rpx solid #eee;
width: 100%;
line-height: 80rpx;
margin-top: 20rpx;
font-size: 30rpx;
font-weight: bold;
}
}
.examClass {
font-weight: bold;
margin-bottom: 20rpx;
font-size: 36rpx;
image {
$wh: 40rpx;
width: $wh;
height: $wh;
margin-right: 12rpx;
}
}
.cutt {
width: 4rpx;
height: 32rpx;
background: $uni-color;
margin-right: 8rpx;
}
.charts-box {
width: 100%;
height: 600rpx;
}
</style>

View File

@ -0,0 +1,364 @@
<template>
<view class="content">
<!-- 背景图片 -->
<image src="https://shayu5qny.yhy.ren/revision/earnPointsBg.png" class="earnPointsBg"></image>
<view class="contioner bg-video">
<view class="flex">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="color">
<view class="introduce text-df">
欢迎使用线上健康评估工具让我们一起探索您的健康需求吧
</view>
<view class="evaluation">
<view class="text-bold color">测评介绍</view>
<view class="flex-align" style="color: #3F4040;margin-left: 12rpx;">
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/intralTime.png" class="intralTime"></image>
<view><text class="text-bold text-xl">{{times}}</text><text class="text-sm">分钟</text>
</view>
<view class="grey text-sm margin-top-xs">简单快速</view>
</view>
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/questions.png" class="intralTime"></image>
<view><text class="text-bold text-xl">{{questionCount}}</text><text
class="text-sm"></text></view>
<view class="grey text-sm margin-top-xs">专业量表</view>
</view>
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/peoples.png" class="intralTime"></image>
<view><text class="text-bold text-xl">{{assessCount}}</text><text
class="text-sm"></text></view>
<view class="grey text-sm margin-top-xs">已完成测评</view>
</view>
</view>
</view>
</view>
</view>
<view class="flex" style="margin-top: 80rpx;">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="card">
<view class="text-bold color">说明</view>
<view class="text-df grey marginTop-sm">1填写本问卷您将获得您的专属健康报告及生活方式改善建议</view>
<view class="text-df grey margin-top-xs">2本问卷测试结果仅供您自测参考不作为医学诊断</view>
<view class="text-df grey margin-top-xs">3您的所有信息都将保密</view>
</view>
</view>
<view class="flex" style="margin-top: 80rpx;">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="card">
<view class="btn" @click="startEvaluation">开始测评</view>
</view>
</view>
<view class="literature" v-if="assessReferenceList!=null">
<view class="text-bold color">参考文献</view>
<block v-for="(item,index) in assessReferenceList" :key="index">
<view class="marginTop-sm text-df grey">[{{index+1}}]{{item.reference}}</view>
</block>
</view>
</view>
<uni-popup ref="codePopup" type="center" :isMaskClick="false">
<view class="cards">
<view class="bg-video flex-contion text-sm">
<input v-model="phone" placeholder="请输入你的手机号码" class="inputClass" />
<view class="flex-contion rightTitle">
<text>86</text>
<image src="https://shayu5qny.yhy.ren/downward.png" class="downward"></image>
</view>
</view>
<view class="cutt"></view>
<view class="bg-video flex-align text-sm">
<input v-model="code" @input="onKeyInput" placeholder="请输入验证码" class="inputClass flex-sub" />
<view class="rightTwo themColor text-bold" @click="!isResend?getCode():''">
{{isResend?'重新发送'+(time):'获取验证码'}}
</view>
</view>
<view class="cutt"></view>
<view :class="['btns',phone==''||code==''||!isCode?'':'disabled']"
@click="phone!=''&&code!=''&&isCode?signIn():''">登录</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading,
} from "/tool/index.js"
export default {
data() {
return {
title: '评估问卷',
illustrate: '本测试结果仅供用户自测参考,不作为医学诊断。',
times: '', //
questionCount: '', //
assessCount: '', //
assessReferenceList: null, //
phone: '', //
code: '', //
isCode: false, //
timer: null, //
time: 60, //
isResend: false, //
age: '', //
name: '', //
}
},
onLoad(options) {
this.$nextTick(() => {
this.$refs.codePopup.open()
})
},
methods: {
//
getDetail() {
this.$API.getAssessInfo({
data: {
diseases: 95, //id
memberId: 0, //id
type: 2, // 1. 2.
}
}).then(res => {
this.times = res.data.times
this.questionCount = res.data.questionCount
this.assessCount = res.data.assessCount
this.assessReferenceList = res.data.assessReferenceList
})
},
//
async signIn() {
if (this.$preventClick()) return
var that = this
const reg = (/^1\d{10}$/);
if (!reg.test(this.phone)) return toast('手机号码格式不正确,请重新填写')
let ret1 = that.$API.appLogin({
data: {
phone: that.phone,
code: that.code
},
}).then(async (res) => {
hideLoading()
if (res.code != 200) return uni.showToast({
title: res.msg || '登录失败,请联系管理员',
icon: 'none',
duration: 2000,
success: () => {}
})
if (res.data.sysUser == null) return toast('用户未注册')
uni.setStorageSync("userId", res.data.sysUser.userId)
this.age = res.data.sysUser.age
this.name = res.data.sysUser.nickName
this.$API.hasLifestyleAssessment().then(ret => {
if (ret.data.status == 0) { //
this.getDetail()
} else { //
uni.redirectTo({
url: '/pages/scanCodeEvaluation/health-risks/basicReport/basicReport?age=' +
this.age + '&name=' + this.name
})
}
this.$refs.codePopup.close()
})
})
},
onKeyInput: function(event) {
this.code = event.target.value
},
startEvaluation() {
uni.redirectTo({
url: '/pages/scanCodeEvaluation/health-risks/index/index?age=' + this.age + '&name=' + this
.name
})
},
//
getCode() {
if (this.$preventClick()) return
if (!this.phone) return toast('请输入手机号')
const reg = (/^1\d{10}$/);
if (!reg.test(this.phone)) return toast('手机号码格式不正确,请重新填写')
this.isCode = true
this.isResend = true
this.$API.sendTheVerificationCodeApp({
data: {
phone: this.phone,
exist: 1
}
}).then(res => {
this.timeFunction()
if (res.code != 200) return toast(res.msg)
})
},
//
timeFunction() {
this.timer = setInterval(() => {
this.time--
if (this.time == 0) {
clearInterval(this.timer)
this.isResend = false
this.time = 60
}
}, 1000)
},
}
}
</script>
<style lang="scss" scoped>
.cards {
padding: 20rpx;
background: #FFFFFF;
border-radius: 16rpx;
.rightTitle {
position: absolute;
right: 8rpx;
z-index: 10;
width: 200rpx;
height: 96rpx;
line-height: 96rpx;
text-align: right;
justify-content: flex-end;
.downward {
$wh: 32rpx;
width: $wh;
height: $wh;
}
}
.btns {
width: 100%;
line-height: 84rpx;
text-align: center;
border-radius: 50rpx;
background: #CDCDCD;
color: #FFFFFF;
font-size: 28rpx;
margin-top: 80rpx;
}
.inputClass {
width: 100%;
height: 96rpx;
line-height: 96rpx;
// border-bottom: 1rpx solid #E9E9E9;
padding-left: 16rpx;
}
.cutt {
width: 100%;
height: 1rpx;
background: #E9E9E9;
}
.fontColor {
color: #3F4040;
}
.themColor {
color: $uni-color;
}
.disabled {
background: $uni-color !important;
}
}
.content {
width: 100vw;
height: 100vh;
background: linear-gradient(171deg, #EFFFFD 10.63%, #F4F8F7 73.62%);
}
.topContioner {
position: fixed;
top: 0;
width: 100vw;
z-index: 10;
.leftBack {
position: absolute;
left: 20rpx;
}
}
.earnPointsBg {
width: 100vw;
height: 574rpx;
position: fixed;
top: 0;
z-index: 1;
}
.contioner {
padding: 74rpx 32rpx 0;
z-index: 2;
.color {
color: #17191A;
}
.grey {
color: #909292;
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.introduce {
padding: 20rpx;
width: calc(502rpx - 40rpx);
height: calc(120rpx - 40rpx);
background: #FFFFFF;
border-radius: 0rpx 16rpx 0rpx 0rpx;
}
.evaluation {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 26rpx 34rpx 24rpx 36rpx;
margin-top: 16rpx;
width: calc(502rpx - 70rpx);
height: calc(278rpx - 50rpx);
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.intralTime {
$wh: 60rpx;
width: $wh;
height: $wh;
}
}
.card {
width: calc(502rpx - 40rpx);
padding: 20rpx;
background: #FFFFFF;
border-radius: 0rpx 16rpx 16rpx 16rpx;
.btn {
width: 424rpx;
text-align: center;
line-height: 92rpx;
background: #3AAFB8;
border-radius: 50rpx;
margin: 0 20rpx;
color: #FFFFFF;
}
}
.literature {
padding: 20rpx;
background: #FFFFFF;
border-radius: 0rpx 16rpx 16rpx 16rpx;
margin: 60rpx 0 20rpx;
}
}
</style>

View File

@ -0,0 +1,208 @@
.pageBox{
.bgBackground {
position: fixed;
top: 0;
right: 0;
z-index: 1;
width: 100vw;
height: 606rpx;
background: linear-gradient(145deg, #E4F5EB 0%, rgba(228, 245, 235, 0) 100%);
}
.themColor{
color: $uni-color;
}
.fontColor {
color: #17191A;
}
.contioner {
padding:58rpx 32rpx 32rpx;
position: relative;
z-index: 2;
color: #3F4040;
.dotocr {
position: absolute;
top: 0;
right: 10rpx;
width: 360rpx;
height: 488rpx;
z-index: -1;
}
.topWidth {
width: 100%;
height: 32rpx;
background: #FFFFFF;
border: 7rpx solid #6ACBD1;
border-radius: 40rpx;
margin-top: 48rpx;
}
.whiteShaw {
width: calc(100% -24rpx);
background: #FFFFFF;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0, 0, 0, 0);
margin-top: -28rpx;
margin-left: 12rpx;
.topBg {
width: 100%;
height: 32rpx;
background: linear-gradient(180deg, rgba(56, 176, 184, 0.30) 0%, rgba(56, 176, 184, 0.00) 100%);
}
.contonentPadding {
padding: 16rpx 20rpx 32rpx;
box-shadow: 0rpx 4rpx 13rpx 0rpx rgba(0,0,0,0.1);
.planImg{
width: 100%;
height: 240rpx;
border-radius: 20rpx;
margin-top: 24rpx;
}
.sector{
width: 100%;
height: 280rpx;
}
.titlePoastion{
position: absolute;
bottom: 12rpx;
left: 48%;
transform: translateX(-50%);
.topTitle{
font-size: 56rpx;
color: #3AAFB8;
font-weight: bold;
}
.bottomTitle{
font-size: 24rpx;
color: #909292;
}
}
}
}
.leftTagOne{
width: 144rpx;
height: 16rpx;
background: linear-gradient(360deg, #38B0B8 0%, rgba(56,176,184,0) 100%);
}
.leftTagTwo{
width: 252rpx;
height: 16rpx;
background: linear-gradient(360deg, #38B0B8 0%, rgba(56,176,184,0) 100%);
}
}
.riskResults{
background: #FFFFFF;
border-radius: 20rpx;
margin-left: 12rpx;
.replace{
background: #EBF7F8;
border-radius: 20rpx;
padding: 24rpx 32rpx;
}
.leftColor{
color: #112950;
}
.rightColor{
color: #8E9AAB;
}
.charts-box {
width: 630rpx;
height: 600rpx;
}
.locationOne{
margin-left: 10%;
}
.locationTwo{
margin-left: 36%;
}
.locationThree{
margin-left: 60%;
}
.locationFour{
margin-left: 85%;
}
.location{
width: 0;
height: 0;
border-top: 20rpx solid #009DFF;
border-right: 16rpx solid transparent;
border-left: 16rpx solid transparent;
margin-bottom: 12rpx;
}
.progress{
height: 12rpx;
&:first-child{
border-radius: 50rpx 0rpx 0rpx 50rpx;
}
&:nth-last-child(1){
border-radius: 0 50rpx 50rpx 0;
}
}
}
.preventionPoints{
background: #FFFFFF;
border-radius: 20rpx;
margin-left: 12rpx;
.tagWidth {
display: inline-block;
width: 6rpx;
height: 32rpx;
background: #3AAFB8;
border-radius: 50rpx;
margin-right: 12rpx;
}
.grey {
display: inline-block;
white-space:pre-wrap;
color: #909292;
text-indent: 1rem;
line-height: 46rpx;
letter-spacing: 2rpx;
font-size: 30rpx;
}
.cutt{
width: 100%;
height: 1rpx;
background: #eee;
margin: 30rpx 0;
}
}
.bottomBtn{
position: fixed;
bottom: 0;
width: 100%;
height: 120rpx;
background: #FFFFFF;
.btn{
width: 686rpx;
height: 84rpx;
line-height: 84rpx;
text-align: center;
background: $uni-color;
border-radius: 42rpx;
color: #FFFFFF;
}
}
.btnBottom{
width: 100vw;
background-color: #fff;
box-shadow: 0 0 10rpx rgba(0, 0, 0, .1);
display: flex;
align-items: center;
height: 110rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.btn{
color: #fff;
text-align: center;
line-height: 80rpx;
background-color: $uni-color;
border-radius: 8rpx;
flex: 1;
margin: 0 20rpx;
}
}
}

View File

@ -0,0 +1,151 @@
<template>
<view class="pageBox" v-if="isShow">
<view class="bgBackground"></view>
<view class="contioner">
<view class="fontColor">{{realName}}</view>
<view class="fontColor text-bold text-xl marginTop-sm">欢迎开启您的专属健康报告</view>
<image src="https://sharkbaby.yhy.ren/maskGroup.png" class="dotocr"></image>
<view class="topWidth"></view>
<view class="whiteShaw color">
<view class="topBg"></view>
<view class="contonentPadding">
<view class="text-xl text-bold">评估结果</view>
<view class="bg-video">
<image class="sector"
:src="evaluationIndex==0?'https://sharkbaby.yhy.ren/range.png':evaluationIndex==1?'https://sharkbaby.yhy.ren/sameAs.png':'https://sharkbaby.yhy.ren/goodTwo.png'">
</image>
<view class="titlePoastion text-center">
<view class="topTitle">{{formeDate.nowRiskValue}}</view>
<view class="bottomTitle">我的健康分</view>
</view>
</view>
</view>
</view>
<!-- 各维度健康报告 -->
<view class="riskResults marginTop-sm padding marginBottom-sm">
<view class="text-xl text-bold">各维度健康报告</view>
<view class="leftTagTwo marginBottom"></view>
<block v-for="(item,index) in formeDate.listMap" :key="index">
<view class="replace text-sm marginBottom-sm">
<view class="marginBottom-sm">{{item.name}}</view>
<!-- 位置 -->
<view class="location"
:class="formeDate.listMap[index].level==1?'locationOne':formeDate.listMap[index].level==2?'locationTwo':formeDate.listMap[index].level==3?'locationThree':'locationFour'">
</view>
<!-- 进度条 -->
<view class="flex-contion text-xs marginBottom-sm">
<block v-for="(item1,index1) in formeDate.listMap" :key="index1">
<block v-if="index1<4">
<view class="flex-sub progress" :style="{background:item1.bgColor}">
</view>
</block>
</block>
</view>
<view class="flex-contion text-xs text-center">
<block v-for="(item2,index2) in formeDate.listMap" :key="index2">
<block v-if="index2<4">
<view class="flex-sub">{{item2.proressName}}</view>
</block>
</block>
</view>
</view>
</block>
</view>
<view class="preventionPoints padding" v-if="formeDate.suggest.length!=0">
<view class="text-xl text-bold">目前状况</view>
<view class="leftTagOne marginBottom"></view>
<block v-for="(item,index) in formeDate.suggest" :key="index">
<view class="flex-contion marginBottom-sm">
<text class="tagWidth"></text>
<text class="text-bold">step {{index+1}}</text>
</view>
<view class="marginBottom-sm text-df text-bold">{{item.typeList[0]}}</view>
<view class="marginBottom-sm text-df text-bold">{{item.typeList[1]}}</view>
<text class="grey">{{item.name.replace(/\\n/g,'\n')}}</text>
<view class="cutt" v-if="index<formeDate.suggest.length-1"></view>
</block>
</view>
</view>
<view class="btnBottom">
<view class="btn" @tap="goPage">重新评估</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
//
realName: '',
//
formeDate: {},
//
evaluationIndex: null,
isShow: false, //
memberId: '0',
age: '',
}
},
onLoad(opt) {
this.realName = opt.name // 0 id
this.age = opt.age // 0 id
this.getInfo()
},
methods: {
getInfo() {
let that = this
showLoading('加载中...')
that.$API.getDiseaseResult({
data: {
diseaseId: '95',
}
}).then((res) => {
that.formeDate = res.data
let index;
let score = Number(res.data.nowRiskValue)
if (score >= 0 && score < 42) {
index = 0
} else if (score >= 42 && score <= 68) {
index = 1
} else {
index = 2
}
this.evaluationIndex = index
that.$set(that, 'isShow', true)
if (res.data.listMap.length == 7) {
res.data.listMap[0].bgColor = "#009DFF"
res.data.listMap[1].bgColor = "#3AAFB8"
res.data.listMap[2].bgColor = "#FDA92A"
res.data.listMap[3].bgColor = "#F87C7C"
res.data.listMap[0].proressName = "健康"
res.data.listMap[1].proressName = "低风险"
res.data.listMap[2].proressName = "中风险"
res.data.listMap[3].proressName = "高风险"
}
if (res.data.suggest.length > 0) {
res.data.suggest.map(item => {
item.typeList = item.type.split(" ")
})
}
hideLoading()
})
},
//
goPage() {
uni.redirectTo({
url: '/pages/scanCodeEvaluation/health-risks/index/index?age=' + this.age + '&name=' + this
.realName
})
},
}
}
</script>
<style lang="scss" scoped>
@import './basicReport.scss';
</style>

View File

@ -0,0 +1,253 @@
page{
background: #F3F4F6;
}
.pageBox{
.color{
color: #17191A;
}
.inputPopup{
background: #FFF;
padding: 20rpx;
height: 200rpx;
}
.inputClass{
border: 2rpx solid #3AAFB8;
line-height: 64rpx;
height: 64rpx;
border-radius: 8rpx;
padding-left: 20rpx;
margin-top: 20rpx;
}
.topPostionBg{
position: absolute;
top: 0;
right: 0;
width: 100vw;
height: 528rpx;
background: linear-gradient(155deg, #E4F5EB 0%, rgba(228,245,235,0) 100%);
}
.staging{
width: 470rpx;
height: calc(580rpx - 42rpx);
border-radius: 48rpx;
background: #FFF;
padding: 22rpx 32rpx 20rpx;
.bg{
width: 100%;
height: 224rpx;
background: linear-gradient(180deg, #D8FCFF 0%, #FFF 100%);
position: absolute;
top: 0;
left: 0;
border-radius: 48rpx 48rpx 0 0;
}
.stagingBackground{
width: 268rpx;
height: 166rpx;
}
.threeSix{
margin-top: 36rpx;
}
.oneTwo{
margin-top: 12rpx;
}
.stagBtn{
width: calc(406rpx - 278rpx);
padding: 10rpx 138rpx 10rpx 140rpx;
border-radius: 50rpx;
border: 2rpx solid $uni-color;
background: $uni-color;
margin: 0 auto;
color: #FFF;
margin-top: 32rpx;
}
.colorGrey{
color: #909292;
margin-top: 32rpx;
}
}
.contioner{
padding: 32rpx;
.backBottom{
position: fixed;
bottom: 10vh;
right: 34rpx;
padding: 12rpx 32rpx;
border-radius: 50rpx;
background: #FFF;
box-shadow: 0 8rpx 8rpx 0 rgba(4, 70, 74, 0.14);
display: flex;
align-items: center;
image{
$wh:24rpx;
width: $wh;
height: $wh;
margin-right: 8rpx;
}
}
.topCard{
padding: 12rpx;
margin-top: 48rpx;
border-radius: 32rpx;
background: #FFFFFF;
.headSculpture{
$wh:112rpx;
width: $wh;
height: $wh;
background: #F3F4F6;
border-radius: 50%;
border: 6rpx solid #FFFFFF;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -52rpx;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
image{
$wh:100rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.border{
border: 1rpx dotted #3AAFB8;
border-radius: 20rpx;
.cut{
display: inline-block;
width: 4rpx;
height: 20rpx;
margin: 0 12rpx;
background: $uni-color;
}
.top{
margin-top: 72rpx;
color: $uni-color;
}
.tag{
padding: 0 20rpx;
line-height: 40rpx;
border-radius: 4rpx;
background: #F3F4F6;
color: #909292;
font-size: 24rpx;
}
}
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.tagWidth{
width: 48rpx;
height: 8rpx;
background: #EFF9F8;
border-radius: 50rpx;
margin-right: 12rpx;
margin-top: 20rpx;
display: inline-block;
}
.tagBgShaw{
background: $uni-color;
}
.introduce {
padding: 20rpx;
width: calc(502rpx - 40rpx);
background: #FFFFFF;
border-radius: 0rpx 16rpx 0rpx 0rpx;
}
.borderBottom{
border-radius: 0rpx 16rpx 16rpx 16rpx;
}
.rightGet{
width: 136rpx;
line-height: 48rpx;
text-align: center;
background: linear-gradient(180deg, #FDC674 0%, #FF9A02 100%);
border-radius: 50rpx;
color: #FFFFFF;
font-size: 24rpx;
margin-left: 38rpx;
}
.evaluation {
width: calc(502rpx - 40rpx);
padding: 20rpx;
margin-top: 16rpx;
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.greyTag{
padding: 18rpx 40rpx;
background: #F8F8F8;
border-radius: 16rpx;
margin-top: 20rpx;
color: #3F4040;
.tegWidth{
width: 2rpx;
height: 24rpx;
background: #CCCCCC;
margin: 0 24rpx;
display: inline-block;
}
}
.shawDown{
background: #EFF9F8;
color: $uni-color;
}
.cut{
margin-top: 32rpx;
width: 100%;
height: 1rpx;
background: #eee;
}
.greyColor{
color: grey;
}
.qding{
width: 320rpx;
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
margin: 0 auto;
color: #FFFFFF;
margin-top: 20rpx;
}
}
.rightLayOut{
display: flex;
align-items: center;
margin-top: 32rpx;
.leftTag{
padding: 20rpx 32rpx;
background: #3AAFB8;
border-radius: 16rpx 0rpx 16rpx 16rpx;
color: #FFFFFF;
margin-right: 24rpx;
}
.rightAvter{
$wh:80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
}
}
.bottomBtn{
position: fixed;
bottom: 20rpx;
width: calc(100% - 64rpx);
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, #36AAB1 0%, #6ACBD1 100%);
border-radius: 50rpx;
color: #FFFFFF;
margin-top: 80rpx;
}
}
}

View File

@ -0,0 +1,825 @@
<template>
<view class="pageBox" v-if="pageShow">
<view class="topPostionBg"></view>
<block v-if="temporarily">
<uni-popup type="center" ref="center" :isMaskClick="false">
<view class="staging bg-video">
<view class="bg"></view>
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/stagingBackground.png" class="stagingBackground"></image>
</view>
<view class="text-xxl text-center threeSix text-bold">温馨提示</view>
<view class="text-center text-sm oneTwo">发现您还有一份填了一半的问卷呢</view>
<view class="text-center text-sm">请告诉我您想怎么处理</view>
<view class="stagBtn margin-top-xs" @tap="continueChange">继续填写</view>
<view class="text-center text-df colorGrey" @tap="againQuestion">重新填写</view>
</view>
</uni-popup>
</block>
<view class="contioner" v-else>
<view class="topCard bg-video">
<view class="headSculpture">
<image src="https://shayu5qny.yhy.ren/youngerSister.png"></image>
</view>
<view class="border text-center bg-video">
<view class="top text-df text-bold">
<text class="color">鲨鱼宝宝</text>
<text class="cut"></text>
<text>专属评估客服</text>
</view>
<view class="flex-conter margin-top-xs marginBottom">
<view class="tag marginRight-xs">{{(allCount*15/60).toFixed(0)}}分钟</view>
<view class="tag marginRight-xs">{{allCount}}</view>
<view class="tag marginRight-xs" v-if="subTopic.length>0">父子题</view>
<view class="tag" v-if="integral!=0">积分奖励</view>
</view>
</view>
</view>
<scroll-view scroll-y :style="{'height':srcollHeight}" :scroll-top="scrollView" @scroll="scroll"
scroll-with-animation>
<view class="next" style="padding-top: 32rpx;"></view>
<block v-for="(item,index) in cardRadio" :key="index">
<view v-show="item.hidden">
<view class="flex bg-video" style="margin-top: 32rpx;">
<image src="https://shayu5qny.yhy.ren/youngerSister.png" class="avare"></image>
<view class="color flex-sub">
<view class="introduce text-df">
<view>{{index + 1 }}:{{item.subjectInfo}}</view>
<view class="text-sm margin-top-xs" style="color: #5878B4;" v-if="item.memo!=null">
{{item.memo}}
</view>
</view>
<!-- 单选样式 -->
<block v-if="item.subjectType=='0'">
<view class="evaluation">
<view class="text-df">单选</view>
<block v-for="(item1,index1) in item.diseaseAssessSubjectOption" :key="index1">
<view :class="['greyTag',item1.hidden?'shawDown':'']"
@tap="cardChange(index,index1,item1)">
<text class="text-bold">{{item1.optionCode}}</text>
<text class="tegWidth"></text>
<text>{{item1.optionValue}}</text>
</view>
</block>
</view>
</block>
<!-- 多选样式 -->
<block v-if="item.subjectType=='1'">
<view class="evaluation">
<view class="text-df">多选</view>
<checkbox-group>
<label v-for="(item1,index1) in item.diseaseAssessSubjectOption"
:key="item1.id" @tap="multipleChange(index,index1,item1)">
<view :class="['greyTag flex-contion',item1.hidden?'shawDown':'']">
<checkbox color="#3AAFB8" :value="item1.optionCode"
:checked="item1.hidden" />
<view class="marginLeft-sm">{{item1.optionValue}}</view>
</view>
</label>
</checkbox-group>
<view class="qding" @tap="nextMulQuestion(index)">确认</view>
</view>
</block>
<!-- 填空样式 -->
<block v-if="item.subjectType=='2'||item.subjectType=='4'">
<view class="evaluation">
<view class="text-df">填空</view>
<block v-for="(item1,index1) in item.diseaseAssessSubjectOption" :key="index1">
<view class="marginTop-sm" v-if="item.subjectType=='2'">
{{item1.optionValue}}
</view>
<view @tap="inputChange(item.subjectInfo,
item1.optionCode!=''&&item1.optionCode!=null?item1.optionCode:item1.defaultValue,
index,index1)" :class="['inputClass',(item1.optionCode==''||item1.optionCode==null)&&(
item1.defaultValue==''||item1.defaultValue==null)?'greyColor':'']">
{{item1.optionCode!=''&&item1.optionCode!=null?item1.optionCode:
item1.defaultValue!=''&&item1.defaultValue!=null?item1.defaultValue:'请输入'}}
</view>
</block>
<view class="qding" @tap="nextBlanQuestion(index)">确认</view>
</view>
</block>
</view>
</view>
<view class="flex justify-end" :class="['quest'+index]" v-if="item.defaultValue!=''">
<view class="rightLayOut">
<view class="leftTag flex-sub">{{item.defaultValue}}</view>
<image :src="userProfile" class="rightAvter">
</image>
</view>
</view>
</view>
</block>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
<uni-popup type="top" ref="inputRef" @maskClick="close">
<view class="inputPopup">
<view class="text-df">{{inputTitle}}</view>
<block v-if="inputTitle!='请填写以下常规医学指标检查结果'&&inputTitle!='请填写以下医学指标检查结果'&&inputTitle!='请填写胃功能检查结果'">
<block v-if="inputTitle!='请填写 骨密度检查指标-T值'">
<input placeholder="请输入" type="number" @input="inputChange1" :value="inputValue"
:focus="focus" @confirm="close" class="inputClass" />
</block>
<block v-else>
<input placeholder="请输入" type="text" @input="inputChange1" :value="inputValue"
:focus="focus" confirm-type="完成" @confirm="close" class="inputClass" />
</block>
</block>
<block v-else>
<input :value="inputValue" type="digit" placeholder="请输入" :focus="focus" @input="inputChange1"
@confirm="close" class="inputClass" />
</block>
</view>
</uni-popup>
<view class="bottomBtn" @tap="submitMultiple" v-if="isNext">生成评估报告</view>
<!-- 返回底部 -->
<view class="backBottom" @tap="goBottom" v-show="scrollGun<600&&isBottom">
<image src="https://shayu5qny.yhy.ren/Frame.png"></image>
<view class="text-sm themColor">返回底部</view>
</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
pageShow: false, //
isBumit: false, //
queShow: 0, //
//
diseases: '95',
//
isNext: false,
//
waist: null,
//
hipline: null,
//
questionObject: {},
//
key: '',
//
value: '',
//
cardRadio: [],
//
subTopic: [],
//
temporarily: false,
// id
generationId: '',
//
checkItem: {},
allCount: '', //
userProfile: 'https://shayu5qny.yhy.ren/youngerSister.png', //
memberId: '0', // 0 id
memberName: '', //
memberImg: '', //
memberAge: '', //
age: '', //
srcollHeight: "", //
scrollView: 0, //
scrollGun: 0, //
fixedHeight: 100000, //
integral: null,
isBottom: false, //
inptuIndex: 0, //
inptuIndex1: 0, //
inputValue: '', //
inputTitle: '', //
focus: false, //
}
},
onLoad(options) {
this.age = options.age //
this.userName = options.name //
//
this.temporaryAata()
this.selectIntegral()
},
//
beforeDestroy() {
if (!this.isBumit) {
this.temporaryQuestion()
}
},
methods: {
//
selectIntegral() {
this.$API.selectTaskIntegral({
data: {
assessIds: this.diseases, //
typeId: 1, //id 1
}
}).then(res => {
this.integral = res.data
})
},
//
questClass(index) {
this.queShow = index + 1 //
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".quest" + index).boundingClientRect((data) => {
this.scrollView = parseInt(this.scrollGun + data.top - 82)
}).exec();
if (index > 3) {
this.isBottom = true
}
}, 100)
},
//
scroll(e) {
this.scrollGun = e.target.scrollTop
},
//
goBottom() {
let num = this.fixedHeight++
this.scrollView = num
},
//
Height() {
const query = uni.createSelectorQuery().in(this);
query.select(".next").boundingClientRect((data) => {
//
this.srcollHeight = uni.getSystemInfoSync().windowHeight - data.top - 18 + "px";
}).exec();
},
//
temporaryAata() {
let that = this
that.$API.selectPaperList({
data: {
diseseaId: that.diseases
}
}).then((res) => {
if (res.data == null) {
that.getInfo()
} else {
// id
that.generationId = res.data.id
that.queShow = parseInt(res.data.lastSubCode) //
that.$set(that, 'temporarily', true)
that.pageShow = true
setTimeout(() => {
that.$refs.center.open()
}, 100)
}
})
},
//
async getInfo() {
let that = this
showLoading('加载中...')
let ret = await that.$API.selectBasisAssessInfo({
data: {
diseases: that.diseases,
memberId: that.memberId,
}
})
this.allCount = ret.data.subject.length //
const isSubject = ret.data.subject.findIndex(item => item.hidden == true)
ret.data.subject.map((item, index) => {
//
if (item.isTopSubject == 0 && item.id != 603) {
//
that.cardRadio.push(item)
}
if (item.isTopSubject == 1) {
//
that.subTopic.push(item)
}
if (isSubject != -1) { //
//
if (item.subjectType == '1' && item.hidden && item.id != 612) {
const index = item.diseaseAssessSubjectOption.findIndex(item => {
return item.hidden == true
})
if (index == -1) {
item.diseaseAssessSubjectOption[item.diseaseAssessSubjectOption.length - 1]
.hidden = true
} else {
item.diseaseAssessSubjectOption[item.diseaseAssessSubjectOption.length - 1]
.hidden = false
}
}
}
})
const isSubjects = ret.data.subject.findIndex(item => item.hidden == true)
that.cardRadio.map((item, index) => {
if (isSubjects != -1) { //
//
if (item.subjectType == '0' && item.hidden) {
const index11 = item.diseaseAssessSubjectOption.findIndex(item1 => {
return item1.hidden == true
})
if (index11 != -1) {
item.defaultValue = item.diseaseAssessSubjectOption[index11].optionCode + '.' +
item.diseaseAssessSubjectOption[index11].optionValue
}
}
//
if (item.subjectType == '1' && item.hidden) {
let a = []
item.diseaseAssessSubjectOption.map((items, indexs) => {
if (items.hidden) {
a.push(items.optionValue)
}
})
item.defaultValue = a.toString()
}
//
if (item.subjectType == '2' || item.subjectType == '4') {
if (item.subjectInfo != '请填写以下常规医学指标检查结果' && item.subjectInfo !=
'请填写以下医学指标检查结果' && item.subjectInfo != '请填写胃功能检查结果' && item.subjectCode != 'T'
) {
//
if (item.diseaseAssessSubjectOption[0].optionCode != null && item
.diseaseAssessSubjectOption[0].optionCode != '') {
item.defaultValue = item.diseaseAssessSubjectOption[0].optionValue + ':' +
item
.diseaseAssessSubjectOption[0].optionCode
}
} else {
let a = []
item.diseaseAssessSubjectOption.map((items, indexs) => {
if (items.optionCode != '' && items.optionCode != null) {
a.push(items.optionValue + ':' + items
.optionCode) //
} else {
a.push(items.optionValue + ':' + items
.defaultValue) //
}
})
item.defaultValue = a.toString()
}
}
}
})
that.subTopic.map((item, index) => {
if (isSubjects != -1) { //
//
if (item.subjectType == '0' && item.hidden) {
const index11 = item.diseaseAssessSubjectOption.findIndex(item1 => {
return item1.hidden == true
})
item.defaultValue = item.diseaseAssessSubjectOption[index11].optionCode + '.' +
item.diseaseAssessSubjectOption[index11].optionValue
}
//
if (item.subjectType == '2' || item.subjectType == '4') {
if (item.subjectInfo != '请填写以下常规医学指标检查结果' && item.subjectInfo !=
'请填写以下医学指标检查结果' && item.subjectInfo != '请填写胃功能检查结果' && item.subjectCode != 'T'
) {
//
if (item.diseaseAssessSubjectOption[0].optionCode != null) {
item.defaultValue = item.diseaseAssessSubjectOption[0].optionValue + ':' +
item
.diseaseAssessSubjectOption[0].optionCode
}
} else {
let a = []
item.diseaseAssessSubjectOption.map((items, indexs) => {
if (items.optionCode != '' && items.optionCode != null) {
a.push(items.optionValue + ':' + items
.optionCode) //
} else {
a.push(items.optionValue + ':' + items
.defaultValue) //
}
})
item.defaultValue = a.toString()
}
}
}
})
that.cardRadio.map((item, index) => {
if (index == 0) {
item.hidden = true
} else {
item.hidden = false
}
})
if (ret.data.topPaperSave != null) {
that.questionObject = JSON.parse(ret.data.topPaperSave.paperJson)
}
that.pageShow = true
//
setTimeout(() => {
that.Height()
hideLoading()
}, 100)
},
//
inputChange(value, value1, index, index1) {
this.inputTitle = value
this.inputValue = value1
this.inptuIndex = index
this.inptuIndex1 = index1
this.$refs.inputRef.open()
this.$nextTick(() => {
this.focus = true
})
},
//
close() {
this.focus = false
this.cardRadio[this.inptuIndex].diseaseAssessSubjectOption[this.inptuIndex1].optionCode = this.inputValue
},
//
inputChange1(e, item1) {
this.inputValue = e.detail.value
},
//
nextBlanQuestion(index) {
let that = this;
for (var i = 0; i < that.cardRadio[index].diseaseAssessSubjectOption.length; i++) {
if (that.cardRadio[index].diseaseAssessSubjectOption[i].optionCode == '' || that.cardRadio[index]
.diseaseAssessSubjectOption[i].optionCode == null) {
return toast('请先填写')
}
}
let value = that.cardRadio[index].diseaseAssessSubjectOption[0].optionCode
//
const reg = /^\d*$/;
const regs = /^[+-]?(0|([1-9]\d*))(\.\d{1})?$/
let subType = that.cardRadio[index].subjectCode
if ((subType == 'waist' || subType == 'height') && !reg.test(value)) {
if (subType == 'waist') {
return toast('腰围只能输入整数')
} else {
return toast('身高只能输入整数')
}
}
if (subType == 'weight' && !regs.test(value)) {
return toast('体重只能输入一位整数')
}
// memberId0
if (that.cardRadio[index].subjectCode == 'smoke_begin_age' || that.cardRadio[index].subjectCode ==
'smoke_end_age') {
if (value > this.age || value == 0) return toast(value > this.age ? '不能大于当前的年龄' :
'不能为0')
}
let data = that.cardRadio[index].diseaseAssessSubjectOption
if (that.cardRadio[index].subjectInfo != '请填写以下常规医学指标检查结果' && that.cardRadio[index].subjectInfo !=
'请填写以下医学指标检查结果' && that.cardRadio[index].subjectInfo != '请填写胃功能检查结果' && that.cardRadio[index]
.subjectCode != 'T') {
//
that.key = that.cardRadio[index].subjectCode
that.$set(that.questionObject, that.key, value)
that.cardRadio[index].defaultValue = that.cardRadio[index].diseaseAssessSubjectOption[0].optionValue +
':' + that.cardRadio[index]
.diseaseAssessSubjectOption[0].optionCode
} else {
let a = []
for (var i = 0; i < data.length; i++) {
// item.defaultValue=
let key = data[i].qcode
if (data[i].optionCode != '' && data[i].optionCode != null) {
a.push(data[i].optionValue + ':' + data[i].optionCode) //
//
this.$set(this.questionObject, key, data[i].optionCode)
} else {
a.push(data[i].optionValue + ':' + data[i].defaultValue) //
this.$set(this.questionObject, key, data[i].defaultValue)
}
}
that.$set(that.cardRadio[index], 'defaultValue', a.toString())
}
//
if (index == that.cardRadio.length - 1) {
that.$set(that.cardRadio[index], 'hidden', true)
return that.$set(that, 'isNext', true)
} else {
that.$set(that.cardRadio[index + 1], 'hidden', true)
}
that.questClass(index)
},
//
cardChange(index, index1, item1) {
let that = this
//
that.key = that.cardRadio[index].diseaseAssessSubjectOption[index1].qcode
that.value = that.cardRadio[index].diseaseAssessSubjectOption[index1].optionCode
that.$set(that.cardRadio[index], 'defaultValue', item1.optionCode + '.' + item1.optionValue)
if (that.key.indexOf("sport_in") != -1) {
if (that.key.indexOf("sport_freq") != -1) {
let keys = that.key.split(",");
keys.map((item) => {
that.$set(that.questionObject, item.split(":")[0], item.split(":")[1])
})
} else {
let keys = that.key.split(":");
that.$set(that.questionObject, keys[0], keys[1])
}
} else {
that.$set(that.questionObject, that.key, that.value)
}
//
let oldIndex = -1;
//
that.cardRadio[index].diseaseAssessSubjectOption.map((item, ind) => {
if (item.hidden) {
oldIndex = ind;
}
//
if (ind == index1) {
item.hidden = true
} else {
item.hidden = false
}
})
if (oldIndex != -1) {
//
let oldZiti = this.fuyon(that.cardRadio[index].id, oldIndex + 1);
//
const isSelect = that.cardRadio.findIndex(item => item.parentCode == that.cardRadio[index].id)
if (oldZiti.length > 0) {
//
oldZiti.map((item, oldZi) => {
if (isSelect != -1) {
that.cardRadio.splice(index + 1 + (oldZiti.length - oldZi - 1), 1);
}
for (let key in that.questionObject) {
if (item.subjectCode == key) {
Reflect.deleteProperty(that.questionObject, key)
}
}
const idx = that.subTopic.findIndex(val => val.id == item.id)
})
}
}
let num = this.fuyon(that.cardRadio[index].id, that.cardRadio[index].diseaseAssessSubjectOption[index1]
.optionCode);
//
this.matching(num, index + 1)
//
if (index == that.cardRadio.length - 1) {
that.$set(that.cardRadio[index], 'hidden', true)
that.$set(that, 'isNext', true)
} else {
that.$set(that.cardRadio[index + 1], 'hidden', true)
}
that.questClass(index)
},
//
matching(num, index1) {
var that = this
//
num.map((item, index) => {
that.cardRadio.splice(index1 + index, 0, item);
})
},
//
fuyon(id, code) {
let num = []
//
this.subTopic.map((item) => {
if (item.parentCode == id && item.parentSign.indexOf(code) > -1) {
num.push(item)
}
})
return num;
},
//
jinru() {
let num = []
let b = []
this.cardRadio.map((item, index) => {
item.diseaseAssessSubjectOption.map((item1, index1) => {
//
this.subTopic.map((item2, index2) => {
if (item1.hidden && item2.parentCode == item.id && item2.parentSign
.indexOf(item.diseaseAssessSubjectOption[index1].optionCode) > -1
) {
num.push(item2)
b.push(index)
}
})
})
})
if (num.length > 0) {
num.map((item3, index3) => {
this.cardRadio.splice(b[index3] + 1 + index3, 0, item3);
})
}
this.cardRadio.map((item, index) => {
if (index <= this.queShow) {
item.hidden = true
} else {
item.hidden = false
}
})
},
//
multipleChange(index, index1, item1) {
let that = this
let data = that.cardRadio[index].diseaseAssessSubjectOption
if (index1 == data.length - 1 && !data[index1].hidden) {
data.map(item => {
item.hidden = false
})
data[index1].hidden = true
} else {
data[index1].hidden = !data[index1].hidden
data[data.length - 1].hidden = false
}
},
//
nextMulQuestion(index) {
let that = this;
let b = []
that.cardRadio[index].diseaseAssessSubjectOption.map(ite => {
if (ite.hidden) {
b.push(ite)
}
})
if (b.length == 0) return toast('请选择')
if (index == that.cardRadio.length - 1) {
that.cardRadio[index].hidden = true
that.$set(that, 'isNext', true)
} else {
that.cardRadio[index + 1].hidden = true
}
let data = that.cardRadio[index].diseaseAssessSubjectOption
let a = []
//
for (var i = 0; i < data.length; i++) {
if (data[i].hidden) {
a.push(data[i].optionValue)
}
if (data[i].hidden && i < data.length - 1) { //
that.$set(that.questionObject, data[i].qcode, '1')
that.$set(that.questionObject, data[data.length - 1].qcode, '2')
} else if (data[i].hidden) { //
that.$set(that.questionObject, data[i].qcode, '1')
data.map((item, indexs) => {
if (indexs < data.length - 1) {
that.$set(that.questionObject, item.qcode, '2')
}
})
} else if (i < data.length - 1) {
that.$set(that.questionObject, data[i].qcode, '2')
}
}
that.cardRadio[index].defaultValue = a.toString()
that.questClass(index)
},
//
hivChange(index1, index) {
this.cardRadio[index].diseaseAssessSubjectOption[index1].hidden = !this.cardRadio[index]
.diseaseAssessSubjectOption[index1].hidden
this.$forceUpdate()
},
//
submitHiv(index, val) {
let that = this
if (that.cardRadio[index].subjectCode == 'hiv_his') {
let data = that.cardRadio[index].diseaseAssessSubjectOption
//
for (var i = 0; i < data.length; i++) {
if (data[i].hidden) {
that.$set(that.questionObject, data[i].qcode, 1)
} else {
that.$set(that.questionObject, data[i].qcode, 2)
}
}
}
},
//
async submitMultiple() {
this.isBumit = true //
if (this.$preventClick()) return
let a = []
this.cardRadio.map(item => {
if (item.hidden) {
a.push(item)
}
})
for (var i = 0; i < a.length; i++) {
if (a[i].defaultValue == "") {
return toast('请将题目填写完')
}
}
let that = this
showLoading('提交中')
let questionObject = JSON.stringify(that.questionObject)
let reg = await that.$API.basisAssessSaveJson({
data: {
diseases: that.diseases,
subjectJson: questionObject,
subType: '1',
memberId: that.memberId
}
})
hideLoading()
if (reg.code == 200) {
uni.redirectTo({
url: '/pages/scanCodeEvaluation/health-risks/basicReport/basicReport?age=' + this.age + '&name=' + this.userName
})
} else {
toast(reg.msg ? reg.msg : '生成报告异常')
}
},
//
temporaryQuestion() {
if (this.$preventClick()) return
let that = this
let a = that.cardRadio
let b = []
if (that.subTopic.length > 0) {
that.subTopic.map(item => {
let res = a.filter(it => Number(it.parentCode) === item.parentCode);
if (res.length > 0) {
item = res[0]
}
})
a.map((item, index) => {
//
if (item.id == 603 && that.age < 35) {
that.$set(that.questionObject, item.diseaseAssessSubjectOption[0].qcode,
'1')
}
if (item.isTopSubject == 0) {
//
b.push(item)
}
})
that.subTopic.map(item => {
b.push(item)
})
that.cardRadio = b
}
let paperJson = JSON.stringify(that.cardRadio)
let ret = that.$API.basisAssessSaveJson({
data: {
diseases: that.diseases, //
memberId: that.memberId, //id
subjectJson: paperJson, //
lastSubCode: that.queShow, //
subType: '0', //1 0
}
})
},
//
async continueChange() {
if (this.$preventClick()) return
let that = this
let ret = await this.$API.generatePaper({
data: {
paperId: that.generationId, //id
memberId: that.memberId
}
})
that.temporarily = false
that.allCount = ret.data.subject.length //
if (ret.data.topPaperSave != null) {
that.questionObject = JSON.parse(ret.data.topPaperSave.paperJson)
}
ret.data.subject.map((item, index) => {
//
if (item.id == 603 && that.age < 35) {
that.$set(that.questionObject, item.diseaseAssessSubjectOption[0].qcode,
'1')
}
//
if (item.isTopSubject == 1 && item.id != 603) {
//
that.subTopic.push(item)
}
if (item.isTopSubject == 0) {
//
that.cardRadio.push(item)
}
})
that.jinru()
setTimeout(() => {
that.Height() //
that.scrollView = 100000
}, 100)
},
//
againQuestion() {
if (this.$preventClick()) return
this.cardRadio = []
this.subTopic = []
this.temporarily = false
this.getInfo()
},
}
}
</script>
<style lang="scss" scoped>
@import './index.scss';
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Some files were not shown because too many files have changed in this diff Show More