|
@@ -110,7 +110,7 @@ export function usePay(opt = {}) {
|
|
|
taocanId
|
|
taocanId
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
- if (res.data.code == 0) {
|
|
|
|
|
|
|
+ if (res.code == 0) {
|
|
|
Object.assign(wxData, res.data);
|
|
Object.assign(wxData, res.data);
|
|
|
// 开始支付
|
|
// 开始支付
|
|
|
wxPay(res.data);
|
|
wxPay(res.data);
|
|
@@ -149,7 +149,7 @@ export function usePay(opt = {}) {
|
|
|
taocanId
|
|
taocanId
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
- if (res.data.code == 0) {
|
|
|
|
|
|
|
+ if (res.code == 0) {
|
|
|
Object.assign(aliData, res.data);
|
|
Object.assign(aliData, res.data);
|
|
|
// 开始支付
|
|
// 开始支付
|
|
|
aliPay(res.data);
|
|
aliPay(res.data);
|
|
@@ -232,7 +232,7 @@ export function usePay(opt = {}) {
|
|
|
// 校验
|
|
// 校验
|
|
|
function OrderCheckWx() {
|
|
function OrderCheckWx() {
|
|
|
orderCheck({
|
|
orderCheck({
|
|
|
- id: wxData.orderId
|
|
|
|
|
|
|
+ orderId: wxData.orderId
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
if (res.code == 0 && res.data) {
|
|
if (res.code == 0 && res.data) {
|
|
|
// 校验通过,支付成功
|
|
// 校验通过,支付成功
|
|
@@ -240,11 +240,20 @@ export function usePay(opt = {}) {
|
|
|
} else {
|
|
} else {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
orderCheck({
|
|
orderCheck({
|
|
|
- id: wxData.orderId
|
|
|
|
|
|
|
+ orderId: wxData.orderId
|
|
|
}).then(res2 => {
|
|
}).then(res2 => {
|
|
|
if (res2.code == 0 && res2.data) {
|
|
if (res2.code == 0 && res2.data) {
|
|
|
// 校验通过,支付成功
|
|
// 校验通过,支付成功
|
|
|
paySuccessResult();
|
|
paySuccessResult();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ toast('支付二次查验失败,请联系管理员')
|
|
|
|
|
+ checkError && checkError({
|
|
|
|
|
+ type: 'OrderCheckWx',
|
|
|
|
|
+ msg: '支付二次查验失败,请联系管理员',
|
|
|
|
|
+ err: err1,
|
|
|
|
|
+ form: 'wx'
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}).catch(err1 => {
|
|
}).catch(err1 => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
@@ -317,7 +326,7 @@ export function usePay(opt = {}) {
|
|
|
// 校验
|
|
// 校验
|
|
|
function OrderCheckAli() {
|
|
function OrderCheckAli() {
|
|
|
orderCheck({
|
|
orderCheck({
|
|
|
- id: aliData.orderId
|
|
|
|
|
|
|
+ orderId: aliData.orderId
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
if (res.code == 0 && res.data) {
|
|
if (res.code == 0 && res.data) {
|
|
|
// 校验通过,支付成功
|
|
// 校验通过,支付成功
|
|
@@ -325,11 +334,20 @@ export function usePay(opt = {}) {
|
|
|
} else {
|
|
} else {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
orderCheck({
|
|
orderCheck({
|
|
|
- id: aliData.orderId
|
|
|
|
|
|
|
+ orderId: aliData.orderId
|
|
|
}).then(res2 => {
|
|
}).then(res2 => {
|
|
|
if (res2.code == 0 && res2.data) {
|
|
if (res2.code == 0 && res2.data) {
|
|
|
// 校验通过,支付成功
|
|
// 校验通过,支付成功
|
|
|
paySuccessResult();
|
|
paySuccessResult();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ toast('支付二次查验失败,请联系管理员')
|
|
|
|
|
+ checkError && checkError({
|
|
|
|
|
+ type: 'OrderCheckAli',
|
|
|
|
|
+ msg: '支付二次查验失败,请联系管理员',
|
|
|
|
|
+ err: err1,
|
|
|
|
|
+ form: 'ali'
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}).catch(err1 => {
|
|
}).catch(err1 => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|