Commit c4c8f607 authored by liwenhong's avatar liwenhong

add:审核通过后,隐藏按钮并返回列表

parent de923376
...@@ -60,11 +60,12 @@ ...@@ -60,11 +60,12 @@
@click="handleBlackList('黑名单')" @click="handleBlackList('黑名单')"
>黑名单</el-button >黑名单</el-button
> >
<!-- <el-button <el-button
size="small" size="small"
@click="handleBlackList('白名单')" v-if="showBackBtn"
>白名单</el-button @click="$router.go(-1)"
> --> >返回</el-button
>
</div> </div>
</div> </div>
</template> </template>
...@@ -104,6 +105,7 @@ export default { ...@@ -104,6 +105,7 @@ export default {
// constants // constants
TABS, TABS,
showBackBtn: false, //操作成功后展示返回按钮
}; };
}, },
async created() { async created() {
...@@ -149,19 +151,19 @@ export default { ...@@ -149,19 +151,19 @@ export default {
}); });
}) })
.catch(async () => { .catch(async () => {
try { const res = await urlObj[action](params);
const res = await urlObj[action](params); if(+res.code === 0) {
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功", message: "操作成功",
}); });
console.log(res); this.showBackBtn = false;
} catch (error) { } else {
this.$message({ this.$message({
type: "error", type: "error",
message: "请求操作失败", message: res.reason,
}); });
} }
}); });
}, },
......
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