注释掉前端用的测试按钮

master
blak-kong 2 years ago
parent 497027c311
commit caa8c853dd

@ -175,20 +175,24 @@ class Index extends Component<any, any> {
componentDidShow() {
const tabbar = Taro.getTabBar<CustomTabBar>(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<any, any> {
}
// 非扫码进入小程序,需判断是否跳转欢迎页;扫码进入小程序,先缓存序列号,再检测隐私弹窗
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<any, any> {
// 是否可以运行扫码逻辑:每次扫码后设为真,
Taro.setStorageSync("isScanRun", true);
if (url) {
let _url = decodeURIComponent(url);
if (_url.indexOf("?")) {
@ -331,7 +333,7 @@ class Index extends Component<any, any> {
// }
}
// this.removeScanFun();
}
};
initPageData = async () => {
const mobile = Taro.getStorageSync("mobile");
const isToken = getStorageSync("token");
@ -342,12 +344,10 @@ class Index extends Component<any, any> {
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<any, any> {
};
// 根据扫码的序列号获取仪器信息
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<any, any> {
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<any, any> {
)}
</View>
<View style="margin: 20px">
<View onClick={this.goIot}></View>
</View>
<View className="infobox3">
<Swiper
autoplay

Loading…
Cancel
Save