(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["my/address/index"],{222:function(e,t,n){"use strict";(function(e){n(5);r(n(4));var t=r(n(223));function r(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n(1)["createPage"])},223:function(e,t,n){"use strict";n.r(t);var r=n(224),s=n(226);for(var a in s)"default"!==a&&function(e){n.d(t,e,(function(){return s[e]}))}(a);n(228);var o,d=n(11),i=Object(d["default"])(s["default"],r["render"],r["staticRenderFns"],!1,null,null,null,!1,r["components"],o);i.options.__file="my/address/index.vue",t["default"]=i.exports},224:function(e,t,n){"use strict";n.r(t);var r=n(225);n.d(t,"render",(function(){return r["render"]})),n.d(t,"staticRenderFns",(function(){return r["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return r["recyclableRender"]})),n.d(t,"components",(function(){return r["components"]}))},225:function(e,t,n){"use strict";var r;n.r(t),n.d(t,"render",(function(){return s})),n.d(t,"staticRenderFns",(function(){return o})),n.d(t,"recyclableRender",(function(){return a})),n.d(t,"components",(function(){return r}));var s=function(){var e=this,t=e.$createElement;e._self._c},a=!1,o=[];s._withStripped=!0},226:function(e,t,n){"use strict";n.r(t);var r=n(227),s=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=s.a},227:function(e,t,n){"use strict";(function(e){function r(e){return d(e)||o(e)||a(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){if(e){if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function o(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function d(e){if(Array.isArray(e))return i(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(){n.e("components/empty").then(function(){return resolve(n(536))}.bind(null,n)).catch(n.oe)},c={components:{empty:u},data:function(){return{list:[],checked:!1,page:1,limit:10,add:0,addressType:"",totalCount:0,XCXIsSelect:"是"}},onLoad:function(t){this.XCXIsSelect=this.$queue.getData("XCXIsSelect")?this.$queue.getData("XCXIsSelect"):"是","否"==this.XCXIsSelect?(this.getGuize(),e.setNavigationBarTitle({title:"隐私政策"})):e.setNavigationBarTitle({title:"地址管理"}),this.add=t.add?t.add:0,t.addressType&&(this.addressType=t.addressType)},onShow:function(){this.page=1,this.getAddressList()},methods:{bindOrdersure:function(){e.navigateTo({url:"/pages/order_sure/order_sure"})},addAddress:function(){e.navigateTo({url:"/my/address/add?page=2"})},getAddressList:function(){var t=this,n={page:this.page,limit:this.limit};this.$Request.get("/app/address/selectAddressList",n).then((function(n){0==n.code&&(t.totalCount=n.data.totalCount,1==t.page?t.list=n.data.list:t.list=[].concat(r(t.list),r(n.data.list))),e.stopPullDownRefresh(),e.hideLoading()}))},checkboxChange:function(e){var t=this;console.log(e);var n={addressId:e.addressId,userName:e.userName,userPhone:e.userPhone,address:e.address,addressDetail:e.addressDetail,addressDefault:e.addressDefault?0:1};this.$Request.postJson("/app/address/updateAddress",n).then((function(e){0==e.code&&t.getAddressList()}))},update:function(t){e.navigateTo({url:"/my/address/add?id="+t.addressId})},del:function(t){var n=this;e.showModal({title:"提示",content:"确认删除吗",success:function(r){r.confirm?(console.log("用户点击确定"),n.$Request.post("/app/address/deleteAddress",{addressId:t.addressId}).then((function(t){0==t.code&&(e.showToast({title:"删除成功",icon:"none"}),n.page=1,n.getAddressList())}))):r.cancel&&console.log("用户点击取消")}})},goBack:function(t){if(console.log(t),this.add){var n=getCurrentPages(),r=n[n.length-2];r.$vm._data.addressId=t.addressId,r.$vm._data.addressType=this.addressType,e.navigateBack()}}},onReachBottom:function(){this.list.length<this.totalCount?(this.page=this.page+1,this.getAddressList()):e.showToast({title:"已经到底了",icon:"none"})},onPullDownRefresh:function(){this.page=1,this.getAddressList()}};t.default=c}).call(this,n(1)["default"])},228:function(e,t,n){"use strict";n.r(t);var r=n(229),s=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=s.a},229:function(e,t,n){}},[[222,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/my/address/index.js.map