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>{dayjsDate.format(monthFormat)}</Text> */}
<Text style={{ fontSize: "36rpx", fontWeight: "600" }}>
<Text style={{ fontSize: "32rpx", fontWeight: "600" }}>
{dayjsDate.format("YYYY.MM.DD")}
</Text>
<View style="margin-left: 34rpx;">
<Image
src={require("../img/calendar.png")}
style="width:34rpx;height:34rpx;"
style="width:28rpx;height:28rpx;"
/>
</View>
</View>

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

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

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

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

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

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

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

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

Loading…
Cancel
Save