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去重
|
// 根据community_id去重
|
||||||
mergedList = uniqueByField(mergedList, 'community_id');
|
mergedList = uniqueByField(mergedList, 'community_id');
|
||||||
|
|||||||
@ -149,7 +149,7 @@
|
|||||||
<view class="payHisItem" v-for="item in payOrderList" :key="item.id">
|
<view class="payHisItem" v-for="item in payOrderList" :key="item.id">
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="row_label">缴费金额</view>
|
<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>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="row_label2"></view>
|
<view class="row_label2"></view>
|
||||||
@ -157,23 +157,23 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="line4"></view>
|
<view class="line4"></view>
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="row_label">绑定房源</view>
|
<view class="row_label">缴费账单数量</view>
|
||||||
<view class="row_con3">
|
<view class="row_con3">
|
||||||
<view class="row_con3_1">
|
<view class="row_con3_1">
|
||||||
{{ item.community_order ? item.community_order.length : 0 }}个账单
|
{{ item.community_order ? item.community_order.length : 0 }}个账单
|
||||||
</view>
|
</view>
|
||||||
<view class="row_con3_2">明细可从收据查看</view>
|
<!-- <view class="row_con3_2">明细可从收据查看</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="row_label">应缴费金额</view>
|
<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>
|
||||||
|
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="row_label">物业费公积金抵扣金额</view>
|
<view class="row_label">物业费公积金抵扣金额</view>
|
||||||
<view class="row_con4">-¥{{ item.reduction_money }}</view>
|
<view class="row_con4">-¥{{ item.property_housing_fund }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="row">
|
<view class="row">
|
||||||
@ -181,7 +181,7 @@
|
|||||||
<view class="row_con4">{{ item.order_pay_no }}</view>
|
<view class="row_con4">{{ item.order_pay_no }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line4"></view>
|
<view class="line4"></view>
|
||||||
<view class="Receipt">收据</view>
|
<!-- <view class="Receipt">收据</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -302,11 +302,53 @@ export default {
|
|||||||
this.getUserGovenmentMoney();
|
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: {
|
methods: {
|
||||||
changeTab(index) {
|
changeTab(index) {
|
||||||
this.active = index;
|
this.active = index;
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
|
// 重置分页参数
|
||||||
this.page_num = 1;
|
this.page_num = 1;
|
||||||
|
this.page_size = 10;
|
||||||
this.getPayList();
|
this.getPayList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -330,15 +372,23 @@ export default {
|
|||||||
},
|
},
|
||||||
//获取房源
|
//获取房源
|
||||||
getRoomSelect() {
|
getRoomSelect() {
|
||||||
request(apiArr.getCommunityRoomList, "POST", {
|
return new Promise((resolve, reject) => {
|
||||||
community_id: this.currentCommunity.id,
|
request(apiArr.getCommunityRoomList, "POST", {
|
||||||
page_num: 1,
|
community_id: this.currentCommunity.id,
|
||||||
page_size: 50,
|
page_num: 1,
|
||||||
}).then((res) => {
|
page_size: 50,
|
||||||
this.roomList = res.rows;
|
}).then((res) => {
|
||||||
this.currentRoom = this.roomList[0];
|
this.roomList = res.rows;
|
||||||
this.selectedRoomId = this.currentRoom.room_id;
|
this.currentRoom = this.roomList[0];
|
||||||
this.getOrderList();
|
this.selectedRoomId = this.currentRoom.room_id;
|
||||||
|
this.getOrderList().then(() => {
|
||||||
|
resolve();
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -354,29 +404,39 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
//获取用户公积金
|
//获取用户公积金
|
||||||
async getUserGovenmentMoney() {
|
getUserGovenmentMoney() {
|
||||||
request(apiArr.getUserGovenmentMoney, "POST", {}).then((res) => {
|
return new Promise((resolve, reject) => {
|
||||||
console.log(res, "公积金");
|
request(apiArr.getUserGovenmentMoney, "POST", {}).then((res) => {
|
||||||
this.balanceMoney = res.balance_after;
|
console.log(res, "公积金");
|
||||||
|
this.balanceMoney = res.balance_after;
|
||||||
|
resolve();
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取账单
|
//获取账单
|
||||||
async getOrderList() {
|
getOrderList() {
|
||||||
await request(apiArr.getOrderList, "POST", {
|
return new Promise((resolve, reject) => {
|
||||||
room_id: this.currentRoom.room_id,
|
request(apiArr.getOrderList, "POST", {
|
||||||
page_num: 1,
|
room_id: this.currentRoom.room_id,
|
||||||
page_size: 50,
|
page_num: 1,
|
||||||
}).then((res) => {
|
page_size: 50,
|
||||||
console.log(res, "账单");
|
}).then((res) => {
|
||||||
res.rows.forEach((item) => {
|
console.log(res, "账单");
|
||||||
item.check = false;
|
res.rows.forEach((item) => {
|
||||||
item.more = false;
|
item.check = false;
|
||||||
item.community_order_rows.forEach((ite) => {
|
item.more = false;
|
||||||
ite.check = false;
|
item.community_order_rows.forEach((ite) => {
|
||||||
|
ite.check = false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
this.Bill = res.rows;
|
||||||
|
resolve();
|
||||||
|
}).catch((error) => {
|
||||||
|
reject(error);
|
||||||
});
|
});
|
||||||
this.Bill = res.rows;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//账单详情切换展示显示
|
//账单详情切换展示显示
|
||||||
@ -387,10 +447,8 @@ export default {
|
|||||||
checkChange(e, index) {
|
checkChange(e, index) {
|
||||||
this.Bill[index].check = !this.Bill[index].check;
|
this.Bill[index].check = !this.Bill[index].check;
|
||||||
this.Bill[index].community_order_rows.forEach((item) => {
|
this.Bill[index].community_order_rows.forEach((item) => {
|
||||||
if (this.Bill[index].check) {
|
if (item.pay_status == 1) {
|
||||||
item.check = true;
|
item.check = this.Bill[index].check;
|
||||||
} else {
|
|
||||||
item.check = false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -490,6 +548,10 @@ export default {
|
|||||||
const fundAmount = Math.min(Number(this.balanceMoney), Number(this.currentMoney));
|
const fundAmount = Math.min(Number(this.balanceMoney), Number(this.currentMoney));
|
||||||
payParams.property_housing_fund = fundAmount.toFixed(2);
|
payParams.property_housing_fund = fundAmount.toFixed(2);
|
||||||
|
|
||||||
|
if (isComboPay && payParams.money == 0) {
|
||||||
|
this.payType = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// 仅公积金支付 公积金不足
|
// 仅公积金支付 公积金不足
|
||||||
if (this.payType == 2 && !isComboPay) {
|
if (this.payType == 2 && !isComboPay) {
|
||||||
if (Number(this.balanceMoney) < Number(this.currentMoney)) {
|
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;
|
this.payType = 3;
|
||||||
name_mini = "微信 + 物业公积金";
|
name_mini = "微信 + 物业公积金";
|
||||||
}
|
}
|
||||||
@ -515,22 +577,22 @@ export default {
|
|||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定使用物业公积金支付?',
|
content: '确定使用物业公积金支付?',
|
||||||
success: async function (res) {
|
success: async (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
await request(apiArr.createPayOrder, "POST", payParams).then((res) => {
|
await request(apiArr.createPayOrder, "POST", payParams).then((res) => {
|
||||||
const params = {
|
const params = {
|
||||||
order_pay_id: res.id,
|
order_pay_id: res.id,
|
||||||
}
|
}
|
||||||
request(apiArr.tradeQuery, "POST", params).then(res => {
|
request(apiArr.tradeQuery, "POST", params).then(res => {
|
||||||
if (res && res.pay_status == 1) {
|
uni.showToast({
|
||||||
uni.showToast({
|
title: '支付成功',
|
||||||
title: '支付成功',
|
icon: 'success',
|
||||||
icon: 'success',
|
duration: 2000
|
||||||
duration: 2000
|
});
|
||||||
});
|
setTimeout(() => {
|
||||||
this.getRoomSelect();
|
this.getRoomSelect();
|
||||||
this.getUserGovenmentMoney();
|
this.getUserGovenmentMoney();
|
||||||
}
|
}, 1500);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
@ -603,19 +665,31 @@ export default {
|
|||||||
|
|
||||||
//支付记录
|
//支付记录
|
||||||
getPayList() {
|
getPayList() {
|
||||||
request(apiArr.getPayOrderList, "POST", {
|
return new Promise((resolve, reject) => {
|
||||||
room_id: this.currentRoom.room_id,
|
request(apiArr.getPayOrderList, "POST", {
|
||||||
page_num: this.page_num,
|
room_id: this.currentRoom.room_id,
|
||||||
page_size: this.page_size,
|
page_num: this.page_num,
|
||||||
}).then((res) => {
|
page_size: this.page_size,
|
||||||
let flag = false;
|
}).then((res) => {
|
||||||
if (res.rows && (res.rows?.length == this.page_size)) {
|
// 判断是否还有更多数据
|
||||||
flag = true;
|
let flag = false;
|
||||||
} else {
|
if (res.rows && res.rows.length === this.page_size) {
|
||||||
flag = false;
|
flag = true;
|
||||||
}
|
} else {
|
||||||
this.flag = flag;
|
flag = false;
|
||||||
this.payOrderList = res.rows
|
}
|
||||||
|
this.flag = flag;
|
||||||
|
|
||||||
|
// 如果是第一页,直接替换数据;如果是加载更多,追加数据
|
||||||
|
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="btnList">
|
||||||
<view class="btnItem" @click="payList">付款记录</view>
|
<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="line"></view>
|
||||||
<view class="btnItem" @click="home">首页</view>
|
<view class="btnItem" @click="home">首页</view>
|
||||||
|
<view class="line"></view>
|
||||||
<view class="btnItem2" @click="changeBoxshadow">
|
<view class="btnItem2" @click="changeBoxshadow">
|
||||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_qrcode.png"
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_qrcode.png"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
@ -268,7 +268,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
payList() {
|
payList() {
|
||||||
NavgateTo("../payInfo/index")
|
NavgateTo("../payInfo/index?id=" + this.info.id)
|
||||||
},
|
},
|
||||||
homeMoneList() {
|
homeMoneList() {
|
||||||
NavgateTo("../houseProvident/index")
|
NavgateTo("../houseProvident/index")
|
||||||
|
|||||||
@ -7,20 +7,20 @@
|
|||||||
<view class="row_con">¥{{ item.order_amount }}</view>
|
<view class="row_con">¥{{ item.order_amount }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row">
|
<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" v-if="false">Adapay微信小程序支付</view>
|
||||||
<view class="row_label2">{{item.payment_method}}</view>
|
<view class="row_label2">{{ item.payment_method }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
|
|
||||||
<view class="row2">
|
<view class="row2">
|
||||||
<view class="label">订单号</view>
|
<view class="label">订单号</view>
|
||||||
<view class="con3">{{item.order_no}}</view>
|
<view class="con3">{{ item.order_no }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="row2">
|
<view class="row2">
|
||||||
<view class="label">消费门店</view>
|
<view class="label">消费门店</view>
|
||||||
<view class="con3">{{item.merchant_info.merchant_name}}</view>
|
<view class="con3">{{ item.merchant_info.merchant_name }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="row2">
|
<view class="row2">
|
||||||
@ -74,14 +74,16 @@ export default {
|
|||||||
localHeight: "",
|
localHeight: "",
|
||||||
page_num: 1,
|
page_num: 1,
|
||||||
page_size: 10,
|
page_size: 10,
|
||||||
flag:false,
|
flag: false,
|
||||||
payList:[]
|
payList: [],
|
||||||
|
id: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const meun = menuButtonInfo();
|
const meun = menuButtonInfo();
|
||||||
this.top = meun.top;
|
this.top = meun.top;
|
||||||
this.localHeight = meun.height;
|
this.localHeight = meun.height;
|
||||||
|
this.id = options.id
|
||||||
this.getPayList()
|
this.getPayList()
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -97,12 +99,13 @@ export default {
|
|||||||
getPayList() {
|
getPayList() {
|
||||||
let that = this
|
let that = this
|
||||||
request(apiArr.getPayList, "POST", {
|
request(apiArr.getPayList, "POST", {
|
||||||
page_num:that.page_num,
|
merchant_id: that.id,
|
||||||
page_size:that.page_size
|
page_num: that.page_num,
|
||||||
}).then(res=>{
|
page_size: that.page_size
|
||||||
if(res.rows.length == that.page_size){
|
}).then(res => {
|
||||||
|
if (res.rows.length == that.page_size) {
|
||||||
that.flag = true
|
that.flag = true
|
||||||
}else{
|
} else {
|
||||||
that.flag = false
|
that.flag = false
|
||||||
}
|
}
|
||||||
that.payList = that.payList.concat(res.rows)
|
that.payList = that.payList.concat(res.rows)
|
||||||
|
|||||||
@ -307,7 +307,7 @@ export default {
|
|||||||
if(this.is_group_buy){
|
if(this.is_group_buy){
|
||||||
NavgateTo(`../groupPurchaseSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
NavgateTo(`../groupPurchaseSubmit/index?shopCarList=${JSON.stringify(updatedArr)}`);
|
||||||
}else{
|
}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;
|
margin-right: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
margin-top: 30rpx;
|
|
||||||
height: 1100rpx;
|
height: 1100rpx;
|
||||||
padding: 20rpx;
|
padding: 30rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content2 {
|
||||||
|
height: 1100rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@ -603,4 +609,39 @@ image {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
padding-bottom: 20rpx;
|
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>
|
||||||
|
|
||||||
<view class="content">
|
<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 col="6" :border="false">
|
||||||
<u-grid-item v-for="(item, index) in baseList" :key="index" @click="click(item)">
|
<u-grid-item v-for="(item, index) in baseList" :key="index" @click="click(item)">
|
||||||
<view class="grid-item">
|
<view class="grid-item">
|
||||||
@ -85,29 +102,29 @@ import {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
top: "",
|
top: "",
|
||||||
localHeight: "",
|
localHeight: "",
|
||||||
active: 1,
|
active: 1,
|
||||||
show: false,
|
show: false,
|
||||||
show2: false,
|
show2: false,
|
||||||
baseList: [
|
baseList: [
|
||||||
{
|
{
|
||||||
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1568.png",
|
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/page_user_Group_1568.png",
|
||||||
name: "订单",
|
name: "订单",
|
||||||
url: "/packages/storeManagement/order/index",
|
url: "/packages/storeManagement/order/index",
|
||||||
}, {
|
}, {
|
||||||
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/gp_cancelAfterVerification.png",
|
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/gp_cancelAfterVerification.png",
|
||||||
name: "到店核销",
|
name: "到店核销",
|
||||||
url: "/packages/storeManagement/orderVerification/index",
|
url: "/packages/storeManagement/orderVerification/index",
|
||||||
}, {
|
}, {
|
||||||
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/kefu0.png",
|
image: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/kefu0.png",
|
||||||
name: "客服",
|
name: "客服",
|
||||||
url: "/packages/customerService/chattingRecords/index",
|
url: "/packages/customerService/chattingRecords/index",
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const meun = menuButtonInfo();
|
const meun = menuButtonInfo();
|
||||||
this.top = meun.top;
|
this.top = meun.top;
|
||||||
@ -117,6 +134,9 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
goWallet(type) {
|
||||||
|
NavgateTo('/packages/storeManagement/wallet/index?type=' + type);
|
||||||
|
},
|
||||||
changeTab(index) {
|
changeTab(index) {
|
||||||
this.active = 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: '提交成功',
|
title: '提交成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
|
// 提交成功后,重置表单
|
||||||
|
this.getInfo(this.taskId);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
console.error('提交失败', error)
|
console.error('提交失败', error)
|
||||||
|
|||||||
@ -112,4 +112,40 @@
|
|||||||
max-width: 768px;
|
max-width: 768px;
|
||||||
margin: 0 auto;
|
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="container">
|
||||||
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
|
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
|
||||||
<view class="searchBox_add" @click="addCommunity">
|
<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">
|
<view class="emptyCommunity">
|
||||||
{{ communityVal }}
|
{{ communityVal }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</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>
|
<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>
|
||||||
<view class="work-order-section">
|
<view class="work-order-section">
|
||||||
<view v-for="(item, index) in 9" :key="index">
|
<view v-for="(item, index) in 9" :key="index">
|
||||||
<view class="work-order-card" v-if="index == 1 && showWorkOrderSection"
|
<view class="work-order-card" v-if="index == 1 && showWorkOrderSection"
|
||||||
@click="navigateToWorkOrderDashboard">
|
@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>
|
<text class="work-order-text">工单台</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="work-order-card" v-if="index == 0"
|
<view class="work-order-card" v-if="index == 0" @click="navigateToRoutingInspection">
|
||||||
@click="navigateToRoutingInspection">
|
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/polling.png"
|
||||||
<image class="work-order-icon" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/polling.png" mode="aspectFill" />
|
mode="aspectFill" />
|
||||||
<text class="work-order-text">巡更巡检</text>
|
<text class="work-order-text">巡更巡检</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="work-order-card" v-else></view>
|
<view class="work-order-card" v-else></view>
|
||||||
@ -53,7 +77,7 @@ export default {
|
|||||||
const workOrderPermission = uni.getStorageSync('work_order_permission');
|
const workOrderPermission = uni.getStorageSync('work_order_permission');
|
||||||
const orderDispatchPermission = uni.getStorageSync('order_dispatch_permission');
|
const orderDispatchPermission = uni.getStorageSync('order_dispatch_permission');
|
||||||
this.showWorkOrderSection = !(workOrderPermission === false && orderDispatchPermission === false);
|
this.showWorkOrderSection = !(workOrderPermission === false && orderDispatchPermission === false);
|
||||||
|
|
||||||
// 获取小区列表并设置默认选中第一个
|
// 获取小区列表并设置默认选中第一个
|
||||||
await request(apiArr.workCommunityList, "POST", {
|
await request(apiArr.workCommunityList, "POST", {
|
||||||
user_id: uni.getStorageSync('userId'),
|
user_id: uni.getStorageSync('userId'),
|
||||||
@ -62,7 +86,7 @@ export default {
|
|||||||
item.pic = item.pic.startsWith('http') ? item.pic : picUrl + item.pic
|
item.pic = item.pic.startsWith('http') ? item.pic : picUrl + item.pic
|
||||||
});
|
});
|
||||||
this.communityList = res.rows;
|
this.communityList = res.rows;
|
||||||
|
|
||||||
// 如果没有选中的小区且有小区列表,则默认选中第一个
|
// 如果没有选中的小区且有小区列表,则默认选中第一个
|
||||||
if (!uni.getStorageSync('changeWorkOrderData') && res.rows.length > 0) {
|
if (!uni.getStorageSync('changeWorkOrderData') && res.rows.length > 0) {
|
||||||
uni.setStorageSync('changeWorkOrderData', { id: res.rows[0].community_id, name: res.rows[0].name });
|
uni.setStorageSync('changeWorkOrderData', { id: res.rows[0].community_id, name: res.rows[0].name });
|
||||||
@ -73,7 +97,7 @@ export default {
|
|||||||
async onShow() {
|
async onShow() {
|
||||||
const changeCommData = uni.getStorageSync('changeWorkOrderData');
|
const changeCommData = uni.getStorageSync('changeWorkOrderData');
|
||||||
this.communityVal = changeCommData ? changeCommData.name : "切换小区";
|
this.communityVal = changeCommData ? changeCommData.name : "切换小区";
|
||||||
|
|
||||||
if (changeCommData) {
|
if (changeCommData) {
|
||||||
const params = {
|
const params = {
|
||||||
community_id: changeCommData.id,
|
community_id: changeCommData.id,
|
||||||
@ -83,6 +107,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goWallet(type) {
|
||||||
|
if (type == 2) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
NavgateTo('/packages/workOrderDashboard/wallet/index?type=' + type);
|
||||||
|
},
|
||||||
addCommunity() {
|
addCommunity() {
|
||||||
NavgateTo("/packages/workOrderDashboard/myCommunity/index");
|
NavgateTo("/packages/workOrderDashboard/myCommunity/index");
|
||||||
},
|
},
|
||||||
@ -97,7 +127,7 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/packages/workOrderDashboard/index/index?communityId=' + changeCommData.id
|
url: '/packages/workOrderDashboard/index/index?communityId=' + changeCommData.id
|
||||||
});
|
});
|
||||||
@ -113,7 +143,7 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/packages/workOrderDashboard/routingInspection/index?communityId=' + changeCommData.id
|
url: '/packages/workOrderDashboard/routingInspection/index?communityId=' + changeCommData.id
|
||||||
});
|
});
|
||||||
|
|||||||
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": "任务详情",
|
"navigationBarTitleText": "任务详情",
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "wallet/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarBackgroundColor": "#fff",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -319,7 +326,8 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -435,6 +443,13 @@
|
|||||||
{
|
{
|
||||||
"path": "customerService/index",
|
"path": "customerService/index",
|
||||||
"style": {}
|
"style": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "wallet/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarBackgroundColor": "#fff",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -623,6 +638,13 @@
|
|||||||
"navigationBarTitleText": "订单核销",
|
"navigationBarTitleText": "订单核销",
|
||||||
"navigationBarBackgroundColor": "#F9F9F9"
|
"navigationBarBackgroundColor": "#F9F9F9"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "wallet/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarBackgroundColor": "#fff",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2,35 +2,19 @@
|
|||||||
<view class="city-select-page" v-if="loading">
|
<view class="city-select-page" v-if="loading">
|
||||||
<view class="white_container padding_bottom40">
|
<view class="white_container padding_bottom40">
|
||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<u-search
|
<u-search placeholder="输入城市进行搜索" :value="searchValue" @search="handleSearch" @change="handleSearch"
|
||||||
placeholder="输入城市进行搜索"
|
:showAction="false" height="70" searchIconSize="40" shape="round"></u-search>
|
||||||
: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="searchValue" class="search_popup">
|
||||||
<view v-if="searchRes.length === 0" class="list-item">暂无搜索结果</view>
|
<view v-if="searchRes.length === 0" class="list-item">暂无搜索结果</view>
|
||||||
<view
|
<view v-else v-for="(item, index) in searchRes" :key="index"
|
||||||
v-else
|
:class="['list-item', index === searchRes.length - 1 && 'no_border']" @click="headerSelectMapClick(item)">
|
||||||
v-for="(item, index) in searchRes"
|
|
||||||
:key="index"
|
|
||||||
:class="['list-item', index === searchRes.length - 1 && 'no_border']"
|
|
||||||
@click="headerSelectMapClick(item)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!searchValue">
|
<view v-if="!searchValue">
|
||||||
<!-- 当前定位城市 -->
|
<!-- 当前定位城市 -->
|
||||||
<view class="current-city">
|
<view class="current-city">
|
||||||
<image
|
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="widthFix" />
|
||||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png"
|
|
||||||
mode="widthFix"
|
|
||||||
/>
|
|
||||||
<text>当前定位城市 {{ location.cityName }}</text>
|
<text>当前定位城市 {{ location.cityName }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -38,13 +22,8 @@
|
|||||||
<view class="hot-cities">
|
<view class="hot-cities">
|
||||||
<text class="title">国内热门城市</text>
|
<text class="title">国内热门城市</text>
|
||||||
<view class="city-list">
|
<view class="city-list">
|
||||||
<view
|
<view v-for="(item, index) in hotCityList" class="city_name" :key="index"
|
||||||
v-for="(item, index) in hotCityList"
|
@click="headerSelectMapClick(item)">{{ item.name }}</view>
|
||||||
class="city_name"
|
|
||||||
:key="index"
|
|
||||||
@click="headerSelectMapClick(item)"
|
|
||||||
>{{ item.name }}</view
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -52,28 +31,15 @@
|
|||||||
|
|
||||||
<view v-if="!searchValue" class="container">
|
<view v-if="!searchValue" class="container">
|
||||||
<!-- 左侧列表 -->
|
<!-- 左侧列表 -->
|
||||||
<scroll-view
|
<scroll-view class="list-scroll" scroll-y :scroll-into-view="activeId" @scroll="handleScroll">
|
||||||
class="list-scroll"
|
<view v-for="(group, index) in groupedData" :key="index" class="white_container" :id="'group-' + group.letter">
|
||||||
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>
|
<view class="letter-title">{{ group.letter }}</view>
|
||||||
<!-- 列表项 -->
|
<!-- 列表项 -->
|
||||||
<!-- TODO: 小程序编译避坑指南: -->
|
<!-- TODO: 小程序编译避坑指南: -->
|
||||||
<view
|
<view v-for="(item, ind) in group.list" :key="item.id"
|
||||||
v-for="(item, ind) in group.list"
|
|
||||||
:key="item.id"
|
|
||||||
:class="['list-item', ind === group.list.length - 1 && 'no_border']"
|
:class="['list-item', ind === group.list.length - 1 && 'no_border']"
|
||||||
@click="() => { headerSelectMapClick(item) }"
|
@click="() => { headerSelectMapClick(item) }">
|
||||||
>
|
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -81,12 +47,7 @@
|
|||||||
|
|
||||||
<!-- 右侧索引栏 -->
|
<!-- 右侧索引栏 -->
|
||||||
<view class="index-bar">
|
<view class="index-bar">
|
||||||
<view
|
<view v-for="(letter, index) in letters" :key="index" class="index-item" @tap="scrollToLetter(letter)">
|
||||||
v-for="(letter, index) in letters"
|
|
||||||
:key="index"
|
|
||||||
class="index-item"
|
|
||||||
@tap="scrollToLetter(letter)"
|
|
||||||
>
|
|
||||||
{{ letter }}
|
{{ letter }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -96,7 +57,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { apiArr } from "../../api/area.js";
|
import { apiArr } from "../../api/area.js";
|
||||||
import { request, debounce } from "../../utils/index.js";
|
import { request, debounce, NavgateTo } from "../../utils/index.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -182,14 +143,38 @@ export default {
|
|||||||
return;
|
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 = {
|
const selectLocation = {
|
||||||
cityName: res.address
|
cityName: cityName,
|
||||||
.match(/(.*?(?:省|自治区)|^)(.*?)(?:市|地区|盟|州|县|区)?$/)[2]
|
district: district,
|
||||||
.match(/(.*市)/)[1],
|
|
||||||
district: res.address.match(/市(.*)/)[1],
|
|
||||||
lat: res.latitude,
|
lat: res.latitude,
|
||||||
lng: res.longitude,
|
lng: res.longitude,
|
||||||
region: res.address.match(/^(.*?省.*?(?:市|自治州|盟).*?(?:县|区|旗))/)[1], // 省市区
|
region: region,
|
||||||
};
|
};
|
||||||
uni.setStorageSync("location", selectLocation); // 缓存数据信息
|
uni.setStorageSync("location", selectLocation); // 缓存数据信息
|
||||||
// uni.setStorageSync('city', selectLocation.cityName); // 缓存数据信息
|
// uni.setStorageSync('city', selectLocation.cityName); // 缓存数据信息
|
||||||
@ -203,13 +188,13 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSearch: debounce(function(keyword) {
|
handleSearch: debounce(function (keyword) {
|
||||||
if(keyword === '') {
|
if (keyword === '') {
|
||||||
this.searchValue = '';
|
this.searchValue = '';
|
||||||
this.searchRes = [];
|
this.searchRes = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
mask: true
|
mask: true
|
||||||
@ -227,7 +212,7 @@ export default {
|
|||||||
}, 500),
|
}, 500),
|
||||||
|
|
||||||
groupData(item) {
|
groupData(item) {
|
||||||
console.log('123. item', item);
|
console.log('123. item', item);
|
||||||
const map = {};
|
const map = {};
|
||||||
this.letters.forEach((letter) => {
|
this.letters.forEach((letter) => {
|
||||||
map[letter] = {
|
map[letter] = {
|
||||||
@ -266,9 +251,9 @@ export default {
|
|||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
const params = {
|
const params = {
|
||||||
ad_level:2
|
ad_level: 2
|
||||||
}
|
}
|
||||||
const res = await request(apiArr.getRegionList, 'POST', params, { silent: false });
|
const res = await request(apiArr.getRegionList, 'POST', params, { silent: false });
|
||||||
// TODO: 数据量返回过于庞大,只获取所需信息,其他内容舍弃
|
// TODO: 数据量返回过于庞大,只获取所需信息,其他内容舍弃
|
||||||
const newRes = res.rows.map((item) => {
|
const newRes = res.rows.map((item) => {
|
||||||
return {
|
return {
|
||||||
@ -279,7 +264,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('111', newRes)
|
console.log('111', newRes)
|
||||||
// this.cityList = newRes;
|
// this.cityList = newRes;
|
||||||
const hotsList = res.rows.filter((item) => item.hot === 2).map((item) => {
|
const hotsList = res.rows.filter((item) => item.hot === 2).map((item) => {
|
||||||
return {
|
return {
|
||||||
lat: item.lat,
|
lat: item.lat,
|
||||||
@ -289,7 +274,7 @@ export default {
|
|||||||
});
|
});
|
||||||
console.log('热门城市信息', hotsList);
|
console.log('热门城市信息', hotsList);
|
||||||
this.hotCityList = hotsList;
|
this.hotCityList = hotsList;
|
||||||
await this.groupData(newRes);
|
await this.groupData(newRes);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 滚动时监听当前位置
|
// 滚动时监听当前位置
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section section1">
|
<view class="section section1">
|
||||||
<view class="section_label">
|
<view class="section_label" @click="goWallet(1)">
|
||||||
<view>{{ userInfo.property_housing_fund }}</view>
|
<view>{{ userInfo.property_housing_fund }}</view>
|
||||||
<view>积分</view>
|
<view>积分</view>
|
||||||
</view>
|
</view>
|
||||||
@ -32,11 +32,11 @@
|
|||||||
<view>0.00</view>
|
<view>0.00</view>
|
||||||
<view>繁华币</view>
|
<view>繁华币</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section_label">
|
<view class="section_label" @click="goWallet(2)">
|
||||||
<view>{{ userInfo.property_housing_fund }}元</view>
|
<view>{{ userInfo.property_housing_fund }}元</view>
|
||||||
<view>物业费公积金</view>
|
<view>物业费公积金</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="section_label">
|
<view class="section_label" @click="goWallet(3)">
|
||||||
<view>0元</view>
|
<view>0元</view>
|
||||||
<view>红包卡券</view>
|
<view>红包卡券</view>
|
||||||
</view>
|
</view>
|
||||||
@ -267,6 +267,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
goWallet(type) {
|
||||||
|
NavgateTo('/packages/user/wallet/index?type=' + type);
|
||||||
|
},
|
||||||
// 头像点击
|
// 头像点击
|
||||||
toLogin() {
|
toLogin() {
|
||||||
NavgateTo('/packages/user/replenishInfo/index');
|
NavgateTo('/packages/user/replenishInfo/index');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user