pages-set-addressManage.6c56e66c.js 6.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-set-addressManage"],{3651:function(t,a,e){"use strict";e.r(a);var i=e("c5d6"),s=e.n(i);for(var n in i)"default"!==n&&function(t){e.d(a,t,(function(){return i[t]}))}(n);a["default"]=s.a},"4f0a":function(t,a,e){"use strict";var i=e("714d"),s=e.n(i);s.a},"5a81":function(t,a,e){"use strict";e.d(a,"b",(function(){return s})),e.d(a,"c",(function(){return n})),e.d(a,"a",(function(){return i}));var i={uniList:e("908e").default,uniListItem:e("76e6").default},s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",{staticClass:"content"},[e("v-uni-view",{staticClass:"row b-b"},[e("v-uni-text",{staticClass:"tit"},[t._v("联系人")]),e("v-uni-input",{staticClass:"input",attrs:{type:"text",placeholder:"收货人姓名","placeholder-class":"placeholder"},model:{value:t.addressData.name,callback:function(a){t.$set(t.addressData,"name",a)},expression:"addressData.name"}})],1),e("v-uni-view",{staticClass:"row b-b"},[e("v-uni-text",{staticClass:"tit"},[t._v("手机号")]),e("v-uni-input",{staticClass:"input",attrs:{type:"number",placeholder:"收货人手机号码","placeholder-class":"placeholder"},model:{value:t.addressData.mobile,callback:function(a){t.$set(t.addressData,"mobile",a)},expression:"addressData.mobile"}})],1),e("v-uni-view",{staticClass:"row b-b"},[e("v-uni-text",{staticClass:"tit"},[t._v("地址")]),e("pickerAddress",{staticClass:"input",on:{change:function(a){arguments[0]=a=t.$handleEvent(a),t.onCityClick.apply(void 0,arguments)}}},[t._v(t._s(t.addressDetail||"请选择地址"))]),e("v-uni-text",{staticClass:"iconfont iconlocation"})],1),e("v-uni-view",{staticClass:"row b-b"},[e("v-uni-text",{staticClass:"tit"},[t._v("门牌号")]),e("v-uni-input",{staticClass:"input",attrs:{type:"text",placeholder:"楼号、门牌","placeholder-class":"placeholder"},model:{value:t.addressData.area,callback:function(a){t.$set(t.addressData,"area",a)},expression:"addressData.area"}})],1),e("uni-list",{staticClass:"margin-t-20"},[e("uni-list-item",{attrs:{title:"设为默认","switch-checked":t.addressData.default,"show-switch":!0,"show-arrow":!1,"switch-color":"#921a23"},on:{switchChange:function(a){arguments[0]=a=t.$handleEvent(a),t.switchChange.apply(void 0,arguments)}}})],1),t.showDel?e("v-uni-view",{staticClass:"del-btn"},[e("v-uni-text",{on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.delAddr.apply(void 0,arguments)}}},[t._v("删除地址")])],1):t._e(),e("v-uni-button",{staticClass:"add-btn",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.confirm.apply(void 0,arguments)}}},[t._v("提交")])],1)},n=[]},"714d":function(t,a,e){var i=e("9cb1");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=e("4f06").default;s("896624c8",i,!0,{sourceMap:!1,shadowMode:!1})},"9cb1":function(t,a,e){var i=e("24fb");a=i(!1),a.push([t.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/uni-page-body[data-v-07834740]{background:#f8f6f6;padding-top:%?16?%}.row[data-v-07834740]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;position:relative;padding:0 %?30?%;height:%?110?%;background:#fff}.row .tit[data-v-07834740]{-webkit-flex-shrink:0;flex-shrink:0;width:%?120?%;font-size:%?30?%;color:#303133}.row .input[data-v-07834740]{-webkit-box-flex:1;-webkit-flex:1;flex:1;font-size:%?30?%;color:#303133}.row .iconlocation[data-v-07834740]{font-size:%?36?%;color:#909399}.default-row[data-v-07834740]{margin-top:%?16?%}.default-row .tit[data-v-07834740]{-webkit-box-flex:1;-webkit-flex:1;flex:1}.default-row uni-switch[data-v-07834740]{-webkit-transform:translateX(%?16?%) scale(.9);transform:translateX(%?16?%) scale(.9)}.del-btn[data-v-07834740]{width:%?750?%;height:%?99?%;margin-top:%?28?%;font-size:%?30?%;font-weight:500;color:#901b21;background-color:#fff;line-height:%?99?%;padding-left:%?42?%}.add-btn[data-v-07834740]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;width:%?690?%;height:%?80?%;margin:%?60?% auto;font-size:%?32?%;color:#fff;background-color:#921a23;border-radius:%?10?%}.alert-box[data-v-07834740]{background-color:#fff}body.?%PAGE?%[data-v-07834740]{background:#f8f6f6}',""]),t.exports=a},a6ee:function(t,a,e){"use strict";e.r(a);var i=e("5a81"),s=e("3651");for(var n in s)"default"!==n&&function(t){e.d(a,t,(function(){return s[t]}))}(n);e("4f0a");var d,o=e("f0c5"),r=Object(o["a"])(s["default"],i["b"],i["c"],!1,null,"07834740",null,!1,i["a"],d);a["default"]=r.exports},c5d6:function(t,a,e){"use strict";var i=e("4ea4");e("a15b"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var s=i(e("908e")),n=i(e("76e6")),d=i(e("39ac")),o=i(e("ebed")),r=e("735f"),c={components:{uniList:s.default,uniListItem:n.default,pickerAddress:o.default,uniPopup:d.default},data:function(){return{addressDetail:"",addressData:{name:"",mobile:"",address:{province:"",city:"",district:""},area:"",default:!1}}},onLoad:function(t){var a="新增收货地址";if("edit"===t.type){a="编辑收货地址";var e=JSON.parse(t.data);console.log(e),this.addressData={name:e.real_name,mobile:e.phone,address:{province:e.province,city:e.city,district:e.district},area:e.detail,default:1==e.is_default,id:e.id},this.addressDetail=e.province+e.city+e.district}this.manageType=t.type,uni.setNavigationBarTitle({title:a})},methods:{onCityClick:function(t){var a=t.data,e=this.addressData.address;e.province=a[0],e.city=a[1],e.district=a[2],this.addressDetail=a.join("")},chooseLocation:function(){var t=this;uni.chooseLocation({success:function(a){console.log(a),t.addressData.addressName=a.name,t.addressData.address=a.name}})},switchChange:function(t){this.addressData.default=t.value},confirm:function(){var t=this,a=this.addressData;a.name?/(^1[3|4|5|7|8][0-9]{9}$)/.test(a.mobile)?a.address?a.area?(0,r.addressEdit)({real_name:a.name,phone:a.mobile,address:{province:a.address.province,city:a.address.city,district:a.address.district},detail:a.area,is_default:a.default,id:a.id||"",type:1}).then((function(a){t.$api.prePage().refreshList(),uni.showToast({title:"提交成功",duration:2e3}),setTimeout((function(){uni.navigateBack()}),800)})):this.$api.msg("请填写门牌号信息"):this.$api.msg("请在地图选择所在位置"):this.$api.msg("请输入正确的手机号码"):this.$api.msg("请填写收货人姓名")}}};a.default=c}}]);