|
@@ -4,20 +4,11 @@
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
<span>手机号:</span>
|
|
<span>手机号:</span>
|
|
- <el-input
|
|
|
|
- v-model="listQuery.mobile"
|
|
|
|
- placeholder="手机号"
|
|
|
|
- @keyup.enter.native="getList"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input v-model="listQuery.mobile" placeholder="手机号" @keyup.enter.native="getList" />
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
<span>状态:</span>
|
|
<span>状态:</span>
|
|
- <el-select
|
|
|
|
- v-model="listQuery.status"
|
|
|
|
- placeholder="邀请码状态"
|
|
|
|
- clearable
|
|
|
|
- @change="getList"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-select v-model="listQuery.status" placeholder="邀请码状态" clearable @change="getList">
|
|
<el-option label="全部" value="" />
|
|
<el-option label="全部" value="" />
|
|
<el-option label="已绑定" :value="1" />
|
|
<el-option label="已绑定" :value="1" />
|
|
<el-option label="未绑定" :value="0" />
|
|
<el-option label="未绑定" :value="0" />
|
|
@@ -51,53 +42,69 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="添加时间" width="160px" align="center">
|
|
<el-table-column label="添加时间" width="160px" align="center">
|
|
- <template slot-scope="{row}">
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
<span>{{ row.addTime | formatTime }}</span>
|
|
<span>{{ row.addTime | formatTime }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="微信昵称" align="center">
|
|
<el-table-column label="微信昵称" align="center">
|
|
- <template slot-scope="{row}">
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
<span v-if="row.nickName">{{ row.nickName }}</span>
|
|
<span v-if="row.nickName">{{ row.nickName }}</span>
|
|
<span v-else>—</span>
|
|
<span v-else>—</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="手机号" width="140" align="center">
|
|
<el-table-column label="手机号" width="140" align="center">
|
|
- <template slot-scope="{row}">
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
<span v-if="row.mobile">{{ row.mobile }}</span>
|
|
<span v-if="row.mobile">{{ row.mobile }}</span>
|
|
<span v-else>—</span>
|
|
<span v-else>—</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="openID" width="280" align="center">
|
|
<el-table-column label="openID" width="280" align="center">
|
|
- <template slot-scope="{row}">
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
<span v-if="row.openId">{{ row.openId }}</span>
|
|
<span v-if="row.openId">{{ row.openId }}</span>
|
|
<span v-else>—</span>
|
|
<span v-else>—</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="绑定时间" width="160px" align="center">
|
|
<el-table-column label="绑定时间" width="160px" align="center">
|
|
- <template slot-scope="{row}">
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
<span v-if="row.bindTime">{{ row.bindTime | formatTime }}</span>
|
|
<span v-if="row.bindTime">{{ row.bindTime | formatTime }}</span>
|
|
<span v-else>—</span>
|
|
<span v-else>—</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="200px" align="center">
|
|
<el-table-column label="操作" width="200px" align="center">
|
|
- <template slot-scope="{row}">
|
|
|
|
- <permission-button v-if="row.status === 1" type="danger" size="mini" style="margin-right:12px" @click="handleUnbindGenerate(row)">解绑邀请码</permission-button>
|
|
|
|
- <permission-button v-else type="primary" size="mini" style="margin-right:12px" @click="handleUpdateGenerate(row)">更新邀请码</permission-button>
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <permission-button
|
|
|
|
+ v-if="row.status === 1"
|
|
|
|
+ type="danger"
|
|
|
|
+ size="mini"
|
|
|
|
+ style="margin-right: 12px"
|
|
|
|
+ @click="handleUnbindGenerate(row)"
|
|
|
|
+ >解绑邀请码</permission-button>
|
|
|
|
+ <permission-button
|
|
|
|
+ v-else
|
|
|
|
+ type="primary"
|
|
|
|
+ size="mini"
|
|
|
|
+ style="margin-right: 12px"
|
|
|
|
+ @click="handleUpdateGenerate(row)"
|
|
|
|
+ >更新邀请码</permission-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 表格区域END -->
|
|
<!-- 表格区域END -->
|
|
- <pagination :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList(listQuery)" />
|
|
|
|
|
|
+ <pagination
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="listQuery.pageNum"
|
|
|
|
+ :limit.sync="listQuery.pageSize"
|
|
|
|
+ @pagination="getList(listQuery)"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import PermissionButton from '@/views/components/PermissionButton'
|
|
import PermissionButton from '@/views/components/PermissionButton'
|
|
-import Pagination from '@/components/Pagination' // secondary package based on el-pagination
|
|
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import { getAuthUserList, makeGenerate, unbindGenerate, updateGenerate } from '@/api/auth'
|
|
import { getAuthUserList, makeGenerate, unbindGenerate, updateGenerate } from '@/api/auth'
|
|
export default {
|
|
export default {
|
|
- components: { Pagination, PermissionButton },
|
|
|
|
|
|
+ components: { PermissionButton },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
total: 0,
|
|
total: 0,
|
|
@@ -127,7 +134,7 @@ export default {
|
|
this.listLoading = true
|
|
this.listLoading = true
|
|
this.listQuery.authId = this.authId
|
|
this.listQuery.authId = this.authId
|
|
getAuthUserList(this.listQuery)
|
|
getAuthUserList(this.listQuery)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
if (res.code !== 0) return
|
|
if (res.code !== 0) return
|
|
this.list = res.data.list
|
|
this.list = res.data.list
|
|
this.total = res.data.total
|
|
this.total = res.data.total
|
|
@@ -139,45 +146,42 @@ export default {
|
|
},
|
|
},
|
|
// 生成邀请码
|
|
// 生成邀请码
|
|
handleMakeGenerate() {
|
|
handleMakeGenerate() {
|
|
- makeGenerate({ authId: this.authId })
|
|
|
|
- .then(res => {
|
|
|
|
- console.log(res)
|
|
|
|
- if (res.code !== 0) return
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: res.data,
|
|
|
|
- duration: 500
|
|
|
|
- })
|
|
|
|
- this.getList()
|
|
|
|
|
|
+ makeGenerate({ authId: this.authId }).then((res) => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (res.code !== 0) return
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: res.data,
|
|
|
|
+ duration: 500
|
|
})
|
|
})
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 更新邀请码
|
|
// 更新邀请码
|
|
handleUpdateGenerate(row) {
|
|
handleUpdateGenerate(row) {
|
|
- updateGenerate({ clubUserId: row.clubUserId })
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.code !== 0) return
|
|
|
|
- console.log(res)
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: res.data,
|
|
|
|
- duration: 500
|
|
|
|
- })
|
|
|
|
- this.getList()
|
|
|
|
|
|
+ updateGenerate({ clubUserId: row.clubUserId }).then((res) => {
|
|
|
|
+ if (res.code !== 0) return
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: res.data,
|
|
|
|
+ duration: 500
|
|
})
|
|
})
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 解绑邀请码
|
|
// 解绑邀请码
|
|
handleUnbindGenerate(row) {
|
|
handleUnbindGenerate(row) {
|
|
- unbindGenerate({ clubUserId: row.clubUserId })
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.code !== 0) return
|
|
|
|
- console.log(res)
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: res.data,
|
|
|
|
- duration: 500
|
|
|
|
- })
|
|
|
|
- this.getList()
|
|
|
|
|
|
+ unbindGenerate({ clubUserId: row.clubUserId }).then((res) => {
|
|
|
|
+ if (res.code !== 0) return
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: res.data,
|
|
|
|
+ duration: 500
|
|
})
|
|
})
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
},
|
|
},
|
|
indexMethod(index) {
|
|
indexMethod(index) {
|
|
return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
|
|
return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
|
|
@@ -190,7 +194,7 @@ export default {
|
|
.el-table .cell {
|
|
.el-table .cell {
|
|
overflow: visible;
|
|
overflow: visible;
|
|
}
|
|
}
|
|
-.el-badge{
|
|
|
|
|
|
+.el-badge {
|
|
margin: 0 6px;
|
|
margin: 0 6px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|