对接个人中心物业费和积分的接口
This commit is contained in:
parent
631ef8154e
commit
6f655bed0b
@ -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', // 积分
|
||||||
}
|
}
|
||||||
@ -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 v-if="records.length > 0">
|
||||||
<view class="record-item" v-for="(record, index) in records" :key="index">
|
<view class="record-item" v-for="(record, index) in records" :key="index">
|
||||||
<view class="record-info">
|
<view class="record-info">
|
||||||
<view class="record-name">{{ record.name }}</view>
|
<view class="record-name">{{ record.change_reason }} - {{
|
||||||
<view class="record-time">{{ record.time }}</view>
|
record.community_order_pay ? record.community_order_pay.order_pay_no :
|
||||||
|
record.quick_payment_record.order_no }}</view>
|
||||||
|
<view class="record-time">{{ record.create_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="record-amount">
|
<view class="record-amount">
|
||||||
<view>
|
<view>
|
||||||
<text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
|
<text
|
||||||
record.amount.startsWith('+') ? '+' : '-' }}</text>
|
:class="['amount-sign', record.change_reason == '下单' ? 'positive' : 'negative']">{{
|
||||||
<text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
|
record.change_reason == '下单' ? '+' : '-' }}</text>
|
||||||
record.amount.replace(/[+-]/, '') }}</text>
|
<text
|
||||||
|
:class="['amount-value', record.change_reason == '下单' ? 'positive' : 'negative']">¥{{
|
||||||
|
record.amount_change }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="record-balance">余:¥{{ record.remain }}</view>
|
<view class="record-balance">余:¥{{ record.balance_after }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<view class="no-record">暂无变动记录</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;
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user