电子商城测试版v2

This commit is contained in:
2022-06-27 10:19:48 +08:00
parent 3d349d405a
commit 3a92a22472
4 changed files with 12 additions and 6 deletions
+2 -2
View File
@@ -85,6 +85,8 @@ const showStatus = (status) => {
return `${message},请检查网络或联系管理员!`
}
//登录状态
const loginStatus: false|true = false // true:登录中
/**
* axios 请求状态封装,返回响应式数据 fetch(), loading, error, code, msg 等常用方法/状态
@@ -133,7 +135,6 @@ export const useRequest = (options:option = {
const fetchData = async (sub_options?:any) => {
stateRef.current.loading = true
setState((e) => ({...e, loading:true}))
console.log('tf:::', stateRef.current.loading)
stateRef.current.query = {
...sub_options,
...options.pagination && {
@@ -161,7 +162,6 @@ export const useRequest = (options:option = {
}
}
const result = await Taro.request(q as any)
const { statusCode } = result
const {
code,