init
This commit is contained in:
@@ -239,30 +239,32 @@ export default {
|
|||||||
submitForm () {
|
submitForm () {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.buttonLoading = true;
|
if(this.form.id){
|
||||||
addActivityShop({
|
updateActivityShop({
|
||||||
...this.form,
|
...this.form,
|
||||||
cityCode: this.getCode(this.form.cityCode),
|
cityCode: this.getCode(this.form.cityCode),
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
this.open = false
|
this.open = false
|
||||||
this.$emit('refreshDataList')
|
this.$emit('refreshDataList')
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
updateActivityShop({
|
this.buttonLoading = true;
|
||||||
...this.form,
|
addActivityShop({
|
||||||
cityCode: this.getCode(this.form.cityCode),
|
...this.form,
|
||||||
}).then(data => {
|
cityCode: this.getCode(this.form.cityCode),
|
||||||
this.$modal.msgSuccess("修改成功");
|
}).then(data => {
|
||||||
this.buttonLoading = false;
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false
|
this.buttonLoading = false;
|
||||||
this.$emit('refreshDataList')
|
this.open = false
|
||||||
}).finally(() => {
|
this.$emit('refreshDataList')
|
||||||
this.buttonLoading = false;
|
}).finally(() => {
|
||||||
});
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -53,8 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { enableStatusList } from '@/constant/statusMap'
|
import { enableStatusList } from '@/constant/statusMap'
|
||||||
import { getTreeAreaCode } from '@/api/xq/areaCode'
|
import { getTreeAreaCode } from '@/api/xq/areaCode'
|
||||||
import { addActivityShop, getActivityShop, updateActivityShop, updateActivityShopUser } from '@/api/xq/activityShop'
|
import { getActivityShop, updateActivityShopUser } from '@/api/xq/activityShop'
|
||||||
import { addBanner, getBanner } from '@/api/xq/banner'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
Reference in New Issue
Block a user