AuthorIntro.vue
4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<template>
<main class="landing-page">
<div class="container-fluid episode-intro">
<nav class="navbar navbar-expand-sm spotLight-nav">
<a class="navbar-brand" href="#"><img src="../assets/images/logo.png"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample03" aria-controls="navbarsExample03" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
<span class="navbar-toggler-icon"></span>
<span class="navbar-toggler-icon"></span>
</button>
<div class="user-profile-photo insights-profile">
<a href="#"><img src="../assets/images/lock.svg"></a>
</div>
</nav>
<!-- menu wrapper -->
<div class="intro-startup">
<div class="smasung-g-10wrp">
<div class="samsung-compare-c">
<div class="logo-1"><img :src="currentSlideData.payload.metaData.mobileImage" /></div>
</div>
<!-- <div class="samsung-compare-c">
<div class="logo-1"><img src="../assets/images/logo-1.png" /></div>
<div class="vs">vs</div>
<div class="logo-2"><img src="../assets/images/logo-2.png" /></div>
</div> -->
<div class="comment-box">
<div class="comment-box-s-1">
<!-- <p>๐ Hi there! My name is <strong> Rashmi</strong>, and these are a few observations on the user workflows that I had while using the WhiteHat Jr. app.</p> -->
<p>{{currentSlideData.payload.metaData.textBox}}</p>
<div class="footer">
<img src="../assets/images/comment-user.svg" /> <a href="javascript:void(0);" @click="goToProfile">View My Profile</a>
</div><!-- footer -->
</div><!-- comment box 1 -->
<div class="comment-box-s-1 comment-w-397">
<p>
Use arrow keys to navigate <br/>
<img src="../assets/images/key-arrow.jpg" class="key-arrow" />
</p>
</div><!-- comment box 1 -->
<div class="user-photo">
<!-- <img src="../assets/images/comment-photo.png" /> -->
<img :src="currentSlideData.payload.metaData.authorImage" />
</div>
</div><!-- comment box -->
</div><!-- samsung g 10 -->
<div class="footer-nav">
<div class="footer-top">
<ul class="top-intro-bt ps_right">
<li><a href="javascript:void(0);" @click="goBack"><img src="../assets/images/skip-prev.svg" > Prev</a></li>
<li><a href="javascript:void(0);" @click="goNext"><img src="../assets/images/skip-next.svg" > Skip to next slide</a></li>
</ul>
</div><!-- footer top -->
<div class="footer-bottom">
<ul>
<li></li>
<li></li>
</ul>
</div><!-- footer top -->
</div><!-- footer -->
</div>
<!-- body wrapper -->
</div>
<!-- main wrapper -->
</main>
</template>
<script>
import Vue from "vue";
import router from "../router";
export default {
name: "AuthorIntro",
data() {
return {
allSlide:[],
currentSlideIndex:null,
currentSlideData:null,
};
},
mounted() {
var allSlideData = localStorage.getItem("spotlight_slide"+this.$route.params.caseStudyId);
if (allSlideData) {
this.allSlide = JSON.parse(allSlideData);
this.getCurrentSlideData();
}
},
methods: {
getCurrentSlideData(){
var i = this.allSlide.findIndex((slide_) => slide_.slideId == this.$route.params.slideId);
this.currentSlideIndex = i;
this.currentSlideData = this.allSlide[i]
console.log("currentSlideData",this.currentSlideData)
},
goNext(){
this.currentSlideIndex++
this.$router.push({
name: this.allSlide[this.currentSlideIndex].ur,
params: {
caseStudyId: this.allSlide[this.currentSlideIndex].caseStudyId,
slideId: this.allSlide[this.currentSlideIndex].slideId,
},
});
},
goBack(){
this.currentSlideIndex--
this.$router.push({
name: this.allSlide[this.currentSlideIndex].ur,
params: {
caseStudyId: this.allSlide[this.currentSlideIndex].caseStudyId,
slideId: this.allSlide[this.currentSlideIndex].slideId,
},
});
},
goToLogin() {
this.$router.push("/");
},
goToSignUp() {
this.$router.push("/signup");
},
goToProfile() {
this.$router.push("/profile");
},
},
};
</script>