调整支付

This commit is contained in:
唐明明
2023-07-11 14:47:30 +08:00
parent c8cc2b6dda
commit 0320f43c0d
8 changed files with 99 additions and 30 deletions

View File

@@ -61,6 +61,25 @@ const orderCancel = order => {
}) })
} }
// 核验列表
const codes = code => {
return request({
url : "empower/code",
data : { code },
method : "POST",
})
}
// 确认核验
const sign = item_id => {
return request({
url : "empower/code/sign",
data : { item_id },
method : "POST",
})
}
export { export {
lists, lists,
info, info,
@@ -68,6 +87,8 @@ export {
buy, buy,
orderInit, orderInit,
orderList, orderList,
orderCancel orderCancel,
codes,
sign
} }

View File

@@ -154,6 +154,28 @@ const synDiffDg = (diff_price_id, data) =>{
}) })
} }
// 公共收银台支付
const payWechat = data => {
return request({
url: "pay/cashier_desk/wechat",
method: 'POST',
data
})
}
const payUms = data => {
return request({
url: "pay/cashier_desk/ums",
method: 'POST',
data
})
}
const payDg = data => {
return request({
url: "pay/cashier_desk/dg",
method: 'POST',
data
})
}
export { export {
ums, ums,
@@ -176,6 +198,11 @@ export {
entrustDg, entrustDg,
synDiffPay, synDiffPay,
synDiffUms, synDiffUms,
synDiffDg synDiffDg,
// 综合收银台
payWechat,
payUms,
payDg
} }

View File

@@ -642,7 +642,7 @@
"style" :{ "style" :{
"navigationBarTitleText": "赋能订单", "navigationBarTitleText": "赋能订单",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
} }
], ],

View File

@@ -66,7 +66,7 @@
<view class="orders-flex"> <view class="orders-flex">
<view class="btns"> <view class="btns">
<view class="btns-item btns-border" v-if="item.status == 0" @click="onCancel(item.order_id)">取消</view> <view class="btns-item btns-border" v-if="item.status == 0" @click="onCancel(item.order_id)">取消</view>
<view class="btns-item btns-border" v-if="item.status == 0">支付</view> <view class="btns-item btns-border" v-if="item.status == 0" @click="onPay(item)">支付</view>
<view class="btns-item" @click="onShowUsers(item.items)">报名信息</view> <view class="btns-item" @click="onShowUsers(item.items)">报名信息</view>
</view> </view>
</view> </view>
@@ -228,6 +228,22 @@
if(ListIndex >= 0){ if(ListIndex >= 0){
this.orders.splice(ListIndex, 1) this.orders.splice(ListIndex, 1)
} }
},
// 订单支付
onPay(obj){
let { order_id, order_type, price } = obj
console.log(obj)
this.$Router.replace({
name: 'FeePay',
params: {
orderId : order_id,
orderType : order_type,
price : price,
payForm : 'entrust',
}
})
} }
}, },
onReachBottom() { onReachBottom() {

View File

@@ -88,6 +88,9 @@
}; };
}, },
onShow(){ onShow(){
console.log(codes)
codes(this.$Route.query.code).then(res => { codes(this.$Route.query.code).then(res => {
this.vouchers = res; this.vouchers = res;
}) })

View File

@@ -122,7 +122,7 @@
return { return {
token : '', // 登录token token : '', // 登录token
orderId : '', // 微信支付id orderId : '', // 微信支付id
jumpUrlDg : '', // 抖巩支付 jumpUrlDg : '', // 抖巩支付
tradeId : '', // 微信支付id tradeId : '', // 微信支付id
Payment : 'wechat', // 支付类型 Payment : 'wechat', // 支付类型
applyData : '', // 支付数据 applyData : '', // 支付数据
@@ -134,16 +134,15 @@
} }
}, },
onShow() { onShow() {
console.log(this.$Route.query) this.orderType = this.$Route.query.orderType
this.token = this.$store.getters.getToken this.token = this.$store.getters.getToken
this.payPrice = this.$Route.query.price this.payPrice = this.$Route.query.price
this.payForm = this.$Route.query.payForm this.payForm = this.$Route.query.payForm
this.orderId = this.$Route.query.id ?this.$Route.query.id: this.$Route.query.orderId this.orderId = this.$Route.query.id ?this.$Route.query.id: this.$Route.query.orderId
}, },
methods: { methods: {
// 选择支付方式 // 选择支付方式
payType(type) { payType(type) {
if(this.Payment === type) return if(this.Payment === type) return
this.Payment = type this.Payment = type
if(type === 'umsMp'){ if(type === 'umsMp'){
@@ -164,7 +163,6 @@
// 斗拱支付 // 斗拱支付
dgwxPay(){ dgwxPay(){
let payType = this.Payment == 'dgwx' ? 'mp' : 'mp_alipay' let payType = this.Payment == 'dgwx' ? 'mp' : 'mp_alipay'
let NewUrl = '' let NewUrl = ''
// 是否是补差价订单 // 是否是补差价订单
if(this.$Route.query.style == 'diff') { if(this.$Route.query.style == 'diff') {
@@ -180,7 +178,7 @@
} }
NewUrl = apiUrl NewUrl = apiUrl
} }
NewUrl(this.orderId, {type: payType, app_schema: 'weixin://'}).then(res => { NewUrl(this.orderId, {type: payType, app_schema: 'weixin://', order_type: this.orderType}).then(res => {
let { params, trade_id } = res; let { params, trade_id } = res;
this.getState = true this.getState = true
switch (payType){ switch (payType){
@@ -222,7 +220,7 @@
NewUrl = apiUrl NewUrl = apiUrl
} }
NewUrl(this.orderId, {type: payType}).then(res => { NewUrl(this.orderId, {type: payType, order_type: this.orderType}).then(res => {
this.getState = true this.getState = true
switch (payType){ switch (payType){
case 'mp': case 'mp':
@@ -275,7 +273,8 @@
} }
NewUrl(this.orderId, { NewUrl(this.orderId, {
openid : newOpenId openid : newOpenId,
order_type : this.orderType
}).then(res => { }).then(res => {
let wxConfig = JSON.parse(res.wechat) let wxConfig = JSON.parse(res.wechat)
jweixin.config({ jweixin.config({

View File

@@ -218,7 +218,10 @@
// 综法订单数据数量 // 综法订单数据数量
synthesisInfo() { synthesisInfo() {
synthesisCount({channel: 'self'}).then(res => { synthesisCount({channel: 'self'}).then(res => {
console.log(res)
this.synthesisAll = res this.synthesisAll = res
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({

View File

@@ -30,20 +30,20 @@ router.beforeEach((to, from, next) => {
return return
} }
// 检查用户是否授权了微信 // 检查用户是否授权了微信
if(to.name != 'webWechatIndex' && openId === ''){ // if(to.name != 'webWechatIndex' && openId === ''){
authFollow({ // authFollow({
// url: 'https://web.douhuotest.douhuofalv.com/webWechat/index' // // url: 'https://web.douhuotest.douhuofalv.com/webWechat/index'
url: 'https://web.douhuofalv.com/webWechat/index' // url: 'https://web.douhuofalv.com/webWechat/index'
}).then(res => { // }).then(res => {
window.location.href = res // window.location.href = res
}).catch(err => { // }).catch(err => {
uni.showToast({ // uni.showToast({
title: err.message, // title: err.message,
icon: "none" // icon: "none"
}) // })
}) // })
return // return
} // }
// 检查是否需要登录 // 检查是否需要登录
if(to.auth && token === ''){ if(to.auth && token === ''){