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

updates

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