Compare commits

...

109 Commits

Author SHA1 Message Date
xg-29 87b9adbf61 数据大屏修改,评估大屏修改 2024-10-09 10:47:55 +08:00
xg-29 ac538cb5e4 评估大屏修改 2024-10-08 21:17:49 +08:00
wuzhixi de5f57030b 大屏登录bug修改 2024-10-08 15:46:36 +08:00
攀杨 a91e583940 修改大屏微信登录 2024-10-03 22:02:36 +08:00
jxg 04bf4337b9 大屏退出登录 2024-10-02 21:10:48 +08:00
jxg 2b1c66b0f7 大屏评估内容完成 2024-10-02 15:59:53 +08:00
xg-29 6bc44aa11a 解决冲突 2024-09-30 17:33:27 +08:00
xg-29 9a97690fcd 大屏评估内容 2024-09-30 17:27:03 +08:00
贺平 51bad0b6cf 修改登录完善资料bug 2024-09-30 13:57:45 +08:00
贺平 d9efdc1104 '登录' 2024-09-30 11:01:04 +08:00
xg-29 94031adc89 评估大屏部分代码提交 2024-09-29 17:52:12 +08:00
贺平 6126ea916b 添加测评登录 2024-09-29 17:49:07 +08:00
xg-29 c584b8118c 大屏评估代码 2024-09-27 17:32:46 +08:00
xg-29 fdd080806f fix code 2024-09-27 09:19:35 +08:00
xg-29 d3d59409e0 一体机检测报告修改 2024-09-26 19:26:43 +08:00
xg-29 c846ca4c6f Merge branch 'jxg_test_h5' into prod 2024-09-26 19:00:56 +08:00
xg-29 ffff646a26 大屏修改 2024-09-26 18:59:42 +08:00
贺平 4b489b36b6 Merge branch 'prod' of https://gitlink.org.cn/hulei_ip/h5 into prod 2024-09-26 18:00:35 +08:00
贺平 de68431bbe '一体机检测报告bug修改' 2024-09-26 17:55:07 +08:00
贺平 9daee23851 '一体机检测报告bug修改' 2024-09-26 17:52:52 +08:00
xg-29 0ba3844344 大屏评估页面 2024-09-26 17:30:45 +08:00
xg-29 01b307be29 域名配置 2024-09-25 18:49:59 +08:00
xg-29 f65ad61d00 域名配置 2024-09-25 18:46:47 +08:00
贺平 60d39b3121 '一体机测试报告' 2024-09-25 16:53:22 +08:00
xg-29 5a87b9d9f3 配置 2024-09-25 16:42:54 +08:00
xg-29 b1729370e4 配置 2024-09-25 16:31:01 +08:00
xg-29 22bc0a87e3 大屏功能合并 2024-09-25 16:01:02 +08:00
xg-29 ead9b62858 一体机检测报告 2024-09-25 15:52:30 +08:00
xg-29 fb70d289d1 大屏代码合并 2024-09-25 15:21:22 +08:00
xg-29 4d8fea8830 大屏以及一体机检测报告 2024-09-25 15:10:52 +08:00
xg-29 ce803f4955 大屏功能提交 2024-09-25 14:57:48 +08:00
wuzhixi 2a38107320 一体机检测报告 2024-09-25 13:51:23 +08:00
jxg 21d3afdcc0 数据大屏 2024-09-22 23:49:09 +08:00
xg-29 9a9ec9464a 数据大屏部分代码 2024-09-20 17:58:14 +08:00
xg-29 5cf71772ca 新增自主计划页面修改 2024-09-18 09:53:22 +08:00
xg-29 58e692ecaf 优化2代码合并 2024-08-02 16:50:40 +08:00
xg-29 208c1914c3 优化2代码合并 2024-08-02 16:47:05 +08:00
xg-29 be5869d436 根据企业展示icon修改 2024-07-24 13:28:32 +08:00
xg-29 5566ec9b2d fix code 2024-07-23 16:41:08 +08:00
xg-29 41e2929a1a 优化2内容修改代码合并 2024-07-23 14:47:59 +08:00
xg-29 83529ceae6 Merge branch 'prod' of https://gitlink.org.cn/h_kai/h5 into test 2024-07-23 14:46:00 +08:00
xg-29 66e1f3423c 报告根据疾病名字修改 2024-07-23 14:44:06 +08:00
xg-29 e91a47a3c4 优化2里面问题跟需求变更修改 2024-07-19 17:43:49 +08:00
xg-29 c790236139 Merge branch 'jxg_test_h5' into prod 2024-07-01 15:21:45 +08:00
xg-29 d5425cae53 进入健康指南问题修改 2024-07-01 15:19:50 +08:00
xg-29 8e40642abc Merge branch 'jxg_test_h5' into prod 2024-07-01 14:39:43 +08:00
xg-29 16e901852c 评估报告页问题修改 2024-07-01 14:37:50 +08:00
xg-29 fab23a5e1e 评估报告页问题修改 2024-07-01 14:18:55 +08:00
xg-29 bec0532b9a 评估报告页问题修改 2024-07-01 14:15:27 +08:00
xg-29 8b7dfb8f12 合并prod代码 2024-07-01 09:13:59 +08:00
jxg 2cd99b361f 评估问题修改 2024-06-30 23:52:35 +08:00
xg-29 a867066ce1 Merge branch 'jxg_test_h5' into prod 2024-06-28 17:18:53 +08:00
xg-29 e276013740 健康指南样式修改 2024-06-28 17:17:30 +08:00
xg-29 5183f87c52 代码合并 2024-06-26 15:44:26 +08:00
xg-29 3292c70076 积分到账吐丝提示问题修改 2024-06-26 13:41:45 +08:00
xg-29 a737780151 积分到账吐丝提醒 2024-06-25 17:06:20 +08:00
xg-29 2b3a03ee20 fix code 2024-06-25 09:39:34 +08:00
xg-29 b32db91882 同步prod代码 2024-06-25 09:31:17 +08:00
xg-29 517a185b3d Merge branch 'prod' of https://gitlink.org.cn/h_kai/h5 into test 2024-06-25 09:18:34 +08:00
xg-29 8330bd0a8b 增加xx积分已到账的吐丝提醒 2024-06-24 17:55:07 +08:00
xg-29 54329baa8d 创建自主计划活动时上传海拔做裁剪 2024-06-24 16:11:59 +08:00
xg-29 36694ec212 Merge branch 'jxg_test_h5' into prod 2024-06-24 09:57:47 +08:00
xg-29 e56b950aec Merge branch 'jxg_test_h5' of https://gitlink.org.cn/h_kai/h5 into jxg_test_h5 2024-06-24 09:05:37 +08:00
jxg 7d4dcbb0bb 图片剪裁插件安装 2024-06-23 23:53:51 +08:00
xg-29 674b1722d6 大屏展示修改 2024-06-21 14:22:20 +08:00
xg-29 3aeaf3bad2 吸烟情况界面错乱问题修改 2024-06-19 11:19:56 +08:00
xg-29 b5343bdacc 吸烟情况界面错乱问题修改 2024-06-19 11:05:57 +08:00
xg-29 924cfeec4b 吸烟情况界面错乱问题修改 2024-06-19 10:24:57 +08:00
18390123501 3fb1679a62 大屏bug修改 2024-06-19 09:39:17 +08:00
18390123501 49a1902df1 bug修改 2024-06-18 16:22:37 +08:00
xg-29 aa68bb9bd1 最佳食物详情显示修改 2024-06-18 15:35:28 +08:00
18390123501 d6862a487c bug修改 2024-06-18 15:00:18 +08:00
xg-29 d1f8802c4c 环境修改 2024-06-18 14:22:37 +08:00
xg-29 df419a8d81 Merge branch 'jxg_test_h5' into prod 2024-06-18 14:19:48 +08:00
xg-29 9b4c7d1aa2 最佳食物详情页修改 2024-06-18 14:18:45 +08:00
xg-29 727017e572 Merge branch 'prod' of https://gitlink.org.cn/h_kai/h5 into jxg_test_h5 2024-06-18 10:50:36 +08:00
18390123501 2dca80e16c bug 2024-06-18 10:02:38 +08:00
18390123501 eab1be1ca1 返回首页 2024-06-17 16:20:03 +08:00
18390123501 d85907f490 交换食物 2024-06-17 16:03:04 +08:00
xg-29 b2c0368e17 基础评估页面 2024-06-14 16:41:50 +08:00
xg-29 1f21ef07dc 自主计划互助圈修改 2024-06-14 14:28:58 +08:00
18390123501 f1f7575c95 最佳食物 2024-06-14 09:47:18 +08:00
xg-29 2cbd04e172 生活评估方式问卷修改,评估报告样式修改 2024-06-14 09:04:45 +08:00
18390123501 0ea659cdea bug修改 2024-06-13 16:42:28 +08:00
18390123501 e0f7bc3151 环境 2024-06-11 16:51:11 +08:00
18390123501 112a858e03 bug修改 2024-06-11 16:17:33 +08:00
xg-29 5d94b3a309 Merge branch 'jxg_test_h5' into prod 2024-06-06 17:08:51 +08:00
xg-29 2534a851b8 健康评估添加免责声明 2024-06-06 16:31:45 +08:00
jxg 2416431e79 线上配置 2024-06-01 19:11:25 +08:00
jxg 855950b65d 积分商城功能修改 2024-05-30 16:22:43 +08:00
jxg 44b1101b77 积分商城h5版 2024-05-27 09:56:36 +08:00
jxg e0163598cd 积分商城h5版 2024-05-27 09:54:59 +08:00
18390123501 f4fff31c22 测试 2024-05-23 14:54:20 +08:00
18390123501 2830c318f1 测试环境 2024-05-23 14:51:37 +08:00
18390123501 654b527652 提示优化 2024-05-23 13:51:53 +08:00
18390123501 c6545d5a62 提示优化 2024-05-23 13:49:20 +08:00
18390123501 7d0768c079 Merge branch 'test' into prod 2024-05-23 13:45:34 +08:00
18390123501 809d6b23bb 截止时间优化 2024-05-23 13:45:21 +08:00
jxg 8331206622 食物交换页取错值修改 2024-05-21 21:55:03 +08:00
jxg aaa171079b 食物交换页取错值修改 2024-05-21 21:53:22 +08:00
jxg 6bc058422c 食物交换页取错值修改 2024-05-21 21:52:02 +08:00
18390123501 a501c60629 Merge branch 'test' into prod 2024-05-21 13:24:43 +08:00
18390123501 9736a54d6c 取消disId 2024-05-21 13:24:19 +08:00
jxg bfb3bb81c2 食物交换份内容修改 2024-05-17 17:48:53 +08:00
18390123501 e8202e9d52 路由生产 2024-05-17 14:31:50 +08:00
18390123501 0e1b0e301a 生产环境 2024-05-17 14:18:33 +08:00
jxg bf3c61e94d 三个初始页加点击返回首页操作 2024-05-17 13:35:51 +08:00
18390123501 23e019b16c 防治要点 2024-05-17 11:10:49 +08:00
jxg cfbdb89199 大屏问题修改 2024-05-17 10:06:51 +08:00
126 changed files with 36321 additions and 473 deletions

View File

@ -6,6 +6,10 @@
{
"launchtype" : "local"
},
"h5" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"

View File

@ -2,7 +2,12 @@ import {
toast
} from "/tool/index.js"
export default {
baseUrl: 'https://syjk.yhy.ren/xcx-test/', // 生产
//baseUrl: 'https://syjk.yhy.ren/xcx-test/', // 测试
baseUrl: 'https://syjk.yhy.ren/xcx-api/', // 生产
// baseUrl:'http://192.171.1.17:8082/',
// baseUrl1:'http://syjk.yhy.ren/prod-api',//大屏
//baseUrl:'http://192.171.1.17:9206/',
post(url, param) {
return this.ajax('post', url, param)

73
api/config1.js Normal file
View File

@ -0,0 +1,73 @@
import {
toast
} from "/tool/index.js"
export default {
baseUrl:'https://syjk.yhy.ren/prod-api/',//大屏
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)
})
},
}

View File

@ -1,4 +1,5 @@
import ajax from './config'
import ajax1 from "./config1"
export default { // 所有接口
// 心理评估接口
list: (param) => ajax.post('psychology/dict/list', param), // 获取心理主页数据
@ -27,6 +28,7 @@ export default { // 所有接口
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), //评估结果
getQueryFetchStatus: (param) => ajax.get('zksr.zksrservice.autonomous/autonomous-plan-user-meter/queryFetchStatus', param), // 查询用户任务领取状态 >0已领取 0未领取或无任务领取
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), //评估报告内容
@ -76,13 +78,68 @@ export default { // 所有接口
sendTheVerificationCodeApp: (param) => ajax.get('sysUser/sendTheVerificationCodeApp', param), // 发送手机号验证码
selectFoodsInfo: (param) => ajax.get(`doodsInfo/selectFoodsInfo`, param), // 查询食材详情
selectDictListByFoodList: (param) => ajax.get('disease-assess-dict/selectDictListByFoodList2', param), //查询疾病字典
getDiseaseFoodsLevel: (param) => ajax.get(`healthTools/getDiseaseFoodsLevel`, param), //食物榜单
getDiseaseFoodsLevel: (param) => ajax.get(`healthTools/getDiseaseFoodsLevel2`, param), //食物榜单
getFoodTypes: (param) => ajax.get('healthTools/getFoodTypes', param),
selectFoodsList: (param) => ajax.get(`healthTools/selectFoodsList`, param), //食物成分
queryEeFoodTypeDetails: (param) => ajax.get(`zksr.zksrservice.eefood/yh-ee-food-info/queryEeFoodTypeDetails`, 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'), //上传图片
// 积分签到
getIntegralSetting: (param) => ajax.get(`integral/integralSetting/getIntegralSetting`, param), // 获取用户积分设置
getUserIntegral: (param) => ajax.get(`integral/userIntegral/getUserIntegral`, param), // 获取用户积分
getUserIntegralFlow: (param) => ajax.get(`integral/userIntegralFlow/getUserIntegralFlow`, param), // 获取用户积分流水
getUserSignFlow: (param) => ajax.get(`integral/userSignFlow/getUserSignFlow`, param), // 获取用户签到记录
userSign: (param) => ajax.get(`integral/userSignFlow/userSign`, param), // 签到
// 积分商城
getCommoditys: (param) => ajax.get(`commodity/commodity/getCommoditysByVo`, param), // 条件获取商品信息
getCommodityBrands: (param) => ajax.get(`commodity/commodityBrand/getCommodityBrands`, param), // 获取商品品牌
getCommodityCategorys: (param) => ajax.get(`commodity/commodityCategory/getCommodityCategorys`, param), // 获取商品类别
// 积分订单
dindan: (param) => ajax.get('order/integralOrderMaster/lookLogistics', param),
createIntegralOrder: (param) => ajax.post('order/integralOrderMaster/createIntegralOrder?application=true',
param), //订单生成
getIntegralOrderDetail: (param) => ajax.get(`order/integralOrderMaster/getIntegralOrderMaster`, param), // 获取订单主表
getIntegralOrderDetailFlow: (param) => ajax.get(`order/integralOrderDetail/getIntegralOrderDetailFlow`,
param), // 获取商品兑换记录
// getIntegralOrderDetailFlow: (param) => ajax.get(`order/integralOrderDetail/getIntegralOrderDetailFlow`, param), // 获取商品兑换记录
getCustomerInfoByUserId: (param) => ajax.get(`sysUser/customerWorkDept/getCustomerUserInfo`, param),
//一体机报告
//一体机
testReportList: (param) => ajax.get(`ytj-report/testReportList`, param),
//http://192.171.1.22:9206/ytj-report/testReportDetails?userId=15&familyId=1
testReportDetails: (param) => ajax.get(`ytj-report/testReportDetails`, param),
//登录
sendTheVerificationCodeXcx: (param) => ajax.get('sysUser/sendTheVerificationCodeXcx', param), // 发送手机号验证码
xcxLogin: (param) => ajax.get('userLogin/login/xcxLogin', param), // 小程序登录
wechatScanCodeLogin: (param) => ajax.get('userLogin/login/wechatScanCodeLogin', param), // 微信扫码登录
perfectTheInformationXcx: (param) => ajax.post('sysUser/perfectTheInformationXcx?application=true', param), // 个人用户登录注册or web未使用手机号注册企业用户登录绑定小程序专用
completeInformation: (param) => ajax.get('/sysUser/completeInformation', param), //查询用户基本信息
customerDropDownBox: (param) => ajax.get('sysUser/customerDropDownBox', param), // 客户列表
perfectTheInformation: (param) => ajax.post('sysUser/perfectTheInformationXcx?customerId=11', param), // 注册或者保存信息
queryLargeScreenData: (param) => ajax1.get(`dataDetection/facilityChart/queryLargeScreenData`, param), //数据大屏
queryLargeScreenData2: (param) => ajax1.get(`dataDetection/facilityChart/queryLargeScreenData2`, param), //数据大屏-健康趋势
queryLargeScreenData3: (param) => ajax1.get(`dataDetection/facilityChart/queryLargeScreenData3`, param), //数据大屏-部门对比分析
queryCustomerName: (param) => ajax1.get(`dataDetection/facilityChart/queryCustomerName`, param), //数据大屏-部门根据客户展示
newselectDictList: (param) => ajax.get(`disease-assess-dict/selectDictList`, param), //疾病评估列表
newTypeList: (param) => ajax.get(`diggmindUser/typeList`, param), //心理分类
psychologyDictList: (param) => ajax.post('psychology/dict/list', param), // 心理-热门评估
diggmindUserList: (param) => ajax.post('diggmindUser/list?application=true',param), //心理 - 其它
diggmindUserDetails: (param) => ajax.get('diggmindUser/details',param), //心理 - 详情接口
diggmindUserStartAssessment: (param) => ajax.get('diggmindUser/startAssessment',param), //心理 - 开始评估接口
}

19228
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -69,6 +69,7 @@
"@dcloudio/uni-stat": "^2.0.2-3081220230817001",
"@vue/shared": "^3.0.0",
"autoprefixer": "^8.0.0",
"bootstrap": "^3.4.1",
"core-js": "^3.8.3",
"flyio": "^0.6.2",
"less": "^4.2.0",

View File

@ -12,6 +12,7 @@
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>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>

View File

@ -4,6 +4,7 @@
console.log('option',option);
uni.setStorageSync('userId', option.query.userId)
uni.setStorageSync('openId', option.query.openId)
uni.setStorageSync('info', option.query)
console.log('App Launch')
},
onShow: function() {

View File

@ -3,6 +3,9 @@ import App from './App'
import API from '/api/index.js'
import SMOKE from '/api/smoke.js'
import REGIST from '/api/regist.js'
import 'bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css'
import "bootstrap/dist/js/bootstrap.min.js";
Vue.config.productionTip = false
Vue.prototype.$API = API
Vue.prototype.$SMOKE = SMOKE
@ -13,6 +16,8 @@ Vue.prototype.$preventClick = function(times = 2000) { // 防抖
this._CLICK = true
setTimeout(() => this._CLICK = false, times)
}
const app = new Vue({
...App
})

View File

@ -75,7 +75,7 @@
},
"h5" : {
"router" : {
"base" : "test-risk-assessment"
"base" : "risk-assessment"
}
}
}

View File

@ -1,87 +1,165 @@
{
"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
}
}
],
"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
}
},
{
"path": "pages/Integral/home/home",
"style": {
"navigationBarTitleText": "积分兑换",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/exchangeRecords/exchangeRecords",
"style": {
"navigationBarTitleText": "兑换记录",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/details/details",
"style": {
"navigationBarTitleText": "商品详情",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/Confirmed/Confirmed",
"style": {
"navigationBarTitleText": "确认兑换",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/orderDetails/orderDetails",
"style": {
"navigationBarTitleText": "详情",
"onReachBottomDistance": 50
}
},
{
"path": "pages/health-risks/newBasicReport/basicReport",
"style": {
"navigationBarTitleText": "基础评估报告"
}
},
{
"path": "pages/machineReport/report/report",
"style": {
"navigationBarTitleText": "一体机检测报告"
}
},
{
"path": "pages/machineReport/reportDetail/reportDetail",
"style": {
"navigationBarTitleText": "检测报告"
}
},
{
"path": "pages/largeDataScreen/largeDataScreen",
"style": {
"navigationBarTitleText": "数据大屏"
}
}
,{
"path" : "pages/login/login/login",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"backgroundColor":"#3AAFB8"
}
},
{
"path" : "pages/login/ImproveInformation/ImproveInformation",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"globalStyle": {
"navigationBarTitleText": "鲨鱼云康",
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
"backgroundColor": "#F8F8F8",
"rpxCalcMaxDeviceWidth":1080
},
"subPackages": [{
"root": "pages/quitSmoking",
@ -218,7 +296,7 @@
}, {
"path": "content/content",
"style": {
"navigationBarTitleText": "填写内容"
"navigationBarTitleText": "填写日记"
}
}, {
"path": "eventRecording/eventRecording",
@ -267,6 +345,14 @@
"style": {
"navigationBarTitleText": "创建自主计划活动"
}
},
{
"path": "pictureCrop/pictureCrop",
"style": {
"navigationBarTitleText": "图片裁剪",
"enablePullDownRefresh": false,
"disableScroll": true
}
}
]
},
@ -353,10 +439,45 @@
"navigationBarTitleText": ""
}
},{
"path": "exchangePortion/index/index1",
"style": {
"navigationBarTitleText": ""
}
}
,{
"path": "exchangePortion/detail/detail",
"style": {
"navigationBarTitleText": ""
}
},{
"path": "foodexchange/index/index",
"style": {
"navigationBarTitleText": ""
}
}]
}]
},
{
"root": "pages/largeScreenEvaluation",
"pages": [
{
"path": "evaluationIndex",
"style": {
"navigationBarTitleText": "评估首页"
}
},
{
"path": "evaluationList",
"style": {
"navigationBarTitleText": "评估列表"
}
},
{
"path": "detail",
"style": {
"navigationBarTitleText": "评估列表"
}
}
]
}
]
}

View File

@ -0,0 +1,111 @@
.pageBox{
display: flex;
flex-direction: column;
width: 100vw;
height: 100vh;
.grey{
color: #909292;
}
.topBg{
width: 100vw;
height: 314rpx;
position: fixed;
top: 0;
background: $uni-color;
}
.contioner{
padding: 16rpx 32rpx 88rpx;
height: calc(314rpx - 104rpx);
color: #fff;
.caret-down-small.png{
$wh:32rpx;
width: $wh;
height: $wh;
}
.posabition{
position: absolute;
bottom: -44rpx;
z-index: 1;
.tabber{
display: flex;
justify-content: space-between;
align-items: center;
width: calc(100vw - 160rpx);
padding: 0 48rpx;
height: 94rpx;
background: #FFFFFF;
color: #909292;
font-weight: bold;
box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(56,176,184,0.5);
border-radius: 50rpx;
}
}
}
.cardPadding{
padding: 92rpx 32rpx;
.cutt{
width: 100%;
height: 1rpx;
background: #EEEEEE;
margin: 34rpx 0 20rpx 0;
}
}
.swiper{
flex: 1;
height: 0;
.scrol {
height: 97%;
background-color: #E6EFF1;
padding: 20rpx;
.box{
margin-right: 35rpx;
background: #fff;
padding: 20rpx;
border-radius: 10px;
margin-bottom: 40rpx;
.box_txt{
font-size: 32rpx;
font-weight: 500;
color: #112950;
}
.flex_box{
// margin-top: 40rpx;
background: #FFFFFF;
border-bottom: 1px solid #C3C9D3;
// border-radius: 10px;
.flex_item{
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
height: 120rpx;
.img_txt{
font-size: 36rpx;
font-weight: 400;
color: #FE8025;
}
.top_txt{
font-size: 28rpx;
font-weight: 500;
color: #112950;
margin-bottom: 10rpx;
}
.bot_txt{
font-size: 24rpx;
font-weight: 400;
color: #8F98A6;
}
}
}
}
}
}
}

View File

