Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
h5-baby
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
malin
h5-baby
Commits
aa970c01
Commit
aa970c01
authored
Apr 02, 2021
by
malin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v2
parent
48f713e3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
23 deletions
+95
-23
api.js
src/service/api.js
+3
-1
axios.js
src/service/axios.js
+6
-6
FormQuery.vue
src/views/Home/child_cpn/FormQuery.vue
+6
-6
index.vue
src/views/Home/index.vue
+2
-0
index.vue
src/views/Pay/index.vue
+18
-3
index.css
src/views/Result/index.css
+7
-1
index.vue
src/views/Result/index.vue
+53
-6
No files found.
src/service/api.js
View file @
aa970c01
import
axios
from
"./axios"
;
import
sign
from
"./sign"
;
axios
.
defaults
.
withCredentials
=
false
// 设置axios不让携带cookie
const
reportUrl
=
"https://report.zhangxinhulian.com"
;
const
payUrl
=
"https://zx-paytest.zhangxinzhixun.com"
;
...
...
@@ -93,7 +95,7 @@ const API = {
API_reportView
:
function
(
data
)
{
return
request
(
reportUrl
+
"/logCollection/log/v1/userLogCollection?module=web&pkg=com.h5game.
taluo
"
,
"/logCollection/log/v1/userLogCollection?module=web&pkg=com.h5game.
bbqm
"
,
"post"
,
data
);
...
...
src/service/axios.js
View file @
aa970c01
import
axios
from
"axios"
;
let
baseURL
=
"https://feedapi.zhangxinhulian.com"
;
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
baseURL
=
"https://feedapitest.zhangxinhulian.com"
;
}
else
{
baseURL
=
"https://feedapi.zhangxinhulian.com"
;
}
let
baseURL
=
"https://feedapi
test
.zhangxinhulian.com"
;
//
if (process.env.NODE_ENV === "development") {
//
baseURL = "https://feedapitest.zhangxinhulian.com";
//
} else {
//
baseURL = "https://feedapi.zhangxinhulian.com";
//
}
// 创建axios实例
const
service
=
axios
.
create
({
...
...
src/views/Home/child_cpn/FormQuery.vue
View file @
aa970c01
...
...
@@ -62,29 +62,29 @@ export default {
name
:
""
,
totast
:
false
,
formatterGender
:
[
{
gender
:
"男"
,
value
:
1
},
{
gender
:
"女"
,
value
:
2
},
{
gender
:
"未出生"
,
value
:
3
},
{
gender
:
"男"
,
value
:
0
},
{
gender
:
"女"
,
value
:
1
},
{
gender
:
"未出生"
,
value
:
2
},
],
genderInfo
:
[
{
src
:
deactive
,
gender
:
"男"
,
id
:
1
,
id
:
0
,
status
:
true
,
src_active
:
active
,
},
{
src
:
deactive
,
gender
:
"女"
,
id
:
2
,
id
:
1
,
status
:
false
,
src_active
:
active
,
},
{
src
:
deactive
,
gender
:
"未出生"
,
id
:
3
,
id
:
2
,
status
:
false
,
src_active
:
active
,
},
...
...
src/views/Home/index.vue
View file @
aa970c01
...
...
@@ -91,6 +91,8 @@ export default {
utils
.
setCookie
(
"h5LogsObj"
,
encodeURI
(
JSON
.
stringify
(
h5LogsObj
)),
0
);
utils
.
setCookie
(
"link"
,
encodeURI
(
link
),
0
);
utils
.
API_reportView
(
"home_page_view"
);
},
data
()
{
...
...
src/views/Pay/index.vue
View file @
aa970c01
...
...
@@ -65,9 +65,9 @@
><span
class=
"fs-32"
>
性
<span
style=
"color: #fff"
>
性别
</span>
别
</span
>
:
{{
this
.
$route
.
query
.
gender
==
1
this
.
$route
.
query
.
gender
==
0
?
"男"
:
this
.
$route
.
query
.
gender
==
2
:
this
.
$route
.
query
.
gender
==
1
?
"女"
:
"未出生"
}}
</span
...
...
@@ -236,9 +236,12 @@ export default {
// 创建订单,开启支付
async
_gatewayCreateorder
()
{
utils
.
setCookie
(
"babyInfo"
,
JSON
.
stringify
(
this
.
$route
.
query
),
0
);
// 将宝宝信息存储到cookie中
let
tempObj
=
this
.
$route
.
query
;
tempObj
.
date2
=
this
.
dateConvert
;
utils
.
setCookie
(
"babyInfo"
,
JSON
.
stringify
(
tempObj
),
0
);
// 将宝宝信息存储到cookie中
let
h5LogsObj
=
JSON
.
parse
(
decodeURI
(
utils
.
getCookie
(
"h5LogsObj"
)));
let
link
=
decodeURI
(
utils
.
getCookie
(
"link"
));
// 创建订单,获取orderId
let
params
=
await
API
.
API_createorder
({
...
...
@@ -255,6 +258,18 @@ export default {
utils
.
setCookie
(
"orderId"
,
params
.
orderId
,
0
);
// 将orderId添加到cookie中
// 上报 --> 信息收集
API
.
API_h5Logs
({
outTradeNo
:
params
.
orderId
,
link
:
link
,
clickId
:
h5LogsObj
.
clickid
,
source
:
h5LogsObj
.
source
,
pkg
:
h5LogsObj
.
pkg
,
}).
then
((
res
)
=>
{
console
.
log
(
"收集数据==="
,
res
);
});
// 支付
API
.
API_gatewayCreateorder
({
payPlatform
:
1
,
payType
:
2
,
...
...
src/views/Result/index.css
View file @
aa970c01
...
...
@@ -13,7 +13,7 @@
.analyse
{
width
:
7.22rem
;
height
:
11rem
;
min-
height
:
11rem
;
margin-top
:
0.42rem
;
position
:
relative
;
background-color
:
#fff
;
...
...
@@ -21,6 +21,7 @@
opacity
:
0.9
;
padding
:
0
0.4rem
;
padding-bottom
:
0.1rem
;
box-sizing
:
border-box
;
}
...
...
@@ -118,4 +119,9 @@
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
.img6
,
.img7
{
width
:
0.48rem
;
height
:
0.44rem
;
}
\ No newline at end of file
src/views/Result/index.vue
View file @
aa970c01
...
...
@@ -11,10 +11,18 @@
<div
class=
"baby-info"
>
<div>
基本资料
</div>
<div>
姓名:邓
</div>
<div>
性别:男
</div>
<div>
公历:2020年7月28日 时辰未知
</div>
<div>
农历:二零二零年六月初八 时辰未知
</div>
<div>
姓氏:
{{
babyInfo
.
name
}}
</div>
<div>
性别:
{{
babyInfo
.
gender
==
0
?
"男"
:
babyInfo
.
gender
==
1
?
"女"
:
"未出生"
}}
</div>
<div>
公历:
{{
babyInfo
.
date
}}
</div>
<div>
农历:
{{
babyInfo
.
date2
}}
</div>
</div>
<div
class=
"fc-sys4 fs-36"
style=
"margin-top: 0.1rem"
>
...
...
@@ -86,7 +94,29 @@
</div>
<div
class=
"col-center-center"
style=
"margin-bottom: 0.3rem"
>
<div>
xxx
</div>
<div
class=
"row-around-center"
style=
"width: 4.44rem; margin-bottom: 0.18rem"
>
<img
class=
"img6"
src=
"@/assets/img/result/img6.png"
alt=
""
@
click=
"changePage('prev')"
/>
<div
class=
"fs-32 fc-3"
>
第
<span
class=
"fc-sys3"
style=
"margin: 0 0.1rem"
>
{{
page
}}
</span
>
页
</div>
<img
class=
"img7"
src=
"@/assets/img/result/img7.png"
alt=
""
@
click=
"changePage('next')"
/>
</div>
<div
class=
"fc-9 fs-28"
>
一共有200个起名推荐,请翻页查看
</div>
</div>
</div>
...
...
@@ -102,6 +132,8 @@ import img1 from "@/assets/img/result/img1.png";
import
img2
from
"@/assets/img/result/img2.png"
;
import
img1_1
from
"@/assets/img/result/img1-1.png"
;
import
img2_1
from
"@/assets/img/result/img2-1.png"
;
import
img6
from
"@/assets/img/result/img6.png"
;
import
img7
from
"@/assets/img/result/img7.png"
;
import
utils
from
"@/utils"
;
import
API
from
"@/service/api"
;
...
...
@@ -117,13 +149,16 @@ export default {
{
src
:
img1
,
flag
:
true
,
src_deactive
:
img1_1
,
id
:
1
,
words
:
3
},
{
src
:
img2
,
flag
:
false
,
src_deactive
:
img2_1
,
id
:
2
,
words
:
2
},
],
imgPage
:
{
src
:
img7
,
un_src
:
img6
},
babyInfo
:
{},
nameList
:
[],
words
:
3
,
page
:
1
,
};
},
mounted
()
{
this
.
babyInfo
=
JSON
.
parse
(
utils
.
getCookie
(
"babyInfo"
));
this
.
getBabyInfo
();
this
.
_fetchName
();
},
...
...
@@ -137,7 +172,7 @@ export default {
pkg
:
"com.h5.bbqm"
,
orderId
:
"1377535433709146112"
,
words
:
this
.
words
,
page
:
19
,
page
:
this
.
page
,
};
API
.
API_fetchName
(
params
).
then
((
res
)
=>
{
this
.
nameList
=
res
.
result
.
data
;
...
...
@@ -146,6 +181,7 @@ export default {
// 但双字切换
convertImg
(
item
)
{
this
.
page
=
1
;
this
.
words
=
item
.
words
;
this
.
imgInfo
.
map
((
option
)
=>
{
if
(
option
.
id
==
item
.
id
)
{
...
...
@@ -162,6 +198,17 @@ export default {
var
i
=
utils
.
getCookie
(
"babyInfo"
);
this
.
babyInfo
=
JSON
.
parse
(
i
);
},
changePage
(
payload
)
{
if
(
payload
==
"prev"
&&
this
.
page
>
1
)
{
this
.
page
-=
1
;
}
else
if
(
payload
==
"next"
&&
this
.
nameList
.
length
>
0
)
{
this
.
page
+=
1
;
}
else
{
return
;
}
this
.
_fetchName
();
},
},
};
</
script
>
...
...
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