交易市场新增微信支付

This commit is contained in:
唐明明
2021-11-04 16:49:09 +08:00
parent f8aed4d12c
commit 5f7c8c36ca
4 changed files with 13 additions and 11 deletions

View File

@@ -10,8 +10,8 @@ import router from '../router'
// 基础配置 // 基础配置
const config = { const config = {
apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境 // apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境
// apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境 apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境
apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式) apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式)
timeout : 60000 timeout : 60000
} }

View File

@@ -83,6 +83,7 @@
<script> <script>
import { marketsInfo, marketsBuy, marketsPay } from '@/apis/interfaces/market' import { marketsInfo, marketsBuy, marketsPay } from '@/apis/interfaces/market'
import userAuth from '@/public/userAuth' import userAuth from '@/public/userAuth'
import cashierPay from '@/public/cashierPay'
export default { export default {
data() { data() {
return { return {
@@ -149,12 +150,11 @@
marketsPay(this.orderNo, this.payValue).then(res => { marketsPay(this.orderNo, this.payValue).then(res => {
switch (this.payValue){ switch (this.payValue){
case 'wechat': case 'wechat':
let payConfigObj = JSON.parse(res)
cashierPay.pay('wxpay', payConfigObj, 'market')
break break
case 'alipay': case 'alipay':
cashierPay.pay('alipay', res, 'market').then(payRes => { cashierPay.pay('alipay', res, 'market')
console.log(payRes)
})
break break
} }
}).catch(err => { }).catch(err => {

View File

@@ -266,7 +266,9 @@
let identity = this.identitie[this.tabsIndex].identity_id let identity = this.identitie[this.tabsIndex].identity_id
vipOrder(identity, { vipOrder(identity, {
year: 1, year: 1,
}).then(res => { }).then(res => {
if (payType === 0) this.wechatAppPay(res.id) if (payType === 0) this.wechatAppPay(res.id)
if (payType === 1) this.aliPayConfig(res.id) if (payType === 1) this.aliPayConfig(res.id)
}).catch(err => { }).catch(err => {
@@ -277,7 +279,7 @@
}) })
}, },
// 支付宝支付 // 支付
aliPayConfig(orderId) { aliPayConfig(orderId) {
getAliPayConfig(orderId, { getAliPayConfig(orderId, {
type: 'app' type: 'app'

File diff suppressed because one or more lines are too long