wangxy 8 月之前
父節點
當前提交
e26ebd5463
共有 12 個文件被更改,包括 7 次插入388 次删除
  1. 2 42
      App.vue
  2. 0 24
      api/catalogue.js
  3. 0 24
      api/game.js
  4. 0 63
      api/learnPlan.js
  5. 4 47
      api/login.js
  6. 0 12
      api/my.js
  7. 0 45
      api/order.js
  8. 0 38
      api/shipin.js
  9. 0 36
      api/unitTest.js
  10. 0 25
      api/wrong.js
  11. 1 1
      config.js
  12. 0 31
      utils/common.js

+ 2 - 42
App.vue

@@ -4,24 +4,14 @@
 	} from "@dcloudio/uni-app"
 	import {
 		toast,
-		getUserIdentity
 	} from "@/utils/common";
 	import cacheManager from "@/utils/cacheManager.js";
 	export default {
-			
 		// creat by wgy 0619  生命周期 钩子  
 		onLaunch: function() {
 			// #ifdef APP-PLUS
 			if (cacheManager.get('auth')) {
-				uni.reLaunch({
-					url: `/pages/study/index`,
-					success() {
-						  plus.navigator.closeSplashscreen();
-					}
-				})
-			}else if(cacheManager.get('wxLogin') &&!(cacheManager.get('wxLogin').bind)){
-					console.log('微信登录且未绑定')
-				// 微信登录且未绑定 
+		
 			} else {
 				cacheManager.clearAll()
 				uni.reLaunch({
@@ -31,24 +21,11 @@
 					}
 				});
 			}
-					// #endif
+			// #endif
 		},
 		onShow: function() {
 
 			// #ifdef APP-PLUS
-			// if (cacheManager.get('auth')) {	
-			// 	uni.reLaunch({
-			// 		url: `/pages/study/index`
-			// 	})
-			// }else if(!(cacheManager.get('wxLogin').bind)){
-			// 		console.log('asdfadsfadsfasd')
-			// 	// 微信登录且未绑定 
-			// } else {
-			// 	cacheManager.clearAll()
-			// 	uni.redirectTo({
-			// 		url: '/pages/login/index' 
-			// 	});
-			// }
 			const webview = plus.webview.currentWebview();
 			plus.key.addEventListener('backbutton', () => {
 				event.preventDefault();
@@ -57,23 +34,6 @@
 			// #endif
 		},
 		onHide: function() {
-	// 	//	console.log('App Hide')
-	// 	// #ifdef APP-PLUS
-	// 	if (cacheManager.get('auth')) {	
-	// 		uni.reLaunch({
-	// 			url: `/pages/study/index`
-	// 		})
-	// 	}else if(!(cacheManager.get('wxLogin').bind)){
-	// 			console.log('asdfadsfadsfasd')
-	// 		// 微信登录且未绑定 
-	// 	} else {
-	// 		cacheManager.clearAll()
-	// 		uni.redirectTo({
-	// 			url: '/pages/login/index' 
-	// 		});
-	// 	}
-	
-	// 	// #endif
 
 		}
 	}

+ 0 - 24
api/catalogue.js

@@ -1,24 +0,0 @@
-import request from '@/utils/request'
-export function getCatalogue(data = {}) {
-	return request({
-		url: "/common/zhangjie/list",
-		headers: {
-			isToken: true
-		},
-		method: 'post',
-		data,
-		timeout: 20000
-	})
-}
-
-export function getCardOnline(data = {}) {
-	return request({
-		url: "/common/card/online",
-		headers: {
-			isToken: true
-		},
-		method: 'post',
-		data,
-		timeout: 20000
-	})
-}

+ 0 - 24
api/game.js

@@ -1,24 +0,0 @@
-import request from '@/utils/request'
-export function getYouxiInfo(data = {}) {
-    return request({
-        'url': '/app/youxi/info',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}
-
-export function getYouxiWeishi(data = {}) {
-    return request({
-        'url': '/app/youxi/weishi',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}

+ 0 - 63
api/learnPlan.js

@@ -1,63 +0,0 @@
-import request from '@/utils/request'
-export function userLocate(data = {}) {
-  return request({
-    'url': '/app/user/locate',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-
-
-
-export function userZhangInfo(data = {}) {
-  return request({
-    'url': '/app/user/zhang/info',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function getCommonZhangInfo(data = {}) {
-  return request({
-    'url': '/common/zhang/info',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function userZhangForntInfo(data = {}) {
-  return request({
-    'url': '/app/user/zhang/frontinfo',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function userZhangNextInfo(data = {}) {
-  return request({
-    'url': '/app/user/zhang/nextinfo',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 4 - 47
api/login.js

@@ -1,40 +1,8 @@
 import request from '@/utils/request'
-export function sendCode(data = {}) {
-  return request({
-    'url': '/common/app/send/code',
-    headers: {
-      isToken: false
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
+
 export function login(data = {}) {
   return request({
-    'url': '/common/app/login/code',
-    headers: {
-      isToken: false
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function logout(data = {}) {
-  return request({
-    'url': '/app/user/my/logout',
-    headers: {
-      isToken: false
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function wxLogin(data = {}) {
-  return request({
-    'url': '/common/app/login/weixin',
+    'url': '/common/app/login',
     headers: {
       isToken: false
     },
@@ -44,9 +12,9 @@ export function wxLogin(data = {}) {
   })
 }
 
-export function telBind(data = {}) {
+export function getConfig(data = {}) {
   return request({
-    'url': '/app/user/my/change/tel',
+    'url': '/common/app/config',
     headers: {
       isToken: false
     },
@@ -55,14 +23,3 @@ export function telBind(data = {}) {
     timeout: 20000
   })
 }
-export function firstTelBind(data = {}) {
-  return request({
-    'url': '/common/app/bind/code',
-    headers: {
-      isToken: false
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 12
api/my.js

@@ -1,12 +0,0 @@
-import request from '@/utils/request'
-export function myInfo(data = {}) {
-  return request({
-    'url': '/app/user/my/info',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 45
api/order.js

@@ -1,45 +0,0 @@
-import request from '@/utils/request'
-export function getOrderList(data = {}) {
-  return request({
-    'url': '/app/order/list',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderAdd(data = {}) {
-  return request({
-    'url': '/app/order/add',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderPayAli(data = {}) {
-  return request({
-    'url': '/app/order/pay/ali',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-export function orderPayWx(data = {}) {
-  return request({
-    'url': '/app/order/pay/wx',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 38
api/shipin.js

@@ -1,38 +0,0 @@
-import request from '../utils/request.js'
-
-
-export function getVideoAuth(data = {}) {
-  return request({
-    'url': '/app/video/auth',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function getVideoAuthYk(data = {}) {
-  return request({
-    'url': '/common/video/auth',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function videoWancheng(data = {}) {
-  return request({
-    'url': '/app/user/wancheng',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 36
api/unitTest.js

@@ -1,36 +0,0 @@
-import request from '@/utils/request'
-export function getExamData(data = {}) {
-  return request({
-    'url': '/app/shiti/list',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function getExamSubmit(data = {}) {
-  return request({
-    'url': '/app/shiti/save',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}
-
-export function getnextZhangInfo(data = {}) {
-  return request({
-    'url': '/app/user/zhang/nextinfo',
-    headers: {
-      isToken: true
-    },
-    method: 'post',
-    data,
-    timeout: 20000
-  })
-}

+ 0 - 25
api/wrong.js

@@ -1,25 +0,0 @@
-import request from '@/utils/request'
-export function getWrongData(data = {}) {
-    return request({
-        'url': '/app/cuoti/index',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}
-
-
-export function getWrongInfo(data = {}) {
-    return request({
-        'url': '/app/cuoti/list',
-        headers: {
-            isToken: true
-        },
-        method: 'post',
-        data,
-        timeout: 20000
-    })
-}

+ 1 - 1
config.js

@@ -1,6 +1,6 @@
 // 应用全局配置
 export default   {
-  baseUrl: 'https://goosechampion.com/api',
+  baseUrl: 'https://kf3.mtavip.com/api',
   // baseUrl: 'http://localhost:8080',
   // 应用信息
   appInfo: {

+ 0 - 31
utils/common.js

@@ -53,37 +53,6 @@ export function catchError(promise) {
 	})
 }
 
-// 是否是会员
-export function getUserIdentity() {
-	const auth = cacheManager.get('auth');
-	if (auth) {
-		if (auth.cardList.some(item => item == auth.cardId)) {
-			// VIP
-			return 'VIP'
-		}
-		// 非VIP
-		return 'Not-Vip';
-	} else {
-		// 游客
-		return 'Visitor';
-	}
-}
-
-export function hasUserIdentity() {
-	const auth = cacheManager.get('auth');
-	if (auth) {
-		if (auth.cardList.length) {
-			// VIP
-			return 'VIP'
-		}
-		// 非VIP
-		return 'Not-Vip';
-	} else {
-		// 游客
-		return 'Visitor';
-	}
-}
-
 export function debounce(func, wait) {
   let timeout;