index.jsp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <%--
  2. Created by IntelliJ IDEA.
  3. User: 熊竹
  4. Date: 2017/3/9
  5. Time: 9:53
  6. To change this template use File | Settings | File Templates.
  7. --%>
  8. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  9. <html>
  10. <head>
  11. <jsp:include page="head.jsp"/>
  12. <title>享居屋房源管理系统</title>
  13. </head>
  14. <body>
  15. <jsp:include page="contentBefore.jsp"/>
  16. <jsp:include page="contentAfter.jsp"/>
  17. </body>
  18. <script>
  19. new Vue({
  20. el: '#app',
  21. data: function () {
  22. return {
  23. menu: '',
  24. user: {
  25. id: '',
  26. username: 'admin',
  27. avatar: ''
  28. }
  29. };
  30. },
  31. methods: {
  32. logout: function () {
  33. this.$confirm('确定要注销吗?', '提示', {
  34. confirmButtonText: '确定',
  35. cancelButtonText: '取消',
  36. type: 'info'
  37. }).then(function () {
  38. localStorage.removeItem('user');
  39. this.$router.push({path: '/login'});
  40. }.bind(this))(function (e) {
  41. });
  42. }
  43. }
  44. })
  45. </script>
  46. </html>