杨总惠通宝
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
htb_backend/public/static/js/pages-users-user_address-in...

1 lines
36 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_address-index"],{"00aa":function(t,e,n){"use strict";n.r(e);var i=n("f452"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"111c":function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.arrivalNoticeApi=function(t){return a.default.post("store/product/increase_take",t)},e.bagExplain=function(){return a.default.get("store/product/bag/explain")},e.bagRecommend=function(){return a.default.get("product/spu/bag/recommend")},e.collectAdd=function(t){return a.default.post("user/relation/create",t)},e.collectAll=function(t){return a.default.post("user/relation/batch/create",t)},e.collectDel=function(t){return a.default.post("user/relation/delete",t)},e.copyPasswordApi=function(t){return a.default.get("product/spu/copy",t,{noAuth:!0})},e.copyPasswordSearch=function(t){return a.default.get("command/copy",t,{noAuth:!0})},e.create=function(t){return a.default.post("intention/create",t)},e.discountsCartAdd=function(t){return a.default.post("user/cart/batchCreate",t)},e.express=function(t){return a.default.post("ordero/express/"+t,{noAuth:!0})},e.followStore=function(t){return a.default.post("user/relation/create",{type:10,type_id:t})},e.getApplicationRecordList=function(t){return a.default.get("intention/lst",t)},e.getBrandlist=function(t){return a.default.get("store/product/brand/lst",t,{noAuth:!0})},e.getBroadcastListApi=function(t){return a.default.get("broadcast/lst",t,{noAuth:!0})},e.getCaptcha=function(){return a.default.get("captcha")},e.getCategoryList=function(){return a.default.get("store/product/category/lst",{},{noAuth:!0})},e.getCollectUserList=function(t){return a.default.get("user/relation/product/lst",t)},e.getCouponProductlist=function(t){t.brand_id&&Array.isArray(t.brand_id)&&(t=(0,o.default)({},t),t.brand_id=t.brand_id.toString());return a.default.get("product/spu/coupon_product",t,{noAuth:!0})},e.getDiscountsLst=function(t){return a.default.get("discounts/lst",t,{noAuth:!0})},e.getGeocoder=function(t){return a.default.get("lbs/geocoder?location=".concat(t.lat,",").concat(t.long),{},{noAuth:!0})},e.getGoodsDetails=function(t){return a.default.get("intention/detail/"+t,{})},e.getGroomList=function(t,e){return a.default.get("product/spu/hot/"+t,e,{noAuth:!0})},e.getHotBanner=function(t){return a.default.get("common/hot_banner/"+t,{},{noAuth:!0})},e.getLiveList=function(t){return a.default.get("broadcast/hot",t,{noAuth:!0})},e.getMerProductHot=function(t,e){return a.default.get("product/spu/recommend",{page:void 0===e.page?1:e.page,limit:void 0===e.limit?10:e.limit,mer_id:t||""},{noAuth:!0})},e.getMerchantLst=function(t){return a.default.get("user/relation/merchant/lst",t,{noAuth:!0})},e.getPresellProductDetail=function(t){return a.default.get("store/product/presell/detail/"+t,{},{noAuth:!0})},e.getPreviewProDetail=function(t){return a.default.get("store/product/preview",t,{noAuth:!0})},e.getProductCode=function(t,e){return a.default.get("store/product/qrcode/"+t,e)},e.getProductDetail=function(t){return a.default.get("store/product/detail/"+t,{},{noAuth:!0})},e.getProductHot=function(t,e){return a.default.get("product/spu/recommend",{page:void 0===t?1:t,limit:void 0===e?10:e},{noAuth:!0})},e.getProductslist=function(t){t.brand_id&&Array.isArray(t.brand_id)&&(t=(0,o.default)({},t),t.brand_id=t.brand_id.toString());return a.default.get("product/spu/lst",t,{noAuth:!0})},e.getReplyConfig=function(t){return a.default.get("reply/config/"+t)},e.getReplyList=function(t,e){return a.default.get("store/product/reply/lst/"+t,e,{noAuth:!0})},e.getSearchKeyword=function(){return a.default.get("common/hot_keyword",{},{noAuth:!0})},e.getSeckillProductDetail=function(t){return a.default.get("store/product/seckill/detail/"+t,{},{noAuth:!0})},e.getStoreCategory=function(t,e){return a.default.get("store/merchant/category/lst/"+t,e,{noAuth:!0})},e.getStoreCoupon=function(t){return a.default.get("coupon/store/"+t,{noAuth:!0})},e.getStoreDetail=function(t,e){return a.default.get("store/merchant/detail/"+t,e,{noAuth:!0})},e.getStoreGoods=function(t,e){return a.default.get("product/spu/merchant/"+t,e,{noAuth:!0})},e.getStoreTypeApi=function(){return a.default.get("intention/type",{},{noAuth:!0})},e.merClassifly=function(){return a.default.get("intention/cate",{},{noAuth:!0})},e.merchantProduct=function(t,e){e.brand_id&&Array.isArray(e.brand_id)&&(e=(0,o.default)({},e),e.brand_id=e.brand_id.toString());return a.default.get("product/spu/merchant/"+t,e,{noAuth:!0})},e.merchantQrcode=function(t,e){return a.default.get("store/merchant/qrcode/"+t,e,{noAuth:!0})},e.postCartAdd=function(t){return a.default.post("user/cart/create",t)},e.priceRuleApi=function(t){return a.default.get("store/product/price_rule/".concat(t),{},{noAuth:!0})},e.productBag=function(t){return a.default.get("product/spu/bag",t,{noAuth:!0})},e.storeCategory=function(t){return a.default.get("store/product/category",t,{noAuth:!0})},e.storeCertificate=function(t){return a.default.post("store/certificate/".concat(t.merId),t)},e.storeListApi=function(t){return a.default.get("store_list",t,{noAuth:!0})},e.storeMerchantList=function(t){return a.default.get("store/merchant/lst",t,{noAuth:!0})},e.storeServiceList=function(t,e){return a.default.get("product/spu/local/".concat(t),e,{noAuth:!0})},e.unfollowStore=function(t){return a.default.post("user/relation/delete",{type:10,type_id:t})},e.updateGoodsRecord=function(t,e){return a.default.post("intention/update/"+t,e)},e.userCollectDel=function(t){return a.default.post("user/relation/batch/delete",t)},e.verify=function(t){return a.default.post("auth/verify",t)},n("d401"),n("d3b7"),n("25f0"),n("99af");var o=i(n("5530")),a=i(n("b5ef"))},"1bc3":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.address-window[data-v-259e30b0]{background-color:#fff;position:fixed;bottom:0;left:0;width:100%;z-index:101;border-radius:%?30?% %?30?% 0 0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9)}.address-window.on[data-v-259e30b0]{-webkit-transform:translateZ(0);transform:translateZ(0)}.address-window .title[data-v-259e30b0]{font-size:%?32?%;font-weight:700;text-align:center;height:%?123?%;line-height:%?123?%;position:relative}.address-window .title .iconfont[data-v-259e30b0]{position:absolute;right:%?30?%;color:#8a8a8a;font-size:%?35?%}.address-count .address-selected[data-v-259e30b0]{padding:0 %?30?%;margin-top:%?10?%;position:relative;padding-bottom:%?20?%;border-bottom:%?2?% solid #f7f7f7}.address-count .selected-list[data-v-259e30b0]{font-size:%?26?%;color:#282828;line-height:%?50?%;padding-bottom:%?10?%;padding-left:%?60?%;position:relative}.address-count .selected-list.active[data-v-259e30b0]{color:#e28d54}.address-count .selected-list[data-v-259e30b0]:before, .address-count .selected-list[data-v-259e30b0]:after{content:"";display:block;position:absolute}.address-count .selected-list[data-v-259e30b0]:before{width:%?4?%;height:100%;background-color:var(--view-theme);top:0;left:%?10?%}.address-count .selected-list[data-v-259e30b0]:after{width:%?12?%;height:%?12?%;background:var(--view-theme);border-radius:100%;left:%?6?%;top:50%;margin-top:%?-8?%}.address-count .selected-list[data-v-259e30b0]:first-child:before, .address-count .selected-list[data-v-259e30b0]:last-child:before{height:50%}.address-count .selected-list[data-v-259e30b0]:first-child:before{top:auto;bottom:0}.address-count .selected-list .iconfont[data-v-259e30b0]{font-size:%?20?%;float:right;color:#ddd}.address-count uni-scroll-view[data-v-259e30b0]{height:%?550?%}.address-count .address-list[data-v-259e30b0]{padding:0 %?30?%;margin-top:%?20?%;box-sizing:border-box}.address-count .address-list .list .iconfont[data-v-259e30b0]{float:right;color:#ddd;font-size:%?22?%}.address-count .address-list .list .item-name[data-v-259e30b0]{display:inline-block;line-height:%?50?%;margin-bottom:%?20?%;font-size:%?26?%}.address-count .address-list .list.active[data-v-259e30b0]{color:#e28d54}.address-count .address-list .list.active .iconfont[data-v-259e30b0]{color:#e28d54}',""]),t.exports=e},"1c6c":function(t,e,n){"use strict";var i=n("d630"),o=n.n(i);o.a},2909:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,i.default)(t)||(0,o.default)(t)||(0,a.default)(t)||(0,s.default)()};var i=r(n("6005")),o=r(n("db90")),a=r(n("06c5")),s=r(n("3427"));function r(t){return t&&t.__esModule?t:{default:t}}},"306c":function(t,e,n){var i=n("bddf");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("1e5627fe",i,!0,{sourceMap:!1,shadowMode:!1})},3427:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},n("d9e2"),n("d401")},"493d":function(t,e,n){"use strict";n.r(e);var i=n("e933"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"4ace":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{style:t.viewColor},[n("v-uni-form",{attrs:{"report-submit":"true"},on:{submit:function(e){arguments[0]=e=t.$handleEvent(e),t.formSubmit.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"addAddress"},[n("v-uni-view",{staticClass:"list"},[n("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[n("v-uni-view",{staticClass:"name"},[t._v("姓名")]),n("v-uni-input",{attrs:{type:"text",placeholder:"请输入姓名",name:"real_name",value:t.userAddress.real_name,"placeholder-class":"placeholder"}})],1),n("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[n("v-uni-view",{staticClass:"name"},[t._v("联系电话")]),n("v-uni-input",{attrs:{type:"text",placeholder:"请输入联系电话",name:"phone",value:t.userAddress.phone,"placeholder-class":"placeholder"}})],1),n("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[n("v-uni-view",{staticClass:"name"},[t._v("所在地区")]),n("v-uni-view",{staticClass:"region"},[n("v-uni-view",{staticClass:"region_count",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeRegion.apply(void 0,arguments)}}},[t.addressInfo.length?n("v-uni-text",[t._v(t._s(t.addressText))]):n("v-uni-text",{staticStyle:{color:"#cdcdcd"}},[t._v("请选择地址")]),n("v-uni-text",{staticClass:"iconfont icon-xiangyou"})],1)],1)],1),n("v-uni-view",{staticClass:"item acea-row row-between-wrapper"},[n("v-uni-view",{staticClass:"name"},[t._v("详细地址")]),n("v-uni-input",{staticClass:"location-input",attrs:{type:"text",placeholder:"请填写具体地址",name:"detail","placeholder-class":"placeholder"},model:{value:t.userAddress.detail,callback:function(e){t.$set(t.userAddress,"detail",e)},expression:"userAddress.detail"}}),n("v-uni-view",{staticClass:"location",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.selfLocation.apply(void 0,arguments)}}},[n("v-uni-text",{staticClass:"iconfont icon-chakanditu"}),n("br"),t._v("定位")],1)],1)],1),n("v-uni-view",{staticClass:"default acea-row row-middle"},[n("v-uni-checkbox-group",{on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.ChangeIsDefault.apply(void 0,arguments)}}},[n("v-uni-checkbox",{attrs:{checked:!!t.userAddress.is_default}}),t._v("设置为默认地址")],1)],1),n("v-uni-button",{staticClass:"keepBnt",attrs:{"form-type":"submit"}},[t._v("立即保存")]),this.$wechat.isWeixin()&&!t.address_id?n("v-uni-view",{staticClass:"wechatAddress",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.getAddress.apply(void 0,arguments)}}},[t._v("导入微信地址")]):t._e()],1)],1),n("areaWindow",{ref:"areaWindow",attrs:{display:t.display,address:t.addressInfo},on:{submit:function(e){arguments[0]=e=t.$handleEvent(e),t.OnChangeAddress.apply(void 0,arguments)},changeClose:function(e){arguments[0]=e=t.$handleEvent(e),t.changeClose.apply(void 0,arguments)}}}),n("authorize",{attrs:{isAuto:t.isAuto,isShowAuth:t.isShowAuth},on:{onLoadFun:function(e){arguments[0]=e=t.$handleEvent(e),t.onLoadFun.apply(void 0,arguments)},authColse:function(e){arguments[0]=e=t.$handleEvent(e),t.authColse.apply(void 0,arguments)}}})],1)},o=[]},5701:function(t,e,n){var i=n("1bc3");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("16641f80",i,!0,{sourceMap:!1,shadowMode:!1})},6005:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(Array.isArray(t))return(0,i.default)(t)};var i=function(t){return t&&t.__esModule?t:{default:t}}(n("6b75"))},6049:function(t,e,n){"use strict";n.r(e);var i=n("8984"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},6284:function(t,e,n){"use strict";n.r(e);var i=n("4ace"),o=n("6049");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("eab0");var s=n("f0c5"),r=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,"60592bdc",null,!1,i["a"],void 0);e["default"]=r.exports},"6db5":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{style:t.viewColor},[n("v-uni-view",{staticClass:"address-window",class:1==t.display?"on":""},[n("v-uni-view",{staticClass:"title"},[t._v("请选择所在地区"),n("v-uni-text",{staticClass:"iconfont icon-guanbi",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)}}})],1),n("v-uni-view",{staticClass:"address-count"},[n("v-uni-view",{staticClass:"address-selected"},[t._l(t.selectedArr,(function(e,i){return n("v-uni-view",{key:i,staticClass:"selected-list",class:{active:i===t.selectedIndex},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.change(e.parent_id,i)}}},[t._v(t._s(e.name)),n("v-uni-text",{staticClass:"iconfont icon-xiangyou"})],1)})),t.showMore?n("v-uni-view",{staticClass:"selected-list",class:{active:-1===t.selectedIndex},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.change(-1,-1)}}},[n("v-uni-text",{staticClass:"iconfont icon-xiangyou"}),t._v("请选择")],1):t._e()],2),n("v-uni-scroll-view",{staticClass:"address-list",attrs:{"scroll-y":"true","scroll-top":t.scrollTop},on:{scroll:function(e){arguments[0]=e=t.$handleEvent(e),t.scroll.apply(void 0,arguments)}}},t._l(t.addressList,(function(e,i){return n("v-uni-view",{key:i,staticClass:"list",class:{active:e.id===t.activeId},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.selected(e)}}},[n("v-uni-text",{staticClass:"item-name"},[t._v(t._s(e.name))]),e.id===t.activeId?n("v-uni-text",{staticClass:"iconfont icon-duihao2"}):t._e()],1)})),1)],1)],1),n("v-uni-view",{staticClass:"mask",attrs:{catchtouchmove:"true",hidden:0==t.display},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)}}})],1)},o=[]},"75fe":function(t,e,n){"use strict";var i=n("5701"),o=n.n(i);o.a},8984:function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("d81d"),n("d401"),n("d3b7"),n("25f0"),n("ac1f"),n("00b4");var o=i(n("5530")),a=n("c6c3"),s=n("ef5b"),r=n("26cb"),d=i(n("f41b")),u=n("111c"),c=i(n("f272")),l={components:{areaWindow:d.default,authorize:c.default},data:function(){return{cartId:"",pinkId:0,couponId:0,address_id:0,userAddress:{is_default:!1},region:["省","市","区"],valueRegion:[0,0,0],isAuto:!1,isShowAuth:!1,district:[],multiArray:[],multiIndex:[0,0,0],cityId:0,display:!1,addressInfo:[],latitude:"",longitude:""}},computed:(0,o.default)((0,o.default)({},(0,r.mapGetters)(["isLogin","viewColor"])),{},{addressText:function(){return this.addressInfo.map((function(t){return t.name})).join("/")}}),onLoad:function(t){this.isLogin?(this.cartId=t.cartId||"",this.pinkId=t.pinkId||0,this.couponId=t.couponId||0,this.address_id=t.id||0,uni.setNavigationBarTitle({title:t.id?"修改地址":"添加地址"}),this.getUserAddress(),this.getCityList()):(this.isAuto=!0,this.isShowAuth=!0)},methods:{OnChangeAddress:function(t){this.addressInfo=t},getCityList:function(){var t=this;(0,s.getCityV2)(0).then((function(e){t.district=e.data}))},changeRegion:function(){this.display=!0},changeClose:function(){this.display=!1},onLoadFun:function(){this.isShowAuth=!1,this.getUserAddress()},authColse:function(t){this.isShowAuth=t},toggleTab:function(t){this.$refs[t].show()},onConfirm:function(t){this.region=t.checkArr[0]+"-"+t.checkArr[1]+"-"+t.checkArr[2]},getUserAddress:function(){if(!this.address_id)return!1;var t=this;(0,a.getAddressDetail)(this.address_id).then((function(e){var n=[e.data.province,e.data.city,e.data.district];t.$set(t,"userAddress",e.data),t.$set(t,"region",n),t.city_id=e.data.city_id,t.addressInfo=e.data.area}))},getWxAddress:function(){var t=this;uni.authorize({scope:"scope.address",success:function(e){uni.chooseAddress({success:function(e){(0,s.getCityList)(e.provinceName+"/"+e.cityName+"/"+e.countyName).then((function(e){t.addressInfo=e.data})),t.userAddress.real_name=e.userName,t.userAddress.phone=e.telNumber,t.userAddress.detail=e.detailInfo},fail:function(e){if(uni.showToast({title:e.errMsg,icon:"none",duration:1e3}),"chooseAddress:cancel"==e.errMsg)return t.$util.Tips({title:"取消选择"})}})},fail:function(e){uni.showModal({title:"您已拒绝导入微信地址权限",content:"是否进入权限管理,调整授权?",success:function(e){if(e.confirm)uni.openSetting({success:function(t){}});else if(e.cancel)return t.$util.Tips({title:"已取消!"})}})}})},getAddress:function(){var t=this;t.$wechat.openAddress().then((function(e){(0,s.getCityList)(e.provinceName+"/"+e.cityName+"/"+e.countryName).then((function(e){t.addressInfo=e.data})),t.userAddress.real_name=e.userName,t.userAddress.phone=e.telNumber,t.userAddress.detail=e.detailInfo})).catch((function(t){}))},selfLocation:function(){var t=this;uni.showLoading({title:"定位中",mask:!0}),uni.getLocation({type:"gcj02",success:function(e){var n,i;n=e.latitude.toString(),i=e.longitude.toString(),t.latitude=e.latitude,t.longitude=e.longitude,(0,u.getGeocoder)({lat:n,long:i}).then((function(e){var n=e.data;(0,s.getCityList)(n.address_component.province+"/"+n.address_component.city+"/"+n.address_component.district+"/"+(n.address_reference.town?n.address_reference.town.title:"")).then((function(e){t.addressInfo=e.data,t.$set(t.userAddress,"detail",n.formatted_addresses.recommend),uni.hideLoading()})).catch((function(t){uni.hideLoading(),uni.showToast({title:"定位失败,请手动输入地址",icon:"none",duration:1e3})}))})).catch((function(t){uni.hideLoading(),uni.showToast({title:"定位失败,请手动输入地址",icon:"none",duration:1e3})}))},fail:function(t){uni.hideLoading(),uni.showToast({title:t.errMsg,icon:"none",duration:1e3})}})},formSubmit:function(t){var e=this,n=t.detail.value;return n.real_name?n.phone?/^1(3|4|5|7|8|9|6)\d{9}$/i.test(n.phone)?e.addressInfo.length?n.detail?(n.address_id=e.address_id,n.is_default=e.userAddress.is_default?1:0,n.area=e.addressInfo,uni.showLoading({title:"保存中",mask:!0}),void(0,a.editAddress)(n).then((function(t){e.id?e.$util.Tips({title:"修改成功",icon:"success"}):e.$util.Tips({title:"添加成功",icon:"success"}),setTimeout((function(){if(!e.cartId)return history.back();var n=e.cartId,i=e.pinkId,o=e.couponId;e.cartId="",e.pinkId="",e.couponId="",uni.$emit("updataAddress"),uni.navigateTo({url:"/pages/users/order_confirm/index?cartId="+n+"&addressId="+(e.id?e.id:t.data.address_id)+"&pinkId="+i+"&couponId="+o})}),1e3)})).catch((function(t){return e.$util.Tips({title:t})}))):e.$util.Tips({title:"请填写详细地址"}):e.$util.Tips({title:"请选择所在地区"}):e.$util.Tips({title:"请输入正确的手机号码"}):e.$util.Tips({title:"请填写联系电话"}):e.$util.Tips({title:"请填写收货人姓名"})},ChangeIsDefault:function(t){this.$set(this.userAddress,"is_default",!this.userAddress.is_default)}}};e.default=l},a296:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.Popup[data-v-ac292046]{flex:1;align-items:center;justify-content:center;width:%?500?%;background-color:#fff;position:fixed;top:%?500?%;left:%?125?%;z-index:1000}.Popup .logo-auth[data-v-ac292046]{z-index:-1;position:absolute;left:50%;top:0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:%?150?%;height:%?150?%;display:flex;align-items:center;justify-content:center;border:%?8?% solid #fff;border-radius:50%;background:#fff}.Popup .image[data-v-ac292046]{height:%?42?%;margin-top:%?-54?%}.Popup .title[data-v-ac292046]{font-size:%?28?%;color:#000;text-align:center;margin-top:%?30?%;align-items:center;justify-content:center;width:%?500?%;display:flex}.Popup .tip[data-v-ac292046]{font-size:%?22?%;color:#555;padding:0 %?24?%;margin-top:%?25?%;display:flex;align-items:center;justify-content:center}.Popup .bottom .item[data-v-ac292046]{width:%?250?%;height:%?80?%;background-color:#eee;text-align:center;line-height:%?80?%;margin-top:%?54?%;font-size:%?24?%;color:#666}.Popup .bottom .item .text[data-v-ac292046]{font-size:%?24?%;color:#666}.Popup .bottom .item.on[data-v-ac292046]{width:%?500?%}.flex[data-v-ac292046]{display:flex;flex-direction:row}.Popup .bottom .item.grant[data-v-ac292046]{font-weight:700;background-color:#e93323;\n /* background-color: var(--view-theme); */border-radius:0;padding:0}.Popup .bottom .item.grant .text[data-v-ac292046]{font-size:%?28?%;color:#fff}.mask[data-v-ac292046]{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,.65);z-index:99}',""]),t.exports=e},bddf:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-60592bdc] uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked,[data-v-60592bdc] uni-checkbox .wx-checkbox-input.wx-checkbox-input-checked{border:1px solid var(--view-theme)!important;background-color:var(--view-theme)!important;color:#fff!important}.addAddress .list[data-v-60592bdc]{background-color:#fff}.addAddress .list .item[data-v-60592bdc]{padding:%?30?%;border-top:1px solid #eee;position:relative}.addAddress .list .item .location[data-v-60592bdc]{position:absolute;right:%?30?%;top:%?15?%;text-align:center;font-size:%?20?%}.addAddress .list .item .location .iconfont[data-v-60592bdc]{color:var(--view-theme)}.addAddress .list .item .name[data-v-60592bdc]{width:%?195?%;font-size:%?30?%;color:#333}.addAddress .list .item .address[data-v-60592bdc]{flex:1;margin-left:%?20?%}.addAddress .list .item uni-input[data-v-60592bdc], .region .region_count[data-v-60592bdc]{width:%?475?%;font-size:%?30?%;box-sizing:border-box}.region .region_count[data-v-60592bdc]{height:%?42?%;line-height:%?42?%}.region .region_count .icon-xiangyou[data-v-60592bdc]{float:right}.addAddress .list .location-input[data-v-60592bdc]{padding-right:%?70?%}.addAddress .list .item .placeholder[data-v-60592bdc]{color:#ccc}.addAddress .list .item uni-picker[data-v-60592bdc]{width:%?475?%}.addAddress .list .item uni-picker .picker[data-v-60592bdc]{width:%?410?%;font-size:%?30?%}.addAddress .list .item uni-picker .iconfont[data-v-60592bdc]{font-size:%?43?%}.addAddress .default[data-v-60592bdc]{padding:0 %?30?%;height:%?90?%;background-color:#fff;margin-top:%?23?%}.addAddress .default uni-checkbox[data-v-60592bdc]{margin-right:%?15?%}.addAddress .keepBnt[data-v-60592bdc]{width:%?690?%;height:%?86?%;border-radius:%?50?%;text-align:center;line-height:%?86?%;margin:%?50?% auto;font-size:%?32?%;color:#fff;background-color:var(--view-theme)}.addAddress .wechatAddress[data-v-60592bdc]{width:%?690?%;height:%?86?%;border-radius:%?50?%;text-align:center;line-height:%?86?%;margin:0 auto;font-size:%?32?%;color:var(--view-theme);border:1px solid var(--view-theme)}',""]),t.exports=e},c15c:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[t.isShowAuth&&t.code?n("v-uni-view",{staticClass:"mask",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)}}}):t._e(),t.isShowAuth&&t.code?n("v-uni-view",{staticClass:"Popup",style:"top:"+t.top+"px;"},[n("v-uni-view",{staticClass:"logo-auth"},[n("v-uni-image",{staticClass:"image",attrs:{src:t.routine_logo,mode:"aspectFit"}})],1),t.isWeixin?n("v-uni-text",{staticClass:"title"},[t._v("授权提醒")]):n("v-uni-text",{staticClass:"title"},[t._v(t._s(t.title))]),t.isWeixin?n("v-uni-text",{staticClass:"tip"},[t._v("请授权头像等信息,以便为您提供更好的服务!")]):n("v-uni-text",{staticClass:"tip"},[t._v(t._s(t.info))]),n("v-uni-view",{staticClass:"bottom flex"},[n("v-uni-text",{staticClass:"item",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)}}},[t._v("随便逛逛")]),n("v-uni-button",{staticClass:"item grant",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toWecahtAuth.apply(void 0,arguments)}}},[t.isWeixin?n("v-uni-text",{staticClass:"text"},[t._v("去授权")]):n("v-uni-text",{staticClass:"text"},[t._v("去登录")])],1)],1)],1):t._e()],1)},o=[]},d630:function(t,e,n){var i=n("a296");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("8f383f98",i,!0,{sourceMap:!1,shadowMode:!1})},db90:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0"),n("a630")},e933:function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("5530")),a=i(n("ff56")),s=n("31bd"),r=n("5cac"),d=n("26cb"),u=i(n("dae1")),c=n("4f1b"),l=(i(n("8b6a")),n("713c")),f=getApp(),h={name:"Authorize",props:{isAuto:{type:Boolean,default:!0},isGoIndex:{type:Boolean,default:!0},isShowAuth:{type:Boolean,default:!1}},components:{},data:function(){return{title:"用户登录",info:"请登录,将为您提供更好的服务!",isWeixin:this.$wechat.isWeixin(),canUseGetUserProfile:!1,code:null,top:0,mp_is_new:this.$Cache.get("MP_VERSION_ISNEW")||!1,editModal:!1}},computed:(0,o.default)((0,o.default)({},(0,d.mapGetters)(["isLogin","userInfo","viewColor"])),(0,c.configMap)(["routine_logo"])),watch:{isLogin:function(t){!0===t&&this.$emit("onLoadFun",this.userInfo)},isShowAuth:function(t){this.getCode(this.isShowAuth)}},created:function(){this.top=uni.getSystemInfoSync().windowHeight/2-70,wx.getUserProfile&&(this.canUseGetUserProfile=!0),this.setAuthStatus(),this.getCode(this.isShowAuth)},methods:{setAuthStatus:function(){},getCode:function(t){t&&(this.code=1)},toWecahtAuth:function(){(0,l.toLogin)(!0)},getUserProfile:function(){var t=this,e=this;u.default.getUserProfile().then((function(n){var i=n.userInfo;i.code=t.code,i.spread=f.globalData.spid,i.spread_code=f.globalData.code,(0,s.commonAuth)({auth:{type:"routine",auth:i}}).then((function(n){if(200!=n.data.status)return uni.setStorageSync("auth_token",n.data.result.key),uni.navigateTo({url:"/pages/users/login/index"});var i=n.data.result.expires_time-a.default.time();e.$store.commit("UPDATE_USERINFO",n.data.result.user),e.$store.commit("LOGIN",{token:n.data.result.token,time:i}),e.$store.commit("SETUID",n.data.result.user.uid),a.default.set(r.EXPIRES_TIME,n.data.result.expires_time,i),a.default.set(r.USER_INFO,n.data.result.user,i),t.$emit("onLoadFun",n.data.result.user),n.data.result.user.isNew&&t.mp_is_new&&(t.editModal=!0)})).catch((function(t){uni.hideLoading(),uni.showToast({title:t.message,icon:"none",duration:2e3})}))})).catch((function(t){uni.hideLoading()}))},close:function(){var t=getCurrentPages();t[t.length-1];this.$emit("authColse",!1)}}};e.default=h},eab0:function(t,e,n){"use strict";var i=n("306c"),o=n.n(i);o.a},ef5b:function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.ajcaptchaCheck=function(t){return o.default.post("ajcheck",t,{noAuth:!0})},e.appleAppAuth=function(t){return o.default.post("auth/apple",t,{noAuth:!0})},e.appletsDecrypt=function(t){return o.default.post("user/mp/binding",t)},e.bindingPhone=function(t){return o.default.post("user/binding",t)},e.getAjcaptcha=function(t){return o.default.get("ajcaptcha",t,{noAuth:!0})},e.getAppVersion=function(){return o.default.get("appVersion",{},{noAuth:!0})},e.getArticleBannerList=function(){return o.default.get("article/banner/list",{},{noAuth:!0})},e.getArticleCategoryList=function(){return o.default.get("article/category/lst",{},{noAuth:!0})},e.getArticleDetails=function(t){return o.default.get("article/detail/"+t,{},{noAuth:!0})},e.getArticleHotList=function(){return o.default.get("article/hot/list",{},{noAuth:!0})},e.getArticleList=function(t,e){return o.default.get("article/lst/"+t,e,{noAuth:!0})},e.getCity=function(){return o.default.get("system/city/lst",{},{noAuth:!0})},e.getCityList=function(t){return o.default.get("v2/system/city",{address:t},{noAuth:!0})},e.getCityV2=function(t){return o.default.get("v2/system/city/lst/"+t,{},{noAuth:!0})},e.getCoupons=function(t){return o.default.get("coupon/product",t,{noAuth:!0})},e.getDiy=function(t){return o.default.get("diy",t,{noAuth:!0})},e.getIndexData=function(){return o.default.get("common/home",{},{noAuth:!0})},e.getLiveList=function(t,e){return o.default.get("wechat/live",{page:t,limit:e},{noAuth:!0})},e.getLogo=function(){return o.default.get("wechat/get_logo",{},{noAuth:!0})},e.getPageDiy=function(t){return o.default.get("micro",t,{noAuth:!0})},e.getShopCoupons=function(t){return o.default.get("coupon/store/"+t,{},{noAuth:!0})},e.getTemlIds=function(){return o.default.get("wechat/teml_ids",{},{noAuth:!0})},e.getUserCoupons=function(t){return o.default.get("coupon/list",t)},e.loginMobile=function(t){return o.default.post("login/mobile",t,{noAuth:!0})},e.logout=function(){return o.default.get("logout")},e.modifyPassword=function(t){return o.default.post("user/change/password",t)},e.modifyPhone=function(t){return o.default.post("user/change/phone",t)},e.phoneLogin=function(t){return o.default.post("login",t,{noAuth:!0})},e.phoneRegister=function(t){return o.default.post("register",t,{noAuth:!0})},e.phoneRegisterReset=function(t){return o.default.post("register/reset",t,{noAuth:!0})},e.pink=function(){return o.default.get("pink",{},{noAuth:!0})},e.registerVerify=function(t,e,n,i){return o.default.post("register/verify",{phone:t,type:void 0===e?"reset":e,key:n,code:i},{noAuth:!0})},e.setCouponReceive=function(t){return o.default.post("coupon/receive/"+t)},e.setFormId=function(t){return o.default.post("wechat/set_form_id",{formId:t})},e.switchH5Login=function(t){return o.default.post("user/switch",t)},e.verifyCode=function(){return o.default.get("verify_code",{},{noAuth:!0})},e.wechatAppAuth=function(t){return o.default.post("auth/app",t,{noAuth:!0})};var o=i(n("b5ef"))},f272:function(t,e,n){"use strict";n.r(e);var i=n("c15c"),o=n("493d");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("1c6c");var s=n("f0c5"),r=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,"ac292046",null,!1,i["a"],void 0);e["default"]=r.exports},f41b:function(t,e,n){"use strict";n.r(e);var i=n("6db5"),o=n("00aa");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("75fe");var s=n("f0c5"),r=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,"259e30b0",null,!1,i["a"],void 0);e["default"]=r.exports},f452:function(t,e,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("a434"),n("14d9");var o=i(n("2909")),a=i(n("5530")),s=(n("c6c3"),n("ef5b")),r=n("26cb"),d={},u={props:{display:{type:Boolean,default:!0},address:Array},data:function(){return{active:0,addressList:[],selectedArr:[],selectedIndex:-1,is_loading:!1,old:{scrollTop:0},scrollTop:0}},computed:(0,a.default)((0,a.default)({},(0,r.mapGetters)(["viewColor"])),{},{activeId:function(){return-1==this.selectedIndex?0:this.selectedArr[this.selectedIndex].id},showMore:function(){return!this.selectedArr.length||this.selectedArr[this.selectedArr.length-1].snum>0}}),watch:{address:function(t){this.selectedArr=t?(0,o.default)(t):[]},display:function(t){t?this.loadAddress(0):(this.addressList=[],this.selectedArr=this.address?(0,o.default)(this.address):[],this.selectedIndex=-1,this.is_loading=!1)}},mounted:function(){this.loadAddress(0)},methods:{change:function(t,e){this.selectedIndex!=e&&(-1===t&&(t=this.selectedArr.length?this.selectedArr[this.selectedArr.length-1].id:0),this.selectedIndex=e,this.loadAddress(t))},loadAddress:function(t){var e=this;d[t]?this.addressList=d[t]:(this.is_loading=!0,(0,s.getCityV2)(t).then((function(n){e.is_loading=!1,d[t]=n.data,e.addressList=n.data})),this.goTop())},selected:function(t){this.is_loading||(this.selectedIndex>-1?(this.selectedArr.splice(this.selectedIndex+1,999),this.selectedArr[this.selectedIndex]=t,this.selectedIndex=-1):t.parent_id?this.selectedArr.push(t):this.selectedArr=[t],t.snum?this.loadAddress(t.id):(this.$emit("submit",(0,o.default)(this.selectedArr)),this.$emit("changeClose")),this.goTop())},close:function(){this.$emit("changeClose")},scroll:function(t){this.old.scrollTop=t.detail.scrollTop},goTop:function(t){var e=this;this.scrollTop=this.old.scrollTop,this.$nextTick((function(){e.scrollTop=0}))}}};e.default=u}}]);