添加跳过按钮

master
rongweikang 2 years ago
parent 08f0c2ac84
commit 60e062680d

@ -52,13 +52,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();
@ -147,9 +147,9 @@ class Index extends Component<any, any> {
}
}
componentDidMount() {}
componentDidMount() { }
componentWillUnmount() {}
componentWillUnmount() { }
componentDidShow() {
const tabbar = Taro.getTabBar<CustomTabBar>(this.$instance.page);
@ -158,7 +158,7 @@ class Index extends Component<any, any> {
this.showInit();
}
componentDidHide() {}
componentDidHide() { }
showInit() {
// 判断是否登录
@ -185,6 +185,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");
}
}
}
}
@ -205,7 +208,7 @@ class Index extends Component<any, any> {
this.isSancQrcodeEnter();
}
},
fail: () => {},
fail: () => { },
complete: () => {
// 授权完成运行页面初始化
},
@ -363,7 +366,7 @@ class Index extends Component<any, any> {
this.setState({ isShowSiteSwiper: false });
};
bannerSwiperchange() {}
bannerSwiperchange() { }
gobanner(item) {
// 跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间',
@ -775,6 +778,7 @@ class Index extends Component<any, any> {
isExchangeBinding,
instrumentInfo,
instrumentList,
showEquipment,
// 蓝牙连接
isConnectShow,
@ -786,21 +790,21 @@ class Index extends Component<any, any> {
<View catchMove>
<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}
/>
@ -820,30 +824,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>
<PopupAlert
isShow={isBeforeBinding}
title="提示"
content="您选择的仪器有误,请重新确认选择"
confirmButtonText="知道了"
textAlgin="center"
title='提示'
content='您选择的仪器有误,请重新确认选择'
confirmButtonText='知道了'
textAlgin='center'
isClose={false}
close={this.onBeforeBindClose}
confirm={this.onBeforeBindConfirm}
></PopupAlert>
<PopupAlert
isShow={showEquipment}
title='提示'
content={
<Block>
<View></View>
<View>uniquie14231</View>
<View></View>
</Block>
}
confirmButtonText='知道了'
textAlgin='center'
isClose={false}
close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm}
></PopupAlert>
{/* <PopupPrivacyTest
closePrivacy={this.closePrivacy.bind(this)}
initData={this.initData.bind(this)}
@ -852,9 +873,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}
/>
@ -875,31 +896,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}
@ -909,41 +930,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>
@ -956,34 +977,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}
>
@ -993,13 +1014,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>
);
}

@ -88,7 +88,7 @@ class Intro extends Component<any, any> {
// setStorageSync("introduceId", info.id);
// }
const url = "/pages/index/index";
Taro.switchTab({
Taro.switchTab({
url,
});
}

@ -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