Commit 001b8ddb by chenwq

商品管理-loading

1 parent 9be7e5f1
......@@ -5,7 +5,7 @@
<el-tab-pane label="基本信息" name="basicInfo"></el-tab-pane>
<el-tab-pane label="评价信息" name="afterOrder"></el-tab-pane>
</el-tabs>
<div v-show="routeInfo.addOrEdit == '1' || (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')" class="container edit-container">
<div v-show="routeInfo.addOrEdit == '1' || (['2', '3'].includes(routeInfo.addOrEdit + '') && activeName == 'basicInfo')" v-loading="loading" class="container edit-container">
<div class="flex">
<div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index">
......@@ -323,6 +323,7 @@ export default {
name: 'editProduct',
data() {
return {
loading: false,
dialogTableVisible: false,
associationRadio: '',
templateSelection: [],
......@@ -1564,15 +1565,21 @@ export default {
deleteAttrList.forEach(item => {
delete params[item]
})
this.$apis.proManage.insertOrUpdateProApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
this.loading = true
this.$apis.proManage
.insertOrUpdateProApi(params)
.then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.cancelJump()
}
})
.finally(() => {
this.loading = false
})
if (res.code == '0') {
this.cancelJump()
}
})
},
cancelJump() {
this.$router.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!