collection.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <template>
  2. <view class="content">
  3. <view class="supply-box">
  4. <view class="supply-item-box">
  5. <view
  6. v-for="(item, idx) in titleList"
  7. :key="idx"
  8. :class="{ active: active === idx }"
  9. class="supply-item-name"
  10. @click="active = idx"
  11. >
  12. {{ item }}
  13. </view>
  14. </view>
  15. <view class="policy-content" v-if="active == 0">
  16. <view
  17. class="policy-content-item"
  18. v-for="(item, idx) in policyData"
  19. :key="idx"
  20. @click="enterPolicyDeatil(item.id)"
  21. >
  22. <view class="policy-content-item-left">
  23. <p class="policy-content-item-left-title" style="height: 70rpx">
  24. {{ item.title }}
  25. </p>
  26. <view class="policy-content-item-left-time">
  27. <p class="moment">{{ item.publish_time | globalTime }}</p>
  28. <p class="maxMony">{{ item.project_money }}</p>
  29. <p class="leftDay">
  30. <!-- {{ item.project_end_date | globalTime || "长期可申报" }} -->
  31. {{ "长期可申报" }}
  32. </p>
  33. </view>
  34. </view>
  35. <view class="policy-content-item-img">
  36. <image :src="item.pic_url" alt="" />
  37. </view>
  38. </view>
  39. </view>
  40. <view class="companys" v-if="active == 1">
  41. <view
  42. class="company"
  43. v-for="(company, index) in companyList"
  44. :key="index"
  45. @tap="toDetail(index)"
  46. >
  47. <view class="title">
  48. <view class="logo">
  49. <img :src="company.logo" alt="" />
  50. </view>
  51. <view class="name">
  52. {{ company.name }}
  53. </view>
  54. </view>
  55. <view class="info">
  56. <view class="view">
  57. <view class="info_t">法定代表人</view>
  58. <view class="name">
  59. {{ company.info.person }}
  60. </view>
  61. </view>
  62. <view class="line"></view>
  63. <view class="view">
  64. <view class="info_t">注册资本</view>
  65. {{ company.info.money }}
  66. </view>
  67. <view class="line"></view>
  68. <view class="view">
  69. <view class="info_t">成立日期</view>
  70. {{ company.info.time }}
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. export default {
  80. data() {
  81. return {
  82. titleList: ["政策", "企业"],
  83. active: 0,
  84. searchVal: "",
  85. policyData: new Array(5).fill({
  86. title:
  87. "工业金额信息化部办公厅 组织开2021念工业互联网平台创新互联网工业文化产业项目征集工作。",
  88. moment: "2021-07-12",
  89. maxMony: "最高500.00万",
  90. leftDay: "剩5天",
  91. img: "/static/policy/u388.jpg",
  92. }),
  93. companyList: new Array(5).fill({
  94. logo: "/static/enterprise/logo.png",
  95. name: "康拓科技有限责任公司",
  96. info: {
  97. person: "马须伦",
  98. money: "1,776,759.3万(元)",
  99. time: "1995-03-25",
  100. },
  101. }),
  102. };
  103. },
  104. onLoad() {},
  105. methods: {
  106. toDetail(index) {
  107. uni.navigateTo({
  108. url: "/pages/enterprise/enterprise_detail?id=" + index,
  109. });
  110. },
  111. enterPolicyDeatil(id) {
  112. uni.navigateTo({
  113. url: "/pages/policy/policy_deatil?id=" + id,
  114. });
  115. },
  116. },
  117. };
  118. </script>
  119. <style lang="scss">
  120. .content {
  121. padding: 4%;
  122. .supply-box {
  123. width: 100%;
  124. display: flex;
  125. flex-direction: column;
  126. .supply-title {
  127. width: 100%;
  128. p {
  129. background-color: #02a7f0;
  130. width: 190rpx;
  131. height: 70rpx;
  132. color: #ffffff;
  133. border-radius: 0 40rpx 40rpx 0rpx;
  134. font-size: 28rpx;
  135. display: flex;
  136. justify-content: center;
  137. align-items: center;
  138. }
  139. }
  140. .supply-item-box {
  141. display: flex;
  142. justify-content: space-evenly;
  143. margin: 0 20rpx;
  144. margin-top: 10rpx;
  145. .supply-item-name {
  146. padding-bottom: 10rpx;
  147. font-size: 27rpx;
  148. }
  149. .active {
  150. font-weight: 600;
  151. border-bottom: 7rpx solid #02a7f0;
  152. }
  153. }
  154. .supply-content {
  155. width: 100%;
  156. display: flex;
  157. box-sizing: border-box;
  158. flex-direction: column;
  159. font-size: 25rpx;
  160. .supplyCard {
  161. display: flex;
  162. width: 92%;
  163. margin: 2% 0;
  164. padding: 2% 4%;
  165. height: 5%;
  166. border-radius: 30rpx;
  167. box-shadow: rgba(100, 100, 111, 0.2) 0rpx 14rpx 50rpx 0rpx;
  168. .image_content {
  169. margin-right: 5%;
  170. image {
  171. width: 100rpx;
  172. height: 100rpx;
  173. border-radius: 20rpx;
  174. background-color: rgb(228, 228, 228);
  175. }
  176. }
  177. .state {
  178. margin-left: 100rpx;
  179. image {
  180. width: 100rpx;
  181. height: 80rpx;
  182. }
  183. }
  184. .info {
  185. display: flex;
  186. flex-flow: column;
  187. justify-content: space-around;
  188. .time {
  189. font-weight: 100;
  190. font-size: 25rpx;
  191. }
  192. }
  193. }
  194. }
  195. }
  196. .policy-content {
  197. width: 100%;
  198. display: flex;
  199. box-sizing: border-box;
  200. flex-direction: column;
  201. margin-top: 10rpx;
  202. .policy-content-item {
  203. margin: 0 20rpx;
  204. display: flex;
  205. overflow: hidden;
  206. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  207. border-radius: 32rpx;
  208. padding-bottom: 10rpx;
  209. margin-top: 20rpx;
  210. padding: 30rpx;
  211. justify-content: space-between;
  212. .policy-content-item-left {
  213. display: flex;
  214. flex-direction: column;
  215. width: 70%;
  216. .policy-content-item-left-title {
  217. text-overflow: -o-ellipsis-lastline;
  218. overflow: hidden;
  219. text-overflow: ellipsis;
  220. display: -webkit-box;
  221. -webkit-line-clamp: 2;
  222. line-clamp: 2;
  223. -webkit-box-orient: vertical;
  224. font-size: 25rpx;
  225. margin-bottom: 10rpx;
  226. }
  227. .policy-content-item-left-time {
  228. width: 100%;
  229. display: flex;
  230. align-items: center;
  231. .moment {
  232. color: #c1c1c1;
  233. font-size: 20rpx;
  234. margin-right: 20rpx;
  235. }
  236. .maxMony {
  237. font-size: 20rpx;
  238. color: #00bfbf;
  239. border: 1px solid #00bfbf;
  240. padding: 10rpx;
  241. margin-right: 20rpx;
  242. border-radius: 12rpx;
  243. }
  244. .leftDay {
  245. font-size: 20rpx;
  246. background: #f7bbc3;
  247. color: #e32579;
  248. padding: 10rpx;
  249. border: 1px solid #f7bbc3;
  250. border-radius: 12rpx;
  251. }
  252. }
  253. }
  254. .policy-content-item-img {
  255. image {
  256. width: 180rpx;
  257. height: 120rpx;
  258. border-radius: 12rpx;
  259. }
  260. }
  261. }
  262. }
  263. .companys {
  264. margin-top: 3%;
  265. padding: 0 4%;
  266. font-size: 30rpx;
  267. .company {
  268. border-radius: 20rpx;
  269. box-shadow: rgba(0, 0, 0, 0.35) 0rpx 5rpx 15rpx;
  270. padding: 1%;
  271. margin: 2% 0;
  272. .title {
  273. display: flex;
  274. align-items: center;
  275. .logo {
  276. image {
  277. width: 100rpx;
  278. height: 70rpx;
  279. margin-right: 30rpx;
  280. }
  281. }
  282. }
  283. .line {
  284. width: 3rpx;
  285. height: 70rpx;
  286. background: rgb(175, 186, 197);
  287. }
  288. .info {
  289. font-size: 19rpx;
  290. font-weight: 100;
  291. display: flex;
  292. text-align: center;
  293. justify-content: space-between;
  294. align-items: center;
  295. padding: 0 2%;
  296. margin-top: 1%;
  297. .view {
  298. margin-top: 2%;
  299. .name {
  300. color: #02a7f0;
  301. }
  302. .info_t {
  303. margin-bottom: 10rpx;
  304. font-size: 25rpx;
  305. }
  306. }
  307. }
  308. }
  309. }
  310. }
  311. </style>