123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <template>
- <view>
- <view v-if="list.length>0" class="list flex justify-center">
- <view class="list-box">
- <block v-for="(item,index) in list" :key="index">
- <view class="list-box-item flex align-center justify-between" >
- <view class="list-box-item-l flex align-center">
- <image :src="item.user?item.user.avatar:'../../static/logo.png'" mode=""></image>
- <text>{{item.user.userName}}</text>
- </view>
- <view class="list-box-item-r flex justify-center align-center" @click="delShield(item.shieldCompanyId)">
- 移除
- </view>
- </view>
- <view class="list-box-line"></view>
- </block>
-
- </view>
- </view>
- <empty v-if="list.length==0" />
- </view>
- </template>
- <script>
- import empty from '../../components/empty.vue'
- export default {
- components:{
- empty
- },
- data() {
- return {
- page:1,
- limit:10,
- totalPage:'',
- list:[]
- };
- },
- onLoad() {
- this.getList()
- },
- onReachBottom() {
- if(this.page < this.totalPage){
- this.page += 1
- this.getList()
- }
- },
- onPullDownRefresh() {
- this.page = 1
- this.getList()
- },
- methods:{
- //移除黑名单
- delShield(shieldCompanyId){
- let that = this
- let data = {
- shieldCompanyId:shieldCompanyId
- }
- that.$Request.postT('/app/shieldCompany/deleteShieldCompany',data).then(res => {
- if(res.code==0){
- uni.showToast({
- title:'移除黑名单成功',
- duration:1500,
- })
- setTimeout(()=>{
- that.getList()
- },1500)
-
- }else{
- uni.showToast({
- title:res.msg,
- icon:'none'
- })
- }
- })
- },
- //获取企业拉黑的用户名单
- getList(){
- let data = {
- page:this.page,
- limit:this.limit,
- // userId:uni.getStorageSync('userId'),
- companyId:uni.getStorageSync('companyId')
- }
- this.$Request.getT('/app/shieldCompany/selectShieldList',data).then(res => {
- uni.stopPullDownRefresh()
- if(res.code == 0){
- this.totalPage = res.data.totalPage
- if(this.page==1){
- this.list = res.data.list
- }else{
- this.list = [...this.list,...res.data.list]
- }
- }else{
- // this.list = []
- }
- })
- },
- }
- }
- </script>
- <style lang="scss">
- page{
- background-color: #FFFFFF;
- }
- .list{
- width: 100%;
- .list-box{
- width: 686rpx;
- .list-box-line{
- width: 100%;
- border: 1rpx solid #F2F2F2;
- margin-top: 20rpx;
- }
- .list-box-item{
- width: 100%;
- margin-top: 50rpx;
- }
- .list-box-item-l{
- image{
- width: 70rpx;
- height: 70rpx;
- }
- text{
- margin-left: 20rpx;
- color: #1E1E1E;
- font-size: 32rpx;
- font-weight: bold;
- }
- }
- .list-box-item-r{
- width: 102rpx;
- height: 50rpx;
- background: #00B88F;
- border-radius: 8rpx;
- font-size: 24rpx;
- color: #FFFFFF;
- font-weight: 500;
- }
- }
- }
- </style>
|