临时保存

master
blak-kong 2 years ago
parent a4f5c3be86
commit 217d7255fa

@ -345,7 +345,6 @@ export default class Instrument extends Component<any, any> {
serial: channelInfo.serial, serial: channelInfo.serial,
instrumentId: channelInfo.id, instrumentId: channelInfo.id,
}); });
console.log("bindingInstrument", res);
Taro.hideLoading(); Taro.hideLoading();
if (res.data.code === 200) { if (res.data.code === 200) {
// this.setState({ isVisibleBinding: false }); // this.setState({ isVisibleBinding: false });
@ -402,7 +401,7 @@ export default class Instrument extends Component<any, any> {
} = this.state; } = this.state;
return ( return (
<Block> <Block>
{/* <PopupAlert <PopupAlert
isShow={true} isShow={true}
isClose={true} isClose={true}
title="提示" title="提示"
@ -411,7 +410,7 @@ export default class Instrument extends Component<any, any> {
textAlgin="center" textAlgin="center"
close={this.closeDev} close={this.closeDev}
confirm={this.closeDev} confirm={this.closeDev}
/> */} />
<Navbar titleSlot="仪器绑定" isBack={true} /> <Navbar titleSlot="仪器绑定" isBack={true} />
<PopupAlert <PopupAlert
isShow={isBindingError} isShow={isBindingError}

@ -143,6 +143,10 @@ class IntegralList extends Component<any, any> {
// 用户是否已关闭提醒 // 用户是否已关闭提醒
GetOfficialAccount = async () => { GetOfficialAccount = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let res = await GetOfficialAccount(); let res = await GetOfficialAccount();
if (res.data.code === 200) { if (res.data.code === 200) {
if (!res.data.data) { if (!res.data.data) {
@ -153,8 +157,11 @@ class IntegralList extends Component<any, any> {
}; };
// 用户是否关注公众号 // 用户是否关注公众号
GetIsAttentionOfficialAccount = async () => { GetIsAttentionOfficialAccount = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let res = await GetIsAttentionOfficialAccount(); let res = await GetIsAttentionOfficialAccount();
console.log("GetIsAttentionOfficialAccount", res);
if (res.data.code === 200) { if (res.data.code === 200) {
if (!res.data.data) { if (!res.data.data) {
// 如果false则是没关注 // 如果false则是没关注
@ -174,6 +181,10 @@ class IntegralList extends Component<any, any> {
}; };
GetObtainUserIntegral = async () => { GetObtainUserIntegral = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let { list, pageNum, pageSize } = this.state; let { list, pageNum, pageSize } = this.state;
let res = await GetObtainUserIntegral({ let res = await GetObtainUserIntegral({
pageNum, pageNum,
@ -195,6 +206,10 @@ class IntegralList extends Component<any, any> {
}; };
GetIntegralRule = async () => { GetIntegralRule = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let res = await GetIntegralRule(); let res = await GetIntegralRule();
console.log("GetIntegralRule", res); console.log("GetIntegralRule", res);
if (res.data.code === 200) { if (res.data.code === 200) {

@ -116,6 +116,11 @@ class User extends Component<any, any> {
}); });
}; };
// 开发中弹窗
devOpen = (e) => {
this.setState({ isDev: true });
};
// 不检查登录跳转 // 不检查登录跳转
goUrlNoRegister = (e) => { goUrlNoRegister = (e) => {
let url = e.currentTarget.dataset.url; let url = e.currentTarget.dataset.url;
@ -265,7 +270,8 @@ class User extends Component<any, any> {
<View <View
className="block" className="block"
data-url="/pages/instrument_manage/index?isback=1" data-url="/pages/instrument_manage/index?isback=1"
onClick={this.goUrlNoRegister} // onClick={this.goUrlNoRegister}
onClick={this.devOpen}
> >
<Image <Image
className="bg_img" className="bg_img"

@ -1,4 +1,11 @@
import { go, back, showModal, setStorageSync, getStorageSync } from "./traoAPI"; import {
go,
back,
showModal,
setStorageSync,
getStorageSync,
loading,
} from "./traoAPI";
import { WCUserLogin } from "./Interface"; import { WCUserLogin } from "./Interface";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
import formdata from "./wxFormdata/formData"; import formdata from "./wxFormdata/formData";
@ -20,6 +27,8 @@ export const Ajax = (params) => {
// mask: true, // mask: true,
// }); // });
const whiteListLoading = [""]; // loading
// 防止多次点击 // 防止多次点击
const requestUrlList = global_requestUrlList; const requestUrlList = global_requestUrlList;
const whiteList = []; // 白名单:不自动重新请求 const whiteList = []; // 白名单:不自动重新请求
@ -88,7 +97,10 @@ export const Ajax = (params) => {
// }); // });
}, },
complete() { complete() {
Taro.hideLoading(); if (requestUrlList.length === 0) {
Taro.hideLoading();
}
// const requestUrlList = global_requestUrlList; // const requestUrlList = global_requestUrlList;
// const newRequestUrlList = requestUrlList.splice( // const newRequestUrlList = requestUrlList.splice(
// requestUrlList.indexOf(params.url), // requestUrlList.indexOf(params.url),

Loading…
Cancel
Save