@ -0,0 +1,168 @@
<template>
<view class="pageBox">
<view class="topBg"></view>
<view class="contioner bg-video">
<view class="flex flex-direction justify-between" style="height: 100%;">
<view>
<view class="text-xs">账户可用积分</view>
<view class="text-bold" style="font-size: 80rpx;">{{currentIntegral}}</view>
</view>
<view class="flex-align text-sm text-bold">
<view class="flex-contion" @click="showPop()">
<image src="https://shayu5qny.yhy.ren/caret-down-small.png" class="caret-down-small.png">
</image>
<view>{{defaultData.month}}</view>
</view>
<view class="flex">
<view style="margin-right: 52rpx;">收入<text class="margin-left-xs">{{currentIncome}}</text>
</view>
<view>支出<text class="margin-left-xs">{{currentDisbursement}}</text></view>
</view>
</view>
</view>
<view class="posabition">
<view class="tabber">
<view :class="taberIndex==0?'themColor':''" @click="changeSelect(0)">全部</view>
<view :class="taberIndex==1?'themColor':''" @click="changeSelect(1)">收入</view>
<view :class="taberIndex==2?'themColor':''" @click="changeSelect(2)">支出</view>
</view>
</view>
</view>
<block v-if="isShow">
<view class="flex-sub" style="height: 0;" v-if="List.length!=0">
<scroll-view style="height: 100%;" scroll-y @scrolltolower="scrollBottom">
<view class="cardPadding text-sm">
<block v-for="(item,index) in List" :key="index">
<view class="flex-align">
<view>
<view class="text-bold">{{item.dictionaries}}</view>
<view class="text-four marginTop-sm grey">
{{item.integralChange=='0'?'收入':'支出'}}<text
class="margin-left-xs">{{item.createTime}}</text>
</view>
</view>
<view :class="item.integralChange=='0'?'themColor':'grey'">
{{item.integralChange=='0'?'+':'-'}}{{item.integralFlow}}
</view>
</view>
<view class="cutt" v-if="List.length-1!=index"></view>
</block>
</view>
<uni-load-more iconType="auto" status="loading" v-if="isMore"></uni-load-more>
</scroll-view>
</view>
<nothing :marginTop="250" v-else></nothing>
</block>
<!-- 时间弹框 -->
<lingfeng-timepicker ref="timePop" type="year-month" :defaultData="defaultData" @change="timeChange">
</lingfeng-timepicker>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
export default {
computed: {
...mapState([
'userInfo'
])
},
data() {
return {
isShow: false, //
taberIndex: 0, //
defaultData: {
month: new Date().getFullYear() + '-' + (new Date().getMonth() + 1)
},
currentIntegral: 0, //
currentIncome: 0, //
currentDisbursement: 0, //
List: [], //
pageNum: 1, //
pageSize: 20, //
total: 0, //
isMore: false, //
}
},
onLoad(option) {
this.getList()
},
methods: {
showPop() {
this.$refs.timePop.show();
},
timeChange(val) {
this.isShow = false
this.List = []
this.pageNum = 1
this.defaultData.month = val
this.getList()
},
//
goList(id) {
uni.navigateTo({
url: `/pages/Integral/home/orderDetails/orderDetails?id=${id}`
})
},
async getList(val) {
if (val == undefined) {
let ret = await this.$API.getUserIntegralFlowVo({
data: {
flowDate: this.defaultData.month,
userId: this.userInfo.userId
}
})
if (ret.data != null) {
console.log(ret.data,'ret.data')
this.currentIntegral = ret.data.currentIntegral
this.currentIncome = ret.data.currentIncome
this.currentDisbursement = ret.data.currentDisbursement
}
}
let index = 2 ///(0 1 )
if (this.taberIndex == 1) {
index = 0
} else if (this.taberIndex == 2) {
index = 1
} else {
index = 2
}
let reg = await this.$API.getUserIntegralFlow({
data: {
flowDate: this.defaultData.month,
integralChange: index,
pageNum: this.pageNum, //
pageSize: this.pageSize, //
}
})
let list = []
list = reg.rows
this.List = this.List.concat(list)
this.total = reg.total
this.isMore = false
this.isShow = true
},
// tab
changeSelect(index) {
this.isShow = false
this.List = []
this.pageNum = 1
this.taberIndex = index
this.getList('重新加载')
},
//
scrollBottom() {
if (this.List.length == this.total) return // 线
this.isMore = true
this.pageNum++
this.getList('重新加载')
},
}
}
</script>
<style lang="scss" scoped>
@import './recordsList.scss';
</style>

View File

@ -0,0 +1,152 @@
<template>
<view class="pageBox">
<block v-for="(item,index) in List" :key="index">
<view class="card">
<view class="flex-align text-sm">
<view class="grey">订单编号{{item.orderNo}}</view>
<view class="themColor" style="width: 100rpx;">
{{item.orderState=='0'?'待发货':item.orderState=='1'?'待收货':item.orderState=='2'?'已完成':'已撤销'}}
</view>
</view>
<view class="center">
<view class="flex">
<image :src="item.commodityImg" class="commodityImg"></image>
<view class="flex flex-direction justify-between marginLeft-sm">
<view class="text-bold">{{item.commodityName}}</view>
<view>
<view class="redColor text-sm"><text class="text">{{item.singleIntegral}}</text>积分
</view>
<view class="text-four grey margin-top-xs" style="text-decoration: line-through;">
{{item.price}}</view>
</view>
</view>
</view>
<view class="grey text-bold text-sm flex align-end">x{{item.orderDetailTotal}}</view>
</view>
<view class="text-sm flex-contion justify-end marginTop-sm">
实付款:<text class="text redColor">{{item.singleIntegral}}</text>
<text class="redColor">积分</text>
</view>
<!-- 分割线 -->
<view class="cutt"></view>
<view class="flex justify-end">
<view class="btnTag" @click="redeemAgain">再次兑换</view>
<view class="btnTag marginLeft-sm" @click="goLoglitics(item)" v-if="item.orderState=='1'||item.orderState=='2'">查看物流</view>
</view>
</view>
</block>
<view class="icon_bg" v-if="!List.length&&imgflg">
<view style="width: 100%;display: flex;justify-content: center;align-items: center;" >
<img src="../static/images/nth2.png" alt="" style='height: 320rpx;width:320rpx'>
</view>
<view class="" style="text-align: center;width: 100%;font-size: 30rpx; color: #ccc;">
暂无数据
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
List: [],
imgflg:false,
}
},
onLoad() {
this.getInfo()
},
methods: {
async getInfo() {
let ret = await this.$API.getIntegralOrderDetailFlow()
this.List = ret.rows
this.imgflg = true
},
//
redeemAgain() {
uni.navigateBack()
},
//
goLoglitics(item) {
let obj = {
id: item.orderNo,
img: item.commodityImg
}
uni.navigateTo({
url: '/pages/Integral/home/Logistics/Logistics?obj=' + encodeURIComponent(JSON.stringify(obj))
})
},
}
}
</script>
<style>
page {
background: #E8EFF1;
}
</style>
<style lang="scss" scoped>
.pageBox{
min-height:100vh;
width:100%;
position:relative;
.icon_bg{
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%)
}
}
.grey {
color: #909292;
}
.redColor {
color: #FF4545;
}
.text {
font-size: 44rpx;
}
.card {
padding: 22rpx 32rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin: 0 32rpx;
margin-top: 32rpx;
.center {
padding-top: 38rpx;
display: flex;
justify-content: space-between;
.commodityImg {
width: 204rpx;
height: 220rpx;
border-radius: 8rpx;
}
}
.cutt {
width: calc(100% + 64rpx);
height: 2rpx;
background: #EEEEEE;
margin: 32rpx 0 18rpx 0;
margin-left: -32rpx;
}
.btnTag {
width: 168rpx;
text-align: center;
line-height: 56rpx;
border-radius: 8rpx;
border: 2rpx solid #CCCCCC;
color: #909292;
font-size: 28rpx;
}
}
</style>

View File

@ -0,0 +1,132 @@
.pageBox{
background-color: #E6EFF1;
// padding-top: 20rpx;
display: flex;
flex-direction: column;
height: 100vh;
.top{
background-color: #fff;
padding: 30rpx;
// margin-top: 20rpx;
border-radius: 10rpx;
width: 700rpx;
margin: auto;
box-sizing: border-box;
.one{
display: flex;
justify-content: space-between;
align-items: center;
font-size: 32rpx;
font-weight: 500;
color: #323232;
.one_img{
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
}
.two{
.two_top{
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 30rpx;
border-bottom: 1px solid #C3C9D3;
.two_flex{
display: flex;
justify-content: space-between;
align-items: center;width: 80%;
.two_img{
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
}
}
.two_bot{
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 30rpx;
}
}
}
.center{
background-color: #fff;
padding: 30rpx;
border-radius: 10rpx;
width: 700rpx;
margin: 30rpx auto;
box-sizing: border-box;
display: flex;
.center_left{
.center_img{
width: 120rpx;
height: 120rpx;
vertical-align: middle;
}
}
.center_right{
margin-left: 25rpx;
.center_top{
margin-bottom: 20rpx;
}
.center_bot{
height: 50rpx;
line-height: 50rpx;
img{
width: 50rpx;
height: 50rpx;
vertical-align: middle;
margin-left: 20rpx;
}
}
}
}
.bottom{
background-color: #fff;
padding: 30rpx;
border-radius: 10rpx;
width: 700rpx;
margin: auto;
box-sizing: border-box;
.bot_top{
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 30rpx;
border-bottom: 1px solid #C3C9D3;
}
.bot_bot{
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 30rpx;
}
}
.btn{
width: 100%;
height: 120rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: space-around;
position: fixed;
bottom: 0;
.btn_left{
}
.btn_right{
width: 400rpx;
height: 80rpx;
background: #3AAFB8;
text-align: center;
border-radius: 21px;
line-height: 80rpx;
color: #fff;
}
}
}

View File

@ -0,0 +1,259 @@
<template>
<view class="pageBox" >
<view class="" style="flex: 1;">
<view class="" style="height: 20rpx;">
</view>
<!-- 地址 -->
<!-- <view class="top">
<view class="one" v-if="flg" @click="chooseAddress()">
<text>请填写收货地址</text>
<img src="../../static/images/3.png" alt="" class='one_img'>
</view>
<view class="two" v-else @click="chooseAddress()">
<view class="two_top">
<view class="" style="width: 150rpx;color: #7C8A9F;">
收货人
</view>
<view class="two_flex" style="">
<view class="" style="">
<text>{{form.orderUser}} &nbsp;</text>
<text style="margin-left: 20rpx;"> {{form.phonenumber}}</text>
</view>
<img src="../../static/images/3.png" alt="" class='two_img'>
</view>
</view>
<view class="two_bot">
<view class="" style="width: 150rpx;color: #7C8A9F;">
收货地址
</view>
<view class="" style="width: 80%;">
{{form.orderAddress}}
</view>
</view>
</view>
</view> -->
<!-- 商品数量 -->
<view class="center">
<view class="center_left">
<img :src="list.commodityImg" alt="" class='center_img'>
</view>
<view class="center_right">
<view class="center_top">
{{list.commodityName}}
</view>
<view class="center_bot">
<img src="../../static/images/6.png" alt="" @click='del()'>
<text style="margin-left: 20rpx;">{{num}}</text>
<img src="../../static/images/7.png" alt="" @click='add()'>
</view>
</view>
</view>
<!-- 价格 -->
<view class="bottom">
<view class="bot_top">
<view class="" style="width: 320rpx;color: #7C8A9F;">
订单总价(含运费)
</view>
<view class="" style="font-size: 32rpx;color: #112950;">
<text> </text><text> 0</text>
</view>
</view>
<view class="bot_bot">
<view class="" style="width: 150rpx;color: #7C8A9F;">
积分
</view>
<view class="" style="color: #112950;">
<text style="font-size: 40rpx;">{{list.commodityIntegral}}</text
style="font-size: 28rpx;"><text>积分</text>
</view>
</view>
</view>
</view>
<!-- 底部提交 -->
<view class="btn">
<view class="btn_left">
<text style="color: #8E9AAB;">合计 </text>
<text style="font-size: 40rpx;color: #FE8025;">{{list.commodityIntegral*num}}</text>
<text style="font-size: 28rpx;color: #FE8025;"> 积分</text>
</view>
<view class="btn_right" @click="goOrder" v-if="jf">
</view>
<view class="btn_right" v-else style="background-color: #fff;color: #8E9AAB;">
积分不足
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
flg: true,
num: 1,
dz: false,
jf: false,
list: {
commodityName:'',
commodityIntegral:0
},
form: {
//
orderAddress: "",
//
orderDetail: [{
// id
commodityCode: "",
//
orderDetailTotal: 0,
//
singleIntegral: 0,
//
totalDetailIntegral: 0,
}],
//
orderUser: "",
//
phonenumber: '',
},
}
},
onReady() {
// this.chooseAddress()
},
onLoad(option) {
this.list = JSON.parse(decodeURIComponent(option.obj))
this.Pd()
},
mounted() {
},
methods: {
//
Pd() {
if (this.list.jf < (this.list.commodityIntegral * this.num)) {
this.jf = false
} else {
this.jf = true
}
},
//
add() {
this.num++
this.Pd()
},
//
del() {
if (this.num > 1) {
this.num--
}
this.Pd()
},
goOrder() {
// if (this.dz) {
let obj = {
//
orderAddress: this.form.orderAddress,
//
orderDetail: [{
// id
commodityCode: this.list.id,
//
orderDetailTotal: this.num,
//
singleIntegral: this.list.commodityIntegral,
//
totalDetailIntegral: this.list.commodityIntegral * this.num,
}],
//
orderUser: this.form.orderUser,
//
phonenumber: this.form.phonenumber,
userCode: uni.getStorageSync("userId")
}
this.$API.createIntegralOrder({
data: obj
}).then(res => {
console.log(res, '积分')
if (res.code == 200) {
uni.navigateTo({
url: `/pages/Integral/home/orderDetails/orderDetails?id=${res.data}`
})
}else{
wx.showToast({
title: res.msg,
icon: 'none',
duration: 1500
});
}
})
console.log(obj, '请求数据')
// } else {
// wx.showToast({
// title: '',
// icon: 'none',
// duration: 1500
// });
// }
},
//
chooseAddress() {
let _this = this
uni.getSetting({
success(res) {
console.log("vres.authSetting['scope.address']", res.authSetting['scope.address'])
if (res.authSetting['scope.address']) {
uni.chooseAddress({
success(res) {
console.log(res, '收货地址')
_this.form.orderUser = res.userName
_this.form.phonenumber = res.telNumber
_this.form.orderAddress =
`${res.provinceName}${res.cityName}${res.countyName}${res.detailInfo}`
_this.flg = false
_this.dz = true
}
})
} else {
if (res.authSetting['scope.address'] == false) {
uni.openSetting({
success(res) {
console.log(res.authSetting)
}
})
} else {
uni.chooseAddress({
success(res) {
console.log(res)
}
})
}
}
}
})
},
}
}
</script>
<style lang="scss" scoped>
@import './Confirmed.scss';
</style>

View File

@ -0,0 +1,117 @@
.pageBox{
padding-top: 20rpx;
background-color: #E6EFF1;
.top{
width: 700rpx;
margin: auto;
display: flex;
align-items: center;
padding: 20rpx;
background-color: #fff;
box-sizing: border-box;
border-radius: 10px;
.top_img{
width: 80rpx;
height: 80rpx;
vertical-align: middle;
margin-right: 30rpx;
}
.txt{
font-size: 28rpx;
font-weight: 400;
color: #7C8A9F;
margin-right: 20rpx;
}
.txt1{
}
}
.center{
display: flex;
width: 700rpx;
padding: 30rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 10px;
margin: 20rpx auto;
.center_left{
margin-right: 30rpx;
.center_img{
height: 120rpx;
width: 120rpx;
}
}
.center_right{
width: 100%;
.center_flex{
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
.center_flex_left{
font-size: 32rpx;
font-weight: 500;
color: #112950;
}
.center_flex_right{
margin-right: 30rpx;
font-size: 28rpx;
font-weight: 500;
color: #3AAFB8;
}
}
.center_txt{
margin-top: 10rpx;
font-size: 28rpx;
font-weight: 400;
color: #7C8A9F;
width: 100%;
}
}
}
.bottom{
width: 700rpx;
margin: auto;
background-color: #fff;
border-radius: 10px;
padding: 30rpx;
box-sizing: border-box;
.title{
padding-left: 20rpx;
border-left: 3px solid #3AAFB8;
font-size: 32rpx;
font-weight: 500;
color: #112950;
}
.body{
margin-top: 30rpx;
display: flex;
.body_left{
width: 30rpx;
padding-top: 10rpx;
.box{
width: 20rpx;
height: 20rpx;
border-radius: 50%;
}
}
.body_right{
width: 100%;
.body_top{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
}
.body_bot{
font-size: 24rpx;
font-weight: 400;
color: #112950;
}
}
}
}
}

View File

@ -0,0 +1,175 @@
<template>
<view class="pageBox">
<view class="contioner">
<!-- 物流状态 -->
<view class="logisticsStatus">
<view class="flex">
<!-- <image :src="goodsCoverImg" class="img"></image> -->
<img :src="goodsCoverImg" alt="" class="img">
<view class="flex-sub" style="line-height: 48rpx;">
<view class="text-df bottomColor">承运来源{{formState.ShipperName}}</view>
<view class="text-df bottomColor">快递编码{{formState.ShipperCode}}</view>
<view class="text-df bottomColor">运单编号{{formState.LogisticCode}}</view>
</view>
</view>
</view>
<!-- 物流跟踪 -->
<view class="logisticsTracking marginTop-sm" v-if="formState.Traces.length>0">
<view class="flex-contion">
<view class="widthLeft"></view>
<view class="rightColor text-lg text-bold">物流跟踪</view>
</view>
<!-- 分割线 -->
<view class="cutt"></view>
<!-- 纵向排列 -->
<uni-steps :options="formState.Traces" active-color="#3AAFB8" :active="active" direction="column" />
</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "@/tool/index.js"
import * as types from '@/store/types.js'
import {
mapState
} from 'vuex'
export default {
computed: {
...mapState([
'openId'
])
},
data() {
return {
formState: {
ShipperName:'',
ShipperCode:'',
LogisticCode:''
},
goodsCoverImg: '', //
active: 0,
}
},
onLoad(option) {
let obj = JSON.parse(decodeURIComponent(option.obj))
this.orderId = obj.id
this.goodsCoverImg = obj.img
this.getInfo()
},
methods: {
async getInfo() {
this.$API.dindan({
data: {
orderNo: this.orderId
}
}).then((res) => {
console.log(res,'数据')
var d = []
for (var i = res.data.Traces.length - 1; i >= 0; i--) {
d.push(res.data.Traces[i])
}
this.formState = res.data
this.formState.Traces = d
this.formState.Traces = this.formState.Traces.map((item) => {
return {
title: item.AcceptStation,
desc: item.AcceptTime
}
});
console.log(this.formState.Traces);
})
},
}
}
</script>
<style lang="scss">
.pageBox {
width: 100vw;
min-height: 100vh;
background-color: #E6EFF1;
display: flex;
flex-direction: column;
.contioner {
padding: 24rpx 32rpx;
.user {
padding: 38rpx 24rpx;
background: #FFFFFF;
border-radius: 20rpx;
.img {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 28rpx;
}
.leftColor {
color: #7C8A9F;
}
.rightColor {
color: $uni-color;
}
}
.logisticsStatus {
padding: 26rpx 38rpx 26rpx 26rpx;
background: #FFFFFF;
border-radius: 20rpx;
.topColor {
color: #112950;
}
.bottomColor {
color: #7C8A9F;
}
.rightColor {
color: $uni-color;
}
.img {
width: 120rpx;
height: 120rpx;
margin-right: 32rpx;
border-radius: 20rpx;
}
}
.logisticsTracking {
padding: 26rpx 32rpx 64rpx 34rpx;
background: #FFFFFF;
border-radius: 20rpx;
.widthLeft {
width: 8rpx;
height: 24rpx;
background: $uni-color;
border-radius: 4rpx;
margin-right: 14rpx;
}
.rightColor {
color: #112950;
}
.cutt {
width: 100%;
height: 1rpx;
background: #C3C9D3;
margin: 26rpx 0 36rpx 0;
}
}
}
}
</style>

View File

@ -0,0 +1,102 @@
.pageBox{
background-color: #E6EFF1;
// padding-top: 20rpx;
display: flex;
flex-direction: column;
min-height: 100vh;
.top{
width: 700rpx;
margin: auto;
border-radius: 10px;
padding-bottom: 20rpx;
background-color: #fff;
.img{
width: 100%;
height: 300px;
}
.bot_box{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10rpx;
}
}
.center{
width: 700rpx;
margin: auto;
padding: 20rpx;
background-color: #fff;
box-sizing: border-box;
margin-top: 20rpx;
border-radius: 10px;
.center_top{
// margin-bottom: 20rpx;
padding-bottom: 20rpx;
border-bottom: 1px solid #C3C9D3;
.center_txt{
font-size: 32rpx;
font-weight: 500;
color: #112950;
padding-left: 10rpx;
border-left: 3px solid #3AAFB8;
padding-bottom: 10rpx;
}
}
.center_bot{
margin-top: 20rpx;
font-size: 26rpx
}
}
.bottom{
width: 700rpx;
margin: auto;
padding: 20rpx;
background-color: #fff;
box-sizing: border-box;
margin-top: 20rpx;
border-radius: 10px;
// margin-bottom: 50rpx;
.bottom_top{
// margin-bottom: 20rpx;
padding-bottom: 20rpx;
border-bottom: 1px solid #C3C9D3;
.bottom_txt{
font-size: 32rpx;
font-weight: 500;
color: #112950;
padding-left: 10rpx;
border-left: 3px solid #3AAFB8;
padding-bottom: 10rpx;
}
}
.bottom_bot{
margin-top: 20rpx;
font-size: 26rpx
}
}
.btnbox{
background-color: #fff;
width: 100%;
height: 100rpx;
position: fixed;
bottom: 0rpx;
// padding: 0 25rpx;
left: 0;
.btn{
width: 700rpx;
border-radius: 21px;
height: 80rpx;
line-height: 80rpx;
background-color: #3AAFB8;
color: #fff;
font-size: 28rpx;
text-align: center;
margin: 10rpx 25rpx;
}
}
.box{
height: 140rpx;
width: 100%;
}
}

View File

@ -0,0 +1,105 @@
<template>
<view class="pageBox" >
<view class="" style="flex: 1;">
<view class="" style="height:20rpx">
</view>
<view class="top">
<img :src="list.commodityImg" alt="" class='img'>
<view class="" style="padding: 20rpx;">
<view class="">
{{list.commodityName}}
</view>
<view class="bot_box" style="">
<view class="" style="font-size: 24rpx;font-weight: 400;color: #8F98A6;">
品牌:{{list.brandName}}
</view>
<view class="" style="color: #FE8025;">
<text style="font-size: 40rpx;">{{list.commodityIntegral}}</text>
<text style="font-size: 24rpx;">积分</text>
</view>
</view>
</view>
</view>
<view class="center">
<view class="center_top">
<text class="center_txt">关于退换货</text>
</view>
<view class="center_bot">
不支持退货
</view>
</view>
<view class="bottom">
<view class="bottom_top">
<text class="bottom_txt">商品详情</text>
</view>
<view class="bottom_bot">
<rich-text :nodes="list.commodityTxt"></rich-text>
</view>
</view>
<view class="box">
</view>
</view>
<view class="btnbox" style="">
<view class="btn" @click="goConfirmed" v-if="list.commodityStock>0" >
立即兑换
</view>
<view class="btn" v-else>
暂无库存
</view>
</view>
</view>
</template>
<script>
export default {
computed: {
// scrollH: function() {
// let sys = uni.getSystemInfoSync();
// let winWidth = sys.windowWidth;
// let winrate = 750 / winWidth;
// let winHeight = parseInt(sys.windowHeight * winrate)
// return winHeight
// console.log(sys)
// }
},
data() {
return {
list: {
commodityName:'',
brandName:'',
commodityIntegral:'',
commodityTxt:'',
},
//
num: undefined,
}
},
onReady() {
},
onLoad(option) {
this.list = JSON.parse(decodeURIComponent(option.obj))
console.log(this.list,'数据')
this.$set(this.list,'commodityTxt',this.list.commodityTxt.replace(/\<p/gi, '<p style="word-break: break-all;overflowWrap:break-word"'))
this.$set(this.list,'commodityTxt',this.list.commodityTxt.replace(/\<img/gi, '<img style="max-width:100%"'))
},
mounted() {
},
methods: {
goConfirmed() {
uni.navigateTo({
url: `/pages/Integral/home/Confirmed/Confirmed?obj=${encodeURIComponent(JSON.stringify(this.list))}`
})
}
}
}
</script>
<style lang="scss" scoped>
@import './details.scss';
</style>

View File

@ -0,0 +1,189 @@
.pageBox{
width: 100%;
// height: 100%;
background: #E6EFF1;
.top{
background-color: #fff;
}
.center{
.flexbox{
display: flex;
justify-content: space-between;
width: 700rpx;
margin: 20rpx auto;
.box{
width: 250rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 10px;
padding: 30rpx 40rpx;
display: flex;
justify-content: space-between;
.lefttext{
.p{
height: 40rpx;
line-height: 40rpx;
font-weight: 500;
color: #112950;
font-size: 28rpx;
}
.txt{
font-size: 22rpx;
font-weight: 400;
width:170rpx;
color: #8E9AAB;
height: 28rpx;
line-height: 28rpx;
margin-top:10rpx;
}
}
.rightimg{
.img{
width: 74rpx;
height: 74rpx;
vertical-align:middle;
margin-top: 5rpx;
}
}
}
}
}
.bottom{
width: 700rpx;
margin: auto;
.tabs{
height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 30rpx;
background-color: #FFFFFF;
border-radius: 10px;
// width: 100%;
.tabs_top{
padding-bottom: 20rpx;
font-size: 28rpx;
font-weight: 400;
color: #8E9AAB;
}
.active{
border-bottom: 3px solid #3AAFB8;
font-weight: 500;
color: #112950;
}
}
.drawerContent {
padding:50rpx 30rpx 30rpx;
font-size: 28rpx;
.row {
margin-bottom: 50rpx;
.btn_box {
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
// box-sizing: border-box;
.noselde,.selde {
padding: 10rpx 10rpx;
margin: 14rpx;
border-radius: 10rpx;
text-align: center;
}
.noselde {
background-color: #E6EFF1;
border: 1px solid #E6EFF1;
}
.selde {
border: 1px solid #FE8025;
color: #FE8025;
background-color: #fdf2df;
}
}
}
.bom_btn {
position: fixed;
bottom: 0rpx;
right: 0;
width: 280px;
height: 80rpx;
background-color: #fff;
display: flex;
justify-content: space-around;
flex-wrap: wrap;
font-size: 28rpx;
view {
width:100rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
border-radius: 10rpx;
}
.left {
color: #333;
border: 1px solid #8E9AAB;
}
.right {
color: #fff;
background-color: #FE8025;
}
}
}
.tabs_center{
width: 700rpx;
margin: auto;
.ComBox {
width: 700rpx; //根据微信定义设置 如非必要不建议改为100%
// padding: 10rpx 30rpx;
// background-color: #f7f7f7;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.ComList {
//未设置高度
width: 270rpx;
padding: 30rpx;
background: #fff;
border-radius: 8rpx;
margin-top: 30rpx;
.ImgBOX {
width: 270rpx;
height: 270rpx;
border-radius: 12rpx;
.Img {
width: 100%;
height: 100%;
}
}
.Title {
width: 270rpx;
font-size: 28rpx;
line-height: 44rpx;
height: 88rpx;
padding-top: 15rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.Price {
width: 100%;
height: 44rpx;
line-height: 44rpx;
padding-top: 15rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3AAFB8;
}
}
}
}
}
}

