对接个人中心物业费和积分的接口

This commit is contained in:
赵毅 2025-10-08 10:14:37 +08:00
parent 631ef8154e
commit 6f655bed0b
5 changed files with 53 additions and 31 deletions

View File

@ -1,4 +1,6 @@
export const apiArr = { export const apiArr = {
getUserInfo: '/api/v2/wechat/mpuser-crud/info', // 获取城市列表 getUserInfo: '/api/v2/wechat/mpuser-crud/info', // 获取城市列表
userInfoUpdate: '/api/v2/wechat/mpuser-crud/update', // 会员信息更新 userInfoUpdate: '/api/v2/wechat/mpuser-crud/update', // 会员信息更新
getAccumulationFund: '/api/v2/wechat/government-housing-fund-flow-crud/page', // 物业费公积金
getPoints: '/api/v2/wechat/member-points-flow-crud/page', // 积分
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="container" @click="headerEnterClick" :data-id="item.community_id":data-name="item.name" > <view class="container" @click="headerEnterClick" :data-id="item.community_id" :data-name="item.name" >
<image class="left_logo" :src="item.pic" mode="aspectFill" /> <image class="left_logo" :src="item.pic" mode="aspectFill" />
<view :class="['right', isLast && 'no_bottom']"> <view :class="['right', isLast && 'no_bottom']">
<view class="header"> <view class="header">

View File

@ -26,26 +26,36 @@
<view class="records-container"> <view class="records-container">
<view class="records-title">{{ topVal }}变动记录</view> <view class="records-title">{{ topVal }}变动记录</view>
<view class="records-list"> <view class="records-list">
<view class="record-item" v-for="(record, index) in records" :key="index"> <view v-if="records.length > 0">
<view class="record-info"> <view class="record-item" v-for="(record, index) in records" :key="index">
<view class="record-name">{{ record.name }}</view> <view class="record-info">
<view class="record-time">{{ record.time }}</view> <view class="record-name">{{ record.change_reason }} - {{
</view> record.community_order_pay ? record.community_order_pay.order_pay_no :
<view class="record-amount"> record.quick_payment_record.order_no }}</view>
<view> <view class="record-time">{{ record.create_time }}</view>
<text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{ </view>
record.amount.startsWith('+') ? '+' : '-' }}</text> <view class="record-amount">
<text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{ <view>
record.amount.replace(/[+-]/, '') }}</text> <text
:class="['amount-sign', record.change_reason == '下单' ? 'positive' : 'negative']">{{
record.change_reason == '下单' ? '+' : '-' }}</text>
<text
:class="['amount-value', record.change_reason == '下单' ? 'positive' : 'negative']">¥{{
record.amount_change }}</text>
</view>
<view class="record-balance">:¥{{ record.balance_after }}</view>
</view> </view>
<view class="record-balance">:¥{{ record.remain }}</view>
</view> </view>
</view> </view>
<view v-else>
<view class="no-record">暂无变动记录</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { apiArr } from '../../../api/v2User';
import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index'; import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index';
export default { export default {
data() { data() {
@ -54,7 +64,7 @@ export default {
localHeight: "", localHeight: "",
topVal: "", topVal: "",
photoVal: '', photoVal: '',
balance: "160.80", balance: "",
records: [ records: [
{ {
name: "退单-1312312317972", name: "退单-1312312317972",
@ -68,7 +78,11 @@ export default {
amount: "-1808.5", amount: "-1808.5",
remain: "286.79" remain: "286.79"
} }
] ],
itemObj: {},
itemType: '',
page_num: 1,
page_size: 10,
} }
}, },
onLoad(options) { onLoad(options) {
@ -77,6 +91,9 @@ export default {
this.localHeight = meun.height; this.localHeight = meun.height;
this.topVal = options.type == 1 ? '积分' : (options.type == 2 ? '物业公积金' : '红包卡券'); this.topVal = options.type == 1 ? '积分' : (options.type == 2 ? '物业公积金' : '红包卡券');
this.photoVal = options.type == 1 ? 'http://localhost:8080/user_wallet1.png' : (options.type == 2 ? 'http://localhost:8080/user_wallet2.png' : 'http://localhost:8080/user_wallet3.png'); this.photoVal = options.type == 1 ? 'http://localhost:8080/user_wallet1.png' : (options.type == 2 ? 'http://localhost:8080/user_wallet2.png' : 'http://localhost:8080/user_wallet3.png');
this.itemObj = JSON.parse(options.item);
this.itemType = options.type;
this.balance = options.type == 1 ? this.itemObj.points : (options.type == 2 ? this.itemObj.property_housing_fund : 0)
this.getWalletInfo(); this.getWalletInfo();
}, },
methods: { methods: {
@ -87,16 +104,19 @@ export default {
}, },
// //
getWalletInfo() { getWalletInfo() {
// const params = {
// 使 page_num: this.page_num,
console.log('获取钱包信息'); page_size: this.page_size,
// }
// request('/api/wallet/info', 'GET').then(res => { if (this.itemType == 1) {
// if (res.code === 0) { request(apiArr.getPoints, 'POST', params, { silent: false }).then(res => {
// this.balance = res.data.balance; this.records = res.rows;
// this.records = res.data.records; })
// } } else if (this.itemType == 2) {
// }) request(apiArr.getAccumulationFund, 'POST', params, { silent: false }).then(res => {
this.records = res.rows;
})
}
} }
} }
} }

View File

@ -98,7 +98,7 @@
</view> </view>
<view class="serverList1_right"> <view class="serverList1_right">
<view :class="['serverItemRight', `serverItemRight${index + 1}`]" <view :class="['serverItemRight', `serverItemRight${index + 1}`]"
@tap="index === 1 ? toAdvertisingView(serverRightList) : headerServerClick(item)" @tap="index === 0 ? toAdvertisingView(serverRightList) : headerServerClick(item)"
v-for="(item, index) in serverRightList" :key="index"> v-for="(item, index) in serverRightList" :key="index">
<image :src="item.pic_src" mode="" /> <image :src="item.pic_src" mode="" />
</view> </view>

View File

@ -24,15 +24,15 @@
</view> </view>
</view> </view>
<view class="section section1"> <view class="section section1">
<view class="section_label" @click="goWallet(1)"> <view class="section_label" @click="goWallet(1,userInfo)">
<view>{{ userInfo.property_housing_fund }}</view> <view>{{ userInfo.points }}</view>
<view>积分</view> <view>积分</view>
</view> </view>
<view class="section_label"> <view class="section_label">
<view>0.00</view> <view>0.00</view>
<view>繁华币</view> <view>繁华币</view>
</view> </view>
<view class="section_label" @click="goWallet(2)"> <view class="section_label" @click="goWallet(2,userInfo)">
<view>{{ userInfo.property_housing_fund }}</view> <view>{{ userInfo.property_housing_fund }}</view>
<view>物业费公积金</view> <view>物业费公积金</view>
</view> </view>
@ -267,8 +267,8 @@ export default {
}, },
methods: { methods: {
goWallet(type) { goWallet(type,item) {
NavgateTo('/packages/user/wallet/index?type=' + type); NavgateTo('/packages/user/wallet/index?type=' + type + '&item=' + JSON.stringify(item));
}, },
// //
toLogin() { toLogin() {