From bd287af666b56a3738a1ad982b5a1dbff86106b6 Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Tue, 6 Feb 2024 17:59:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.tsx | 2 +- src/pages/instrument_detail/index.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index bab8405..a5e3a89 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -581,7 +581,7 @@ class Index extends Component { /** 蓝牙逻辑 */ bindBlockLeft() { - if (!this.state.userinfo.mobile) { + if (!this.state.isRegisterBoolean) { //未注册授权 this.alertRegister(); return false; diff --git a/src/pages/instrument_detail/index.tsx b/src/pages/instrument_detail/index.tsx index e3f63f6..ab0a57b 100644 --- a/src/pages/instrument_detail/index.tsx +++ b/src/pages/instrument_detail/index.tsx @@ -1,6 +1,8 @@ import Taro from "@tarojs/taro"; import classnames from "classnames"; +import dayjs from "dayjs"; + import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Block, View, Text, Image, Input, Button } from "@tarojs/components"; import Navbar from "../../components/navbar/navbar"; @@ -43,7 +45,11 @@ export default class InstrumentDetail extends Component { instrumentId: id, }); if (res.data.code === 200) { - this.setState({ info: res.data.data }); + let info = res.data.data; + info.bindingDateTime = dayjs(info.bindingDateTime).format( + "YYYY-MM-DD hh:mm:ss" + ); + this.setState({ info: info }); } }; @@ -96,7 +102,7 @@ export default class InstrumentDetail extends Component { type="text" disabled={true} placeholder-style="color:#000000;font-size:28rpx;font-weight: 500;" - placeholder={info.updateTime} + placeholder={info.bindingDateTime} />