{"id":31620,"date":"2024-11-25T17:07:57","date_gmt":"2024-11-25T09:07:57","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31620\/"},"modified":"2024-11-25T17:07:57","modified_gmt":"2024-11-25T09:07:57","slug":"%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%bc%80%e5%8f%91%e5%81%9a%e5%87%ba%e5%bc%b9%e5%87%ba%e8%8f%9c%e5%8d%95%e5%8a%9f%e8%83%bd%ef%bc%88%e9%99%84%e4%bb%a3%e7%a0%81%ef%bc%89","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31620\/","title":{"rendered":"\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u505a\u51fa\u5f39\u51fa\u83dc\u5355\u529f\u80fd\uff08\u9644\u4ee3\u7801\uff09"},"content":{"rendered":"<p style=\"text-align: left\">\u8fd9\u6b21\u7ed9\u5927\u5bb6\u5e26\u6765\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u505a\u51fa\u5f39\u51fa\u83dc\u5355\u529f\u80fd\uff08\u9644\u4ee3\u7801\uff09\uff0c\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u505a\u51fa\u5f39\u51fa\u83dc\u5355\u529f\u80fd\uff08\u7684\u6ce8\u610f\u4e8b\u9879\u6709\u54ea\u4e9b\uff0c\u4e0b\u9762\u5c31\u662f\u5b9e\u6218\u6848\u4f8b\uff0c\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u3002<\/p>\n<p style=\"text-align: left\"><span style=\"color: #ff0000\"><strong>\u9700\u6c42<\/strong><\/span><\/p>\n<p style=\"text-align: left\">\u70b9\u51fb\u6807\u7b7e\u680f\u6309\u94ae\uff0c\u5411\u4e0b\u5f39\u51fa\u83dc\u5355\uff0c\u518d\u6b21\u70b9\u51fb\uff0c\u6536\u56de\u83dc\u5355<\/p>\n<p style=\"text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/bcb4f6af91b8798b1316e118aeb628ac-0.gif\" class=\"aligncenter\" title=\"\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u505a\u51fa\u5f39\u51fa\u83dc\u5355\u529f\u80fd\uff08\u9644\u4ee3\u7801\uff09\u63d2\u56fe\" alt=\"\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u505a\u51fa\u5f39\u51fa\u83dc\u5355\u529f\u80fd\uff08\u9644\u4ee3\u7801\uff09\u63d2\u56fe\" \/><\/p>\n<p style=\"text-align: left\"><span style=\"color: #ff0000\"><strong>\u8981\u89e3\u51b3\u7684\u95ee\u9898<\/strong><\/span><\/p>\n<ol>\n<li>\n<p style=\"text-align: left\">\u6807\u7b7e\u680f\u4e09\u680f\u6837\u5f0f\uff0c\u6807\u7b7e\u680f\u56fa\u5b9a\u4e0d\u52a8\uff1b<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u70b9\u51fb\u6807\u7b7e\u680f\u5f39\u51fa\u83dc\u5355\uff0c\u5e76\u4e14\u51fa\u73b0\u900f\u660e\u906e\u7f69\uff1b<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u906e\u7f69\u4f18\u5148\u7ea7\u5728\u5f39\u51fa\u6846\u4e4b\u4e0b\uff1b<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u5f39\u51fa\u6846\u5185\u6807\u7b7e\u7684\u8bbe\u7f6e\uff1b<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u6eda\u52a8\u680f\u6eda\u52a8\u6761\u7684\u9690\u85cf<\/p>\n<\/li>\n<\/ol>\n<p style=\"text-align: left\"><span style=\"color: #ff0000\"><strong>\u5982\u4f55\u89e3\u51b3\uff1f<\/strong><\/span><\/p>\n<ol>\n<li>\n<p style=\"text-align: left\">\u5f39\u6027\u5e03\u5c40\uff0c\u6a2a\u5411\uff0c\u4e09\u8005\u5e73\u5206\u6574\u680f;<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u72b6\u6001\u76d1\u542c\u70b9\u51fb\u4e8b\u4ef6\uff0c\u6570\u636e\u63a7\u5236hide\u6216\u8005show,\u901a\u8fc7rgba\u8bbe\u7f6e\u900f\u660e\u5ea6<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u5f39\u51fa\u6846\u8bbe\u7f6ez-index\uff1b<\/p>\n<\/li>\n<li>\n<p style=\"text-align: left\">\u5f39\u6027\u5e03\u5c40flex \u6a2a\u5411\u6392\u5217 \u8d85\u51fa\u540ewrap \u7136\u540espace-around\u63a7\u5236\u95f4\u8ddd<\/p>\n<\/li>\n<\/ol>\n<pre>::-webkit-scrollbar {\nwidth: 0;\nheight: 0;\ncolor: transparent;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\"><span style=\"color: #ff0000\"><strong>\u5177\u4f53\u5b9e\u73b0<\/strong><\/span><\/p>\n<p style=\"text-align: left\">wxml<\/p>\n<pre>&lt;import src=\"..\/..\/templates\/template\" \/&gt;\n&lt;view class=\"container {{isMask?'mask':''}}\"&gt;\n  &lt;view class=\"header\"&gt;\n    &lt;view class=\"filterCity {{status=='1' &amp;&amp; isActive?'active':''}}\" data-status='1' bindtap=\"changeStatus\"&gt;\n      &lt;view class=\"city\"&gt;\u57ce\u5e02\u7b5b\u9009&lt;\/view&gt;\n      &lt;image src=\"{{status=='1' &amp;&amp; isActive?'..\/..\/youzan-image\/red-up.png':'..\/..\/youzan-image\/down.png'}}\" \/&gt;\n    &lt;\/view&gt;\n    &lt;view class=\"filterJob {{status=='2' &amp;&amp; isActive?'active':''}}\" data-status='2' bindtap=\"changeStatus\"&gt;\n      &lt;view class=\"job\"&gt;\u804c\u4f4d\u7b5b\u9009&lt;\/view&gt;\n      &lt;image src=\"{{status=='2' &amp;&amp; isActive?'..\/..\/youzan-image\/red-up.png':'..\/..\/youzan-image\/down.png'}}\" \/&gt;\n    &lt;\/view&gt;\n    &lt;view class=\"filterOrder {{status=='3'&amp;&amp; isActive?'active':''}}\" data-status='3' bindtap=\"changeStatus\"&gt;\n      &lt;view class=\"order\"&gt;\u6392\u5e8f\u65b9\u5f0f&lt;\/view&gt;\n      &lt;image src=\"{{status=='3' &amp;&amp; isActive?'..\/..\/youzan-image\/red-up.png':'..\/..\/youzan-image\/down.png'}}\" \/&gt;\n    &lt;\/view&gt;\n  &lt;\/view&gt;\n  &lt;block wx:if=\"{{isActive==true&amp;&amp;status=='1'}}\"&gt;\n    &lt;view class=\"cityContainer\"&gt;\n      &lt;block wx:for=\"{{city}}\" wx:key=\"id\" wx:for-index=\"index\"&gt;\n        &lt;view class=\"city {{isSelect&amp;&amp;index==curIndex?'select':''}}\" data-index=\"{{index}}\" bindtap=\"select\"&gt;{{item}}&lt;\/view&gt;\n      &lt;\/block&gt;\n    &lt;\/view&gt;\n  &lt;\/block&gt;\n  &lt;block wx:if=\"{{isActive==true&amp;&amp;status=='2'}}\"&gt;\n    &lt;scroll-view scroll-y=\"true\" class=\"posContainer\"&gt;\n      &lt;block wx:for=\"{{cur}}\" data-index='index' wx:for-index='index' wx:key=\"index\"&gt;\n        &lt;view class=\"title\"&gt;{{item.title}}&lt;\/view&gt;\n        &lt;view class=\"poscontent\"&gt;\n          &lt;view wx:for=\"{{item.types}}\" wx:for-item=\"type\" wx:key='id' wx:for-index=\"{{index}}\" data-index=\"{{index}}\"&gt;\n            &lt;view class=\"tag {{isSelect&amp;&amp;index==curIndex?'select':''}}\" data-id=\"{{id}}\" bindtap=\"multiSelect\"&gt;{{type}}&lt;\/view&gt;\n          &lt;\/view&gt;\n        &lt;\/view&gt;\n      &lt;\/block&gt;\n      &lt;view class=\"confirm\"&gt;\n        &lt;button class=\"weui-btn\" type=\"warn\"&gt;\u786e\u8ba4&lt;\/button&gt;\n      &lt;\/view&gt;\n    &lt;\/scroll-view&gt;\n  &lt;\/block&gt;\n  &lt;block wx:if=\"{{isActive==true&amp;&amp;status=='3'}}\"&gt;\n    &lt;view class=\"orderContainer\"&gt;\n      &lt;view class=\"block\"&gt;\u667a\u80fd\u6392\u5e8f&lt;\/view&gt;\n      &lt;view class=\"block\"&gt;\u65f6\u95f4\u6392\u5e8f&lt;\/view&gt;\n      &lt;view class=\"block\"&gt;\u85aa\u8d44\u6392\u5e8f&lt;\/view&gt;\n    &lt;\/view&gt;\n  &lt;\/block&gt;\n  &lt;view class=\"listContainer\" &gt;\n    &lt;view wx:for=\"{{jobList}}\" wx:key=\"index\" data-index=\"{{index}}\"&gt;\n      &lt;template is=\"list-item\" data=\"{{...item}}\" \/&gt;\n    &lt;\/view&gt;\n  &lt;\/view&gt;\n  &lt;view class=\"search \" bindtap=\"search\"&gt;\n    &lt;image src=\"..\/..\/youzan-image\/search.png\" \/&gt;\n    &lt;text&gt;\u641c\u7d22&lt;\/text&gt;\n  &lt;\/view&gt;\n&lt;\/view&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">wxss<\/p>\n<pre>page {\n  position: relative;\n  width: 100%;\n  height: 100vh;\n}\n.header {\n  width: 100%;\n  height: 80rpx;\n  position: fixed;\n  top: 0;\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  text-align: center;\n  color: #313131;\n  font-size: 16px;\n  border-bottom: 1rpx solid #eeeeee;\n  z-index: 9999;\n  background-color: #fff;\n}\n.filterCity {\n  flex: 1;\n  position: relative;\n  height: 80rpx;\n  line-height: 80rpx;\n}\n.filterJob {\n  position: relative;\n  flex: 1;\n  height: 80rpx;\n  line-height: 80rpx;\n}\n.filterOrder {\n  position: relative;\n  flex: 1;\n  height: 80rpx;\n  line-height: 80rpx;\n}\n.header image {\n  position: absolute;\n  right: 15rpx;\n  top: 26rpx;\n  width: 30rpx;\n  height: 30rpx;\n}\n.active {\n  color: #ef0001;\n}\n.mask {\n  width: 100%;\n  height: 100%;\n  position: fixed;\n  top: 80rpx;\n  background-color: rgba(15, 15, 26, 0.3);\n}\n.cityContainer {\n  display: flex;\n  flex-direction: row;\n  justify-content: space-around;\n  align-items: space-between;\n  flex-wrap: wrap;\n  width: 100%;\n  height: 300rpx;\n  z-index: 999;\n  background-color: #fff;\n  border-bottom: 1rpx solid #e9e9e9;\n  padding-bottom: 130rpx;\n}\n.cityContainer .city {\n  display: block;\n  font-size: 15px;\n  margin-top: 100rpx;\n  width: 150rpx;\n  height: 50rpx;\n  line-height: 50rpx;\n  text-align: center;\n  border: 1rpx solid #e9e9e9;\n  overflow: hidden;\n}\n.select {\n  color: #ffffff;\n  background-color: #ed0000;\n}\n.posContainer {\n  height: 980rpx;\n  width: 100%;\n  background-color: #fff;\n  \/* overflow:auto; *\/\n}\n::-webkit-scrollbar {\n  width: 0;\n  height: 0;\n  color: transparent;\n}\n.title {\n  margin-top: 55rpx;\n  font-size: 15px;\n  margin-left: 28rpx;\n}\n.poscontent {\n  width: 100%;\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-start;\n  flex-wrap: wrap;\n  margin-top: -15rpx;\n}\n.tag {\n  margin-left: 28rpx;\n  margin-top: 23rpx;\n  font-size: 13px;\n  width: 150rpx;\n  height: 50rpx;\n  line-height: 50rpx;\n  text-align: center;\n  border: 1rpx solid #e9e9e9;\n}\n.confirm {\n  width: 100%;\n  height: 150rpx;\n  border: 1rpx solid transparent;\n  background-color: #fff;\n}\n.weui-btn {\n  position: fixed;\n  width: 95%;\n  bottom: 52rpx;\n  left: 50%;\n  transform: translateX(-50%);\n}\n.orderContainer {\n  display: flex;\n  flex-direction: row;\n  justify-content: space-around;\n  align-items: center;\n  background-color: #fff;\n  width: 100%;\n  height: 125rpx;\n}\n.block {\n  font-size: 13px;\n  width: 200rpx;\n  height: 50rpx;\n  line-height: 50rpx;\n  text-align: center;\n  border: 1rpx solid #e9e9e9;\n}\n.search {\n  position: fixed;\n  bottom: 80rpx;\n  background-color: #fff;\n  right: 25rpx;\n  width: 150rpx;\n  height: 75rpx;\n  line-height: 75rpx;\n  text-align: center;\n  border-radius: 35rpx;\n  box-shadow: 1rpx 1rpx 7rpx 7rpx #f5f5f5;\n}\n.search image {\n  width: 30rpx;\n  height: 30rpx;\n}\n.search text {\n  font-size: 15px;\n  padding-left: 9rpx;\n  color: #666666;\n}\n.listContainer {\n  width: 100%;\n  height: 100%;\n  margin-top: 80rpx;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">js<\/p>\n<pre>import category from '..\/..\/api\/employ'\nimport jobList from '..\/..\/api\/detail'\nPage({\n data: {\n  curIndex: '',\n  isActive: false,\n  jobList:[],\n  cur: [],\n  job: [],\n  isShow: true,\n  status: 0,\n  isMask: false,\n  isSelect: false,\n  city: ['\u5168\u56fd', '\u676d\u5dde', '\u5317\u4eac', '\u6df1\u5733', '\u4e0a\u6d77', '\u5e7f\u5dde', '\u6b66\u6c49', '\u91cd\u5e86']\n },\n changeStatus(e) {\n  let status = e.currentTarget.dataset.status;\n  let cur = category;\n  this.setData({\n   isActive: !this.data.isActive,\n   status: status,\n   isMask: !this.data.isMask,\n   cur: cur,\n  })\n },\n select(e) {\n  let curIndex = e.currentTarget.dataset.index;\n  this.setData({\n   isSelect: \" curIndex == this.data.curIndex ? '!this.data.isActive' : 'true' \",\n   isActive: false,\n   isMask:false,\n   curIndex: curIndex,\n  })\n },\n multiSelect(e){\n  let multiIndex=e.currentTarget.dataset.index;\n  this.setData({\n   isSelect:!this.data.isSelect,\n   curIndex:multiIndex\n  })\n },\n search(e) {\n  wx.navigateTo({\n   url: '..\/search\/search',\n  })\n },\n onLoad: function (e) {\n  this.setData({\n   jobList:jobList\n  })\n },\n click:function (e) {\n  let id =e.currentTarget.dataset.id;\n  wx.navigateTo({\n   url: `..\/detail\/detail?id=${id}`,\n  })\n }\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u76f8\u4fe1\u770b\u4e86\u672c\u6587\u6848\u4f8b\u4f60\u5df2\u7ecf\u638c\u63e1\u4e86\u65b9\u6cd5\uff0c\u66f4\u591a\u7cbe\u5f69\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n<p>\u63a8\u8350\u9605\u8bfb\uff1a<\/p>\n<p><\/p>\n<p><\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u505a\u51fa\u5f39\u51fa\u83dc\u5355\u529f\u80fd\uff08\u9644\u4ee3\u7801\uff09\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u6b21\u7ed9\u5927\u5bb6\u5e26\u6765\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u505a\u51fa\u5f39\u51fa\u83dc\u5355\u529f\u80fd\uff08\u9644\u4ee3\u7801\uff09\uff0c\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u505a\u51fa\u5f39\u51fa\u83dc\u5355\u529f\u80fd\uff08\u7684\u6ce8\u610f\u4e8b\u9879\u6709\u54ea\u4e9b\uff0c\u4e0b\u9762\u5c31\u662f\u5b9e\u6218\u6848\u4f8b\uff0c\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u3002 \u9700\u6c42 \u70b9\u51fb\u6807\u7b7e\u680f\u6309\u94ae\uff0c\u5411\u4e0b\u5f39\u51fa\u83dc\u5355\uff0c\u518d\u6b21\u70b9\u51fb\uff0c\u6536\u56de\u83dc\u5355 \u8981\u89e3\u51b3\u7684\u95ee\u9898 \u6807\u7b7e\u680f\u4e09\u680f\u6837\u5f0f\uff0c\u6807\u7b7e\u680f\u56fa\u5b9a\u4e0d\u52a8\uff1b \u70b9\u51fb\u6807\u7b7e\u680f\u5f39\u51fa\u83dc\u5355\uff0c\u5e76\u4e14\u51fa\u73b0\u900f\u660e\u906e\u7f69\uff1b \u906e\u7f69\u4f18\u5148\u7ea7\u5728\u5f39\u51fa\u6846\u4e4b\u4e0b\uff1b \u5f39\u51fa\u6846\u5185\u6807\u7b7e\u7684\u8bbe\u7f6e\uff1b \u6eda\u52a8\u680f\u6eda\u52a8\u6761\u7684\u9690\u85cf \u5982\u4f55\u89e3\u51b3\uff1f \u5f39\u6027\u5e03\u5c40\uff0c\u6a2a\u5411\uff0c\u4e09\u8005\u5e73\u5206\u6574\u680f; \u72b6\u6001\u76d1\u542c\u70b9\u51fb\u4e8b\u4ef6\uff0c\u6570\u636e\u63a7\u5236hide\u6216\u8005show,\u901a\u8fc7rgba\u8bbe\u7f6e\u900f\u660e\u5ea6 \u5f39\u51fa\u6846\u8bbe\u7f6ez-index\uff1b \u5f39\u6027\u5e03\u5c40flex \u6a2a\u5411\u6392\u5217 \u8d85\u51fa\u540ewrap \u7136\u540espace-around\u63a7\u5236\u95f4\u8ddd ::-webkit-scrollbar { width: 0; height: 0; color: transparent; } \u767b\u5f55\u540e\u590d\u5236 \u5177\u4f53\u5b9e\u73b0 wxml &lt;import src=&#8221;..\/..\/templates\/template&#8221; \/&gt; &lt;view class=&#8221;container {{isMask?&#8217;mask&#8217;:&#8221;}}&#8221;&gt; &lt;view class=&#8221;header&#8221;&gt; &lt;view class=&#8221;filterCity {{status==&#8217;1&#8242; &amp;&amp; isActive?&#8217;active&#8217;:&#8221;}}&#8221; data-status=&#8217;1&#8242; bindtap=&#8221;changeStatus&#8221;&gt; &lt;view class=&#8221;city&#8221;&gt;\u57ce\u5e02\u7b5b\u9009&lt;\/view&gt; &lt;image src=&#8221;{{status==&#8217;1&#8242; &amp;&amp; isActive?&#8217;..\/..\/youzan-image\/red-up.png&#8217;:&#8217;..\/..\/youzan-image\/down.png&#8217;}}&#8221; \/&gt; &lt;\/view&gt; &lt;view class=&#8221;filterJob {{status==&#8217;2&#8242; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-31620","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=31620"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31620\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}