nieyuge 2 anni fa
parent
commit
d3bcc0c0af

+ 236 - 0
components/MobileGuidePage.vue

@@ -0,0 +1,236 @@
+<template>
+    <div class="guide" v-if="detail">
+        <div class="header">
+            <div class="tips">
+                <img class="icon" :src="postUserInfo.avatarUrl" />
+                <span>@{{postUserInfo.nickName}}</span>
+                <span class="special">{{ playType === 3 ? 'Invite You to Hunt the Treasure' : 'Send You Giveaway!' }}</span>
+            </div>
+            <div class="gif">
+                <img :src="gifUrl" />
+            </div>
+        </div>
+        <div class="welcome">
+            <!-- 普通红包 -->
+            <template v-if="playType === 1">
+                <template v-if="postBizData.rewardType === 1">
+                    <div>
+                        <span>You Won</span>
+                        <img class="icon" :src="postBizData.currencyIconPath" />
+                        <span class="special">{{postBizData.amountValue}} {{postBizData.currencySymbol}}</span>
+                        <span class="special">(${{postBizData.usdAmountValue}})</span>
+                    </div>
+                    <div>
+                        <span>in the Giveaway!</span>
+                    </div>
+                </template>
+                <template v-else>
+                    <div>
+                        <span>You Won</span>
+                        <span class="special">{{postBizData.customizedReward}}</span>
+                    </div>
+                    <div>
+                        <span>in the Giveaway!</span>
+                    </div>
+                </template>
+            </template>
+
+            <!-- 抽奖红包 -->
+            <template v-if="playType === 2">
+                <div>
+                    <span>You are gifted an entries to earn</span>
+                </div>
+                <template v-if="postBizData.rewardType === 1">
+                    <div>
+                        <img class="icon" :src="postBizData.currencyIconPath" />
+                        <span class="special">{{postBizData.amountValue}} {{postBizData.currencySymbol}}</span>
+                        <span class="special">(${{postBizData.usdAmountValue}})</span>
+                    </div>
+                </template>
+                <template v-else>
+                    <div>
+                        <span class="special">{{postBizData.customizedReward}}</span>
+                    </div>
+                </template>
+            </template>
+
+            <!-- 夺宝红包 -->
+            <template v-if="playType === 3">
+                <div>
+                    <span>Complete the quest to win up to</span>
+                </div>
+                <div>
+                    <span class="special">${{detail.upGainAmountValue}} for you two!</span>
+                </div>
+            </template>
+        </div>
+        <div class="footer">
+            <div class="item">
+                <img class="icon" src="../static/img/icon-item1.svg" />
+                <span>First, <span class="special">Retweet</span> this tweet.</span>
+            </div>
+            <div class="item">
+                <img class="icon" src="../static/img/icon-item2.svg" />
+                <span>When you have access to your <span class="special">laptop</span>, open <span class="special">Chrome</span> and go to <span class="special">twitter.com.</span></span>
+            </div>
+            <div class="item">
+                <img class="icon" src="../static/img/icon-item3.svg" />
+                <span>Go to your profile page by clicking <span class="special">"Profile"</span> on the left column.</span>
+            </div>
+            <div class="item">
+                <img class="icon" src="../static/img/icon-item4.svg" />
+                <span>Find the tweet you retweeted, and click the giveaway, you can then install the <span class="special">DeNet Chrome Extension</span> to Get Giveaway.</span>
+            </div>
+        </div>
+        <div class="retweet">
+            <img src="../static/img/icon-retweet.svg" />
+            <span>Retweet</span>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'mobileGuidePage',
+    props: {
+        detail: {
+            type: Object,
+        },
+        postBizData: {
+            type: Object,
+        },
+        postUserInfo: {
+            type: Object,
+        },
+        playType: {
+			type: Number,
+		},
+    },
+    data() {
+        return {}
+    },
+    computed: {
+        gifUrl() {
+            let url;
+            switch(this.playType) {
+                case 1:
+                    url = require('../static/img/icon-gif-redbag.gif');
+                    break;
+                case 2:
+                    url = require('../static/img/icon-gif-draw.png');
+                    break;
+                case 3:
+                    url = require('../static/img/icon-gif-treasure.png');
+                    break;
+            }
+            return url;
+        }
+    },
+    methods: {
+
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.guide {
+    width: 100%;
+    min-height: 100%;
+    background: linear-gradient(180deg, #cceaff 0%, #ffffff 70.42%);
+    .header {
+        position: relative;
+        height: 240px;
+        .tips {
+            display: inline-block;
+            height: 32px;
+            color: #FFFFFF;
+            line-height: 30px;
+            margin-top: 8px;
+            font-size: 12px;
+            padding: 0 18px 0 10px;
+            background: #1B5277;
+            border-radius: 0 32px 32px 0;
+            .icon {
+                overflow: hidden;
+                width: 20px;
+                height: 20px;
+                margin-right: 6px;
+                border-radius: 50%;
+                vertical-align: middle;
+            }
+            .special {
+                color: #FF9737;
+                font-weight: 700;
+            }
+        }
+        .gif {
+            width: 150px;
+            height: 150px;
+            margin: 40px auto 0;
+            img {
+                width: 100%;
+                height: 100%;
+            }
+        }
+    }
+    .welcome {
+        padding: 14px 0;
+        font-size: 18px;
+        font-weight: 700;
+        line-height: 24px;
+        text-align: center;
+        background: rgba($color: #FFFFFF, $alpha: .5);
+        .icon {
+            overflow: hidden;
+            width: 22px;
+            height: 22px;
+            border-radius: 50%;
+            vertical-align: middle;
+        }
+        .special {
+            color: #FF9737;
+        }
+    }
+    .footer {
+        padding: 40px 15px 100px;
+        color: #6D6D6D;
+        font-size: 14px;
+        font-weight: 400;
+        line-height: 17px;
+        .item {
+            position: relative;
+            padding-left: 38px;
+            margin-bottom: 16px;
+            &:last-child {
+                margin-bottom: 0;
+            }
+            .icon {
+                position: absolute;
+                left: 0;
+            }
+            .special {
+                color: #1D9BF0;
+            }
+        }
+    }
+    .retweet {
+        position: fixed;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        bottom: 26px;
+        left: 16px;
+        right: 16px;
+        height: 52px;
+        color: #FFFFFF;
+        font-size: 18px;
+        font-weight: 600;
+        border-radius: 52px;
+        background: #1D9BF0;
+        img {
+            width: 24px;
+            margin-right: 6px;
+        }
+    }
+}
+</style>

+ 7 - 14
pages/index.vue

@@ -202,20 +202,13 @@
 			</div>
 			<div v-if="status == 'error'"></div>
 		</div>
-		<MobileLandPage
+		<MobileGuidePage
 			v-if="show_moblie"
 			:playType="PlayType.common"
-			:rewardType="this.detail.postBizData.rewardType"
-			:useFul="!this.detail.postBizData.receiveTimeExpired"
-			:userInfo="this.detail.postBizData.postUserInfo"
-			:currencyIconPath="this.detail.postBizData.currencyIconPath"
-			:amountValue="isMoneyPrize ? this.detail.postBizData.amountValue : ''"
-			:usValue="isMoneyPrize ? this.detail.postBizData.usdAmountValue : ''"
-			:prize="isMoneyPrize ? this.detail.postBizData.currencySymbol : this.detail.postBizData.customizedReward"
-			:postId="this.detail.postId"
-			:srcContentId="this.detail.srcContentId"
-		>
-		</MobileLandPage>
+			:detail="detail"
+			:postBizData="detail.postBizData"
+			:postUserInfo="detail.postBizData.postUserInfo">
+		</MobileGuidePage>
 	</div>
 </template>
 
@@ -226,7 +219,7 @@ import { isBrowser, appType } from '../utils/help.js';
 import Report from '../log-center/log';
 import { Toast } from 'vant';
 import FontAmount from '../components/FontAmount.vue';
-import MobileLandPage from '../components/MobileLandPage.vue';
+import MobileGuidePage from '../components/MobileGuidePage.vue';
 // eslint-disable-next-line no-unused-vars
 import { RewardType, PlayType } from '../types';
 
@@ -295,7 +288,7 @@ export default {
 	},
 	components: {
 		FontAmount,
-		MobileLandPage,
+		MobileGuidePage,
 	},
 	head() {
 		return {

+ 7 - 14
pages/luckdraw.vue

@@ -6,20 +6,13 @@
 		</template>
 		<template v-else>
 			<!-- 手机端 -->
-			<MobileLandPage
+			<MobileGuidePage
 				v-if="isMobile"
 				:playType="PlayType.lottery"
-				:rewardType="this.detail.postBizData.rewardType"
-				:useFul="!this.detail.postBizData.receiveTimeExpired"
-				:userInfo="this.detail.postBizData.postUserInfo"
-				:currencyIconPath="this.detail.postBizData.currencyIconPath"
-				:amountValue="isMoneyPrize ? this.detail.postBizData.amountValue : ''"
-				:usValue="isMoneyPrize ? this.detail.postBizData.usdAmountValue : ''"
-				:prize="isMoneyPrize ? this.detail.postBizData.currencySymbol : this.detail.postBizData.customizedReward"
-				:srcContentId="this.detail.srcContentId"
-				:postId="this.detail.postId"
-			>
-			</MobileLandPage>
+				:detail="detail"
+				:postBizData="detail.postBizData"
+				:postUserInfo="detail.postBizData.postUserInfo">
+			</MobileGuidePage>
 			<!-- PC端 -->
 			<template v-else>
 				<div class="logo">
@@ -196,7 +189,7 @@ import FontAmount from '../components/FontAmount.vue';
 import CustomCardCover from '../components/CustomCardCover.vue';
 import Report from '../log-center/log';
 import { RewardType, PlayType } from '../types';
-import MobileLandPage from '../components/MobileLandPage.vue';
+import MobileGuidePage from '../components/MobileGuidePage.vue';
 
 var moment = require('moment');
 var ClipboardJS = require('clipboard');
@@ -219,7 +212,7 @@ export default {
 	components: {
 		FontAmount,
 		CustomCardCover,
-		MobileLandPage,
+		MobileGuidePage,
 	},
 	head() {
 		return {

+ 3 - 3
pages/treasure/index.vue

@@ -5,7 +5,7 @@
 		</template>
 		<template v-else>
 			<template v-if="isMobile">
-				<MobileLandPage :playType="PlayType.Treasure" :useFul="true" :userInfo="detail.postUserInfo" :usValue="detail.upGainAmountValue" :postId="detail.postId" :srcContentId="detail.srcContentId"></MobileLandPage>
+				<MobileGuidePage :playType="PlayType.Treasure" :detail="detail" :postUserInfo="detail.postUserInfo"></MobileGuidePage>
 			</template>
 			<template v-else>
 				<div class="logo">
@@ -44,7 +44,7 @@ import Cookies from 'js-cookie';
 import { Toast } from 'vant';
 import { isBrowser, appVersionCode, appType } from '../../utils/help.js';
 import Report from '@/log-center/log';
-import MobileLandPage from '@/components/MobileLandPage.vue';
+import MobileGuidePage from '@/components/MobileGuidePage.vue';
 import { PlayType } from '@/types';
 
 const api = {
@@ -84,7 +84,7 @@ export default {
 		};
 	},
 	components: {
-		MobileLandPage,
+		MobileGuidePage,
 	},
 	head() {
 		return {

+ 3 - 3
pages/treasure/invite.vue

@@ -5,7 +5,7 @@
 		</template>
 		<template v-else>
 			<template v-if="isMobile">
-				<MobileLandPage :playType="PlayType.Treasure" :useFul="true" :userInfo="detail.inviteUserInfo" :usValue="detail.upGainAmountValue" :postId="detail.postId" :srcContentId="detail.srcContentId"></MobileLandPage>
+				<MobileGuidePage :playType="PlayType.Treasure" :detail="detail" :postUserInfo="detail.postUserInfo"></MobileGuidePage>
 			</template>
 			<template v-else>
 				<div class="logo">
@@ -44,7 +44,7 @@ import Cookies from 'js-cookie';
 import { Toast } from 'vant';
 import { isBrowser, appVersionCode, appType } from '../../utils/help.js';
 import Report from '@/log-center/log';
-import MobileLandPage from '@/components/MobileLandPage.vue';
+import MobileGuidePage from '@/components/MobileGuidePage.vue';
 import { PlayType } from '@/types';
 
 const api = {
@@ -88,7 +88,7 @@ export default {
 		};
 	},
 	components: {
-		MobileLandPage,
+		MobileGuidePage,
 	},
 	head() {
 		return {

BIN
static/img/icon-gif-draw.png


BIN
static/img/icon-gif-redbag.gif


BIN
static/img/icon-gif-treasure.png


+ 3 - 0
static/img/icon-item1.svg

@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M9.48828 19H12.8931L15.7412 5.61279H12.3457L8.43994 7.93213L7.7998 10.9751L11.6128 8.71143H11.6777L9.48828 19Z" fill="#82A6BE"/>
+</svg>

+ 3 - 0
static/img/icon-item2.svg

@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7.92041 9.80615H11.019C11.2417 8.64648 12.0581 7.98779 13.1714 7.98779C14.1362 7.98779 14.8135 8.56299 14.8135 9.40723C14.8135 10.3071 14.2568 10.9287 11.6685 12.8862L6.7793 16.625L6.25977 19H16.3721L16.9287 16.3745H11.3716L11.3809 16.3096L13.9136 14.3521C17.3462 11.7915 18.144 10.7988 18.144 9.10107C18.144 6.93945 16.1587 5.38086 13.4033 5.38086C10.4067 5.38086 8.11523 7.23633 7.92041 9.80615Z" fill="#82A6BE"/>
+</svg>

+ 3 - 0
static/img/icon-item3.svg

@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10.3149 13.3594H11.8179C13.0239 13.3594 13.7476 13.9253 13.7476 14.8716C13.7476 15.8921 12.8848 16.6064 11.6509 16.6064C10.2871 16.6064 9.36865 15.7437 9.50781 14.6304H6.38135C6.33496 14.853 6.32568 15.0386 6.32568 15.2148C6.30713 17.6362 8.3667 19.2319 11.5859 19.2319C14.7402 19.2319 17.041 17.4878 17.041 15.0942C17.041 13.6934 16.1875 12.6636 14.7495 12.311L14.7588 12.2461C16.5957 12.0049 17.9038 10.6411 17.9038 8.96191C17.9038 6.86523 15.9277 5.38086 13.126 5.38086C10.2778 5.38086 8.19971 6.89307 7.74512 9.28662H10.8252C11.0386 8.48877 11.8179 7.98779 12.8384 7.98779C13.9517 7.98779 14.6753 8.54443 14.6753 9.38867C14.6753 10.3535 13.8032 10.938 12.4023 10.938H10.8159L10.3149 13.3594Z" fill="#82A6BE"/>
+</svg>

+ 3 - 0
static/img/icon-item4.svg

@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M12.0591 19H15.2783L15.7329 16.8291H17.4028L17.9688 14.1758H16.2988L18.1265 5.61279H13.2188C10.2314 9.04541 8.13477 11.5503 6.44629 13.8511L5.88037 16.8291H12.5137L12.0591 19ZM9.36865 14.2314C10.8345 12.2183 12.8755 9.75049 14.4155 8.01562H14.4805L13.1445 14.2964H9.35938L9.36865 14.2314Z" fill="#82A6BE"/>
+</svg>

+ 3 - 0
static/img/icon-retweet.svg

@@ -0,0 +1,3 @@
+<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M6.83857 4.75608C6.49518 4.41464 5.93865 4.41464 5.59527 4.75608L2.79732 7.53822C2.40089 7.93241 2.40089 8.57173 2.79732 8.96592C3.19348 9.35983 3.83556 9.35983 4.23171 8.96592L5.2024 8.00071V15.2386C5.2024 17.2806 6.86699 18.935 8.91932 18.935H13.2432C13.803 18.935 14.2577 18.4836 14.2577 17.9257C14.2577 17.3679 13.803 16.9165 13.2432 16.9165H8.91932C7.98665 16.9165 7.23144 16.1648 7.23144 15.2386V8.00071L8.20212 8.96592C8.59828 9.35983 9.24036 9.35983 9.63651 8.96592C10.0329 8.57173 10.0329 7.93241 9.63651 7.53822L6.83857 4.75608ZM18.1614 18.8689C18.5048 19.2104 19.0613 19.2104 19.4047 18.8689L22.2027 16.0868C22.5991 15.6926 22.5991 15.0533 22.2027 14.6591C21.8065 14.2652 21.1644 14.2652 20.7683 14.6591L19.7976 15.6243V8.38638C19.7976 6.34444 18.133 4.68997 16.0807 4.68997H11.7568C11.197 4.68997 10.7423 5.14137 10.7423 5.69925C10.7423 6.25713 11.197 6.70853 11.7568 6.70853H16.0807C17.0133 6.70853 17.7686 7.4602 17.7686 8.38638V15.6243L16.7979 14.6591C16.4017 14.2652 15.7596 14.2652 15.3635 14.6591C14.9671 15.0533 14.9671 15.6926 15.3635 16.0868L18.1614 18.8689Z" fill="white"/>
+</svg>