1"use strict";(self["webpackChunkdemo5_vue2"]=self["webpackChunkdemo5_vue2"]||[]).push([[681],{2681:function(e,t,s){s.d(t,{A:function(){return h}});var i=function(){var e=this,t=e._self._c;return t("div",[t("el-drawer",{attrs:{visible:e.visible,"append-to-body":"",direction:"rtl","show-close":!1,withHeader:!1,size:"528px"},on:{"update:visible":function(t){e.visible=t},close:function(t){return e.handleClose("close")}}},[t("div",{staticClass:"pop"},[t("div",{staticClass:"hd"},[t("div",{staticClass:"tit font-title"},[e._v(e._s(e.title))]),t("div",{staticClass:"close cursor-pointer",on:{click:function(t){return e.handleClose("close")}}},[t("img",{attrs:{src:"https://cdn.ctfmall.com/goodsother/pc_close_v5.png",alt:""}})])]),t("div",{staticClass:"bd"},[t("el-scrollbar",{attrs:{noresize:"",wrapClass:"scroll-view"}},[e.addressList.length>0?t("div",{staticClass:"list"},[t("el-scrollbar",{attrs:{noresize:"",wrapClass:"scroll-view"}},e._l(e.addressList,function(s,i){return t("div",{key:i,staticClass:"item cursor-pointer",on:{click:function(t){return e.handleAddress(s)}}},[t("div",{staticClass:"top"},[s.IsDefault?t("div",{staticClass:"default"},[e._v("é»è®¤")]):e._e(),t("div",{staticClass:"info"},[t("span",[e._v(e._s(s.ReciverName))]),t("span",[e._v(e._s(s.MobilePhone))])])]),t("div",{staticClass:"desc"},[e._v(e._s(s.ProvinceName?s.ProvinceName+" ":"")+e._s(s.CityName?s.CityName+" ":"")+e._s(s.DistrictName?s.DistrictName+" ":"")+e._s(s.Street))]),t("div",{staticClass:"opera"},[t("div",{staticClass:"btn cursor-pointer",on:{click:function(t){return t.stopPropagation(),e.handleEditAddress(s)}}},[t("img",{attrs:{src:"https://cdn.ctfmall.com/goodsother/pc_edit_v5.png",alt:""}})]),t("div",{staticClass:"btn cursor-pointer",on:{click:function(t){return t.stopPropagation(),e.handleDeleteAddress(s)}}},[t("img",{attrs:{src:"https://cdn.ctfmall.com/goodsother/pc_delete2_v5.png",alt:""}})])])])}),0)],1):t("div",{staticClass:"nodata"},[t("img",{attrs:{src:"https://cdn.ctfmall.com/goodsother/pc_empty_v5.png",alt:"æ æ°æ®"}}),t("p",[e._v("æ¨ç®åæ²¡ææ¶è´§å°å")])])])],1),t("div",{staticClass:"fd"},[t("div",{staticClass:"opera"},[t("div",{staticClass:"common-btn common-btn-fill-red-1",on:{click:e.handleAddAddress}},[e._v("æ·»å æ°å°å")])])])])]),t("custom-popup-v5",{ref:"customPopup"}),t("addAddressDialog",{ref:"addAddressDialog"})],1)},o=[],r=s(5353),a=s(3712),d=s(3756),c={components:{addAddressDialog:d.A},data(){return{visible:!1,title:"éæ©å°å",addressList:[],cb:null}},computed:{...(0,r.L8)(["userInfo"])},methods:{showModal(e={}){this.cb="function"==typeof e.success?e.success:null,this.addressList=[],this.title="éæ©å°å",this.getAddressInfo().then(()=>{this.visible=!0}).catch(()=>{this.$toast("å°åè·å失败")})},hideModal(){this.visible=!1},handleClose(e,t=null){this.hideModal(),"function"==typeof this.cb&&this.cb(e,t)},getAddressInfo(){return new Promise(e=>{(0,a.GA)({uid:this.userInfo.uid,addressId:0}).then(t=>{if(200==t.code&&t.data&&t.data.length>0){let e=t.data.filter(e=>1==e.IsDelivery);this.addressList=e||[]}else this.addressList=[];e()}).catch(()=>{e()})})},handleAddress(e){this.handleClose("success",e)},handleAddAddress(){this.$refs.addAddressDialog&&this.$refs.addAddressDialog.showModal({success:e=>{"success"==e&&this.getAddressInfo()}})},handleEditAddress(e){this.$refs.addAddressDialog&&this.$refs.addAddressDialog.showModal({address:{receiverName:e.ReciverName,mobilePhone:e.MobilePhone,provinceCode:e.ProvinceCode,cityCode:e.CityCode,districtCode:e.DistrictCode,street:e.Street,note:e.Note,isDefault:e.IsDefault,id:e.AddressID},success:e=>{"success"==e&&this.getAddressInfo()}})},handleDeleteAddress(e){this.$refs.customPopup&&this.$refs.customPopup.showModal({content:"确认å é¤è¯¥å°åï¼",showCancel:!0,cancelText:"åæ¶",success:t=>{if("confirm"==t){const t=this.$loading({lock:!0});(0,a.Z1)({addressId:e.AddressID,uid:this.userInfo.uid}).then(e=>{t.close(),200==e.code?(this.$toast("å 餿å"),this.getAddressInfo()):this.$toast(e.msg||"ç½ç»å¼å¸¸ï¼")}).catch(()=>{t.close(),this.$toast("ç½ç»å¼å¸¸ï¼")})}}})}}},l=c,n=s(1656),u=(0,n.A)(l,i,o,!1,null,"7ff8ca1e",null),h=u.exports},3712:function(e,t,s){s.d(t,{GA:function(){return o},Li:function(){return a},M1:function(){return d},W1:function(){return c},Z1:function(){return r}});var i=s(8314);const o=(e={})=>(0,i.kN)("get","/ctfmall-common2-server/userAddress/getAddress",e),r=(e={})=>(0,i.kN)("post","/ctfmall-common2-server/userAddress/deleteAddress",e),a=(e={})=>(0,i.kN)("get","/ctfmall-common2-server/regin/getRegin",e),d=(e={})=>(0,i.kN)("post","/ctfmall-common2-server/userAddress/modifyAddress",e),c=(e={})=>(0,i.kN)("post","/ctfmall-common2-server/userAddress/createAddress",e)},3756:function(e,t,s){s.d(t,{A:function(){return u}});var i=function(){var e=this,t=e._self._c;return t("div",[t("el-drawer",{attrs:{visible:e.visible,"append-to-body":"",direction:"rtl","show-close":!1,"close-on-press-escape":!1,wrapperClosable:!1,withHeader:!1,size:"528px"},on:{"update:visible":function(t){e.visible=t},close:function(t){return e.handleClose("close")}}},[t("div",{staticClass:"pop"},[t("div",{staticClass:"hd"},[t("div",{staticClass:"tit font-title"},[e._v(e._s(e.title))]),t("div",{staticClass:"close cursor-pointer",on:{click:function(t){return e.handleClose("close")}}},[t("img",{attrs:{src:"https://cdn.ctfmall.com/goodsother/pc_close_v5.png",alt:""}})])]),t("div",{staticClass:"bd"},[t("el-scrollbar",{attrs:{noresize:"",wrapClass:"scroll-view"}},[t("div",{staticClass:"explain"},[e._v("请添å ä¸å½å
å°å°åï¼ä¸å½æ¸¯æ¾³å°å°åºåå
¶ä»å½å®¶å°åºä¸å¨é
éèå´å
")]),t("div",{staticClass:"form"},[t("el-form",{ref:"form",attrs:{model:e.form,rules:e.formRules}},[t("el-form-item",{attrs:{prop:"receiverName"}},[t("div",{staticClass:"input-wrap"},[t("div",{class:{textplaceholder:!0,fixed:e.receiverNameFocus||e.form.receiverName.length>0}},[e._v("请è¾å
¥æ¶ä»¶äººå§å")]),t("el-input",{staticClass:"custom-input",on:{focus:function(t){return e.handleFocus("receiverName")},blur:function(t){return e.handleBlur("receiverName")}},model:{value:e.form.receiverName,callback:function(t){e.$set(e.form,"receiverName",t)},expression:"form.receiverName"}})],1)]),t("el-form-item",{attrs:{prop:"mobilePhone"}},[t("div",{staticClass:"input-wrap"},[t("div",{class:{textplaceholder:!0,fixed:e.mobilePhoneFocus||e.form.mobilePhone.length>0}},[e._v("请è¾å
¥ææºå·")]),t("el-input",{staticClass:"custom-input",on:{focus:function(t){return e.handleFocus("mobilePhone")},blur:function(t){return e.handleBlur("mobilePhone")}},model:{value:e.form.mobilePhone,callback:function(t){e.$set(e.form,"mobilePhone",t)},expression:"form.mobilePhone"}})],1)]),t("el-form-item",{attrs:{prop:"provinceCode"}},[t("div",{staticClass:"input-wrap"},[t("div",{class:{textplaceholder:!0,fixed:!!e.form.provinceCode}},[e._v("è¯·éæ©æå¨ç")]),t("el-select",{attrs:{placeholder:"","popper-append-to-body":!1,"popper-options":{boundariesElement:"body"}},on:{change:e.provinceChange},model:{value:e.form.provinceCode,callback:function(t){e.$set(e.form,"provinceCode",t)},expression:"form.provinceCode"}},e._l(e.provinceList,function(e){return t("el-option",{key:e.ID,attrs:{label:e.Name,value:e.ID}})}),1),t("div",{staticClass:"select-arrow"},[t("img",{attrs:{src:"https://cdn.ctfmall.com/goodsother/pc_arrowr_v5.png",alt:""}})])],1)]),t("div",{staticClass:"layout"},[t("div",{staticClass:"layout-item"},[t("el-form-item",{attrs:{prop:"cityCode"}},[t("div",{staticClass:"input-wrap"},[t("div",{class:{textplaceholder:!0,fixed:!!e.form.cityCode}}
1,[e._v("è¯·éæ©æå¨å¸")]),t("el-select",{attrs:{placeholder:"","popper-append-to-body":!1,"popper-options":{boundariesElement:"body"}},on:{change:e.cityChange},model:{value:e.form.cityCode,callback:function(t){e.$set(e.form,"cityCode",t)},expression:"form.cityCode"}},e._l(e.useCityList,function(e){return t("el-option",{key:e.ID,attrs:{label:e.Name,value:e.ID}})}),1),t("div",{staticClass:"select-arrow"},[t("img",{attrs:{src:"https://cdn.ctfmall.com/goodsother/pc_arrowr_v5.png",alt:""}})])],1)])],1),t("div",{staticClass:"layout-item"},[t("el-form-item",{attrs:{prop:"districtCode"}},[t("div",{staticClass:"input-wrap"},[t("div",{class:{textplaceholder:!0,fixed:!!e.form.districtCode}},[e._v("è¯·éæ©æå¨åºãè¡é")]),t("el-select",{attrs:{placeholder:"","popper-append-to-body":!1,"popper-options":{boundariesElement:"body"}},model:{value:e.form.districtCode,callback:function(t){e.$set(e.form,"districtCode",t)},expression:"form.districtCode"}},e._l(e.useAreaList,function(e){return t("el-option",{key:e.ID,attrs:{label:e.Name,value:e.ID}})}),1),t("div",{staticClass:"select-arrow"},[t("img",{attrs:{src:"https://cdn.ctfmall.com/goodsother/pc_arrowr_v5.png",alt:""}})])],1)])],1)]),t("el-form-item",{attrs:{prop:"street"}},[t("div",{staticClass:"input-wrap"},[t("div",{class:{textplaceholder:!0,fixed:e.streetFocus||e.form.street.length>0}},[e._v("请è¾å
¥è¯¦ç»å°å")]),t("el-input",{staticClass:"custom-input",on:{focus:function(t){return e.handleFocus("street")},blur:function(t){return e.handleBlur("street")}},model:{value:e.form.street,callback:function(t){e.$set(e.form,"street",t)},expression:"form.street"}})],1)]),t("el-form-item",{staticClass:"el-form-item-default",attrs:{prop:"isDefault"}},[t("div",{staticClass:"is-default cursor-pointer",on:{click:e.handleDefault}},[t("div",{class:["custom-checkbox",1==e.form.isDefault?"checked":""]}),t("p",[e._v("设置为é»è®¤æ¶è´§å°å")])])])],1)],1)])],1),t("div",{staticClass:"fd"},[t("div",{staticClass:"opera"},[t("div",{staticClass:"common-btn common-btn-fill-red-1",on:{click:e.handleConfirm}},[e._v("ä¿åå°å")])])])])])],1)},o=[],r=s(5353),a=s(3712),d={data(){const e=(e,t,s)=>{if(!t)return s(new Error("请è¾å
¥æ¨çææºå·ç "));{const e=/^1\d{10}$/;if(!e.test(t))return s(new Error("请è¾å
¥æ£ç¡®çææºå·"));s()}};return{visible:!1,title:"æ·»å æ°å°å",type:"add",form:{mobilePhone:"",receiverName:"",provinceCode:"",districtCode:"",cityCode:"",street:"",note:"",postalCode:"",isDefault:0},formRules:{receiverName:[{required:!0,message:"请è¾å
¥æ¶è´§äººå§å",trigger:"blur"}],mobilePhone:[{validator:e,trigger:"blur"}],provinceCode:[{required:!0,message:"è¯·éæ©",trigger:"change"}],cityCode:[{required:!0,message:"è¯·éæ©",trigger:"change"}],districtCode:[{required:!0,message:"è¯·éæ©",trigger:"change"}],street:[{required:!0,message:"请è¾å
¥æ¨è¯¦ç»å¡«åæ¶è´§å°å",trigger:"blur"}]},receiverNameFocus:!1,mobilePhoneFocus:!1,streetFocus:!1,addressId:0,dataList:[],provinceList:[],useCityList:[],useAreaList:[],cb:null}},computed:{...(0,r.L8)(["userInfo"])},methods:{showModal(e={}){this.cb="function"==typeof e.success?e.success:null,this.form=this.$options.data().form,this.receiverNameFocus=!1,this.mobilePhoneFocus=!1,this.streetFocus=!1,this.addressId=0,this.title="æ·»å æ°å°å",this.type="add",e.address&&e.address.id&&(this.form.receiverName=e.address.receiverName,this.form.mobilePhone=e.address.mobilePhone,this.form.provinceCode=e.address.provinceCode,this.form.cityCode=e.address.cityCode,this.form.districtCode=e.address.districtCode,this.form.street=e.address.street,this.form.note=e.address.note,this.form.isDefault=e.address.isDefault,this.addressId=e.address.id,this.title="ç¼è¾æ¶è´§å°å",this.type="edit"),this.getregionList().then(()=>{this.visible=!0,this.$nextTick(()=>{this.$refs.form&&this.$refs.form.clearValidate()}),"edit"==this.type&&this.$nextTick(()=>{this.provinceChange(this.form.provinceCode,!0),this.cityChange(this.form.cityCode,!0)})}).catch(()=>{this.$toast("çå¸åºæ°æ®è·å失败")})},hideModal(){this.visible=!1},handleClose(e,t=null){this.hideModal(),"function"==typeof this.cb&&this.cb(e,t)},getregionList(){return new Promise((e,t)=>
1{if(this.useCityList=[],this.useAreaList=[],this.dataList.length>0)e();else{const s=this.$loading({lock:!0});(0,a.Li)().then(i=>{i.data&&i.data.length>0?(this.dataList=i.data,i.data.map(e=>{1==e.PID&&this.provinceList.push(e)}),s.close(),e()):(s.close(),t())}).catch(()=>{s.close(),t()})}})},handleFocus(e){this[e+"Focus"]=!0},handleBlur(e){this[e+"Focus"]=!1},provinceChange(e,t){t||(this.useCityList=[],this.useAreaList=[],this.form.cityCode="",this.form.districtCode=""),this.useCityList=this.dataList.filter(t=>t.PID===e)},cityChange(e,t){t||(this.form.districtCode="",this.useAreaList=[]),this.useAreaList=this.dataList.filter(t=>t.PID===e)},handleDefault(){this.form.isDefault=1^this.form.isDefault},handleConfirm(){this.$refs.form.validate(e=>{if(!e)return console.log("error submit!!"),!1;{const e=this.$loading({lock:!0});let t={...this.form,uid:this.userInfo.uid};"edit"==this.type?(t.addressId=this.addressId,(0,a.M1)(t).then(t=>{e.close(),200==t.code?(this.$toast("ç¼è¾æå"),this.handleClose("success")):this.$toast(t[0].retmsg||"ç½ç»é误")}).catch(()=>{e.close(),this.$toast("ç½ç»é误")})):(0,a.W1)(t).then(s=>{e.close(),200==s.code?(this.$toast("æ°å¢æå"),this.handleClose("success",{AddressID:s.data.AddressID,CityCode:t.cityCode,CityName:this.useCityList.find(e=>e.ID==t.cityCode).Name,DistrictCode:t.districtCode,DistrictName:this.useAreaList.find(e=>e.ID==t.districtCode).Name,Email:"",IsDefault:t.isDefault,IsDelivery:1,MobilePhone:t.mobilePhone,Note:"",Phone:"",ProvinceCode:t.provinceCode,ProvinceName:this.provinceList.find(e=>e.ID==t.provinceCode).Name,ReciverName:t.receiverName,Street:t.street,ZipCode:""})):this.$toast(s[0].retmsg||"ç½ç»é误")}).catch(()=>{e.close(),this.$toast("ç½ç»é误")})}})}}},c=d,l=s(1656),n=(0,l.A)(c,i,o,!1,null,"0e37f312",null),u=n.exports}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.