Commit 681580bc authored by 郝聪敏's avatar 郝聪敏

fix: 去掉loading、修改神策线上地址

parent 2a40e797
......@@ -6,6 +6,6 @@ export default {
basicHost: "https://mangguo.qthbx.com/api/",
sharePath: "https://mangguo.qthbx.com/share.html#",
wxAppId: "wx514de17b23d53a20",
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`, // 神策数据请求地址
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=production`, // 神策数据请求地址
test: false
};
//引入axios
import store from "@/store";
// import store from "@/store";
import router from "@/router";
import axios from "axios";
import cherry from "@qg/cherry-ui";
......@@ -31,19 +31,21 @@ axios.defaults.timeout = 30000;
const wait = async seconds => new Promise(resolve => setTimeout(resolve, seconds));
// 体验优化暂时下掉loading
function beforeRequest() {
reqNum++;
store.dispatch("setIsLoading", true);
// store.dispatch("setIsLoading", true);
}
function afterRequest() {
setTimeout(clearRequest, 300);
clearRequest();
// setTimeout(clearRequest, 300);
}
function clearRequest() {
reqNum--;
if (reqNum <= 0) {
store.dispatch("setIsLoading", false);
// store.dispatch("setIsLoading", false);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment