提交 2a4818af authored 作者: matian's avatar matian

updates

上级 e718fff2
......@@ -63,10 +63,10 @@ function pay() {
buy_count: '1',
notify_url: `https://ep-lms-api.ezijing.com/v2/student/push?tenant=paa&sso_id=${user.user?.id}&class_id=${props.shopItem?.class_id}&course_flag=1&course_id=${props.shopItem?.course_id}`
}
if (currentCheck.value === '4' && wechat) {
if (payMode.value === 4 && wechat) {
params.payment_method = '4'
// 微信扫码支付
} else if (currentCheck.value === '12' && alipay) {
} else if (payMode.value === 12 && alipay) {
params.payment_method = '12'
}
createOrder(params).then((order) => {
......@@ -99,14 +99,18 @@ const handlePay = () => {
ElMessage.warning('请先勾选紫荆金保服务协议')
} else {
if (user.isLogin) {
if (mobile) {
handleCreateOrder()
} else {
console.log(mobile)
if (!mobile.value) {
console.log('111')
const params = {
payMode: payMode.value,
status: 'order'
}
emit('success', params)
} else {
console.log('222')
handleCreateOrder()
}
} else {
window.location.href = `${
......@@ -231,9 +235,7 @@ const handlePrev = () => {
/>
<div class="radio_tit">支付宝支付</div>
<div
:class="
currentCheck === '12' ? 'radio_check_active' : 'radio_check'
"
:class="payMode === '12' ? 'radio_check_active' : 'radio_check'"
@click="checkdChange('12')"
>
<template v-if="currentCheck === '12'">
......@@ -247,9 +249,7 @@ const handlePrev = () => {
/>
<div class="radio_tit">微信支付</div>
<div
:class="
currentCheck === '4' ? 'radio_check_active' : 'radio_check'
"
:class="payMode === '4' ? 'radio_check_active' : 'radio_check'"
@click="checkdChange('4')"
>
<template v-if="currentCheck === '4'">
......
......@@ -8,10 +8,7 @@ const timer = ref()
const qrCodeUrl = ref('')
const payStatus = ref('')
const orderId = ref('')
// const UA = navigator.userAgent
// const isMobile = /iphone/i.test(UA) || (/android/i.test(UA) && /mobile/i.test(UA))
// const isWechat = /micromessenger/i.test(UA)
// const isAliPay = /alipayclient/i.test(UA)
const props = defineProps({
payMethod: {
type: Number
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论