Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
allCampaign
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
allCampaign
Commits
ecc7b134
Commit
ecc7b134
authored
Apr 09, 2020
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加过渡
parent
ffe8b4eb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
54 deletions
+66
-54
questionnaire/src/app/app.component.ts
+11
-7
questionnaire/src/app/common.service.ts
+5
-5
questionnaire/src/app/transit/transit.component.html
+41
-36
questionnaire/src/app/transit/transit.component.ts
+9
-6
questionnaire/src/assets/images/first.jpg
+0
-0
No files found.
questionnaire/src/app/app.component.ts
View file @
ecc7b134
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
"./common.service"
;
import
{
CommonService
}
from
"./common.service"
;
@
Component
({
@
Component
({
selector
:
'app-root'
,
selector
:
'app-root'
,
...
@@ -12,11 +12,15 @@ export class AppComponent implements OnInit {
...
@@ -12,11 +12,15 @@ export class AppComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
if
(
!
this
.
commonService
.
getQueryString
(
't_reload'
))
{
setTimeout
(()
=>
{
let
{
search
,
href
}
=
window
.
location
;
if
(
!
this
.
commonService
.
getQueryString
(
't_reload'
))
{
href
=
href
.
replace
(
/&
?
t_reload=
(\d
+
)
/g
,
''
);
let
{
search
,
href
}
=
window
.
location
;
window
.
location
.
href
=
href
+
(
search
?
'&'
:
'?'
)
+
't_reload='
+
new
Date
().
getTime
();
href
=
href
.
replace
(
/&
?
t_reload=
(\d
+
)
/g
,
''
);
}
window
.
location
.
href
=
href
+
(
search
?
'&'
:
'?'
)
+
't_reload='
+
new
Date
().
getTime
();
}
},
300
)
console
.
log
(
this
.
commonService
.
getQueryString
(
't_reload'
))
let
customerId
=
this
.
commonService
.
getQueryString
(
'customerId'
);
let
customerId
=
this
.
commonService
.
getQueryString
(
'customerId'
);
const
double12_customerInfo
=
localStorage
.
getItem
(
'double12_customerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'double12_customerInfo'
))
:
null
;
const
double12_customerInfo
=
localStorage
.
getItem
(
'double12_customerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'double12_customerInfo'
))
:
null
;
if
(
double12_customerInfo
)
{
if
(
double12_customerInfo
)
{
...
...
questionnaire/src/app/common.service.ts
View file @
ecc7b134
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
environment
}
from
'./../environments/environment'
;
import
{
environment
}
from
'./../environments/environment'
;
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Subject
}
from
"rxjs/index"
;
import
{
Subject
}
from
"rxjs/index"
;
@
Injectable
({
@
Injectable
({
providedIn
:
'root'
providedIn
:
'root'
})
})
...
@@ -65,7 +65,7 @@ export class CommonService {
...
@@ -65,7 +65,7 @@ export class CommonService {
const
res
=
await
this
.
obtainToken
();
const
res
=
await
this
.
obtainToken
();
this
.
httpOptions
.
headers
=
this
.
httpOptions
.
headers
.
set
(
'X-Authorization'
,
res
[
'data'
][
'token'
]);
this
.
httpOptions
.
headers
=
this
.
httpOptions
.
headers
.
set
(
'X-Authorization'
,
res
[
'data'
][
'token'
]);
return
this
.
http
return
this
.
http
.
post
(
url
,
JSON
.
stringify
({
orderId
:
orderId
}),
this
.
httpOptions
).
toPromise
().
then
(
response
=>
{
.
post
(
url
,
JSON
.
stringify
({
orderId
:
orderId
}),
this
.
httpOptions
).
toPromise
().
then
(
response
=>
{
return
response
;
return
response
;
});
});
}
}
...
...
questionnaire/src/app/transit/transit.component.html
View file @
ecc7b134
<div
class=
"limbo"
>
<div
class=
"limbo"
>
<div
class=
"title"
*
ngIf=
"!picFlag"
>
<img
*
ngIf=
"advFlag"
src=
"assets/images/first.jpg"
>
<img
src=
"assets/images/bg_1.png"
/>
<div
*
ngIf=
"!advFlag"
>
</div>
<div
class=
"title"
*
ngIf=
"!picFlag"
>
<div
class=
"specialWrapper"
*
ngIf=
"picFlag"
>
<img
src=
"assets/images/bg_1.png"
/>
<div
class=
"specialContent part1"
>
</div>
<div
class=
"gifts"
>
<div
class=
"specialWrapper"
*
ngIf=
"picFlag"
>
福利1
<div
class=
"specialContent part1"
>
<div
class=
"gifts"
>
福利1
</div>
<div>
<!-- <span class="iconfont"></span> -->
<span
style=
"color: #ec2d37;"
>
平安意外险领取成功
</span>
</div>
</div>
</div>
<div>
<div
class=
"specialContent part2"
>
<!-- <span class="iconfont"></span> -->
<div
class=
"gifts"
>
福利2
</div>
<span
style=
"color: #ec2d37;"
>
平安意外险领取成功
</span>
<div>
家庭风险咨询服务
</div>
<div>
(¥199)
</div>
<ul
class=
"part3"
>
<li><span
class=
"iconfont"
>

</span>
所有家庭成员风险分析
</li>
<li><span
class=
"iconfont"
>

</span>
定制保险方案
</li>
<li><span
class=
"iconfont"
>

</span>
投保理赔协助
</li>
</ul>
</div>
</div>
</div>
</div>
<div
class=
"specialContent part2"
>
<div
class=
"tips"
*
ngIf=
"picFlag"
>
<div
class=
"gifts"
>
福利2
</div>
<span
style=
"color:red;"
>
*
</span>
<div>
家庭风险咨询服务
</div>
<span>
了解一下您的家庭情况
</span>
<div>
(¥199)
</div>
<ul
class=
"part3"
>
<li><span
class=
"iconfont"
>

</span>
所有家庭成员风险分析
</li>
<li><span
class=
"iconfont"
>

</span>
定制保险方案
</li>
<li><span
class=
"iconfont"
>

</span>
投保理赔协助
</li>
</ul>
</div>
</div>
</div>
<div
*
ngIf=
"deviceType === 3"
style=
"display: flex;justify-content: flex-end;margin: 10px 0;"
>
<div
class=
"tips"
*
ngIf=
"picFlag"
>
<div
class=
"share"
(
click
)="
wxShare
()"
>
<span
style=
"color:red;"
>
*
</span>
<div
style=
"width: 20px"
><img
src=
"assets/images/shareBtn.png"
alt=
""
></div>
<span>
了解一下您的家庭情况
</span>
<span>
分享给朋友
</span>
</div>
</div>
<div
*
ngIf=
"deviceType === 3"
style=
"display: flex;justify-content: flex-end;margin: 10px 0;"
>
</div>
<div
class=
"share"
(
click
)="
wxShare
()"
>
<div
class=
"tips"
*
ngIf=
"!picFlag"
>
<div
style=
"width: 20px"
><img
src=
"assets/images/shareBtn.png"
alt=
""
></div>
<span
style=
"color:red;"
>
*
</span>
<span>
分享给朋友
</span>
<span>
本问卷大约需要1分钟
</span>
</div>
<div
class=
"footer"
routerLink=
"/family"
>
<div>
开始评测
</div>
</div>
</div>
</div>
</div>
<div
class=
"tips"
*
ngIf=
"!picFlag"
>
<span
style=
"color:red;"
>
*
</span>
<span>
本问卷大约需要1分钟
</span>
</div>
<div
class=
"footer"
routerLink=
"/family"
>
<div>
开始评测
</div>
</div>
</div>
</div>
<!--分享引导页-->
<!--分享引导页-->
...
@@ -56,4 +60,4 @@
...
@@ -56,4 +60,4 @@
<!--分享成功弹窗-->
<!--分享成功弹窗-->
<div
class=
"dialog"
*
ngIf=
"alertFlag"
>
<div
class=
"dialog"
*
ngIf=
"alertFlag"
>
<span
style=
"margin-top: -60%;font-size: 22px"
>
{{dialogTips}}
</span>
<span
style=
"margin-top: -60%;font-size: 22px"
>
{{dialogTips}}
</span>
</div>
</div>
\ No newline at end of file
questionnaire/src/app/transit/transit.component.ts
View file @
ecc7b134
import
{
ChangeDetectorRef
,
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
"../common.service"
;
import
{
CommonService
}
from
"../common.service"
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
import
{
environment
}
from
"../../environments/environment"
;
import
{
environment
}
from
"../../environments/environment"
;
import
set
=
Reflect
.
set
;
import
set
=
Reflect
.
set
;
declare
const
wx
:
any
;
declare
const
wx
:
any
;
@
Component
({
@
Component
({
...
@@ -16,7 +16,7 @@ export class TransitComponent implements OnInit {
...
@@ -16,7 +16,7 @@ export class TransitComponent implements OnInit {
customerId
:
string
;
customerId
:
string
;
deviceType
:
number
;
deviceType
:
number
;
dialogTips
:
string
;
dialogTips
:
string
;
advFlag
:
boolean
=
true
;
constructor
(
private
commonService
:
CommonService
,
private
activatedRoute
:
ActivatedRoute
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
constructor
(
private
commonService
:
CommonService
,
private
activatedRoute
:
ActivatedRoute
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
}
}
...
@@ -34,9 +34,12 @@ export class TransitComponent implements OnInit {
...
@@ -34,9 +34,12 @@ export class TransitComponent implements OnInit {
if
(
this
.
deviceType
===
3
)
{
if
(
this
.
deviceType
===
3
)
{
this
.
configWX
();
this
.
configWX
();
}
}
setTimeout
(()
=>
{
this
.
advFlag
=
false
;
},
1000
)
}
}
// 分享给朋友
// 分享给朋友
wxShare
()
{
wxShare
()
{
this
.
wxShareFlag
=
true
;
this
.
wxShareFlag
=
true
;
if
(
this
.
customerId
)
{
if
(
this
.
customerId
)
{
...
...
questionnaire/src/assets/images/first.jpg
0 → 100644
View file @
ecc7b134
170 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment