init
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user