View File

@ -0,0 +1,502 @@
<template>
<view class="pageBox" :style="{minHeight:scrollH+'rpx'}">
<view class="top">
<uni-search-bar placeholder="搜索商品名称" bgColor="#EEEEEE" @confirm="search" @input="input" />
</view>
<view class="center">
<view class="flexbox">
<view class="box" @click="goList">
<view class="lefttext">
<view calss='p'>兑换记录</view>
</view>
<view class="rightimg">
<image src="../static/images/10.png" mode="" class="img"></image>
</view>
</view>
<view class="box" @click="goComponent">
<view class="lefttext">
<view calss='p'>我可兑换</view>
<view class="txt">可用积分{{currentIntegral}}</view>
</view>
<view class="rightimg">
<image src="../static/images/11.png" mode="" class="img"></image>
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="tabs">
<view class="tabs_top" v-for="(item,index) in arr" :key="index" :class="[num==index?'active':'']"
@click="all(index)">
{{item.name}}
</view>
<view class="tabs_top" @click="showDrawer">
筛选
</view>
</view>
<!-- 抽屉 -->
<uni-drawer ref="showRight" mode="right" :mask-click="true" width="280">
<scroll-view style="height: 100%;" scroll-y="true">
<view class="drawerContent">
<view class="row" v-for="(item,index) in btnList" :key="index">
<view class="title">{{item.label}}</view>
<view class="btn_box">
<view v-for="(v,i) in item.children" :key="i" :data-vaule="v.data"
@click="choice(item.type,i,$event)" :class="[v.selected?'selde':'noselde']"
style="width: 40%;box-sizing: border-box;">
{{v.name}}
</view>
</view>
</view>
<view class="" style="height: 80rpx;">
</view>
<view class="bom_btn">
<view class="left" @click="reset">重置</view>
<view class="right" @click="confirm">确定</view>
</view>
</view>
</scroll-view>
</uni-drawer>
<view class="tabs_center">
<view class="ComBox" v-if="ComListSon">
<view class="ComList" v-for="(item,index) in ComListSon" :key="item.id" @click="ToDel(item)">
<view class="ImgBOX">
<img :src="item.commodityImg" class="Img" alt="">
</view>
<view class="Title">
{{item.commodityName}}
</view>
<view class="Price">
{{item.commodityIntegral}}<text style="color: #8E9AAB;">积分</text>
</view>
</view>
</view>
<view class="" style="height: 50rpx;">
</view>
<view class="" v-if="ComListSon.length<1&&imgflg">
<view class="" style="width: 100%;display: flex;justify-content: center;" >
<img src="../static/images/nth2.png" alt="" style='height: 320rpx;width:320rpx'>
</view>
<view class="" style="text-align: center;width: 100%;font-size: 30rpx; color: #ccc;">
暂无数据
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
computed: {
scrollH: function() {
let sys = uni.getSystemInfoSync();
let winWidth = sys.windowWidth;
let winrate = 750 / winWidth;
let winHeight = parseInt(sys.windowHeight * winrate)
return winHeight
console.log(sys)
}
},
data() {
return {
imgflg:false,
ComList: [], //
ComListSon: [],
num: 0,
arr: [{
name: '全部'
}, {
name: '只看兑换过的'
}],
//
query: {
// id
commodityId: '',
//
commodityName: '',
// id
categoryCode: '',
// id
brandCode: '',
//
integralMin: '',
//
integralMax: '',
// 0
redeemed: '',
deptId: uni.getStorageSync("info").deptId,
agentMerId: uni.getStorageSync("info").agentMerId,
agentMerCode: uni.getStorageSync("info").agentMerCode,
customerCode: uni.getStorageSync("info").customerCode,
customerId: uni.getStorageSync("info").customerId,
customerLoginId: uni.getStorageSync("info").customerLoginId,
// userId
// userId: 111
},
//
timeId: null,
//
btnList: [
// {
// label: "",
// type: 0,
// children: [{
// id: true, //1 2
// data: 'redeemed',
// selected: false,
// name: ''
// }]
// },
{
label: "分类",
type: 0,
children: [
]
},
{
label: "品牌",
type: 1,
children: [
],
},
{
label: "所需积分",
type: 2,
children: [{
id: 1,
data: 'isReviev',
selected: false,
name: '1-100'
},
{
id: 2,
data: 'isReviev',
selected: false,
name: '101-1000'
},
{
id: 3,
data: 'isReviev',
selected: false,
name: '1000-3000'
},
{
id: 4,
data: 'isReviev',
selected: false,
name: '3000以上'
}
],
},
],
//
currentIntegral: '',
}
},
onReady() {
},
onLoad() {
this.getbrand()
this.getList()
},
onShow(){
this.getjifen()
},
mounted() {
},
onReachBottom: function() {
//
// this.page++;
// this.getDefault(this.page);
console.log('触发了下拉加载更多的事件')
},
methods: {
async getjifen(){
let reb = await this.$API.getUserIntegral({
data: {
userId: uni.getStorageSync("userId")
}
})
console.log(reb, '用户积分')
if (reb.code == 200) {
this.currentIntegral = reb.data.currentIntegral
// this.$emit('currentIntegral',this.currentIntegral)
}
},
async getbrand() {
let res = await this.$API.getCommodityCategorys({
data: {
userId: uni.getStorageSync("userId"),
deptId: uni.getStorageSync("info").deptId,
agentMerId: uni.getStorageSync("info").agentMerId,
agentMerCode: uni.getStorageSync("info").agentMerCode,
customerCode: uni.getStorageSync("info").customerCode,
customerId: uni.getStorageSync("info").customerId,
customerLoginId: uni.getStorageSync("info").customerLoginId,
}
})
console.log(res, '商品分类', this.btnList[0].children)
res.data.twoCategories.length && res.data.twoCategories.forEach(item => {
this.btnList[0].children.push({
id: item.id,
data: 'categoryCode',
selected: false,
name: item.categoryName,
})
})
// this.arr[1] = this.btnList[0].children[0] || {name:''}
// this.arr[2] = this.btnList[1].children[1] || {name:''}
// this.arr[3] = this.btnList[1].children[2] || {name:''}
let ree = await this.$API.getCommodityBrands({
data: {
userId:uni.getStorageSync("userId"),
deptId: uni.getStorageSync("info").deptId,
agentMerId: uni.getStorageSync("info").agentMerId,
agentMerCode: uni.getStorageSync("info").agentMerCode,
customerCode: uni.getStorageSync("info").customerCode,
customerId: uni.getStorageSync("info").customerId,
customerLoginId: uni.getStorageSync("info").customerLoginId,
}
}).then(ree => {
console.log(ree, '商品品牌')
ree.data.length && ree.data.forEach(item => {
this.btnList[1].children.push({
id: item.id,
data: 'brandCode',
selected: false,
name: item.brandName
})
})
})
},
//
async getList() {
uni.showLoading({
title: '加载中',
duration: 2000
});
let rer = await this.$API.getCommoditys({
data: this.query
}).then(rer => {
console.log(rer, '商品信息')
if (rer.code == 200) {
// if (rer.data.length < 1) {
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// }
this.ComListSon = rer.data
this.imgflg=true
}else{
this.imgflg=true
}
uni.hideLoading()
})
},
//
goComponent() {
this.query.integralMin = 0
this.query.integralMax = this.currentIntegral
this.getList()
},
//
goList() {
setTimeout(()=>{
uni.navigateTo({
url: `/pages/Integral/exchangeRecords/exchangeRecords`
})
},0)
},
//
ToDel(id) {
//onLoad(id){ console.log('id' + id) }
this.$set(id, 'jf', this.currentIntegral)
uni.navigateTo({
url: `/pages/Integral/home/details/details?obj=${encodeURIComponent(JSON.stringify(id))}`
})
// wx.showToast({
// title: 'id' + id,
// icon: 'none',
// duration: 500
// });
},
getComList(page) {
//
// page
// axios.post('/list',{page:page}).then(res=>{
// if(res.code == 1){ //
// this.ComListSon = res.data
// }else{
// wx.showToast(
// { title: res.mes?res.msg:'',
// icon: 'none', duration: 500 });
// }
// Array.prototype.push.apply(this.ComList, this.ComListSon);
//.
// })
//
},
//
reset() {
this.btnList.forEach(item => {
item.children.forEach(v => {
v.selected = false
})
})
// this.query. = {
// id
this.query.commodityId='',
//
this.query.commodityName= this.query.commodityName,
// id
this.query.categoryCode= '',
// id
this.query.brandCode= '',
//
this.query.integralMin= '',
//
this.query.integralMax= '',
// 0
this.query.redeemed= this.query.redeemed,
// userId
this.query.userId= uni.getStorageSync("userId")
// }
// this.$refs.showRight.close();
this.getList()
},
//
confirm() {
// this.getPageData()
this.getList()
this.$refs.showRight.close();
},
//-
choice(type, index, e) {
//
console.log(type, index, e.currentTarget.dataset.vaule, '点击的数据')
const v = e.currentTarget.dataset.vaule
this.btnList[type].children.forEach(item => {
item.selected = false
this.query[item.data] = undefined
})
let item = this.btnList[type]
item.children[index].selected = true
this.$set(this.btnList, type, item)
//
this.query[v] = this.btnList[type].children[index].id
//
if (this.query.isReviev == 1) {
this.query.integralMin = 1,
this.query.integralMax = 100
}
if (this.query.isReviev == 2) {
this.query.integralMin = 101,
this.query.integralMax = 1000
}
if (this.query.isReviev == 3) {
this.query.integralMin = 1000,
this.query.integralMax = 3000
}
if (this.query.isReviev == 4) {
this.query.integralMin = 3000,
this.query.integralMax = 1000000
}
if (this.btnList[0].children[0].selected) {
this.query.redeemed = 0
} else {
this.query.redeemed = ''
}
},
//
showDrawer() {
this.$refs.showRight.open();
// this.num = 0
},
//
closeDrawer() {
this.$refs.showRight.close();
this.reset()
},
//
all(index) {
console.log(index)
this.num = index
if (this.arr[index].name == '全部') {
// this.reset()
this.query.integralMin = ''
this.query.integralMax = ''
this.query.categoryCode = ''
this.query.redeemed = ''
this.getList()
} else {
this.query.redeemed = 0
}
this.getList()
},
//
search(res) {
// uni.showToast({
// title: '' + res.value,
// icon: 'none'
// })
},
input(res) {
// 使
this.query.commodityName = res
if (this.timeId) {
//
clearInterval(this.timeId)
}
// this.timeId,1000input,1000
this.timeId = setTimeout(() => {
console.log(res)
this.getList()
}, 1000)
}
}
}
</script>
<style lang="scss" scoped>
@import './home.scss';
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,128 @@
.pageBox{
background-color: #E6EFF1;
// padding-top: 20rpx;
.background{
background-color: #3AAFB8;
height: 250rpx;
position: relative;
// margin-bottom: 150rpx;
.top{
background-color: #fff;
padding: 30rpx;
border-radius: 10rpx;
width: 700rpx;
margin: auto;
box-sizing: border-box;
position: absolute;
bottom: -120rpx;
left: 50%;
margin-left: -350rpx;
.two{
.two_top{
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 30rpx;
border-bottom: 1px solid #C3C9D3;
.two_flex{
align-items: center;
width: 80%;
}
}
.two_bot{
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 30rpx;
}
}
}
}
.center{
background-color: #fff;
padding: 30rpx;
border-radius: 10rpx;
width: 700rpx;
margin: 30rpx auto;
box-sizing: border-box;
display: flex;
.center_left{
.center_img{
width: 120rpx;
height: 120rpx;
vertical-align: middle;
}
}
.center_right{
margin-left: 25rpx;
.center_top{
margin-bottom: 20rpx;
}
.center_bot{
height: 50rpx;
line-height: 50rpx;
img{
width: 50rpx;
height: 50rpx;
vertical-align: middle;
margin-left: 20rpx;
}
}
}
}
.bottom{
background-color: #fff;
padding: 30rpx;
border-radius: 10rpx;
width: 700rpx;
margin: auto;
box-sizing: border-box;
.bot_top{
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 30rpx;
margin-top: 20rpx;
border-bottom: 1px solid #C3C9D3;
.bot_top_img{
height: 24rpx;
width: 24rpx;
margin-left: 10rpx;
vertical-align: middle;
}
}
.bot_bot{
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 30rpx;
.bot_top_img{
height: 24rpx;
width: 24rpx;
margin-left: 10rpx;
vertical-align: middle;
}
}
}
.btn{
width: 700rpx;
position: fixed;
bottom: 20rpx;
left: 50%;
margin-left: -350rpx;
border-radius: 21px;
height: 80rpx;
line-height: 80rpx;
background-color: #3AAFB8;
color: #fff;
font-size: 28rpx;
text-align: center;
}
}

View File

@ -0,0 +1,218 @@
<template>
<view class="pageBox" :style="{ height: scrollH + 'rpx' }">
<view class="background">
<view class="" style="text-align: center">
<img
src="../../static/images/8.png"
alt=""
style="height: 92rpx; width: 92rpx; vertical-align: middle"
/>
<text
style="margin-left: 20rpx; color: #fff"
v-if="list.orderState == 1"
>待收货</text
>
<text
style="margin-left: 20rpx; color: #fff"
v-if="list.orderState == 0"
>待发货</text
>
<text
style="margin-left: 20rpx; color: #fff"
v-if="list.orderState == 2"
>已完成</text
>
<text
style="margin-left: 20rpx; color: #fff"
v-if="list.orderState == 3"
>已撤销</text
>
</view>
<!-- 地址 -->
<!-- <view class="top">
<view class="two">
<view class="two_top">
<view class="" style="width: 150rpx; color: #7c8a9f"> 收货人 </view>
<view class="two_flex" style="">
<view class="" style="">
<text>{{ list.orderUser }} </text>
<text style="margin-left: 20rpx">{{ list.phonenumber }}</text>
</view>
</view>
</view>
<view class="two_bot">
<view class="" style="width: 150rpx; color: #7c8a9f">
收货地址
</view>
<view class="" style="width: 80%">
{{ list.orderAddress }}
</view>
</view>
</view>
</view> -->
</view>
<!-- 商品数量 -->
<view class="center">
<view class="center_left">
<img :src="list.detailList[0].commodityImg" alt="" class="center_img" />
</view>
<view class="center_right">
<view class="center_top">
{{ list.detailList[0].commodityName ? list.detailList[0].commodityName : "" }}
</view>
<view class="center_bot">
<text style="">X{{ list.detailList[0].orderDetailTotal ? list.detailList[0].orderDetailTotal : "" }}</text>
</view>
</view>
</view>
<!-- 价格 -->
<view class="bottom">
<view class="bot_top">
<view class="" style="width: 250rpx; color: #7c8a9f; font-size: 28rpx">
订单总价(含运费)
</view>
<view class="" style="font-size: 28rpx; color: #112950">
<text> </text><text> 0</text>
</view>
</view>
<view class="bot_top">
<view class="" style="width: 250rpx; color: #7c8a9f; font-size: 28rpx">
消耗积分
</view>
<view class="" style="font-size: 28rpx; color: #112950">
<text> {{ list.totalIntegral }}</text>
</view>
</view>
<view class="bot_top">
<view class="" style="width: 250rpx; color: #7c8a9f; font-size: 28rpx">
兑换时间
</view>
<view class="" style="font-size: 28rpx; color: #112950">
<text> {{ list.detailList[0].createTime }} </text>
</view>
</view>
<view class="bot_top">
<view class="" style="width: 120rpx; color: #7c8a9f; font-size: 28rpx">
订单编号
</view>
<view
class=""
style="font-size: 28rpx; color: #112950"
@tap="copy(list.orderNo)"
>
<text> {{ list.orderNo }}</text
><img
src="../../static/images/9.png"
alt=""
class="bot_top_img"
/>
</view>
</view>
<view class="bot_bot">
<view class="" style="width: 150rpx; color: #7c8a9f; font-size: 28rpx">
快递单号
</view>
<view class="" style="color: #112950" @tap="copy(list.logisticsNo)">
<text style="font-size: 28rpx">{{
list.logisticsNo == null ? "" : list.logisticsNo
}}</text>
<img
v-if="list.logisticsNo != null"
src="../../static/images/9.png"
alt=""
class="bot_top_img"
/>
</view>
</view>
</view>
<!-- 查看物流 -->
<view class="btn" @click="goLoglitics" v-if="list.orderState > 0">
<!-- <view class="btn" @click="goLoglitics" > -->
查看物流
</view>
<view class="" style="height: 120rpx"> </view>
</view>
</template>
<script>
export default {
computed: {
scrollH: function () {
let sys = uni.getSystemInfoSync();
let winWidth = sys.windowWidth;
let winrate = 750 / winWidth;
let winHeight = parseInt(sys.windowHeight * winrate);
return winHeight;
console.log(sys);
},
},
data() {
return {
flg: false,
num: 1,
list: undefined,
id: "",
};
},
onReady() {},
onLoad(option) {
console.log(option.id, "订单号");
if (option.id) {
this.getdata(option.id);
this.id = option.id;
} else {
wx.showToast({
title: "没有获取到订单号!",
icon: "none",
duration: 1500,
});
}
},
mounted() {},
methods: {
copy(value) {
console.log(value);
uni.setClipboardData({
data: value,
success: function () {
//
console.log("success", value);
},
});
},
goLoglitics() {
let obj = {
id: this.id,
img: this.list.detailList[0].commodityImg,
};
uni.navigateTo({
url:
"/pages/Integral/home/Logistics/Logistics?obj=" +
encodeURIComponent(JSON.stringify(obj)),
});
},
async getdata(id) {
let res = await this.$API
.getIntegralOrderDetail({ data: { orderNo: id } })
.then((res) => {
console.log(res, "订单");
if (res.code == 200) {
this.list = res.data;
}
});
},
},
};
</script>
<style lang="scss" scoped>
@import "./orderDetails.scss";
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -39,12 +39,14 @@
<view class="card">
<block v-if="shuju.diseases!='95'">
<view class="text-df grey">{{illustrate}}</view>
<view class="btn-descri" @click="onShowStatement">免责声明</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>
<view class="btn-descri" @click="onShowStatement">免责声明</view>
</block>
</view>
</view>
@ -64,6 +66,22 @@
</block>
</view>
</view>
<!-- 触底弹框 -->
<uni-popup type="center" ref="popup" :is-mask-click="false">
<view class="pupupCard">
<view class="text-center wenTitle">免责声明</view>
<view class="statement statement-descri" style="margin-top: 20rpx;">本健康评估仅为提供一般性的信息和参考不构成任何具体的医疗诊断建议或治疗方案</view>
<view class="statement statement-descri" style="margin-top: 5rpx;">进行健康评估是您自愿的行为您应明确知晓并理解以下几点</view>
<view class="statement " style="margin-top: 5rpx;">1. 本评估的结果并不能完全准确地反映您的实际健康状况不能替代专业医疗机构的全面检查和诊断</view>
<view class="statement">2. 我们不对评估结果的绝对准确性和完整性承担任何法律责任</view>
<view class="statement">3. 您在依据本评估结果采取任何行动或决策时应谨慎考虑并结合自身实际情况必要时咨询专业医疗人员</view>
<view class="statement">4. 若因您依赖本评估结果而导致任何身体损害经济损失或其他不利后果我们不承担任何责任</view>
<view class="statement statement-descri">请您仔细阅读并理解本免责声明一旦您参与健康评估即视为您同意本声明的所有内容</view>
<view class="flex-conter">
<view class="btn" @click="close">我知道了</view>
</view>
</view>
</uni-popup>
</view>
</template>
@ -150,6 +168,12 @@
})
}
},
onShowStatement(){
this.$refs.popup.open('bottom')
},
close(){
this.$refs.popup.close()
}
}
}
</script>
@ -191,6 +215,18 @@
.grey {
color: #909292;
}
.btn-descri{
margin-top: 16rpx;
font-weight: 400;
font-size: 28rpx;
color: #3AAFB8;
line-height: 33rpx;
text-align: left;
font-style: normal;
text-decoration-line: underline;
text-transform: none;
cursor: pointer;
}
.avare {
$wh: 80rpx;
@ -250,4 +286,48 @@
margin: 60rpx 0 20rpx;
}
}
.pupupCard {
width: 100%;
height: 900rpx;
border-radius: 16rpx 16rpx 0 0;
overflow: hidden;
font-size: 28rpx;
position: relative;
background: #FFFFFF;
.wenTitle {
padding-top: 10rpx;
font-weight: bold;
font-size: 32rpx;
color: #17191A;
line-height: 75rpx;
border-bottom: 1px solid #f4f4f4;
}
.statement{
padding:0 40rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #3F4040;
line-height: 42rpx;
}
.statement-descri{
text-indent:28px
}
.left-statement{
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: flex-end;
}
.btn {
position: absolute;
bottom: 30rpx;
width: 328rpx;
line-height: 80rpx;
text-align: center;
background: #3AAFB8;
border-radius: 50rpx;
color: #FFFFFF;
}
}
</style>

View File

