Compare commits
12 Commits
c9270f2cb6
...
5aa1f18448
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5aa1f18448 | ||
|
|
4b175d400d | ||
|
|
7817333cf8 | ||
|
|
34e8c05b91 | ||
|
|
f5d3cd79de | ||
|
|
e13b06ece0 | ||
|
|
94a17c7107 | ||
|
|
c118145c8b | ||
|
|
c87d3dfb5d | ||
|
|
c54b0dd1ad | ||
|
|
1fbb9bddb8 | ||
|
|
43f35f517a |
@ -163,8 +163,17 @@ export default {
|
||||
};
|
||||
});
|
||||
|
||||
// 过滤腾讯地图数据,只保留那些name不在接口返回数据中的小区
|
||||
// 创建一个包含接口返回数据所有name的Set
|
||||
const processedNames = new Set(processedList.map(item => item.name));
|
||||
|
||||
// 过滤腾讯地图数据
|
||||
const filteredTencentCommunities = tencentCommunities.filter(item =>
|
||||
!processedNames.has(item.name)
|
||||
);
|
||||
|
||||
// 合并数据
|
||||
mergedList = [...processedList, ...tencentCommunities];
|
||||
mergedList = [...processedList, ...filteredTencentCommunities];
|
||||
|
||||
// 根据community_id去重
|
||||
mergedList = uniqueByField(mergedList, 'community_id');
|
||||
|
||||
@ -149,7 +149,7 @@
|
||||
<view class="payHisItem" v-for="item in payOrderList" :key="item.id">
|
||||
<view class="row">
|
||||
<view class="row_label">缴费金额</view>
|
||||
<view class="row_con1">¥{{ item.money }}</view>
|
||||
<view class="row_con1">¥{{ item.money + item.property_housing_fund }}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_label2"></view>
|
||||
@ -157,23 +157,23 @@
|
||||
</view>
|
||||
<view class="line4"></view>
|
||||
<view class="row">
|
||||
<view class="row_label">绑定房源</view>
|
||||
<view class="row_label">缴费账单数量</view>
|
||||
<view class="row_con3">
|
||||
<view class="row_con3_1">
|
||||
{{ item.community_order ? item.community_order.length : 0 }}个账单
|
||||
</view>
|
||||
<view class="row_con3_2">明细可从收据查看</view>
|
||||
<!-- <view class="row_con3_2">明细可从收据查看</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="row">
|
||||
<view class="row_label">应缴费金额</view>
|
||||
<view class="row_con4">¥{{ item.money }}</view>
|
||||
<view class="row_con4">¥{{ item.money + item.property_housing_fund }}</view>
|
||||
</view>
|
||||
|
||||
<view class="row">
|
||||
<view class="row_label">物业费公积金抵扣金额</view>
|
||||
<view class="row_con4">-¥{{ item.reduction_money }}</view>
|
||||
<view class="row_con4">-¥{{ item.property_housing_fund }}</view>
|
||||
</view>
|
||||
|
||||
<view class="row">
|
||||
@ -181,7 +181,7 @@
|
||||
<view class="row_con4">{{ item.order_pay_no }}</view>
|
||||
</view>
|
||||
<view class="line4"></view>
|
||||
<view class="Receipt">收据</view>
|
||||
<!-- <view class="Receipt">收据</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -302,11 +302,53 @@ export default {
|
||||
this.getUserGovenmentMoney();
|
||||
},
|
||||
|
||||
// 下拉刷新生命周期函数
|
||||
onPullDownRefresh() {
|
||||
// 根据当前激活的标签页,重新加载对应的数据
|
||||
if (this.active === 0) {
|
||||
// 账单页面,重新获取公积金和账单数据
|
||||
Promise.all([
|
||||
this.getUserGovenmentMoney(),
|
||||
this.getRoomSelect()
|
||||
]).then(() => {
|
||||
// 数据加载完成后停止下拉刷新
|
||||
uni.stopPullDownRefresh();
|
||||
}).catch(() => {
|
||||
// 加载失败也需要停止下拉刷新
|
||||
uni.stopPullDownRefresh();
|
||||
});
|
||||
} else if (this.active === 1) {
|
||||
// 缴费记录页面,重新获取缴费记录
|
||||
this.page_num = 1;
|
||||
this.page_size = 10;
|
||||
this.getPayList().then(() => {
|
||||
// 数据加载完成后停止下拉刷新
|
||||
uni.stopPullDownRefresh();
|
||||
}).catch(() => {
|
||||
// 加载失败也需要停止下拉刷新
|
||||
uni.stopPullDownRefresh();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 滑动到底部生命周期函数
|
||||
onReachBottom() {
|
||||
// 只有在缴费记录页面且还有更多数据时才触发加载更多
|
||||
if (this.active === 1 && this.flag) {
|
||||
// 增加page_size的值
|
||||
this.page_size += 10;
|
||||
// 重新获取缴费记录
|
||||
this.getPayList();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
changeTab(index) {
|
||||
this.active = index;
|
||||
if (index == 1) {
|
||||
// 重置分页参数
|
||||
this.page_num = 1;
|
||||
this.page_size = 10;
|
||||
this.getPayList();
|
||||
}
|
||||
},
|
||||
@ -330,6 +372,7 @@ export default {
|
||||
},
|
||||
//获取房源
|
||||
getRoomSelect() {
|
||||
return new Promise((resolve, reject) => {
|
||||
request(apiArr.getCommunityRoomList, "POST", {
|
||||
community_id: this.currentCommunity.id,
|
||||
page_num: 1,
|
||||
@ -338,7 +381,14 @@ export default {
|
||||
this.roomList = res.rows;
|
||||
this.currentRoom = this.roomList[0];
|
||||
this.selectedRoomId = this.currentRoom.room_id;
|
||||
this.getOrderList();
|
||||
this.getOrderList().then(() => {
|
||||
resolve();
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@ -354,16 +404,22 @@ export default {
|
||||
},
|
||||
|
||||
//获取用户公积金
|
||||
async getUserGovenmentMoney() {
|
||||
getUserGovenmentMoney() {
|
||||
return new Promise((resolve, reject) => {
|
||||
request(apiArr.getUserGovenmentMoney, "POST", {}).then((res) => {
|
||||
console.log(res, "公积金");
|
||||
this.balanceMoney = res.balance_after;
|
||||
resolve();
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
//获取账单
|
||||
async getOrderList() {
|
||||
await request(apiArr.getOrderList, "POST", {
|
||||
getOrderList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
request(apiArr.getOrderList, "POST", {
|
||||
room_id: this.currentRoom.room_id,
|
||||
page_num: 1,
|
||||
page_size: 50,
|
||||
@ -377,6 +433,10 @@ export default {
|
||||
});
|
||||
});
|
||||
this.Bill = res.rows;
|
||||
resolve();
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
//账单详情切换展示显示
|
||||
@ -387,10 +447,8 @@ export default {
|
||||
checkChange(e, index) {
|
||||
this.Bill[index].check = !this.Bill[index].check;
|
||||
this.Bill[index].community_order_rows.forEach((item) => {
|
||||
if (this.Bill[index].check) {
|
||||
item.check = true;
|
||||
} else {
|
||||
item.check = false;
|
||||
if (item.pay_status == 1) {
|
||||
item.check = this.Bill[index].check;
|
||||
}
|
||||
});
|
||||
|
||||
@ -490,6 +548,10 @@ export default {
|
||||
const fundAmount = Math.min(Number(this.balanceMoney), Number(this.currentMoney));
|
||||
payParams.property_housing_fund = fundAmount.toFixed(2);
|
||||
|
||||
if (isComboPay && payParams.money == 0) {
|
||||
this.payType = 2;
|
||||
}
|
||||
|
||||
// 仅公积金支付 公积金不足
|
||||
if (this.payType == 2 && !isComboPay) {
|
||||
if (Number(this.balanceMoney) < Number(this.currentMoney)) {
|
||||
@ -504,7 +566,7 @@ export default {
|
||||
}
|
||||
|
||||
// 组合支付
|
||||
if (isComboPay) {
|
||||
if (isComboPay && (payParams.money != 0.00 || payParams.money != 0)) {
|
||||
this.payType = 3;
|
||||
name_mini = "微信 + 物业公积金";
|
||||
}
|
||||
@ -515,22 +577,22 @@ export default {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定使用物业公积金支付?',
|
||||
success: async function (res) {
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
await request(apiArr.createPayOrder, "POST", payParams).then((res) => {
|
||||
const params = {
|
||||
order_pay_id: res.id,
|
||||
}
|
||||
request(apiArr.tradeQuery, "POST", params).then(res => {
|
||||
if (res && res.pay_status == 1) {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.getRoomSelect();
|
||||
this.getUserGovenmentMoney();
|
||||
}
|
||||
}, 1500);
|
||||
})
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
@ -603,19 +665,31 @@ export default {
|
||||
|
||||
//支付记录
|
||||
getPayList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
request(apiArr.getPayOrderList, "POST", {
|
||||
room_id: this.currentRoom.room_id,
|
||||
page_num: this.page_num,
|
||||
page_size: this.page_size,
|
||||
}).then((res) => {
|
||||
// 判断是否还有更多数据
|
||||
let flag = false;
|
||||
if (res.rows && (res.rows?.length == this.page_size)) {
|
||||
if (res.rows && res.rows.length === this.page_size) {
|
||||
flag = true;
|
||||
} else {
|
||||
flag = false;
|
||||
}
|
||||
this.flag = flag;
|
||||
this.payOrderList = res.rows
|
||||
|
||||
// 如果是第一页,直接替换数据;如果是加载更多,追加数据
|
||||
if (this.page_num === 1) {
|
||||
this.payOrderList = res.rows || [];
|
||||
} else {
|
||||
this.payOrderList = [...this.payOrderList, ...(res.rows || [])];
|
||||
}
|
||||
resolve();
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@ -58,10 +58,10 @@
|
||||
|
||||
<view class="btnList">
|
||||
<view class="btnItem" @click="payList">付款记录</view>
|
||||
<view class="line"></view>
|
||||
<view class="btnItem" @click="homeMoneList">物业费公积金</view>
|
||||
<!-- <view class="btnItem" @click="homeMoneList">物业费公积金</view> -->
|
||||
<view class="line"></view>
|
||||
<view class="btnItem" @click="home">首页</view>
|
||||
<view class="line"></view>
|
||||
<view class="btnItem2" @click="changeBoxshadow">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_qrcode.png"
|
||||
mode="aspectFill"></image>
|
||||
@ -268,7 +268,7 @@ export default {
|
||||
},
|
||||
|
||||
payList() {
|
||||
NavgateTo("../payInfo/index")
|
||||
NavgateTo("../payInfo/index?id=" + this.info.id)
|
||||
},
|
||||
homeMoneList() {
|
||||
NavgateTo("../houseProvident/index")
|
||||
|
||||
@ -7,20 +7,20 @@
|
||||
<view class="row_con">¥{{ item.order_amount }}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_label2">{{item.create_time}}</view>
|
||||
<view class="row_label2">{{ item.create_time }}</view>
|
||||
<view class="row_label2" v-if="false">Adapay微信小程序支付</view>
|
||||
<view class="row_label2">{{item.payment_method}}</view>
|
||||
<view class="row_label2">{{ item.payment_method }}</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
|
||||
<view class="row2">
|
||||
<view class="label">订单号</view>
|
||||
<view class="con3">{{item.order_no}}</view>
|
||||
<view class="con3">{{ item.order_no }}</view>
|
||||
</view>
|
||||
|
||||
<view class="row2">
|
||||
<view class="label">消费门店</view>
|
||||
<view class="con3">{{item.merchant_info.merchant_name}}</view>
|
||||
<view class="con3">{{ item.merchant_info.merchant_name }}</view>
|
||||
</view>
|
||||
|
||||
<view class="row2">
|
||||
@ -74,14 +74,16 @@ export default {
|
||||
localHeight: "",
|
||||
page_num: 1,
|
||||
page_size: 10,
|
||||
flag:false,
|
||||
payList:[]
|
||||
flag: false,
|
||||
payList: [],
|
||||
id: "",
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.top;
|
||||
this.localHeight = meun.height;
|
||||
this.id = options.id
|
||||
this.getPayList()
|
||||
},
|
||||
|
||||
@ -97,12 +99,13 @@ export default {
|
||||
getPayList() {
|
||||
let that = this
|
||||
request(apiArr.getPayList, "POST", {
|
||||
page_num:that.page_num,
|
||||
page_size:that.page_size
|
||||
}).then(res=>{
|
||||
if(res.rows.length == that.page_size){
|
||||
merchant_id: that.id,
|
||||
page_num: that.page_num,
|
||||
page_size: that.page_size
|
||||
}).then(res => {
|
||||
if (res.rows.length == that.page_size) {
|
||||
that.flag = true
|
||||
}else{
|
||||
} else {
|
||||
that.flag = false
|
||||
}
|
||||
that.payList = that.payList.concat(res.rows)
|
||||
|
||||
@ -307,7 +307,7 @@ export default {
|
||||
if(this.is_group_buy){
|
||||
NavgateTo(`../groupPurchaseSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
||||
}else{
|
||||
NavgateTo(`/packages/advertising/groupPurchaseSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
||||
NavgateTo(`/packages/advertising/goodsSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -40,11 +40,17 @@ image {
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.content {
|
||||
margin-top: 30rpx;
|
||||
height: 1100rpx;
|
||||
padding: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.content2 {
|
||||
height: 1100rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
@ -604,3 +610,38 @@ image {
|
||||
margin-top: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.walletBox {
|
||||
flex: 1;
|
||||
background: linear-gradient(to right, #fbf1db, #f4d7b3);
|
||||
border-radius: 25rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.walletBox_top {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
font-weight: 600;
|
||||
padding-bottom: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.walletBox_content{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.walletBox_item{
|
||||
margin: 20rpx 30rpx;
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 35rpx;
|
||||
}
|
||||
|
||||
.walletBox_item_text{
|
||||
color: #8d5017;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
@ -22,7 +22,24 @@
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="iconStyle">
|
||||
<view class="walletBox">
|
||||
<view class="walletBox_top">钱包</view>
|
||||
<view class="walletBox_content">
|
||||
<view class="walletBox_item" @click="goWallet(1)">
|
||||
<view>999.00元</view>
|
||||
<view class="walletBox_item_text">保证金</view>
|
||||
</view>
|
||||
<view class="walletBox_item" @click="goWallet(2)">
|
||||
<view>999.00元</view>
|
||||
<view class="walletBox_item_text">应收</view>
|
||||
</view>
|
||||
<view class="walletBox_item" @click="goWallet(3)">
|
||||
<view>999.00元</view>
|
||||
<view class="walletBox_item_text">手续费</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="iconStyle content2">
|
||||
<u-grid col="6" :border="false">
|
||||
<u-grid-item v-for="(item, index) in baseList" :key="index" @click="click(item)">
|
||||
<view class="grid-item">
|
||||
@ -117,6 +134,9 @@ export default {
|
||||
|
||||
|
||||
methods: {
|
||||
goWallet(type) {
|
||||
NavgateTo('/packages/storeManagement/wallet/index?type=' + type);
|
||||
},
|
||||
changeTab(index) {
|
||||
this.active = index;
|
||||
},
|
||||
|
||||
196
packages/storeManagement/wallet/index.css
Normal file
196
packages/storeManagement/wallet/index.css
Normal file
@ -0,0 +1,196 @@
|
||||
page {
|
||||
background-color: #f6f7fb;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 750rpx;
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.searchBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.searchBox_left {
|
||||
box-sizing: border-box;
|
||||
padding-left: 20rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.searchBox_mid {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 余额显示部分样式 */
|
||||
.balance-container {
|
||||
width: 93%;
|
||||
height: 250rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 15rpx;
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.balance-content {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
padding-left: 50rpx;
|
||||
color: #894b11;
|
||||
background: linear-gradient(to top right, #f6e2b7, #eab16a);
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
|
||||
.balance-title {
|
||||
font-size: 45rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.balance-amount {
|
||||
font-size: 70rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.balance-icon {
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.balance-icon image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
.balance-text {
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 150rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #8b4e13;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* 余额变动记录样式 */
|
||||
.records-container {
|
||||
margin-top: 30rpx;
|
||||
padding: 0 40rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
border-bottom: 1rpx solid #EEEEEE;
|
||||
}
|
||||
|
||||
.tabItem {
|
||||
font-size: 30rpx;
|
||||
color: #222222;
|
||||
margin-right: 60rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.active2 {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.active2::after {
|
||||
content: '';
|
||||
background: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_active.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 52rpx;
|
||||
height: 22rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: -16rpx;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.records-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #222222;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.records-list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.record-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1rpx solid #EEEEEE;
|
||||
}
|
||||
|
||||
.record-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.record-name {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.record-time {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.record-amount {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.amount-sign {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.amount-value {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.positive {
|
||||
color: #51c651;
|
||||
}
|
||||
|
||||
.negative {
|
||||
color: #FF4444;
|
||||
}
|
||||
|
||||
.record-balance {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
150
packages/storeManagement/wallet/index.vue
Normal file
150
packages/storeManagement/wallet/index.vue
Normal file
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="header">
|
||||
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
|
||||
<view class="searchBox_left" @click="back">
|
||||
<u-icon name="arrow-left" size="20px" color="#000"></u-icon>
|
||||
</view>
|
||||
<view class="searchBox_mid">{{ topVal }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 余额显示部分 -->
|
||||
<view class="balance-container">
|
||||
<view class="balance-content">
|
||||
<view>
|
||||
<view class="balance-title">{{ topVal }}(元)</view>
|
||||
<view class="balance-amount">{{ balance }}</view>
|
||||
<view class="balance-icon" v-if="topVal != '保证金'">
|
||||
<image src="http://localhost:8080/user_wallet2.png" mode="widthFix" />
|
||||
</view>
|
||||
<view v-else class="balance-text">
|
||||
去充值
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 变动记录 -->
|
||||
<view class="records-container">
|
||||
<view class="tabs" v-if="topVal == '保证金'">
|
||||
<view v-for="(item, index) in tabList" :key="index"
|
||||
:class="['tabItem', selectedTab === item.id ? 'active2' : '']" @click="selectTab(index, item)">
|
||||
{{ item.tabName }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="records-list">
|
||||
<view class="record-item" v-for="(record, index) in records" :key="index">
|
||||
<view class="record-info">
|
||||
<view class="record-name">{{ record.name }}</view>
|
||||
<view class="record-time">{{ record.time }}</view>
|
||||
</view>
|
||||
<view class="record-amount" v-if="topVal == '保证金'">
|
||||
<view>
|
||||
<text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
|
||||
record.amount.startsWith('+') ? '+' : '-' }}</text>
|
||||
<text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
|
||||
record.amount.replace(/[+-]/, '') }}</text>
|
||||
</view>
|
||||
<view class="record-balance">余:¥{{ record.remain }}</view>
|
||||
</view>
|
||||
|
||||
<view class="record-amount" v-else-if="topVal == '应收'">
|
||||
<view :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
|
||||
record.amount.startsWith('+') ? '收款' : '退款' }}</view>
|
||||
<view>
|
||||
<text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
|
||||
record.amount.startsWith('+') ? '+' : '-' }}</text>
|
||||
<text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
|
||||
record.amount.replace(/[+-]/, '') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="record-amount" v-else>
|
||||
<view class="record-balance">手续费</view>
|
||||
<view>
|
||||
<text class="amount-sign">{{ record.amount.startsWith('+') ? '+' : '-' }}</text>
|
||||
<text class="amount-sign">¥{{ record.amount.replace(/[+-]/, '') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
top: "",
|
||||
localHeight: "",
|
||||
topVal: "",
|
||||
balance: "160.80",
|
||||
records: [
|
||||
{
|
||||
name: "退单-1312312317972",
|
||||
time: "2025-08-12 13:00:00",
|
||||
amount: "-1808.5",
|
||||
remain: "286.79"
|
||||
},
|
||||
{
|
||||
name: "退单-1312312317972",
|
||||
time: "2025-08-12 13:00:00",
|
||||
amount: "-1808.5",
|
||||
remain: "286.79"
|
||||
}
|
||||
],
|
||||
tabList: [
|
||||
{
|
||||
id: 0,
|
||||
tabName: '全部'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
tabName: '充值记录'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
tabName: '消费记录'
|
||||
}
|
||||
],
|
||||
selectedTab: 0
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.top;
|
||||
this.localHeight = meun.height;
|
||||
this.topVal = options.type == 1 ? '保证金' : (options.type == 2 ? '应收' : '手续费');
|
||||
this.getWalletInfo();
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
selectTab(index, item) {
|
||||
console.log("🚀 ~ selectTab ~ item:", item)
|
||||
this.selectedTab = item.id;
|
||||
},
|
||||
// 获取钱包信息
|
||||
getWalletInfo() {
|
||||
// 这里应该是真实的接口调用
|
||||
// 暂时使用模拟数据
|
||||
console.log('获取钱包信息');
|
||||
// 实际项目中应该调用接口获取余额和交易记录
|
||||
// request('/api/wallet/info', 'GET').then(res => {
|
||||
// if (res.code === 0) {
|
||||
// this.balance = res.data.balance;
|
||||
// this.records = res.data.records;
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
147
packages/user/wallet/index.css
Normal file
147
packages/user/wallet/index.css
Normal file
@ -0,0 +1,147 @@
|
||||
page {
|
||||
background-color: #f6f7fb;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 750rpx;
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.searchBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.searchBox_left {
|
||||
box-sizing: border-box;
|
||||
padding-left: 20rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.searchBox_mid {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 余额显示部分样式 */
|
||||
.balance-container {
|
||||
width: 93%;
|
||||
height: 250rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 15rpx;
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.balance-content {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
padding-left: 50rpx;
|
||||
color: #894b11;
|
||||
background: linear-gradient(to top right, #f6e2b7, #eab16a);
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
|
||||
.balance-title {
|
||||
font-size: 45rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.balance-amount {
|
||||
font-size: 70rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.balance-icon {
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.balance-icon image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
/* 余额变动记录样式 */
|
||||
.records-container {
|
||||
margin-top: 30rpx;
|
||||
padding: 0 40rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.records-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #222222;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.records-list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.record-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1rpx solid #EEEEEE;
|
||||
}
|
||||
|
||||
.record-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.record-name {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.record-time {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.record-amount {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.amount-sign {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.amount-value {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.positive {
|
||||
color: #51c651;
|
||||
}
|
||||
|
||||
.negative {
|
||||
color: #FF4444;
|
||||
}
|
||||
|
||||
.record-balance {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
106
packages/user/wallet/index.vue
Normal file
106
packages/user/wallet/index.vue
Normal file
@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="header">
|
||||
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
|
||||
<view class="searchBox_left" @click="back">
|
||||
<u-icon name="arrow-left" size="20px" color="#000"></u-icon>
|
||||
</view>
|
||||
<view class="searchBox_mid">{{ topVal }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 余额显示部分 -->
|
||||
<view class="balance-container">
|
||||
<view class="balance-content">
|
||||
<view>
|
||||
<view class="balance-title">{{ topVal }}余额(元)</view>
|
||||
<view class="balance-amount">{{ balance }}</view>
|
||||
<view class="balance-icon">
|
||||
<image :src="photoVal" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 余额变动记录 -->
|
||||
<view class="records-container">
|
||||
<view class="records-title">{{ topVal }}变动记录</view>
|
||||
<view class="records-list">
|
||||
<view class="record-item" v-for="(record, index) in records" :key="index">
|
||||
<view class="record-info">
|
||||
<view class="record-name">{{ record.name }}</view>
|
||||
<view class="record-time">{{ record.time }}</view>
|
||||
</view>
|
||||
<view class="record-amount">
|
||||
<view>
|
||||
<text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
|
||||
record.amount.startsWith('+') ? '+' : '-' }}</text>
|
||||
<text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
|
||||
record.amount.replace(/[+-]/, '') }}</text>
|
||||
</view>
|
||||
<view class="record-balance">余:¥{{ record.remain }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
top: "",
|
||||
localHeight: "",
|
||||
topVal: "",
|
||||
photoVal: '',
|
||||
balance: "160.80",
|
||||
records: [
|
||||
{
|
||||
name: "退单-1312312317972",
|
||||
time: "2025-08-12 13:00:00",
|
||||
amount: "-1808.5",
|
||||
remain: "286.79"
|
||||
},
|
||||
{
|
||||
name: "退单-1312312317972",
|
||||
time: "2025-08-12 13:00:00",
|
||||
amount: "-1808.5",
|
||||
remain: "286.79"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.top;
|
||||
this.localHeight = meun.height;
|
||||
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.getWalletInfo();
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
// 获取钱包信息
|
||||
getWalletInfo() {
|
||||
// 这里应该是真实的接口调用
|
||||
// 暂时使用模拟数据
|
||||
console.log('获取钱包信息');
|
||||
// 实际项目中应该调用接口获取余额和交易记录
|
||||
// request('/api/wallet/info', 'GET').then(res => {
|
||||
// if (res.code === 0) {
|
||||
// this.balance = res.data.balance;
|
||||
// this.records = res.data.records;
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
@ -197,6 +197,8 @@ export default {
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
})
|
||||
// 提交成功后,重置表单
|
||||
this.getInfo(this.taskId);
|
||||
} catch (error) {
|
||||
uni.hideLoading();
|
||||
console.error('提交失败', error)
|
||||
|
||||
@ -113,3 +113,39 @@
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.walletBox {
|
||||
flex: 1;
|
||||
background: linear-gradient(to right, #fbf1db, #f4d7b3);
|
||||
border-radius: 25rpx;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.walletBox_top {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
font-weight: 600;
|
||||
padding-bottom: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.walletBox_content{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.walletBox_item{
|
||||
/* margin: 20rpx 30rpx; */
|
||||
width: 25%;
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 35rpx;
|
||||
}
|
||||
|
||||
.walletBox_item_text{
|
||||
color: #8d5017;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
@ -2,26 +2,50 @@
|
||||
<view class="container">
|
||||
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
|
||||
<view class="searchBox_add" @click="addCommunity">
|
||||
<image class="top-image" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder_community.png" mode="aspectFill"></image>
|
||||
<image class="top-image"
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder_community.png" mode="aspectFill">
|
||||
</image>
|
||||
<view class="emptyCommunity">
|
||||
{{ communityVal }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 背景图片区域 -->
|
||||
<view class="bg-image-container">
|
||||
<!-- <view class="bg-image-container">
|
||||
<image class="bg-image" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrderDashboardImg.png" mode=""></image>
|
||||
</view> -->
|
||||
<view class="walletBox">
|
||||
<view class="walletBox_top">钱包</view>
|
||||
<view class="walletBox_content">
|
||||
<view class="walletBox_item" @click="goWallet(1)">
|
||||
<view>999.00元</view>
|
||||
<view class="walletBox_item_text">应收</view>
|
||||
</view>
|
||||
<view class="walletBox_item" @click="goWallet(2)">
|
||||
<view>999.00元</view>
|
||||
<view class="walletBox_item_text">已收</view>
|
||||
</view>
|
||||
<view class="walletBox_item" @click="goWallet(3)">
|
||||
<view>999.00元</view>
|
||||
<view class="walletBox_item_text">待收物业公积金</view>
|
||||
</view>
|
||||
<view class="walletBox_item" @click="goWallet(4)">
|
||||
<view>999.00元</view>
|
||||
<view class="walletBox_item_text">手续费</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="work-order-section">
|
||||
<view v-for="(item, index) in 9" :key="index">
|
||||
<view class="work-order-card" v-if="index == 1 && showWorkOrderSection"
|
||||
@click="navigateToWorkOrderDashboard">
|
||||
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder.png" mode="aspectFill" />
|
||||
<image class="work-order-icon"
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/workOrder.png" mode="aspectFill" />
|
||||
<text class="work-order-text">工单台</text>
|
||||
</view>
|
||||
<view class="work-order-card" v-if="index == 0"
|
||||
@click="navigateToRoutingInspection">
|
||||
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/polling.png" mode="aspectFill" />
|
||||
<view class="work-order-card" v-if="index == 0" @click="navigateToRoutingInspection">
|
||||
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/polling.png"
|
||||
mode="aspectFill" />
|
||||
<text class="work-order-text">巡更巡检</text>
|
||||
</view>
|
||||
<view class="work-order-card" v-else></view>
|
||||
@ -83,6 +107,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goWallet(type) {
|
||||
if (type == 2) {
|
||||
return
|
||||
}
|
||||
NavgateTo('/packages/workOrderDashboard/wallet/index?type=' + type);
|
||||
},
|
||||
addCommunity() {
|
||||
NavgateTo("/packages/workOrderDashboard/myCommunity/index");
|
||||
},
|
||||
|
||||
147
packages/workOrderDashboard/wallet/index.css
Normal file
147
packages/workOrderDashboard/wallet/index.css
Normal file
@ -0,0 +1,147 @@
|
||||
page {
|
||||
background-color: #f6f7fb;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 750rpx;
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.searchBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.searchBox_left {
|
||||
box-sizing: border-box;
|
||||
padding-left: 20rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.searchBox_mid {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 余额显示部分样式 */
|
||||
.balance-container {
|
||||
width: 93%;
|
||||
height: 250rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 15rpx;
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.balance-content {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
padding-left: 50rpx;
|
||||
color: #894b11;
|
||||
background: linear-gradient(to top right, #f6e2b7, #eab16a);
|
||||
border-radius: 25rpx;
|
||||
}
|
||||
|
||||
.balance-title {
|
||||
font-size: 45rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.balance-amount {
|
||||
font-size: 70rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.balance-icon {
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.balance-icon image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
/* 余额变动记录样式 */
|
||||
.records-container {
|
||||
margin-top: 30rpx;
|
||||
padding: 0 40rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 25rpx;
|
||||
}
|
||||
|
||||
.records-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #222222;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.records-list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.record-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1rpx solid #EEEEEE;
|
||||
}
|
||||
|
||||
.record-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.record-name {
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.record-time {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.record-amount {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.amount-sign {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.amount-value {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.positive {
|
||||
color: #51c651;
|
||||
}
|
||||
|
||||
.negative {
|
||||
color: #FF4444;
|
||||
}
|
||||
|
||||
.record-balance {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
125
packages/workOrderDashboard/wallet/index.vue
Normal file
125
packages/workOrderDashboard/wallet/index.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="header">
|
||||
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
|
||||
<view class="searchBox_left" @click="back">
|
||||
<u-icon name="arrow-left" size="20px" color="#000"></u-icon>
|
||||
</view>
|
||||
<view class="searchBox_mid">{{ topVal }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 余额显示部分 -->
|
||||
<view class="balance-container">
|
||||
<view class="balance-content">
|
||||
<view>
|
||||
<view class="balance-title">{{ topVal }}(元)</view>
|
||||
<view class="balance-amount">{{ balance }}</view>
|
||||
<view class="balance-icon">
|
||||
<image src="http://localhost:8080/user_wallet2.png" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 余额变动记录 -->
|
||||
<view class="records-container">
|
||||
<view class="records-title" v-if="topVal == '待收物业公积金'">物业费公积金变动记录</view>
|
||||
<view class="records-list">
|
||||
<view class="record-item" v-for="(record, index) in records" :key="index">
|
||||
<view class="record-info">
|
||||
<view class="record-name">{{ record.name }}</view>
|
||||
<view class="record-time">{{ record.time }}</view>
|
||||
</view>
|
||||
<view class="record-amount">
|
||||
<view class="record-balance" v-if="topVal == '应收'">{{ record.amount.startsWith('+') ? '收款' :
|
||||
'退款' }}</view>
|
||||
<view class="record-balance" v-else-if="topVal == '待收物业公积金'">待收</view>
|
||||
<view class="record-balance" v-else-if="topVal == '手续费'">手续费</view>
|
||||
<view>
|
||||
<text :class="['amount-sign', record.amount.startsWith('+') ? 'positive' : 'negative']">{{
|
||||
record.amount.startsWith('+') ? '+' : '-' }}</text>
|
||||
<text :class="['amount-value', record.amount.startsWith('+') ? 'positive' : 'negative']">¥{{
|
||||
record.amount.replace(/[+-]/, '') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { menuButtonInfo, NavgateTo, picUrl, request } from '../../../utils/index';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
top: "",
|
||||
localHeight: "",
|
||||
topVal: "",
|
||||
balance: "160.80",
|
||||
records: [
|
||||
{
|
||||
name: "退单-1312312317972",
|
||||
time: "2025-08-12 13:00:00",
|
||||
amount: "-1808.5",
|
||||
remain: "286.79"
|
||||
},
|
||||
{
|
||||
name: "退单-1312312317972",
|
||||
time: "2025-08-12 13:00:00",
|
||||
amount: "-1808.5",
|
||||
remain: "286.79"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.top;
|
||||
this.localHeight = meun.height;
|
||||
this.getTypeName(options.type);
|
||||
this.getWalletInfo();
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
// 获取钱包类型名称
|
||||
getTypeName(type) {
|
||||
const numType = parseInt(type);
|
||||
switch (numType) {
|
||||
case 1:
|
||||
this.topVal = '应收';
|
||||
break;
|
||||
case 2:
|
||||
this.topVal = '已收';
|
||||
break;
|
||||
case 3:
|
||||
this.topVal = '待收物业公积金';
|
||||
break;
|
||||
case 4:
|
||||
this.topVal = '手续费';
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 获取钱包信息
|
||||
getWalletInfo() {
|
||||
// 这里应该是真实的接口调用
|
||||
// 暂时使用模拟数据
|
||||
console.log('获取钱包信息');
|
||||
// 实际项目中应该调用接口获取余额和交易记录
|
||||
// request('/api/wallet/info', 'GET').then(res => {
|
||||
// if (res.code === 0) {
|
||||
// this.balance = res.data.balance;
|
||||
// this.records = res.data.records;
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
24
pages.json
24
pages.json
@ -123,6 +123,13 @@
|
||||
"navigationBarTitleText": "任务详情",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "wallet/index",
|
||||
"style": {
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -319,7 +326,8 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -435,6 +443,13 @@
|
||||
{
|
||||
"path": "customerService/index",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "wallet/index",
|
||||
"style": {
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -623,6 +638,13 @@
|
||||
"navigationBarTitleText": "订单核销",
|
||||
"navigationBarBackgroundColor": "#F9F9F9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "wallet/index",
|
||||
"style": {
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -2,35 +2,19 @@
|
||||
<view class="city-select-page" v-if="loading">
|
||||
<view class="white_container padding_bottom40">
|
||||
<!-- 搜索框 -->
|
||||
<u-search
|
||||
placeholder="输入城市进行搜索"
|
||||
:value="searchValue"
|
||||
@search="handleSearch"
|
||||
@change="handleSearch"
|
||||
:showAction="false"
|
||||
height="70"
|
||||
searchIconSize="40"
|
||||
shape="round"
|
||||
></u-search>
|
||||
<u-search placeholder="输入城市进行搜索" :value="searchValue" @search="handleSearch" @change="handleSearch"
|
||||
:showAction="false" height="70" searchIconSize="40" shape="round"></u-search>
|
||||
<view v-if="searchValue" class="search_popup">
|
||||
<view v-if="searchRes.length === 0" class="list-item">暂无搜索结果</view>
|
||||
<view
|
||||
v-else
|
||||
v-for="(item, index) in searchRes"
|
||||
:key="index"
|
||||
:class="['list-item', index === searchRes.length - 1 && 'no_border']"
|
||||
@click="headerSelectMapClick(item)"
|
||||
>
|
||||
<view v-else v-for="(item, index) in searchRes" :key="index"
|
||||
:class="['list-item', index === searchRes.length - 1 && 'no_border']" @click="headerSelectMapClick(item)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!searchValue">
|
||||
<!-- 当前定位城市 -->
|
||||
<view class="current-city">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="widthFix" />
|
||||
<text>当前定位城市 {{ location.cityName }}</text>
|
||||
</view>
|
||||
|
||||
@ -38,13 +22,8 @@
|
||||
<view class="hot-cities">
|
||||
<text class="title">国内热门城市</text>
|
||||
<view class="city-list">
|
||||
<view
|
||||
v-for="(item, index) in hotCityList"
|
||||
class="city_name"
|
||||
:key="index"
|
||||
@click="headerSelectMapClick(item)"
|
||||
>{{ item.name }}</view
|
||||
>
|
||||
<view v-for="(item, index) in hotCityList" class="city_name" :key="index"
|
||||
@click="headerSelectMapClick(item)">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -52,28 +31,15 @@
|
||||
|
||||
<view v-if="!searchValue" class="container">
|
||||
<!-- 左侧列表 -->
|
||||
<scroll-view
|
||||
class="list-scroll"
|
||||
scroll-y
|
||||
:scroll-into-view="activeId"
|
||||
@scroll="handleScroll"
|
||||
>
|
||||
<view
|
||||
v-for="(group, index) in groupedData"
|
||||
:key="index"
|
||||
class="white_container"
|
||||
:id="'group-' + group.letter"
|
||||
>
|
||||
<scroll-view class="list-scroll" scroll-y :scroll-into-view="activeId" @scroll="handleScroll">
|
||||
<view v-for="(group, index) in groupedData" :key="index" class="white_container" :id="'group-' + group.letter">
|
||||
<!-- 字母标题 -->
|
||||
<view class="letter-title">{{ group.letter }}</view>
|
||||
<!-- 列表项 -->
|
||||
<!-- TODO: 小程序编译避坑指南: -->
|
||||
<view
|
||||
v-for="(item, ind) in group.list"
|
||||
:key="item.id"
|
||||
<view v-for="(item, ind) in group.list" :key="item.id"
|
||||
:class="['list-item', ind === group.list.length - 1 && 'no_border']"
|
||||
@click="() => { headerSelectMapClick(item) }"
|
||||
>
|
||||
@click="() => { headerSelectMapClick(item) }">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
@ -81,12 +47,7 @@
|
||||
|
||||
<!-- 右侧索引栏 -->
|
||||
<view class="index-bar">
|
||||
<view
|
||||
v-for="(letter, index) in letters"
|
||||
:key="index"
|
||||
class="index-item"
|
||||
@tap="scrollToLetter(letter)"
|
||||
>
|
||||
<view v-for="(letter, index) in letters" :key="index" class="index-item" @tap="scrollToLetter(letter)">
|
||||
{{ letter }}
|
||||
</view>
|
||||
</view>
|
||||
@ -96,7 +57,7 @@
|
||||
|
||||
<script>
|
||||
import { apiArr } from "../../api/area.js";
|
||||
import { request, debounce } from "../../utils/index.js";
|
||||
import { request, debounce, NavgateTo } from "../../utils/index.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -182,14 +143,38 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 更新页面数据,如标记点等
|
||||
// 提取城市名称,添加防御性检查
|
||||
let cityName = '';
|
||||
let district = '';
|
||||
let region = '';
|
||||
|
||||
// 提取城市名
|
||||
const cityMatch = res.address.match(/(.*?(?:省|自治区)|^)(.*?)(?:市|地区|盟|州|县|区)?$/);
|
||||
if (cityMatch && cityMatch[2]) {
|
||||
const cityMatch2 = cityMatch[2].match(/(.*市)/);
|
||||
if (cityMatch2 && cityMatch2[1]) {
|
||||
cityName = cityMatch2[1];
|
||||
}
|
||||
}
|
||||
|
||||
// 提取区县
|
||||
const districtMatch = res.address.match(/市(.*)/);
|
||||
if (districtMatch && districtMatch[1]) {
|
||||
district = districtMatch[1];
|
||||
}
|
||||
|
||||
// 提取省市区
|
||||
const regionMatch = res.address.match(/^(.*?省.*?(?:市|自治州|盟).*?(?:县|区|旗))/);
|
||||
if (regionMatch && regionMatch[1]) {
|
||||
region = regionMatch[1];
|
||||
}
|
||||
|
||||
const selectLocation = {
|
||||
cityName: res.address
|
||||
.match(/(.*?(?:省|自治区)|^)(.*?)(?:市|地区|盟|州|县|区)?$/)[2]
|
||||
.match(/(.*市)/)[1],
|
||||
district: res.address.match(/市(.*)/)[1],
|
||||
cityName: cityName,
|
||||
district: district,
|
||||
lat: res.latitude,
|
||||
lng: res.longitude,
|
||||
region: res.address.match(/^(.*?省.*?(?:市|自治州|盟).*?(?:县|区|旗))/)[1], // 省市区
|
||||
region: region,
|
||||
};
|
||||
uni.setStorageSync("location", selectLocation); // 缓存数据信息
|
||||
// uni.setStorageSync('city', selectLocation.cityName); // 缓存数据信息
|
||||
@ -203,8 +188,8 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
handleSearch: debounce(function(keyword) {
|
||||
if(keyword === '') {
|
||||
handleSearch: debounce(function (keyword) {
|
||||
if (keyword === '') {
|
||||
this.searchValue = '';
|
||||
this.searchRes = [];
|
||||
return;
|
||||
@ -266,7 +251,7 @@ export default {
|
||||
mask: true
|
||||
})
|
||||
const params = {
|
||||
ad_level:2
|
||||
ad_level: 2
|
||||
}
|
||||
const res = await request(apiArr.getRegionList, 'POST', params, { silent: false });
|
||||
// TODO: 数据量返回过于庞大,只获取所需信息,其他内容舍弃
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="section section1">
|
||||
<view class="section_label">
|
||||
<view class="section_label" @click="goWallet(1)">
|
||||
<view>{{ userInfo.property_housing_fund }}</view>
|
||||
<view>积分</view>
|
||||
</view>
|
||||
@ -32,11 +32,11 @@
|
||||
<view>0.00</view>
|
||||
<view>繁华币</view>
|
||||
</view>
|
||||
<view class="section_label">
|
||||
<view class="section_label" @click="goWallet(2)">
|
||||
<view>{{ userInfo.property_housing_fund }}元</view>
|
||||
<view>物业费公积金</view>
|
||||
</view>
|
||||
<view class="section_label">
|
||||
<view class="section_label" @click="goWallet(3)">
|
||||
<view>0元</view>
|
||||
<view>红包卡券</view>
|
||||
</view>
|
||||
@ -267,6 +267,9 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
goWallet(type) {
|
||||
NavgateTo('/packages/user/wallet/index?type=' + type);
|
||||
},
|
||||
// 头像点击
|
||||
toLogin() {
|
||||
NavgateTo('/packages/user/replenishInfo/index');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user