Commit 0aaecae2 authored by malin's avatar malin

test

parent b75be606
......@@ -74,12 +74,25 @@
<script>
import StatusBar from "@/components/StatusBar";
import AccrodWithName from "./child_cpn/AccordWithName";
import utils from "@/utils";
import API from "@/service/api";
export default {
components: {
StatusBar,
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: {
begin() {
if (this.$refs.accord.male == "" || this.$refs.accord.female == "") {
......
......@@ -115,6 +115,9 @@ export default {
methods: {
// 支付
async _payment() {
const h5LogsObj = JSON.parse(decodeURI(utils.getCookie("h5LogsObj")));
let link = decodeURI(utils.getCookie("link"));
let params_createorder = {
zygt: "hzwz",
tgtk: 1,
......@@ -134,14 +137,25 @@ export default {
utils.setCookie("orderId", orderId, 0); // 将orderId放入cookie中
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({
payPlatform: 1,
payType: 2,
wxType: "H5Page",
orderType: 5,
pkg: h5LogsObj.pkg,
// pkg: h5LogsObj.pkg ? h5LogsObj.pkg : "com.h5game.bbqm",
// pkg: h5LogsObj.pkg,
pkg: h5LogsObj.pkg ? h5LogsObj.pkg : "com.h5game.peidui",
outTradeNo: orderId,
totalFee: 1,
}).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