chunk-5c81dcae.7592afec.js 13 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5c81dcae"],{1148:function(e,t,i){e.exports=i.p+"static/img/addr-null.479fe01a.png"},"13b6":function(e,t,i){"use strict";i.r(t);var n,a,r,s,o,c,d,u=i("2909"),h=(i("47e2"),i("2241")),l=(i("96cf"),i("1da1")),p=i("74ce"),f=i("9f53"),m=(i("7f7f"),i("ac6a"),{name:"addrList",props:["list","disabledList","newTime"],data:function(){return{id:"",del:i("3f2c"),edit:i("e5bb"),sum:0,isShow:!1,iconname:0,cardData:[],parmValue:{page:1,size:10}}},watch:{newTime:function(e){e&&this.searchList()}},created:function(){var e=this;this.list.forEach((function(t){t={name:t.name,mobile:t.mobile,city_name:t.city_name,area_name:t.area_name,address:t.address,id:t.id,isShow:!1},e.cardData.push(t)}))},methods:{handleEdit:function(e){this.$emit("edit",e)},handleSelect:function(e){this.$emit("select",e)},modelcheck:function(e){this.iconname=this.iconname==e?"0":e},delAddr:(a=Object(l.a)(regeneratorRuntime.mark((function e(t){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading=!0,e.next=3,p.a.del({id:this.cardData[t].id});case 3:if(i=e.sent,this.loading=!1,!i||0!=i.code){e.next=9;break}this.$emit("refresh"),e.next=15;break;case 9:if(i&&100<=i.code&&i.code<=104)return e.next=12,this.logout();e.next=14;break;case 12:e.next=15;break;case 14:this.show_title(i.msg);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)}),addrdel:function(e){var t=this;h.a.confirm({title:"温馨提示?",message:"确认删除该地址?"}).then(Object(l.a)(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.delAddr(e);case 2:case"end":return i.stop()}}),i)})))).catch((function(){}))},searchList:(n=Object(l.a)(regeneratorRuntime.mark((function e(){var t,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 1===this.parmValue.page&&(this.list=[]),e.next=3,p.a.list(this.parmValue);case 3:if(!(t=e.sent)||0!=t.code||!t.data){e.next=10;break}this.cardData=[],(t.data.list==[]?[]:t.data.list).forEach((function(e){e={name:e.contector,mobile:e.mobile,city_name:e.city_name,area_name:e.area_name,address:e.addr,id:e.id,isShow:!1},i.cardData.push(e)})),e.next=17;break;case 10:if(t&&100<=t.code&&t.code<=104)return e.next=13,this.logout();e.next=15;break;case 13:e.next=17;break;case 15:this.show_title(t.msg),1!==this.parmValue.page&&this.parmValue.page--;case 17:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})}}),A=(i("34bc"),i("2877"));m=Object(A.a)(m,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"addrList"},[e._l(e.cardData,(function(t,n){return i("div",{key:n,staticClass:"addressList",on:{click:function(i){return i.stopPropagation(),e.handleSelect(t)}}},[i("div",{staticClass:"addressDetai"},[i("div",{staticClass:"addrTitle"},[i("span",[e._v(e._s(t.name))]),i("span",[e._v(e._s(t.mobile))]),i("p",[e._v("\n "+e._s(t.city_name+" "+t.area_name+" "+t.address)+"\n ")])]),i("div",{staticClass:"handle"},[i("div",{staticClass:"del",on:{click:function(t){return t.stopPropagation(),e.addrdel(n)}}},[i("img",{attrs:{src:e.del}}),i("span",[e._v("删除")])]),i("div",{staticClass:"edit",on:{click:function(i){return i.stopPropagation(),e.handleEdit(t)}}},[i("img",{attrs:{src:e.edit}}),i("span",[e._v("编辑")])])])])])})),0<e.total&&e.list.length<e.total&&0<e.list.length?i("div",{staticClass:"addmore",on:{click:e.pageData}},[e._v("\n 点击加载更多!\n ")]):e._e()],2)}),[],!1,null,"21099697",null).exports,m={mixins:[f.a],components:{AddrList:m},data:function(){return{addrALL:i("1148"),newTime:"",isShowAddrNull:!0,delId:"",chosenAddressId:"",isRes:this.$route.query.id||"0",list:[],total:0,parmValue:{page:1,size:10},loading:!1}},created:(d=Object(l.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.$route&&this.$route.query&&this.$route.query.id?this.isRes="1":this.isRes="0";case 1:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)}),mounted:function(){this.searchList()},methods:{handleRefresh:(c=Object(l.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.searchList();case 2:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)}),getNewTime:function(){this.newTime=(new Date).valueOf()},onClickLeft:function(){window.history.back(-1)},onClickRight:function(){this.loading||(""!==this.delId?h.a.confirm({title:"温馨提示?",message:"确认删除该地址?"}).then(Object(l.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))).catch((function(){})):this.show_title("请选择地址!"))},customerService:function(){this.serviceShow=!0},gotoInfor:function(){this.$router.push({path:"/personalInfor"})},onAdd:function(){this.$router.push({path:"/addressView"})},onEdit:function(e){this.loading||window.vm.$router.push({path:"/addressView",query:{id:e.id}})},onSelect:function(e){"1"===this.isRes?this.$store.dispatch("user/set_ad",e).then((function(e){window.history.back(-1)})):this.delId=e.id},pageData:(o=Object(l.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.parmValue.page++,e.next=3,this.searchList();case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)}),delAddr:(s=Object(l.a)(regeneratorRuntime.mark((function e(t){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading=!0,e.next=3,p.a.del({id:t});case 3:if(i=e.sent,this.loading=!1,i&&0==i.code)return this.show_title("地址删除成功!"),e.next=9,this.searchList();e.next=11;break;case 9:e.next=17;break;case 11:if(i&&100<=i.code&&i.code<=104)return e.next=14,this.logout();e.next=16;break;case 14:e.next=17;break;case 16:this.show_title(i.msg);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)}),searchList:(r=Object(l.a)(regeneratorRuntime.mark((function e(){var t,i,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.loading){e.next=23;break}return 1===this.parmValue.page&&(this.list=[]),e.next=4,p.a.list(this.parmValue);case 4:if(!(t=e.sent)||0!=t.code||!t.data){e.next=16;break}(n=t.data.list).map((function(e){var t=e.city_name===e.provice_name?e.provice_name:e.provice_name+e.city_name;return e.name=e.contector,e.tel=e.mobile,e.address=t+e.area_name+e.addr,e})),(i=this.list).push.apply(i,Object(u.a)(n)),this.getNewTime(),0!=this.list.length?this.isShowAddrNull=!1:this.isShowAddrNull=!0,""===this.chosenAddressId&&0<this.list.length&&(this.chosenAddressId=this.list[0].id),this.total=t.data.count,0<this.total&&"0"===this.isRes&&(this.delId=this.list[0].id),e.next=23;break;case 16:if(t&&100<=t.code&&t.code<=104)return e.next=19,this.logout();e.next=21;break;case 19:e.next=23;break;case 21:this.show_title(t.msg),1!==this.parmValue.page&&this.parmValue.page--;case 23:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})}},i("9c08"),m=Object(A.a)(m,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"address",staticStyle:{"padding-top":"46px",background:"#fff"}},[i("van-nav-bar",{staticClass:"van-nav-bar-my-fixed",attrs:{title:"我的地址","left-arrow":"","right-text":("1"===e.isRes||e.total,""),fixed:""},on:{"click-left":e.onClickLeft,"click-right":e.onAdd},scopedSlots:e._u([{key:"right",fn:function(){return[i("van-icon",{attrs:{name:"plus",size:"18"}})]},proxy:!0}])}),""!==e.newTime?i("addr-list",{attrs:{newTime:e.newTime,list:e.list,disabledList:[]},on:{refresh:e.handleRefresh,add:e.onAdd,select:e.onSelect,edit:e.onEdit},model:{value:e.chosenAddressId,callback:function(t){e.chosenAddressId=t},expression:"chosenAddressId"}}):e._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:e.isShowAddrNull,expression:"isShowAddrNull"}],staticClass:"addr-null"},[i("img",{attrs:{src:e.addrALL,alt:""}}),i("div",{staticClass:"addr-null-title"},[e._v("暂无地址~")])]),0<e.total&&e.list.length<e.total&&0<e.list.length?i("div",{staticClass:"addmore",on:{click:e.pageData}},[e._v("\n 点击加载更多!\n ")]):e._e()],1)}),[],!1,null,"2426423c",null);t.default=m.exports},"1b69":function(e,t,i){"use strict";i("96cf");var n=i("1da1"),a=i("5daa"),r=i("5f87"),s={};window.ajaxTimeout=2e4,t.a=Object(n.a)(regeneratorRuntime.mark((function e(){var t,i,o,c,d,u,h,l=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=0<l.length&&void 0!==l[0]?l[0]:"",i=1<l.length&&void 0!==l[1]?l[1]:{},c=3<l.length&&void 0!==l[3]?l[3]:{},d=4<l.length&&void 0!==l[4]?l[4]:s,u=5<l.length?l[5]:void 0,o=(o=2<l.length&&void 0!==l[2]?l[2]:"GET").toLowerCase(),h={method:o,baseURL:"",url:a.a.baseURL+t,data:i,params:c,processData:!0,timeout:window.ajaxTimeout,headers:d,onUploadProgress:u},u&&"function"==typeof u&&(h.onUploadProgress=u),axios.interceptors.request.use((function(e){return e.data.token||(e.data.token=Object(r.e)()),e}),(function(e){return Promise.reject(new Error("服务器异常,请联系管理员!"))})),axios.interceptors.response.use(function(){var e=Object(n.a)(regeneratorRuntime.mark((function e(t){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 200===t.status&&100<=(i=t.data.code)&&i<=104&&Object(r.j)(),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(e){return Promise.reject(e.response.data)})),e.abrupt("return",new Promise((function(e,t){axios(h).then((function(t){e(t.data)})).catch((function(e){e.response&&e.response.data?t(e.response.data):t(e)}))})));case 12:case"end":return e.stop()}}),e)})))},"34bc":function(e,t,i){"use strict";i("af82")},"3f2c":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAAXNSR0IArs4c6QAAAOdQTFRFAAAAAAAAVVVVgIBgjnFxgIBmhoZ5i4B0i4uAhYV6ioB1ioCAiYB2iYmAhIR7joR7iH93jIR7h4B4h4eAg4N8i4N8h4d4hoZ5jIZ5jIZ5ioZ9i4Z8iYN8iIZ8iIZ5ioV8ioV8i4V8ioR9iYR7ioV7ioR8iYV8ioR8iYV8i4V9ioR8ioZ8ioV9iYV8ioV8iYR8ioV8i4V7ioR8ioV8iYV7ioR8iYV7ioV7ioV8iYV7ioV7ioV8iYV8ioV8ioR8ioV8ioV8iYV8ioV8ioR8ioV8iYV7ioV8ioR8iYR8iYV8ioV7iYV8ioV84R6h3gAAAE10Uk5TAAEDCAkKFRYWFxgYGhobGx4fICAhISQmKCo7YWNnaW1xf4WbnaanqKm0tb3AwcLDxNna2tvc3d3e39/g4eHi4uPs7O3t7u7v9/f6+/uG9VPTAAAA4klEQVQoz8WS1w6CMBiFK866FerAvXFvrRP3fv/nkVloIMbEC8/FyeF85KctBeBbeZotD92EWKSL32x5PbMhGXYw0e712pGHrgz7WHw+RUxJbgYyjCBeFMk0bb7URNSvRufzKL0OU4MwRjQ0NWpkvF5Gcp+PsYGwVoMA+AUB2kAOY07JnA1Ei4XhFmjxf8NPq1X3ydnvUz0h2KhLzlIwTs5WcROMT5cJ+q+k1uOYFgO9Q8ZpZu7cuQ31XDwOs0njHqTzk33Bpb8Zrl6PK+MGrS+nSpCMcaDy7P4guo1KrAP8pDdBfDyVwyiTJQAAAABJRU5ErkJggg=="},"74ce":function(e,t,i){"use strict";var n=i("1b69"),a="home/";t.a={list:function(e,t){return Object(n.a)(a+"addrlist",e,"post",t)},add:function(e,t){return Object(n.a)(a+"addradd",e,"post",t)},del:function(e,t){return Object(n.a)(a+"addrdel",e,"post",t)},detail:function(e,t){return Object(n.a)(a+"addrinfo",e,"post",t)},update:function(e,t){return Object(n.a)(a+"addredit",e,"post",t)}}},"9c08":function(e,t,i){"use strict";i("bb25")},"9f53":function(e,t,i){"use strict";i("433b");var n,a=i("d399");i("96cf"),i=i("1da1");t.a={methods:{logout:(n=Object(i.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/login"!==this.$route.path)return e.next=3,this.$store.dispatch("user/logout");e.next=4;break;case 3:this.$router.push("/login");case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)}),show_title:function(e){Object(a.a)({message:e})}}}},af82:function(e,t,i){},bb25:function(e,t,i){},e5bb:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAAXNSR0IArs4c6QAAAUdQTFRFAAAAAAAAgICAVVVVqqpVgICAkm1tgIBggICAjo5xi3R0iXZ2gIBxgIBzi4B0i4CAhYV6ioB1ioCAioqAiYB2iYmAhIR7jYR7jIR7h4B4h4eAi4N8h4B4j4d4j4eAh4eAjod4ioN8iYN8jIZ5iYN2iYN8hoZ5jIZ5i4V6iIh9i4V6iYR7i4J9i4Z9i4N8ioV9ioZ8iYR7i4R7iYR7ioN8ioR7ioZ7i4V8ioV7ioV6iYR7iYR8iYR7iYR8ioV8ioZ8iYV8i4V8ioZ9iYV8ioV7i4V8iYV8ioV8iYV8ioR8ioZ8ioV8ioV8ioV8iYV7ioV8ioV8ioZ8ioV8iYV9iYV7ioR8ioV9ioR7ioV8ioV7ioR8ioV8ioV8ioV8ioR8ioV8iYV8ioR8ioV8ioV8ioR8iYV7ioV7ioR8ioV7ioV7ioV8ioV8ioV7Xp2M/wAAAG10Uk5TAAECAwMGBwgICQsNEhQWFhcYGBgaHB0dHyAgISIiIiQkJScoKSkqKiwtLjg5OUJkaWxsbnF8fn+XmJycpKSlqKmpqqusra+vsbO5wMbIyc/T1NjZ29zd3t7f4ODh4uvr7O3t7u/w8PHy9vb5+qXB+uwAAAEtSURBVCjPY2DADrS8/BlwAUXnDA8ok0NIQhoBxNhAcjbqEDlBI++QCATw05V3yLCRg8iJWySmxEbHwECkr75TOkyOwTQuylhTSQUKlBX0PDNsZGCWB6SacCO5RdouzUYWzsuMUUN2pxPQPlZtHXYINydCEi7FpOQMcouoj48oTFKKWRDsCSFmXluwO6Wjo6XhkvyuYE+4CwjbW4PcKR0RgZAUcINKsgjyMKBJSjMLQY2FuRhZEj1oUXUKSMFCVkqAGc1OPsdwWMiGO/KjSfK7IMLdhR/dWEFEjAkyk+IgsiWl0CWlkCQl0SUl4ZKZMarokkrRoVANgagpAQi4DJK9haBpKB45DamoKGkYhiUYc0JTnyVK6ouJjk1JshKBmSJhFpSVjQQyg82lGEESAIo8Xo9kJPAQAAAAAElFTkSuQmCC"}}]);