You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wx2uni/unpackage/dist/build/h5/static/js/pages-mine-addAddress-index...

1 line
16 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-mine-addAddress-index"],{"051b":function(t,a,e){"use strict";e.r(a);var i=e("7a05"),c=e("7774");for(var o in c)["default"].indexOf(o)<0&&function(t){e.d(a,t,(function(){return c[t]}))}(o);e("e7fb");var n=e("f0c5"),d=Object(n["a"])(c["default"],i["b"],i["c"],!1,null,"3ccfcf5c",null,!1,i["a"],void 0);a["default"]=d.exports},"1c62":function(t,a,e){var i=e("d4d3");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var c=e("4f06").default;c("be4efd02",i,!0,{sourceMap:!1,shadowMode:!1})},"2de9":function(t,a,e){"use strict";e("7a82"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,e("99af"),e("d3b7"),e("159b"),e("14d9"),e("ac1f"),e("00b4");var i,c=e("233b"),o=getApp(),n=e("fcd7"),d={data:function(){return{multiSelected:!1,multiIndex:[0,0,0],multiIndexTemp:[0,0,0],multiArray:[[],[],[]],multiArrayTemp:[[],[],[]],multiArrayRecord:[[],[],[]],title:"添加地址",btnLoading:!1,address:{contacts:"",contactsTel:""},addressClassify:"",addressStr:"",recordId:"",locationObj:{provinceName:"",cityName:"",districtName:""}}},onLoad:function(t){console.log(t),(0,c.isEmptyCheck)(t.id)?this.getProvinceByPid():(this.recordId=t.id,this.title="修改地址",this.setData({recordId:t.id}),this.getDetail()),uni.setNavigationBarTitle({title:this.title}),i=new n({key:"5PTBZ-YI7C6-MZGS3-ES7QN-4T5O2-EJFVR"}),console.log(123)},onReady:function(){},onShow:function(){},onHide:function(){},onUnload:function(){},onPullDownRefresh:function(){},onReachBottom:function(){},methods:{delAddress:function(t){var a=this;uni.showModal({title:"提示",content:"确定要删除该地址吗?",cancelColor:"#666666",confirmColor:"#ff4400",success:function(t){t.confirm?(console.log("用户点击确定"),uni.request({url:o.globalData.ip+"/user/address/deleteUserAddress",method:"POST",header:o.globalData.headers,data:{id:a.recordId},success:function(t){console.log(t),uni.showToast({title:"删除成功",icon:"success",duration:2e3}),setTimeout((function(){uni.navigateBack({delta:-1})}),2e3)}})):t.cancel&&console.log("用户点击取消")}})},getProvinceByPid:function(){var t=this;uni.request({url:o.globalData.ip+"/city/getProvince",data:{},header:o.globalData.headers,method:"POST",success:function(a){if(console.log(a),200==a.data.status){t.multiArrayRecord[0]=[{id:-1,name:"请选择"}].concat(a.data.data);var e=["请选择"];a.data.data.forEach((function(t,a){e.push(t.name)})),t.multiArrayTemp[0]=e,t.setData({multiArrayTemp:t.multiArrayTemp}),o.globalData.isNotEmptyCheck(t.address.provinceId)&&o.globalData.isNotEmptyCheck(t.address.cityId)&&o.globalData.isNotEmptyCheck(t.address.districtId)&&(t.multiArrayRecord[0].forEach((function(a,e){a.id==t.address.provinceId&&(t.multiIndex[0]=e)})),t.setData({multiArray:t.multiArrayTemp,multiIndex:t.multiIndex,multiIndexTemp:t.multiIndex}),t.getCityByPid2(1,t.address.provinceId))}else o.globalData.showTips(t,a.data.msg)}})},bindMultiPickerChange:function(t){console.log("picker发送选择改变携带值为",t.detail.value);var a=!1;t.detail.value[0]>0&&t.detail.value[1]>0&&t.detail.value[2]>0&&(a=!0),this.setData({multiIndex:t.detail.value,multiSelected:a,multiArray:this.multiArrayTemp})},bindMultiPickerColumnChange:function(t){console.log("修改的列为",t.detail.column,",值为",t.detail.value);0==t.detail.column&&(this.multiIndexTemp[0]=t.detail.value,this.multiIndexTemp[1]=0,this.multiIndexTemp[2]=0,this.multiArrayTemp[1]=[],this.multiArrayTemp[2]=[],this.setData({multiIndexTemp:this.multiIndexTemp,multiArrayTemp:this.multiArrayTemp})),t.detail.column<2&&this.getCityByPid(t.detail.column,t.detail.value)},getCityByPid:function(t,a){var e=this;console.log(e.multiArrayRecord[t][a]);var i=e.multiArrayRecord[t][a].id;uni.request({url:o.globalData.ip+"/city/getCityByPid",data:{pid:i},header:o.globalData.headers,method:"POST",success:function(a){if(console.log(a),200==a.data.status){e.multiArrayRecord[t+1]=[{id:-1,name:"请选择"}].concat(a.data.data);var i=["请选择"];a.data.data.forEach((function(t,a){i.push(t.name)})),e.multiArrayTemp[t+1]=i,e.setData({multiArrayTemp:e.multiArrayTemp})}else o.globalData.showTips(e,a.data.msg)}})},getCityByPid2:function(t,a){var e=this;uni.request({url:o.globalData.ip+"/city/getCityByPid",data:{pid:a},header:o.globalData.headers,method:"POST",success:function(a){if(console.log(a),200==a.data.status){e.multiArrayRecord[t]=[{id:-1,name:"请选择"}].concat(a.data.data);var i=["请选择"];a.data.data.forEach((function(t,a){i.push(t.name)})),e.multiArrayTemp[t]=i,e.multiArrayRecord[t].forEach((function(a,i){(1==t&&a.id==e.address.cityId||2==t&&a.id==e.address.districtId)&&(e.multiIndex[t]=i)})),e.setData({multiArray:e.multiArrayTemp,multiArrayTemp:e.multiArrayTemp,multiIndex:e.multiIndex,multiIndexTemp:e.multiIndex}),1==t&&e.getCityByPid2(2,e.address.cityId)}else o.globalData.showTips(e,a.data.msg)}})},selectAddressClassify:function(t){var a=t.currentTarget.dataset.classify;console.log(a),this.setData({addressClassify:a})},getDetail:function(){var t=this;uni.request({url:o.globalData.ip+"/user/address/getUserAddressDetail?id="+t.recordId,method:"GET",header:o.globalData.headers,data:{},success:function(a){console.log(a),o.globalData.isNotEmptyCheck(a.data.data)&&(t.setData({address:a.data.data,addressClassify:a.data.data.classify,addressStr:a.data.data.address}),o.globalData.isNotEmptyCheck(a.data.data.provinceId)&&o.globalData.isNotEmptyCheck(a.data.data.cityId)&&o.globalData.isNotEmptyCheck(a.data.data.districtId)&&t.setData({multiSelected:!0}),t.getProvinceByPid())}})},onSubmit:function(t){console.log(t);var a=this;if(a.setData({btnLoading:!0}),o.globalData.isEmptyCheck(t.detail.value.contacts))return uni.showToast({icon:"none",title:"请输入姓名",duration:3e3}),void a.setData({btnLoading:!1});if(!/^[1][3456789][0-9]{9}$/.test(t.detail.value.contactsTel)||""==t.detail.value.contactsTel)return uni.showToast({icon:"none",title:"请输入正确手机号",duration:3e3}),void a.setData({btnLoading:!1});if(!t.detail.value.address)return uni.showToast({icon:"none",title:"请输入详细地址",duration:3e3}),void a.setData({btnLoading:!1});var e=t.detail.value;e["id"]=a.recordId,e["classify"]=a.addressClassify,a.locationObj.provinceName?(e["provinceName"]=a.locationObj.provinceName,e["cityName"]=a.locationObj.cityName,e["districtName"]=a.locationObj.districtName):uni.showToast({icon:"none",title:"请选择地区",duration:3e3}),console.log(e),a.setData({btnLoading:!1}),uni.request({url:o.globalData.ip+"/user/address/addOrUpdateUserAddress",method:"POST",header:o.globalData.headers,data:e,success:function(t){console.log(t),200==t.data.status?uni.navigateBack({delta:1}):(uni.showToast({icon:"none",title:t.data.msg,duration:2e3}),a.setData({btnLoading:!1}))}})},chooseMap:function(){var t=this;console.log("1111111"),uni.chooseLocation({success:function(a){console.log("res",a),t.addressStr=a.name,i.reverseGeocoder({location:"".concat(a.latitude,",").concat(a.longitude),success:function(a){console.log(a.result);var e=a.result.address_component;t.addressStr="".concat(e.province," ").concat(e.city," ").concat(e.district," ")+t.addressStr,t.setData({addressStr:t.addressStr,locationObj:{provinceName:a.result.address_component.province,cityName:a.result.address_component.city,districtName:a.result.address_component.district}})},fail:function(t){console.log(t)}})},fail:function(t){console.log(t)}})},goAddAddress:function(){uni.navigateTo({url:"/pages/addressBook/index"})},onShareAppMessage1:function(){}}};a.default=d},7774:function(t,a,e){"use strict";e.r(a);var i=e("2de9"),c=e.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){e.d(a,t,(function(){return i[t]}))}(o);a["default"]=c.a},"7a05":function(t,a,e){"use strict";e.d(a,"b",(function(){return i})),e.d(a,"c",(function(){return c})),e.d(a,"a",(function(){}));var i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",[e("v-uni-form",{on:{submit:function(a){arguments[0]=a=t.$handleEvent(a),t.onSubmit.apply(void 0,arguments)}}},[e("v-uni-view",{staticClass:"weui-cells__group weui-cells__group_form"},[e("v-uni-view",{staticClass:"weui-cells weui-cells_form"},[e("v-uni-view",{staticClass:"weui-cell bb1"},[e("v-uni-view",{staticClass:"weui-cell__hd"},[e("v-uni-label",{staticClass:"weui-label"},[t._v("姓名")])],1),e("v-uni-view",{staticClass:"weui-cell__bd"},[e("v-uni-input",{staticClass:"weui-input tr",attrs:{name:"contacts",type:"text",value:t.address.contacts,placeholder:"请输入姓名","placeholder-class":"weui-input__placeholder"}})],1)],1),e("v-uni-view",{staticClass:"weui-cell bb1"},[e("v-uni-view",{staticClass:"weui-cell__hd"},[e("v-uni-label",{staticClass:"weui-label"},[t._v("手机号")])],1),e("v-uni-view",{staticClass:"weui-cell__bd"},[e("v-uni-input",{staticClass:"weui-input tr",attrs:{name:"contactsTel",type:"number",value:t.address.contactsTel,placeholder:"请输入手机号","placeholder-class":"weui-input__placeholder"}})],1)],1),e("v-uni-view",{staticClass:"weui-cell"},[e("v-uni-view",{staticClass:"weui-cell__hd p0"},[e("v-uni-label",{staticClass:"weui-label m0"},[t._v("详细地址")])],1),e("v-uni-view",{staticClass:"weui-cell__bd textarea tr"},[e("v-uni-textarea",{staticClass:"weui-textarea",attrs:{name:"address",value:t.addressStr,placeholder:"请输入详细地址","placeholder-class":"weui-input__placeholder","auto-height":!0}})],1),e("v-uni-view",[e("i",{staticClass:"iconfont icon-dingwei pl8",staticStyle:{padding:"8px 0 8px 8px"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.chooseMap.apply(void 0,arguments)}}})])],1)],1)],1),e("v-uni-view",{staticClass:"weui-cell mark mt16"},[e("v-uni-view",{staticClass:"weui-cell__hd"},[e("v-uni-label",{staticClass:"weui-label",staticStyle:{width:"60px"}},[t._v("标签")])],1),e("v-uni-view",{staticClass:"weui-cell__bd tr"},[e("v-uni-view",{class:"adTag "+(0==t.addressClassify&&""!==t.addressClassify&&null!==t.addressClassify?"active":""),attrs:{"data-classify":"0"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.selectAddressClassify.apply(void 0,arguments)}}},[t._v("家")]),e("v-uni-view",{class:"adTag "+(1==t.addressClassify?"active":""),attrs:{"data-classify":"1"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.selectAddressClassify.apply(void 0,arguments)}}},[t._v("公司")]),e("v-uni-view",{class:"adTag "+(2==t.addressClassify?"active":""),attrs:{"data-classify":"2"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.selectAddressClassify.apply(void 0,arguments)}}},[t._v("其它")])],1)],1),e("v-uni-button",{staticClass:"loginOut normalBtn",staticStyle:{"font-weight":"400","margin-top":"70px","margin-bottom":"20px"},attrs:{formType:"submit",disabled:t.btnLoading}},[t._v("保存")]),t.recordId?e("v-uni-view",{staticClass:"tc f14",staticStyle:{color:"#576b95"},attrs:{"hover-class":"thover"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.delAddress.apply(void 0,arguments)}}},[t._v("删除该地址")]):t._e()],1)],1)},c=[]},d4d3:function(t,a,e){var i=e("24fb");a=i(!1),a.push([t.i,"uni-page-body[data-v-3ccfcf5c]{background-color:#fff}body.?%PAGE?%[data-v-3ccfcf5c]{background-color:#fff}.tc .logo[data-v-3ccfcf5c]{width:70px;height:70px;margin:5% 0 0}.container[data-v-3ccfcf5c]{display:flex;flex-direction:column;justify-content:space-around;height:100vh}.logoPng[data-v-3ccfcf5c]{width:70px;height:70px;margin-top:30px\n /* margin-bottom: 20px; */}.logoTxt[data-v-3ccfcf5c]{font-size:18px;font-weight:400;color:#919191;line-height:25px;margin-bottom:30px}.input_base[data-v-3ccfcf5c]{border:%?2?% solid rgba(0,0,0,.058823529411764705);padding-left:%?10?%;margin-right:%?50?%}.input_h30[data-v-3ccfcf5c]{height:30px;line-height:30px}.input_h60[data-v-3ccfcf5c]{height:60px}.input_view[data-v-3ccfcf5c]{font:12px;background:#fff;color:#000;line-height:30px}.wx-text-list[data-v-3ccfcf5c],\n.wx-text-cover[data-v-3ccfcf5c]{background-color:#fff}.wx-text-list .wx-list-li[data-v-3ccfcf5c],\n.wx-text-cover .wx-list-li[data-v-3ccfcf5c]{display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;padding:10px 15px 10px 0;margin-left:15px;border-bottom:1px solid #f3f3f3}.li-hover[data-v-3ccfcf5c]{background-color:#ececec}.wx-text-list .wx-list-li[data-v-3ccfcf5c]:last-child{border-bottom:0}.flex-right[data-v-3ccfcf5c]{text-align:right;flex:1}.flex-left[data-v-3ccfcf5c]{text-align:left;flex:1}.input-pl[data-v-3ccfcf5c]{padding-left:30px}.mw-label[data-v-3ccfcf5c]{min-width:90px}.wx-list-li .icon-xiayiye[data-v-3ccfcf5c],\n.wx-list-li .icon-dianji[data-v-3ccfcf5c]{font-size:%?30?%;padding-left:5px;display:inline;color:#ccc;position:relative;top:-3px}.wx-list-li .icon-dianji[data-v-3ccfcf5c]{opacity:0;pointer-events:none}.cur.icon-dianji[data-v-3ccfcf5c]{opacity:1;pointer-events:auto}.pce[data-v-3ccfcf5c]{color:#ccc}.wx-text-cover .wx-list-li[data-v-3ccfcf5c]{margin-left:0;padding-left:15px}.list-avater[data-v-3ccfcf5c]{width:%?120?%;height:%?120?%;border-radius:4px;margin-right:10px}.radio-group[data-v-3ccfcf5c]{background-color:#fff}uni-label.radio[data-v-3ccfcf5c]{display:block;padding:12px 0;margin-left:15px;background:#fff;border-bottom:1px solid rgba(0,0,0,.058823529411764705)}uni-label.radio[data-v-3ccfcf5c]:last-child{border-bottom:0}.icon-fangdajing[data-v-3ccfcf5c]{line-height:30px;position:relative;top:-4px;margin-right:3px}.ui-searchbar uni-input[data-v-3ccfcf5c]{padding:0}.loginForm[data-v-3ccfcf5c]{padding:0 37px\n /* margin-top: 12%; */}.phoneInput[data-v-3ccfcf5c]{height:50px;opacity:1;background:#f4f4f4;border-radius:8px;font-size:17px;font-weight:400;color:#000;line-height:24px;padding-left:20px;padding-right:60px}.onlyBtn[data-v-3ccfcf5c]{margin-top:12%}.loginBtn[data-v-3ccfcf5c]{width:260px!important;height:48px;font-weight:500;\n /* background: #ff6a00; */border-radius:25px;font-size:18px;padding:0;\n /* font-weight: 601; */color:#fff;line-height:48px}.loginBtn.wxBtn[data-v-3ccfcf5c]{width:258px!important;height:46px;line-height:46px;background-color:#fff;color:var(--color-ysd);border:1px solid var(--color-ysd)}.loginBtnHov[data-v-3ccfcf5c]{background-color:var(--color-ysd)!important;color:#fff!important}\n/* .wxBtn.button-hover[type=primary] {\n color: #FFFFFF;\n background-color: #0c880a\n} */.sendCode.code[data-v-3ccfcf5c]{border-left:1px solid rgba(0,0,0,.058823529411764705);line-height:20px;height:20px;font-size:17px;color:#333;padding-left:10px;padding-right:20px;text-align:center}.code.disabled[data-v-3ccfcf5c]{color:#979797;pointer-events:none}.bocai[data-v-3ccfcf5c]{\n /* position: sticky; */\n /* margin-top: 15%; */}.changeType[data-v-3ccfcf5c]{padding:0 20px}uni-page-body[data-v-3ccfcf5c]{padding:10px;padding-top:0;background-color:#f5f5f5}body.?%PAGE?%[data-v-3ccfcf5c]{background-color:#f5f5f5}.weui-cell[data-v-3ccfcf5c]{padding-left:0!important;padding-right:0!important}.weui-cells__group[data-v-3ccfcf5c]{border-radius:8px;padding:0 20px;overflow:hidden;background-color:#fff;margin-top:16px!important}.mark[data-v-3ccfcf5c]{border-radius:8px;padding:16px 20px!important;overflow:hidden;background-color:#fff}.mark[data-v-3ccfcf5c]::before{display:none}.adTag[data-v-3ccfcf5c]{width:56px;height:28px;border:%?1?% solid #e2e2e2;border-radius:25px;text-align:center;font-size:14px;color:#333;line-height:28px;display:inline-block;margin-left:8px}.adTag.active[data-v-3ccfcf5c]{background:var(--color-ysd);color:#fff;border:%?1?% solid var(--color-ysd)}.normalBtn[data-v-3ccfcf5c]{width:260px!important;height:42px;line-height:42px;color:#fff;border-radius:999px}.weui-cell[data-v-3ccfcf5c]::before{display:none}.textarea[data-v-3ccfcf5c]{width:65%}",""]),t.exports=a},e7fb:function(t,a,e){"use strict";var i=e("1c62"),c=e.n(i);c.a}}]);