init() { //获取数据 var $this = this; $this.$httpService.getMenuDate().then((res) => { if (res.code == '2000') { this.button = res.data; } }).catch((err) => { Toast({ duration: 1500, message: err.message }); Indicator.close(); }); }, save() { //保存数据 let button = this.button; //ajax保存至后台 let params = { buttonJson: JSON.stringify(button), }; //console.log(JSON.stringify(button)); this.$httpService.createMenu(params).then((res) => { if (res.code == 2000) { Toast({ duration: 1500, message: '保存成功' }); Indicator.close(); } }) }