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