@ -11,9 +11,10 @@
<view class="nameTitle flex-sub">{{fomeData.dishName}}</view>
</view>
<view>
<span class="themColor" style="font-size: 36px;">{{fomeData.heatAmount}}</span><span
<span style="font-size: 20px;color:#666;" >{{JSON.parse(fomeData.foodsInfo.elementContent)[Number(illnessId)][0] }} <span v-if="JSON.parse(fomeData.foodsInfo.elementContent)[Number(illnessId)].length > 1" style="margin:0 6px;">|</span> {{ JSON.parse(fomeData.foodsInfo.elementContent)[Number(illnessId)][1] }}</span>
<!-- <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>
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>
@ -110,9 +111,11 @@
userId:'29',
pageShow: false,
isHome: false, //
illnessId:"",//idid
}
},
onLoad(opt) {
this.illnessId = opt.illnessId
this.id=opt.id
this.tagLable=opt.lableName
this.getFoodsInfo()
@ -137,6 +140,7 @@
});
}
this.fomeData = ret.data || {}
console.log("this.fomeData",JSON.parse(this.fomeData.foodsInfo.elementContent)[103])
this.$nextTick(() => {
this.pageShow = true
hideLoading()

View File

@ -1,10 +1,10 @@
<template>
<view class="pageBox">
<view class="bestFoodBg" v-if="oneIndex==null||name==null">
<image src="../../static/images/bestFoodBg.png" class="bestFoodBg"></image>
<image src="../../static/images/Group 427320922@2x.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 class="text-center text-bold" style="font-size: 48px;margin-bottom: 28px;color: #17191A;">{{diseaseName}}{{typeName}}食物列表
</view>
<block v-if="foodList.length>0">
<block v-for="(item,index) in foodList" :key="index">
@ -18,9 +18,11 @@
{{item.foodsName}}
</view>
<view>
<span class="themColor" style="font-size: 36px;">{{item.energy}}</span>
<!-- <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>
<span style="font-size: 28px;color:#666;">/100</span> -->
<span style="font-size: 28px;color:#666;" >{{ dataList[index][query.diseaseIds] ? dataList[index][query.diseaseIds][0] : " "}} <span v-if="dataList[index][query.diseaseIds]"></span><span v-if="dataList[index][query.diseaseIds].length > 1" style="margin:0 6px;"> | </span> {{ dataList[index][query.diseaseIds] ? dataList[index][query.diseaseIds][1] : " "}}</span>
</view>
</view>
</view>
@ -81,6 +83,12 @@
hideLoading
} from "/tool/index.js"
export default {
// filters:{
// dataListFilter(e){
// console.log(e);
// return e
// }
// },
computed: {
totalWatch() {
return this.query.pageNum * 5 < this.total
@ -88,6 +96,8 @@
},
data() {
return {
typeName:'优选',
diseaseName:"高血压",
isPageShow: false, //
list: [{
id: 1,
@ -118,6 +128,8 @@
},
total: 0, //
isHome: false, //
dataList:[],
illnessId:"",//id
}
},
onLoad() {
@ -146,11 +158,20 @@
},
getPageData() {
this.isPageShow = false
this.dataList = []
this.$API.getDiseaseFoodsLevel({
data: this.query
}).then(res => {
if (res.code = 200) {
this.foodList = res.rows
res.rows.forEach(e => {
console.log(e.elementContent);
this.dataList.push(JSON.parse(e.elementContent))
});
console.log(this.dataList);
this.total = res.total
this.$nextTick(() => {
this.isPageShow = true
@ -160,6 +181,7 @@
},
oneChane(item, index) {
if(this.name == null) return toast('请先选择疾病')
this.typeName = item.name
this.oneIndex = index
this.query.level = item.id
this.query.pageNum = 1
@ -168,6 +190,8 @@
}
},
twoChane(item1) {
this.diseaseName = item1.diseaseName
this.illnessId = item1.id
this.name = item1.diseaseName
this.query.diseaseIds[0] = item1.id
this.query.pageNum = 1
@ -176,12 +200,14 @@
}
},
currentChange(e) {
console.log(e.detail.current);
return
this.currentIndex = e.detail.current
},
goDetail(item) {
uni.navigateTo({
url: '/pages/hairtailScreen/bestFood/detail/detail?id=' + item.id + '&lableName=' + this.list[
this.oneIndex].name
this.oneIndex].name + '&illnessId=' + this.illnessId
})
},
//

View File

@ -10,7 +10,7 @@
<text style="color: #42444F;">{{fomeData.foodName}}</text>
<text class="cutt"></text>
</view>
<view v-if="type == 1 || type == 2" class="greyColor">100g</view>
<view v-if="type == 1 || type == 2" class="greyColor">{{ fomeData.foodWeight }}g</view>
<view v-if="type == 1" class="greyColor">{{fomeData.foodKcal}}{{fomeData.foodUnit}}</view>
<view v-if="type == 2" class="greyColor">{{fomeData.foodKcal}}{{fomeData.foodUnit}}</view>
<view v-if="type == 3" class="greyColor">{{fomeData.foodWeight}}ml</view>
@ -33,7 +33,7 @@
<text style="color: #fff;"></text>
<text class="cutt"></text>
</view>
<view v-if="type == 1" class="colorWhite">100g</view>
<view v-if="type == 1" class="colorWhite">{{item.foodWeight}}g</view>
<view v-if="type == 1" class="colorWhite">{{item.foodKcal}}{{item.foodUnit}}</view>
<view v-if="type == 2 || type == 3" class="colorWhite">{{ item.foodSalt }}g</view>
</view>

View File

@ -18,6 +18,7 @@
<view style="font-size: 44px;font-weight: 500;margin-bottom: 10px;">{{item.foodName}}
</view>
<view v-if='foodClass == 1'>
<!-- <span style="font-size: 28px;color:#666;">钾含量 -&nbsp;|&nbsp;</span> -->
<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>
@ -28,7 +29,7 @@
<span style="font-size: 28px;color:#666;">/100</span>
</view>
<view v-if='foodClass == 3'>
<span class="themColor" style="font-size: 36px;">{{item.foodSalt}}</span>
<span class="themColor" style="font-size: 36px;">{{item.foodWeight}}</span>
<span class="themColor" style="font-size: 28px;">ml</span>
</view>
</view>
@ -99,8 +100,8 @@
//
foodList: [],
contentText: '', //
typeCode: '', //id
selectIndex: null, //
typeCode: 1, //id
selectIndex: 0, //
pageSize: 5,
pageNum: 1,
isPage: false,
@ -113,10 +114,21 @@
onLoad() {
this.$API.queryEeFoodType({
data: {
userId: 29
userId: 29,
type:2
}
}).then(res => {
this.diseaseList = res.data.slice(0,3)
this.diseaseList = res.data
let a = {
english:"High calorie",
foodType:"高油类",
iconNotSelect:"https://sharkbaby.yhy.ren/ee_exchange/calorleNotSelect.png",
iconSelect: "https://sharkbaby.yhy.ren/ee_exchange/calorleSelect.png",
id:1,
type:2
}
this.twoChane(a,0)
})
},
methods: {
@ -181,6 +193,9 @@
this.isPage = false
this.selectIndex = null
this.isHome = false
uni.navigateTo({
url: '/pages/hairtailScreen/exchangePortion/index/index1'
})
}
},
}

View File

@ -0,0 +1,217 @@
page {
background: linear-gradient(90deg, #E3F5FF 0%, #ECF8FF 100%);
width: 1080px;
height: 1920px;
}
.pageBox {
padding: 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;
}
}
.bestFoodBg {
width: 1000px;
height: 1508px;
}
.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;
width:488px;
height:292px;
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,210 @@
<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 v-if='foodClass == 1'>
<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 v-if='foodClass == 2'>
<span class="themColor" style="font-size: 36px;">{{item.foodKcal}}</span>
<span class="themColor" style="font-size: 28px;">mg钠</span>
<span style="font-size: 28px;color:#666;">/100</span>
</view>
<view v-if='foodClass == 3'>
<span class="themColor" style="font-size: 36px;">{{item.foodWeight}}</span>
<span class="themColor" style="font-size: 28px;">ml</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','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="item.iconSelect"></image>
</view> -->
<view style="">{{item.foodType}}</view>
<view :style="{fontSize:'20px',color:(''),width:'80%',margin:'auto',color:'#6E7477'}">
{{item.english}}
</view>
</view>
</view>
</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 {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
computed: {
totalWatch() {
return this.pageNum * 5 < this.total
}
},
data() {
return {
diseaseList: [{
foodType:"食物交换份",
english:"食物以每提供 90kcal 能量为一“份” 制定食物交换表"
},
{
foodType:"调味料换算表",
english:"分析每份食谱中所含油、盐、 糖的含量"
}],
//
foodList: [],
contentText: '', //
typeCode: '', //id
selectIndex: null, //
pageSize: 5,
pageNum: 1,
isPage: false,
total: 0, //
isPageShow: false, //
isHome: false, //
foodClass:"", //
}
},
onLoad() {
// this.$API.queryEeFoodType({
// data: {
// userId: 29
// }
// }).then(res => {
// this.diseaseList = res.data.slice(0,3)
// })
},
methods: {
//
twoChane(item, index) {
console.log(item);
if(item.foodType == '调味料换算表'){
uni.navigateTo({
url: '/pages/hairtailScreen/exchangePortion/index/index'
})
}else{
uni.navigateTo({
url: '/pages/hairtailScreen/foodexchange/index/index'
})
}
// this.foodClass = item.id //123
// 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 + '&type=' + this.foodClass
})
},
//
previousPage() {
this.pageNum -= 1
this.getPageData()
},
//
nextPage() {
this.pageNum += 1
this.getPageData()
},
//
backTap(e) {
if (e == 0) {
this.isHome = true
} else {
this.isPage = false
this.selectIndex = null
this.isHome = false
}
},
}
}
</script>
<style scoped lang="scss">
@import './index1.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,158 @@
<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,259 @@
page {
background: linear-gradient(90deg, #E3F5FF 0%, #ECF8FF 100%);
width: 1080px;
height: 1920px;
}
.pageBox {
padding: 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;
}
}
.bestFoodBg {
width: 100%;
height: 1260px;
}
.card {
width: calc(100% - 80px);
height: calc(1460px - 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;
}
&_block{
width: 840px;
height: 118px;
background: rgba(255, 255, 255, 0.8);
line-height: 118px;
font-weight: bold;
font-size: 40px;
position: absolute;
top: 35%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
border-radius: 12px;
&_span1{
width: 910px;
height: 152px;
background: rgba(137,207,212,0.1);
border-radius: 12px 12px 12px 12px;
border: 2px solid #3AAFB8;
display: flex;
justify-content: space-between;
}
}
}
.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:232px;
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;
}
.bg{
width: 232px;
height: 181px;
background: url('../../static/images/bg.png');
background-size: contain;
margin-top: 20px;
}
.bg2{
width: 232px;
height: 181px;
background: url('../../static/images/bg2.png');
background-size: contain;
margin-top: 20px;
}
.block_bg{
width: 1840rpx;
height: 936rpx;
}

View File

@ -0,0 +1,233 @@
<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>
<block v-if="isPageShow&&foodList.length==0">
<view class="nothing">
<image src="../../static/images/nothing.png"></image>
</view>
</block>
<view class="block_bg">
<image :src="foodList.typeIcon" style="width: 920px;height: 468px;"></image>
</view>
<view class="card_block">{{foodList.foodType}}</view>
<scroll-view style="height: 800px;" scroll-y="true">
<block v-for="(item,index) in foodList.foodInfos">
<view style="margin-top: 20px;" class="card_block_span1">
<!-- {{ item.foodDescribe }} -->
<view><image :src="item.foodIcon" style="width: 132px;height: 132px;margin-top: 10px;border-radius: 6px;margin-left: 10px;"></image></view>
<view style="font-weight: 500;font-size: 36px;line-height: 152px;"><span style="margin-left: 10px;"> {{item.foodWeight}}</span> <span>{{item.foodUnit}}</span> <span>{{ item.foodName }}</span> <span style="margin-left: 5px;margin-right: 5px;">|</span><span style="color: #6E7477;">{{ item.foodDescribe }}</span> </view>
<view style="line-height: 152px;margin-right: 10px;color: #6E7477;font-size: 36px;font-weight: 400;margin-left: auto;">一份</view>
</view>
{{ }}
<view style="text-align: center;" v-if="(foodList.foodInfos.length - 1) != index"><image src="https://sharkbaby.yhy.ren/Group%20427320991%402x.png" style="width: 80px;height: 80px;margin-top: 20px;"></image></view>
</block>
</scroll-view>
</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>
{{ item.foodType }}
<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.foodType}}</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 class="flex-between flex-wrap" style="">
<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="selectIndex==index ? 'bg-video text-center bg2' : 'bg-video text-center bg' ">
<view class="iconSelect" style="margin-top: 10px;">
<image :src="selectIndex==index?item.iconNotSelect:item.iconSelect" style="width: 68px;height: 68px;"></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 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 {
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, //
isHome: false, //
selectIndex: 0, //
}
},
onLoad() {
this.$API.queryEeFoodType({
data: {
userId: 29,
type:1
}
}).then(res => {
console.log(res.data);
this.diseaseList = res.data
console.log(this.diseaseList);
// this.diseaseList = this.getArr(res.rows, 8)
let a = {
english:"Cereal",
foodType:"谷薯杂豆类",
iconNotSelect:"https://sharkbaby.yhy.ren/ee_exchange/cerealNotSelect.png",
iconSelect: "https://sharkbaby.yhy.ren/ee_exchange/cerealSelect.png",
id:4,
type:1
}
this.twoChane(a,0)
})
},
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,index) {
console.log(index);
this.name = item1.foodType
this.selectIndex = index
this.typeCode = item1.id
this.pageNum = 1
this.getPageData()
},
//
getPageData() {
this.isPageShow = false
this.$API.queryEeFoodTypeDetails({
data: {
foodType: this.typeCode,
// foodsInfo: this.contentText,
// pageNum: this.pageNum,
// pageSize: this.pageSize,
}
}).then(res => {
if(res.code == 200){
this.foodList = res.data
}
// if (res.code == 200) {
// 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()
},
//
backTap(e) {
if (e == 0) {
this.isHome = true
} else {
this.isPage = false
this.name = null
this.selectIndex = null
this.isHome = false
uni.navigateTo({
url: '/pages/hairtailScreen/exchangePortion/index/index1'
})
}
},
}
}
</script>
<style scoped lang="scss">
@import './index.scss';
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

After

Width:  |  Height:  |  Size: 6.6 MiB

View File

@ -1,4 +1,17 @@
.pageBox{
.back-btn {
width: 136px;
height: 76px;
position: fixed;
right: 0;
top: 1400px;
z-index: 666;
.back-img {
width: 136px;
height: 76px;
}
}
.bgBackground {
position: fixed;
top: 0;
@ -36,7 +49,7 @@
.tableList{
.line{
border-bottom: 2rpx solid #EEEEEE;
padding: 20rpx 0;
padding: 20rpx 24rpx;
&:first-child{
border-left: 2rpx solid #EEEEEE;
border-right: 2rpx solid #EEEEEE;
@ -46,7 +59,41 @@
border-right: 2rpx solid #EEEEEE;
}
}
.habit{
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding:0 24rpx;
}
.content-group{
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
flex-wrap: wrap;
}
.content{
display: flex;
align-items: center;
box-sizing: border-box;
background: #F4F4F4;
border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 6rpx 12rpx;
font-weight: 400;
font-size: 28rpx;
color: #3F4040;
line-height: 36rpx;
margin-right: 12rpx;
margin-bottom: 6rpx;
margin-top: 6rpx;
}
.factor{
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
}
}

View File

@ -56,16 +56,26 @@
<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 class="" style="width: 30%; padding: 0 24rpx;">习惯类别</view>
<!-- <view class="flex-sub text-center">个数</view> -->
<view class="" style="width: 70%; padding: 0 24rpx;">内容</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 class="line flex-conter habit" style="color: #3F4040;width: 30%;">
<view>{{ item1.habitType }}</view>
<view>
<span :style="{ 'color': index1 == 0 ? '#10AB4A' :index1 == 1?'#FF901C':'#FF7B7B' }">{{
item1.score }}</span></view>
</view>
<!-- <view class="line flex-sub flex-conter" :style="{'color':index1==0?'#3F4040':'#FF7B7B'}">
{{item1.score}}</view> -->
<!-- 习惯分析内容部分-->
<view class="line content-group" style="color: #17191A;width: 70%;">
<span v-for="(item2, index2) in item1.habitName.split('') " :key="index2">
<span class="content">{{ item2 }}</span>
</span>
</view>
</view>
</block>
</view>
@ -77,20 +87,22 @@
<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 class="flex-sub" style="padding: 24rpx;">危险因素</view>
<view class="flex-sub" style="padding: 24rpx;">本次评估</view>
<view class="flex-sub" style="padding: 24rpx;">理想水平</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 factor" style="color: #17191A;text-align: left;">{{item1.name}}
</view>
<!-- 本次评估 -->
<view class="line flex-sub flex-conter" style="color:#D95959">
<view class="line flex-sub factor" style="color:#D95959;text-align: left;">
{{item1.newAssess}}
</view>
<!-- 理想水平 -->
<view class="line flex-sub text-center" style="color: #3F4040;">{{item1.idealValue}}</view>
<view class="line flex-sub factor" style="color: #3F4040;text-align: left;">
{{item1.idealValue}}</view>
</view>
</block>
</view>
@ -110,13 +122,20 @@
</view>
</block>
<view class="preventionPoints padding marginTop">
<view class="text-xl text-bold">评估建议</view>
<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="btnBottom">
<view class="btn" @tap="goPage">查看个人自主计划</view>
</view> -->
<view class="btnBottom" v-if="formeDate.id!=null && isBtn == 'false'">
<view class="btn" @tap="goPages" v-if="Statusdata>0">{{'查看个人自主计划'}}</view>
<view class="btn" @tap="goPage">{{ '创建个人自主计划' }}</view>
</view>
<view class="back-btn" v-if="isBtn == 'true'" @click="onGoHome">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</view>
</view>
</template>
@ -130,6 +149,7 @@
export default {
data() {
return {
Statusdata:"",
//
realName: '',
//
@ -140,6 +160,7 @@
isShow: false, //
memberId: '',
userId: '',
isBtn:'false'
}
},
onLoad(opt) {
@ -151,6 +172,9 @@
}
console.log(JSON.stringify(a))
let data = JSON.parse(decodeURIComponent(opt.params))
console.log("data11111",data)
this.isBtn = opt.isBtn ?opt.isBtn:false
console.log("this.isBtn",this.isBtn)
if (data.userParameters) {
this.userParameters = JSON.parse(data.userParameters)
} else {
@ -170,6 +194,12 @@
this.getInfo()
},
methods: {
//
onGoHome() {
uni.reLaunch({
url: '/pages/largeScreenEvaluation/evaluationIndex'
})
},
getInfo() {
let that = this
showLoading('加载中...')
@ -180,15 +210,24 @@
}
}).then((res) => {
that.formeDate = res.data
that.getQueryFetchStatus(that.formeDate.id)
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
}
let score = res.data.level
if (score=='较差'){
index = 0
} else if (score=='一般'){
index = 1
} else {
index = 2
}
// 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) {
@ -209,6 +248,13 @@
hideLoading()
})
},
getQueryFetchStatus(id){
this.$API.getQueryFetchStatus({data:{
disId:id
}}).then(res =>{
this.Statusdata = res.data
})
},
//
backChange() {
uni.navigateBack()
@ -221,12 +267,18 @@
})
}, 0)
},
//
goPage() {
uni.reLaunch({
//
goPage(){
uni.navigateTo({
url: '/pages/selfRegistration/index/index?userId=' + this.userParameters.userId+ "&riskId=" + this.formeDate.id
})
},
//
goPages() {
uni.reLaunch({
url: '/pages/selfRegistration/dailyTasks/dailyTasks?userId=' + this.userParameters.userId+ "&riskId=" + this.formeDate.id
})
},
}
}
</script>

View File

@ -7,7 +7,19 @@
height: 606rpx;
background: linear-gradient(145deg, #E4F5EB 0%, rgba(228, 245, 235, 0) 100%);
}
.back-btn {
width: 136px;
height: 76px;
position: fixed;
right: 0;
top: 1400px;
z-index: 666;
.back-img {
width: 136px;
height: 76px;
}
}
.themColor {
color: $uni-color;
}

View File

@ -178,15 +178,18 @@
<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}}
<!-- {{card.prevent}} -->
<view v-html="card.prevent.replace(/(\r\n|\n|\r)/gm, '<br />')"></view>
</view>
<view class="flex-align marginTop-lg"
<template v-if="isBtn == 'false'">
<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>
</template>
</view>
</block>
</block>
@ -226,6 +229,9 @@
<nothing :marginTop='40' context='暂无评估数据~'></nothing>
</block>
</view>
<view class="back-btn" v-if="isBtn == 'true'" @click="onGoHome">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</view>
</view>
</template>
@ -313,10 +319,23 @@
series: '', //
healthList: {},
isChart: false, //
isBtn:false,
}
},
onLoad(opt) {
let data = JSON.parse(decodeURIComponent(opt.params))
console.log("带进来的参数",data,opt)
this.isBtn = opt.isBtn?opt.isBtn:false
console.log("this.isBtn",this.isBtn)
uni.setNavigationBarTitle({
title: data.title?data.title + '评估报告':"评估报告",
success: () => {
console.log('setNavigationBarTitle success')
},
fail: () => {
console.log('setNavigationBarTitle fail')
},
})
this.memberId = data.memberId // 0 id
this.cno = data.cno
if (data.diseases == '') {
@ -334,6 +353,12 @@
this.getInfo()
},
methods: {
//
onGoHome() {
uni.reLaunch({
url: '/pages/largeScreenEvaluation/evaluationIndex'
})
},
getFunnelData() {
//
//
@ -381,11 +406,11 @@
let that = this
let ret = []
//
if (that.cno != '') {
if (that.cno != '' || that.cno.randomNumeric != '') {
ret = await that.$API.getAssessReport({
data: {
...that.userParameters,
cno: that.cno,
cno: that.cno.randomNumeric ? that.cno.randomNumeric : that.cno,
memberId: that.memberId,
diseaseId: that.diseaseId
}
@ -393,6 +418,7 @@
that.isAll = false
that.healthList = ret.data[ret.data.length - 1] //
ret.data.splice(-1, 1) //
console.log("ret",ret)
if (ret.data[0].diseaseName == '肥胖症') {
//
if (that.healthList.assessList.length > 0) {
@ -459,7 +485,7 @@
this.cardIndex = index
this.diseaseId = this.cardList[index].diseaseId
this.scrollLeft = (index - 1) * 68 //
this.title = this.cardList[index].diseaseName //
this.title = Object.keys(this.cardList[index]).length ? this.cardList[index].diseaseName:"" //
this.getDiseaseContent()
this.series = this.cardList[index].specialShowType
this.isChart = false
@ -503,9 +529,10 @@
ideaKey: item1.ideaKey,
ideaValue: item1.ideaValue,
name: item1.name,
isBtn:this.isBtn
}
goPage(['health-risks', 'guideDetails'], {
formData: JSON.stringify(data)
formData: encodeURIComponent(JSON.stringify(data))
})
},
//

View File

@ -21,9 +21,12 @@
<view class="text-xl">改善方法</view>
</view>
<view class="cutt"></view>
<view class="text-three">{{formData.name}}</text></view>
<view class="text-three"><text>{{formData.name}}</text></view>
</view>
</view>
<view class="back-home-btn" v-if="formData.isBtn == 'true'" @click="onGoHome">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</view>
</view>
</template>
<script>
@ -35,6 +38,14 @@
},
onLoad(options) {
this.formData = JSON.parse(options.formData)
console.log("this.formData",this.formData)
},
methods:{
onGoHome(){
uni.reLaunch({
url: '/pages/largeScreenEvaluation/evaluationIndex'
})
},
}
}
</script>
@ -46,6 +57,19 @@
display: flex;
flex-direction: column;
color: #3F4040;
.back-home-btn {
width: 136px;
height: 76px;
position: fixed;
right: 0;
top: 1400px;
z-index: 666;
.back-img {
width: 136px;
height: 76px;
}
}
.contioner {
padding: 32rpx;

View File

@ -2,6 +2,19 @@ page{
background: #F3F4F6;
}
.pageBox{
.back-home-btn {
width: 136px;
height: 76px;
position: fixed;
right: 0;
top: 1400px;
z-index: 666;
.back-img {
width: 136px;
height: 76px;
}
}
.color{
color: #17191A;
}
@ -52,18 +65,18 @@ page{
margin-top: 12rpx;
}
.stagBtn{
width: calc(406rpx - 278rpx);
padding: 10rpx 138rpx 10rpx 140rpx;
// width: calc(406rpx - 278rpx);
padding: 10rpx 110rpx 10rpx 120rpx;
border-radius: 50rpx;
border: 2rpx solid $uni-color;
background: $uni-color;
margin: 0 auto;
color: #FFF;
margin-top: 32rpx;
margin-top: 20rpx;
}
.colorGrey{
color: #909292;
margin-top: 32rpx;
margin-top: 20rpx;
}
}
.contioner{
@ -262,5 +275,22 @@ page{
color: #FFFFFF;
margin-top: 80rpx;
}
.back-btn{
position: fixed;
bottom: 120rpx;
width: calc(100% - 64rpx);
height: 80rpx;
background: rgba(255,255,255,1);
border-radius: 40px 40px 40px 40px;
border: 2px solid #FFFFFF;
font-weight: 500;
font-size: 36rpx;
color: #333333;
line-height: 80rpx;
text-align: center;
font-style: normal;
text-transform: none;
}
}
}

View File

@ -35,7 +35,7 @@
</view>
</view>
</view>
<scroll-view scroll-y :style="{'height':srcollHeight}" :scroll-top="scrollView" @scroll="scroll"
<scroll-view scroll-y :style="{'height':srcollHeight,'padding-bottom':isBtn == 'true'?'140px':''}" :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">
@ -54,8 +54,7 @@
<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)">
<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>
@ -68,11 +67,10 @@
<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)">
<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" />
<checkbox color="#3AAFB8" :value="item1.optionCode" :checked="item1.hidden" />
<view class="marginLeft-sm">{{item1.optionValue}}</view>
</view>
</label>
@ -88,13 +86,44 @@
<view class="marginTop-sm" v-if="item.subjectType=='2'">
{{item1.optionValue}}
</view>
<view @tap="inputChange(item.subjectInfo,
<block
v-if="item.subjectInfo != '请填写以下常规医学指标检查结果' && item.subjectInfo != '请填写以下医学指标检查结果' && item.subjectInfo != '请填写胃功能检查结果'">
<block v-if="item.subjectInfo != '请填写 骨密度检查指标-T值'">
<input type="number" id="inputId" @tap="inputChange(item.subjectInfo,
item1.optionCode != '' && item1.optionCode != null ? item1.optionCode : item1.defaultValue,
index, index1)" :value="item1.optionCode != '' && item1.optionCode != null ? item1.optionCode :
item1.defaultValue != '' && item1.defaultValue != null ? item1.defaultValue : ''" placeholder="请输入" :class="['inputClass', (item1.optionCode == '' || item1.optionCode == null) && (
item1.defaultValue == '' || item1.defaultValue == null) ? 'greyColor' : '']" @input="inputChange1" />
</block>
<block v-else>
<input type="text" id="inputId" @tap="inputChange(item.subjectInfo,
item1.optionCode != '' && item1.optionCode != null ? item1.optionCode : item1.defaultValue,
index, index1)" :value="item1.optionCode != '' && item1.optionCode != null ? item1.optionCode :
item1.defaultValue != '' && item1.defaultValue != null ? item1.defaultValue : ''" placeholder="请输入" :class="['inputClass', (item1.optionCode == '' || item1.optionCode == null) && (
item1.defaultValue == '' || item1.defaultValue == null) ? 'greyColor' : '']" @input="inputChange1" />
</block>
</block>
<block v-else>
<input type="digit" id="inputId" @tap="inputChange(item.subjectInfo,
item1.optionCode != '' && item1.optionCode != null ? item1.optionCode : item1.defaultValue,
index, index1)" :value="item1.optionCode != '' && item1.optionCode != null ? item1.optionCode :
item1.defaultValue != '' && item1.defaultValue != null ? item1.defaultValue : ''" placeholder="请输入" :class="['inputClass', (item1.optionCode == '' || item1.optionCode == null) && (
item1.defaultValue == '' || item1.defaultValue == null) ? 'greyColor' : '']" @input="inputChange1" />
</block>
<!-- 改成直接使用输入框 备用jxg -->
<!--<input @tap="inputChange(item.subjectInfo,
item1.optionCode != '' && item1.optionCode != null ? item1.optionCode : item1.defaultValue,
index, index1)" :value="item1.optionCode != '' && item1.optionCode != null ? item1.optionCode :
item1.defaultValue != '' && item1.defaultValue != null ? item1.defaultValue : ''" placeholder="请输入" :class="['inputClass', (item1.optionCode == '' || item1.optionCode == null) && (
item1.defaultValue == '' || item1.defaultValue == null) ? 'greyColor' : '']" @input="inputChange1" />-->
<!-- 前面弹框用的点击输入框 jxg-->
<!-- <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>
</view> -->
</block>
<view class="qding" @tap="nextBlanQuestion(index)">确认</view>
</view>
@ -106,13 +135,13 @@
<view class="marginTop-sm text-df" style="color: #909292;">
{{item1.optionValue}}
</view>
<picker mode="time" :value="item1.optionCode"
@change="bindTimeChange($event,item1)">
<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>
{{item1.optionCode==''?'请选择':item1.optionCode}}
</view>
<uni-icons type="right" size="14"
:style="{'color':item1.optionCode==''?'#909292':'#3AAFB8'}"></uni-icons>
</view>
</picker>
</block>
@ -132,17 +161,18 @@
</block>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
<uni-popup type="top" ref="inputRef" @maskClick="close">
<!-- 弹出框 暂时不用使用新方案 jxg-->
<!-- <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" />
<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" />
<input placeholder="请输入" type="text" @input="inputChange1" :value="inputValue" :focus="focus"
confirm-type="完成" @confirm="close" class="inputClass" />
</block>
</block>
<block v-else>
@ -150,7 +180,8 @@
@confirm="close" class="inputClass" />
</block>
</view>
</uni-popup>
</uni-popup> -->
<view class="back-btn" v-if="isBtn == 'true'" @click="onBackPage">返回上一页</view>
<view class="bottomBtn" @tap="submitMultiple" v-if="isNext">生成评估报告</view>
<!-- 返回底部 -->
<view class="backBottom" @tap="goBottom" v-show="scrollGun<600&&isBottom">
@ -158,6 +189,9 @@
<view class="text-sm themColor">返回底部</view>
</view>
</view>
<view class="back-home-btn" @click="onGoHome" v-if="isBtn == 'true'">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</view>
</view>
</template>
@ -216,10 +250,25 @@
inputValue: '', //
inputTitle: '', //
focus: false, //
title:"",//
isBtn:"",//
}
},
onLoad(options) {
this.isBtn = options.isBtn?options.isBtn:""
console.log("this.isBtn",this.isBtn)
let data = JSON.parse(decodeURIComponent(options.params))
console.log("data1111111111111",data)
this.title = data.title
uni.setNavigationBarTitle({
title:data.title?data.title + '评估问卷':'评估问卷',
success: () => {
console.log('setNavigationBarTitle success')
},
fail: () => {
console.log('setNavigationBarTitle fail')
},
})
if (data.token) {
this.userParameters.openId = data.openId //
this.userParameters.token = data.token //
@ -241,6 +290,17 @@
}
},
methods: {
onBackPage() {
uni.navigateBack({
delta: 1
})
},
//
onGoHome() {
uni.reLaunch({
url: '/pages/largeScreenEvaluation/evaluationIndex'
})
},
//
selectIntegral() {
this.$API.selectTaskIntegral({
@ -456,19 +516,22 @@
this.inputValue = value1
this.inptuIndex = index
this.inptuIndex1 = index1
this.$refs.inputRef.open()
this.$nextTick(() => {
this.focus = true
})
// 使jxg
// this.$refs.inputRef.open()
// this.$nextTick(() => {
// this.focus = true
// })
},
//
// --jxg
close() {
this.focus = false
this.cardRadio[this.inptuIndex].diseaseAssessSubjectOption[this.inptuIndex1].optionCode = this.inputValue
},
//
// --
inputChange1(e, item1) {
this.inputValue = e.detail.value
this.cardRadio[this.inptuIndex].diseaseAssessSubjectOption[this.inptuIndex1].optionCode = this.inputValue
document.querySelector('#inputId').scrollIntoView()
},
//
nextBlanQuestion(index) {
@ -744,23 +807,23 @@
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)
// 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')
},
@ -837,7 +900,11 @@
})
hideLoading()
if (reg.code == 200) {
if (this.diseases == '95') {
if(reg.data.points && reg.data.points > 0){
toast(reg.data.points + "积分已到账")
}
setTimeout(()=>{
if (this.diseases == '95') {
let b = {
userParameters: JSON.stringify(this.userParameters), //
name: this.userName,
@ -845,9 +912,9 @@
}
uni.redirectTo({
url: '/pages/health-risks/basicReport/basicReport?params=' + JSON
.stringify(b)
.stringify(b) + "&isBtn=" +this.isBtn
})
} else {
}else if(this.diseases == '99') {
let b = {
memberId: this.memberId, // 0 id
userParameters: JSON.stringify(this.userParameters), //
@ -856,11 +923,25 @@
cno: reg.data,
diseases: '',
}
uni.redirectTo({
url: '/pages/health-risks/newBasicReport/basicReport?memberId='+this.memberId +'&userId='+this.userParameters.userId +'&name='+this.userName +'&avatar=' + this.userProfile + "&isBtn=" +this.isBtn
})
} else {
let b = {
memberId: this.memberId, // 0 id
userParameters: JSON.stringify(this.userParameters), //
headSculpture: this.userProfile,
name: this.userName,
cno: reg.data,
diseases: '',
title:this.title,
}
uni.redirectTo({
url: '/pages/health-risks/evaluationResults/evaluationResults?params=' + JSON
.stringify(b)
.stringify(b) + "&isBtn=" + this.isBtn
})
}
},2000)
} else {
toast(reg.msg ? reg.msg : '生成报告异常')
}
@ -905,6 +986,11 @@
subType: '0', //1 0
}
})
if(ret.code == 200){
if(ret.data.points && ret.data.points > 0){
toast(ret.data.points + "积分已到账")
}
}
},
//
async continueChange() {

View File

@ -0,0 +1,195 @@
.pageBox{
background-color: #E6EFF1;
height: 100%;
.back-btn {
width: 136px;
height: 76px;
position: fixed;
right: 0;
top: 1400px;
z-index: 666;
.back-img {
width: 136px;
height: 76px;
}
}
.themColor{
color: $uni-color;
}
.topContioner{
width: 750rpx;
height: 480rpx;
.healthTop{
width: 100%;
height: 100%;
}
.leftArrow{
width: 48rpx;
height: 48rpx;
position: fixed;
top: 6vh;
left: 4vw;
z-index: 1;
}
.conterText{
font-size: 34rpx;
color: #FFFFFF;
width: 100%;
text-align: center;
position: fixed;
top: 6vh;
}
.headPortrait{
position: absolute;
top: 198rpx;
padding: 0 30rpx;
width: 446rpx;
line-height: 60rpx;
}
.fontColor{
font-size: 36rpx;
color: #FFFFFF;
}
}
.listContioner{
background: #E6EFF1;
.card{
position: relative;
background: #fdfbfd;
border-radius: 20rpx;
z-index: 10;
.btnText{
background: #E6EFF1;
line-height: 38rpx;
border-radius: 40rpx;
color: #686E75;
}
.rightColor{
color: #8E9AAB;
}
.btn{
width: 194rpx;
height: 84rpx;
background: #E6EFF1;
border-radius: 20rpx;
text-align: center;
line-height: 84rpx;
}
.bgColor{
background: #d8eff1;
border: 1rpx solid $uni-color;
}
.title{
background: #E6EFF1;
border-radius: 20rpx;
color: #8E9AAB;
}
.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;
}
}
.nowRiskValue{
position: absolute;
width: 100%;
top: 42%;
font-size: 48rpx;
}
}
.riskResults{
background: #FFFFFF;
border-radius: 20rpx;
.replace{
background: #E6EFF1;
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: 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;
}
}
}
.preventionPoints{
background: #FFFFFF;
border-radius: 20rpx;
.leftColor{
color: #112950;
}
.fontColor{
color: #686E75;
line-height: 38rpx;
}
}
.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;
}
}
.charts-box {
width: 630rpx;
height: 600rpx;
}
}
}

