6bbdee8b by 杨炀

no message

1 parent f0f90c51
......@@ -628,6 +628,13 @@ export function createWePay(data) {
data:data
})
}
export function createWePayPhone(data) {
return request({
url: `/league/signOrder/wxH5Pay`,
method: 'post',
data:data
})
}
export function createPalPay(data) {
return request({
url: `/league/signOrder/palPay`,
......
......@@ -602,9 +602,10 @@ function removeCurproject() {
projectIds.value = _.without(projectIds.value, currProjectId.value)
}
function checkTwo(a,b) {
match.checkMate({per1Id:a,per2Id:b,cptId:matchId.value}).then(res=>{
match.checkMate({per1Id:a.id,per2Id:b.id,cptId:matchId.value}).then(res=>{
if(!res.data){
ElMessage.warning(language.value == 0 ? '他们不是固定组合':'They\'re not a couple')
// ElMessage.warning(language.value == 0 ? '他们不是固定组合':'They\'re not a couple')
ElMessage.warning(language.value == 0 ? `${a.realName} 已经和其他人组成舞伴,无法报名:请重新选择`:`${a.realName} has already formed a dancer with another person, cannot sign up: please select again`)
}
})
}
......@@ -614,7 +615,7 @@ watch(choosedchoosed, (newVal, oldVal) => {
//如果一男一女,判断是否舞伴
if(choosed2List.value.length==2){
if(choosed2List.value[0].sex!=choosed2List.value[1].sex){
checkTwo(newVal[0],newVal[1])
checkTwo(choosed2List.value[0],choosed2List.value[1])
}
}
}
......
......@@ -214,7 +214,7 @@ function handleSelectionChange(val) {
//判断是否队友
if(val.length==2){
if(val[0].sex!=val[1].sex){
checkTwo(val[0].id,val[1].id)
checkTwo(val[0],val[1])
}
}
if(val.length>0){
......@@ -232,9 +232,9 @@ function handleSelectionChange(val) {
}
}
function checkTwo(a,b) {
match.checkMate({per1Id:a,per2Id:b,cptId:matchId}).then(res=>{
match.checkMate({per1Id:a.id,per2Id:b.id,cptId:matchId}).then(res=>{
if(!res.data){
ElMessage.warning(language.value == 0 ? '他们不是固定组合':'They\'re not a couple')
ElMessage.warning(language.value == 0 ? `${a.realName} 已经和其他人组成舞伴,无法报名:请重新选择`:`${a.realName} has already formed a dancer with another person, cannot sign up: please select again`)
proxy.$refs['allSportmenTable'].clearSelection()
}
})
......
......@@ -383,8 +383,9 @@ onMounted(() => {
language.value = 1
}
}
console.log(navigator.userAgent)
var is_mobile = navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
console.log(is_mobile)
if (is_mobile) {
isphone.value = true
} else {
......@@ -462,13 +463,18 @@ function changePaytype() {
function goPay(){
if(payType.value=='2' && form.value.payTypeArr.indexOf('2')>-1){
if(isphone.value){
//移动支付
}
match.createWePay({orderId:orderId.value}).then(res=>{
//拉起移动支付
match.createWePayPhone({orderId:orderId.value}).then(res=>{
hideconfirmbtn.value = true
window.location.href = res.data
})
} else {
match.createWePay({orderId:orderId.value}).then(res=>{
wePayCodeUrl.value = res.data
hideconfirmbtn.value = true
startforGetData()
})
})
}
} else if(payType.value=='2' && form.value.payTypeArr.indexOf('2')==-1){
ElMessage.warning(language.value == 0 ? '请选择支付方式' : 'Please select payment method')
return
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!