|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import classnames from "classnames";
|
|
|
|
|
import { Component } from "react";
|
|
|
|
|
import React, { Component, LegacyRef } from "react";
|
|
|
|
|
|
|
|
|
|
import { Block, View, Image, Text, Picker, Switch } from "@tarojs/components";
|
|
|
|
|
|
|
|
|
|
@ -9,7 +9,7 @@ import PopupAlert from "@/components/popup/popup-alert";
|
|
|
|
|
import PopupDrawer from "@/components/popup/popup-drawer";
|
|
|
|
|
import NursingPlanReport from "../NursingPlanReport";
|
|
|
|
|
|
|
|
|
|
import { go } from "../../utils/traoAPI";
|
|
|
|
|
import { go, goJump } from "../../utils/traoAPI";
|
|
|
|
|
|
|
|
|
|
import "./nursing.less";
|
|
|
|
|
|
|
|
|
|
@ -26,8 +26,15 @@ import {
|
|
|
|
|
|
|
|
|
|
import { GetIsAttentionOfficialAccount } from "@/utils/Interface";
|
|
|
|
|
import Taro from "@tarojs/taro";
|
|
|
|
|
import _ from "lodash";
|
|
|
|
|
import { Popup, DatetimePicker } from "@antmjs/vantui";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let MembraneClothOne =['DiyFacial','DiyWater','WaterLightEssence','ShapeBeautyEssence']
|
|
|
|
|
let MembraneClothTwo =['PreMakeup_Custom','EyeCarving_Custom']
|
|
|
|
|
|
|
|
|
|
export default class Nursing extends Component<any, any> {
|
|
|
|
|
PickerTimeProp: any;
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
@ -49,31 +56,37 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
status: 0, //今日护理任务是否已完成 0未完成 1已完成
|
|
|
|
|
myPlanStep: [], // 当天护理步骤
|
|
|
|
|
myPlanTaskList: [], // 当天护理计划任务
|
|
|
|
|
isPlanSchedule: false, // 护理步骤的弹窗
|
|
|
|
|
isPlanSchedule: null, // 护理步骤的弹窗
|
|
|
|
|
usePlanScheduleShow: 1, // 护理前弹窗是否展示
|
|
|
|
|
prepareData: null, // 准备参加的护理数据
|
|
|
|
|
|
|
|
|
|
isAccountShow: false, //公众号引导弹窗
|
|
|
|
|
isAccountShow: null, //公众号引导弹窗
|
|
|
|
|
nextTime: "", // 下次护理时间
|
|
|
|
|
myPlanNextDay: "6月25日", // 下次护理日期
|
|
|
|
|
myPlanNextDay: "", // 下次护理日期
|
|
|
|
|
myPlanNextTime: "20:00", // 下次护理提醒的时间
|
|
|
|
|
isWarn: false, // 是否开启下次护理提醒
|
|
|
|
|
myPlanNextTimePicker: "", // 当前选中的时间
|
|
|
|
|
isWarn: null, // 是否开启下次护理提醒
|
|
|
|
|
showDatePicker: false, // 时间选择器是否禁用
|
|
|
|
|
/** 我的护理 END */
|
|
|
|
|
|
|
|
|
|
/** 领奖相关 */
|
|
|
|
|
isRewardEnd: false, // 护理计划是否已结束
|
|
|
|
|
isRewardEnd: null, // 护理计划是否已结束
|
|
|
|
|
integralText: "", // 奖励后的按钮显示
|
|
|
|
|
isReward: 0, // 是否有计划奖励
|
|
|
|
|
isQualifyFor: 0, // 是否有领奖资格
|
|
|
|
|
isQualifyFor: 0, // 是否显示奖励进度
|
|
|
|
|
isSetReward: 0, // 是否已经领取奖励
|
|
|
|
|
isRewardFinish: true, // 是否完成计划进度
|
|
|
|
|
isRewardAudit: true, // 领奖是否需要审核
|
|
|
|
|
isRewardProcess: "1", // 2审核中 1审核通过 0审核不通过
|
|
|
|
|
isSurvey: true, // 是否需要登记
|
|
|
|
|
isEnrolled: true, // 是否已经登记
|
|
|
|
|
isRewardFinish: null, // 是否完成计划进度
|
|
|
|
|
isRewardAudit: null, // 领奖是否需要审核
|
|
|
|
|
isRewardProcess: null, // 1参与中 2待审核 3审核通过 4审核未通过
|
|
|
|
|
isSurvey: null, // 是否需要登记
|
|
|
|
|
isEnrolled: null, // 是否已经登记
|
|
|
|
|
surveyRewardUrl: "", // 登记地址
|
|
|
|
|
|
|
|
|
|
rewardState: {}, //领奖相关数据
|
|
|
|
|
rewardType: "", // 奖励类型
|
|
|
|
|
isPointsReward: 0, // 是否有积分奖励
|
|
|
|
|
rewardPoints: "", // 积分奖励
|
|
|
|
|
prizeName: "", // 获得奖品
|
|
|
|
|
wxAppid: "", // 奖品跳转Appid
|
|
|
|
|
rewardEntityUrl: "", // 奖品跳转地址
|
|
|
|
|
|
|
|
|
|
isPromptShow: false, // 点击问号的弹窗
|
|
|
|
|
isNursingShow: false, // 护理计划报告弹窗是否创建
|
|
|
|
|
@ -95,12 +108,14 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
},
|
|
|
|
|
// 问卷弹窗数据
|
|
|
|
|
cycleId: "", // 问卷弹窗选择的数据
|
|
|
|
|
|
|
|
|
|
// 提示弹窗内容
|
|
|
|
|
content: "",
|
|
|
|
|
};
|
|
|
|
|
this.PickerTimeProp = React.createRef();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
this.getPlanNowProgress();
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {}
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() {}
|
|
|
|
|
|
|
|
|
|
@ -114,7 +129,17 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
console.log(res.data.data, "今日护理进度");
|
|
|
|
|
const info = res.data.data;
|
|
|
|
|
// 防止错误导致卡死
|
|
|
|
|
if (!info) return;
|
|
|
|
|
if (!info || info.joinStatus === 5) {
|
|
|
|
|
this.setState({ info: false });
|
|
|
|
|
return; // 计划已终止
|
|
|
|
|
}
|
|
|
|
|
if (info.joinStatus === 4) {
|
|
|
|
|
// 计划审核不通过 弹窗弹出一次 首页不显示我的护理区域
|
|
|
|
|
this.setState({ info: false, planId: info.planId }, () => {
|
|
|
|
|
this.getCycleEndReport();
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let myPlanStep = [];
|
|
|
|
|
let myPlanTaskList = [];
|
|
|
|
|
// 今日有护理任务
|
|
|
|
|
@ -129,7 +154,7 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
img: item.modeBanner,
|
|
|
|
|
name: item.instrumentName,
|
|
|
|
|
description: item.modeName,
|
|
|
|
|
time: item.modeTime / 60 + "分钟",
|
|
|
|
|
time: this.setTime(item.modeTime) + "分钟",
|
|
|
|
|
status: item.status, // 0未完成 1已完成
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
@ -159,25 +184,29 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
myPlanNextTime,
|
|
|
|
|
myPlanTaskList,
|
|
|
|
|
isWarn: info.isWarn,
|
|
|
|
|
isReward: info.isReward,
|
|
|
|
|
isQualifyFor: info.isQualifyFor,
|
|
|
|
|
status: info.status,
|
|
|
|
|
planId: info.planId,
|
|
|
|
|
nextTime: info.nextTime,
|
|
|
|
|
totalDay: info.totalDay,
|
|
|
|
|
isReward: info.isReward,
|
|
|
|
|
planTitle: info.planTitle,
|
|
|
|
|
planJoinId: info.planJoinId,
|
|
|
|
|
progressId: info.progressId,
|
|
|
|
|
currentDay: info.currentDay,
|
|
|
|
|
isQualifyFor: info.isQualifyFor,
|
|
|
|
|
totalProgress: info.totalProgress,
|
|
|
|
|
currentProgress: info.currentProgress,
|
|
|
|
|
usePlanScheduleShow: info.useIsShow,
|
|
|
|
|
isRewardEnd: info.joinStatus !== 1 || info.joinStatus !== 2,
|
|
|
|
|
// isRewardEnd: true, // 当前计划是否结束 1参与中 2待审核 3审核通过
|
|
|
|
|
isRewardEnd: info.joinStatus !== 1,
|
|
|
|
|
// isRewardEnd: true, // 当前计划是否结束 1参与中 2待审核 3审核通过 4审核失败 5已终止 6已过期 7已结束
|
|
|
|
|
},
|
|
|
|
|
async () => {
|
|
|
|
|
this.checkCycleEnd(); // 单日程结束弹窗
|
|
|
|
|
if (this.state.isRewardEnd) this.getCycleEndReport(); // 非参与中调用护理计划报告接口
|
|
|
|
|
if (this.state.isRewardEnd) {
|
|
|
|
|
this.getCycleEndReport(); // 非参与中调用护理计划报告接口
|
|
|
|
|
} else {
|
|
|
|
|
Taro.setStorageSync("isPromptShow", false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
@ -190,6 +219,13 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
});
|
|
|
|
|
return step;
|
|
|
|
|
};
|
|
|
|
|
setTime = (data) => {
|
|
|
|
|
const time = data / 60;
|
|
|
|
|
const arr = time.toString().split(".");
|
|
|
|
|
const len = arr[1]?.split("").length;
|
|
|
|
|
if (len >= 2) return time.toFixed(2);
|
|
|
|
|
else return time;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 获取护理报告部分数据
|
|
|
|
|
getCycleEndReport = async () => {
|
|
|
|
|
@ -212,28 +248,47 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
// isSurvey: 1, // 测试 TODO
|
|
|
|
|
// surveyRewardUrl: `${res.data.data.surveyRewardUrl}?sojumpparm=user_id@${uesrId};activity_id@${planInfo.id}`, // 奖励登记星卷问卷地址
|
|
|
|
|
surveyRewardUrl: `https://insightlab.wjx.cn/vm/ew7cY2Z.aspx?sojumpparm=user_id@${uesrId};activity_id@${planId}`, // 问卷星测试地址 TODO
|
|
|
|
|
isQualifyFor: res.data.data.isQualifyFor, // 是否有领奖资格 1是 0否
|
|
|
|
|
isQualifyFor: res.data.data.isQualifyFor, // 是否显示奖励进度 1是 0否
|
|
|
|
|
// isQualifyFor: 1, // 测试 TODO
|
|
|
|
|
isSetReward: res.data.data.isSetReward, // 是否已经领取奖励 1是 0否
|
|
|
|
|
// isSetReward: 0, // 测试 TODO
|
|
|
|
|
isRewardAudit: res.data.data.isExamine, // 是否需要审核 1是 0否
|
|
|
|
|
// isRewardAudit: 0, // 测试 TODO
|
|
|
|
|
// isRewardAudit: 1, // 测试 TODO
|
|
|
|
|
// 1参与中 2待审核 3审核通过 4审核未通过 5已终止 6已过期 7已结束
|
|
|
|
|
isRewardProcess: res.data.data.status, // 当前状态
|
|
|
|
|
// isRewardProcess: 4, // 测试 TODO
|
|
|
|
|
// isRewardProcess: 3, // 测试 TODO
|
|
|
|
|
rewardType: res.data.data.rewardType, // 奖励类型
|
|
|
|
|
// rewardType: '2,3', // 奖励类型
|
|
|
|
|
isPointsReward: res.data.data.isPointsReward, // 是否有积分奖励
|
|
|
|
|
// isPointsReward: 0, // 是否有积分奖励
|
|
|
|
|
rewardPoints: res.data.data.rewardPoints, // 积分奖励
|
|
|
|
|
// rewardPoints: 0, // 积分奖励
|
|
|
|
|
prizeName: res.data.data.prizeName, // 获得奖品
|
|
|
|
|
// prizeName: '实物奖励1', // 获得奖品
|
|
|
|
|
wxAppid: res.data.data.wxAppid, // 奖品跳转Appid
|
|
|
|
|
rewardEntityUrl: res.data.data.rewardEntityUrl, // 奖品跳转地址
|
|
|
|
|
isRewardFinish: currentProgress >= totalProgress, // 是否完成计划进度 当前任务数大于总任务数
|
|
|
|
|
// isRewardFinish: true, // 测试 TODO
|
|
|
|
|
// isPointsReward: res.data.data.isPointsReward, // 是否有积分奖励
|
|
|
|
|
rewardState: {
|
|
|
|
|
integral: res.data.data.isPointsReward
|
|
|
|
|
? res.data.data.rewardPoints + "积分"
|
|
|
|
|
: "", // 积分奖励
|
|
|
|
|
physical: res.data.data.prizeName, // 实物奖励
|
|
|
|
|
// physical: "", // 测试 TODO
|
|
|
|
|
physicalUrl: res.data.data.rewardEntityUrl, // 实物奖励地址
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
() => {
|
|
|
|
|
this.init();
|
|
|
|
|
const { planTitle, isRewardProcess } = this.state;
|
|
|
|
|
const isPromptShow = Taro.getStorageSync("isPromptShow");
|
|
|
|
|
if (isPromptShow) return; // 已提示过
|
|
|
|
|
if (isRewardProcess === 2) {
|
|
|
|
|
const content = (
|
|
|
|
|
<View style={{ fontSize: "32rpx", lineHeight: "60rpx" }}>
|
|
|
|
|
<View>你已完成{planTitle}</View>
|
|
|
|
|
<View>请联系微信助理进行审核</View>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
Taro.setStorageSync("isPromptShow", true);
|
|
|
|
|
this.setState({ isPromptShow: true, content });
|
|
|
|
|
} else {
|
|
|
|
|
// isRewardProcess === 3 || 4 || 7
|
|
|
|
|
this.textOnclk();
|
|
|
|
|
Taro.setStorageSync("isPromptShow", true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
@ -244,28 +299,39 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
isSurvey,
|
|
|
|
|
isReward,
|
|
|
|
|
isEnrolled,
|
|
|
|
|
rewardType,
|
|
|
|
|
isSetReward,
|
|
|
|
|
isQualifyFor,
|
|
|
|
|
isRewardAudit,
|
|
|
|
|
isRewardFinish,
|
|
|
|
|
isPointsReward,
|
|
|
|
|
isRewardProcess,
|
|
|
|
|
} = this.state;
|
|
|
|
|
const { integral, physical } = this.state.rewardState;
|
|
|
|
|
const physical = rewardType.includes("2"); // 存在实物奖励
|
|
|
|
|
if (!isReward) return this.setState({ integralText: "" }); // 没有计划奖励
|
|
|
|
|
if (!isQualifyFor) return this.setState({ integralText: "" }); // 没有领奖资格
|
|
|
|
|
if (!isQualifyFor) return this.setState({ integralText: "" }); // 是否显示奖励进度
|
|
|
|
|
if (!isRewardFinish) return this.setState({ integralText: "" }); // 未完成计划进度
|
|
|
|
|
if (isRewardAudit && isRewardProcess === 4) {
|
|
|
|
|
return this.setState({ integralText: "" }); // 需要审核审核未通过
|
|
|
|
|
}
|
|
|
|
|
if (isSurvey && !isEnrolled) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return this.setState({ integralText: "去登记" }); // 需要登记且未登记
|
|
|
|
|
}
|
|
|
|
|
console.log(isSurvey, isEnrolled,'1475869');
|
|
|
|
|
if (physical) this.setState({ integralText: "去领奖" });
|
|
|
|
|
else this.setState({ integralText: "已领奖" });
|
|
|
|
|
if (integral && !isSetReward) this.goToAward(); // 未领奖
|
|
|
|
|
if (isPointsReward && !isSetReward) this.goToAward(); // 未领奖
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 点击问号
|
|
|
|
|
questionMark = () => {
|
|
|
|
|
const content = (
|
|
|
|
|
<View style={{ fontSize: "32rpx", lineHeight: "60rpx" }}>
|
|
|
|
|
<View>完成当天护理计划的护理任务可以</View>
|
|
|
|
|
<View>增加计划完成度,达到足够的护理天数</View>
|
|
|
|
|
<View>则有资格领取计划奖励</View>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
this.setState({ isPromptShow: true, content });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 点击去领奖
|
|
|
|
|
@ -299,77 +365,161 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
goToPlan = () => {
|
|
|
|
|
const { prepareData } = this.state;
|
|
|
|
|
this.setState({ isPlanSchedule: false });
|
|
|
|
|
console.log("前往护理", prepareData);
|
|
|
|
|
let item = {
|
|
|
|
|
...prepareData,
|
|
|
|
|
type: prepareData.stepType,
|
|
|
|
|
nursingPlanId: prepareData.id,
|
|
|
|
|
id: prepareData.instrumentId,
|
|
|
|
|
};
|
|
|
|
|
this.props.goNursing(item);
|
|
|
|
|
console.log("前往护理1", item);
|
|
|
|
|
if(item.model === "WE200"){
|
|
|
|
|
if(MembraneClothOne.includes(item.modeType)){
|
|
|
|
|
Taro.setStorageSync("WE200SelectMode1", item.modeType);
|
|
|
|
|
}else{
|
|
|
|
|
Taro.setStorageSync("WE200SelectMode2", item.modeType);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.props.goNursing(item,'护理计划');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 是否开启下次护理提醒
|
|
|
|
|
changeSwitch = async (e) => {
|
|
|
|
|
const { planJoinId } = this.state;
|
|
|
|
|
if (e.detail.value) {
|
|
|
|
|
const res = await updateJoinIsWarnApi({
|
|
|
|
|
joinPlanId: planJoinId,
|
|
|
|
|
status: 1,
|
|
|
|
|
});
|
|
|
|
|
if (res.data.code !== 200) {
|
|
|
|
|
return this.setState({ isWarn: false });
|
|
|
|
|
}
|
|
|
|
|
this.setState({ isWarn: true });
|
|
|
|
|
console.log("开启护理提醒");
|
|
|
|
|
const resp = await GetIsAttentionOfficialAccount();
|
|
|
|
|
if (resp.data.code !== 200) return this.setState({ isWarn: false });
|
|
|
|
|
if (resp.data.data) {
|
|
|
|
|
// 关注了公众号
|
|
|
|
|
this.setState({ showDatePicker: true });
|
|
|
|
|
// const res = await updateProgressWarnTimeApi({
|
|
|
|
|
// progressId,
|
|
|
|
|
// time: myPlanNextTimePicker,
|
|
|
|
|
// });
|
|
|
|
|
// if (res.data.code !== 200) return this.setState({ myPlanNextTime:myPlanNextTimePicker });
|
|
|
|
|
// this.setState({ myPlanNextTime: newMyPlanNextTime });
|
|
|
|
|
// console.log("提醒时间", newMyPlanNextTime);
|
|
|
|
|
} else {
|
|
|
|
|
// 未关注公众号
|
|
|
|
|
this.setState({ isAccountShow: true, isWarn: true }, () => {
|
|
|
|
|
this.setState({ isWarn: false });
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// const res = await updateJoinIsWarnApi({
|
|
|
|
|
// joinPlanId: planJoinId,
|
|
|
|
|
// status: 1,
|
|
|
|
|
// });
|
|
|
|
|
// if (res.data.code !== 200) {
|
|
|
|
|
// return this.setState({ isWarn: false });
|
|
|
|
|
// }
|
|
|
|
|
// this.setState({ isWarn: true });
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({ showDatePicker: false });
|
|
|
|
|
// 关闭护理提醒
|
|
|
|
|
const res = await updateJoinIsWarnApi({
|
|
|
|
|
joinPlanId: planJoinId,
|
|
|
|
|
status: 0,
|
|
|
|
|
});
|
|
|
|
|
if (res.data.code !== 200) return;
|
|
|
|
|
if (res.data.code !== 200) return this.setState({ isWarn: true });
|
|
|
|
|
this.setState({ isWarn: false });
|
|
|
|
|
console.log("关闭护理提醒");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onInput = (event) => {
|
|
|
|
|
this.setState({ myPlanNextTimePicker: event.detail });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onClickStop = async () => {
|
|
|
|
|
const { planJoinId, progressId, myPlanNextTime, myPlanNextTimePicker } =
|
|
|
|
|
this.state;
|
|
|
|
|
// 修改下次护理时间
|
|
|
|
|
const res = await updateProgressWarnTimeApi({
|
|
|
|
|
progressId,
|
|
|
|
|
time: myPlanNextTimePicker,
|
|
|
|
|
});
|
|
|
|
|
// 修改失败
|
|
|
|
|
if (res.data.code !== 200) return this.setState({ myPlanNextTime });
|
|
|
|
|
// 修改成功
|
|
|
|
|
this.setState({ myPlanNextTime: myPlanNextTimePicker });
|
|
|
|
|
console.log("提醒时间", myPlanNextTimePicker);
|
|
|
|
|
// 打开护理提醒
|
|
|
|
|
const resp = await updateJoinIsWarnApi({
|
|
|
|
|
joinPlanId: planJoinId,
|
|
|
|
|
status: 1,
|
|
|
|
|
});
|
|
|
|
|
// 开启失败
|
|
|
|
|
if (resp.data.code !== 200) return this.setState({ isWarn: false });
|
|
|
|
|
// 开启成功
|
|
|
|
|
this.setState({ isWarn: true, showDatePicker: false });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onPopupClose = () => {
|
|
|
|
|
this.setState({ showDatePicker: false });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 时间选择器点击确定(修改下次提醒时间)
|
|
|
|
|
changePlanNextTime = async (e) => {
|
|
|
|
|
const { progressId, myPlanNextTime } = this.state;
|
|
|
|
|
const newMyPlanNextTime = e.detail.value;
|
|
|
|
|
const resp = await GetIsAttentionOfficialAccount();
|
|
|
|
|
if (resp.data.code !== 200) {
|
|
|
|
|
return this.setState({ isWarn: false });
|
|
|
|
|
}
|
|
|
|
|
if (resp.data.data) {
|
|
|
|
|
// 关注了公众号
|
|
|
|
|
const res = await updateProgressWarnTimeApi({
|
|
|
|
|
progressId,
|
|
|
|
|
time: newMyPlanNextTime,
|
|
|
|
|
});
|
|
|
|
|
if (res.data.code !== 200) return this.setState({ myPlanNextTime });
|
|
|
|
|
this.setState({ myPlanNextTime: newMyPlanNextTime });
|
|
|
|
|
console.log("提醒时间", newMyPlanNextTime);
|
|
|
|
|
} else {
|
|
|
|
|
// 未关注公众号
|
|
|
|
|
this.setState({ isAccountShow: true, isWarn: false }, () => {
|
|
|
|
|
this.CancelPlanNextTime();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// const { progressId, myPlanNextTime } = this.state;
|
|
|
|
|
// const newMyPlanNextTime = e.detail.value;
|
|
|
|
|
// const resp = await GetIsAttentionOfficialAccount();
|
|
|
|
|
// if (resp.data.code !== 200) {
|
|
|
|
|
// return this.setState({ isWarn: false });
|
|
|
|
|
// }
|
|
|
|
|
// if (resp.data.data) {
|
|
|
|
|
// // 关注了公众号
|
|
|
|
|
// const res = await updateProgressWarnTimeApi({
|
|
|
|
|
// progressId,
|
|
|
|
|
// time: newMyPlanNextTime,
|
|
|
|
|
// });
|
|
|
|
|
// if (res.data.code !== 200) return this.setState({ myPlanNextTime });
|
|
|
|
|
// this.setState({ myPlanNextTime: newMyPlanNextTime });
|
|
|
|
|
// console.log("提醒时间", newMyPlanNextTime);
|
|
|
|
|
// } else {
|
|
|
|
|
// // 未关注公众号
|
|
|
|
|
// this.setState({ isAccountShow: true, isWarn: false }, () => {
|
|
|
|
|
// this.cancelPlanNextTime();
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 时间选择器点击取消
|
|
|
|
|
CancelPlanNextTime = async () => {
|
|
|
|
|
cancelPlanNextTime = async () => {
|
|
|
|
|
// 关闭护理提醒
|
|
|
|
|
const { planJoinId } = this.state;
|
|
|
|
|
const res = await updateJoinIsWarnApi({
|
|
|
|
|
joinPlanId: planJoinId,
|
|
|
|
|
status: 0,
|
|
|
|
|
});
|
|
|
|
|
if (res.data.code !== 200) return;
|
|
|
|
|
this.setState({ isWarn: false });
|
|
|
|
|
console.log("关闭护理提醒");
|
|
|
|
|
// const { planJoinId } = this.state;
|
|
|
|
|
// const res = await updateJoinIsWarnApi({
|
|
|
|
|
// joinPlanId: planJoinId,
|
|
|
|
|
// status: 0,
|
|
|
|
|
// });
|
|
|
|
|
// if (res.data.code !== 200) return;
|
|
|
|
|
// this.setState({ isWarn: false });
|
|
|
|
|
// console.log("关闭护理提醒");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
clickPlanNextTime = async () => {
|
|
|
|
|
// const { isWarn, isWarnPicker, planJoinId } = this.state;
|
|
|
|
|
// console.log(isWarn, "slahflansnkla");
|
|
|
|
|
// if (isWarn) {
|
|
|
|
|
// // 关闭护理提醒
|
|
|
|
|
// const res = await updateJoinIsWarnApi({
|
|
|
|
|
// joinPlanId: planJoinId,
|
|
|
|
|
// status: 0,
|
|
|
|
|
// });
|
|
|
|
|
// if (res.data.code !== 200) return;
|
|
|
|
|
// this.setState({ isWarn: 0 });
|
|
|
|
|
// } else {
|
|
|
|
|
// // 开启护理提醒
|
|
|
|
|
// // const res = await updateJoinIsWarnApi({
|
|
|
|
|
// // joinPlanId: planJoinId,
|
|
|
|
|
// // status: 1,
|
|
|
|
|
// // });
|
|
|
|
|
// // if (res.data.code !== 200) return;
|
|
|
|
|
// // this.setState({ isWarn: 1 });
|
|
|
|
|
// this.setState({ isWarnPicker: false });
|
|
|
|
|
// console.log(this.PickerTimeProp.current.onClick);
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 获取单日程结束问卷数据
|
|
|
|
|
@ -412,8 +562,13 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
// 点击跳转实物链接 TODO
|
|
|
|
|
jumpReal = async () => {
|
|
|
|
|
const { physicalUrl } = this.state.rewardState;
|
|
|
|
|
console.log("跳转实物链接", physicalUrl);
|
|
|
|
|
const { wxAppid, rewardEntityUrl } = this.state;
|
|
|
|
|
const data = {
|
|
|
|
|
appId: wxAppid,
|
|
|
|
|
path: rewardEntityUrl,
|
|
|
|
|
};
|
|
|
|
|
goJump(data, 4);
|
|
|
|
|
console.log("跳转实物链接", wxAppid, rewardEntityUrl);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 点击领奖
|
|
|
|
|
@ -422,12 +577,14 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
isReward,
|
|
|
|
|
isSurvey,
|
|
|
|
|
isEnrolled,
|
|
|
|
|
rewardType,
|
|
|
|
|
isQualifyFor,
|
|
|
|
|
isRewardAudit,
|
|
|
|
|
isRewardFinish,
|
|
|
|
|
// isPointsReward,
|
|
|
|
|
isRewardProcess,
|
|
|
|
|
} = this.state;
|
|
|
|
|
const { physical } = this.state.rewardState;
|
|
|
|
|
const physical = rewardType.includes("2"); // 存在实物奖励
|
|
|
|
|
if (!isReward) return; // 没有计划奖励
|
|
|
|
|
if (!isQualifyFor) return; // 没有领奖资格
|
|
|
|
|
if (!isRewardFinish) return; // 未完成计划进度
|
|
|
|
|
@ -470,6 +627,7 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
myPlanNextDay,
|
|
|
|
|
myPlanNextTime,
|
|
|
|
|
isWarn,
|
|
|
|
|
showDatePicker,
|
|
|
|
|
isPromptShow,
|
|
|
|
|
isPlanSchedule,
|
|
|
|
|
isQuesShow,
|
|
|
|
|
@ -478,162 +636,179 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
isRewardAudit,
|
|
|
|
|
isRewardEnd,
|
|
|
|
|
isRewardProcess,
|
|
|
|
|
rewardState,
|
|
|
|
|
isNursingShow,
|
|
|
|
|
isAccountShow,
|
|
|
|
|
|
|
|
|
|
prizeName,
|
|
|
|
|
|
|
|
|
|
content,
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
// 奖品
|
|
|
|
|
const reward = [rewardState.integral, rewardState.physical].filter(
|
|
|
|
|
(item) => item
|
|
|
|
|
);
|
|
|
|
|
return (
|
|
|
|
|
<Block>
|
|
|
|
|
{!!info && (
|
|
|
|
|
<Block>
|
|
|
|
|
{/* 护理报告弹窗 */}
|
|
|
|
|
{isNursingShow && (
|
|
|
|
|
<NursingPlanReport
|
|
|
|
|
planId={planId}
|
|
|
|
|
totalDayAll={totalDay}
|
|
|
|
|
planJoinId={planJoinId}
|
|
|
|
|
isRewardFinish={isRewardFinish}
|
|
|
|
|
isShow={this.state.isNursingPlanReport}
|
|
|
|
|
title={"护理计划报告"}
|
|
|
|
|
confirm={() => this.setState({ isNursingPlanReport: false })}
|
|
|
|
|
close={() => this.setState({ isNursingPlanReport: false })}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{/* 日程结束后问卷 */}
|
|
|
|
|
<PopupAlert
|
|
|
|
|
title="护理计划"
|
|
|
|
|
textAlgin="left"
|
|
|
|
|
confirmButtonText="下一步"
|
|
|
|
|
isShow={isQuesShow}
|
|
|
|
|
content={
|
|
|
|
|
<View className="questionnaire">
|
|
|
|
|
<View className="questionnaire-title">
|
|
|
|
|
{quesOption.optionTitle}
|
|
|
|
|
</View>
|
|
|
|
|
{quesOption.optionJson.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<View
|
|
|
|
|
className="questionnaire-item"
|
|
|
|
|
key={index}
|
|
|
|
|
onClick={() => this.selectQuesOption(item.cycleId)}
|
|
|
|
|
>
|
|
|
|
|
{cycleId === item.cycleId && (
|
|
|
|
|
<Image
|
|
|
|
|
className="img"
|
|
|
|
|
src={require("../../img/finished.png")}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
{cycleId !== item.cycleId && (
|
|
|
|
|
<Image
|
|
|
|
|
className="img"
|
|
|
|
|
src={require("../../img/Ellipse65.png")}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
<Text style={{ paddingLeft: "90rpx" }}>
|
|
|
|
|
{item.optionContent}
|
|
|
|
|
</Text>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</View>
|
|
|
|
|
}
|
|
|
|
|
confirm={this.quesOptionNext}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/* 我的护理问号点击弹窗 */}
|
|
|
|
|
<PopupAlert
|
|
|
|
|
title="提示"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
confirmButtonText="知道了"
|
|
|
|
|
isShow={isPromptShow}
|
|
|
|
|
content={
|
|
|
|
|
<View style={{ fontSize: "32rpx", lineHeight: "60rpx" }}>
|
|
|
|
|
<View>完成当天护理计划的护理任务可以</View>
|
|
|
|
|
<View>增加计划完成度,达到足够的护理天数</View>
|
|
|
|
|
<View>则有资格领取计划奖励</View>
|
|
|
|
|
</View>
|
|
|
|
|
}
|
|
|
|
|
confirm={() => this.setState({ isPromptShow: false })}
|
|
|
|
|
<Block>
|
|
|
|
|
{/* 护理报告弹窗 */}
|
|
|
|
|
{isNursingShow && (
|
|
|
|
|
<NursingPlanReport
|
|
|
|
|
planId={planId}
|
|
|
|
|
totalDayAll={totalDay}
|
|
|
|
|
planJoinId={planJoinId}
|
|
|
|
|
isRewardFinish={isRewardFinish}
|
|
|
|
|
isShow={this.state.isNursingPlanReport}
|
|
|
|
|
title={"护理计划报告"}
|
|
|
|
|
confirm={() => this.setState({ isNursingPlanReport: false })}
|
|
|
|
|
close={() => this.setState({ isNursingPlanReport: false })}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{/* 公众号引导弹窗 */}
|
|
|
|
|
<PopupAlert
|
|
|
|
|
title="请长按识别关注公众号"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
confirmButtonText="我知道了"
|
|
|
|
|
isShow={isAccountShow}
|
|
|
|
|
content={
|
|
|
|
|
<View style={{ display: "flex", justifyContent: "center" }}>
|
|
|
|
|
<Image
|
|
|
|
|
show-menu-by-longpress={true}
|
|
|
|
|
src={require("../../img/qrcode.jpg")}
|
|
|
|
|
style="width: 400rpx;height: 400rpx"
|
|
|
|
|
/>
|
|
|
|
|
{/* 日程结束后问卷 */}
|
|
|
|
|
<PopupAlert
|
|
|
|
|
title="护理计划"
|
|
|
|
|
textAlgin="left"
|
|
|
|
|
confirmButtonText="下一步"
|
|
|
|
|
isShow={isQuesShow}
|
|
|
|
|
content={
|
|
|
|
|
<View className="questionnaire">
|
|
|
|
|
<View className="questionnaire-title">
|
|
|
|
|
{quesOption.optionTitle}
|
|
|
|
|
</View>
|
|
|
|
|
}
|
|
|
|
|
confirm={() => this.setState({ isAccountShow: false })}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/* 今日护理步骤 */}
|
|
|
|
|
<PopupDrawer
|
|
|
|
|
isClose
|
|
|
|
|
postion="bottom"
|
|
|
|
|
title="今日护理步骤"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
isShow={isPlanSchedule}
|
|
|
|
|
confirm={() => this.goToPlan()}
|
|
|
|
|
close={() => this.setState({ isPlanSchedule: false })}
|
|
|
|
|
>
|
|
|
|
|
<View className="steptime">
|
|
|
|
|
第{currentDay}天 ({currentDate.split("-").join(".")}
|
|
|
|
|
)
|
|
|
|
|
</View>
|
|
|
|
|
<View className="stepoperate">
|
|
|
|
|
{myPlanStep.map((item, index) => {
|
|
|
|
|
{quesOption.optionJson.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<View key={"stepoperate" + index} className="step_item">
|
|
|
|
|
<View className="step_item-title">Step{index + 1}</View>
|
|
|
|
|
<View className="step_item-cont">
|
|
|
|
|
{item.map((subitem, subindex) => {
|
|
|
|
|
return (
|
|
|
|
|
<View
|
|
|
|
|
className="step_item-list"
|
|
|
|
|
key={"step1" + subindex}
|
|
|
|
|
>
|
|
|
|
|
<Image
|
|
|
|
|
className="step_item-img"
|
|
|
|
|
src={
|
|
|
|
|
index === 1
|
|
|
|
|
? subitem.modeBanner
|
|
|
|
|
: subitem.productImg
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<View className="step_item-name">
|
|
|
|
|
{index === 1
|
|
|
|
|
? subitem.instrumentName
|
|
|
|
|
: subitem.productName}
|
|
|
|
|
</View>
|
|
|
|
|
<View className="step_item-operate">
|
|
|
|
|
{index === 1
|
|
|
|
|
? subitem.modeName
|
|
|
|
|
: subitem.introduce}
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</View>
|
|
|
|
|
<View
|
|
|
|
|
className="questionnaire-item"
|
|
|
|
|
key={index}
|
|
|
|
|
onClick={() => this.selectQuesOption(item.cycleId)}
|
|
|
|
|
>
|
|
|
|
|
{cycleId === item.cycleId && (
|
|
|
|
|
<Image
|
|
|
|
|
className="img"
|
|
|
|
|
src={require("../../img/finished.png")}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
{cycleId !== item.cycleId && (
|
|
|
|
|
<Image
|
|
|
|
|
className="img"
|
|
|
|
|
src={require("../../img/Ellipse65.png")}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
<Text style={{ paddingLeft: "90rpx" }}>
|
|
|
|
|
{item.optionContent}
|
|
|
|
|
</Text>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</View>
|
|
|
|
|
</PopupDrawer>
|
|
|
|
|
}
|
|
|
|
|
confirm={this.quesOptionNext}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/* 我的护理问号点击弹窗 */}
|
|
|
|
|
<PopupAlert
|
|
|
|
|
title="提示"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
confirmButtonText="知道了"
|
|
|
|
|
isShow={isPromptShow}
|
|
|
|
|
content={content}
|
|
|
|
|
confirm={() => this.setState({ isPromptShow: false })}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/* 时间选择器 */}
|
|
|
|
|
<Popup show={showDatePicker} position="bottom" round>
|
|
|
|
|
<View
|
|
|
|
|
style={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
height: "100rpx",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
justifyContent: "space-between",
|
|
|
|
|
padding: "0 40rpx",
|
|
|
|
|
fontSize: "36rpx",
|
|
|
|
|
borderBottom: "1px solid #ccc",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<View onClick={this.onPopupClose}>取消</View>
|
|
|
|
|
<View onClick={this.onClickStop} style={{ color: "green" }}>
|
|
|
|
|
确定
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
<DatetimePicker
|
|
|
|
|
type="time"
|
|
|
|
|
value={myPlanNextTime}
|
|
|
|
|
onInput={_.throttle(this.onInput.bind(this), 500)}
|
|
|
|
|
/>
|
|
|
|
|
{/* <View className="btn_confirm">确定</View> */}
|
|
|
|
|
</Popup>
|
|
|
|
|
|
|
|
|
|
{/* 公众号引导弹窗 */}
|
|
|
|
|
<PopupAlert
|
|
|
|
|
title="请长按识别关注公众号"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
confirmButtonText="我知道了"
|
|
|
|
|
isShow={isAccountShow}
|
|
|
|
|
content={
|
|
|
|
|
<View style={{ display: "flex", justifyContent: "center" }}>
|
|
|
|
|
<Image
|
|
|
|
|
show-menu-by-longpress={true}
|
|
|
|
|
src={require("../../img/qrcode.jpg")}
|
|
|
|
|
style="width: 400rpx;height: 400rpx"
|
|
|
|
|
/>
|
|
|
|
|
</View>
|
|
|
|
|
}
|
|
|
|
|
confirm={() => this.setState({ isAccountShow: false })}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
{/* 今日护理步骤 */}
|
|
|
|
|
<PopupDrawer
|
|
|
|
|
isClose
|
|
|
|
|
postion="bottom"
|
|
|
|
|
title="今日护理步骤"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
isShow={isPlanSchedule}
|
|
|
|
|
confirm={() => this.goToPlan()}
|
|
|
|
|
close={() => this.setState({ isPlanSchedule: false })}
|
|
|
|
|
>
|
|
|
|
|
<View className="steptime">
|
|
|
|
|
第{currentDay}天 ({currentDate.split("-").join(".")})
|
|
|
|
|
</View>
|
|
|
|
|
<View className="stepoperate">
|
|
|
|
|
{myPlanStep.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<View key={"stepoperate" + index} className="step_item">
|
|
|
|
|
<View className="step_item-title">Step{index + 1}</View>
|
|
|
|
|
<View className="step_item-cont">
|
|
|
|
|
{item.map((subitem, subindex) => {
|
|
|
|
|
return (
|
|
|
|
|
<View
|
|
|
|
|
className="step_item-list"
|
|
|
|
|
key={"step1" + subindex}
|
|
|
|
|
>
|
|
|
|
|
<Image
|
|
|
|
|
className="step_item-img"
|
|
|
|
|
src={
|
|
|
|
|
index === 1
|
|
|
|
|
? subitem.modeBanner
|
|
|
|
|
: subitem.productImg
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
<View className="step_item-name">
|
|
|
|
|
{index === 1
|
|
|
|
|
? subitem.instrumentName
|
|
|
|
|
: subitem.productName}
|
|
|
|
|
</View>
|
|
|
|
|
<View className="step_item-operate">
|
|
|
|
|
{index === 1
|
|
|
|
|
? subitem.modeName
|
|
|
|
|
: subitem.introduce}
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</View>
|
|
|
|
|
</PopupDrawer>
|
|
|
|
|
{!!info && (
|
|
|
|
|
<View className="careplan">
|
|
|
|
|
<View className="careplan_title">
|
|
|
|
|
<View className="title">我的护理</View>
|
|
|
|
|
@ -663,7 +838,7 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
<Image
|
|
|
|
|
src={require("../../img/clock_in_upload/info.png")}
|
|
|
|
|
style={{ width: "30rpx", height: "30rpx" }}
|
|
|
|
|
onClick={() => this.setState({ isPromptShow: true })}
|
|
|
|
|
onClick={this.questionMark}
|
|
|
|
|
/>
|
|
|
|
|
<View className="out">
|
|
|
|
|
<View
|
|
|
|
|
@ -726,9 +901,7 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
<Block>
|
|
|
|
|
<View className="integral">
|
|
|
|
|
<View className="title">
|
|
|
|
|
<Text>
|
|
|
|
|
获得奖品: {reward.join("、")}
|
|
|
|
|
</Text>
|
|
|
|
|
<Text>获得奖品: {prizeName}</Text>
|
|
|
|
|
<View
|
|
|
|
|
className={classnames("button", {
|
|
|
|
|
go: integralText === "已领奖",
|
|
|
|
|
@ -772,7 +945,7 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
<Block>
|
|
|
|
|
<View className="integral">
|
|
|
|
|
<View className="title">
|
|
|
|
|
<Text>获得奖品: {reward.join("、")}</Text>
|
|
|
|
|
<Text>获得奖品: {prizeName}</Text>
|
|
|
|
|
<View
|
|
|
|
|
className={classnames("button", {
|
|
|
|
|
go: integralText === "已领奖",
|
|
|
|
|
@ -865,26 +1038,28 @@ export default class Nursing extends Component<any, any> {
|
|
|
|
|
<Text>
|
|
|
|
|
下次护理提醒: {myPlanNextDay} {myPlanNextTime}
|
|
|
|
|
</Text>
|
|
|
|
|
<Picker
|
|
|
|
|
{/* <Picker
|
|
|
|
|
mode="time"
|
|
|
|
|
ref={this.PickerTimeProp}
|
|
|
|
|
disabled={isWarn}
|
|
|
|
|
defaultValue={myPlanNextTime}
|
|
|
|
|
onChange={this.changePlanNextTime}
|
|
|
|
|
onCancel={this.CancelPlanNextTime}
|
|
|
|
|
>
|
|
|
|
|
<Switch
|
|
|
|
|
color="#8ee2b1"
|
|
|
|
|
checked={isWarn}
|
|
|
|
|
onChange={this.changeSwitch}
|
|
|
|
|
/>
|
|
|
|
|
</Picker>
|
|
|
|
|
onCancel={this.cancelPlanNextTime}
|
|
|
|
|
onClick={this.clickPlanNextTime}
|
|
|
|
|
> */}
|
|
|
|
|
<Switch
|
|
|
|
|
color="#8ee2b1"
|
|
|
|
|
checked={isWarn}
|
|
|
|
|
onChange={this.changeSwitch}
|
|
|
|
|
/>
|
|
|
|
|
{/* </Picker> */}
|
|
|
|
|
</View>
|
|
|
|
|
</Block>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
</Block>
|
|
|
|
|
)}
|
|
|
|
|
)}
|
|
|
|
|
</Block>
|
|
|
|
|
</Block>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|