View File

@ -0,0 +1,203 @@
<template>
<view class="pageBox">
<view class="topContioner bg-video">
<!-- 顶部图片 -->
<image class="healthTop" src="../static/images/top.png"></image>
<!-- 返回箭头 -->
<!-- <image class="leftArrow" src="../static/images/leftArrow.png" @click="backChange"></image> -->
<!-- 顶部标题 -->
<!-- <view class="conterText">基础评估报告</view> -->
<!-- 文案说明部分 -->
<view class="headPortrait fontColor">
<view>欢迎开启您的专属健康报告</view>
</view>
</view>
<view class="flex-conter listContioner" :style="{ height: endHeight }">
<block v-if="isShow">
<!-- 超出高度时可滑动 -->
<scroll-view scroll-y="true" style="height: 100%;margin-top: -282rpx;">
<!-- 加一个空元素 防止垂直方向塌陷 -->
<view style="content: ''; overflow: hidden;"></view>
<view style="padding: 0 30rpx;">
<!-- 顶部卡片 -->
<view class="card padding">
<view class="flex-contion text-df marginBottom">
<!-- 头像 -->
<image class="averImage" :src="userInfo.avatar"></image>
<!-- 昵称 -->
<view class="text-bold margin-left-xs">{{realName}}</view>
</view>
<view class="flex-conter marginBottom">
<view style="width: 403rpx;height: 332rpx;border-radius: 50%;" class="bg-video">
<image src="https://sharkbaby.yhy.ren/20221013161701.gif"
style="width: 100%;height: 100%;"></image>
<view class="nowRiskValue themColor text-center">{{formeDate.nowRiskValue}}</view>
</view>
</view>
<view class="btnText padding text-sm" v-if="formeDate.riskDesc!=undefined">
{{formeDate.riskDesc}}
</view>
</view>
<!-- 各维度健康报告 -->
<view class="riskResults marginTop-sm padding marginBottom-sm">
<view class="leftColor text-lg text-bold marginBottom-sm">各维度健康报告</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>
<!-- 位置 -->
<image class="location"
:class="formeDate.listMap[index].level==1?'locationOne':formeDate.listMap[index].level==2?'locationTwo':formeDate.listMap[index].level==3?'locationThree':'locationFour'"
src="../static/images/location.png"></image>
<!-- 进度条 -->
<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">
<block v-for="(item,index) in formeDate.suggest" :key="index">
<view class="leftColor text-lg text-bold marginBottom-sm">{{item.type}}</view>
<view class="fontColor text-sm marginBottom-sm">{{item.name}}</view>
</block>
</view>
</view>
<!-- 底部按钮 -->
<view class="bottomBtn flex-conter" v-if="isBtn == 'false'" @click="viewPlan">
<view class="btn">点击领取您的专属健康计划</view>
</view>
</scroll-view>
</block>
</view>
<view class="back-btn" v-if="isBtn == 'true'" @click="onGoHome">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
//
realName: '',
//
formeDate: {},
//
evaluationIndex: 2,
//
endHeight: "",
isShow: false, //
memberId: '',
userInfo:{},
userId:"",
isBtn:false
}
},
//
onReady() {
const query = uni.createSelectorQuery().in(this);
query.select(".listContioner").boundingClientRect((data) => {
//
this.endHeight = uni.getSystemInfoSync().screenHeight - data.top + "px";
console.log(data.top, this.endHeight)
}).exec();
},
onLoad(opt) {
console.log("opt",opt)
if(opt.avatar){
this.userInfo = opt
}else{
this.userInfo = uni.getStorageSync("info")
}
this.isBtn = opt.isBtn == 'true' ?opt.isBtn:false
console.log("this.isBtn ",this.isBtn )
this.$set(this,'memberId',opt.memberId)
this.userId = opt.userId
this.getInfo()
if(opt.name){
this.$set(this, 'realName', opt.name)
}else{
this.$set(this, 'realName', uni.getStorageSync("info").nickName)
}
},
methods: {
//
onGoHome() {
uni.reLaunch({
url: '/pages/largeScreenEvaluation/evaluationIndex'
})
},
getInfo() {
let that = this
let a = ''
// memberId0
if (this.memberId == '0') {
if(this.userId){
a = this.userId
}else{
a = uni.getStorageSync("userId")
}
} else {
a = this.memberId
}
console.log("aaaaaa",a)
showLoading('加载中...')
that.$API.getDiseaseResult({
data: {
diseaseId: 99,
userId: a
}
}).then((res) => {
console.log(res)
that.formeDate = res.data
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 = "高风险"
}
hideLoading()
})
},
//
backChange() {
uni.navigateBack()
},
//
viewPlan() {
// this.$store.commit('updateIndex2')
setTimeout(()=>{
uni.reLaunch({
url: '/pages/tabBar/project/project'
})
},0)
},
}
}
</script>
<style lang="scss">
@import './basicReport.scss';
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,378 @@
<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>
<view class="btn-descri" @click="onShowStatement">免责声明</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>
<view class="btn-descri" @click="onShowStatement">免责声明</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>
<!-- 触底弹框 -->
<uni-popup type="center" ref="popup" :is-mask-click="false">
<view class="pupupCard">
<view class="text-center wenTitle">免责声明</view>
<view class="statement statement-descri" style="margin-top: 20rpx;">本健康评估仅为提供一般性的信息和参考不构成任何具体的医疗诊断建议或治疗方案</view>
<view class="statement statement-descri" style="margin-top: 5rpx;">进行健康评估是您自愿的行为您应明确知晓并理解以下几点</view>
<view class="statement " style="margin-top: 5rpx;">1. 本评估的结果并不能完全准确地反映您的实际健康状况不能替代专业医疗机构的全面检查和诊断</view>
<view class="statement">2. 我们不对评估结果的绝对准确性和完整性承担任何法律责任</view>
<view class="statement">3. 您在依据本评估结果采取任何行动或决策时应谨慎考虑并结合自身实际情况必要时咨询专业医疗人员</view>
<view class="statement">4. 若因您依赖本评估结果而导致任何身体损害经济损失或其他不利后果我们不承担任何责任</view>
<view class="statement statement-descri">请您仔细阅读并理解本免责声明一旦您参与健康评估即视为您同意本声明的所有内容</view>
<view class="flex-conter">
<view class="btn" @click="close">我知道了</view>
</view>
</view>
</uni-popup>
<view class="back-btn" @click="onBackPage">返回上一页</view>
<view class="back-home-btn" @click="onGoHome">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</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 +'&isBtn=' + true
})
//
} else {
uni.redirectTo({
url: '/pages/health-risks/index/index?params=' + this.formData +'&isBtn=' + true
})
}
},
onShowStatement(){
this.$refs.popup.open('bottom')
},
close(){
this.$refs.popup.close()
},
//
onGoHome(){
uni.reLaunch({
url:'/pages/largeScreenEvaluation/evaluationIndex'
})
},
//
onBackPage(){
uni.navigateBack({
delta:1
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100vw;
height: 100vh;
background: linear-gradient(171deg, #EFFFFD 10.63%, #F4F8F7 73.62%);
position: relative;
}
.back-home-btn {
width: 136px;
height: 76px;
position: absolute;
right: 0;
top: 1400px;
z-index: 666;
.back-img {
width: 136px;
height: 76px;
}
}
.back-btn {
position: fixed;
bottom: 0rpx;
width: 100%;
height: 80rpx;
background: rgba(255, 255, 255, 1);
border-radius: 40px 40px 40px 40px;
border: 2px solid #FFFFFF;
font-weight: 500;
font-size: 36rpx;
color: #333333;
line-height: 80rpx;
text-align: center;
font-style: normal;
text-transform: none;
z-index: 666;
}
.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;
}
.btn-descri{
margin-top: 16rpx;
font-weight: 400;
font-size: 28rpx;
color: #3AAFB8;
line-height: 33rpx;
text-align: left;
font-style: normal;
text-decoration-line: underline;
text-transform: none;
cursor: pointer;
}
.avare {
$wh: 80rpx;
width: $wh;
height: $wh;
border-radius: 50%;
margin-right: 24rpx;
}
.introduce {
padding: 20rpx;
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;
background: #FFFFFF;
border-radius: 0rpx 0rpx 16rpx 16rpx;
.intralTime {
$wh: 60rpx;
width: $wh;
height: $wh;
}
}
.card {
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;
font-size: 32rpx;
}
}
.literature {
padding: 20rpx;
background: #FFFFFF;
border-radius: 0rpx 16rpx 16rpx 16rpx;
margin: 60rpx 0 20rpx;
}
}
.pupupCard {
width: 100%;
height: 900rpx;
border-radius: 16rpx 16rpx 0 0;
overflow: hidden;
font-size: 28rpx;
position: relative;
background: #FFFFFF;
.wenTitle {
padding-top: 10rpx;
font-weight: bold;
font-size: 32rpx;
color: #17191A;
line-height: 75rpx;
border-bottom: 1px solid #f4f4f4;
}
.statement{
padding:0 40rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #3F4040;
line-height: 42rpx;
}
.statement-descri{
text-indent:28px
}
.left-statement{
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: flex-end;
}
.btn {
position: absolute;
bottom: 30rpx;
width: 328rpx;
line-height: 80rpx;
text-align: center;
background: #3AAFB8;
border-radius: 50rpx;
color: #FFFFFF;
font-size: 32rpx;
}
}
</style>

View File

@ -0,0 +1,315 @@
<template>
<!-- 大屏首页 -->
<view class="evaluation-index-container">
<view class="top-part">
<image src="https://shayu5qny.yhy.ren/company_icon.png" class="icon"></image>
<view class="userInfo-group">
<image :src="userInfo.avatar" class="avatar"></image>
<view class="name">{{ userInfo.nickName }}</view>
</view>
</view>
<view class="center-part">
<image src="https://shayu5qny.yhy.ren/evaluationIndex_bg.png" class="center-part_bg"></image>
</view>
<view class="bottom-part">
<view class="check-group" @click="onJumpLifeEvaluation">
<image class="icon1" src="https://shayu5qny.yhy.ren/life_icon.png"></image>
<view class="descri">生活方式评估</view>
<view class="english-decsri">lifestyle</view>
</view>
<view class="check-group" @click="onJumpEvaluationList(1)">
<image class="icon1" src="https://shayu5qny.yhy.ren/illness_icon.png"></image>
<view class="descri">疾病风险评估</view>
<view class="english-decsri">lifestyle</view>
</view>
<view class="check-group" @click="onJumpEvaluationList(2)">
<image class="icon1" src="https://shayu5qny.yhy.ren/mind_icon.png"></image>
<view class="descri">心理健康评估</view>
<view class="english-decsri">lifestyle</view>
</view>
</view>
<view class="btn-part" @click="onLoginOut">
退出登录
</view>
<view class="loginout-popup-container" v-if="loginoutShow">
<view class="loginout-popup-content">
<view class="loginout-top">
<view class="title">温馨提示</view>
<view class="descri">你确定要退出登录当前的账号吗</view>
</view>
<view class="btn-group">
<view class="btn" @click="loginoutShow = false">取消退出</view>
<view class="btn1" @click="onSubmitLoginOut">确定退出</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: {},
loginoutShow:false,
}
},
onLoad() {
this.userInfo = uni.getStorageSync('userInfo').sysUser
console.log("userInfo", this.userInfo)
},
methods: {
//
onJumpLifeEvaluation() {
let params = {
age: this.userInfo.age,
cno: "",
dicCode: "",
diseases: "95",
headSculpture: this.userInfo.avatar,
id: "",
memberId: "0",
name: this.userInfo.nickName,
typed: 2,
userId: this.userInfo.userId
}
uni.navigateTo({
url: '/pages/largeScreenEvaluation/detail?params=' + JSON.stringify(params)
})
},
//
onJumpEvaluationList(item) {
uni.navigateTo({
url: '/pages/largeScreenEvaluation/evaluationList?groupShow=' + item
})
},
//退
onLoginOut() {
this.loginoutShow = true
},
onSubmitLoginOut() {
this.loginoutShow = true
uni.reLaunch({
url: '/pages/login/login/login'
})
uni.removeStorageSync('userInfo')
}
}
}
</script>
<style lang="scss" scoped>
.evaluation-index-container {
width: 1080px;
height: 1920px;
background: linear-gradient(225deg, #E3F5FF 0%, #ECF8FF 100%);
border-radius: 0px 0px 0px 0px;
padding: 40px;
box-sizing: border-box;
.top-part {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.icon {
width: 254px;
height: 80px;
}
.userInfo-group {
background: rgba(255, 255, 255, 0.4);
border-radius: 43px 43px 43px 43px;
border: 1px solid #FFFFFF;
padding: 7px 24px 7px 7px;
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.avatar {
height: 66px;
width: 66px;
border-radius: 50%;
margin-right: 20px;
}
.name {
font-weight: 400;
font-size: 24px;
color: #333333;
line-height: 28px;
font-style: normal;
text-transform: none;
}
}
}
.center-part {
width: 100%;
height: 1138px;
margin-top: 40px;
.center-part_bg {
width: 100%;
height: 100%;
}
}
.bottom-part {
margin-top: 40px;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.check-group {
height: 420px;
width: 312px;
background: rgba(255, 255, 255, 0.4);
border-radius: 12px 12px 12px 12px;
border: 2px solid #FFFFFF;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.icon1 {
height: 110px;
width: 110px;
}
.descri {
margin-top: 48px;
font-weight: 500;
font-size: 32px;
color: #333333;
line-height: 38px;
font-style: normal;
text-transform: none;
}
.english-decsri {
margin-top: 6px;
font-weight: 400;
font-size: 20px;
color: #666666;
line-height: 23px;
font-style: normal;
text-transform: none;
}
}
}
.btn-part {
margin-top: 40px;
width: 100%;
height: 80px;
background: rgba(255, 255, 255, 0.4);
border-radius: 40px 40px 40px 40px;
border: 2px solid #FFFFFF;
font-weight: 500;
font-size: 24px;
color: #FF3B30;
line-height: 80px;
text-align: center;
font-style: normal;
text-transform: none;
}
.loginout-popup-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
border-radius: 0px 0px 0px 0px;
.loginout-popup-content {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 800px;
height: 442px;
background: #FFFFFF;
border-radius: 22px 22px 22px 22px;
.loginout-top {
height: 299px;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.title {
font-family: PingFang SC, PingFang SC;
font-weight: 600;
font-size: 42px;
color: #17191A;
line-height: 49px;
font-style: normal;
text-transform: none;
}
.descri {
margin-top: 22px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 38px;
color: #666666;
line-height: 45px;
font-style: normal;
text-transform: none;
}
}
.btn-group {
border-top: 2px solid #ECECEC;
height: 141px;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.btn {
border-right: 1px solid #ECECEC;
width: 50%;
height: 141px;
font-weight: 400;
font-size: 38px;
color: #666666;
line-height: 141px;
text-align: center;
font-style: normal;
text-transform: none;
}
.btn1 {
border-left: 1px solid #ECECEC;
width: 50%;
height: 141px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 38px;
color: #3AAFB8;
line-height: 141px;
text-align: center;
font-style: normal;
text-transform: none;
}
}
}
}
}
</style>

View File

