Commit cb859661 authored by yaya's avatar yaya

feat:会员详情bugfix

parent b3788910
...@@ -157,11 +157,10 @@ export default { ...@@ -157,11 +157,10 @@ export default {
updateOnSale(params) updateOnSale(params)
.then(response => { .then(response => {
this.$notify.success({ this.$notify.success({
message: e ? '上架成功' : '下架成功' message: '操作成功'
}) })
}) })
.catch(response => { .catch(response => {
item.isOnSale = !e
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', { MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
type: 'error' type: 'error'
......
...@@ -173,8 +173,9 @@ ...@@ -173,8 +173,9 @@
<script> <script>
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { fansList, requestUserDetail, updateCollectorPermission, updateAccountState } from '@/api/business/user' import { fansList, requestUserDetail, updateCollectorPermission, updateAccountState } from '@/api/business/user'
import { getSaleList, irregularOff } from '@/api/business/sale' import { getSaleList, irregularOff, updateOnSale } from '@/api/business/sale'
import Line2Hidden from '@/components/line2Hidden' import Line2Hidden from '@/components/line2Hidden'
import { MessageBox } from 'element-ui'
export default { export default {
name: 'UserDetail', name: 'UserDetail',
components: { components: {
...@@ -397,6 +398,21 @@ export default { ...@@ -397,6 +398,21 @@ export default {
this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试') this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试')
}) })
}) })
},
handleSaleSwitch(e, item) {
const params = { id: item.id, isOnSale: e }
updateOnSale(params)
.then(response => {
this.$notify.success({
message: '操作成功'
})
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
} }
} }
} }
......
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