2 lines
2.5 KiB
JavaScript
2 lines
2.5 KiB
JavaScript
|
"use strict";var e=Object.defineProperty,a=Object.defineProperties,r=Object.getOwnPropertyDescriptors,t=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,s=(a,r,t)=>r in a?e(a,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[r]=t;const n=require("../../../common/vendor.js"),d=require("../../../sheep/index.js"),u={__name:"addressSelection",props:{modelValue:{type:Object,default(){}}},emits:["update:modelValue"],setup(e,{emit:u}){const p=e,i=u,v=n.computed({get:()=>new Proxy(p.modelValue,{set(e,n,d){var u;return i("update:modelValue",(u=((e,a)=>{for(var r in a||(a={}))l.call(a,r)&&s(e,r,a[r]);if(t)for(var r of t(a))o.call(a,r)&&s(e,r,a[r]);return e})({},e),a(u,r({[n]:d})))),!0}}),set(e){i("update:modelValue",e)}});function c(){let e="SELECT_ADDRESS",a="/modules/mall/user/address/list?type=select";2===v.value.deliveryType&&(e="SELECT_PICK_UP_INFO",a="/modules/mall/user/goods_details_store/index"),n.index.$once(e,(e=>{!function(){return a=this,r=arguments,t=function*(e={}){n.isEmpty(e)||(1===v.value.deliveryType&&(v.value.addressInfo=e),2===v.value.deliveryType&&(v.value.pickUpInfo=e))},new Promise(((l,o)=>{var s=a=>{try{d(t.next(a))}catch(e){o(e)}},n=a=>{try{d(t.throw(a))}catch(e){o(e)}},d=e=>e.done?l(e.value):Promise.resolve(e.value).then(s,n);d((t=t.apply(a,r)).next())}));var a,r,t}(e.addressInfo)})),d.sheep.$router.go(a)}const f=e=>{v.value.deliveryType=e};return(e,a)=>n.e({a:v.value.isPickUp},v.value.isPickUp?{b:n.n(1===v.value.deliveryType?"on":"on2"),c:n.o((e=>f(1)))}:{},{d:v.value.isPickUp},v.value.isPickUp?{e:n.n(2===v.value.deliveryType?"on":"on2"),f:n.o((e=>f(2)))}:{},{g:1===v.value.deliveryType},1===v.value.deliveryType?n.e({h:v.value.addressInfo.name},v.value.addressInfo.name?n.e({i:n.t(v.value.addressInfo.name),j:n.t(v.value.addressInfo.mobile),k:v.value.addressInfo.defaultStatus},(v.value.addressInfo.defaultStatus,{}),{l:n.t(v.value.addressInfo.areaName),m:n.t(v.value.addressInfo.detailAddress)}):{},{n:n.o(c),o:n.s(v.value.isPickUp?"":"border-top-left-radius: 14rpx;border-top-right-radius: 14rpx;")}):n.e({p:v.value.pickUpInfo.name},v.value.pickUpInfo.name?{q:n.t(v.value.pickUpInfo.name),r:n.t(v.value.pickUpInfo.phone),s:n.t(v.value.pickUpInfo.areaName),t:n.t(", "+v.value.pickUpInfo.detailAddress)}:{},{v:n.o(c)}),{w:n.unref(d.sheep).$url.static("/static/images/line.png","local"),x:n.s(v.value.isPickUp?"":"padding-top:10rpx;")})}},p=n._export_sfc(u,[["__scopeId","data-v-0771caaf"]]);wx.createComponent(p);
|