vue 本地数据链接遍历

2018-09-03  本文已影响0人  阳光之城alt
image.png
created(){
            this.remark = ''
            //获取本地存储用户
            this.usarrp();
             if(window.localStorage.getItem('loginUser')){ 
                //获取用户信息
                this.usId = JSON.parse(window.localStorage.getItem('loginUser')).FID;
                console.log("this.userId"+this.usId)
                }
                
                this.use ={user_id:this.usId}
                this.$store.dispatch('setOrdezhu',this.use); //请求成功刷新群组

        },


  //公共循环方法
             gongg(){
                 let _this = this;
                 this.shenduarr=[...this.sesyonghu]
                 this.ypkl.forEach((val,key)=>{
                 this.shenduarr.forEach((di,index)=>{
                        if(val.FID==di.FID){
                            _this.shenduarr.splice(index,1)
                        }
                    })
                 })
                this.arrName=this.shenduarr
             },


上一篇下一篇

猜你喜欢

热点阅读