Bladeren bron

支付跳转

zhengkaixin 4 jaren geleden
bovenliggende
commit
c1298671d0

+ 12 - 0
src/projects/business/router/master.js

@@ -226,6 +226,7 @@ const routesMaster = [
 									title: '账单详情',
 								}
 							},
+
 						],
 					},
 
@@ -330,6 +331,17 @@ const routesMaster = [
 				path: 'live',
 				component: () => import('../views/Layout.vue'),
 				children: [
+                    //账单详情
+                    {
+                        path: 'infobak',
+                        name: 'MasterLiveInfobak',
+                        component: () => import('../views/Master/Live/Infobak.vue'),
+                        meta: {
+                            requireAuth: false,
+                            role: [],
+                            title: '账单详情',
+                        }
+                    },
 					//直播主页
 					{
 						path: 'info',

+ 1 - 3
src/projects/business/views/Master/Live/Info.vue

@@ -43,9 +43,7 @@
 			 <div class="mui-content vongi-spkh" v-if="buystatus&&!list.length" >
 				<div class="vongi-payyes-icon">
 					<img src="~$project/assets/img/spkh.png" />
-					<h1 style="color:red">支付成功</h1>
-					<h2>感谢您购买视频监控服务<br>现已加入安装排期计划</h2>
-
+ 					<h2>感谢您购买视频监控服务<br>现已加入安装排期计划</h2>
 				</div>
 			</div>
 			<div class="fyy-footer" v-if="buystatus&&!list.length">

+ 117 - 0
src/projects/business/views/Master/Live/Infobak.vue

@@ -0,0 +1,117 @@
+<template>
+	<div>
+
+		<common @asynCallBack="asynCallBack"></common>
+		<top-header :pageTitle="pageTitle"  :routeName="routeName"  ></top-header>
+
+		<div class="mui-content vongi-spkh-show margin60" v-if="person_popedom.sceneId=='1'">
+			<img src="~$project/assets/img/show11.png" />
+			<img src="~$project/assets/img/show12.png" />
+			<img src="~$project/assets/img/show13.png" />
+			<img src="~$project/assets/img/show14.png" />
+
+		</div>
+		<div class="mui-content vongi-spkh-show margin60" v-if="person_popedom.sceneId=='2'">
+			<img src="~$project/assets/img/show21.png" />
+			<img src="~$project/assets/img/show22.png" />
+			<img src="~$project/assets/img/show23.png" />
+			<img src="~$project/assets/img/show24.png" />
+
+		</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: 'MasterLiveShow',
+        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,
+                    "goodsId":"3",
+                }).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/xpwyfyy.css"></style>
+<style src="$project/assets/css/iconfont.css"></style>
+<style>
+</style>

+ 1 - 0
src/projects/business/views/Master/Live/Pay.vue

@@ -145,6 +145,7 @@
 				this.isLoading=true;
 				if(this.paytypeindex=="1"){
 					API_Pay.wxJsapiPay(this.detail.id,this.paycode).then(data=>{
+                        data.url=window.location.href.split("#")[0]+"/#/master/live/paySuccess";
 
 						this.isLoading=false;
 						wxPayJs(data)

+ 10 - 14
src/projects/business/views/Master/Live/PaySuccess.vue

@@ -3,13 +3,13 @@
   <div>
     <div class="mui-content">
       <div class="vongi-examineInfo">
-        <span class="mui-icon iconfont icon-gou"></span>
+        <span class="mui-icon iconfont icon-gou" style="color: #3385FF" ></span>
         <h1>支付成功</h1>
       </div>
     </div>
     <div class="fyy-footer">
       <div class="bindfyy-btn">
-        <button type="submit" class="mui-btn mui-btn-pink"  @click="back">返回主页</button>
+        <button type="submit" class="mui-btn mui-btn-pink" style="background: #3385FF;border:#3385FF;color: #FFF"  @click="back">返回主页</button>
       </div>
     </div>
     <loading :visible="isLoading"></loading>
@@ -20,18 +20,13 @@
 
 <script>
 
-  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 {
+    import Common from '$project/components/Common.vue'
+    import Loading from '$project/components/Loading.vue'
+    import TopHeader from '$project/components/TopHeader.vue'
+    import {mapGetters} from 'vuex'
+    import {currentTimeStamp, parseUnixTime} from '$project/utils'
+
+    export default {
     name: 'MasterLivePaySuccess',
     components: {
       Common,
@@ -75,6 +70,7 @@
     }
   }
 </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>

+ 1 - 1
src/projects/business/views/Master/Live/Show.vue

@@ -20,7 +20,7 @@
     </div>
     <div class="fyy-footer">
       <div class="bindfyy-btn">
-        <button type="submit" class="mui-btn mui-btn-pink"  style="background: #3385FF;border:#3385FF;color: #FFF"   @click="toPay()" v-text="paytext">立即开通</button>
+        <button type="submit"  class="mui-btn mui-btn-pink"  style="background: #3385FF;border:#3385FF;color: #FFF"   @click="toPay()" v-text="paytext">立即开通</button>
       </div>
     </div>
     <loading :visible="isLoading"></loading>

+ 4 - 2
src/projects/pension/views/Master/Live/Pay.vue

@@ -145,8 +145,10 @@
 				this.isLoading=true;
 				if(this.paytypeindex=="1"){
 					API_Pay.wxJsapiPay(this.detail.id,this.paycode).then(data=>{
-						//公共页
-						this.isLoading=false;
+                        //公共页面
+                        data.url=window.location.href.split("#")[0]+"/#/master/live/paySuccess";
+
+                        this.isLoading=false;
 						wxPayJs(data)
 					}).catch(error => {
 						this.isLoading = false;