123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <div>
- <common @asynCallBack="asynCallBack"></common>
- <top-header :pageTitle="pageTitle" :routeName="routeName" ></top-header>
- <div class="mui-content">
- <div class="mui-content-padded">
- <img src="~$project/assets/img/03.jpg" width="100%"/>
- </div>
- </div>
- <div class="fyy-footer">
- <div class="bindfyy-btn">
- <button type="submit" class="mui-btn mui-btn-pink" @click="toPay()" v-text="paytext">开通服务</button>
- </div>
- </div>
- <loading :visible="isLoading"></loading>
- </div>
- </template>
- <script>
- import * as API from '@/apis/Master/live'
- import Common from '$project/components/Common.vue'
- import Loading from '$project/components/Loading.vue'
- import TopHeader from '$project/components/TopHeader.vue'
- import {
- mapGetters,
- mapMutations
- } from 'vuex'
- import {
- currentTimeStamp,
- parseUnixTime
- } from '$project/utils'
- export default {
- name: 'GuestFromInfo',
- components: {
- Common,
- Loading,
- TopHeader
- },
- data() {
- return {
- pageTitle: '产品介绍',
- routeName: "MasterLiveInfo",
- isLoading: false,
- paytext: "点击购买",
- orderId: null,
- id: this.$route.query.id,
- detail: {
- order: {},
- info: null,
- list: []
- },
- }
- },
- created() {
- //接收参数来实现返回的页面是哪一种
- if (this.$route.query.routeName) {
- this.routeName = this.$route.query.routeName;
- }
- },
- methods: {
- toPay() {
- this.isLoading = true;
- API.submit({
- "personId": this.person_data.id,
- "payPersonId": this.person_data.id,
- }).then(data => {
- var url = window.location.href.split("#")[0];
- var param = JSON.stringify(data).replace("{", "").replace("}", "").replace(/\",\"/g, "&").replace(/,\"/g, "&").replace(
- /:/g, "=").replace(/\":\"/g, "=").replace(/\"/g, "");
- param = param.replace('=//', '://');
- window.location = url + "?#/master/live/pay?" + param;
- }).catch(error => {
- this.isLoading = false;
- mui.toast(error);
- })
- },asynCallBack(){},
- },
- mounted() {
- },
- destroyed() {
- },
- computed: {
- ...mapGetters({
- openId: 'wx_openid',
- token: 'token',
- person_data: 'person_data',
- person_popedom: 'person_popedom',
- })
- }
- }
- </script>
- <style scoped src="$project/assets/css/pension.css"></style>
- <style scoped src="$project/assets/css/xpwyfyy.css"></style>
- <style src="$project/assets/css/iconfont.css"></style>
- <style>
- </style>
|