电子商城测试版v2
This commit is contained in:
+2
-2
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user