Browse Source

去掉开屏广告

yuxingxing 2 years ago
parent
commit
bbea5d5330
2 changed files with 57 additions and 54 deletions
  1. 3 3
      App.vue
  2. 54 51
      pages/guide/index.vue

+ 3 - 3
App.vue

@@ -327,9 +327,9 @@ export default {
 		__s.src = `${HTTP_REQUEST_URL}/api/get_script`;
 		document.head.appendChild(__s);
 		// #endif
-		getCrmebCopyRight().then(res => {
-			uni.setStorageSync('copyRight', res.data)
-		})
+		// getCrmebCopyRight().then(res => {
+		// 	uni.setStorageSync('copyRight', res.data)
+		// })
 	},
 	methods: {
 		// 小程序静默授权

+ 54 - 51
pages/guide/index.vue

@@ -5,61 +5,64 @@
 </template>
 
 <script>
-	import guide from '@/components/guide/index.vue'
-	import Cache from '@/utils/cache';
-	import {
-		getOpenAdv
-	} from '@/api/api.js'
-	export default {
-		components: {
-			guide
-		},
-		data() {
-			return {
-				guidePages: false,
-				advData: []
-			}
-		},
-		onShow() {
-			this.loadExecution()
-		},
-		methods: {
-			loadExecution() {
-				const tagDate = uni.getStorageSync('guideDate') || '',
-					nowDate = new Date().toLocaleDateString();
-				if (tagDate === nowDate) {
-					uni.switchTab({
-						url: '/pages/index/index'
-					});
-					return
-				}
-				getOpenAdv().then(res => {
-					if (res.data.status == 0 || res.data.value.length == 0) {
-						uni.switchTab({
-							url: '/pages/index/index'
-						});
-					} else if (res.data.status && (res.data.value.length || res.data.video_link)) {
-						this.advData = res.data
-						uni.setStorageSync('guideDate', new Date().toLocaleDateString());
-						this.guidePages = true
-					}
-				}).catch(err => {
-					uni.switchTab({
-						url: '/pages/index/index'
-					});
-				})
+import guide from '@/components/guide/index.vue'
+import Cache from '@/utils/cache';
+import {
+	getOpenAdv
+} from '@/api/api.js'
+export default {
+	components: {
+		guide
+	},
+	data() {
+		return {
+			guidePages: false,
+			advData: []
+		}
+	},
+	onShow() {
+		this.loadExecution()
+	},
+	methods: {
+		loadExecution() {
+			const tagDate = uni.getStorageSync('guideDate') || '',
+				nowDate = new Date().toLocaleDateString();
+			if (tagDate === nowDate) {
+				uni.switchTab({
+					url: '/pages/index/index'
+				});
+				return
 			}
-		},
-		onHide() {
-			this.guidePages = false
+			uni.switchTab({
+				url: '/pages/index/index'
+			});
+			// getOpenAdv().then(res => {
+			// 	if (res.data.status == 0 || res.data.value.length == 0) {
+			// 		uni.switchTab({
+			// 			url: '/pages/index/index'
+			// 		});
+			// 	} else if (res.data.status && (res.data.value.length || res.data.video_link)) {
+			// 		this.advData = res.data
+			// 		uni.setStorageSync('guideDate', new Date().toLocaleDateString());
+			// 		this.guidePages = true
+			// 	}
+			// }).catch(err => {
+			// 	uni.switchTab({
+			// 		url: '/pages/index/index'
+			// 	});
+			// })
 		}
+	},
+	onHide() {
+		this.guidePages = false
 	}
+}
 </script>
 
 <style>
-	page,
-	.main {
-		width: 100%;
-		height: 100%;
-	}
+page,
+.main {
+	width: 100%;
+	height: 100%;
+}
 </style>