🐞 fix(码单):修复码单qrcode的key值错误

This commit is contained in:
Haiyi 2022-12-28 17:03:33 +08:00
parent 41f72e5ee4
commit 6c4c7810bd
2 changed files with 10 additions and 2 deletions

View File

@ -418,7 +418,7 @@ const Order = () => {
itemObj.total_weight_error_discount / 100 itemObj.total_weight_error_discount / 100
).toString(), ).toString(),
order_total_num: itemObj.total_number.toString(), order_total_num: itemObj.total_number.toString(),
qrcode: `${PAY_H5_CODE_URL}?sale_order_no=${itemObj.order_no}`, qrcode: `${PAY_H5_CODE_URL}?key=${md5Key}`,
order_total_weight: (itemObj.total_weight / 1000).toString(), order_total_weight: (itemObj.total_weight / 1000).toString(),
estimate_amount: (itemObj.estimate_amount / 100).toString(), estimate_amount: (itemObj.estimate_amount / 100).toString(),
total_sale_price: (itemObj.total_sale_price / 100).toString(), total_sale_price: (itemObj.total_sale_price / 100).toString(),
@ -464,6 +464,7 @@ const Order = () => {
setItemObj(item) setItemObj(item)
if (item.status !== 10) { if (item.status !== 10) {
const res = await infoOneFetch({ id: item.should_collect_order_id }) const res = await infoOneFetch({ id: item.should_collect_order_id })
setmd5Key(res.data.md5_key)
payList.map((item) => { payList.map((item) => {
if (item.id === 3) { if (item.id === 3) {
item.name = `${res.data.account_period}天账期` item.name = `${res.data.account_period}天账期`
@ -500,6 +501,7 @@ const Order = () => {
} }
else { else {
const res = await infoTwoFetch({ id: item.pre_collect_order_id }) const res = await infoTwoFetch({ id: item.pre_collect_order_id })
setmd5Key(res.data.md5_key)
const arr: any = [] const arr: any = []
arr.push( arr.push(
{ {
@ -545,6 +547,7 @@ const Order = () => {
setTitle('待支付款项') setTitle('待支付款项')
setShowPay(true) setShowPay(true)
} }
const [md5Key, setmd5Key] = useState('')
// 确认交易 // 确认交易
const { fetchData: payOneFetch } = OrderPaymentOrderPaymentSubmission() const { fetchData: payOneFetch } = OrderPaymentOrderPaymentSubmission()
const { fetchData: payTwoFetch } = OrderPaymentPreCollectOrderOrderPaymentSubmission() const { fetchData: payTwoFetch } = OrderPaymentPreCollectOrderOrderPaymentSubmission()

View File

@ -392,6 +392,7 @@ const OrderDetails = () => {
if (item.status !== 10) { if (item.status !== 10) {
const res = await infoOneFetch({ id: item.should_collect_order_id }) const res = await infoOneFetch({ id: item.should_collect_order_id })
setmd5Key(res.data.md5_key)
payList.map((item) => { payList.map((item) => {
if (item.id === 3) { if (item.id === 3) {
item.name = `${res.data.account_period}天账期` item.name = `${res.data.account_period}天账期`
@ -428,6 +429,7 @@ const OrderDetails = () => {
} }
else { else {
const res = await infoTwoFetch({ id: item.pre_collect_order_id }) const res = await infoTwoFetch({ id: item.pre_collect_order_id })
setmd5Key(res.data.md5_key)
const arr: any = [] const arr: any = []
arr.push( arr.push(
{ {
@ -480,6 +482,9 @@ const OrderDetails = () => {
usePullDownRefresh(() => { usePullDownRefresh(() => {
getDetail() getDetail()
}) })
const [md5Key, setmd5Key] = useState('')
const { fetchData: payFetch } = GetPayCode() const { fetchData: payFetch } = GetPayCode()
const handScanpay = async() => { const handScanpay = async() => {
const list: any = [] const list: any = []
@ -530,7 +535,7 @@ const OrderDetails = () => {
infoObj.total_weight_error_discount / 100 infoObj.total_weight_error_discount / 100
).toString(), ).toString(),
order_total_num: infoObj.total_number.toString(), order_total_num: infoObj.total_number.toString(),
qrcode: `${PAY_H5_CODE_URL}?sale_order_no=${infoObj.order_no}`, qrcode: `${PAY_H5_CODE_URL}?key=${md5Key}`,
order_total_weight: (infoObj.total_weight / 1000).toString(), order_total_weight: (infoObj.total_weight / 1000).toString(),
estimate_amount: (infoObj.estimate_amount / 100).toString(), estimate_amount: (infoObj.estimate_amount / 100).toString(),
total_sale_price: (infoObj.total_sale_price / 100).toString(), total_sale_price: (infoObj.total_sale_price / 100).toString(),