Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mounted () {
- this.openDados() // aqui funciona funciona
- this.socket.emit('find-user', {
- userid: this.id
- }, function (data) {
- this.openDados() // está func que não funciona
- console.log(data)
- if (data.length <= 0) {
- console.log('entrou aqui') // teste e chega aqui
- } else {
- const payload2 = {
- id: data.userid,
- name: data.name,
- display: data.display,
- descript: data.descript,
- avatar: data.avatar
- }
- this.USER(payload2)
- }
- })
- },
- methods: {
- ...mapMutations('config', ['SET_DISPLAY_LEFT']),
- ...mapMutations('user', ['USER']),
- mostrarImagem (imagem) {
- if (imagem !== null) {
- return process.env.API_S3 + '/wbynet/' + imagem
- } else {
- return 'statics/boy-avatar.png'
- }
- },
- openDados () {
- this.openDadosConf = true
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement