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
5fa46b19
Commit
5fa46b19
authored
May 15, 2019
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打包配置修改
parent
44e6aacc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
38 deletions
+54
-38
questionnair/angular.json
+4
-2
questionnair/src/app/app.module.ts
+2
-1
questionnair/src/app/ask/ask.component.ts
+18
-15
questionnair/src/app/common.service.ts
+9
-6
questionnair/src/app/page16/page16.component.html
+15
-14
questionnair/src/app/page17/page17.component.html
+3
-0
questionnair/src/app/page17/page17.component.ts
+3
-0
No files found.
questionnair/angular.json
View file @
5fa46b19
...
...
@@ -13,7 +13,7 @@
"build"
:
{
"builder"
:
"@angular-devkit/build-angular:browser"
,
"options"
:
{
"outputPath"
:
"dist/questionnair"
,
"outputPath"
:
"dist/questionnair
e
"
,
"index"
:
"src/index.html"
,
"main"
:
"src/main.ts"
,
"polyfills"
:
"src/polyfills.ts"
,
...
...
@@ -27,7 +27,9 @@
"src/styles.css"
],
"scripts"
:
[],
"es5BrowserSupport"
:
true
"es5BrowserSupport"
:
true
,
"baseHref"
:
"/questionnaire/"
,
"deployUrl"
:
"/questionnaire/"
},
"configurations"
:
{
"production"
:
{
...
...
questionnair/src/app/app.module.ts
View file @
5fa46b19
...
...
@@ -24,6 +24,7 @@ import { Page15Component } from './page15/page15.component'
import
{
Page16Component
}
from
'./page16/page16.component'
import
{
Page17Component
}
from
'./page17/page17.component'
import
{
HashLocationStrategy
,
LocationStrategy
}
from
'@angular/common'
;
@
NgModule
({
declarations
:
[
AppComponent
,
...
...
@@ -47,7 +48,7 @@ import { Page17Component } from './page17/page17.component'
Page17Component
],
imports
:
[
BrowserModule
,
AppRoutingModule
,
HttpClientModule
],
providers
:
[
CommonService
,
LocalStorage
],
providers
:
[
CommonService
,
LocalStorage
,{
provide
:
LocationStrategy
,
useClass
:
HashLocationStrategy
}
],
bootstrap
:
[
AppComponent
]
})
export
class
AppModule
{}
questionnair/src/app/ask/ask.component.ts
View file @
5fa46b19
...
...
@@ -105,6 +105,7 @@ export class AskComponent implements OnInit {
this
.
curPage
=
0
return
}
const
answerParam
=
{
survey
:
{
customerId
:
this
.
commonService
.
getQueryString
(
'customerId'
),
...
...
@@ -117,7 +118,6 @@ export class AskComponent implements OnInit {
// console.log(res)
})
}
// console.log(this.nextBtn)
}
getAllAnswer
(
e
)
{
this
.
allAnswers
[
this
.
curPage
]
=
e
...
...
@@ -138,21 +138,9 @@ export class AskComponent implements OnInit {
}
setCurPageData
()
{
// console.log(this.allAnswers)
if
(
this
.
curPage
<
16
)
{
//判断当前页是否有答案
if
(
this
.
curPage
==
0
||
this
.
allAnswers
[
this
.
curPage
]
||
this
.
curPage
==
5
||
this
.
curPage
==
9
)
{
this
.
nextBtn
=
true
;
}
else
{
this
.
nextBtn
=
false
;
}
}
const
thePateData
=
this
.
allQues
[
this
.
curPage
]
// console.log('thePateData------', this.curPage, thePateData)
this
.
curPageData
=
thePateData
const
page2Answer
=
this
.
allAnswers
[
1
]
if
(
this
.
curPage
==
2
)
{
...
...
@@ -161,6 +149,7 @@ export class AskComponent implements OnInit {
thePateData
)
}
//第4页
if
(
this
.
curPage
==
4
)
{
this
.
filterPage5
(
page2Answer
.
questions
[
0
].
options
[
0
].
optionId
,
...
...
@@ -191,6 +180,20 @@ export class AskComponent implements OnInit {
this
.
allQues
[
this
.
curPage
]
)
}
if
(
this
.
curPage
<
16
)
{
//判断当前页是否有答案
if
(
this
.
curPage
==
0
||
this
.
allAnswers
[
this
.
curPage
]
||
this
.
curPage
==
5
||
this
.
curPage
==
9
)
{
this
.
nextBtn
=
true
;
}
else
{
this
.
nextBtn
=
false
;
}
}
// console.log('thePateData------', this.curPage, thePateData)
}
filterPage2
(
optionId
,
thePateData
)
{
...
...
questionnair/src/app/common.service.ts
View file @
5fa46b19
...
...
@@ -75,12 +75,15 @@ export class CommonService {
}
getQueryString
(
name
)
{
const
gitUrlParam
=
window
.
location
.
search
;
const
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
);
const
r
=
decodeURIComponent
(
gitUrlParam
).
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
{
return
r
[
2
];
const
after
=
window
.
location
.
hash
.
split
(
'?'
)[
1
];
if
(
after
)
{
const
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
);
const
r
=
after
.
match
(
reg
);
if
(
r
!=
null
)
{
return
decodeURIComponent
(
r
[
2
]);
}
else
{
return
null
;
}
}
return
null
;
}
}
questionnair/src/app/page16/page16.component.html
View file @
5fa46b19
...
...
@@ -18,20 +18,21 @@
</div>
</div>
</div>
<div
class=
"toastWrapper toast"
*
ngIf=
"isShow"
>
<div
class=
"toastContent city"
>
<div
class=
"live"
>
所在地区
</div>
<div
class=
"province"
>
<span>
{{ this.provinceName }}
</span>
</div>
<ul
class=
"city"
>
<li
*
ngFor=
"let city of this.cityList"
(
click
)="
closeToast
();
selectCity
(
city
);
getAnswer
(
city
)"
>
{{ city.cityName }}
</li>
</ul>
<div
class=
"toastWrapper toast"
*
ngIf=
"isShow"
(
click
)="
closeToast
();"
>
</div>
<div
class=
"toastContent city"
*
ngIf=
"isShow"
>
<div
class=
"live"
>
所在地区
</div>
<div
class=
"province"
>
<span>
{{ this.provinceName }}
</span>
</div>
<ul
class=
"city"
>
<li
*
ngFor=
"let city of this.cityList"
(
click
)="
closeToast
();
selectCity
(
city
);
getAnswer
(
city
)"
>
{{ city.cityName }}
</li>
</ul>
</div>
</div>
questionnair/src/app/page17/page17.component.html
View file @
5fa46b19
...
...
@@ -2,4 +2,7 @@
<div
class=
"title"
>
<img
src=
"assets/images/bg_17.png"
/>
</div>
<div
class=
"footer"
style=
"margin-top: 20%;"
(
click
)="
getHref
()"
>
<div>
我知道了
</div>
</div>
</div>
questionnair/src/app/page17/page17.component.ts
View file @
5fa46b19
...
...
@@ -12,4 +12,7 @@ export class Page17Component implements OnInit {
ngOnInit
()
{
// console.log(this.curPageData)
}
getHref
(){
window
.
location
.
href
=
'https://'
+
window
.
location
.
host
+
'/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