Skip to content

Commit

Permalink
fix:删除多余的代码
Browse files Browse the repository at this point in the history
  • Loading branch information
canace committed Feb 15, 2020
1 parent 452185d commit c75e7b3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
41 changes: 20 additions & 21 deletions src/views/exitGroup/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,43 @@
</template>

<script>
import { quitGroup } from "../../api";
import { mapState, mapMutations } from "vuex";
import { quitGroup } from '../../api'
import { mapState, mapMutations } from 'vuex'
export default {
name: "exitGroup",
data() {
return {};
name: 'exitGroup',
data () {
return {}
},
computed: {
...mapState(["user_info"])
...mapState(['user_info'])
},
methods: {
...mapMutations({
quitGroupF: "QUIT_GROUP"
quitGroupF: 'QUIT_GROUP'
}),
quit() {
quit () {
quitGroup({
id: this.user_info.user_id
}).then(res => {
console.log(res);
if (res.infoCode === 200 || res.infoCode === "200") {
if (res.infoCode === 200 || res.infoCode === '200') {
this.$message({
message: "退出分组成功!",
type: "success"
});
this.quitGroupF();
message: '退出分组成功!',
type: 'success'
})
this.quitGroupF()
this.$router.push({
path: "/log"
});
path: '/log'
})
} else {
this.$message({
message: "退出分组失败!",
type: "error"
});
message: '退出分组失败!',
type: 'error'
})
}
});
})
}
}
};
}
</script>

<style scoped>
Expand Down
4 changes: 0 additions & 4 deletions src/views/group/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ export default {
computed: {
...mapState(['groups', 'user_info'])
},
created () {
console.log('at group')
console.log('group:', this.group)
},
methods: {
select (val) {
this.activeNumber = val
Expand Down

0 comments on commit c75e7b3

Please sign in to comment.