Merge branch 'rwkdev' into lzwdev

master
blak-kong 2 years ago
commit 67d6d9fb88

@ -110,13 +110,13 @@ export default class AtCalendarController extends React.Component<any, any> {
> >
{/* <Text className="controller__info"></Text> */} {/* <Text className="controller__info"></Text> */}
{/* <Text>{dayjsDate.format(monthFormat)}</Text> */} {/* <Text>{dayjsDate.format(monthFormat)}</Text> */}
<Text style={{ fontSize: "36rpx", fontWeight: "600" }}> <Text style={{ fontSize: "32rpx", fontWeight: "600" }}>
{dayjsDate.format("YYYY.MM.DD")} {dayjsDate.format("YYYY.MM.DD")}
</Text> </Text>
<View style="margin-left: 34rpx;"> <View style="margin-left: 34rpx;">
<Image <Image
src={require("../img/calendar.png")} src={require("../img/calendar.png")}
style="width:34rpx;height:34rpx;" style="width:28rpx;height:28rpx;"
/> />
</View> </View>
</View> </View>

@ -2,6 +2,11 @@ page {
background: #f3f3f3; background: #f3f3f3;
} }
.mb10{
margin-bottom: 20rpx;
font-size: 32rpx;
}
/* 隐藏横向滚动条 */ /* 隐藏横向滚动条 */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0; width: 0;
@ -992,7 +997,7 @@ page {
padding-top: 32rpx; padding-top: 32rpx;
background-color: #fff; background-color: #fff;
box-shadow: 0rpx 2rpx 25rpx 18rpx rgba(210, 210, 210, 0.1); box-shadow: 0rpx 2rpx 25rpx 18rpx rgba(210, 210, 210, 0.1);
border-radius: 0rpx 0rpx 30rpx 30rpx; border-radius:30rpx;
.date-title { .date-title {
position: absolute; position: absolute;
top: 32rpx; top: 32rpx;

@ -55,13 +55,13 @@ import {
setStorageSync, setStorageSync,
showModal, showModal,
} from "@/utils/traoAPI"; } from "@/utils/traoAPI";
const log = require("@/utils/log");
import commandMap from "@/utils/commandMap"; import commandMap from "@/utils/commandMap";
import InstrumentTypeEnum from "@/components/bluetoot/InstrumentTypeEnum"; import InstrumentTypeEnum from "@/components/bluetoot/InstrumentTypeEnum";
import OtaDeviceTypeEnum from "@/components/bluetoot/OtaDeviceTypeEnum"; import OtaDeviceTypeEnum from "@/components/bluetoot/OtaDeviceTypeEnum";
const log = require("@/utils/log");
class Index extends Component<any, any> { class Index extends Component<any, any> {
// pageCtx = Taro.getCurrentInstance().page; // pageCtx = Taro.getCurrentInstance().page;
$instance = Taro.getCurrentInstance(); $instance = Taro.getCurrentInstance();
@ -146,6 +146,8 @@ class Index extends Component<any, any> {
} }
async onLoad() { async onLoad() {
console.log(1123131233);
// 仅非扫码进入页面时,校验跳转欢迎页 // 仅非扫码进入页面时,校验跳转欢迎页
if (!this.$instance.router?.params?.q) { if (!this.$instance.router?.params?.q) {
const isFirst = Taro.getStorageSync("isWelcome"); const isFirst = Taro.getStorageSync("isWelcome");
@ -153,11 +155,17 @@ class Index extends Component<any, any> {
go("/pages/initiate/initiate"); go("/pages/initiate/initiate");
} }
} }
if (Taro.getStorageSync("skip")) {
this.setState({ showEquipment: true })
Taro.removeStorageSync('skip');
}
} }
componentDidMount() {} componentDidMount() {
}
componentWillUnmount() {} componentWillUnmount() { }
componentDidShow() { componentDidShow() {
const tabbar = Taro.getTabBar<CustomTabBar>(this.$instance.page); const tabbar = Taro.getTabBar<CustomTabBar>(this.$instance.page);
@ -166,7 +174,7 @@ class Index extends Component<any, any> {
this.showInit(); this.showInit();
} }
componentDidHide() {} componentDidHide() { }
showInit() { showInit() {
// 判断是否登录 // 判断是否登录
@ -193,6 +201,9 @@ class Index extends Component<any, any> {
if (ids.length > 1) { if (ids.length > 1) {
let serial = ids[1]; let serial = ids[1];
Taro.setStorageSync("serial", serial); Taro.setStorageSync("serial", serial);
if (!Taro.getStorageSync("mobile")) {
go("/pages/register/register");
}
} }
} }
} }
@ -213,7 +224,7 @@ class Index extends Component<any, any> {
this.isSancQrcodeEnter(); this.isSancQrcodeEnter();
} }
}, },
fail: () => {}, fail: () => { },
complete: () => { complete: () => {
// 授权完成运行页面初始化 // 授权完成运行页面初始化
}, },
@ -371,7 +382,7 @@ class Index extends Component<any, any> {
this.setState({ isShowSiteSwiper: false }); this.setState({ isShowSiteSwiper: false });
}; };
bannerSwiperchange() {} bannerSwiperchange() { }
gobanner(item) { gobanner(item) {
// 跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间', // 跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间',
@ -643,7 +654,12 @@ class Index extends Component<any, any> {
go("/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转 go("/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
// return; // return;
} }
onUnloginConfirm() {
this.setState({ showEquipment: false })
}
onUnloginClose() {
this.setState({ showEquipment: false })
}
//连接完成时数据的回调 //连接完成时数据的回调
offlineChange = async (e) => { offlineChange = async (e) => {
console.log("offlineChange", e); console.log("offlineChange", e);
@ -751,6 +767,7 @@ class Index extends Component<any, any> {
isExchangeBinding, isExchangeBinding,
instrumentInfo, instrumentInfo,
instrumentList, instrumentList,
showEquipment,
// 升级弹窗 // 升级弹窗
isShowUpdateVersionTip, isShowUpdateVersionTip,
@ -783,21 +800,21 @@ class Index extends Component<any, any> {
/> />
<PopupAlert <PopupAlert
isShow={isNotRegister} isShow={isNotRegister}
isClose={true} isClose
title="提示" title='提示'
content="暂未授权注册,请点击注册" content='暂未授权注册,请点击注册'
confirmButtonText="确定" confirmButtonText='确定'
textAlgin="center" textAlgin='center'
type="1" type='1'
close={this.closeAlert} close={this.closeAlert}
confirm={this.closeAlert} confirm={this.closeAlert}
/> />
<PopupAlert <PopupAlert
isShow={isDev} isShow={isDev}
title="提示" title='提示'
content="页面正在开发中" content='页面正在开发中'
confirmButtonText="确定" confirmButtonText='确定'
textAlgin="center" textAlgin='center'
close={this.closeDev} close={this.closeDev}
confirm={this.closeDev} confirm={this.closeDev}
/> />
@ -817,30 +834,47 @@ class Index extends Component<any, any> {
/> />
<PopupAlert <PopupAlert
isShow={isBindingError} isShow={isBindingError}
title="提示" title='提示'
content={ content={
<Block> <Block>
<View></View> <View></View>
<View></View> <View></View>
</Block> </Block>
} }
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
isClose={false} isClose={false}
close={this.onBindErrorClose} close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm} confirm={this.onBindErrorConfirm}
/> />
<PopupAlert <PopupAlert
isShow={isBeforeBinding} isShow={isBeforeBinding}
title="提示" title='提示'
content="您选择的仪器有误,请重新确认选择" content='您选择的仪器有误,请重新确认选择'
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
isClose={false} isClose={false}
close={this.onBeforeBindClose} close={this.onBeforeBindClose}
confirm={this.onBeforeBindConfirm} confirm={this.onBeforeBindConfirm}
/> />
<PopupAlert
isShow={showEquipment}
title='提示'
content={
<Block>
<View className='mb10'></View>
<View className='mb10'>uniquie14231</View>
<View className='mb10'></View>
</Block>
}
confirmButtonText='知道了'
textAlgin='center'
isClose={false}
close={this.onUnloginClose.bind(this)}
confirm={this.onUnloginConfirm.bind(this)}
></PopupAlert>
{/* <PopupPrivacyTest {/* <PopupPrivacyTest
closePrivacy={this.closePrivacy.bind(this)} closePrivacy={this.closePrivacy.bind(this)}
initData={this.initData.bind(this)} initData={this.initData.bind(this)}
@ -849,9 +883,9 @@ class Index extends Component<any, any> {
<PopupSiteSwiper <PopupSiteSwiper
isShow={isShowSiteSwiper} isShow={isShowSiteSwiper}
siteData={sitePopupList} siteData={sitePopupList}
size="middle" size='middle'
confirmButtonText="确定" confirmButtonText='确定'
textAlgin="center" textAlgin='center'
close={this.closeSiteSwiper} close={this.closeSiteSwiper}
confirm={this.closeSiteSwiper} confirm={this.closeSiteSwiper}
/> />
@ -914,31 +948,31 @@ class Index extends Component<any, any> {
leftSlot={ leftSlot={
<Block> <Block>
<View <View
className="message" className='message'
onClick={this.gourl} onClick={this.gourl}
data-url="/pages/message/message" data-url='/pages/message/message'
> >
<Image <Image
className="message-img" className='message-img'
src={require("../../img/index/message.png")} src={require("../../img/index/message.png")}
mode="aspectFill" mode='aspectFill'
/> />
{messagecount ? <View className="tip" /> : ""} {messagecount ? <View className='tip' /> : ""}
</View> </View>
</Block> </Block>
} }
/> />
<View className="index"> <View className='index'>
<View className="date-title" onClick={this.toNursingRecords}> <View className='date-title' onClick={this.toNursingRecords}>
<Text className="text"></Text> <Text className='text'></Text>
<Image <Image
src={require("../../img/index/right.png")} src={require("../../img/index/right.png")}
style="width: 20rpx;height: 20rpx;" style='width: 20rpx;height: 20rpx;'
/> />
</View> </View>
<View className="bg-while"> <View className='bg-while'>
<AtCalendar <AtCalendar
hideArrow={true} hideArrow
isSwiper={false} isSwiper={false}
currentDate={currentDate} currentDate={currentDate}
complete={calendarComplete} complete={calendarComplete}
@ -948,41 +982,41 @@ class Index extends Component<any, any> {
/> />
</View> </View>
</View> </View>
<View className="infobox5"> <View className='infobox5'>
{instrumentList.length > 0 && ( {instrumentList.length > 0 && (
<Block> <Block>
<View className="nurse_plan_box flex aitems sb"> <View className='nurse_plan_box flex aitems sb'>
<View className="title"></View> <View className='title'></View>
<View <View
className="txt_box flex jcenter aitems" className='txt_box flex jcenter aitems'
data-url="/pages/instrument/instrument" data-url='/pages/instrument/instrument'
onClick={this.gourl} onClick={this.gourl}
> >
<Image <Image
className="right_icon" className='right_icon'
src={require("../../img/black-add.png")} src={require("../../img/black-add.png")}
mode="aspectFill" mode='aspectFill'
/> />
<View className="txt"></View> <View className='txt'></View>
</View> </View>
</View> </View>
<View style="overflow-x: auto;"> <View style='overflow-x: auto;'>
<View className="device_list flex"> <View className='device_list flex'>
{instrumentList.map((item, index) => { {instrumentList.map((item, index) => {
if (item.status === 0) { if (item.status === 0) {
return ( return (
<View <View
key={"instrumentList" + index} key={"instrumentList" + index}
className="device_item" className='device_item'
onClick={this.goNursing.bind(this, item)} onClick={this.goNursing.bind(this, item)}
> >
<Image <Image
className="banner_img" className='banner_img'
src={item.banner} src={item.banner}
mode="aspectFill" mode='aspectFill'
/> />
<View className="device_name ellipsis1"> <View className='device_name ellipsis1'>
{item.name} {item.name}
</View> </View>
</View> </View>
@ -995,34 +1029,34 @@ class Index extends Component<any, any> {
)} )}
{instrumentList.length === 0 && ( {instrumentList.length === 0 && (
<Block> <Block>
<View className="nurse_plan_box flex aitems sb"> <View className='nurse_plan_box flex aitems sb'>
<View className="title"></View> <View className='title'></View>
</View> </View>
<View className="add_device flex jcenter aitems bg-while"> <View className='add_device flex jcenter aitems bg-while'>
<View className="add_device_btn"> <View className='add_device_btn'>
<View className="txt_box flex jcenter aitems"> <View className='txt_box flex jcenter aitems'>
<View <View
className="at-icon at-icon-add" className='at-icon at-icon-add'
style="color: #fff;font-size: 30rpx;" style='color: #fff;font-size: 30rpx;'
></View> ></View>
<View className="txt" onClick={this.addNewDevice}> <View className='txt' onClick={this.addNewDevice}>
</View> </View>
</View> </View>
</View> </View>
<View className="tips"></View> <View className='tips'></View>
</View> </View>
</Block> </Block>
)} )}
</View> </View>
<View style="margin: 20px"> <View style='margin: 20px'>
<View onClick={this.goIot}></View> <View onClick={this.goIot}></View>
</View> </View>
<View className="infobox3"> <View className='infobox3'>
<Swiper <Swiper
autoplay={true} autoplay
onAnimationFinish={this.bannerSwiperchange.bind(this)} onAnimationFinish={this.bannerSwiperchange.bind(this)}
current={bannerCurrent} current={bannerCurrent}
> >
@ -1032,13 +1066,13 @@ class Index extends Component<any, any> {
key={"banner_" + index} key={"banner_" + index}
onClick={this.gobanner.bind(this, item)} onClick={this.gobanner.bind(this, item)}
> >
<Image style="width:100%;height:100%" src={item.fileUrl} /> <Image style='width:100%;height:100%' src={item.fileUrl} />
</SwiperItem> </SwiperItem>
); );
})} })}
</Swiper> </Swiper>
</View> </View>
<View style="height:200rpx"></View> <View style='height:200rpx'></View>
</Block> </Block>
); );
} }

@ -255,8 +255,8 @@ export default class Instrument extends Component<any, any> {
}; };
onSubmit = () => { onSubmit = () => {
const { serial, serialImage, id } = this.state.channelInfo; const { serialCode, serialImage, id } = this.state.channelInfo;
if (!serial?.trim()) return msg("请输入设备序列号"); if (!serialCode?.trim()) return msg("请填写序列号");
if (!serialImage) return msg("请上传序列号照片"); if (!serialImage) return msg("请上传序列号照片");
this.manualCodeBinding(); this.manualCodeBinding();
}; };

@ -23,7 +23,7 @@ page {
.infobox1 { .infobox1 {
/* background: #fff; */ /* background: #fff; */
margin: 20rpx 0rpx; margin: 30rpx 0rpx 24rpx;
box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05); box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05);
#myVideo { #myVideo {
display: block; display: block;

@ -70,16 +70,16 @@ export default class InstrumentClickInUpload extends Component<any, any> {
async onLoad() { async onLoad() {
this.initData(); this.initData();
} }
componentDidMount() {} componentDidMount() { }
componentWillUnmount() {} componentWillUnmount() { }
componentDidShow() { componentDidShow() {
let videoContext = Taro.createVideoContext("myVideo"); let videoContext = Taro.createVideoContext("myVideo");
this.setState({ videoContext }); this.setState({ videoContext });
} }
componentDidHide() {} componentDidHide() { }
async initData() { async initData() {
let objStr = getStorageSync("instrument_detail"); let objStr = getStorageSync("instrument_detail");
@ -242,15 +242,15 @@ export default class InstrumentClickInUpload extends Component<any, any> {
}); });
}; };
videoBindTimeUpdate = async () => {}; videoBindTimeUpdate = async () => { };
videoEnded = async () => {}; videoEnded = async () => { };
videoPause = async () => {}; videoPause = async () => { };
videoPlay = async () => {}; videoPlay = async () => { };
videoLoadedMetaData = async () => {}; videoLoadedMetaData = async () => { };
handleTextareaInput = async (e) => { handleTextareaInput = async (e) => {
let { punchInInfo } = this.state; let { punchInInfo } = this.state;
@ -313,7 +313,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
isShow={isModeLock} isShow={isModeLock}
title="提示" title="提示"
content="该模式即将上线,敬请期待" content="该模式即将上线,敬请期待"
confirmButtonText="知道了" confirmButtonText="知道了"
textAlgin="center" textAlgin="center"
isClose={false} isClose={false}
close={this.onModeLockClose} close={this.onModeLockClose}

@ -45,13 +45,13 @@ export default class InstrumentManage extends Component<any, any> {
async onLoad() { async onLoad() {
this.initData(); this.initData();
} }
componentDidMount() {} componentDidMount() { }
componentWillUnmount() {} componentWillUnmount() { }
componentDidShow() {} componentDidShow() { }
componentDidHide() {} componentDidHide() { }
async initData() { async initData() {
this.bindingInstrumentList(); this.bindingInstrumentList();
@ -127,7 +127,7 @@ export default class InstrumentManage extends Component<any, any> {
<Block> <Block>
<Navbar titleSlot="设备管理" background="#fff" isBack={true} /> <Navbar titleSlot="设备管理" background="#fff" isBack={true} />
<View className="instrument_box"> <View className="instrument_box">
{bindList.length && ( {bindList.length > 0 &&
<Block> <Block>
<View className="title"></View> <View className="title"></View>
<View className="scroll"> <View className="scroll">
@ -220,8 +220,7 @@ export default class InstrumentManage extends Component<any, any> {
</ScrollView> */} </ScrollView> */}
</View> </View>
</Block> </Block>
)} }
<View className="title"></View> <View className="title"></View>
<View className="scroll"> <View className="scroll">
<ScrollView scroll-x="true" className="un_bind_list"> <ScrollView scroll-x="true" className="un_bind_list">

@ -39,6 +39,14 @@ page {
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
} }
.footer1 {
background: #ffffff;
justify-content: center;
display: flex;
align-items: center;
margin: 110rpx 0 36rpx 0;
}
.title { .title {
font-size: 48rpx; font-size: 48rpx;
font-weight: 400; font-weight: 400;
@ -61,6 +69,19 @@ page {
} }
.btn_login { .btn_login {
width: 540rpx;
height: 90rpx;
background: #000000;
border-radius: 45rpx;
color: #fff;
line-height: 90rpx;
font-size: 32rpx;
font-weight: bold;
text-align: center;
margin: 0;
}
.btn_login1 {
width: 690rpx; width: 690rpx;
height: 90rpx; height: 90rpx;
background: #000000; background: #000000;
@ -120,12 +141,11 @@ page {
} }
.text { .text {
height: 28rpx; font-size: 32rpx;
font-size: 30rpx; font-family: PingFang SC;
font-weight: 400; font-weight: bold;
color: #030000; color: #000000;
line-height: 60rpx; margin-left: 48rpx;
margin-bottom: 40rpx;
} }
.btn_ok { .btn_ok {

@ -39,6 +39,8 @@ class Register extends Component<any, any> {
showPrivacyContent: false, showPrivacyContent: false,
// isRead: true, // isRead: true,
fromUrl: "", fromUrl: "",
serial: Taro.getStorageSync("serial"),
}; };
} }
@ -54,7 +56,11 @@ class Register extends Component<any, any> {
url: "/pages/index/index", url: "/pages/index/index",
}); });
}; };
back() {
Taro.navigateBack({
delta: 1,
})
}
onDisagreeTap = () => { onDisagreeTap = () => {
// 关闭小程序 // 关闭小程序
Taro.exitMiniProgram({}); Taro.exitMiniProgram({});
@ -147,13 +153,13 @@ class Register extends Component<any, any> {
go("/pages/userPolicy/userPolicy"); go("/pages/userPolicy/userPolicy");
}; };
componentDidMount() {} componentDidMount() { }
componentWillUnmount() {} componentWillUnmount() { }
componentDidShow() {} componentDidShow() { }
componentDidHide() {} componentDidHide() { }
async initData() { async initData() {
const { data } = await MpSplashDetail({ const { data } = await MpSplashDetail({
@ -167,7 +173,7 @@ class Register extends Component<any, any> {
} }
render() { render() {
let { isChecked, bg, isButtonDisabled } = this.state; let { isChecked, bg, isButtonDisabled, serial } = this.state;
return ( return (
<Block> <Block>
<View> <View>
@ -193,16 +199,37 @@ class Register extends Component<any, any> {
</View> </View>
</View> </View>
<Button {
type="primary" serial && <View className='footer1' >
disabled={!isChecked || isButtonDisabled} <Button
open-type="getPhoneNumber" type="primary"
className={classnames("btn_login")} disabled={!isChecked || isButtonDisabled}
onGetPhoneNumber={this.onSubmit} open-type="getPhoneNumber"
onClick={this.changeGetPhoneNumberBtn} className={classnames("btn_login")}
> onGetPhoneNumber={this.onSubmit}
onClick={this.changeGetPhoneNumberBtn}
</Button> >
</Button>
<View className="text" onClick={this.back}>
>
</View>
</View>
}
{
!serial && <Button
type="primary"
disabled={!isChecked || isButtonDisabled}
open-type="getPhoneNumber"
className={classnames("btn_login1")}
onGetPhoneNumber={this.onSubmit}
onClick={this.changeGetPhoneNumberBtn}
>
</Button>
}
<View className="checked_box"> <View className="checked_box">
{isChecked ? ( {isChecked ? (
<Image <Image

Loading…
Cancel
Save