history.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template name="history">
  2. <view>
  3. <!-- 其他页面内容 -->
  4. <Historymodel :showColum="showColum"></Historymodel>
  5. </view>
  6. </template>
  7. <script>
  8. import Historymodel from "../history/Historymodel.vue";
  9. import api from "@/api/api";
  10. export default {
  11. components: {
  12. Historymodel,
  13. },
  14. name: "history",
  15. watch: {},
  16. data() {
  17. return {
  18. showColum: {},
  19. };
  20. },
  21. methods: {
  22. getShowColum() {
  23. new Promise((resolve, reject) => {
  24. api
  25. .getShowColum({})
  26. .then((response) => {
  27. if (response.data.code == 200) {
  28. var showlist = response.data.result;
  29. this.$store.commit("SET_SHOWCOLUM", showlist);
  30. this.showColum = showlist;
  31. } else {
  32. resolve(response);
  33. }
  34. })
  35. .catch((error) => {
  36. console.log("catch===>response", response);
  37. reject(error);
  38. });
  39. });
  40. },
  41. },
  42. created() {
  43. this.getShowColum();
  44. },
  45. onLoad() {},
  46. };
  47. </script>
  48. <style scoped>
  49. .cu-list.grid > .cu-item {
  50. padding: 0px 0px;
  51. }
  52. .line2-icon {
  53. width: 60px;
  54. height: 60px;
  55. }
  56. .tab-bar {
  57. display: flex;
  58. justify-content: space-around;
  59. padding: 10px;
  60. background-color: #eee;
  61. }
  62. .tab-bar view {
  63. flex: 1;
  64. text-align: center;
  65. padding: 10px;
  66. border-radius: 5px;
  67. cursor: pointer;
  68. }
  69. .tab-bar view.active {
  70. background-color: #007bff;
  71. color: #fff;
  72. }
  73. </style>