对接生活缴费支付
This commit is contained in:
@@ -2,8 +2,8 @@ import { navigateToLogin } from '@/common/checkLogin.js'
|
||||
|
||||
let baseUrl = '';
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
baseUrl = 'http://192.168.1.6:8080'; // 开发环境
|
||||
// baseUrl = 'http://192.168.1.222:8080';
|
||||
// baseUrl = 'http://192.168.1.6:8080'; // 开发环境
|
||||
baseUrl = 'http://192.168.1.222:8080';
|
||||
} else {
|
||||
baseUrl = 'https://wuyeapi.ckdzkj.com'; // 生产环境
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
smsCode: verifyCode.value,
|
||||
username: account.value,
|
||||
password: password.value,
|
||||
type:true
|
||||
type:false
|
||||
}
|
||||
getRegisterUser(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad, onShow, onPullDownRefresh } from '@dcloudio/uni-app'
|
||||
import { getTopUpDetailsByMonth } from '/pageSubPack/api/apiSub.js'
|
||||
|
||||
const loading = ref(false)
|
||||
@@ -85,10 +85,26 @@ const loadingMore = ref(false)
|
||||
const cacheItem = uni.getStorageSync('arrearsPayment') || {}
|
||||
const billResidentId = ref(cacheItem.billResidentId || cacheItem.id || '')
|
||||
|
||||
const isFirstShow = ref(true)
|
||||
|
||||
onLoad(() => {
|
||||
fetchBills()
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
// 首次进入由 onLoad 拉取,避免重复请求
|
||||
if (isFirstShow.value) {
|
||||
isFirstShow.value = false
|
||||
return
|
||||
}
|
||||
// 返回列表时刷新(例如从支付小程序返回后)
|
||||
fetchBills()
|
||||
})
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
fetchBills()
|
||||
})
|
||||
|
||||
// 拉取按月汇总账单
|
||||
const fetchBills = async (isLoadMore = false) => {
|
||||
if (!billResidentId.value) return
|
||||
@@ -144,6 +160,7 @@ const fetchBills = async (isLoadMore = false) => {
|
||||
} finally {
|
||||
loading.value = false
|
||||
loadingMore.value = false
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user