index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <template>
  2. <view class="main">
  3. <!--轮播图-->
  4. <view class="banner">
  5. <u-swiper circular :radius="5" :indicator="true" keyName="pic" :list="bannerList" :height="160" class="uni-swiper" @click="bannerClick"></u-swiper>
  6. </view>
  7. <!--通知公告-->
  8. <view class="notice">
  9. <u-notice-bar color="#545555" :text="noticeList" :step="true" direction="column" mode="link" bgColor="white" speed="300" url="/pages/notice/index"></u-notice-bar>
  10. </view>
  11. <!--菜单-->
  12. <view class="menu">
  13. <view class="cd" @click="open('就业失业登记')">
  14. <view class="out">
  15. <view class="int">
  16. <view class="icon" style="background-color: #f44336">&#xe648;</view>
  17. <view class="title">就业失业登记</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="cd" @click="open('就业创业补贴')">
  22. <view class="out">
  23. <view class="int">
  24. <view class="icon" style="background-color: #4caf50">&#xe64a;</view>
  25. <view class="title">就业创业补贴</view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="cd" @click="open('法务服务')">
  30. <view class="out">
  31. <view class="int">
  32. <view class="icon" style="background-color: #607d8b">&#xe998;</view>
  33. <view class="title">法务服务</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="cd" @click="open('社保窗口')">
  38. <view class="out">
  39. <view class="int">
  40. <view class="icon" style="background-color: #795548">&#xe6a6;</view>
  41. <view class="title">社保窗口</view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="cd" @click="go('/pages/job/map')">
  46. <view class="out">
  47. <view class="int">
  48. <view class="icon" style="background-color: #f44336">&#xe647;</view>
  49. <view class="title">地图找工</view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="cd" @click="go('/pages/job/list?type=0')">
  54. <view class="out">
  55. <view class="int">
  56. <view class="icon" style="background-color: #4581fb">&#xe9d9;</view>
  57. <view class="title">全职</view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="cd" @click="go('/pages/job/list?type=1')">
  62. <view class="out">
  63. <view class="int">
  64. <view class="icon" style="background-color: #ff5722">&#xe62a;</view>
  65. <view class="title">兼职</view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="cd" @click="go('/pages/job/enterprise/card')">
  70. <view class="out">
  71. <view class="int">
  72. <view class="icon" style="background-color: #ff9800">&#xe725;</view>
  73. <view class="title">企业卡片</view>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="cd" @click="go('/pages/statement/index/index')">
  78. <view class="out">
  79. <view class="int">
  80. <view class="icon" style="background-color: #03a9f4">&#xe63c;</view>
  81. <view class="title">结算广场</view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. <view v-if="platform.openNews == 0">
  87. <!--新闻-->
  88. <view class="news">
  89. <view class="gg">
  90. <view class="title">最新资讯</view>
  91. <view class="bor"></view>
  92. <view class="more" @click="go('/pages/news/index?type=新闻资讯')">
  93. <text>更多</text>
  94. <text class="icon">&#xe62b;</text>
  95. </view>
  96. </view>
  97. <view class="bhe" :style="{ height: expand ? 'auto' : '60px' }">
  98. <view class="item" v-for="(item, index) in newsList" :key="index" @click="go('/pages/news/detail?id=' + item.id)">
  99. <view class="title omit">{{ item.title }}</view>
  100. <view class="date">{{ item.createTime.substring(5, 10) }}</view>
  101. </view>
  102. </view>
  103. <view class="expand" @click="expand = !expand">
  104. <text class="icon" v-if="expand">&#xe61c;</text>
  105. <text class="icon" v-else>&#xe617;</text>
  106. <text>{{ expand ? '收起' : '展开' }}</text>
  107. </view>
  108. </view>
  109. <!--横幅-->
  110. <image :src="img.a1" class="hengfu" @click="go('/pages/news/index?type=政策专题')"></image>
  111. <!--图片内容-->
  112. <view class="ad" style="margin-left: -10px; margin-right: -10px">
  113. <view class="item" style="height: 190px">
  114. <view class="out" style="padding-right: 0px" @click="go('/pages/news/index?type=就业政策')">
  115. <view class="int" style="height: 175px; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2)">
  116. <image :src="img.a2" style="height: 180px; width: 100%"></image>
  117. </view>
  118. </view>
  119. </view>
  120. <view class="item" style="height: 190px">
  121. <view class="out">
  122. <view class="int">
  123. <view class="it" style="height: 80px" @click="go('/pages/news/index?type=人才政策')">
  124. <image :src="img.a3" mode="aspectFill" style="height: 85px; width: 100%"></image>
  125. </view>
  126. <view class="it" style="height: 86px; margin-top: 10px" @click="go('/pages/news/index?type=创业政策')">
  127. <image :src="img.a4" mode="aspectFill" style="height: 83px; width: 100%"></image>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <u-action-sheet :title="title" round="20" :actions="actions" @select="selectClick" cancelText="取消" :show="show" @close="show = false"></u-action-sheet>
  135. </view>
  136. </template>
  137. <script>
  138. export default {
  139. data() {
  140. return {
  141. title: '就业失业登记',
  142. actions: [],
  143. img: {
  144. a1: 'https://chenglantimes.com/prod-api/profile/upload/2024/06/15/1718439518187.jpg',
  145. a2: 'https://chenglantimes.com/prod-api/profile/upload/2024/05/20/1716197779982.jpg',
  146. a3: 'https://chenglantimes.com/prod-api/profile/upload/2024/05/20/1716195826603.jpg',
  147. a4: 'https://chenglantimes.com/prod-api/profile/upload/2024/05/20/1716198212203.jpg'
  148. },
  149. bannerList: [],
  150. noticeList: [],
  151. newsList: [],
  152. expand: false,
  153. show: false,
  154. platform: { openNews: 1 }
  155. };
  156. },
  157. onLoad() {
  158. this.getData();
  159. },
  160. methods: {
  161. getData() {
  162. //轮播图
  163. this.http.request({
  164. url: '/app/home/banner/1',
  165. success: (res) => {
  166. this.bannerList = res.data.data;
  167. }
  168. });
  169. //通知公告
  170. this.http.request({
  171. url: '/app/home/notice/小程序通知',
  172. success: (res) => {
  173. res.data.data.forEach((item) => {
  174. this.noticeList.push(item.title);
  175. });
  176. }
  177. });
  178. //资讯
  179. this.http.request({
  180. url: '/app/home/news',
  181. success: (res) => {
  182. this.newsList = res.data.data;
  183. }
  184. });
  185. //平台信息
  186. this.http.request({
  187. url: '/app/common/getPlatform',
  188. success: (res) => {
  189. this.platform = res.data.data;
  190. }
  191. });
  192. },
  193. open(title) {
  194. this.title = title;
  195. this.show = true;
  196. if (title == '就业失业登记') {
  197. this.actions = [
  198. { name: '就业登记', url: 'https://chenglantimes.com/a1' },
  199. { name: '失业登记', url: 'https://chenglantimes.com/a2' }
  200. ];
  201. }
  202. if (title == '就业创业补贴') {
  203. this.actions = [
  204. { name: '返乡入乡创业人员一次性创业扶持补贴', url: 'https://chenglantimes.com/a3' },
  205. { name: '困难人员灵活就业社保补贴', url: 'https://chenglantimes.com/a4' },
  206. { name: '毕业生灵活就业社保补贴', url: 'https://chenglantimes.com/a5' },
  207. { name: '一次性创业扶持补贴', url: 'https://chenglantimes.com/a6' },
  208. { name: '高校毕业生求职创业补贴', url: 'https://chenglantimes.com/a7' }
  209. ];
  210. }
  211. if (title == '法务服务') {
  212. this.actions = [
  213. { name: '劳动维权申请', url: 'https://chenglantimes.com/4a1' },
  214. { name: '劳动监察投诉', url: 'https://chenglantimes.com/4a2' },
  215. { name: '劳动监察举报', url: 'https://chenglantimes.com/4a3' },
  216. { name: '劳动监察登记查询', url: 'https://chenglantimes.com/4a4' },
  217. { name: '劳动人事仲裁申请', url: 'https://chenglantimes.com/4a5' },
  218. { name: '劳动人事调解申请', url: 'https://chenglantimes.com/4a6' }
  219. ];
  220. }
  221. if (title == '社保窗口') {
  222. this.actions = [
  223. { name: '养老保险待遇发放账户维护申请', url: 'https://chenglantimes.com/6a1' },
  224. { name: '转移查询', url: 'https://chenglantimes.com/6a2' },
  225. { name: '养老待遇发放查询', url: 'https://chenglantimes.com/6a3' }
  226. ];
  227. }
  228. },
  229. selectClick(e) {
  230. uni.navigateTo({
  231. url: '/pages/other/webview?src=' + e.url
  232. });
  233. },
  234. //点击轮播图
  235. bannerClick(index) {
  236. let item = this.bannerList[index];
  237. if (item.contentType == '新闻资讯') {
  238. uni.navigateTo({ url: '/pages/news/detail?id=' + item.contentId });
  239. }
  240. if (item.contentType == '通知公告') {
  241. uni.navigateTo({ url: '/pages/notice/detail?id=' + item.contentId });
  242. }
  243. if (item.contentType == '工作职位') {
  244. uni.navigateTo({ url: '/pages/job/detail?id=' + item.contentId });
  245. }
  246. },
  247. go(url) {
  248. uni.navigateTo({ url: url });
  249. }
  250. },
  251. //下拉刷新
  252. onPullDownRefresh() {
  253. setTimeout(() => {
  254. this.getData();
  255. uni.stopPullDownRefresh();
  256. }, 1000);
  257. }
  258. };
  259. </script>
  260. <style lang="scss">
  261. .banner {
  262. margin-top: -10px;
  263. }
  264. .notice {
  265. margin-top: 10px;
  266. border-radius: 5px;
  267. overflow: hidden;
  268. box-shadow: $box-shadow;
  269. }
  270. .news {
  271. margin-top: 10px;
  272. background-color: white;
  273. border-radius: 7px;
  274. overflow: hidden;
  275. padding: 12px;
  276. box-shadow: $box-shadow;
  277. .gg {
  278. font-weight: bold;
  279. margin-bottom: 5px;
  280. border-bottom: 1px solid $line;
  281. padding-bottom: 10px;
  282. color: $font-c;
  283. .title {
  284. margin-left: 10px;
  285. }
  286. .bor {
  287. width: 5px;
  288. height: 12px;
  289. background-color: $main-color;
  290. border-radius: 20px;
  291. float: left;
  292. margin-top: -16px;
  293. }
  294. .more {
  295. float: right;
  296. font-size: 14px;
  297. font-weight: normal;
  298. margin-top: -20px;
  299. }
  300. }
  301. .bhe {
  302. height: 60px;
  303. overflow: hidden;
  304. .item {
  305. padding-top: 9px;
  306. font-size: 15px;
  307. overflow: hidden;
  308. .title {
  309. float: left;
  310. width: 80%;
  311. }
  312. .date {
  313. float: right;
  314. }
  315. }
  316. }
  317. .expand {
  318. text-align: center;
  319. font-size: 15px;
  320. color: $font-c;
  321. padding-top: 10px;
  322. .icon {
  323. padding-right: 3px;
  324. }
  325. }
  326. }
  327. .hengfu {
  328. height: 100px;
  329. width: 100%;
  330. border-radius: 7px;
  331. margin-top: 10px;
  332. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2);
  333. }
  334. .ad {
  335. .item {
  336. float: left;
  337. width: 50%;
  338. overflow: hidden;
  339. .out {
  340. padding: 7px 10px 5px 10px;
  341. .int {
  342. overflow: hidden;
  343. border-radius: 7px;
  344. image {
  345. border-radius: 7px;
  346. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2);
  347. }
  348. }
  349. }
  350. }
  351. .it {
  352. overflow: hidden;
  353. border-radius: 7px;
  354. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2);
  355. }
  356. }
  357. </style>