调整页面,新增自动刷新

This commit is contained in:
weipengfei 2023-08-09 10:06:24 +08:00
parent 1785aaa4a2
commit 1ed919adec
2 changed files with 192 additions and 209 deletions

View File

@ -5,11 +5,9 @@
<view class="top"> <view class="top">
<image class="avatar" src="../../static/img/public/record.png"></image> <image class="avatar" src="../../static/img/public/record.png"></image>
<view class="body"> <view class="body">
<view class="t_top">
<view>姓名:<text class="name">{{item.name}}</text></view> <view>姓名:<text class="name">{{item.name}}</text></view>
<view>电话:<text class="mobile">{{item.phone}}</text></view> <view>片区:<text class="name">{{item.address}}</text></view>
</view> <view>电话:<text class="name">{{item.phone}}</text></view>
<view class="t_bottom">片区:<text class="address">{{item.address}}</text></view>
</view> </view>
</view> </view>
<u-line color="#cccccc"></u-line> <u-line color="#cccccc"></u-line>
@ -62,6 +60,7 @@
this.user_id = this.$store.state.app.userInfo.id; this.user_id = this.$store.state.app.userInfo.id;
} }
this.loadInformationList(); this.loadInformationList();
uni.$on('loadArchives', this.initLoad);
}, },
onShow() { onShow() {
@ -169,33 +168,16 @@
.body { .body {
flex: 1; flex: 1;
font-size: 28rpx;
.t_top { color: #333;
display: flex; font-weight: bold;
justify-content: space-between;
margin-bottom: 18rpx;
.name { .name {
font-size: 32rpx;
color: #333;
}
.mobile {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
} font-weight: 500;
} display: inline-block;
margin-left: 18rpx;
.t_bottom {
width: 500rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.address {
font-size: 28rpx;
color: #333;
}
} }
} }
} }

View File

@ -279,6 +279,7 @@
title: "添加成功", title: "添加成功",
success: () => { success: () => {
setTimeout(() => { setTimeout(() => {
uni.$emit('loadArchives');
uni.navigateBack() uni.navigateBack()
}, 1000) }, 1000)
} }