index.vue 11 KB

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