Commit aa970c01 authored by malin's avatar malin

v2

parent 48f713e3
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
);
......
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://feedapitest.zhangxinhulian.com";
// if (process.env.NODE_ENV === "development") {
// baseURL = "https://feedapitest.zhangxinhulian.com";
// } else {
// baseURL = "https://feedapi.zhangxinhulian.com";
// }
// 创建axios实例
const service = axios.create({
......
......@@ -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,
},
......
......@@ -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() {
......
......@@ -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,
......
......@@ -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
......@@ -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>
......
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