@ -0,0 +1,956 @@
<template>
<!-- 评估列表 -->
<view class="evaluation-list-container">
<!-- 疾病 -->
<view class="evaluation-list-content" v-show="groupShow == 1">
<view class="title-group">
<view class="title">疾病风险评估</view>
</view>
<view class="list-content">
<scroll-view scroll-y="true" class="scroll-Y">
<view class="content" v-for="(item, index) in illnessList" :key="index">
<!-- <view class="status">高风险</view> -->
<!-- <view class="status status1">中风险</view> -->
<view class="status status2" :style="{ 'color': item.riskLevelColor }" v-if="item.riskLevel">{{
item.riskLevel }}
</view>
<view class="content-info">
<image :src="item.coverAddress" class="thumb"></image>
<view class="descri-group">
<view class="name">{{ item.diseaseName == '基础评估' ? item.diseaseName : (item.diseaseName + '风险评估') }}
</view>
<view class="descri">{{ item.diseaseIntroduce }}</view>
</view>
</view>
<view class="bottom-info" v-if="item.riskLevel">
<view class="detail-info">
{{ item.datePoor }}天前测过
</view>
<view class="btn-group">
<view class="btn1" @click="toEvaluationReport(item)">查看历史结果</view>
<view class="btn1 btn2" @click="toIllnessEvaluation(item)">重新评估</view>
</view>
</view>
<view class="bottom-info" v-if="item.riskLevel == null">
<view class="detail-info">
{{ item.assessCount }}人测过<text style="margin:0 10px">|</text>{{ item.subjectCount }}
</view>
<view class="btn" @click="toIllnessEvaluation(item)">去评估</view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 心理 -->
<view class="mind-list-content" v-show="groupShow == 2">
<view class="title-group">
<view class="title">心理健康评估</view>
</view>
<view class="list-content">
<scroll-view scroll-y="true" class="scroll-Y">
<template v-if="isShow == 0">
<view class="content" v-for="(item, index) in hotList" :key="index">
<view class="status" :style="{ 'color': item.textColor }">{{ item.result.resultLevelRemark }}</view>
<view class="content-info">
<image :src="item.dictImg" class="thumb"></image>
<view class="descri-group detail-info1">
<view class="name">{{ item.dictName }}</view>
<view class="descri">{{ item.dictIntroduce }}</view>
</view>
</view>
<view class="bottom-info" v-if="item.result.resultLevelRemark">
<view class="detail-info detail-info1">
{{ item.dictCopywrit }}
</view>
<view class="btn-group">
<view class="btn1" @click="onViewMindDetails(item)">查看历史结果</view>
<view class="btn1 btn2" @click="toMindEvaluation(item)">重新评估</view>
</view>
</view>
<view class="bottom-info" v-else>
<view class="detail-info">
{{ item.dictCopywrit }}
</view>
<view class="btn" @click="toMindEvaluation(item)">去评估</view>
</view>
</view>
</template>
<template v-else>
<view class="content" v-for="(item, index) in mindOtherList" :key="index">
<view class="content-info">
<image :src="item.img" class="thumb"></image>
<view class="descri-group detail-info1">
<view class="name">{{ item.title }}</view>
<view class="descri">{{ item.brief }}</view>
</view>
</view>
<view class="bottom-info" v-if="item.flag == 1">
<view class="detail-info detail-info1">
</view>
<view class="btn-group">
<view class="btn1">查看历史结果</view>
<view class="btn1 btn2" @click="toWithoutMindEvaluation(item)">重新评估</view>
</view>
</view>
<view class="bottom-info" v-else>
<view class="detail-info detail-info1">
</view>
<view class="btn" @click="toWithoutMindEvaluation(item)">去评估</view>
</view>
</view>
</template>
</scroll-view>
</view>
</view>
<view class="search" v-show="groupShow == 1">
<image src="https://shayu5qny.yhy.ren/search_bg.png"></image>
<input placeholder="搜索评估关键词" class="inputClass" v-model="contentText" maxlength="17" />
<view class="searchTitle" @tap="searchChange">搜索</view>
</view>
<view class="sort-part" v-show="groupShow == 2">
<scroll-view scroll-x="true" class="scroll-X">
<view :class="item.isChecked ? 'sort1' : 'sort'" v-for="(item, index) in sortList" :key="index"
@click="onChangeSort(item, index)">
<text>{{ item.name }}</text>
</view>
</scroll-view>
</view>
<view class="bottom-part">
<view :class="item.isChecked ? 'checked-content1' : 'checked-content'" v-for="(item, index) in checkList"
:key="index" @click="onChangeEvaluation(item, index)">
<image :src="item.isChecked ? item.iconChecked : item.icon" class="checked-icon"></image>
<view class="title">{{ item.name }}</view>
<view class="english">{{ item.englishName }}</view>
</view>
</view>
<view class="back-btn" @click="onGoHome">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
contentText: "",
illnessList: [],//
checkList: [
{
id: 1,
name: "生活方式评估",
englishName: 'lifestyle',
icon: "https://shayu5qny.yhy.ren/life_icon.png",
iconChecked: 'https://shayu5qny.yhy.ren/life_icon.png',
isChecked: false
},
{
id: 2,
name: "疾病风险评估",
englishName: 'Disease risk',
icon: "https://shayu5qny.yhy.ren/illness_icon.png",
iconChecked: 'https://shayu5qny.yhy.ren/illness_icon_checked.png',
isChecked: false
},
{
id: 1,
name: "心理健康评估",
englishName: 'Mental health',
icon: "https://shayu5qny.yhy.ren/mind_icon.png",
iconChecked: 'https://shayu5qny.yhy.ren/mind_icon_checked.png',
isChecked: false
}
],
sortList: [
{
id: 1,
name: '热门评估',
isChecked: false,
},
{
id: 2,
name: '心理健康',
isChecked: false,
},
{
id: 3,
name: '情感关系',
isChecked: false,
},
{
id: 4,
name: '工作状态',
isChecked: false,
},
{
id: 5,
name: '人格测评',
isChecked: false,
},
{
id: 6,
name: '育儿亲子',
isChecked: false,
},
{
id: 7,
name: '学生专区',
isChecked: false,
},
],
groupShow: "1", //1 2
hotList: [],// ,
isShow: 0, //0
categoryId: "",//ID
mindOtherList: [],//-
userInfo:{},//
customer:11,
deptId: 327, //
agentMerId:"",
agentMerCode:"",
customerCode:"",
customerId:"",
customerLoginId:"",
token:"",
openId:"",
}
},
onLoad(option) {
console.log("option",option.groupShow,uni.getStorageSync('userInfo'))
this.userInfo = uni.getStorageSync('userInfo').sysUser
this.token = uni.getStorageSync('userInfo').token
this.openId = this.userInfo.openId
let agentMerId = (this.userInfo['agentMerId'] || this.userInfo['agentMerCode']) || ''
let customerId = (this.userInfo['customerCode'] || this.userInfo['customerId']) || this.customer
console.log("agentMerId,customerId",agentMerId,customerId)
this.agentMerId = agentMerId
this.agentMerCode = agentMerId
this.customerCode = customerId
this.customerId = customerId
this.customerLoginId = customerId
this.groupShow = option.groupShow
this.checkList[option.groupShow].isChecked = true
// if (option.groupShow == 1) {
// this.newselectDictList()
// } else if (option.groupShow == 2) {
// this.newTypeList()
// }
},
onShow(){
if(this.groupShow){
}else{
this.groupShow = 1
this.checkList[1].isChecked = true
}
setTimeout(()=>{
this.newselectDictList()
this.newTypeList()
},100)
},
methods: {
//
onGoHome(){
uni.redirectTo({
url:'/pages/largeScreenEvaluation/evaluationIndex'
})
},
//
searchChange() {
this.newselectDictList()
},
//
onChangeEvaluation(item, index) {
this.groupShow = index
this.checkList = this.checkList.map((item, index1) => {
if (index == index1 && index > 0) {
item.isChecked = true;
} else {
item.isChecked = false;
}
return item;
});
if (index == 0) { //
let params = {
age: this.userInfo.age,
cno: "",
dicCode: "",
diseases: "95",
headSculpture: this.userInfo.avatar,
id: "",
memberId: "0",
name: this.userInfo.nickName,
typed: 2,
userId: this.userInfo.userId
}
uni.navigateTo({
url: '/pages/largeScreenEvaluation/detail?params=' + JSON.stringify(params)
})
} else if (index == 1) {
this.newselectDictList()
} else {
this.newTypeList()
}
},
//
onChangeSort(item, index) {
this.sortList = this.sortList.map((item, index1) => {
if (index == index1) {
item.isChecked = true;
} else {
item.isChecked = false;
}
return item;
});
this.isShow = index
console.log("this.isShow", this.isShow)
this.categoryId = item.id
if (index == 0) {
this.psychologyDictList()
} else {
this.diggmindUserList()
}
},
//
toIllnessEvaluation(item) {
console.log("疾病评估item", item)
let params = {
age: this.userInfo.age,
cno: item.cno,
dicCode: "",
diseases: item.id,
headSculpture: this.userInfo.avatar,
id: "",
memberId: "0",
name: this.userInfo.nickName,
typed: 2,
userId: this.userInfo.userId
}
// let params = {
// age: age,
// cno: "",
// dicCode: "",
// diseases: item.id,
// headSculpture: userInfo.postCode,
// id: "",
// memberId: "0",
// name: userInfo.name,
// typed: 2,
// userId: userInfo.userCode
// }
uni.navigateTo({
url: '/pages/largeScreenEvaluation/detail?params=' + JSON.stringify(params)
})
},
//
toMindEvaluation(item) {
console.log("心理评估item",item)
let params = {
age: this.userInfo.age,
cno: "",
dicCode: item.dictCode,
diseases: "",
headSculpture: this.userInfo.avatar,
id: item.id,
memberId: "",
name: this.userInfo.nickName,
title: "心理健康综合评估",
typed: 1,
userId: this.userInfo.userId
}
uni.navigateTo({
url: '/pages/largeScreenEvaluation/detail?params=' + JSON.stringify(params)
})
},
//
onViewMindDetails(item) {
let a = {
userParameters: JSON.stringify({ userId: this.userInfo.userId }),
headSculpture: this.userInfo.avatar,
name: this.userInfo.nickName,
id: 0,//0
dicCode: item.dictCode,
}
uni.navigateTo({
url: '/pages/psychological-assessment/result/result?params=' + JSON.stringify(a) + "&isBtn="+ true
})
},
//
toEvaluationReport(item) {
console.log("item", item)
if (item.id == 95) { //
let params = {
age: this.userInfo.age,
cno: item.cno,
dicCode: "",
diseases: item.id,
headSculpture: this.userInfo.avatar,
id: "",
memberId: "0",
name: this.userInfo.nickName,
title: "生活方式",
typed: 2,
userId: this.userInfo.userId,
isBtn: false,
}
console.log("params", params)
// var url = 'https://syjk.yhy.ren/test-risk-assessment/#/pages/health-risks/basicReport/basicReport?params=' + JSON.stringify(params)
uni.navigateTo({
url: '/pages/health-risks/basicReport/basicReport?params=' + JSON.stringify(params) + "&isBtn=" + true
})
} else if (item.id == 99) { //
// var url = 'https://syjk.yhy.ren/test-risk-assessment/#/pages/health-risks/newBasicReport/basicReport?diseaseId=' + item.id + '&userId=' + userInfo.userCode + '&avatar=' + userInfo.postCode + '&nickName=' + userInfo.name
uni.navigateTo({
url: '/pages/health-risks/newBasicReport/basicReport?diseaseId=' + item.id + '&userId=' + this.userInfo.userId + '&avatar=' + this.userInfo.avatar + '&nickName=' + this.userInfo.nickName + '&isBtn=' + true + "&memberId=0"
})
} else {
let params = {
age: this.userInfo.age,
cno: item.cno,
dicCode: "",
diseases: item.id,
headSculpture: this.userInfo.avatar,
id: "",
memberId: "0",
name: this.userInfo.nickName,
title: '',
typed: 2,
userId: this.userInfo.userId,
isBtn: true,
}
// var url = 'https://syjk.yhy.ren/test-risk-assessment/#/pages/health-risks/evaluationResults/evaluationResults?params=' + JSON.stringify(params)
uni.navigateTo({
url: '/pages/health-risks/evaluationResults/evaluationResults?params=' + JSON.stringify(params) + "&isBtn=" + true
})
}
},
//
toWithoutMindEvaluation(item) {
console.log("外部心理评估",item)
// this.$API.diggmindUserDetails({
// data: {
// id: item.id,
// openId: 'ot5qo4g199gwfsI1wnpoi-xP_1cA',
// token: 'ot5qo4g199gwfsI1wnpoi-xP_1cA',
// userId: 8702,
// deptId: 346,
// agentMerId: 8758,
// agentMerCode: 8758,
// customerCode: 8764,
// customerId: 8764,
// customerLoginId: 8764
// }
// }).then((res) => {
// if (res.code == 200) {
// }
// })
this.$API.diggmindUserStartAssessment({
data: {
id: item.id,
openId: this.openId,
token: this.token,
userId: this.userInfo.userId,
deptId: this.deptId,
agentMerId: this.agentMerId,
agentMerCode: this.agentMerCode,
customerCode: this.customerCode,
customerId: this.customerId,
customerLoginId: this.customerLoginId
}
}).then(res => {
if (res.code == 200) {
window.location.href = res.data;
}
})
},
/**********************接口请求************************/
//
newselectDictList() {
this.$API.newselectDictList({
data: {
diseaseType: 0,
diseaseName: this.contentText,
familyId: 0,
openId: this.openId,
token: this.token,
userId: this.userInfo.userId,
deptId: this.deptId,
agentMerId: this.agentMerId,
agentMerCode: this.agentMerCode,
customerCode: this.customerCode,
customerId: this.customerId,
customerLoginId: this.customerLoginId,
}
}).then(res => {
if (res.code == 200) {
this.illnessList = res.data
}
})
},
//newTypeList
newTypeList() {
this.$API.newTypeList({
data: {
openId: this.openId,
token: this.token,
userId: this.userInfo.userId,
deptId: this.deptId,
agentMerId: this.agentMerId,
agentMerCode: this.agentMerCode,
customerCode: this.customerCode,
customerId: this.customerId,
customerLoginId: this.customerLoginId,
}
}).then(res => {
if (res.code == 200) {
let list = res.data.map(item => {
return {
...item,
isChecked: false
}
})
this.sortList = list
this.sortList[0].isChecked = true
setTimeout(() => {
this.psychologyDictList()
}, 500)
}
})
},
//
psychologyDictList() {
this.$API.psychologyDictList({
data: {
openId: this.openId,
token: this.token,
userId: this.userInfo.userId,
deptId: this.deptId,
agentMerId: this.agentMerId,
agentMerCode: this.agentMerCode,
customerCode: this.customerCode,
customerId: this.customerId,
customerLoginId: this.customerLoginId
}
}).then(res => {
if (res.code == 200) {
this.hotList = res.data
}
})
},
// -
diggmindUserList() {
this.$API.diggmindUserList({
data: {
agentMerCode: this.agentMerCode,
agentMerId: this.agentMerId,
category_id: this.categoryId,
customerCode: this.customerCode,
customerId: this.customerId,
customerLoginId: this.customerLoginId,
deptId: this.deptId,
openId: this.openId,
token: this.token,
userId: this.userInfo.userId
}
}).then(res => {
if (res.code == 200) {
this.mindOtherList = res.data
}
})
}
}
}
</script>
<style lang="scss" scoped>
.evaluation-list-container {
width: 1080px;
height: 1920px;
background: linear-gradient(225deg, #E3F5FF 0%, #ECF8FF 100%);
border-radius: 0px 0px 0px 0px;
padding: 40px;
box-sizing: border-box;
position: relative;
.back-btn {
width: 136px;
height: 76px;
position: absolute;
right: 0;
top: 1400px;
.back-img {
width: 136px;
height: 76px;
}
}
.evaluation-list-content {
height: 1378px;
width: 100%;
background: #FFFFFF;
border-radius: 12px 12px 12px 12px;
padding: 0 40px;
.title-group {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
.title {
margin-top: 48px;
margin-bottom: 40px;
font-weight: bold;
font-size: 48px;
color: #17191A;
line-height: 56px;
font-style: normal;
text-transform: none;
}
}
}
.list-content {
height: calc(100% - 160px);
width: 100%;
.scroll-Y {
width: 100%;
height: 100%;
.content {
width: 100%;
height: 326px;
background: rgba(233, 246, 248, 0.6);
border-radius: 12px 12px 12px 12px;
margin-bottom: 32px;
padding: 32px;
position: relative;
.status {
position: absolute;
right: 32px;
top: 32px;
font-weight: 500;
font-size: 32px;
color: #FF3B30;
line-height: 38px;
font-style: normal;
text-transform: none;
}
.status1 {
color: #ED7D2B;
}
.status2 {
color: #10AB4A;
}
.content-info {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.thumb {
width: 174px;
height: 174px;
margin-right: 28px;
}
.descri-group {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
.name {
font-weight: 500;
font-size: 42px;
color: #333333;
line-height: 49px;
font-style: normal;
text-transform: none;
margin-bottom: 20px;
}
.descri {
width: 654px;
font-weight: 400;
font-size: 32px;
color: #666666;
line-height: 38px;
font-style: normal;
text-transform: none;
overflow: hidden;
/* 隐藏超出容器的内容 */
white-space: nowrap;
/* 保持文本在一行内显示 */
text-overflow: ellipsis;
/* 超出内容用省略号表示 */
}
}
}
.bottom-info {
margin-top: 32px;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.detail-info {
font-weight: 400;
font-size: 32px;
color: #666666;
line-height: 38px;
font-style: normal;
text-transform: none;
}
.detail-info1 {
width: 300px;
overflow: hidden;
/* 隐藏超出容器的内容 */
white-space: nowrap;
/* 保持文本在一行内显示 */
text-overflow: ellipsis;
/* 超出内容用省略号表示 */
}
.btn {
width: 182px;
height: 70px;
background: linear-gradient(#3AAFB8 0%, #6ACBD1 100%);
border-radius: 35px 35px 35px 35px;
font-weight: 400;
font-size: 34px;
color: #FFFFFF;
line-height: 60px;
text-align: center;
font-style: normal;
text-transform: none;
}
.btn-group {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
.btn1 {
font-weight: 400;
font-size: 32px;
color: #3AAFB8;
line-height: 38px;
text-align: left;
font-style: normal;
text-decoration-line: underline;
text-transform: none;
}
.btn2 {
margin-left: 32px;
}
}
}
}
}
}
.mind-list-content {
width: 100%;
height: 1418px;
border-radius: 12px 12px 12px 12px;
padding: 0 40px;
background: #FFFFFF;
.title-group {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
.title {
margin-top: 48px;
margin-bottom: 40px;
font-weight: bold;
font-size: 48px;
color: #17191A;
line-height: 56px;
font-style: normal;
text-transform: none;
}
}
}
.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;
}
}
.sort-part {
width: 100%;
height: 120px;
background: rgba(233, 246, 248, 0.6);
.scroll-X {
height: 100%;
min-width: 100%;
display: flex;
white-space: nowrap;
.sort {
display: inline-block;
width: 272px;
height: 120px;
font-weight: 400;
font-size: 36px;
color: #333333;
line-height: 120px;
text-align: center;
font-style: normal;
text-transform: none;
background: rgba(233, 246, 248, 0.6);
}
.sort1 {
display: inline-block;
width: 272px;
height: 120px;
font-weight: 500;
font-size: 40px;
color: #3AAFB8;
line-height: 120px;
text-align: center;
font-style: normal;
text-transform: none;
background: #fff;
border: 1px solid #FFFFFF;
}
}
}
.bottom-part {
margin-top: 44px;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.checked-content {
width: 312px;
height: 262px;
background: rgba(255, 255, 255, 0.4);
border-radius: 12px 12px 12px 12px;
border: 1px solid #FFFFFF;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.checked-icon {
width: 88px;
height: 88px;
}
.title {
margin-top: 16px;
font-weight: 500;
font-size: 28px;
color: #42444F;
line-height: 33px;
font-style: normal;
text-transform: none;
}
.english {
margin-top: 6px;
font-weight: 400;
font-size: 18px;
color: #6E7477;
line-height: 21px;
font-style: normal;
text-transform: none;
}
}
.checked-content1 {
width: 312px;
height: 262px;
border-radius: 12px 12px 12px 12px;
background: url(https://shayu5qny.yhy.ren/checked_bg.png) no-repeat;
background-size: cover;
border: 1px solid #FFFFFF;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.checked-icon {
width: 88px;
height: 88px;
}
.title {
margin-top: 16px;
font-weight: 500;
font-size: 28px;
color: #fff;
line-height: 33px;
font-style: normal;
text-transform: none;
}
.english {
margin-top: 6px;
font-weight: 400;
font-size: 18px;
color: #fff;
line-height: 21px;
font-style: normal;
text-transform: none;
}
}
}
}
</style>

View File

@ -0,0 +1,631 @@
<template>
<view class="pageBox">
<view class="contioner">
<view class="flex-contion">
<view class="themColor text-df text-bold marginRight-xs" @click="perfectIndex=0" v-if="perfectIndex==1">
上一步</view>
<progress :percent="percent" activeColor="#3AAFB8" border-radius="50" class="flex-sub" />
</view>
<block v-if="perfectIndex==0">
<view class="text-four marginTop text-center">生理性别和激素会影响我的身体代谢食物的方式</view>
<view class="text-bold marginTop-xl"># 你的姓名</view>
<view class="marginTop flex-align">
<input v-model="realName" maxlength="10" style="border: 1rpx solid #eee;padding: 5rpx; width: 100%;" />
</view>
<view class="text-bold marginTop-xl"># 选择你的性别</view>
<view class="marginTop flex-align">
<view class="flex-conter flex-direction text-sm" @click="tabClick(0)">
<image src="https://shayu5qny.yhy.ren/login-boy.png" class="img"></image>
<view :class="genIndex==0?'tagShaw':''">男性</view>
</view>
<view class="flex-conter flex-direction text-sm" @click="tabClick(1)">
<image src="https://shayu5qny.yhy.ren/login-gilr.png" class="img"></image>
<view :class="genIndex==1?'tagShaw':''">女性</view>
</view>
</view>
<view class="text-bold marginTop-xl"># 选择你的出生年月</view>
<!-- 时间选择器 -->
<picker-view class="picker-view" indicator-class="city-picker" mask-style="background:#E6EFF1;opacity:0"
:value="value" :indicator-style="indicatorStyle" @change="bindChange($event)">
<picker-view-column >
<view class="item" v-for="(item2,index2) in years" :key="index2"
:class="value[0]==index2?'pickerSelected':''">
{{item2}}
</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item3,index3) in months" :key="index3"
:class="value[1]==index3?'pickerSelected':''">
{{item3}}
</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item4,index4) in days" :key="index4"
:class="value[2]==index4?'pickerSelected':''">
{{item4}}
</view>
</picker-view-column>
</picker-view>
</block>
<block v-else>
<view class="text-center">
<image
:src="genIndex==0?'https://shayu5qny.yhy.ren/login-boy.png':'https://shayu5qny.yhy.ren/login-gilr.png'"
class="boyGirl"></image>
</view>
<view class="text-four">身高体重信息对发现或筛查某些疾病有重要的参考价值</view>
<view class="text-bold marginTop-xl"># 选择你的身高</view>
<picker mode="selector" :value="height" :range="heightRange" @change="heightChange">
<view class="text-center text-bold margin-bottom-xs marginTop-sm">{{height}}CM</view>
</picker>
<view class="text-bold marginTop-xl"># 选择你的体重</view>
<picker mode="selector" :value="weight" :range="weightRange" @change="weightChange">
<view class="text-center text-bold margin-bottom-xs marginTop-sm">{{weight}}KG</view>
</picker>
</block>
<view class="flex-conter" @click="next">
<view class="btn">{{perfectIndex==0?'下一步':'完成'}}</view>
</view>
</view>
<!-- 检测企业 未注册企业弹框 -->
<uni-popup type="center" ref="detection" :is-mask-click="false">
<view class="detectionCard">
<uni-icons type="closeempty" size="28" class="closeempty" @click="closeDetection"></uni-icons>
<view class="text-center">
<image src="https://shayu5qny.yhy.ren/corporateConnections.png" class="corporateConnections">
</image>
</view>
<!-- 检测企业内容 -->
<block v-if="type==1">
<view class="fourSix text-bold text-center">检测到您是非企业用户</view>
<view class="fourSix text-bold text-center marginBottom-xl">是否立即加入企业</view>
<view class="btnTk" @click="changeType">立即加入</view>
<view class="btnTk whiteShaw" @click="personalLogin">个人用户登录</view>
</block>
<!-- 未注册企业内容 -->
<block v-else>
<view class="fourSix text-bold text-center">未查询到您的数据</view>
<view class="fourSix text-bold text-center marginBottom-xl">请联系企业注册</view>
<view class="btnTk">去联系</view>
<view class="btnTk tranform">取消</view>
</block>
</view>
</uni-popup>
<!-- 加入企业弹框 -->
<uni-popup type="center" ref="join" :is-mask-click="false">
<view class="detectionCard">
<uni-icons type="closeempty" size="28" class="closeempty" @click="closeJoin"></uni-icons>
<view class="fourSix text-bold text-center marginBottom-xl">加入企业</view>
<input v-model="key" placeholder="请输入激活码" class="inputClass marginBottom-xl marginTop-xl" />
<view class="btnTk" @click="joinNow">立即加入</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading,
debounce,
formatTime
// preventClick,
} from "/tool/index.js"
import config from '/api/config.js'
export default {
data() {
const date = new Date()
const years = []
const months = []
const days = []
var yearIndex = 0
for (let i = 1900; i <= date.getFullYear(); i++) {
if (i <= 2000) {
yearIndex++;
}
years.push(i)
}
for (let i = 1; i <= 12; i++) {
months.push(i)
}
for (let i = 1; i <= 31; i++) {
days.push(i)
}
const weightRange = []
for (let i = 0; i <= 300; i++) {
weightRange.push(i)
}
const heightRange = []
for (let i = 0; i <= 300; i++) {
heightRange.push(i)
}
return {
weightRange,
heightRange,
realName:"",
percent: 50, //
perfectIndex: 0, //
genIndex: 0, //0 1
years, //
months, //
days, //
yearIndex,
monthIndex: 0,
datIndex: 0,
value: [], //
height: 170, //
weight: 50, //
type: 1, // 2
enterprise: 0, //
phone: '', //
code: '', //
//
range: [],
indicatorStyle: `height: 100px;`,
styles: {
line: '#96d0d6',
bginner: '#fff',
bgoutside: '#d4e7ea',
font: '#3AAFB8',
fontColor: '#3AAFB8',
fontSize: 12,
paddingLeft: '345rpx'
},
year: '',
month: '',
day: '',
dateIndex: '2000-01-01',
userId: null,
yesNoEnterpriseUser: null,
keyName: '',
key: '',
unionid:'',
currDate: formatTime(new Date()).split(" ")[0],
}
},
onLoad(opt) {
// 0 1
this.yesNoEnterpriseUser = opt.flag
this.userId = opt.userId
this.phone = opt.phone
this.unionid = opt.unionid ? opt.unionid :''
if ("null" != opt.userId) {
this.$API.completeInformation({
data: {
userId: this.userId
}
}).then((res) => {
var user = res.data
if (null != user && null != user.sex) {
this.genIndex = user.sex
}
if (null != user && null != user.birtyday) {
var useryear = user.birtyday.split("-")[0];
var usermonth = user.birtyday.split("-")[1];
var userday = user.birtyday.split("-")[2];
this.dateIndex = useryear + '-' + usermonth + '-' + userday
var yearUserIndex = 0;
var monthUserIndex = 0;
var dayUserIndex = 0;
const date = new Date()
for (let i = 1900; i <= date.getFullYear(); i++) {
if (i <= useryear) {
yearUserIndex++;
}
}
this.yearIndex = yearUserIndex;
for (let i = 1; i <= 12; i++) {
if (i < parseInt(usermonth)) {
monthUserIndex++;
}
}
for (let i = 1; i <= 31; i++) {
if (i < parseInt(userday)) {
dayUserIndex++;
}
}
//
this.value = [yearUserIndex - 1, monthUserIndex, dayUserIndex]
}
//
if (null != user && null != user.height) {
this.height = parseInt(user.height)
}
if (null != user && null != user.weight) {
this.weight = parseInt(user.weight)
}
})
} else {
this.value = [this.yearIndex - 1, 0, 0]
}
},
methods: {
heightChange(options){
console.log('options')
console.log(options)
this.height = options.detail.value;
},
weightChange(options){
console.log('options')
console.log(options)
this.weight = options.detail.value;
},
//
personalLogin() {
if (this.$preventClick()) return
var rsq = {
sex: this.genIndex,
birthday: this.dateIndex,
height: this.height,
weight: this.weight,
phone: this.phone,
type: 0
}
this.saveInfoAndLogin(rsq)
},
changeType() {
var that = this
//
this.$API.customerDropDownBox({
data: {}
}).then((res) => {
if (null != res.data) {
res.data.forEach(function(item, index, array) {
that.range.push({
value: item.userId,
text: item.nickName
})
})
}
this.$refs.join.open()
})
},
//
tabClick(index) {
this.genIndex = index
},
//
bindChange: function(e) {
this.value = e.detail.value
this.year = this.years[this.value[0]]
this.month = this.months[this.value[1]]
this.day = this.days[this.value[2]]
if (this.month < 10) {
this.month = 0 + "" + this.month
}
if (this.day < 10) {
this.day = 0 + "" + this.day
}
this.dateIndex = this.year + '-' + this.month + '-' + this.day
},
//
async next() {
// console.log(this.dateIndex);
// return
if (this.$preventClick()) return
var that = this
if (this.perfectIndex == 0) {
if (this.dateIndex > this.currDate) return toast('出生日期不能大于当前日期')
this.perfectIndex = 1
this.percent = 100
} else {
//
var rsq = {
userId: that.userId,
sex: that.genIndex,
birthday: that.dateIndex,
height: that.height,
weight: that.weight,
phone: that.phone
}
// 0 1
if (this.yesNoEnterpriseUser == 1) {
this.$refs.detection.open()
} else {
//
this.saveInfoAndLogin(rsq)
}
}
},
//sysUser/perfectTheInformation userId
//sysUser/perfectTheInformation userId
//sysUser/perfectTheInformation userId
async saveInfoAndLogin(data) {
console.log('登录...');
showLoading('请稍等...')
var that = this;
//let openId = await this.$store.dispatch(types.GET_OPEN_ID)
//data.openId = openId
data.realName = that.realName
data.customerId = '11';
if(that.unionid && that.unionid.length){
data.unionid = that.unionid;
}
console.log('data');
console.log(data);
let ret1 = this.$API.perfectTheInformationXcx({
data: data,
/*
userId: data.userId ? data.userId : '',
sex: data.genIndex ? data.genIndex : 0,
birthday: data.dateIndex ? data.dateIndex : '',
height: data.height ? data.height : '170',
weight: data.weight ? data.weight : '70',
phone: data.phone ? data.phone : '',
key: data.key ? data.key : '',
type: data.type ? data.type : 0,
realName: data.realName ? data.realName : '',
customerId: '11',
unionid: this.unionid
*/
}).then((res) => {
console.log('res');
console.log(res);
if (res.code != 200) {
return toast(res.msg)
}else{
hideLoading()
let userInfo = {
needToPerfect:0,
phonenumber:this.phone ? this.phone : '',
token:res.data && res.data.userId ? res.data.userId : '',
yesNoEnterpriseUser:"",
sysUser:res.data
}
uni.setStorageSync('userInfo',userInfo);
console.log('跳转到主界面');
console.log('getStorageSync');
console.log(uni.getStorageSync('userInfo'));
//
that.goHomePage();
}
})
},
goHomePage(){
uni.navigateTo({
url: '/pages/largeScreenEvaluation/evaluationIndex'
});
},
//
heightSelect(msg) {
setTimeout(() => {
this.height = msg;
}, 0)
},
//
weightSelect(msg) {
setTimeout(() => {
this.weight = msg;
}, 0)
},
//
closeDetection() {
this.$refs.detection.close()
},
//
closeJoin() {
this.$refs.join.close()
this.clearJoin()
},
//
clearJoin() {
this.enterprise = 0
this.keyName = ''
this.key = ''
},
//
changeEnterprise(e) {
console.log("e:", e);
},
//
joinNow() {
if (this.$preventClick()) return
if ('' == this.key) {
return toast('请填写激活码')
}
var rsq = {
sex: this.genIndex,
birthday: this.dateIndex,
height: this.height,
weight: this.weight,
phone: this.phone,
key: this.key,
type: 1
}
this.saveInfoAndLogin(rsq)
},
//
goHome() {
uni.reLaunch({
url: "/pages/tabBar/home/home"
})
},
},
}
</script>
<style lang="scss" scoped>
.pageBox{
background-color: #FFFFFF;
width: 100%;
height: 1920px;
}
.themColor {
color: $uni-color;
}
.fourSix {
font-size: 46rpx;
}
.contioner {
padding: 26rpx 80rpx;
color: #3F4040;
.img {
$wh: 160rpx;
width: $wh;
height: $wh;
margin-bottom: 24rpx;
}
.tagShaw {
width: 140rpx;
line-height: 40rpx;
text-align: center;
color: #FFFFFF;
background: $uni-color;
border-radius: 30rpx;
}
.picker-view {
text-align: center;
width: 100%;
margin: 0 auto;
height: 500px;
overflow: hidden;
font-size: 40rpx;
color: #909292;
margin-top: 20rpx;
.pickerSelected {
color: $uni-color;
}
.item {
//line-height: 100rpx;
//text-align: center;
line-height: 100px;
text-align: center;
}
}
.city-picker {
border-top: 2rpx solid $uni-color;
border-bottom: 2rpx solid $uni-color;
justify-content: center;
}
.btn {
position: fixed;
bottom: 48rpx;
width: 622rpx;
line-height: 84rpx;
text-align: center;
background: $uni-color;
border-radius: 50rpx;
color: #FFFFFF;
font-size: 28rpx;
margin-top: 80rpx;
}
.boyGirl {
$wh: 80rpx;
width: $wh;
height: $wh;
margin-top: 42rpx;
margin-bottom: 20rpx;
}
}
.detectionCard {
width: 600rpx;
background: #FFFFFF;
border-radius: 21rpx;
padding: 62rpx 30rpx;
position: relative;
.corporateConnections {
width: 310rpx;
height: 186rpx;
padding-bottom: 50rpx;
}
.btnTk {
margin: 0 auto;
width: 500rpx;
line-height: 103rpx;
text-align: center;
background: $uni-color;
border-radius: 10rpx;
color: #FFFFFF;
font-size: 41rpx;
margin-top: 20rpx;
}
.whiteShaw {
background: #FFFFFF;
color: $uni-color;
border: 3rpx solid #3AAFB8;
}
.closeempty {
position: absolute;
top: 41rpx;
right: 41rpx;
}
.tranform {
background: #FFFFFF;
color: #999999;
}
::v-deep .uni-select__input-placeholder {
font-size: 36rpx;
}
::v-deep .uni-select {
border-radius: 22rpx;
background: #F7F7F7;
height: 103rpx;
font-size: 36rpx;
color: #17191A;
font-weight: bold;
border: none;
padding-left: 40rpx;
}
.inputClass {
border-radius: 22rpx;
background: #F7F7F7;
height: 103rpx;
font-size: 36rpx;
color: #17191A;
font-weight: bold;
padding-left: 40rpx;
}
.rightTitle {
position: absolute;
right: 40rpx;
z-index: 10;
}
}
</style>

