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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
15 deletions
+26
-15
questionnaire/src/app/app.component.ts
+7
-3
questionnaire/src/app/common.service.ts
+5
-5
questionnaire/src/app/transit/transit.component.html
+5
-1
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
{
CommonService
}
from
"./common.service"
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
"./common.service"
;
@
Component
({
selector
:
'app-root'
,
...
...
@@ -12,11 +12,15 @@ export class AppComponent implements OnInit {
}
ngOnInit
()
{
setTimeout
(()
=>
{
if
(
!
this
.
commonService
.
getQueryString
(
't_reload'
))
{
let
{
search
,
href
}
=
window
.
location
;
let
{
search
,
href
}
=
window
.
location
;
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'
);
const
double12_customerInfo
=
localStorage
.
getItem
(
'double12_customerInfo'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'double12_customerInfo'
))
:
null
;
if
(
double12_customerInfo
)
{
...
...
questionnaire/src/app/common.service.ts
View file @
ecc7b134
import
{
Injectable
}
from
'@angular/core'
;
import
{
environment
}
from
'./../environments/environment'
;
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Subject
}
from
"rxjs/index"
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
environment
}
from
'./../environments/environment'
;
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Subject
}
from
"rxjs/index"
;
@
Injectable
({
providedIn
:
'root'
})
...
...
@@ -65,7 +65,7 @@ export class CommonService {
const
res
=
await
this
.
obtainToken
();
this
.
httpOptions
.
headers
=
this
.
httpOptions
.
headers
.
set
(
'X-Authorization'
,
res
[
'data'
][
'token'
]);
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
;
});
}
...
...
questionnaire/src/app/transit/transit.component.html
View file @
ecc7b134
<div
class=
"limbo"
>
<img
*
ngIf=
"advFlag"
src=
"assets/images/first.jpg"
>
<div
*
ngIf=
"!advFlag"
>
<div
class=
"title"
*
ngIf=
"!picFlag"
>
<img
src=
"assets/images/bg_1.png"
/>
<img
src=
"assets/images/bg_1.png"
/>
</div>
<div
class=
"specialWrapper"
*
ngIf=
"picFlag"
>
<div
class=
"specialContent part1"
>
...
...
@@ -40,6 +42,8 @@
<div
class=
"footer"
routerLink=
"/family"
>
<div>
开始评测
</div>
</div>
</div>
</div>
<!--分享引导页-->
...
...
questionnaire/src/app/transit/transit.component.ts
View file @
ecc7b134
import
{
ChangeDetectorRef
,
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
"../common.service"
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
import
{
environment
}
from
"../../environments/environment"
;
import
{
ChangeDetectorRef
,
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
"../common.service"
;
import
{
ActivatedRoute
}
from
"@angular/router"
;
import
{
environment
}
from
"../../environments/environment"
;
import
set
=
Reflect
.
set
;
declare
const
wx
:
any
;
@
Component
({
...
...
@@ -16,7 +16,7 @@ export class TransitComponent implements OnInit {
customerId
:
string
;
deviceType
:
number
;
dialogTips
:
string
;
advFlag
:
boolean
=
true
;
constructor
(
private
commonService
:
CommonService
,
private
activatedRoute
:
ActivatedRoute
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
}
...
...
@@ -34,9 +34,12 @@ export class TransitComponent implements OnInit {
if
(
this
.
deviceType
===
3
)
{
this
.
configWX
();
}
setTimeout
(()
=>
{
this
.
advFlag
=
false
;
},
1000
)
}
// 分享给朋友
// 分享给朋友
wxShare
()
{
this
.
wxShareFlag
=
true
;
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