本地生活添加新的支付接口

This commit is contained in:
wangxiaowei 2024-10-21 18:15:54 +08:00
parent aef36eb840
commit 35788173b8
2 changed files with 32 additions and 1 deletions

@ -60,3 +60,8 @@ export function getPostStationList(data) {
return request.post("LocalStore/getPostStationList", data)
}
export function payTest(data) {
return request.post("abutment/payTest", data)
}

@ -173,6 +173,9 @@
localShopPayWeixin,
localBalance
} from '@/api/user.js'
import {
payTest
} from '@/api/local_store.js'
import {
getLocalShopById
} from "@/api/shop"
@ -399,7 +402,29 @@
mask: true
})
localShopPayWeixin({
// localShopPayWeixin({
// money: this.money,
// lid: this.lstore_id,
// user_id: this.user_id,
// spec_item_id: this.spec_item_id,
// goods_num: this.goods ? this.goods.goods_num : 1,
// lsg_order_id: this.lsg_order_id,
// remark: this.remark,
// post_station_id: this.post_station_id,
// post_station_time: this.post_station_time
// }).then((result) => {
// if (result.code == 1) {
// const pay = {
// nonceStr: result.data.nonceStr,
// package: result.data.package,
// paySign: result.data.paySign,
// signType: result.data.signType,
// timeStamp: result.data.timeStamp,
// }
// this.handleWechatPay(pay);
// }
// })
payTest({
money: this.money,
lid: this.lstore_id,
user_id: this.user_id,
@ -438,6 +463,7 @@
// 微信支付
handleWechatPay(data) {
wxpay(data).then(res => {
console.log('res=', res)
this.handPayResult(res)
}).catch(err => {
console.log('err=', err)