medium.vue
1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<template>
<div class="medium"></div>
</template>
<script>
export default {
name: "Medium",
data() {
return {};
},
methods: {
// navQuery() {
// this.$router.replace({
// path: "/medium",
// query: {
// bc_tag: 20,
// phone: btoa(13828152582),
// },
// });
// },
},
async mounted() {
// await this.navQuery();
//手机号登录
if (this.$route.query.phone) {
let phoneparams = window.atob(
decodeURIComponent(this.$route.query.phone)
);
await this.$store.dispatch("PayPhoneLogin", phoneparams);
if (this.$route.query.bc_tag) {
await this.$store.dispatch("gainReturnBc", {
type: 3,
bcTag: this.$route.query.bc_tag,
});
}
//开始支付
await this.$store.dispatch("payment", {
boxId: 40,
price: 39,
total: 39,
num: 1,
bcTag: this.$route.query.bc_tag || 1,
});
// await this.$store.dispatch("payment", {
// boxId: 7,
// price: 0.01,
// total: 0.01,
// num: 1,
// bcTag: this.$route.query.bc_tag || 1,
// });
// 提交表单;
const div = document.createElement("div");
div.innerHTML = this.$store.state.pay.fromData;
document.body.appendChild(div);
document.forms[0].submit();
this.replacePay = true;
}
},
};
</script>
<style>
</style>