Commit 765aa963 authored by IvyXia123's avatar IvyXia123

支付成功白屏

parent 9c34f659
src/assets/yezi.png

1.06 KB | W: | H:

src/assets/yezi.png

1.17 KB | W: | H:

src/assets/yezi.png
src/assets/yezi.png
src/assets/yezi.png
src/assets/yezi.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -69,6 +69,41 @@ ...@@ -69,6 +69,41 @@
</div> </div>
</div> </div>
</div> </div>
<!--<div class="pay-list">
<div class="pay-choice">支付方式选择</div>
<ul class="pay">
<li>
<img :src="weixin" alt="">
<span>微信支付</span>
<div class="icon-re">
<img :src="iconRe" alt="">
</div>
</li>
<li>
<img :src="weixin" alt="">
<span>微信支付</span>
<div class="icon-re">
<img :src="iconRe" alt="">
</div>
</li>
<li>
<img :src="weixin" alt="">
<span>微信支付</span>
<div class="icon-re">
<img :src="iconRe" alt="">
</div>
</li>
<li>
<img :src="weixin" alt="">
<span>微信支付</span>
<div class="icon-re">
<img :src="iconRe" alt="">
</div>
</li>
</ul>
</div>-->
<footer> <footer>
<div class="sub-block"> <div class="sub-block">
<span v-if="groupDetail.goods_desc">{{priceTotal}}</span> <span v-if="groupDetail.goods_desc">{{priceTotal}}</span>
...@@ -130,6 +165,9 @@ import clock from "../../assets/shop/clock.png"; ...@@ -130,6 +165,9 @@ import clock from "../../assets/shop/clock.png";
import addressImg from "../../assets/shop/address.png"; import addressImg from "../../assets/shop/address.png";
import leftG from "../../assets/shop/leftg.png"; import leftG from "../../assets/shop/leftg.png";
import popup_img from "../../assets/shop/popup_img@2x.png"; import popup_img from "../../assets/shop/popup_img@2x.png";
import weixin from "../../assets/evaluate/weixin.png";
import zhifubao from "../../assets/evaluate/zhifubao.png";
import icon_re from "../../assets/evaluate/icon_re.png";
import { Popup } from "mint-ui"; import { Popup } from "mint-ui";
export default { export default {
name: "buy", name: "buy",
...@@ -148,6 +186,8 @@ export default { ...@@ -148,6 +186,8 @@ export default {
verify_code: "", verify_code: "",
flag: false flag: false
}, },
iconRe: icon_re,
weixin: weixin,
lineImage: lineImage, lineImage: lineImage,
youHuiUrl: youHuiUrl, youHuiUrl: youHuiUrl,
leftG: leftG, leftG: leftG,
...@@ -178,7 +218,11 @@ export default { ...@@ -178,7 +218,11 @@ export default {
canSale: false, canSale: false,
popup_img: popup_img, popup_img: popup_img,
orderCancel: false, orderCancel: false,
userCourse: {} userCourse: {},
payList: [
{ icon: weixin, title: '微信支付', value: 1 },
{ icon: zhifubao, title: '支付宝支付', value: 1 },
]
}; };
}, },
mounted() { mounted() {
...@@ -727,6 +771,57 @@ img { ...@@ -727,6 +771,57 @@ img {
} }
} }
} }
.pay-list {
width: 100%;
padding-bottom: 80 * @toVw;
.pay-choice {
padding: 15 * @toVw;
font-size: 13 * @toVw;
color: #666;
box-sizing: border-box;
}
.pay {
width: 100%;
li {
position: relative;
padding: 14 * @toVw 14 * @toVw;
box-sizing: border-box;
background: #ffffff;
border-bottom: 1px solid #DFDFDF;
img {
width: 28 * @toVw;
height: 28 * @toVw;
vertical-align: middle;
}
span {
padding-left: 7 * @toVw;
font-size: 15 * @toVw;
color: #333333;
vertical-align: middle;
}
.icon-re {
width: 18 * @toVw;
height: 18 * @toVw;
position: absolute;
top: 19 * @toVw;
right: 21 * @toVw;
img {
width: 100%;
height: 100%;
}
}
&:last-child {
border-bottom: none;
}
}
}
}
footer { footer {
position: fixed; position: fixed;
background: white; background: white;
......
<template> <template>
<div> <div>
<div style="height: 100vh;overflow: auto"> <div style="height: 100vh;overflow: auto">
<div class="group-index" ref="index" v-if="groupDetail" style="min-height: 120vh"> <div class="group-index" ref="index" v-if="getUserDetailApi" style="min-height: 120vh">
<swiper :options="swiperOption" class="banner" ref="mySwiper"> <swiper :options="swiperOption" class="banner" ref="mySwiper">
<swiper-slide <swiper-slide
v-if="groupDetail.goods_desc" v-if="groupDetail.goods_desc"
...@@ -344,6 +344,7 @@ export default { ...@@ -344,6 +344,7 @@ export default {
if(this.groupDetail.is_real){ if(this.groupDetail.is_real){
let query = { shopId: this.shopId, invite_code: this.invite_code }; let query = { shopId: this.shopId, invite_code: this.invite_code };
let invite = this.invite_code; let invite = this.invite_code;
this.$sa.track("buyCourse", { this.$sa.track("buyCourse", {
buyType: buyType:
this.groupDetail.goods_type === 2 && this.buyType === 0 this.groupDetail.goods_type === 2 && this.buyType === 0
...@@ -353,10 +354,10 @@ export default { ...@@ -353,10 +354,10 @@ export default {
salesType: invite ? invite.split("-")[1] : "null", salesType: invite ? invite.split("-")[1] : "null",
salesID: invite ? Number(invite.split("-")[2]) : 0 salesID: invite ? Number(invite.split("-")[2]) : 0
}); });
if (this.groupId) { if (this.groupId) {
query.group_order_id = this.groupId; query.group_order_id = this.groupId;
} }
console.log(this.buyType);
if (this.buyType === 0 && !this.groupId) { if (this.buyType === 0 && !this.groupId) {
query.type = "single"; query.type = "single";
this.buyType = "single"; this.buyType = "single";
...@@ -374,6 +375,7 @@ export default { ...@@ -374,6 +375,7 @@ export default {
// window.location.reload(); // window.location.reload();
return false; return false;
} else { } else {
query.type = ""; query.type = "";
} }
if (localStorage.getItem("gdt_vid")) { if (localStorage.getItem("gdt_vid")) {
...@@ -428,7 +430,10 @@ export default { ...@@ -428,7 +430,10 @@ export default {
this.orderFlag = false; this.orderFlag = false;
payApi(json).then(res=>{ payApi(json).then(res=>{
// console.log(res) // console.log(res)
console.log(res)
if(res.out_trade_no && !res.appId){ if(res.out_trade_no && !res.appId){
console.log(352345234)
console.log(this.groupDetail.goods_type)
if(this.groupDetail.goods_type === 2 && !this.type){ if(this.groupDetail.goods_type === 2 && !this.type){
this.$router.push({name:'success',query:{out_trade_no:res.out_trade_no,invite_code:this.invite_code}}); this.$router.push({name:'success',query:{out_trade_no:res.out_trade_no,invite_code:this.invite_code}});
}else if(this.groupDetail.goods_type === 4){ }else if(this.groupDetail.goods_type === 4){
...@@ -437,14 +442,17 @@ export default { ...@@ -437,14 +442,17 @@ export default {
this.$router.push({name:'buySuccess',query:{out_trade_no:res.out_trade_no,invite_code:this.invite_code}}); this.$router.push({name:'buySuccess',query:{out_trade_no:res.out_trade_no,invite_code:this.invite_code}});
} }
}else{ }else{
console.log(99999)
let that = this; let that = this;
this.orderNo = res.out_trade_no; this.orderNo = res.out_trade_no;
this.jsApiParameters = res; this.jsApiParameters = res;
wx.miniProgram.getEnv(function(res) { wx.miniProgram.getEnv(function(res) {
console.log(2342345)
if(res.miniprogram){ if(res.miniprogram){
let payParam = encodeURIComponent(JSON.stringify(json)); let payParam = encodeURIComponent(JSON.stringify(json));
wx.miniProgram.navigateTo({url: `pages/wxPay/main?payParam=${payParam}`}) wx.miniProgram.navigateTo({url: `pages/wxPay/main?payParam=${payParam}`})
}else if (typeof WeixinJSBridge === 'undefined') { }else if (typeof WeixinJSBridge === 'undefined') {
if (document.addEventListener) { if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', that.jsApiCall, false) document.addEventListener('WeixinJSBridgeReady', that.jsApiCall, false)
} else if (document.attachEvent) { } else if (document.attachEvent) {
......
...@@ -6,7 +6,14 @@ ...@@ -6,7 +6,14 @@
@select="onSelect" @select="onSelect"
/> />
<div class="unit-block"> <div class="unit-block">
<div class="course_title" @click="actionsheetShow=true">{{secActions.name}} <i class="iconfont icon-below-s"></i> </div> <div class="course_title" @click="actionsheetShow=true">{{secActions.name}} <i class="iconfont icon-below-s"></i>
<router-link :to="{path: '/promptTime'}">
<!--<div class="zhongbian-kuang" @click.stop="timerClick">
<img class="zhongbian" :src="zhong" alt="">
</div>-->
</router-link>
</div>
<!--竖屏 主题栏--> <!--竖屏 主题栏-->
<swiper :options="swiperOption" class="banner" v-if="shopType==0&&unitList.length>0" ref="mySwiper"> <swiper :options="swiperOption" class="banner" v-if="shopType==0&&unitList.length>0" ref="mySwiper">
<swiper-slide v-for="(data,index) in unitList" :key="index"> <swiper-slide v-for="(data,index) in unitList" :key="index">
...@@ -179,7 +186,7 @@ ...@@ -179,7 +186,7 @@
</div> </div>
</div> </div>
</van-popup> </van-popup>
<bottom-tab></bottom-tab>
</div> </div>
</template> </template>
...@@ -196,17 +203,22 @@ ...@@ -196,17 +203,22 @@
import errorURL from '../../assets/error.png' import errorURL from '../../assets/error.png'
import nextUnitUrl from '../../assets/newLesson/nextUnit.png' import nextUnitUrl from '../../assets/newLesson/nextUnit.png'
import btn_kechegn from '../../assets/btn_kechegn.png' import btn_kechegn from '../../assets/btn_kechegn.png'
import zhong from '../../assets/evaluate/timer.png'
import promptTime from './promptTime'
export default { export default {
name: "mapDefault", name: "mapDefault",
components:{ components:{
swiper, swiper,
swiperSlide, swiperSlide,
bottomTab, bottomTab,
[Actionsheet.name]:Actionsheet [Actionsheet.name]:Actionsheet,
promptTime
}, },
data() { data() {
let that = this; let that = this;
return { return {
zhong: zhong,
actions: [ actions: [
], ],
secActions:{}, secActions:{},
...@@ -743,7 +755,7 @@ ...@@ -743,7 +755,7 @@
this.getLessonList(); this.getLessonList();
} }
} }
} },
} }
} }
</script> </script>
...@@ -852,7 +864,23 @@ ...@@ -852,7 +864,23 @@
z-index: 2; z-index: 2;
top: 0; top: 0;
left: 0; left: 0;
.course_title{font-size: 20px;padding: 10*@toVw 20*@toVw; border-bottom: 1px solid #eeeeee;} .course_title{
font-size: 20px;padding: 10*@toVw 20*@toVw; border-bottom: 1px solid #eeeeee;
position: relative;
.zhongbian-kuang {
width: 70 * @toVw;
height: 100%;
position: absolute;
top: 0;
right: 0;
.zhongbian {
width: 22 * @toVw;
height: 22 * @toVw;
margin-top: 15 * @toVw;
margin-left: 34 * @toVh;
}
}
}
.banner2{ .banner2{
display: none; display: none;
} }
......
<template>
<div class="prompt-time">
<div class="title">请设置您希望接收上课提醒的时间</div>
<div class="tishi-timer">
<img :src="tishiTimer" alt="">
</div>
<div class="time-setting" @click="dateShow = true">
<div class="time-setting-text">
当前设定的时间
</div>
<div class="time-setting-ti">
<span>{{ currentTime }}</span>
<img :src="youjiantou" alt="">
</div>
</div>
<div class="preservation">
保存
</div>
<van-popup v-model="dateShow" position="bottom">
<van-datetime-picker
@confirm="dateConfirm"
@cancel="dateShow=false"
v-model="currentTime"
type="time"
/>
</van-popup>
</div>
</template>
<script>
import {DatetimePicker, Popup} from 'vant';
import tishiTimer from '../../assets/evaluate/tishi_timer.png'
import youjiantou from '../../assets/evaluate/youjiantou.png'
export default {
name: "promptTime",
data() {
return {
currentTime: '--:--',
dateVal: '',
dateShow: false,
selectedValue: '',
tishiTimer: tishiTimer, // 图
youjiantou: youjiantou // 图
}
},
components: {
[DatetimePicker.name]: DatetimePicker,
[Popup.name]: Popup,
},
methods: {
dateConfirm(val) {
this.currentTime = val
this.dateShow = false
}
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
.van-picker {
border-radius: 30 * @toVw 30 * @toVw 0 0;
}
.prompt-time {
width: 100%;
height: 100%;
background: #ffffff;
padding: 0 27 * @toVw;
box-sizing: border-box;
.title {
padding-top: 30 * @toVw;
padding-bottom: 24 * @toVw;
font-size: 17 * @toVw;
font-weight: 500;
letter-spacing: 1px;
color: #000000;
}
.tishi-timer {
width: 322 * @toVw;
height: 245 * @toVw;
img {
width: 100%;
height: 100%;
}
}
.time-setting {
width: 100%;
overflow: hidden;
padding-top: 38 * @toVw;
padding-bottom: 11 * @toVw;
border-bottom: 1px solid #E2E2E2;
.time-setting-text {
float: left;
font-size: 14 * @toVw;
}
.time-setting-ti {
float: right;
span {
font-size: 15 * @toVw;
padding-right: 10 * @toVw;
vertical-align: middle;
}
img {
width: 10 * @toVw;
height: 14 * @toVw;
vertical-align: middle;
}
}
}
.preservation {
width: 330 * @toVw;
height: 50 * @toVw;
line-height: 50 * @toVw;
background: #40A9FF;
margin-top: 60 * @toVw;
border-radius: 28 * @toVw;
text-align: center;
font-size: 17 * @toVw;
font-weight: 500;
color: #ffffff;
}
}
</style>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<img slot="icon" :src="image.order" /> <img slot="icon" :src="image.order" />
</van-cell> </van-cell>
<van-cell title="成长记录" ref="star" to="/growthRecord" @click="toStar" is-link> <van-cell title="成长记录" ref="star" to="/growthRecord" @click="toStar" is-link>
<img slot="icon" :src="image.yizi" style="width: 5.5vw; height: 5.5vw;" /> <img slot="icon" :src="image.yizi" />
</van-cell> </van-cell>
<van-cell v-if="acitivityType==1" title="我的星星" ref="star" to="/starRank" @click="toStar" is-link> <van-cell v-if="acitivityType==1" title="我的星星" ref="star" to="/starRank" @click="toStar" is-link>
<img slot="icon" :src="image.mine_icon_star" /> <img slot="icon" :src="image.mine_icon_star" />
......
...@@ -213,6 +213,7 @@ ...@@ -213,6 +213,7 @@
page_id: this.page_id, page_id: this.page_id,
stay_time: (nowTime - lessonDetail.nowTime) / 1000 stay_time: (nowTime - lessonDetail.nowTime) / 1000
}; };
subUserLessonApi( subUserLessonApi(
this.elementId, this.elementId,
this.category_id, this.category_id,
......
...@@ -559,6 +559,12 @@ const router = new Router({ ...@@ -559,6 +559,12 @@ const router = new Router({
title: '成长记录' title: '成长记录'
} }
}, },
// 时间提示
{
path: '/promptTime',
name: 'promptTime',
component: e => require(['@/components/map/promptTime'], e)
},
{ {
path: '*', path: '*',
component: () => import('@/components/error'), component: () => import('@/components/error'),
......
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