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.

1 line
16 KiB
JavaScript

1 year ago
(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)