renew.vue
2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<template>
<view>
<view class="searchbar">
<uni-easyinput placeholderStyle="font-size:30rpx" :input-border="false" prefixIcon="search" v-model="query.name" placeholder="搜索姓名或证件号码" @iconClick="iconClick">
</uni-easyinput>
<view class="invertedbtn-red" @click="goVipList">+ 添加会员</view>
</view>
<uni-swipe-action>
<uni-swipe-action-item class="personitem" v-for="n in choseList">
<view class="content-box">
<view class="flexbox">
<view class="colorful">{{n.name.slice(0,1)}}</view>
{{n.name}}
</view>
<view class="flexbox">
<uni-number-box :min="1" v-model="n.year" :max="5"></uni-number-box>年
</view>
</view>
<template v-slot:right>
<view class="slot-button">
<view>
<uni-icons type="trash-filled" color="#fff" size="20"></uni-icons>
<text class="slot-button-text">删除</text>
</view>
</view>
</template>
</uni-swipe-action-item>
</uni-swipe-action>
<view class="nodata" v-if="choseList.length==0">
<image mode="aspectFit" src="/static/nodata.png"></image>
<button class="btn-red" @click="goVipList">+ 添加会员</button>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue'
const query = ref({})
const choseList = ref([{name:'张三',year:'1'},{name:'李三',year:'1'}])
const yearlist = ref([{text:'一年',value:'1'},{text:'2年',value:'2'}])
function goVipList(){
let path = '/pages/personalVip/vipList';
uni.navigateTo({
url: path
});
}
function changeYear(){
}
</script>
<style scoped lang="scss">
.searchbar{display: flex;align-items: center;padding: 25rpx;box-sizing: border-box;
.invertedbtn-red{margin-left: 15rpx;font-size: 30rpx;
padding: 16rpx 20rpx;box-sizing: border-box;border-radius: 50rpx;background-color: #fff;}
:deep(.uni-easyinput .uni-easyinput__content){border-radius: 35rpx;border: none;
height: 70rpx;}
:deep(.uni-easyinput__content-input){
font-size: 26rpx;}
}
.slot-button {display: flex;align-items: center;
padding: 0 20px;text-align: center;
background-color: #E60012;
}
.slot-button-text {
color: #ffffff;display: block;
font-size: 14px;
}
.personitem{background: #fff;box-sizing: border-box;
margin-bottom: 30rpx;
.content-box{display: flex;align-items: center;padding:16rpx;border-radius: 15rpx;
justify-content: space-between;
.noborder{border: none;
:deep(.uni-select){border: none;text-align: right;}
}
}
.flexbox{align-items: center;}
&:nth-child(3n) .colorful{background: #014A9F;}
&:nth-child(3n+1) .colorful{background: #AD181F;}
&:nth-child(3n+2) .colorful{background: #D3B267;}
}
.colorful{width: 100rpx;margin-right: 14rpx;
height: 100rpx;line-height: 100rpx;
font-size: 44rpx;
color: #fff;text-align: center;
border-radius: 50%;}
</style>