Commit f93ab19e by Chao Sun

添加百度统计和token

parent dacf3870
......@@ -58,15 +58,19 @@ export class CommonService {
return this.http.post(url, JSON.stringify(ticketObj), this.httpOptions).toPromise();
}
provinceqry(objParam){
async provinceqry(objParam){
const url = this.USER_API_URL + '/partner/provinceqry';
const res = await this.obtainToken();
this.httpOptions.headers = this.httpOptions.headers.set('X-Authorization', res['data']['token']);
return this.http.post(url,JSON.stringify(objParam),this.httpOptions).pipe(res => {
return res;
})
}
getCityqry(objParam){
async getCityqry(objParam){
const url = this.USER_API_URL + '/partner/cityqry';
const res = await this.obtainToken();
this.httpOptions.headers = this.httpOptions.headers.set('X-Authorization', res['data']['token']);
return this.http
.post(url,JSON.stringify(objParam),this.httpOptions)
.pipe(res => {
......
......@@ -75,65 +75,64 @@ export class Page3Component implements OnInit {
}
addChild() {
this.addChildCount--
if (this.addChildCount >= 0) {
this.curPageData['questions'][this.curQuesLen++] = {
questionId: 4,
questionName: `孩子${this.addChildCount == 1 ? '1' : '2'}年龄`,
optionType: 1,
questionOrder: 4,
options: [
{
optionId: 22,
optionName: '95后',
optionOrder: 1,
customerInput: null
},
{
optionId: 23,
optionName: '90后',
optionOrder: 2,
customerInput: null
},
{
optionId: 24,
optionName: '85后',
optionOrder: 3,
customerInput: null
},
{
optionId: 25,
optionName: '80后',
optionOrder: 4,
customerInput: null
},
{
optionId: 26,
optionName: '75后',
optionOrder: 5,
customerInput: null
},
{
optionId: 27,
optionName: '70后',
optionOrder: 6,
customerInput: null
},
{
optionId: 28,
optionName: '65后',
optionOrder: 7,
customerInput: null
},
{
optionId: 29,
optionName: '60后',
optionOrder: 8,
customerInput: null
}
]
}
}
// console.log(this.curPageData['questions'])
// this.addChildCount--
// if (this.addChildCount >= 0) {
// this.curPageData['questions'][this.curQuesLen++] = {
// questionId: 4,
// questionName: `孩子${this.addChildCount == 1 ? '1' : '2'}年龄`,
// optionType: 1,
// questionOrder: 4,
// options: [
// {
// optionId: 22,
// optionName: '95后',
// optionOrder: 1,
// customerInput: null
// },
// {
// optionId: 23,
// optionName: '90后',
// optionOrder: 2,
// customerInput: null
// },
// {
// optionId: 24,
// optionName: '85后',
// optionOrder: 3,
// customerInput: null
// },
// {
// optionId: 25,
// optionName: '80后',
// optionOrder: 4,
// customerInput: null
// },
// {
// optionId: 26,
// optionName: '75后',
// optionOrder: 5,
// customerInput: null
// },
// {
// optionId: 27,
// optionName: '70后',
// optionOrder: 6,
// customerInput: null
// },
// {
// optionId: 28,
// optionName: '65后',
// optionOrder: 7,
// customerInput: null
// },
// {
// optionId: 29,
// optionName: '60后',
// optionOrder: 8,
// customerInput: null
// }
// ]
// }
// }
}
}
......@@ -10,4 +10,13 @@
<body>
<app-root></app-root>
</body>
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?36b1eb7eec3b5dac9f97d887092b5b27";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment