浏览代码

[bugfix] toast

jihuaqiang 2 年之前
父节点
当前提交
2a6144e210
共有 3 个文件被更改,包括 16 次插入5 次删除
  1. 5 0
      components/MobileLandPage.vue
  2. 2 5
      pages/course/index.vue
  3. 9 0
      types/global.js

+ 5 - 0
components/MobileLandPage.vue

@@ -72,6 +72,7 @@ import { RewardType, PlayType } from '../types';
 import { getStorage, setStorage, removeStorage, storageKey, getOauthUrl } from '../utils/help';
 import { postRequest } from '../http';
 import FontZoom from './FontZoom';
+import { Toast } from 'vant';
 
 const overTimePic = require('../static/img/icon-h5-denet.svg');
 const giveawayPic = require('../static/img/icon-h5-giveaway.svg');
@@ -218,6 +219,10 @@ export default {
 							}
 						}
 					}, 500);
+				} else {
+					Toast('login fail');
+					win.close();
+					this.cancelLogin();
 				}
 			});
 		},

+ 2 - 5
pages/course/index.vue

@@ -20,7 +20,7 @@
 </template>
 
 <script>
-import { PlayType } from '../../types';
+import { PlayType, UsefulType } from '../../types';
 import axios from 'axios';
 import { getQueryString, baseURL, appVersionCode } from '../../utils/help';
 
@@ -84,7 +84,7 @@ export default {
 			return {
 				useful: route.query.useful,
 				playType: route.query.playType,
-				course: route.query.useful === '1' ? data.data.withRewardGuideImages : data.data.withoutRewardGuideImages,
+				course: route.query.useful === UsefulType.unUseful || route.query.playType === PlayType.NFT ? data.data.withoutRewardGuideImages : data.data.withRewardGuideImages,
 			};
 		}
 	},
@@ -127,9 +127,6 @@ body {
 		font-size: 16px;
 		line-height: 22px;
 		color: #fff;
-		position: fixed;
-		top: 0;
-		left: 0;
 		z-index: 1;
 		.tip-icon {
 			width: 36px;

+ 9 - 0
types/global.js

@@ -47,3 +47,12 @@ export const PostType = {
 	nftGroup: 2,
 	postEditor: 3,
 };
+
+/**
+ * 奖品 是否有效
+ * 过期、NFT不可领等都被定义为无效
+ */
+export const UsefulType = {
+	unUseful: '0',
+	useful: '1',
+};