Commit b7ca08d7 authored by Davve's avatar Davve

修改star城市必填

parent 01e4d534
...@@ -48,21 +48,18 @@ ...@@ -48,21 +48,18 @@
<el-table-column align="center" label="用户数"> <el-table-column align="center" label="用户数">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="{path: '/user/list/', query: {group_id: scope.row.id}}" class="link-type" v-if="this.adminRole"> <router-link :to="{path: '/user/list/', query: {group_id: scope.row.id}}" class="link-type">
<span>{{ scope.row.user_nums }}</span> <span>{{ scope.row.user_nums }}</span>
</router-link> </router-link>
<span v-else>{{ scope.row.user_nums }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="帖子数"> <el-table-column align="center" label="帖子数">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="{path: '/topic/list/', query: {group_id: scope.row.id}}" class="link-type" v-if="this.adminRole"> <router-link :to="{path: '/topic/list/', query: {group_id: scope.row.id}}" class="link-type">
<span>{{ scope.row.topic_nums }}</span> <span>{{ scope.row.topic_nums }}</span>
</router-link> </router-link>
<span v-else>{{ scope.row.topic_nums }} </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -93,7 +90,6 @@ ...@@ -93,7 +90,6 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'
import { fetchList, OffLineOrOnLine } from '@/api/group' import { fetchList, OffLineOrOnLine } from '@/api/group'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import waves from '@/directive/waves' import waves from '@/directive/waves'
...@@ -111,11 +107,6 @@ export default { ...@@ -111,11 +107,6 @@ export default {
return statusMap[status] return statusMap[status]
} }
}, },
computed: {
...mapGetters([
'roles'
])
},
data() { data() {
return { return {
list: null, list: null,
......
...@@ -292,6 +292,11 @@ ...@@ -292,6 +292,11 @@
this.$refs.postForm.validate(valid => { this.$refs.postForm.validate(valid => {
if (valid) { if (valid) {
this.loading = true this.loading = true
if (this.city == ''){
this.$message.error('城市必填')
this.loading = false
return false
}
this.postForm.groups = JSON.stringify(this.group_ids); this.postForm.groups = JSON.stringify(this.group_ids);
this.postForm.city = this.city this.postForm.city = this.city
starCreate(this.postForm).then(response => { starCreate(this.postForm).then(response => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment