3 lines
13 KiB
JavaScript
3 lines
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6d85618e"],{"1d3b":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"page"},[r("c-title",{attrs:{text:"区域代理"}}),r("div",{staticClass:"search"},[r("div",{staticClass:"option",on:{click:function(e){t.optionShow=!0}}},[r("span",[t._v(t._s(t.optionData[t.optionIndex].name))]),r("van-icon",{staticStyle:{"margin-left":"0.3rem"},attrs:{name:"arrow-down"}})],1),r("div",{staticClass:"searchContent"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.area_name,expression:"area_name"}],staticClass:"input",attrs:{placeholder:"请输入区域"},domProps:{value:t.area_name},on:{input:function(e){e.target.composing||(t.area_name=e.target.value)}}}),r("div",{staticClass:"btn",on:{click:t.getSearch}},[t._v("搜索")])])]),r("div",{staticClass:"wrapper"},[r("div",{staticClass:"listItem"},t._l(t.listData,(function(e){return r("div",{key:e.area_id,staticClass:"item",on:{click:function(r){return t.gotoResult(e)}}},[t._v(" "+t._s(e.areaname)+" ")])})),0)]),r("van-action-sheet",{attrs:{"close-on-click-action":"",actions:t.optionData},on:{select:t.onSelect},model:{value:t.optionShow,callback:function(e){t.optionShow=e},expression:"optionShow"}})],1)},a=[],o=r("c7eb"),i=(r("e7e5"),r("d399")),c=r("1da1"),s=(r("99af"),r("ac0d")),l={mixins:[s["a"]],data:function(){return{area_name:"",listData:[],value1:0,optionShow:!1,optionIndex:0,optionData:[{name:"省市区",value:0},{name:"街道",value:1}],page:1,isLoadMore:!0,total_page:0}},activated:function(){this.initData()},methods:{initData:function(){this.area_name="",this.optionShow=!1,optionIndex=0,this.page=1,this.isLoadMore=!0,this.total_page=0},getSearch:function(){var t=this;return Object(c["a"])(Object(o["a"])().mark((function e(){var r,n,a;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.area_name,n=t.optionIndex,""!=r){e.next=3;break}return e.abrupt("return");case 3:return i["a"].loading({message:"搜索中",forbidClick:!0}),e.next=6,$http.get("plugin.agent-enquiry.Frontend.controllers.list.search-area",{area_name:r,type_id:n+1});case 6:if(a=e.sent,i["a"].clear(),1==a.result){e.next=11;break}return Object(i["a"])(a.msg),e.abrupt("return");case 11:t.listData=a.data.data,t.isLoadMore=!0,t.total_page=a.data.last_page,t.total_page||(t.total_page=0);case 15:case"end":return e.stop()}}),e)})))()},getMoreData:function(){var t=this,e=this.area_name,r=this.optionIndex;""!=e&&(this.isLoadMore=!1,this.page>=this.total_page||(this.page+=1,$http.get("plugin.agent-enquiry.Frontend.controllers.list.search-area",{area_name:e,type_id:r+1,page:this.page}).then((function(e){if(t.isLoadMore=!0,1===e.result){var r=e.data.data;t.listData=t.listData.concat(r)}else t.page=t.page-1,t.isLoadMore=!1}))))},gotoResult:function(t){this.$router.push(this.fun.getUrl("regionalAgentResult",{},{area_id:t.id,level:t.level}))},onSelect:function(t,e){this.optionIndex=e}}},u=l,h=(r("d08c"),r("2877")),d=Object(h["a"])(u,n,a,!1,null,"29c34aba",null);e["default"]=d.exports},"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));r("d3b7");function n(t,e,r,n,a,o,i){try{var c=t[o](i),s=c.value}catch(l){return void r(l)}c.done?e(s):Promise.resolve(s).then(n,a)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(a,o){var i=t.apply(e,r);function c(t){n(i,a,o,c,s,"next",t)}function s(t){n(i,a,o,c,s,"throw",t)}c(void 0)}))}}},"7b0ff":function(t,e,r){var n=r("d7ff");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=r("499e").default;a("1a3aad3d",n,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=document.documentElement,a=document.body,o={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return n&&n.scrollTop?t=n.scrollTop:a&&(t=a.scrollTop),t},getClientHeight:function(){var t=0;return t=a.clientHeight&&n.clientHeight?Math.min(a.clientHeight,n.clientHeight):Math.max(a.clientHeight,n.clientHeight),t},getScrollHeight:function(){return Math.max(a.scrollHeight,n.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},c7eb:function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("d9e2"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var n=r("53ca");function a(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
a=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(O){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof f?e:f,o=Object.create(a.prototype),i=new E(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=k(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var d={};function f(){}function p(){}function g(){}var v={};l(v,i,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(S([])));b&&b!==e&&r.call(b,i)&&(v=b);var y=g.prototype=f.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function a(o,i,c,s){var l=h(t[o],t,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Object(n["a"])(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){a("next",t,c,s)}),(function(t){a("throw",t,c,s)})):e.resolve(d).then((function(t){u.value=t,c(u)}),(function(t){return a("throw",t,c,s)}))}s(l.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){a(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=g,l(y,"constructor",g),l(g,"constructor",p),p.displayName=l(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new x(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(y),l(y,s,"Generator"),l(y,i,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}},d08c:function(t,e,r){"use strict";r("7b0ff")},d7ff:function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,".page[data-v-29c34aba]{background:#fff;min-height:100vh}.test[data-v-29c34aba]{background:red}.search[data-v-29c34aba]{margin:1rem auto 0;width:20.5rem;height:2.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.search .option[data-v-29c34aba]{color:#0176ff;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.search .option[data-v-29c34aba],.search .searchContent[data-v-29c34aba]{height:2.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.search .searchContent[data-v-29c34aba]{margin-left:1rem;background-color:#f5f5f5;border-radius:1.063rem;position:relative}.search .searchContent .input[data-v-29c34aba]{width:15.5rem;padding-right:4rem;font-size:.813rem;color:#838383;padding-left:1rem;border:none}.search .searchContent .btn[data-v-29c34aba]{position:absolute;top:0;right:0;width:3.875rem;height:2.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:#fff;background-color:#0176ff;border-radius:1.063rem}.wrapper .listItem[data-v-29c34aba]{padding:0 .813rem}.wrapper .listItem .item[data-v-29c34aba]{padding-left:.5rem;height:3rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;border-bottom:.031rem solid #ededed;font-size:.86rem;color:#222;-webkit-transition:.2s;transition:.2s}.wrapper .listItem .item[data-v-29c34aba]:last-child{border-bottom:none}.wrapper .listItem .item[data-v-29c34aba]:active{background:#ededed}",""]),t.exports=e}}]); |