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
1c0fe008
Commit
1c0fe008
authored
Dec 23, 2019
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改智能AI跳转问题
parent
0590a808
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
6 deletions
+32
-6
questionnaire/src/app/app.component.ts
+10
-0
questionnaire/src/app/common.service.ts
+18
-4
questionnaire/src/app/live/live.component.ts
+1
-0
questionnaire/src/app/transit3/transit3.component.ts
+3
-2
No files found.
questionnaire/src/app/app.component.ts
View file @
1c0fe008
...
@@ -31,5 +31,15 @@ export class AppComponent implements OnInit {
...
@@ -31,5 +31,15 @@ export class AppComponent implements OnInit {
};
};
sessionStorage
.
setItem
(
'campaignInfo'
,
JSON
.
stringify
(
campaignInfo
));
sessionStorage
.
setItem
(
'campaignInfo'
,
JSON
.
stringify
(
campaignInfo
));
}
}
this
.
orderQuery
(
orderId
);
}
// 查询是否已经支付成功
orderQuery
(
orderId
)
{
this
.
commonService
.
orderQuery
(
orderId
).
then
(
res
=>
{
if
(
res
[
'success'
])
{
sessionStorage
.
removeItem
(
'campaignInfo'
);
}
});
}
}
}
}
questionnaire/src/app/common.service.ts
View file @
1c0fe008
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'
})
})
...
@@ -57,6 +57,20 @@ export class CommonService {
...
@@ -57,6 +57,20 @@ export class CommonService {
}
}
/**
/**
* 查询订单
* @returns {Promise<TResult2|TResult1>}
*/
async
orderQuery
(
orderId
)
{
const
url
=
this
.
USER_API_URL
+
'/orderQuery'
;
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
=>
{
return
response
;
});
}
/**
* 获取TOKEN
* 获取TOKEN
*/
*/
obtainToken
()
{
obtainToken
()
{
...
...
questionnaire/src/app/live/live.component.ts
View file @
1c0fe008
...
@@ -426,4 +426,5 @@ export class LiveComponent implements OnInit {
...
@@ -426,4 +426,5 @@ export class LiveComponent implements OnInit {
this
.
tipsFlag
=
false
;
this
.
tipsFlag
=
false
;
},
2000
)
},
2000
)
}
}
}
}
questionnaire/src/app/transit3/transit3.component.ts
View file @
1c0fe008
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
CommonService
}
from
'../common.service'
;
import
{
CommonService
}
from
'../common.service'
;
import
{
environment
}
from
"../../environments/environment"
;
@
Component
({
@
Component
({
selector
:
'app-transit3'
,
selector
:
'app-transit3'
,
templateUrl
:
'./transit3.component.html'
,
templateUrl
:
'./transit3.component.html'
,
...
@@ -18,9 +19,9 @@ export class Transit3Component implements OnInit {
...
@@ -18,9 +19,9 @@ export class Transit3Component implements OnInit {
getHref
()
{
getHref
()
{
if
(
this
.
activityCode
==
'mmh'
)
{
if
(
this
.
activityCode
==
'mmh'
)
{
window
.
location
.
href
=
'https://'
+
window
.
location
.
host
+
'/questionnaire/#/specialMmh'
;
window
.
location
.
href
=
`
${
environment
.
hostName
}
/questionnaire/#/specialMmh`
;
}
else
{
}
else
{
window
.
location
.
href
=
'https://'
+
window
.
location
.
host
+
'/member'
;
window
.
location
.
href
=
`
${
environment
.
hostName
}
/member`
;
}
}
}
}
}
}
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