|
@@ -62,20 +62,19 @@ export default {
|
|
async search() {
|
|
async search() {
|
|
const res = await this.fetch();
|
|
const res = await this.fetch();
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
- this.$set(this, `form`, res.data);
|
|
|
|
- if (this.form.config) {
|
|
|
|
- this.form = {
|
|
|
|
- ...this.form,
|
|
|
|
- logo: this.form.config.logo,
|
|
|
|
- buyPoint: this.form.config.buyPoint,
|
|
|
|
- pointPlan: this.form.config.pointPlan,
|
|
|
|
- share: this.form.config.share,
|
|
|
|
- autoCloseOrder: this.form.config.autoCloseOrder,
|
|
|
|
|
|
+ let data = res.data;
|
|
|
|
+ if (data.config) {
|
|
|
|
+ data = {
|
|
|
|
+ ...data,
|
|
|
|
+ logo: data.config.logo,
|
|
|
|
+ buyPoint: data.config.buyPoint,
|
|
|
|
+ pointPlan: data.config.pointPlan,
|
|
|
|
+ share: data.config.share,
|
|
|
|
+ autoCloseOrder: data.config.autoCloseOrder,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- if (!this.form.bottom_menu) {
|
|
|
|
- console.log('1');
|
|
|
|
- }
|
|
|
|
|
|
+ if (!data.bottom_menu) data.bottom_menu = {};
|
|
|
|
+ this.$set(this, `form`, data);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async toSave({ data }) {
|
|
async toSave({ data }) {
|