完成consumer端同步
This commit is contained in:
@@ -58,19 +58,20 @@ const loadOrderInfo = async () => {
|
||||
|
||||
onLoad((options) => {
|
||||
if (options == null) return
|
||||
|
||||
const orderIdValue = options['orderId']
|
||||
if (orderIdValue != null) {
|
||||
orderId.value = orderIdValue as string
|
||||
orderNo.value = orderIdValue as string
|
||||
|
||||
const amountValue = options['amount']
|
||||
if (amountValue != null) {
|
||||
const amountStr = amountValue.toString()
|
||||
|
||||
const optionsObj = options as UTSJSONObject
|
||||
const orderIdValue = optionsObj.getString('orderId') ?? ''
|
||||
if (orderIdValue != '') {
|
||||
orderId.value = orderIdValue
|
||||
orderNo.value = orderIdValue
|
||||
|
||||
const amountValue = optionsObj.getString('amount') ?? ''
|
||||
if (amountValue != '') {
|
||||
const amountStr = amountValue
|
||||
console.log('[payment-success] amountStr:', amountStr)
|
||||
const parsed = parseFloat(amountStr)
|
||||
console.log('[payment-success] parsed:', parsed)
|
||||
if (isNaN(parsed) == false) {
|
||||
if (Number.isNaN(parsed) == false) {
|
||||
amount.value = parsed
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,7 @@ const goHome = () => {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* height: 100vh; */
|
||||
/* height: 100%; */
|
||||
flex: 1;
|
||||
background-color: #ffffff;
|
||||
padding: 0 30px;
|
||||
|
||||
Reference in New Issue
Block a user