View File

@ -0,0 +1,525 @@
<template>
<view class="pageBox">
<image src="https://sharkbaby.yhy.ren/login/loginScrew.png" class="backImg"></image>
<image class="iconClass" src="https://sharkbaby.yhy.ren/login/loginIcon.png"></image>
<image class="midBox" src="https://sharkbaby.yhy.ren/login/loginBack.png"></image>
<view class="weixinBox" v-show="statusIndex == 0 ? true : false">
<image class="title" src="https://sharkbaby.yhy.ren/login/loginShark.png"></image>
<view class="titleOne">
<view class="titleOne1">使用微信扫一扫登录邀您参与</view>
<view class="titleOne2" @click="click(0)">健康风险评估</view>
</view>
<image class="backImg" src="https://sharkbaby.yhy.ren/login/loginSubtract.png"></image>
<view class="qrImg" id="codeBox" @click="updateWx()"></view>
</view>
<view class="phoneBox" v-show="statusIndex == 0 ? false : true">
<view class="title" v-show="statusIndex == 1 ? true : false">完善信息</view>
<image class="phomeIcon" src="https://sharkbaby.yhy.ren/login/loginShark.png" v-show="statusIndex == 1 ? false : true"></image>
<view class="titleOne" v-show="statusIndex == 1 ? false : true">
<view class="titleOne1">登陆你的账号邀您参与</view>
<view class="titleOne2" @click="click(0)">健康风险评估</view>
</view>
<view class="titleOneOther" v-show="statusIndex == 1 ? true : false">为保证您的账号安全请补全您的手机号码</view>
<view class="phoneClass">
<input class="phoneInput" type="number" maxlength="11" placeholder="输入手机号码" v-model="phone" />
<image class="phoneImg" @click="clearClick()" src="https://sharkbaby.yhy.ren/login/loginClear.png" v-show="phone == ''?false:true"></image>
</view>
<view class="codeClass">
<!-- 验证码输入框 -->
<input type="text" class="codeInput" maxlength="6" v-model="code" placeholder="输入验证码" />
<!-- 获取验证码 -->
<view class="codeGet" @click="isResend ? '' : getCode()">{{isResend?''+(time)+'s':'获取验证码'}}</view>
</view>
<view :class="['loginClass',phone == ''||code==''?'loginClass1':'loginClass2']" @click="phone == ''||code=='' ? '' : click(1)">立即登录</view>
</view>
<view class="login" @click="click(2)">{{(statusIndex == 0 || statusIndex == 1) ? '手机号登录' : '扫码登录'}}</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading,
debounce,
formatTime
// preventClick,
} from "/tool/index.js"
export default {
data() {
return {
needToPerfect:0,
//012
statusIndex:0,
phone: '', //
informationPhone: '', //
code: '', //
correctCode: '', //
time: 60, //
timer: null, //
isResend: false, //
unionid: '',//unionId
yesNoEnterpriseUser:'',
userId:'',
};
},
onLoad(options) {
console.log('login + options');
console.log(options);
var that = this;
setTimeout(() => {
that.updateWx();
}, 1500);
const wxCode = options.code;
console.log('wxCode');
console.log(wxCode);
if(wxCode){
this.wechatLogin(wxCode);
}
//that.wechatLogin('071rZ20005c8VS1ylN000G1TlD4rZ20-');
},
mounted(){
const script = document.createElement('script');
script.src = 'https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js';
document.body.appendChild(script);
},
methods:{
//
goInfo() {
clearInterval(this.timer)
this.isResend = false
let url = '/pages/login/ImproveInformation/ImproveInformation?flag=' + this.yesNoEnterpriseUser + "&userId=" +
this.userId + "&phone=" + this.informationPhone + "&unionid=" + (this.unionid ? this.unionid : '') + "&needToPerfect=" + this.needToPerfect + "&yesNoEnterpriseUser=" + this.yesNoEnterpriseUser ;
console.log('goInfo');
console.log(url);
uni.navigateTo({
url: url
});
},
wechatLogin(code){
var that = this;
this.$API.wechatScanCodeLogin({
data: {
code: code,
//code:'051fPQ000GexVS1W3s200X5SEb3fPQ0J'
}
}).then(res => {
console.log('wechatScanCodeLogin + res');
console.log(res);
if (res.code != 200) return uni.showToast({
title: res.msg || '登录失败,请联系管理员',
icon: 'none',
duration: 2000,
success: () => {}
})
let data = res.data
let userInfo = data.sysUser
var userId = null
if (null != userInfo) {
userId = userInfo.userId
}
// 0 1 2
let needToPerfect = data.needToPerfect
that.needToPerfect = needToPerfect;
// 0 1
that.yesNoEnterpriseUser = data.yesNoEnterpriseUser ? data.yesNoEnterpriseUser : '';
that.userId = userId;
if (needToPerfect == 0) {
uni.setStorageSync('userInfo',res.data);
console.log('跳转到主界面');
console.log('getStorageSync');
console.log(uni.getStorageSync('userInfo'));
that.goHome();
} else {
console.log(userId,"到完善资料1")
//
//
if(!res.data.sysUser.phonenumber){
that.unionid = res.data.sysUser.unionid ? res.data.sysUser.unionid : '';
that.statusIndex = 1;
}else{
that.informationPhone = res.data.sysUser.phonenumber;
that.goInfo();
}
}
})
},
clearClick(){
this.phone = '';
},
//
getCode() {
console.log('获取验证码');
if (this.$preventClick()) return
if (!this.phone){
return uni.showToast({
title: String('请输入手机号'),
icon: 'none',
duration: 2000
})
}
const reg = (
/^(13[0-9]|14[1579]|15[0-3,5-9]|16[6]|17[0123456789]|18[0-9]|19[0-9])\d{8}$/
);
if (!reg.test(this.phone)) return toast('手机号码格式不正确,请重新填写')
this.isResend = true
this.$API.sendTheVerificationCodeXcx({
data: {
phone: this.phone,
exist: 1,
}
}).then(res => {
console.log('res');
console.log(res);
if (res.code != 200) return toast(res.msg)
this.timeFunction()
this.correctCode = res.data
})
},
//
timeFunction() {
this.timer = setInterval(() => {
this.time--
if (this.time == 0) {
clearInterval(this.timer)
this.isResend = false
this.time = 60
}
}, 1000)
},
updateWx(){
console.log('WxLogin');
new WxLogin({
self_redirect: false,
id: "codeBox",
appid: "wx8a169dc73b528250",
scope: "snsapi_login",
//stylelite:1,
//redirect_uri: encodeURIComponent("http://localhost:8080/risk-assessment/#/pages/login/login/login"), // 线 /register
redirect_uri:encodeURIComponent("https://syjk.yhy.ren/risk-assessment/#/pages/login/login/login"),
state: "",
style: "black",
href: "https://sharkbaby.yhy.ren/login/wechat3.css",
});
},
//
async signIn() {
if (this.$preventClick()) return
var that = this
const reg = (
/^(13[0-9]|14[1579]|15[0-3,5-9]|16[6]|17[0123456789]|18[0-9]|19[0-9])\d{8}$/
);
if (!reg.test(this.phone)) return toast('手机号码格式不正确,请重新填写')
uni.showLoading({
title: String('登录中...'),
mask: true,
})
let ret1 = that.$API.xcxLogin({
data: {
phone: that.phone,
code: that.code,
unionid: that.statusIndex == 2 ? '':that.unionid,
openId:'',
},
}).then(async (res) => {
console.log('小程序登录');
console.log(res);
uni.hideLoading()
if (res.code != 200) return uni.showToast({
title: res.msg || '登录失败,请联系管理员',
icon: 'none',
duration: 2000,
success: () => {}
})
let data = res.data;
let userInfo = data.sysUser
var userId = null
if (null != userInfo) {
userId = userInfo.userId
}
// 0 1 2
let needToPerfect = data.needToPerfect
that.needToPerfect = needToPerfect;
// 0 1
that.yesNoEnterpriseUser = data.yesNoEnterpriseUser ? data.yesNoEnterpriseUser : '';
that.userId = userId;
if (needToPerfect == 0) {
uni.setStorageSync('userInfo',res.data);
console.log('跳转到主界面');
console.log('getStorageSync');
console.log(uni.getStorageSync('userInfo'));
that.goHome();
} else {
console.log(userId,"到完善资料2")
//
that.informationPhone = that.phone;
that.goInfo();
}
})
},
goHome(){
console.log('goHome');
clearInterval(this.timer)
this.isResend = false
uni.navigateTo({
url: '/pages/largeScreenEvaluation/evaluationIndex'
});
},
click(index){
//
if(index == 0){
console.log('健康风险评估');
}
//
if(index == 1){
console.log('立即登录');
this.signIn();
}
//
if(index == 2){
console.log('手机或扫码登录');
//012
let index = this.statusIndex;
if((index == 0 || index == 1)){
this.statusIndex = 2;
}
if(index == 2){
this.statusIndex = 0;
}
console.log(this.statusIndex);
}
},
},
}
</script>
<style lang="scss">
.pageBox{
background-color: #3AAFB8;
width: 100%;
height: 1920px;
display: flex;
flex-direction: column;
//justify-content: center;
align-items: center;
.backImg{
margin-top: 0;
width: 1080px;
height: 529px;
}
.iconClass{
margin-top: -349px;
width: 270px;
height: 270px;
}
.midBox{
margin-top: -37px;
width: 988px;
height: 1164px;
}
.weixinBox{
margin-top: -1164px;
width: 988px;
height: 1164px;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
.title{
margin-top: 204px;
width: 312px;
height: 73px;
}
.titleOne{
display: flex;
flex-direction: row;
margin-top: 28px;
height: 48px;
align-items: center;
.titleOne1{
color: #666666;
font-size: 34px;
}
.titleOne2{
color: #3AAFB8;
font-size: 34px;
}
}
.backImg{
margin-top: 105px;
width: 496px;
height: 496px;
}
.qrImg{
margin-top: -470px;
width: 520px;
height: 520px;
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
}
}
.phoneBox{
margin-top: -1164px;
width: 988px;
height: 1164px;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
.title{
margin-top: 204px;
height: 100px;
color: #17191A;
font-size: 80px;
line-height: 100px;
font-family: PingFang SC-Semibold;
}
.phomeIcon{
margin-top: 204px;
width: 312px;
height: 73px;
}
.titleOne{
display: flex;
flex-direction: row;
margin-top: 28px;
height: 48px;
color: #666666;
font-size: 34px;
.titleOne1{
color: #666666;
font-size: 34px;
}
.titleOne2{
color: #3AAFB8;
font-size: 34px;
}
}
.titleOneOther{
margin-top: 28px;
height: 48px;
color: #666666;
font-size: 34px;
}
.phoneClass{
padding-left: 60px;
margin-top: 100px;
width: 800px;
height: 140px;
border-radius: 70px 70px 70px 70px;
background-color: #F5F5F5;
display: flex;
flex-direction: row;
.phoneInput{
margin-left: 0;
margin-top: 0;
height: 140px;
line-height: 140px;
font-size: 36px;
}
.phoneImg{
margin-right: 60px;
margin-top: 40px;
margin-left: auto;
height: 60px;
width: 60px;
}
}
.codeClass{
margin-top: 60px;
width: 800px;
height: 140px;
border-radius: 70px 70px 70px 70px;
background-color: #F5F5F5;
display: flex;
flex-direction: row;
.codeInput{
margin-left: 60px;
margin-top: 0;
height: 140px;
line-height: 140px;
font-size: 36px;
}
.codeGet{
margin-right: 60px;
margin-top: 0;
margin-left: auto;
height: 140px;
line-height: 140px;
color: #3AAFB8;
font-size: 36px;
}
}
.loginClass{
margin-top: 60px;
width: 800px;
height: 140px;
border-radius: 70px 70px 70px 70px;
background-color: #3AAFB8;
line-height: 140px;
color: #FFFFFF;
font-size: 46px;
text-align: center;
}
.loginClass1{
opacity: 0.5;
}
.loginClass2{
opacity: 1;
}
}
.login{
margin-top: 65px;
width: 574px;
height: 170px;
border-radius: 85px 85px 85px 85px;
background-color: #89CFD4;
color: #FFFFFF;
font-size: 48px;
line-height: 170px;
text-align: center;
}
}
</style>

View File

@ -0,0 +1,318 @@
<template>
<view class="content">
<picker mode="date" fields="month" :value="endDate" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="pickerView">
<view class="pickerViewTitle">{{ date }}</view>
<view class="pickerViewImg"></view>
</view>
</picker>
<!-- <view class="dd" v-for="(item,index) in week" :key="index">{{item}}</view> -->
<view v-for="(item,index) in tddrfList" :key="index" v-show="!isNoData">
<view class="itemClass" @click="itemClick(index)">
<view class="itemClassLeft">
<view class="itemClassLeftTitle">{{getTimeStr(item.dataTime,0)}}</view>
<view class="itemClassLeftValue">{{getTimeStr(item.dataTime,1)}}</view>
</view>
<view class="itemClassLine"></view>
<view class="itemClassMid">
<view class="itemClassMidTitle">体重</view>
<view class="itemClassMidValue">{{item.weight ? item.weight : '--'}}kg</view>
</view>
<view class="itemClassMid">
<view class="itemClassMidTitle">BMI</view>
<view class="itemClassMidValue1">
<view class="itemClassMidValue11">{{item.bmi ? item.bmi : '--'}}</view>
<view class="itemClassMidValue1Status" :class="item.bmiResult == 1 ? 'stautsClass1' : item.bmiResult == 2 ? 'stautsClass2' : 'stautsClass3'">{{getStatusStr(item.bmiResult)}}</view>
</view>
</view>
</view>
</view>
<view class="nodataImgView" v-show="isNoData">
<image src="https://sharkbaby.yhy.ren/report/noData.png" class="nodataImg" ></image>
</view>
</view>
</template>
<script>
function getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
if (type === 'start') {
year = year - 1;
} else if (type === 'end') {
year = year;
}
month = month > 9 ? month : '0' + month;
let dateStr = year + '-' + month + '-01'
return dateStr;
}
function getDateStr() {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
month = month > 9 ? month : '0' + month;
let dateStr = year + '年' + month + '月';
return dateStr;
}
export default {
data() {
return {
isNoData:true,
date: getDateStr(),
startDate: getDate('start'),
endDate: getDate('end'),
userId:'15',
formeDate:[],//
tddrfList:[],
/*
tddrfList:[{
bmi:23.1,
bmiResult:1,
dataJson:'',
dataTime: "2024-09-09 13:55:41",
id: 14,
userId: 15,
weight: 45
},{
bmi:23.1,
bmiResult:1,
dataJson:'',
dataTime: "2024-09-09 13:55:41",
id: 14,
userId: 15,
weight: 45
}],//
*/
//https://sharkbaby.yhy.ren/report/noData.png
};
},
onLoad(options) {
var that = this;
that.userId = options.userId ? options.userId : '';
//that.userId = '7526';
this.$API.testReportList({
data: {
userId: that.userId,
}
}).then(res => {
if(res.code == 200){
that.formeDate = res.data;
that.updateUI();
}
});
},
methods:{
itemClick(index){
console.log(index);
var item = this.tddrfList[index];
var userId = item.userId ? item.userId : '';
var familyId = item.id ? item.id : '';
//http://192.171.1.22:9206/ytj-report/testReportDetails?userId=15&familyId=1
var url = '/pages/machineReport/reportDetail/reportDetail?userId=' + userId + '&familyId=' + familyId;
console.log(url);
uni.navigateTo({
url: url
});
},
updateUI(){
var that = this;
var timeStr = that.date.substring(0,4) + '-' + this.date.substring(5,7);
var isData = false;
for (let i in that.formeDate) {
console.log(that.formeDate[i]);
if(that.formeDate[i].monthDate == timeStr){
isData = true;
that.tddrfList = that.formeDate[i].tddrfList;
}
}
if(!isData){
that.tddrfList = [];
that.isNoData = true;
}else{
that.isNoData = false;
}
},
getStatusStr(index){
var statusStr = '正常';
if(index == 1){
statusStr = '正常';
}
if(index == 2){
statusStr = '偏低';
}
if(index == 3){
statusStr = '偏高';
}
return statusStr;
},
bindDateChange: function(e) {
this.date = e.detail.value.substring(0,4) + '年' + e.detail.value.substring(5,7) + '月';
this.updateUI();
},
//01
getTimeStr(timeStr,index){
var time = '';
//"2024-09-09 13:55:41"
if(timeStr.length >= 19){
if(index == 0){
time = timeStr.substring(5,7) + '月' + timeStr.substring(8,10) + '日';
}
if(index == 1){
time = timeStr.substring(11,16);
}
}
return time;
},
},
}
</script>
<style lang="scss">
.stautsClass1{
background-color: #00D1A9;
}
.stautsClass2{
background-color: #00B2FF;
}
.stautsClass3{
background-color: #FFC300;
}
.content{
display: flex;
flex-direction: column;
width: 100%;
min-height: 100vh;
background-color: #F4F5F7;
.pickerView{
margin-top: 0;
margin-left: 28rpx;
height: 80rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-items: center;
.pickerViewTitle{
color: #3F4040;
font-size: 28rpx;
line-height: 80rpx;
font-family: PingFangSC-Medium, sans-serif;
}
.pickerViewImg{
margin-left: 10rpx;
width:0;
height:0;
border-left:12rpx solid transparent;
border-right:12rpx solid transparent;
border-top:16rpx #909292 solid;
}
}
.nodataImgView{
justify-content: center;
align-items: center;
display: flex;
height: 100vh;
.nodataImg{
height: 515rpx;
width: 515rpx;
}
}
.itemClass{
margin-top: 20rpx;
margin-left: 24rpx;
margin-right: 24rpx;
width: auto;
height: 140rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
background-color: #FFFFFF;
display: flex;
flex-direction: row;
.itemClassLeft{
display: flex;
flex-direction: column;
width: 33%;
height: 140rpx;
align-items: center;
justify-items: center;
.itemClassLeftTitle{
margin-top: 30rpx;
font-size: 28rpx;
color: #3F4040;
font-family: PingFangSC-Medium, sans-serif;
}
.itemClassLeftValue{
margin-top: 10rpx;
font-size: 26rpx;
color: #909292;
font-family: PingFangSC-Regular, sans-serif;
}
}
.itemClassLine{
margin-top: 34rpx;
height: 72rpx;
width: 1rpx;
background-color: #ECECEC;
}
.itemClassMid{
display: flex;
flex-direction: column;
width: 33%;
height: 140rpx;
align-items: center;
justify-items: center;
.itemClassMidTitle{
margin-top: 30rpx;
font-size: 22rpx;
color: #909292;
font-family: PingFangSC-Regular, sans-serif;
}
.itemClassMidValue{
margin-top: 10rpx;
font-size: 26rpx;
color: #3F4040;
font-family: PingFangSC-Medium, sans-serif;
}
.itemClassMidValue1{
margin-top: 10rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-items: center;
.itemClassMidValue11{
font-size: 26rpx;
color: #3F4040;
font-family: PingFangSC-Medium, sans-serif;
}
.itemClassMidValue1Status{
margin-top: 4rpx;
margin-left: 8rpx;
width: 54rpx;
height: 28rpx;
line-height: 28rpx;
align-content: center;
text-align: center;
border-radius: 14rpx 14rpx 14rpx 0;
font-size: 18rpx;
color: #FFFFFF;
}
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -235,9 +235,9 @@
}
.drawerLogo {
width: 236rpx;
height: 266rpx;
margin-top: 40rpx;
width: 100rpx;
height: 100rpx;
margin-top: 47rpx;
}
.wenTitle {

View File

@ -102,7 +102,7 @@
<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>
<image :src="loginImg" class="drawerLogo"></image>
</view>
<view class="text-center wenTitle">温馨提示</view>
<view class="bottomTitle">
@ -166,6 +166,7 @@
monitor: false,
currentFive: null, //
toiceList: [], //
loginImg:"",//logo
}
},
onLoad(opt) {
@ -180,6 +181,15 @@
this.nickname = data.name //
this.userProfile = data.headSculpture //
this.getPlanInfo()
this.$API.getCustomerInfoByUserId({
data: {
userId: data.userId
}
}).then(res => {
if (res.data && res.data.aliasName != "") {
this.loginImg = res.data.avatar ? res.data.avatar : 'https://sharkbaby.yhy.ren/8f60e9660eb4455f84c8de2285611982.png'
}
})
},
methods: {
//

View File

@ -2,6 +2,35 @@ page{
background: #F3F4F6;
}
.pageBox{
.back-home-btn {
width: 136px;
height: 76px;
position: fixed;
right: 0;
top: 1400px;
z-index: 666;
.back-img {
width: 136px;
height: 76px;
}
}
.back-btn{
position: fixed;
bottom: 120rpx;
width: calc(100% - 64rpx);
height: 80rpx;
background: rgba(255,255,255,1);
border-radius: 40px 40px 40px 40px;
border: 2px solid #FFFFFF;
font-weight: 500;
font-size: 36rpx;
color: #333333;
line-height: 80rpx;
text-align: center;
font-style: normal;
text-transform: none;
}
.themColor{
color: #3AAFB8;
}
@ -43,8 +72,8 @@ page{
margin-top: 12rpx;
}
.stagBtn{
width: calc(406rpx - 278rpx);
padding: 10rpx 138rpx 10rpx 140rpx;
// width: calc(406rpx - 278rpx);
padding: 10rpx 110rpx 10rpx 120rpx;
border-radius: 50rpx;
border: 2rpx solid $uni-color;
background: $uni-color;

View File

@ -33,7 +33,7 @@
</view>
</view>
</view>
<scroll-view scroll-y :style="{'height':srcollHeight}" :scroll-top="scrollView" @scroll="scroll"
<scroll-view scroll-y :style="{'height':srcollHeight,'padding-bottom':isBtn == 'true'?'140px':''}" :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">
@ -88,6 +88,7 @@
</block>
<view style="width: 100%;height: 100rpx;"></view>
</scroll-view>
<view class="back-btn" v-if="isBtn == 'true'" @click="onBackPage">返回上一页</view>
<view class="bottomBtn" @tap="submit" v-if="isNext">生成评估报告</view>
<!-- 返回底部 -->
<view class="backBottom" @tap="goBottom" v-show="scrollGun<600&&isBottom">
@ -95,6 +96,9 @@
<view class="text-sm themColor">返回底部</view>
</view>
</view>
<view class="back-home-btn" @click="onGoHome" v-if="isBtn == 'true'">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</view>
</view>
</template>
@ -134,10 +138,12 @@
scrollView: 0, //
scrollGun: 0, //
fixedHeight: 100000, //
isBtn:"",//
}
},
onLoad(options) {
this.isBtn = options.isBtn?options.isBtn:""
let data = JSON.parse(decodeURIComponent(options.params))
if (data.token) {
this.userParameters.openId = data.openId //
@ -158,6 +164,17 @@
}
},
methods: {
onBackPage() {
uni.navigateBack({
delta: 1
})
},
//
onGoHome() {
uni.reLaunch({
url: '/pages/largeScreenEvaluation/evaluationIndex'
})
},
//
Height() {
const query = uni.createSelectorQuery().in(this);
@ -660,6 +677,9 @@
mbti: that.jieguo, //15
}
}).then((res) => {
if(res.data && res.data > 0){
toast(res.data + "积分已到账")
}
hideLoading()
let a = {
userParameters: JSON.stringify(this.userParameters),
@ -668,9 +688,11 @@
id: this.id,
dicCode: this.dictNo,
}
uni.redirectTo({
url: '/pages/psychological-assessment/result/result?params=' + JSON.stringify(a)
})
setTimeout(() => {
uni.redirectTo({
url: '/pages/psychological-assessment/result/result?params=' + JSON.stringify(a) +"&isBtn=" + this.isBtn
})
}, 2000)
})
},
scroll(e) {

View File

@ -1,7 +1,36 @@
.fontColor {
color: #17191A;
}
.back-home-btn {
width: 136px;
height: 76px;
position: fixed;
right: 0;
top: 1400px;
z-index: 666;
.back-img {
width: 136px;
height: 76px;
}
}
.back-btn {
position: fixed;
bottom: 0rpx;
width: 100%;
height: 80rpx;
background: rgba(255, 255, 255, 1);
border-radius: 40px 40px 40px 40px;
border: 2px solid #FFFFFF;
font-weight: 500;
font-size: 36rpx;
color: #333333;
line-height: 80rpx;
text-align: center;
font-style: normal;
text-transform: none;
z-index: 666;
}
.grey {
color: #909292;
}

View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="bgBackground"></view>
<view class="contioner" v-if="isLoading">
<view class="contioner" v-if="isLoading" :style="isBtn == 'true'?'padding-bottom: 150px':''">
<view class="flex-align">
<view>
<view class="flex-contion">
@ -165,6 +165,10 @@
</block>
</block>
</view>
<view class="back-btn" v-if="isBtn == 'true'" @click="onBackPage">返回上一页</view>
<view class="back-home-btn" v-if="isBtn == 'true'" @click="onGoHome">
<image src="https://shayu5qny.yhy.ren/shoye_back.png" class="back-img"></image>
</view>
</view>
</template>
@ -178,6 +182,7 @@
export default {
data() {
return {
isBtn:false,
isLoading: false,
todos:['','','','','','','','','','','','','','','',''],
userParameters: {}, //
@ -225,6 +230,8 @@
}
},
onLoad(options) {
console.log("options",options)
this.isBtn = options.isBtn?options.isBtn:false
let data = JSON.parse(decodeURIComponent(options.params))
if (data.token) {
this.userParameters.openId = data.openId //
@ -246,6 +253,16 @@
this.getInfo()
},
methods: {
onGoHome(){
uni.reLaunch({
url: '/pages/largeScreenEvaluation/evaluationIndex'
})
},
onBackPage() {
uni.navigateBack({
delta: 1
})
},
async getInfo() {
showLoading('加载中...')
let that = this

View File

@ -34,11 +34,15 @@
content: this.content
}
}).then(res => {
toast('保存成功')
if (res.code == 200) {
if(res.data && res.data > 0 ){
toast(res.data + "积分已到账")
}else{
toast('保存成功')
}
setTimeout(() => {
uni.navigateBack()
}, 500)
}, 2000)
}
})
},

