无缴费功能

This commit is contained in:
Zy
2026-10-17 10:12:28 +08:00
parent 27d9fddccc
commit b3866c1f1d
3 changed files with 32 additions and 15 deletions

View File

@@ -16,14 +16,16 @@
<!-- 分割线 -->
<view class="line"></view>
<view class="input-item">
<view class="input-label">缴费单位</view>
<!-- <view class="input-label">缴费单位</view> -->
<view class="input-label">单位</view>
<text class="company-name">花开物业</text>
</view>
<!-- 分割线 -->
<view class="line"></view>
<!-- 设备号输入项 -->
<view class="input-item">
<view class="input-label">缴费设备号</view>
<!-- <view class="input-label">缴费设备号</view> -->
<view class="input-label">设备号</view>
<view class="input-wrap">
<!-- 输入框 -->
<input class="input" placeholder="请输入设备号" placeholder-class="input-placeholder" v-model="deviceNo" />

View File

@@ -1,7 +1,7 @@
<template>
<view class="contentStyle" style="">
<view class="status-bar"></view>
<uni-nav-bar :title="paymentItem.type || '缴费'" left-icon="left" @clickLeft="goBack" backgroundColor="transparent" :border="false"></uni-nav-bar>
<uni-nav-bar :title="paymentItem.type === '水费' ? '水表' : '电表'" left-icon="left" @clickLeft="goBack" backgroundColor="transparent" :border="false"></uni-nav-bar>
<!-- 表单区域 -->
<scroll-view class="page" scroll-y="true">
@@ -45,9 +45,9 @@
<text class="arrears-text">当前欠费金额¥{{ arrearsAmount }}元</text>
<!-- <text class="auto-fill-btn" @click="handleAutoFill">点击自动填入</text> -->
</view>
<view class="arrears-row" v-if="outstandingPayment == false">
<!-- <view class="arrears-row" v-if="outstandingPayment == false">
<text class="arrears-text">暂未查询到欠费</text>
</view>
</view> -->
</view>
</view>
</view>
@@ -72,7 +72,8 @@
</scroll-view>
<!-- 立即缴费按钮 -->
<view class="btn-section" v-if="currentStep === 1">
<button class="pay-btn" @click="handlePay">立即缴费</button>
<!-- <button class="pay-btn" @click="handlePay">立即缴费</button> -->
<button class="pay-btn" @click="handleToAppPay">请前往App缴费</button>
</view>
<!-- 返回按钮 -->
<view class="btn-section" v-if="currentStep === 2 || currentStep === 3">
@@ -148,6 +149,15 @@ const handlePay = () => {
// }
requestPayOrder();
};
function handleToAppPay() {
uni.showToast({
icon: 'error',
title: '请下载App进行缴费',
mask: true
});
}
// 统一下单后后端返回的支付参数
const payInfo = ref({
appId: '', // 公众号/小程序ID

View File

@@ -1,9 +1,10 @@
<template>
<view class="contentStyle" style="">
<view class="status-bar"></view>
<uni-nav-bar title="生活缴费" backgroundColor="transparent" :border="false"></uni-nav-bar>
<!-- <uni-nav-bar title="生活缴费" backgroundColor="transparent" :border="false"></uni-nav-bar> -->
<uni-nav-bar title="" backgroundColor="transparent" :border="false"></uni-nav-bar>
<view class="topbox">
<image class="titleImg" :src="`${imgBaseUrl}/images/propertyImgs/payTitle.png`"></image>
<!-- <image class="titleImg" :src="`${imgBaseUrl}/images/propertyImgs/payTitle.png`"></image> -->
<image class="payImg" :src="`${imgBaseUrl}/images/propertyImgs/payImg.png`"></image>
</view>
<scroll-view class="page" scroll-y="true">
@@ -11,7 +12,8 @@
<!-- 未登录提示条 -->
<view class="login-tip" v-if="!isLogin" @click="handleLoginPrompt">
<image class="login-tip-icon" :src="`${imgBaseUrl}/images/login/phone.png`"></image>
<text class="login-tip-text">登录后可查看缴费账单</text>
<!-- <text class="login-tip-text">登录后可查看缴费账单</text> -->
<text class="login-tip-text">登录后可查看记录</text>
<text class="login-tip-link">去登录</text>
</view>
@@ -23,7 +25,7 @@
<view class="bill-info">
<view class="bill-title">
{{ item.type }}
{{ item.type === '水费' ? '水表' : '电表' }}
<view class="bill-status debt" v-if="item.balance < 0">已欠费</view>
<text :class="item.balance < 0 ? 'balance-debt' : 'balance-normal'">(余额:{{ item.balance || 0.0 }}元)</text>
</view>
@@ -36,8 +38,9 @@
<!-- 新增缴费区域 -->
<view class="add-section">
<view class="section-header">
<text class="section-title">新增缴费</text>
<text class="record-link" @click="goToRecord">缴费记录</text>
<!-- <text class="section-title">新增缴费</text> -->
<text class="section-title">新增设备</text>
<!-- <text class="record-link" @click="goToRecord">缴费记录</text> -->
</view>
<view class="grid-list">
@@ -158,7 +161,8 @@ onShow(() => {
const handleLoginPrompt = () => {
if (isLogin.value) return;
requireAuth({
title: '查看缴费账单',
// title: '查看缴费账单',
title: '',
onLoggedIn: () => {
refreshLoginState();
getPayList();
@@ -201,7 +205,8 @@ const goToRecord = () => {
const goToAdd = (type) => {
if (!isLogin.value) {
requireAuth({
title: '新增缴费',
// title: '新增缴费',
title: '新增设备',
onLoggedIn: () => {
refreshLoginState();
goToAdd(type);