Commit 0aaecae2 authored by malin's avatar malin

test

parent b75be606
...@@ -74,12 +74,25 @@ ...@@ -74,12 +74,25 @@
<script> <script>
import StatusBar from "@/components/StatusBar"; import StatusBar from "@/components/StatusBar";
import AccrodWithName from "./child_cpn/AccordWithName"; import AccrodWithName from "./child_cpn/AccordWithName";
import utils from "@/utils";
import API from "@/service/api";
export default { export default {
components: { components: {
StatusBar, StatusBar,
AccrodWithName, AccrodWithName,
}, },
mounted() {
let h5LogsObj = utils.getUrlParams();
let link = encodeURIComponent(window.location.href);
utils.setCookie("h5LogsObj", encodeURI(JSON.stringify(h5LogsObj)), 0);
utils.setCookie("link", encodeURI(link), 0);
API.API_reportView("home_page_view");
},
methods: { methods: {
begin() { begin() {
if (this.$refs.accord.male == "" || this.$refs.accord.female == "") { if (this.$refs.accord.male == "" || this.$refs.accord.female == "") {
......
...@@ -115,6 +115,9 @@ export default { ...@@ -115,6 +115,9 @@ export default {
methods: { methods: {
// 支付 // 支付
async _payment() { async _payment() {
const h5LogsObj = JSON.parse(decodeURI(utils.getCookie("h5LogsObj")));
let link = decodeURI(utils.getCookie("link"));
let params_createorder = { let params_createorder = {
zygt: "hzwz", zygt: "hzwz",
tgtk: 1, tgtk: 1,
...@@ -134,14 +137,25 @@ export default { ...@@ -134,14 +137,25 @@ export default {
utils.setCookie("orderId", orderId, 0); // 将orderId放入cookie中 utils.setCookie("orderId", orderId, 0); // 将orderId放入cookie中
utils.setCookie("baseInfo", JSON.stringify(baseInfo), 0); utils.setCookie("baseInfo", JSON.stringify(baseInfo), 0);
上报-- > 信息收集;
API.API_h5Logs({
outTradeNo: orderId,
link: link,
clickId: h5LogsObj.clickid,
source: h5LogsObj.source,
pkg: h5LogsObj.pkg,
}).then((res) => {
console.log("收集数据===", res);
});
// 支付 // 支付
API.API_gatewayCreateorder({ API.API_gatewayCreateorder({
payPlatform: 1, payPlatform: 1,
payType: 2, payType: 2,
wxType: "H5Page", wxType: "H5Page",
orderType: 5, orderType: 5,
pkg: h5LogsObj.pkg, // pkg: h5LogsObj.pkg,
// pkg: h5LogsObj.pkg ? h5LogsObj.pkg : "com.h5game.bbqm", pkg: h5LogsObj.pkg ? h5LogsObj.pkg : "com.h5game.peidui",
outTradeNo: orderId, outTradeNo: orderId,
totalFee: 1, totalFee: 1,
}).then((res) => { }).then((res) => {
......
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