|
@@ -2,14 +2,14 @@
|
|
|
<view class="blacklist-box">
|
|
|
<en-nav title="黑名单" :title-color="'#333'" @navHeight="setNavHeight"></en-nav>
|
|
|
<scroll-view class="blacklist-list" :scroll-y="true" :scroll-x="true" :style="{'height':'calc(100% - '+navHeight+'rpx)'}">
|
|
|
- <view class="blacklist-item" v-for="i in 12">
|
|
|
+ <view class="blacklist-item" v-for="(item,i) in 12">
|
|
|
<view class="blacklist-left">
|
|
|
<image class="blacklist-img" src="/static/img/temporary/4.png" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
<view class="blacklist-right">
|
|
|
<view class="blacklist-title">
|
|
|
<view class="title-text sys-color-black sys-weight-600 sys-height-44">江小明</view>
|
|
|
- <view class="title-icon">
|
|
|
+ <view class="title-icon" @click.stop="showDel(item,i)">
|
|
|
<text class="iconfont sys-height-44 sys-color-black"></text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -20,12 +20,19 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
+ <uni-popup ref="alertDialog" type="dialog">
|
|
|
+ <uni-popup-dialog type="center" cancelText="取消"
|
|
|
+ confirmText="确定" title="移除黑名单" content="是否移除黑名单"
|
|
|
+ @confirm="delBlackItem()"
|
|
|
+ @close="close()"></uni-popup-dialog>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import EnNav from "@/components/en-utils/en-nav/en-nav";
|
|
|
-import {getBlackList} from "@/api/my";
|
|
|
+import {delBlackItem, getBlackList} from "@/api/my";
|
|
|
+import tools from "@/service/tools";
|
|
|
export default {
|
|
|
components: {EnNav},
|
|
|
data() {
|
|
@@ -35,6 +42,8 @@ export default {
|
|
|
isAjax:false,
|
|
|
total:undefined,
|
|
|
page:1,
|
|
|
+ selectItem:{},
|
|
|
+ selectIndex:0,
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -44,6 +53,27 @@ export default {
|
|
|
setNavHeight(navHeight){
|
|
|
this.navHeight=navHeight
|
|
|
},
|
|
|
+ close(){
|
|
|
+ this.isPop = false;
|
|
|
+ this.$refs.alertDialog.close()
|
|
|
+ },
|
|
|
+ showDel(selectItem,selectIndex){
|
|
|
+ this.selectItem=selectItem
|
|
|
+ this.selectIndex=selectIndex
|
|
|
+ this.$refs.alertDialog.open()
|
|
|
+ },
|
|
|
+ delBlackItem(){
|
|
|
+ delBlackItem(this.selectItem.id).then((res)=>{
|
|
|
+ if(res.code===1){
|
|
|
+ tools.success('取消成功')
|
|
|
+ this.close()
|
|
|
+ this.list.splice(this.selectIndex,1)
|
|
|
+
|
|
|
+ }else {
|
|
|
+ tools.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
startList(){
|
|
|
if(this.userId<=0){
|
|
|
// return false
|