银联支付集成和购买插件;修改首页小区更改后获取数据;对接我的信息接口
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
|
||||
<view class="bill-item" @click="goToBill(item)" v-for="item,index in paymentList" :key="index">
|
||||
<image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/water.png"
|
||||
v-if="item.type=='物业费A'"></image>
|
||||
v-if="item.type=='水费'"></image>
|
||||
<image class="billIcon" src="https://wuyeadmin.bugtc.com/images/propertyImgs/electric.png"
|
||||
v-if="item.type=='物业费B'"></image>
|
||||
v-if="item.type=='电费'"></image>
|
||||
<view class="bill-info">
|
||||
<view class="bill-title">{{item.type}}
|
||||
<view class="bill-status debt" v-if="item.balance<0">已欠费</view>
|
||||
@@ -80,7 +80,6 @@
|
||||
|
||||
import {
|
||||
getTopUpSelectByResident,
|
||||
getopenIdByCode,
|
||||
postInsertOpenId,
|
||||
postSubscribeAuth
|
||||
} from '/pageSubPack/api/apiSub.js'
|
||||
@@ -105,7 +104,7 @@
|
||||
// },
|
||||
// {
|
||||
// id: 3,
|
||||
// name: '物业费B',
|
||||
// name: '电费',
|
||||
// status: '已欠费',
|
||||
// address: '山东省日照市东港区桂花园(别墅)2号楼2层',
|
||||
// icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/electric.png",
|
||||
@@ -120,26 +119,25 @@
|
||||
// iconClass: "gas"
|
||||
// },
|
||||
{
|
||||
name: "物业费A",
|
||||
name: "水费",
|
||||
type: "water",
|
||||
icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/water.png",
|
||||
iconClass: "water"
|
||||
},
|
||||
{
|
||||
name: "电费",
|
||||
type: "electric",
|
||||
icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/electric.png",
|
||||
iconClass: "electric"
|
||||
},
|
||||
// {
|
||||
// name: "物业",
|
||||
// name: "物业费",
|
||||
// type: "property",
|
||||
// icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/property.png",
|
||||
// iconClass: "property"
|
||||
// },
|
||||
// {
|
||||
// name: "物业费B",
|
||||
// type: "electric",
|
||||
// icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/electric.png",
|
||||
// iconClass: "electric"
|
||||
// },
|
||||
|
||||
// {
|
||||
// name: "车位",
|
||||
// name: "车位费",
|
||||
// type: "parking",
|
||||
// icon: "https://wuyeadmin.bugtc.com/images/propertyImgs/parkingIcon.png",
|
||||
// iconClass: "parking"
|
||||
@@ -147,34 +145,18 @@
|
||||
])
|
||||
|
||||
const postOpenId = async () => {
|
||||
// 获取 openid
|
||||
// App 端直接从本地存储获取 openid
|
||||
try {
|
||||
const loginRes = await wx.login()
|
||||
if (!loginRes.code) {
|
||||
uni.hideLoading()
|
||||
const openid = uni.getStorageSync('openid')
|
||||
if (!openid) {
|
||||
uni.showToast({
|
||||
title: '登录失败',
|
||||
title: '请先登录',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// 用 code 换 openid
|
||||
const openIdRes = await getopenIdByCode({
|
||||
code: loginRes.code
|
||||
})
|
||||
if (openIdRes.code !== 200 || !openIdRes.data) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '获取openid失败',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
const openid = openIdRes.data
|
||||
uni.setStorageSync('openid', openid)
|
||||
|
||||
await postInsertOpenId({
|
||||
openid: uni.getStorageSync('openid'),
|
||||
openid: openid,
|
||||
residentUserId: uni.getStorageSync('userId')
|
||||
})
|
||||
} catch (err) {
|
||||
@@ -247,7 +229,7 @@
|
||||
uni.redirectTo({
|
||||
url: '/pageSubPack/payment-list/selectPaymentEntity'
|
||||
})
|
||||
} else if (type.name == '物业费A' || type.name == '物业费B') {
|
||||
} else if (type.name == '水费' || type.name == '电费') {
|
||||
uni.redirectTo({
|
||||
url: '/pageSubPack/payment-list/addHydropower'
|
||||
})
|
||||
@@ -425,23 +407,28 @@
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
gap: 26rpx;
|
||||
/* gap: 26rpx; */
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
width: calc(25% - 50rpx);
|
||||
width: calc(25% - 60rpx);
|
||||
background-color: #F6F9FE;
|
||||
border-radius: 12rpx;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
/* 每行第 1 个 item 清除左边距,保证对齐 */
|
||||
.grid-item:nth-child(4n+1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.icon-box {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user