index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="content-box">
  3. <view class="policy-item-box">
  4. <view
  5. v-for="(item, idx) in policyList"
  6. :key="idx"
  7. :class="{ active: active === idx }"
  8. class="policy-item-name"
  9. @click="changePolicyTabs(idx)"
  10. >
  11. {{ item }}
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import md5 from "@/common/md5.js";
  18. export default {
  19. data() {
  20. return {
  21. swiperList: [],
  22. policyList: ["在库", "技改", "在谈"],
  23. active: 0,
  24. policyData: new Array(5).fill({
  25. title:"普汇中金生命科学国际合作中心",
  26. name: "普汇中金国际控股有限公司",
  27. maxMony: "160000(万元)",
  28. }),
  29. };
  30. },
  31. onLoad() {
  32. },
  33. methods: {
  34. enterPolicyDeatil(id) {
  35. uni.navigateTo({
  36. url: "/pages/policy/policy_deatil?id=" + id,
  37. });
  38. },
  39. changePolicyTabs(idx) {
  40. let that = this;
  41. that.active = idx;
  42. switch (idx) {
  43. case 0:
  44. // that.getPolicyList("2");
  45. break;
  46. case 1:
  47. // that.getPolicyList("3");
  48. break;
  49. case 2:
  50. // that.getPolicyList("4");
  51. break;
  52. case 3:
  53. // that.getPolicyList("5");
  54. break;
  55. }
  56. },
  57. },
  58. };
  59. </script>
  60. <style lang="scss">
  61. .content-box {
  62. display: flex;
  63. flex-direction: column;
  64. flex: 1;
  65. }
  66. .policy-item-box {
  67. display: flex;
  68. justify-content: space-between;
  69. margin: 0 20rpx;
  70. margin-top: 20rpx;
  71. .policy-item-name {
  72. padding-bottom: 10rpx;
  73. font-size: 30rpx;
  74. width: 25%;
  75. text-align: center;
  76. }
  77. .active {
  78. font-weight: 600;
  79. border-bottom: 7rpx solid #02a7f0;
  80. }
  81. }
  82. </style>