diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 121f6bb..c6bc829 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -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 { // pageCtx = Taro.getCurrentInstance().page; $instance = Taro.getCurrentInstance(); @@ -147,9 +147,9 @@ class Index extends Component { } } - componentDidMount() {} + componentDidMount() { } - componentWillUnmount() {} + componentWillUnmount() { } componentDidShow() { const tabbar = Taro.getTabBar(this.$instance.page); @@ -158,7 +158,7 @@ class Index extends Component { this.showInit(); } - componentDidHide() {} + componentDidHide() { } showInit() { // 判断是否登录 @@ -185,6 +185,9 @@ class Index extends Component { 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 { this.isSancQrcodeEnter(); } }, - fail: () => {}, + fail: () => { }, complete: () => { // 授权完成运行页面初始化 }, @@ -363,7 +366,7 @@ class Index extends Component { this.setState({ isShowSiteSwiper: false }); }; - bannerSwiperchange() {} + bannerSwiperchange() { } gobanner(item) { // 跳转类型:0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间', @@ -775,6 +778,7 @@ class Index extends Component { isExchangeBinding, instrumentInfo, instrumentList, + showEquipment, // 蓝牙连接 isConnectShow, @@ -786,21 +790,21 @@ class Index extends Component { @@ -820,30 +824,47 @@ class Index extends Component { /> 序列号信息仍在更新,请联系微信小助理 协助您绑定仪器 } - confirmButtonText="知道了" - textAlgin="center" + confirmButtonText='知道了' + textAlgin='center' isClose={false} close={this.onBindErrorClose} confirm={this.onBindErrorConfirm} > + + 仪器:小紫单美容仪 + 序列号:uniquie14231 + 您需要完成注册登录才能进行一起绑定 + + } + confirmButtonText='知道了' + textAlgin='center' + isClose={false} + close={this.onBindErrorClose} + confirm={this.onBindErrorConfirm} + > + {/* { @@ -875,31 +896,31 @@ class Index extends Component { leftSlot={ - {messagecount ? : ""} + {messagecount ? : ""} } /> - - - 护理记录 + + + 护理记录 - + { /> - + {instrumentList.length > 0 && ( - - 前往护理 + + 前往护理 - 添加新设备 + 添加新设备 - - + + {instrumentList.map((item, index) => { if (item.status === 0) { return ( - + {item.name} @@ -956,34 +977,34 @@ class Index extends Component { )} {instrumentList.length === 0 && ( - - 前往护理 + + 前往护理 - - - + + + - + 添加新设备 - 您暂时还没有绑定任何设备 + 您暂时还没有绑定任何设备 )} - + 假按钮跳转蓝牙调试设备页 - + @@ -993,13 +1014,13 @@ class Index extends Component { key={"banner_" + index} onClick={this.gobanner.bind(this, item)} > - + ); })} - + ); } diff --git a/src/pages/instrument/intro.tsx b/src/pages/instrument/intro.tsx index 7f345a2..92a0616 100644 --- a/src/pages/instrument/intro.tsx +++ b/src/pages/instrument/intro.tsx @@ -88,7 +88,7 @@ class Intro extends Component { // setStorageSync("introduceId", info.id); // } const url = "/pages/index/index"; - Taro.switchTab({ + Taro.switchTab({ url, }); } diff --git a/src/pages/instrument_manage/index.tsx b/src/pages/instrument_manage/index.tsx index 893069e..f1bbe04 100644 --- a/src/pages/instrument_manage/index.tsx +++ b/src/pages/instrument_manage/index.tsx @@ -45,13 +45,13 @@ export default class InstrumentManage extends Component { 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 { - {bindList.length && ( + {bindList.length > 0 && 我的设备 @@ -220,8 +220,7 @@ export default class InstrumentManage extends Component { */} - )} - + } 未绑定的仪器 diff --git a/src/pages/register/register.less b/src/pages/register/register.less index 1d14250..523dadc 100644 --- a/src/pages/register/register.less +++ b/src/pages/register/register.less @@ -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 { diff --git a/src/pages/register/register.tsx b/src/pages/register/register.tsx index 47b8859..e132518 100644 --- a/src/pages/register/register.tsx +++ b/src/pages/register/register.tsx @@ -39,6 +39,8 @@ class Register extends Component { showPrivacyContent: false, // isRead: true, fromUrl: "", + serial: Taro.getStorageSync("serial"), + }; } @@ -54,7 +56,11 @@ class Register extends Component { url: "/pages/index/index", }); }; - + back() { + Taro.navigateBack({ + delta: 1, + }) + } onDisagreeTap = () => { // 关闭小程序 Taro.exitMiniProgram({}); @@ -147,13 +153,13 @@ class Register extends Component { 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 { } render() { - let { isChecked, bg, isButtonDisabled } = this.state; + let { isChecked, bg, isButtonDisabled, serial } = this.state; return ( @@ -193,16 +199,37 @@ class Register extends Component { ,并完成注册登录 - + { + serial && + + + 跳过 > + + + + } + { + !serial && + } + {isChecked ? (