开始做充值,,调整了首页

This commit is contained in:
2024-04-02 17:32:28 +08:00
parent 3284bea475
commit db6d253898
44 changed files with 676 additions and 141 deletions

View File

@@ -33,8 +33,13 @@ Component({
methods: {
async init() {
const result = await getApproveList(1)
const { code, message, data } = result;
// if (code !== OK) {
// alertInfo(message)
// return;
// }
this.setData({
list: result.data
list: data
})
},
async setAdmin(e) {

View File

@@ -2,6 +2,8 @@
"component": true,
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index"
"van-tabs": "@vant/weapp/tabs/index",
"avatar": "/components/avatar/index",
"van-button": "@vant/weapp/button/index"
}
}

View File

@@ -10,10 +10,15 @@
<van-tabs active="{{ active }}" bind:change="onChange">
<van-tab wx:for="{{list}}" wx:key="index" title="{{item.name}}">
<view wx:for="{{item.users}}" wx:key="index" wx:for-item="ele" class="item">
<view class="nickName"> {{ ele.name }} </view>
<view class="operate" wx:if="{{!ele.isAdmin}}">
<view class="primaryTextBtn" data-user="{{ele}}" bind:tap="setAdmin" data-tenement="{{item.id}}"> 设为管理员 </view>
<view class="disAgree dangerTextBtn" data-user="{{ele}}" bind:tap="remove" data-tenement="{{item.id}}"> 移除 </view>
<avatar text="{{ele.name}}" />
<view class="info">
<view class="nickName"> {{ ele.name }} </view>
<view class="phone"> {{ ele.phone }} </view>
</view>
<!-- <view class="operate" wx:if="{{!ele.isAdmin}}"> -->
<view class="operate">
<van-button type="info" size="small" data-user="{{ele}}" bind:click="setAdmin" data-tenement="{{item.id}}" style="margin-bottom: 16rpx;" class="admin">设为管理员</van-button>
<van-button type="danger" size="small" data-user="{{ele}}" bind:click="remove" data-tenement="{{item.id}}" class="remove">移除</van-button>
</view>
</view>
</van-tab>

View File

@@ -3,10 +3,15 @@
.item {
display: flex;
align-items: center;
padding-top: 24rpx;
padding-bottom: 24rpx;
/* padding-top: 24rpx; */
/* padding-bottom: 24rpx; */
padding: 24rpx;
margin-left: 32rpx;
margin-right: 32rpx;
margin-top: 30rpx;
margin-bottom: 15rpx;
background-color: #fff;
border-radius: 30rpx;
}
.nickName {
@@ -14,9 +19,38 @@
}
.operate {
/* display: flex; */
height: 100%;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: space-between;
}
.admin button, .remove button {
width: 180rpx;
}
.disAgree {
margin-left: 24rpx;
}
.info {
margin-left: 32rpx;
flex: 1;
}
.nickName {
max-width: 300rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 30rpx;
}
page, .van-tabs__scroll {
background-color: rgb(228,240,236) !important;
}
.van-tabs__scroll {
background-color: rgb(228,240,236) !important;
}