示例#1
0
 .then(res => {
   if (!res.data) {
     return api.post('users', {
       username: this.user,
       name: this.user,
       stores: [],
       filters: []
     });
   } else {
     return res;
   }
 })
示例#2
0
  handleSubmit(storeData) {
    api.post('stores', storeData)
      .then((res) => {
        console.log(res);
        return this.callback();
      })
      .catch((error) => {
        console.log(error);
      });

    this.handleClose();
  }
示例#3
0
  handleSubmit(adData) {
    api.post('marketing/ads', adData)
      .then((res) => {
        console.log(res);
        return this.callback();
      })
      .catch((error) => {
        console.log(error);
      });

    this.handleClose();
  }