|
@@ -0,0 +1,28 @@
|
|
|
+import store from '../store'
|
|
|
+let list = [
|
|
|
+ "https://judg.oliug.cn",
|
|
|
+ "https://ftcfg.oliug.cn",
|
|
|
+ "https://dfrdc.oliug.cn",
|
|
|
+ "https://djk.vwetdd.cn",
|
|
|
+ "https://xk.vwetdd.cn",
|
|
|
+ "https://xinkong.vwetdd.cn ",
|
|
|
+];
|
|
|
+let httpIndex = uni.getStorageSync("httpIndex") || 0;
|
|
|
+export default function getIndexHttp () {
|
|
|
+ console.log(httpIndex,'httpIndex')
|
|
|
+ const http = list[httpIndex];
|
|
|
+ uni.request({
|
|
|
+ url:http +"/api/index",
|
|
|
+ success() {
|
|
|
+ console.log(http,'http')
|
|
|
+ store.commit('setHttp',http);
|
|
|
+ uni.setStorageSync("httpIndex",httpIndex);
|
|
|
+ },
|
|
|
+ fail() {
|
|
|
+ console.log(res,'失败')
|
|
|
+ httpIndex++;
|
|
|
+ getIndexHttp();
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+}
|