修改页面
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<uni-nav-bar title="生活缴费" backgroundColor="transparent" :border="false">
|
||||
</uni-nav-bar>
|
||||
<view class="topbox">
|
||||
<image class="titleImg" src="https://wuyeadmin.bugtc.com/images/propertyImgs/payTitle.png"></image>
|
||||
<!-- <image class="titleImg" src="https://wuyeadmin.bugtc.com/images/propertyImgs/payTitle.png"></image> -->
|
||||
<image class="payImg" src="https://wuyeadmin.bugtc.com/images/propertyImgs/payImg.png"></image>
|
||||
</view>
|
||||
<scroll-view class="page" scroll-y="true">
|
||||
@@ -36,7 +36,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 新增缴费区域 -->
|
||||
<view class="add-section">
|
||||
<!-- <view class="add-section">
|
||||
<view class="section-header">
|
||||
<text class="section-title">新增缴费</text>
|
||||
<text class="record-link" @click="goToRecord">缴费记录</text>
|
||||
@@ -50,7 +50,7 @@
|
||||
<text class="item-name">{{ item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view style="width: 100%;height: 30rpx;"></view>
|
||||
</view>
|
||||
@@ -63,6 +63,7 @@
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { getTopUpSelectByResident, getopenIdByCode, postInsertOpenId } from '/pageSubPack/api/apiSub.js'
|
||||
import { isLoggedIn, requireAuth } from '/pageSubPack/api/auth.js'
|
||||
import { getAppPaymentData, clearAppPaymentData, buildPaymentItemFromApp } from '/pageSubPack/api/appLaunch.js'
|
||||
|
||||
const isLogin = ref(false)
|
||||
const paymentList = ref([])
|
||||
@@ -125,20 +126,38 @@
|
||||
// ===== 生命周期 =====
|
||||
onLoad(() => {
|
||||
refreshLoginState();
|
||||
uni.hideTabBar({ animation: false });
|
||||
if (isLogin.value) {
|
||||
postOpenId();
|
||||
getPayList();
|
||||
// 检查是否由 App 跳转而来,携带了支付参数
|
||||
checkAppLaunchPayment();
|
||||
// getPayList();
|
||||
}
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
refreshLoginState();
|
||||
if (isLogin.value) {
|
||||
getPayList();
|
||||
// getPayList();
|
||||
}
|
||||
});
|
||||
|
||||
// ===== App 跳转支付:检测 extraData 并直接进入支付页 =====
|
||||
const checkAppLaunchPayment = () => {
|
||||
const appData = getAppPaymentData()
|
||||
if (!appData) return // 非 App 跳转,正常展示账单列表
|
||||
|
||||
console.log("检测到 App 支付参数:", appData)
|
||||
const paymentItem = buildPaymentItemFromApp(appData)
|
||||
if (!paymentItem) return
|
||||
|
||||
// 清除已消费的启动数据
|
||||
clearAppPaymentData()
|
||||
// 存入 storage 供 arrearsPayment 使用
|
||||
uni.setStorageSync("arrearsPayment", paymentItem)
|
||||
// 直接跳转支付页
|
||||
uni.redirectTo({ url: "/pageSubPack/payment-list/arrearsPayment" })
|
||||
}
|
||||
|
||||
// ===== 点击事件(统一用 isLogin 判断) =====
|
||||
|
||||
// 点击"去登录"提示条
|
||||
@@ -148,7 +167,7 @@
|
||||
title: '查看缴费账单',
|
||||
onLoggedIn: () => {
|
||||
refreshLoginState();
|
||||
getPayList();
|
||||
// getPayList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user