View File

@ -23,7 +23,7 @@
</view>
<view class="cut"></view>
<view class="flex-align">
<view>烟龄</view>
<view style="min-width: 70rpx;">烟龄</view>
<view class="flex-contion">
<input v-model="smokerAge" placeholder="请输入" type="number" class="text-df text-right" />
<text class="greyColor marginLeft-xs">()</text>
@ -31,39 +31,39 @@
</view>
<view class="cut"></view>
<view class="flex-align">
<view>吸烟量</view>
<view style="min-width: 100rpx;">吸烟量</view>
<view class="flex-contion">
<input v-model="smokingVolume" placeholder="请输入" type="number" class="text-df text-right" />
<text class="greyColor marginLeft-xs">(/)</text>
<text class="greyColor marginLeft-xs" style="min-width: 86rpx;">(/)</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>烟价</view>
<view style="min-width: 70rpx;">烟价</view>
<view class="flex-contion">
<input v-model="cigarettePrice" placeholder="请输入" type="digit" class="text-df text-right" />
<text class="greyColor marginLeft-xs">(20/)</text>
<text class="greyColor marginLeft-xs" style="min-width: 118rpx;">(20/)</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>焦油含量</view>
<view style="min-width: 120rpx;">焦油含量</view>
<view class="flex-contion">
<input v-model="tar" placeholder="请输入" type="digit" class="text-df text-right" />
<text class="greyColor marginLeft-xs">(毫克/)</text>
<text class="greyColor marginLeft-xs" style="min-width: 116rpx;">(毫克/)</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>吸一支烟的时间</view>
<view style="min-width: 200rpx;">吸一支烟的时间</view>
<view class="flex-contion">
<input v-model="smokerTime" placeholder="请输入" type="digit" class="text-df text-right" />
<text class="greyColor marginLeft-xs">(分钟)</text>
<text class="greyColor marginLeft-xs" style="min-width: 76rpx;">(分钟)</text>
</view>
</view>
<view class="cut"></view>
<view class="flex-align">
<view>曾尝试戒烟几次</view>
<view style="min-width: 200rpx;">曾尝试戒烟几次</view>
<view class="flex-contion">
<input v-model="smokerNum" placeholder="请输入" type="number" class="text-df text-right" />
<text class="greyColor marginLeft-xs">()</text>
@ -156,10 +156,16 @@
this.$SMOKE.userSmokingAdd({
data,
}).then(res => {
toast('保存成功')
setTimeout(() => {
uni.navigateBack()
}, 500)
if(res.code == 200){
if(res.data && res.data > 0){
toast(res.data + '积分已到账')
}else{
toast('保存成功')
}
setTimeout(() => {
uni.navigateBack()
}, 2000)
}
})
},
//

View File

@ -108,14 +108,22 @@
}).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
}
let score = res.data.level
if (score=='较差'){
index = 0
} else if (score=='一般'){
index = 1
} else {
index = 2
}
// 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) {

View File

@ -724,9 +724,14 @@
})
hideLoading()
if (reg.code == 200) {
uni.redirectTo({
url: '/pages/scanCodeEvaluation/health-risks/basicReport/basicReport?age=' + this.age + '&name=' + this.userName
})
if(reg.data.points && reg.data.points > 0){
toast(reg.data.points + "积分已到账")
}
setTimeout(() => {
uni.redirectTo({
url: '/pages/scanCodeEvaluation/health-risks/basicReport/basicReport?age=' + this.age + '&name=' + this.userName
})
}, 2000)
} else {
toast(reg.msg ? reg.msg : '生成报告异常')
}
@ -770,6 +775,11 @@
subType: '0', //1 0
}
})
if(ret.code == 200){
if(ret.data.points && ret.data.points > 0){
toast(ret.data.points + "积分已到账")
}
}
},
//
async continueChange() {

View File

@ -299,13 +299,17 @@
}).then(res => {
if (res.code == 200) {
hideLoading()
toast('保存成功')
if(res.data && res.data > 0){
toast(res.data + "积分已到账")
}else{
toast('保存成功')
}
//
setTimeout(() => {
uni.reLaunch({
url: '/pages/selfRegistration/dailyTasks/dailyTasks'
})
}, 1000)
}, 2000)
}
})
},

View File

@ -1,109 +1,141 @@
<template>
<view class="pageBox">
<view class="contioner">
<textarea placeholder="写下你此刻的想法吧" class="marginTop color textClass" maxlength="600"
placeholder-style="color:#CDCDCD" v-model="content" />
<view class="content-container">
<view class="contioner">
<textarea placeholder="写下你此刻的想法吧" class="marginTop color textClass" maxlength="500"
placeholder-style="color:#CDCDCD;" @input="onInputDaily" v-model="content" />
</view>
<view class="text_number"><text>{{ fontNum }}</text>/500</view>
</view>
<view class="placeholder"></view>
<view class="btnList">
<view class="btn" @tap="submit">确认</view>
<view class="btn" @tap="submit">保存日记</view>
</view>
</view>
</template>
<script>
import {
toast
} from "/tool/index.js"
export default {
data() {
return {
content: '', //
}
},
methods: {
submit() {
if (this.content == '') return toast('请先填写')
if (this.$preventClick()) return
this.$REGIST.saveDiaryList({
data: {
planDiary: this.content
}
}).then(res => {
toast('保存成功')
if (res.code == 200) {
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //
prevPage._data.pageShow = false
setTimeout(() => {
uni.navigateBack()
}, 1000)
}
})
},
import {
toast
} from "/tool/index.js"
export default {
data() {
return {
content: '', //
fontNum: 0,
}
},
methods: {
onInputDaily(val){
this.fontNum = val.detail.cursor
},
submit() {
if (this.content == '') return toast('请先填写')
if (this.$preventClick()) return
this.$REGIST.saveDiaryList({
data: {
planDiary: this.content
}
}).then(res => {
if (res.code == 200) {
if (res.data && res.data > 0) {
toast(res.data + '积分已到账')
} else {
toast('保存成功')
}
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //
prevPage._data.pageShow = false
setTimeout(() => {
uni.navigateBack()
}, 2000)
}
})
},
}
}
</script>
<style>
page {
background: #fff;
}
page {
background: #fff;
}
</style>
<style scoped lang="scss">
.contioner {
padding: 48rpx 32rpx;
.content-container {
width: 100%;
height: 600rpx;
position: relative;
.inputClass {
width: 100%;
height: 80rpx;
line-height: 80rpx;
border-bottom: 1rpx solid #EEE;
color: #17191A;
}
.text_number {
position: absolute;
bottom: 86rpx;
right: 60rpx;
font-weight: 400;
font-size: 22rpx;
color: #3F4040;
line-height: 28rpx;
}
}
.textClass {
width: 100%;
height: 800rpx;
}
.contioner {
padding: 48rpx 32rpx;
.color {
color: #3F4040;
font-size: 28rpx;
}
.inputClass {
width: 100%;
height: 80rpx;
line-height: 80rpx;
border-bottom: 1rpx solid #EEE;
color: #17191A;
}
.placeholder {
height: 100rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.textClass {
box-sizing: border-box;
padding: 32rpx;
width: 100%;
height: 456rpx;
background: #F6F7FB;
position: relative;
}
.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;
}
.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

@ -87,6 +87,13 @@
border: 2rpx solid $uni-color;
}
}
.tipsCard{
margin-top: 30rpx;
background: #fff;
padding: 20rpx 40rpx;
color: #112950;
border-radius: 20rpx;
}
}
.whiteBg{
border: 2rpx solid $uni-color;

View File

@ -103,8 +103,15 @@
</view>
</block>
</block>
<block v-else>
<!--<block v-else>
<nothing :paddingTop="30"></nothing>
</block> -->
<block v-else>
<view class="tipsCard" style="letter-spacing:6rpx;">
<view class="">当前暂无自主计划任务</view>
<view style="text-indent: 2rem;">1.通过点击首页生活方式评估后系统将根据您的评估问卷自动生成个性化的自主健康计划</view>
<view style="text-indent: 2rem;">2.也可自行点击右上角新增任务来生成自主健康计划</view>
</view>
</block>
</view>
<view class="placeholder"></view>
@ -198,6 +205,12 @@
finishStatus: 1,
id: item.id
}
}).then(res=>{
if(res.code == 200){
if(res.data && res.data > 0){
toast(res.data + "积分已到账")
}
}
})
},
//

View File

@ -104,8 +104,12 @@
</view>
<view class="cut" v-if="index<pupupList.length-1"></view>
</block>
<view class="btn-group">
<view class="btn" @tap="maskClick">确认</view>
</view>
</scroll-view>
</view>
</view>
</uni-popup>
</view>
</template>
@ -154,7 +158,8 @@
console.log(option, "option")
this.$REGIST.queryMattersName({
data:{
queryDate:option.queryDate//
queryDate:option.queryDate,//
type:option.type == 2 ? option.type : 1
}
}).then(res => {
res.data.map(item => {
@ -174,7 +179,7 @@
},
//
maskClick() {
console.log()
this.$refs.pupupCenter.close()
let a = []
this.pupupList.map(item => {
if (item.hidden) {
@ -245,6 +250,12 @@
}).then(res => {
if (res.code == 200) {
toast('保存成功')
jWeixin.miniProgram ? jWeixin.miniProgram.navigateBack() : jWeixin.navigateBack();
if (window.Android) {
window.Android.goback()
} else if (window.webkit) {
window.webkit.messageHandlers.goback.postMessage();
}
setTimeout(()=>{
uni.navigateBack()
},1000)
@ -339,6 +350,7 @@
}
.pupupCard {
position: relative;
width: 496rpx;
height: 700rpx;
padding: 32rpx;
@ -371,5 +383,25 @@
width: $wh;
height: $wh;
}
.btn-group{
position: absolute;
bottom: 5rpx;
left: 0;
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
.btn{
height: 80rpx;
width: 80%;
text-align: center;
line-height: 80rpx;
background: #3AAFB8;
border-radius: 44rpx 44rpx 44rpx 44rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@ -84,6 +84,20 @@
{{List[12].typeName}}
</view>
</view>
<view class="one fourteen flex-conter" @tap="select(13)">
<image :src="List[13].checked?'../static/images/bluePao.png':'../static/images/whitePao.png'"
class="bgImg"></image>
<view :class="['text-sm title text-bold',List[13].checked?'oneColor':'twoColor']">
{{List[13].typeName}}
</view>
</view>
<view class="one fifteen flex-conter" @tap="select(14)">
<image :src="List[14].checked?'../static/images/bluePao.png':'../static/images/whitePao.png'"
class="bgImg"></image>
<view :class="['text-sm title text-bold',List[14].checked?'oneColor':'twoColor']">
{{List[14].typeName}}
</view>
</view>
</view>
<view class="flex-conter">
<view class="btnClass" @tap="goPage">立即行动<text v-if="btnLength!=0">已选{{btnLength}}</text></view>
@ -131,6 +145,16 @@
},
//
select(index) {
if(index == 0){
this.List[1].checked = false
this.List[2].checked = false
}else if(index == 1){
this.List[0].checked = false
this.List[2].checked = false
}else if(index == 2){
this.List[0].checked = false
this.List[1].checked = false
}
this.List[index].checked = !this.List[index].checked
this.getEcho()
},

View File

@ -1,8 +1,40 @@
<template>
<view class="pageBox" :class="{'show':pageShow}">
<view class="contioner" v-if="List.length>0">
<block v-for="(item,index) in List" :key="index">
<view class="card marginTop">
<view class="pageBox" :class="{ 'show': pageShow }">
<view class="plan-diary-container">
<view class="title-group">
<view class="title">时间</view>
<view class="time-picker">
<view class="times">
<picker class="pickerDate" fields="month" mode="date" :value="date" @change="bindDateChange">
<view class="uni-input">{{ year }}{{ month }}</view>
</picker>
</view>
<image class="icon" src="https://shayu5qny.yhy.ren/down_one.png"></image>
</view>
</view>
<view class="contioner" v-if="List.length > 0">
<block v-for="(item, index) in List" :key="index">
<view class="times">{{ item.date }}</view>
<view ref="contentRef" class="content" v-for="(item1, index1) in item.list" :key="index1">
<view class="in_right">
<!-- <view class="round"></view> -->
<image src="https://sharkbaby.yhy.ren/circleIcon.png" class="round"></image>
<view class="line"></view>
</view>
<view class="in_left">
<view class="left_title_group">
<view class="left_title">{{ item1.createDate.substring(11, 16) }}</view>
<view class="delete_btn" @tap="shanchu(item1.id)">删除</view>
</view>
<view class="card_group">
<view style="width: 80rpx;height: 80rpx;">
<image class="diary_icon" mode="" src="https://sharkbaby.yhy.ren/diary_icon.png"></image>
</view>
<view class="text_descri">{{ item1.planDiary }}</view>
</view>
</view>
</view>
<!-- <view class="card marginTop">
<view class="text-df title">{{item.planDiary}}</view>
<view class="cut"></view>
<view class="flex-align">
@ -12,146 +44,310 @@
<text>删除</text>
</view>
</view>
</view>
</block>
<view style="width: 100%;height: 240rpx;"></view>
</view>
<nothing v-else></nothing>
<view class="bottomCard flex-contion" @tap="goComment">
<input class="inputClass" placeholder="请输入消息内容..." placeholder-style="color:#909292;font-size:28rpx" />
<image src="https://shayu5qny.yhy.ren/selfRegistration/sends.png" class="sends"></image>
</view> -->
</block>
<view style="width: 100%;height: 240rpx;"></view>
</view>
<nothing v-else></nothing>
<view class="bottomCard flex-contion" @tap="goComment">
<input class="inputClass" placeholder="请输入消息内容..." placeholder-style="color:#909292;font-size:28rpx" />
<image src="https://shayu5qny.yhy.ren/selfRegistration/sends.png" class="sends"></image>
</view>
</view>
</view>
</template>
<script>
import {
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
pageShow: false,
List: [],
pageNum: 1,
}
},
onShow() {
this.getInfo()
},
onReachBottom() {
this.pageNum++
import {
formatTime,
toast,
showLoading,
hideLoading
} from "/tool/index.js"
export default {
data() {
return {
//
date: "",
year: "",
month: "",
pageShow: false,
List: [],
pageNum: 1,
}
},
onLoad(option) {
console.log("option", option)
},
onShow() {
let date = formatTime(new Date()).split(" ")[0]
this.date = date.substring(0, 4) + '-' + date.substring(5, 7)
this.year = date.substring(0, 4)
this.month = date.substring(5, 7)
this.getInfo()
},
// onReachBottom() {
// this.pageNum++
// this.$REGIST.queryDiaryList({
// data: {
// pageNum: this.pageNum,
// pageSize: 10
// }
// }).then(res => {
// this.List = this.List.length < res.total ? this.List.concat(res.rows) : this.List
// })
// },
methods: {
getInfo() {
this.$REGIST.queryDiaryList({
data: {
pageNum: this.pageNum,
pageSize: 10
queryDate: this.date
}
}).then(res => {
this.List = this.List.length < res.total ? this.List.concat(res.rows) : this.List
this.List = res.data
this.pageShow = true
})
},
methods: {
getInfo() {
this.$REGIST.queryDiaryList().then(res => {
this.List = res.rows
this.pageShow = true
})
},
goComment() {
uni.navigateTo({
url: '/pages/selfRegistration/content/content'
})
},
shanchu(id) {
toast('删除成功')
this.$REGIST.delDiary({
data: {
id: id
}
}).then(res => {
if (res.code == 200) {
this.getInfo()
}
})
},
}
goComment() {
uni.navigateTo({
url: '/pages/selfRegistration/content/content'
})
},
shanchu(id) {
toast('删除成功')
this.$REGIST.delDiary({
data: {
id: id
}
}).then(res => {
if (res.code == 200) {
this.getInfo()
}
})
},
bindDateChange(e) {
this.year = e.detail.value.substring(0, 4)
this.month = e.detail.value.substring(5, 7)
this.date = e.detail.value
this.pageNum = 1
this.pageSize = 10
this.getInfo()
},
}
}
</script>
<style scoped lang="scss">
.pageBox {
opacity: 0;
transition: opacity ease .3s;
.pageBox {
opacity: 0;
transition: opacity ease .3s;
&.show {
opacity: 1;
}
.plan-diary-container {
background: #FFF;
min-height: 100vh;
}
.contioner {
padding: 8rpx 32rpx;
&.show {
opacity: 1;
}
}
.card {
padding: 32rpx 24rpx;
border-radius: 20rpx;
background: #FFF;
.title-group {
padding: 32rpx 24rpx 0rpx 24rpx;
display: flex;
flex-direction: row;
align-content: center;
justify-content: space-between;
.title {
margin-top: 16rpx;
letter-spacing: 6rpx;
line-height: 48rpx;
color: #3F4040;
overflow: hidden;
word-wrap: break-word;
.title {
font-weight: 400;
font-size: 28rpx;
color: #666666;
line-height: 28rpx;
}
.time-picker {
display: flex;
flex-direction: row;
align-content: center;
justify-content: flex-start;
margin-bottom: 24rpx;
.times {
font-weight: 500;
font-size: 28rpx;
color: #3f4040;
line-height: 28rpx;
}
.icon {
margin-left: 10rpx;
width: 24rpx;
height: 24rpx;
}
}
}
.contioner {
padding: 8rpx 32rpx;
.times {
font-weight: 500;
font-size: 28rpx;
color: #17191A;
line-height: 28rpx;
margin-bottom: 28rpx;
}
.content {
// margin-top: 28rpx;
width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
position: relative;
.in_right {
margin-right: 30rpx;
height: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 6rpx;
.round {
width: 24rpx;
height: 24rpx;
// background: #3AAFB8;
// border-radius: 50%;
}
.cut {
width: 100%;
height: 1rpx;
background: #eee;
margin: 24rpx 0 33rpx;
.line {
margin-top: 4rpx;
height: calc(100% - 25rpx);
border: 1rpx dotted #3AAFB8;
position: absolute;
top: 10rpx;
bottom: 10rpx;
left: 10rpx;
}
}
.in_left {
width: 100%;
box-sizing: border-box;
.left_title_group {
display: flex;
flex-direction: row;
align-items: center;
.left_title {
font-weight: 400;
font-size: 24rpx;
color: #666666;
line-height: 24rpx;
}
.delete_btn {
margin-left: 24rpx;
font-weight: 400;
font-size: 24rpx;
color: #909292;
line-height: 24rpx;
}
}
.greyColor {
color: #909292;
}
.card_group {
margin-top: 24rpx;
margin-bottom: 20rpx;
padding: 32rpx;
// width: 100%;
background: #F6F7FB;
border-radius: 24rpx 24rpx 24rpx 24rpx;
display: flex;
flex-direction: row;
align-items: flex-start;
.tagWidth {
color: #FF4545;
font-size: 24rpx;
width: 118rpx;
height: 50rpx;
border-radius: 8rpx;
border: 2rpx solid rgba(255, 69, 69, 0.40);
.diary_icon {
width: 80rpx;
height: 80rpx;
}
.text_descri {
margin-left: 24rpx;
font-weight: 400;
font-size: 26rpx;
color: #3F4040;
line-height: 36rpx;
}
}
}
}
.bottomCard {
position: fixed;
bottom: 0;
left: 0;
width: calc(100vw - 56rpx);
padding: 32rpx 28rpx 96rpx 28rpx;
border-radius: 16rpx 16rpx 0 0;
background: #FAFAFA;
box-shadow: 0 -2rpx 8rpx 0 rgba(0, 0, 0, 0.06);
// .card {
// padding: 32rpx 24rpx;
// border-radius: 20rpx;
// background: #FFF;
.sends {
$wh: 56rpx;
width: $wh;
height: $wh;
margin-left: 12rpx;
}
// .title {
// margin-top: 16rpx;
// letter-spacing: 6rpx;
// line-height: 48rpx;
// color: #3F4040;
// overflow: hidden;
// word-wrap: break-word;
// }
.inputClass {
flex: 1;
height: 72rpx;
padding-left: 20rpx;
background: #FFF;
border-radius: 16rpx;
}
// .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);
// }
// }
}
.bottomCard {
position: fixed;
bottom: 0;
left: 0;
width: calc(100vw - 56rpx);
padding: 32rpx 28rpx 96rpx 28rpx;
border-radius: 16rpx 16rpx 0 0;
background: #FAFAFA;
box-shadow: 0 -2rpx 8rpx 0 rgba(0, 0, 0, 0.06);
.sends {
$wh: 56rpx;
width: $wh;
height: $wh;
margin-left: 12rpx;
}
.inputClass {
flex: 1;
height: 72rpx;
padding-left: 20rpx;
background: #FFF;
border-radius: 16rpx;
}
}
</style>

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