index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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" @click="go('/pages/other/webview?src=https://chenglantimes.com/a1')">
  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: '就业链接', url: 'https://chenglantimes.com/nn/self_employmentApplication.html?applySrc=31' },
  197. { name: '失业链接', url: 'https://chenglantimes.com/nn/unemploymentApplication.html?applySrc=31' }
  198. ];
  199. }
  200. if (title == '就业创业补贴') {
  201. this.urls = [
  202. { name: '返乡入乡创业人员一次性创业扶持补贴', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/returnHomeOneTimeSupport/view/returnHomeOneTimeSupport.html?applySrc=31' },
  203. { name: '困难人员灵活就业社保补贴', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/jiuyeView/views/knrylhjysbbt.html?applySrc=31' },
  204. { name: '毕业生灵活就业社保补贴', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/jiuyeView/views/byslhjysbbt.html?applySrc=31' },
  205. { name: '一次性创业扶持补贴', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/onetimesupport/view/onetimesupport.html?applySrc=31' },
  206. { name: '高校毕业生求职创业补贴', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/jiuyeView/views/graduatesubsidy.html?applySrc=31' }
  207. ];
  208. }
  209. if (title == '法务服务') {
  210. this.urls = [
  211. { name: '劳动维权申请', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/laodongweiquanSQ/views/LDWQSQ01.html?applySrc=31' },
  212. { name: '劳动监察投诉', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/laodongweiquanSQ/views/LDWQSQ01.html?applySrc=31' },
  213. { name: '劳动监察举报', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/laodongweiquanSQ/views/LDWQSQ01.html?applySrc=31' },
  214. { name: '劳动监察登记查询', url: 'https://ggfw.nn12333.com:8081/wechat/html/laodongbaozhangView/views/caseProgress.html' },
  215. { name: '劳动人事仲裁申请', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/laodongweiquanSQ/views/LDWQSQ01.html?applySrc=31' },
  216. { name: '劳动人事调解申请', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/laodongweiquanSQ/views/LDWQSQ01.html?applySrc=31' }
  217. ];
  218. }
  219. if (title == '社保窗口') {
  220. this.urls = [
  221. { name: '养老保险待遇发放账户维护申请', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/materialApply/view/ylbxdyffMainPage.html?applySrc=31' },
  222. { name: '转移查询', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/laodongweiquanSQ/views/LDWQSQ01.html?applySrc=31' },
  223. { name: '养老待遇发放查询', url: 'https://ggfw.nn12333.com:8081/gx/wechat/html/yanglaoView/yanglaodyff.html?applySrc=31' }
  224. ];
  225. }
  226. },
  227. selectClick(e) {
  228. console.log("asd:"+JSON.stringify(e));
  229. uni.navigateTo({
  230. url: '/pages/other/webview?src=' + e.url
  231. });
  232. },
  233. //点击轮播图
  234. bannerClick(index) {
  235. let item = this.bannerList[index];
  236. if (item.contentType == '新闻资讯') {
  237. uni.navigateTo({ url: '/pages/news/detail?id=' + item.contentId });
  238. }
  239. if (item.contentType == '通知公告') {
  240. uni.navigateTo({ url: '/pages/notice/detail?id=' + item.contentId });
  241. }
  242. if (item.contentType == '工作职位') {
  243. uni.navigateTo({ url: '/pages/job/detail?id=' + item.contentId });
  244. }
  245. },
  246. go(url) {
  247. uni.navigateTo({ url: url });
  248. }
  249. }
  250. };
  251. </script>
  252. <style lang="scss">
  253. .banner {
  254. margin-top: -10px;
  255. }
  256. .notice {
  257. margin-top: 10px;
  258. border-radius: 5px;
  259. overflow: hidden;
  260. box-shadow: $box-shadow;
  261. }
  262. .news {
  263. margin-top: 10px;
  264. background-color: white;
  265. border-radius: 7px;
  266. overflow: hidden;
  267. padding: 12px;
  268. box-shadow: $box-shadow;
  269. .gg {
  270. font-weight: bold;
  271. margin-bottom: 5px;
  272. border-bottom: 1px solid $line;
  273. padding-bottom: 10px;
  274. color: $font-c;
  275. .title {
  276. margin-left: 10px;
  277. }
  278. .bor {
  279. width: 5px;
  280. height: 12px;
  281. background-color: $main-color;
  282. border-radius: 20px;
  283. float: left;
  284. margin-top: -16px;
  285. }
  286. .more {
  287. float: right;
  288. font-size: 14px;
  289. font-weight: normal;
  290. margin-top: -20px;
  291. }
  292. }
  293. .bhe {
  294. height: 60px;
  295. overflow: hidden;
  296. .item {
  297. padding-top: 9px;
  298. font-size: 15px;
  299. overflow: hidden;
  300. .title {
  301. float: left;
  302. width: 80%;
  303. }
  304. .date {
  305. float: right;
  306. }
  307. }
  308. }
  309. .expand {
  310. text-align: center;
  311. font-size: 15px;
  312. color: $font-c;
  313. padding-top: 10px;
  314. .icon {
  315. padding-right: 3px;
  316. }
  317. }
  318. }
  319. .hengfu {
  320. height: 100px;
  321. width: 100%;
  322. border-radius: 7px;
  323. margin-top: 10px;
  324. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2);
  325. }
  326. .ad {
  327. .item {
  328. float: left;
  329. width: 50%;
  330. overflow: hidden;
  331. .out {
  332. padding: 7px 10px 5px 10px;
  333. .int {
  334. overflow: hidden;
  335. border-radius: 7px;
  336. image {
  337. border-radius: 7px;
  338. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2);
  339. }
  340. }
  341. }
  342. }
  343. .it {
  344. overflow: hidden;
  345. border-radius: 7px;
  346. box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2);
  347. }
  348. }
  349. </style>