index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <div class="industrialPolicy">
  3. <div class="peripheralBody">
  4. <van-tabs :active="active" @change="onChange">
  5. <van-tab title="全部" :name="0"></van-tab>
  6. <van-tab title="大类" :name="1" v-for="(item,index) in typeList"></van-tab>
  7. </van-tabs>
  8. <div class="peripheralBox">
  9. <div class="peripheralItem" v-for="item in peripheralList" @tap="toDetail(item)">
  10. <span class="peripheralName">{{item.name}}</span>
  11. <div class="peripheralItemRow2">2021-03-21 12:00 &nbsp;|&nbsp; 园区管委会</div>
  12. <div class="tagBox">
  13. <span class="periTag" v-for="type in item.type">{{type}}</span>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. import { policyList,getUserLocalStorageInfo,policyListAll } from "@/js_sdk/http.js";
  22. export default {
  23. name: "peripheralService",
  24. data(){
  25. return{
  26. active: 0,
  27. peripheralList:[
  28. {name:'关于入住企业规模发展奖励',type:['小类','大类']},
  29. {name:'关于入住企业规模发展奖励',type:['小类','大类']},
  30. ],
  31. typeList:[],
  32. userId:getUserLocalStorageInfo().userId
  33. }
  34. },
  35. mounted() {
  36. this.getList()
  37. },
  38. methods:{
  39. onChange(e) {
  40. console.log(e)
  41. },
  42. getList(){
  43. policyListAll().then(res=>{
  44. this.typeList = res.data
  45. console.log(this.typeList,'11111')
  46. })
  47. // policyList({userId:this.userId}).then(res=>{
  48. //
  49. // })
  50. },
  51. toDetail(item) {
  52. uni.navigateTo({
  53. url:'/pages/subPackages/industrialPolicy/detail'
  54. })
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang="scss">
  60. .industrialPolicy{
  61. .peripheralBody{
  62. background: white;
  63. margin-top: 24rpx;
  64. padding: 32rpx;
  65. box-sizing: border-box;
  66. height: 1424rpx;
  67. .peripheralBox{
  68. margin-top: 8rpx;
  69. .peripheralItem{
  70. width: 686rpx;
  71. height: 204rpx;
  72. box-sizing: border-box;
  73. border-radius: 16rpx;
  74. background: #F5F7FA;
  75. padding: 32rpx;
  76. margin-top: 24rpx;
  77. .peripheralName{
  78. color:#222222;
  79. font-size: 32rpx;
  80. font-weight: 600;
  81. }
  82. .peripheralItemRow2{
  83. color: #888888;
  84. font-size: 28rpx;
  85. margin-top: 14rpx;
  86. }
  87. .tagBox{
  88. display: flex;
  89. flex-wrap: wrap;
  90. }
  91. .periTag{
  92. display: flex;
  93. align-items: center;
  94. justify-content: center;
  95. width: 92rpx;
  96. height: 48rpx;
  97. background: rgba(3, 101, 249, 0.20);
  98. color: rgba(3, 101, 249, 1);
  99. border-radius: 8rpx;
  100. margin: 16rpx 16rpx 0 0;
  101. font-size: 24rpx;
  102. }
  103. }
  104. }
  105. }
  106. }
  107. </style>