调整支付
This commit is contained in:
@@ -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 {
|
||||
lists,
|
||||
info,
|
||||
@@ -68,6 +87,8 @@ export {
|
||||
buy,
|
||||
orderInit,
|
||||
orderList,
|
||||
orderCancel
|
||||
orderCancel,
|
||||
codes,
|
||||
sign
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
ums,
|
||||
@@ -176,6 +198,11 @@ export {
|
||||
entrustDg,
|
||||
synDiffPay,
|
||||
synDiffUms,
|
||||
synDiffDg
|
||||
synDiffDg,
|
||||
|
||||
// 综合收银台
|
||||
payWechat,
|
||||
payUms,
|
||||
payDg
|
||||
}
|
||||
|
||||
|
||||
@@ -642,7 +642,7 @@
|
||||
"style" :{
|
||||
"navigationBarTitleText": "赋能订单",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#FFF"
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<view class="orders-flex">
|
||||
<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">支付</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>
|
||||
</view>
|
||||
@@ -228,6 +228,22 @@
|
||||
if(ListIndex >= 0){
|
||||
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() {
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
};
|
||||
},
|
||||
onShow(){
|
||||
|
||||
console.log(codes)
|
||||
|
||||
codes(this.$Route.query.code).then(res => {
|
||||
this.vouchers = res;
|
||||
})
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
return {
|
||||
token : '', // 登录token
|
||||
orderId : '', // 微信支付id
|
||||
jumpUrlDg : '', // 抖巩支付
|
||||
jumpUrlDg : '', // 抖巩支付
|
||||
tradeId : '', // 微信支付id
|
||||
Payment : 'wechat', // 支付类型
|
||||
applyData : '', // 支付数据
|
||||
@@ -134,16 +134,15 @@
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
console.log(this.$Route.query)
|
||||
this.token = this.$store.getters.getToken
|
||||
this.payPrice = this.$Route.query.price
|
||||
this.payForm = this.$Route.query.payForm
|
||||
this.orderId = this.$Route.query.id ?this.$Route.query.id: this.$Route.query.orderId
|
||||
this.orderType = this.$Route.query.orderType
|
||||
this.token = this.$store.getters.getToken
|
||||
this.payPrice = this.$Route.query.price
|
||||
this.payForm = this.$Route.query.payForm
|
||||
this.orderId = this.$Route.query.id ?this.$Route.query.id: this.$Route.query.orderId
|
||||
},
|
||||
methods: {
|
||||
// 选择支付方式
|
||||
payType(type) {
|
||||
|
||||
if(this.Payment === type) return
|
||||
this.Payment = type
|
||||
if(type === 'umsMp'){
|
||||
@@ -164,7 +163,6 @@
|
||||
// 斗拱支付
|
||||
dgwxPay(){
|
||||
let payType = this.Payment == 'dgwx' ? 'mp' : 'mp_alipay'
|
||||
|
||||
let NewUrl = ''
|
||||
// 是否是补差价订单
|
||||
if(this.$Route.query.style == 'diff') {
|
||||
@@ -180,7 +178,7 @@
|
||||
}
|
||||
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;
|
||||
this.getState = true
|
||||
switch (payType){
|
||||
@@ -222,7 +220,7 @@
|
||||
NewUrl = apiUrl
|
||||
}
|
||||
|
||||
NewUrl(this.orderId, {type: payType}).then(res => {
|
||||
NewUrl(this.orderId, {type: payType, order_type: this.orderType}).then(res => {
|
||||
this.getState = true
|
||||
switch (payType){
|
||||
case 'mp':
|
||||
@@ -275,7 +273,8 @@
|
||||
}
|
||||
|
||||
NewUrl(this.orderId, {
|
||||
openid : newOpenId
|
||||
openid : newOpenId,
|
||||
order_type : this.orderType
|
||||
}).then(res => {
|
||||
let wxConfig = JSON.parse(res.wechat)
|
||||
jweixin.config({
|
||||
|
||||
@@ -218,7 +218,10 @@
|
||||
|
||||
// 综法订单数据数量
|
||||
synthesisInfo() {
|
||||
synthesisCount({channel: 'self'}).then(res => {
|
||||
synthesisCount({channel: 'self'}).then(res => {
|
||||
|
||||
console.log(res)
|
||||
|
||||
this.synthesisAll = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
|
||||
@@ -30,20 +30,20 @@ router.beforeEach((to, from, next) => {
|
||||
return
|
||||
}
|
||||
// 检查用户是否授权了微信
|
||||
if(to.name != 'webWechatIndex' && openId === ''){
|
||||
authFollow({
|
||||
// url: 'https://web.douhuotest.douhuofalv.com/webWechat/index'
|
||||
url: 'https://web.douhuofalv.com/webWechat/index'
|
||||
}).then(res => {
|
||||
window.location.href = res
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
// if(to.name != 'webWechatIndex' && openId === ''){
|
||||
// authFollow({
|
||||
// // url: 'https://web.douhuotest.douhuofalv.com/webWechat/index'
|
||||
// url: 'https://web.douhuofalv.com/webWechat/index'
|
||||
// }).then(res => {
|
||||
// window.location.href = res
|
||||
// }).catch(err => {
|
||||
// uni.showToast({
|
||||
// title: err.message,
|
||||
// icon: "none"
|
||||
// })
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
|
||||
// 检查是否需要登录
|
||||
if(to.auth && token === ''){
|
||||
|
||||
Reference in New Issue
Block a user