egdnmxzs.com Open in urlscan Pro
148.66.4.226  Public Scan

Submitted URL: http://egdnmxzs.com/js/chunk-51454bdc.345778df.js
Effective URL: https://egdnmxzs.com/js/chunk-51454bdc.345778df.js
Submission: On July 05 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-51454bdc"],{"68ee":function(t,e,s){"use strict";s("d748")},"8b24":function(t,e,s){"use strict";s.r(e);var n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"page-body address-content"},[s("van-nav-bar",{staticClass:"header",attrs:{title:t.$t("收货地址"),fixed:"","z-index":"999","left-arrow":""},on:{"click-left":function(e){return t.$router.back()}}}),s("div",{staticClass:"address mt-2"},[t.list&&0!==t.list.length?s("div",[s("div",{staticClass:"address_have_ul",staticStyle:{padding:"0 20px"}},t._l(t.list,(function(e,n){return s("div",{key:n,staticClass:"address_have_li",style:"select"===t.action?"border: 1px solid red;":"",on:{click:function(s){"select"===t.action&&t.$emit("select",e)}}},[s("div",{staticStyle:{width:"100%"},on:{click:function(s){return t.clickAddress(e)}}},[s("div",{staticClass:"d-flex justify-between"},[s("span",[t._v(t._s(t.$t("收货人"))+":"+t._s(e.username))]),e.isDefault?s("span",{staticClass:"text-red"},[t._v(t._s(t.$t("默认")))]):t._e()]),s("div",[t._v(t._s(t.$t("手机号"))+":"+t._s(e.phone))]),s("div",[t._v(t._s(t.$t("详细地址"))+":"+t._s(e.address))])]),s("div",{staticStyle:{"margin-top":"5px"}},[s("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(s){return t.edit(e)}}},[t._v(t._s(t.$t("编辑"))+"\n            ")]),s("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(s){return t.del(e.id)}}},[t._v(t._s(t.$t("删除"))+"\n            ")])],1)])})),0)]):s("van-empty",{attrs:{description:t.$t("没有更多数据")}}),t.list.length<(t.paramMapAll["USER_ADDRESS_LIMIT"]||20)?s("div",{staticStyle:{margin:"16px"}},[s("van-button",{attrs:{small:"",round:"",block:"",type:"primary"},on:{click:function(e){return t.add()}}},[t._v(t._s(t.$t("添加"))+"\n      ")])],1):t._e(),s("van-dialog",{staticStyle:{"overflow-y":"scroll"},attrs:{title:t.$t("地址"),width:"90%","show-confirm-button":!1,"close-on-click-overlay":""},model:{value:t.showEdit,callback:function(e){t.showEdit=e},expression:"showEdit"}},[s("van-form",{on:{submit:t.save}},[s("van-field",{attrs:{label:t.$t("收货人"),placeholder:t.$t("请输入")+t.$t("收货人"),required:""},model:{value:t.addressInfo.username,callback:function(e){t.$set(t.addressInfo,"username","string"===typeof e?e.trim():e)},expression:"addressInfo.username"}}),s("van-field",{attrs:{label:t.$t("手机号"),placeholder:t.$t("请输入")+t.$t("手机号"),required:""},model:{value:t.addressInfo.phone,callback:function(e){t.$set(t.addressInfo,"phone","string"===typeof e?e.trim():e)},expression:"addressInfo.phone"}}),s("van-field",{attrs:{label:t.$t("详细地址"),placeholder:t.$t("请输入")+t.$t("详细地址"),required:""},model:{value:t.addressInfo.address,callback:function(e){t.$set(t.addressInfo,"address","string"===typeof e?e.trim():e)},expression:"addressInfo.address"}}),s("van-field",{attrs:{label:t.$t("是否默认")},scopedSlots:t._u([{key:"input",fn:function(){return[s("van-switch",{attrs:{size:"20"},model:{value:t.addressInfo.isDefault,callback:function(e){t.$set(t.addressInfo,"isDefault",e)},expression:"addressInfo.isDefault"}})]},proxy:!0}])}),s("div",{staticStyle:{margin:"16px"}},[s("van-button",{attrs:{loading:t.submiting,small:"",round:"",block:"",type:"primary","native-type":"submit","loading-text":t.$t("提交中")}},[t._v("\n            "+t._s(t.$t("提交"))+"\n          ")])],1)],1)],1)],1)],1)},i=[],a=s("a34a"),r=s.n(a),o=s("b775");function d(){return Object(o["a"])({url:"/user/address/list",method:"get"})}function l(){return Object(o["a"])({url:"/user/address/default",method:"get"})}function c(t){return Object(o["a"])({url:"/user/address/save",method:"post",data:t})}function u(t){return Object(o["a"])({url:"/user/address/"+t+"/delete",method:"post"})}function f(t,e,s,n,i,a,r){try{var o=t[a](r),d=o.value}catch(l){return void s(l)}o.done?e(d):Promise.resolve(d).then(n,i)}function h(t){return function(){var e=this,s=arguments;return new Promise((function(n,i){var a=t.apply(e,s);function r(t){f(a,n,i,r,o,"next",t)}function o(t){f(a,n,i,r,o,"throw",t)}r(void 0)}))}}var v={name:"UserAddress",computed:{},filters:{},props:{action:null},data:function(){return{list:[],submiting:!1,loading:!1,showEdit:!1,fromPath:null,finished:!1,selectAddressFlag:!1,fromAction:null,addressInfo:{id:null,username:null,phone:null,address:null,isDefault:!0}}},beforeRouteEnter:function(t,e,s){s((function(t){t.fromPath=e}))},created:function(){this.flag=this.$route.query.flag,this.fromAction=this.$route.query.fromAction,this.getList()},methods:{clickAddress:function(t){this.flag&&(this.fromPath.query.selectAddress=t,this.$router.push(this.fromPath))},getDefault:function(){var t=this;l().then((function(e){t.addressInfo=e.data}))},save:function(){var t=this;c(this.addressInfo).then((function(e){t.$message.success(t.$t("save_success")),t.showEdit=!1,t.getList()}))},validPhone:function(t){return/^\d{5,}$/.test(t)},getList:function(){var t=h(r.a.mark((function t(){var e;return r.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.loading){t.next=2;break}return t.abrupt("return");case 2:return this.loading=!0,t.next=5,d();case 5:e=t.sent.data,this.list=e||[],this.finished=!0,this.loading=!1;case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),add:function(){this.showEdit=!0,this.addressInfo={}},edit:function(t){this.addressInfo=t,this.showEdit=!0},del:function(t){var e=this;this.$dialog.confirm({message:this.$t("是否确认删除")}).then((function(){u(t).then((function(t){e.getList()}))})).catch((function(){}))}}},p=v,m=(s("68ee"),s("2877")),b=Object(m["a"])(p,n,i,!1,null,"6a340a0e",null);e["default"]=b.exports},d748:function(t,e,s){}}]);