From 497027c311329fdb18abb0b84018cdd47f1c4c65 Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Thu, 14 Mar 2024 08:59:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=97=A5=E5=8E=86=E5=BF=AB=E9=80=9F=E7=82=B9=E5=87=BBbug?= =?UTF-8?q?=E5=92=8C=E5=BA=95=E9=83=A8tabbar=E6=B8=85=E7=A9=BA=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=B7=B3=E8=BD=ACbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/calendar/body/index.tsx | 7 ++++++- src/custom-tab-bar/index.tsx | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/calendar/body/index.tsx b/src/components/calendar/body/index.tsx index 5a749d5..7e662f3 100644 --- a/src/components/calendar/body/index.tsx +++ b/src/components/calendar/body/index.tsx @@ -3,6 +3,8 @@ import dayjs from "dayjs"; import React from "react"; import Taro, { Events } from "@tarojs/taro"; +import { throttle } from "lodash"; + import { Swiper, SwiperItem, View, Image } from "@tarojs/components"; import { BaseEventOrig, @@ -429,7 +431,10 @@ export default class AtCalendarBody extends React.Component { - + Date: Thu, 14 Mar 2024 09:12:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E7=94=A8=E7=9A=84=E6=B5=8B=E8=AF=95=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.tsx | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index f2d8273..fbfc699 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -175,20 +175,24 @@ class Index extends Component { componentDidShow() { const tabbar = Taro.getTabBar(this.$instance.page); tabbar?.setSelected(0); - console.log(this.state.instrumentInfo, '查看', this.state.instrumentList, Taro.getStorageSync("skipRegister")); + console.log( + this.state.instrumentInfo, + "查看", + this.state.instrumentList, + Taro.getStorageSync("skipRegister") + ); const handleAsyncLogic = async () => { // 判断是否跳过了注册 if (Taro.getStorageSync("skipRegister")) { await this.EquipmentNo(); // 扫码序列号查询:注册后才调用,因为扫码未注册直接跳转注册页 this.setState({ showEquipment: true }); Taro.removeStorageSync("skipRegister"); - } else { // 已注册且非跳过,正常执行逻辑 this.showInit(); } - } - handleAsyncLogic() + }; + handleAsyncLogic(); } componentDidHide() { @@ -216,7 +220,7 @@ class Index extends Component { } // 非扫码进入小程序,需判断是否跳转欢迎页;扫码进入小程序,先缓存序列号,再检测隐私弹窗 let serial = Taro.getStorageSync("serial"); - console.log(this.$instance, '2222', serial); + console.log(this.$instance, "2222", serial); let url = this.$instance.router?.params?.q || ""; if (!url) { // 非扫码或扫码已跳转的返回进入 @@ -231,8 +235,6 @@ class Index extends Component { // 是否可以运行扫码逻辑:每次扫码后设为真, Taro.setStorageSync("isScanRun", true); if (url) { - - let _url = decodeURIComponent(url); if (_url.indexOf("?")) { @@ -331,7 +333,7 @@ class Index extends Component { // } } // this.removeScanFun(); - } + }; initPageData = async () => { const mobile = Taro.getStorageSync("mobile"); const isToken = getStorageSync("token"); @@ -342,12 +344,10 @@ class Index extends Component { console.log("initPageData", Taro.getStorageSync("serial")); // 如果是扫码且已有token则跳转 if (Taro.getStorageSync("serial")) { - console.log(mobile, 'mobile'); + console.log(mobile, "mobile"); // 如果已注册绑定手机号不用跳转 if (!mobile) { - - setTimeout(() => { go("/pages/register/register"); }, 300); @@ -651,7 +651,6 @@ class Index extends Component { }; // 根据扫码的序列号获取仪器信息 getInstrumentInfoBySerial = async () => { - let url = this.$instance.router?.params?.q || ""; let isScan = Taro.getStorageSync("isScan"); // 判断是否扫码进入 let serial = Taro.getStorageSync("serial"); // 扫码可能跳转注册页,所以先缓存 @@ -659,7 +658,7 @@ class Index extends Component { let { data } = await InstrumentInfo.getInstrumentInfoBySerial({ serial: serial, }); - console.log(data, '查看赋值'); + console.log(data, "查看赋值"); if (data.code === 200) { let instrumentInfo = data.data; @@ -1389,10 +1388,6 @@ class Index extends Component { )} - - 假按钮跳转蓝牙调试设备页 - -