feat(recipe mobile): 修改菜谱后弹出成功提示
修改菜谱后弹出成功提示 Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
parent
219e7be4a6
commit
9b115417d3
@ -59,7 +59,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Form, Field, CellGroup, Radio, RadioGroup, Rate, Button } from 'vant';
|
import {
|
||||||
|
Form,
|
||||||
|
Field,
|
||||||
|
CellGroup,
|
||||||
|
Radio,
|
||||||
|
RadioGroup,
|
||||||
|
Rate,
|
||||||
|
Button,
|
||||||
|
Toast,
|
||||||
|
} from 'vant';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import config from '@/config/index';
|
import config from '@/config/index';
|
||||||
import router from '@/router/index';
|
import router from '@/router/index';
|
||||||
@ -118,9 +127,14 @@ export default {
|
|||||||
(response) => (response, router.push({ name: 'RecipeMobileHome' }))
|
(response) => (response, router.push({ name: 'RecipeMobileHome' }))
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
axios
|
axios.put(config.publicPath + '/recipe/recipe/' + recipe_id, data).then(
|
||||||
.put(config.publicPath + '/recipe/recipe/' + recipe_id, data)
|
(Toast.success({
|
||||||
.then((this.loading = false));
|
message: '修改成功',
|
||||||
|
forbidClick: true,
|
||||||
|
duration: 500,
|
||||||
|
}),
|
||||||
|
(this.loading = false))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user