This commit is contained in:
77
2024-05-13 00:48:08 +08:00
parent 660fc954eb
commit 6ff0a81561
2 changed files with 27 additions and 26 deletions

View File

@@ -239,30 +239,32 @@ export default {
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
addActivityShop({
...this.form,
cityCode: this.getCode(this.form.cityCode),
}).then(data => {
this.$modal.msgSuccess("新增成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}else{
updateActivityShop({
...this.form,
cityCode: this.getCode(this.form.cityCode),
}).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
if(this.form.id){
updateActivityShop({
...this.form,
cityCode: this.getCode(this.form.cityCode),
}).then(data => {
this.$modal.msgSuccess("修改成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}else{
this.buttonLoading = true;
addActivityShop({
...this.form,
cityCode: this.getCode(this.form.cityCode),
}).then(data => {
this.$modal.msgSuccess("新增成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
}
})
},

View File

@@ -53,8 +53,7 @@
<script>
import { enableStatusList } from '@/constant/statusMap'
import { getTreeAreaCode } from '@/api/xq/areaCode'
import { addActivityShop, getActivityShop, updateActivityShop, updateActivityShopUser } from '@/api/xq/activityShop'
import { addBanner, getBanner } from '@/api/xq/banner'
import { getActivityShop, updateActivityShopUser } from '@/api/xq/activityShop'
export default {
components: {