msb_beta
ch 2 years ago
parent 4650f597dd
commit 66eb0d74d6

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-29 17:38:17
* @LastEditors: ch
* @LastEditTime: 2022-04-22 22:22:51
* @LastEditTime: 2022-04-27 11:41:20
* @Description: file content
*/
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
@ -74,8 +74,8 @@ export const ApiPutCancelOrder = (data) =>
* @param {*} data
*/
export const ApiPostWxPay = (data) =>
// ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/app`, data));
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/pay/payTest`, data));
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/h5`, data));
// ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/pay/payTest`, data));
/**
* 获取订单统计数据

@ -2,17 +2,17 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
* @LastEditTime: 2022-04-26 18:13:01
* @LastEditTime: 2022-04-27 11:45:52
* @Description: 项目接口请求统一处理器返回一个需要token和不需要token的请求封装方法
*/
import MsbUniRequest from '@/common/plugins/msbUniRequest';
import $store from '@/common/store';
const ENV = 'prod';
const ENV = 'test';
const BASE_URL = {
'test' : 'https://like-app.mashibing.com/test',
// 'test' : '',
// 'test' : 'https://k8s-horse-gateway.mashibing.cn',
'test' : '',
'release' : '',
'prod' : '//like-gateway.mashibing.com'
};

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>马士兵严选</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.07ea43cf.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.398c803a.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -77,16 +77,16 @@
"devServer" : {
"proxy" : {
"/uc/" : {
"target" : "http://192.168.10.109:8090/"
"target" : "http://192.168.10.9:8090/"
},
"/mall/" : {
"target" : "http://192.168.10.109:8090/"
"target" : "http://192.168.10.9:8090/"
},
"/pay/" : {
"target" : "http://192.168.10.109:8090/"
"target" : "http://192.168.10.9:8090/"
},
"/oss/" : {
"target" : "http://192.168.10.109:8090/"
"target" : "http://192.168.10.9:8090/"
}
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-04-26 14:17:01
* @LastEditTime: 2022-04-27 11:56:07
* @Description: file content
-->
<template>
@ -172,25 +172,50 @@ export default {
uni.$u.toast(error.message);
return false;
}
this.wxpay(result.orderId);
if(this.payType === 'wxpay'){
this.wxpay(result.orderId);
}else{
uni.$u.toast('暂不支持支付宝支付');
}
},
wxpay(orderId){
this.$msb.confirm({
content : '您确定要支付吗?',
cancelText : '暂不支付',
confirmText : '立即支付',
confirm : async () => {
const {error, result} = await ApiPostWxPay({orderId,payTypeEnum:'WXPAY'});
if(error){
this.$Router.replace(`/payFail?ordId=${orderId}`)
}else{
async wxpay(orderId){
const {error, result} = await ApiPostWxPay({orderId});
if(error){
this.$Router.replace(`/payFail?ordId=${orderId}`)
}else{
this.$msb.confirm({
content : '确认微信支付是否已完成' ,
cancelText : '未支付',
confirmText : '支付已完成',
confirm(){
this.$Router.replace(`/paySuccess?ordId=${orderId}`)
},
cancel(){
this.$Router.replace(`/payFail?ordId=${orderId}`);
}
},
cancel : ()=>{
this.$Router.replace(`/orderDetail?id=${orderId}`)
}
})
})
window.location.href = result.dataInfo.payUrl;
}
// this.$msb.confirm({
// content : '',
// cancelText : '',
// confirmText : '',
// confirm : async () => {
// const {error, result} = await ApiPostWxPay({orderId,payTypeEnum:'WXPAY'});
// if(error){
// this.$Router.replace(`/payFail?ordId=${orderId}`)
// }else{
// this.$Router.replace(`/paySuccess?ordId=${orderId}`)
// }
// },
// cancel : ()=>{
// this.$Router.replace(`/orderDetail?id=${orderId}`)
// }
// })
}

Loading…
Cancel
Save