|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="home-getOrder">
|
|
|
<form class="form" @submit="orderSubmit">
|
|
|
- <view class="select-input">
|
|
|
+ <view v-if="show" class="select-input">
|
|
|
<input class="input" style="display:none;" />
|
|
|
<text>账户余额:</text><input class="input" name="altMainBalance" disabled :value="altMainBalance"/>
|
|
|
</view>
|
|
@@ -61,6 +61,7 @@
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
|
|
+ show: true,
|
|
|
order:null,
|
|
|
sn:null,
|
|
|
clientId:null,
|
|
@@ -89,6 +90,9 @@
|
|
|
if(order.type==3){
|
|
|
this.production = order.personageProportion;
|
|
|
}
|
|
|
+ if(order.payPlatform == 3) {
|
|
|
+ this.show = false;
|
|
|
+ }
|
|
|
this.sn = order.sn;
|
|
|
this.clientId = order.clientId;
|
|
|
this.productName = order.productName;
|
|
@@ -126,28 +130,53 @@
|
|
|
var order = this.order;
|
|
|
var refundAmount = this.refundAmount;
|
|
|
var token = uni.getStorageSync("token");
|
|
|
- uni.request({
|
|
|
- url: this.serverurl + '/TOrder/refund',
|
|
|
- data: {
|
|
|
- "sn": order.sn,
|
|
|
- "id": order.id,
|
|
|
- "refundAmount":refundAmount
|
|
|
- },
|
|
|
- header: {
|
|
|
- 'token': token
|
|
|
- },
|
|
|
- method: "POST",
|
|
|
- success: (res) => {
|
|
|
- var message = res.data.message;
|
|
|
- if(res.data.code){
|
|
|
- this.status = 2;
|
|
|
- }
|
|
|
- uni.showToast({
|
|
|
- title: message,
|
|
|
- duration: 3000
|
|
|
- });
|
|
|
- },
|
|
|
- });
|
|
|
+ if(order.payPlatform != null && order.payPlatform == '3') {
|
|
|
+ //如果为直接对接微信支付
|
|
|
+ uni.request({
|
|
|
+ url: this.serverurl + '/tWeixinPay/refund',
|
|
|
+ data: {
|
|
|
+ "sn": order.sn,
|
|
|
+ "refusePrice":refundAmount
|
|
|
+ },
|
|
|
+ header: {
|
|
|
+ 'token': token
|
|
|
+ },
|
|
|
+ method: "GET",
|
|
|
+ success: (res) => {
|
|
|
+ var message = res.data.message;
|
|
|
+ if(res.data.code){
|
|
|
+ this.status = 2;
|
|
|
+ }
|
|
|
+ uni.showToast({
|
|
|
+ title: message,
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ uni.request({
|
|
|
+ url: this.serverurl + '/TOrder/refund',
|
|
|
+ data: {
|
|
|
+ "sn": order.sn,
|
|
|
+ "id": order.id,
|
|
|
+ "refundAmount":refundAmount
|
|
|
+ },
|
|
|
+ header: {
|
|
|
+ 'token': token
|
|
|
+ },
|
|
|
+ method: "POST",
|
|
|
+ success: (res) => {
|
|
|
+ var message = res.data.message;
|
|
|
+ if(res.data.code){
|
|
|
+ this.status = 2;
|
|
|
+ }
|
|
|
+ uni.showToast({
|
|
|
+ title: message,
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
} else if (res.cancel) {
|
|
|
// console.log('用户点击取消');
|