index.js 524 B

1234567891011121314151617181920212223242526272829303132
  1. toastr.options = {
  2. "closeButton": true,
  3. "positionClass": "toast-top-center"
  4. }
  5. function showSuccessMessage(msg) {
  6. toastr.success(msg)
  7. }
  8. function showErrorMessage(msg) {
  9. toastr.error(msg)
  10. }
  11. function showWarningMessage(msg) {
  12. toastr.warning(msg)
  13. }
  14. new Vue({
  15. el: '#wrapper',
  16. data: {
  17. },
  18. created: function() {
  19. homeAPI.baseinfo().then(function(res) {
  20. if(res.status == 200) {
  21. var infoStr = JSON.stringify(res.data);
  22. localStorage.setItem("docInfo", infoStr);
  23. }
  24. })
  25. }
  26. })