1 line
17 KiB
Plaintext
1 line
17 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/老农商城/mall-laonong/pagesA/address/address.vue?2746","webpack:///D:/老农商城/mall-laonong/pagesA/address/address.vue?2c86","webpack:///D:/老农商城/mall-laonong/pagesA/address/address.vue?faa5","webpack:///D:/老农商城/mall-laonong/pagesA/address/address.vue?e171","uni-app:///pagesA/address/address.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,mG,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,gBAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAoH;AACpH;AAC2D;AACL;;;AAGtD;AACoL;AACpL,gBAAgB,2LAAU;AAC1B,EAAE,6EAAM;AACR,EAAE,kFAAM;AACR,EAAE,2FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,sFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA,aAAa,oMAEN;AACP;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjCA;AAAA;AAAA;AAAA;AAAyrB,CAAgB,urBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACyE7sB;AACA,MADA,kBACA;AACA;AACA,mBADA,EACA;AACA,qBAFA,EAEA;AACA,cAHA,EAGA;AACA,eAJA,EAIA;AACA,qBALA,EAKA;AACA,iBANA,EAMA;AACA,mBAPA,EAOA;AACA,iBARA,EAQA;AACA,YATA,EASA;AACA,oBAVA,EAUA;AACA,gBAXA,EAWA;AACA,sBAZA;;AAcA,GAhBA;AAiBA,QAjBA,kBAiBA,EAjBA,EAiBA;AACA;AACA;AACA;AACA,GArBA;AAsBA,QAtBA,oBAsBA;AACA;AACA,GAxBA;AAyBA,SAzBA,qBAyBA;AACA;AACA,GA3BA;AA4BA;AACA;AACA,cAFA,sBAEA,EAFA,EAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBADA;;AAGA,OAPA,MAOA;AACA;AACA;AACA,KAbA;AAcA;AACA,cAfA,wBAeA;AACA;AACA,oBADA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,yBADA;AAEA,6BAFA;AAGA,+BAHA;AAIA,4FAJA;AAKA,yCALA;;AAOA;AACA,WATA;AAUA;AACA;AACA;AACA;AACA,OAlBA;AAmBA,KAtCA;AAuCA;AACA,eAxCA,yBAwCA;AACA;AACA;AACA,0CADA;AAEA,yBAFA;AAGA,2BAHA;AAIA,qCAJA;AAKA,6BALA;AAMA,iCANA;AAOA,+BAPA;;AASA;AACA;AACA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAFA,EAEA,IAFA;AAGA,WAdA,MAcA;AACA;AACA;AACA;AACA,aAFA,EAEA,IAFA;AAGA;AACA,SArBA;AAsBA;AACA,KA3EA;;AA6EA;AACA,cA9EA,wBA8EA;AACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KA5FA;;AA8FA;AACA,kBA/FA,0BA+FA,EA/FA,EA+FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAVA;AAWA,KA3GA;;AA6GA;AACA,YA9GA,oBA8GA,EA9GA,EA8GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAFA,EAEA,IAFA;AAGA;AACA,SATA;AAUA;AACA,KA3HA;;AA6HA;AACA,cA9HA,sBA8HA,EA9HA,EA8HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAFA,EAEA,IAFA;AAGA;AACA,SATA;AAUA;AACA,KA3IA;AA4IA;AACA,YA7IA,oBA6IA,EA7IA,EA6IA;AACA;AACA;AACA;AACA;AACA,KAlJA;;AAoJA;AACA,WArJA,qBAqJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA7JA;;AA+JA;AACA,UAhKA,kBAgKA,CAhKA,EAgKA;AACA;AACA;AACA;AACA,KApKA;;AAsKA;AACA,WAvKA,qBAuKA;AACA;AACA,KAzKA,EA5BA,E","file":"pagesA/address/address.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesA/address/address.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./address.vue?vue&type=template&id=79b5c755&\"\nvar renderjs\nimport script from \"./address.vue?vue&type=script&lang=js&\"\nexport * from \"./address.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pagesA/address/address.vue\"\nexport default component.exports","export * from \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./address.vue?vue&type=template&id=79b5c755&\"","var components\ntry {\n components = {\n statusNav: function() {\n return import(\n /* webpackChunkName: \"components/status-nav/status-nav\" */ \"@/components/status-nav/status-nav.vue\"\n )\n }\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./address.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./address.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"pad-x170\" v-if=\"isLoading\">\r\n\t\t<status-nav :ifReturn=\"true\" navBarTitle=\"地址管理\" :marginBottom=\"0\"></status-nav>\r\n\t\t<!-- 收件人信息 -->\r\n\t\t<view class=\"settlement-content pad-zy20 border-box\">\r\n\t\t\t<view class=\"section background-white radius30 mar-x40 pad-all25 border-box font30\" v-for=\"(item,index) in addressList\" :key=\"index\">\r\n\t\t\t\t<view class=\"addr-info mar-s20\" @tap.stop=\"changeAddr(item.id)\">\r\n\t\t\t\t\t<view class=\"txt mar-x20\">\r\n\t\t\t\t\t\t<view class=\"font30 mar-x10\">{{item.name}}<text style=\"margin-left: 30rpx;\">{{item.phone}}</text></view>\r\n\t\t\t\t\t\t<text class=\"font24 color-8c\">{{item.addressMsg}}</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"addr-bottom font28 flex\">\r\n\t\t\t\t\t\t<label class=\"radio flex\"><radio :checked=\"item.is_default\" @tap.stop=\"chooseEv(item.id)\" color=\"#febf00\"/>设为默认地址</label>\r\n\t\t\t\t\t\t<view class=\"btns flex\">\r\n\t\t\t\t\t\t\t<view class=\"btn\" @tap=\"openEdit(item.id)\">编辑</view>\r\n\t\t\t\t\t\t\t<view class=\"btn\" @tap=\"delAddress(item.id)\">删除</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 尾部 -->\r\n\t\t<view class=\"pull-btn background-white border-box\">\r\n\t\t\t<view class=\"btn background-orange font36 radius30 flex\" @tap=\"openAdd\">新增地址</view>\r\n\t\t</view>\r\n\t\t<!-- 地址编辑 -->\r\n\t\t<view class=\"pull-bg\" style=\"background-color: rgba(0,0,0,.3);\" v-show=\"isShow\"></view>\r\n\t\t<view class=\"vip-box-bg border-box\" v-if=\"isShow\">\r\n\t\t\t<view class=\"vip-box radius20 background-white font30\">\r\n\t\t\t\t<view class=\"title\">收件人地址</view>\r\n\t\t\t\t<view class=\"vip-list\">\r\n\t\t\t\t\t<view class=\"vip-item mar-s20\">\r\n\t\t\t\t\t\t<view class=\"tips color-99\">姓名</view>\r\n\t\t\t\t\t\t<input class=\"input\" type=\"text\" v-model=\"name\" placeholder=\"请输入姓名\" placeholder-style=\"color:#000000\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"vip-item mar-s40\">\r\n\t\t\t\t\t\t<view class=\"tips color-99\">电话</view>\r\n\t\t\t\t\t\t<input class=\"input\" type=\"number\" v-model=\"phone\" placeholder=\"请输入联系电话\" placeholder-style=\"color:#000000\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"vip-item mar-s40\">\r\n\t\t\t\t\t\t<view class=\"tips color-99\">地址</view>\r\n\t\t\t\t\t\t<picker mode=\"region\" @change=\"change\">\r\n\t\t\t\t\t\t\t<view class=\"addr-input flex\">\r\n\t\t\t\t\t\t\t\t<view class=\"input-box flex\">\r\n\t\t\t\t\t\t\t\t\t<input class=\"input-flex clips1\" type=\"text\" v-model=\"province\" disabled=\"true\">\r\n\t\t\t\t\t\t\t\t\t<image src=\"/static/icon/icon-shop.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t<view class=\"input-box flex\">\r\n\t\t\t\t\t\t\t\t\t<input class=\"input-flex clips1\" type=\"text\" v-model=\"city\" disabled=\"true\">\r\n\t\t\t\t\t\t\t\t\t<image src=\"/static/icon/icon-shop.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t<view class=\"input-box flex\">\r\n\t\t\t\t\t\t\t\t\t<input class=\"input-flex clips1\" type=\"text\" v-model=\"county\" disabled=\"true\">\r\n\t\t\t\t\t\t\t\t\t<image src=\"/static/icon/icon-shop.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</picker>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"vip-item mar-s40\">\r\n\t\t\t\t\t\t<view class=\"tips color-99\">详细地址</view>\r\n\t\t\t\t\t\t<input class=\"input\" type=\"number\" v-model=\"address\" placeholder=\"请输入详细地址\" placeholder-style=\"color:#000000\">\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"submit-btn font36 background-orange radius30 mar-s60 flex\" @tap=\"editAddress(id)\">确认保存</view>\r\n\t\t\t\t<view class=\"close-btn\" @tap=\"closeEv\">\r\n\t\t\t\t\t<image src=\"/static/icon/close-btn.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tisShow:false, //地址编辑弹窗\r\n\t\t\t\taddressList:[], //地址列表\r\n\t\t\t\tname:'', //姓名\r\n\t\t\t\tphone:'', //电话\r\n\t\t\t\tprovince:'北京市', //省\r\n\t\t\t\tcity:'北京市', //市\r\n\t\t\t\tcounty:'东城区',//区\r\n\t\t\t\taddress:'', //详细地址\r\n\t\t\t\tid:'', //地址id\r\n\t\t\t\tchangeType:'', //进入方式\r\n\t\t\t\tflag: true, //表单提交\r\n\t\t\t\tisLoading:false,\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad(op) {\r\n\t\t\tif(op.type!==''){\r\n\t\t\t\tthis.changeType = op.type;\r\n\t\t\t}\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\tthis.getAddress();\r\n\t\t},\r\n\t\tmounted() {\r\n\t\t\tthis.getAddress();\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 选择地址\r\n\t\t\tchangeAddr(id){\r\n\t\t\t\tif(this.changeType == 'change'){\r\n\t\t\t\t\t// 缓存地址id\r\n\t\t\t\t\tuni.setStorageSync('addr_id',id);\r\n\t\t\t\t\t// 返回\r\n\t\t\t\t\tuni.navigateBack({\r\n\t\t\t\t\t\tdelta:1,\r\n\t\t\t\t\t})\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 获取地址列表\r\n\t\t\tgetAddress(){\r\n\t\t\t\tuni.showLoading({\r\n\t\t\t\t\ttitle:'加载中'\r\n\t\t\t\t})\r\n\t\t\t\tthis.$requst.post('/api/user/address').then(res=>{\r\n\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\tconsole.log(res,'地址列表');\r\n\t\t\t\t\t\tlet addrArr = [];\r\n\t\t\t\t\t\tres.data.forEach(item=>{\r\n\t\t\t\t\t\t\tlet addrObj = {\r\n\t\t\t\t\t\t\t\tid:item.id,\r\n\t\t\t\t\t\t\t\tname:item.name,\r\n\t\t\t\t\t\t\t\tphone:item.phone,\r\n\t\t\t\t\t\t\t\taddressMsg:item.province_str+item.city_str+item.county_str+item.address,\r\n\t\t\t\t\t\t\t\tis_default:item.is_default\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\taddrArr.push(addrObj);\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tthis.addressList = addrArr;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\tthis.isLoading = true;\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 新增&编辑地址\r\n\t\t\teditAddress(){\r\n\t\t\t\tif(this.checkEmpty() && this.flag){\r\n\t\t\t\t\tlet params ={\r\n\t\t\t\t\t\tid:this.id==''?'':this.id,\r\n\t\t\t\t\t\tname:this.name,\r\n\t\t\t\t\t\tphone:this.phone,\r\n\t\t\t\t\t\tprovince_str:this.province,\r\n\t\t\t\t\t\tcity_str:this.city,\r\n\t\t\t\t\t\tcounty_str:this.county,\r\n\t\t\t\t\t\taddress:this.address\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconsole.log(params,'地址信息');\r\n\t\t\t\t\tthis.$requst.post('/api/user/address-save',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\t\tif(this.id == ''){\r\n\t\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('新增成功');\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('编辑成功');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// 关闭弹窗\r\n\t\t\t\t\t\t\tthis.closeEv();\r\n\t\t\t\t\t\t\t// 重新获取地址列表\r\n\t\t\t\t\t\t\tthis.getAddress();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\t\t\tthis.flag = true;\r\n\t\t\t\t\t\t\t},1200)\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg);\r\n\t\t\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\t\t\tthis.flag = true;\r\n\t\t\t\t\t\t\t},1200)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 表单验证\r\n\t\t\tcheckEmpty(){\r\n\t\t\t\tlet result = false;\r\n\t\t\t\tif(!this.name) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请填写联系人');\r\n\t\t\t\t} else if(this.$toolAll.tools.isPhone(this.phone)) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请正确填写联系电话');\r\n\t\t\t\t} else if(!this.province && !this.city && !this.county) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请选择地址');\r\n\t\t\t\t} else if(!this.address) {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请填写详细地址');\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult = true;\r\n\t\t\t\t}\r\n\t\t\t\treturn result;\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 获取地址详情\r\n\t\t\tgetAddressInfo(id){\r\n\t\t\t\tthis.$requst.post('/api/user/address-info',{id:id}).then(res=>{\r\n\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\tthis.name = res.data.name;\r\n\t\t\t\t\t\tthis.phone = res.data.phone;\r\n\t\t\t\t\t\tthis.province = res.data.province_str;\r\n\t\t\t\t\t\tthis.city = res.data.city_str;\r\n\t\t\t\t\t\tthis.county = res.data.county_str;\r\n\t\t\t\t\t\tthis.address = res.data.address;\r\n\t\t\t\t\t\tthis.isShow = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 设置默认地址\r\n\t\t\tchooseEv(id){\r\n\t\t\t\tif(this.flag){\r\n\t\t\t\t\tthis.$requst.post('/api/user/address-set-default',{id:id}).then(res=>{\r\n\t\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('设置成功');\r\n\t\t\t\t\t\t\t// 重新获取地址列表\r\n\t\t\t\t\t\t\tthis.getAddress();\r\n\t\t\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\t\t\tthis.flag = true;\r\n\t\t\t\t\t\t\t},1200)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 删除地址\r\n\t\t\tdelAddress(id){\r\n\t\t\t\tif(this.flag){\r\n\t\t\t\t\tthis.$requst.post('/api/user/address-del',{id:id}).then(res=>{\r\n\t\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.showToast('删除成功');\r\n\t\t\t\t\t\t\t// 重新获取地址列表\r\n\t\t\t\t\t\t\tthis.getAddress();\r\n\t\t\t\t\t\t\tsetTimeout(()=>{\r\n\t\t\t\t\t\t\t\tthis.flag = true;\r\n\t\t\t\t\t\t\t},1200)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 打开编辑\r\n\t\t\topenEdit(id){\r\n\t\t\t\tif(id!==''){\r\n\t\t\t\t\tthis.id = id;\r\n\t\t\t\t\tthis.getAddressInfo(id);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 打开新增\r\n\t\t\topenAdd(){\r\n\t\t\t\tthis.isShow = true;\r\n\t\t\t\tthis.name = '';\r\n\t\t\t\tthis.phone = '';\r\n\t\t\t\tthis.province = '北京市';\r\n\t\t\t\tthis.city = '北京市';\r\n\t\t\t\tthis.county = '东城区';\r\n\t\t\t\tthis.address = '';\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 选择省市区\r\n\t\t\tchange(e){\r\n\t\t\t\tthis.province = e.detail.value[0];\r\n\t\t\t\tthis.city = e.detail.value[1];\r\n\t\t\t\tthis.county = e.detail.value[2];\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t// 关闭弹窗\r\n\t\t\tcloseEv(){\r\n\t\t\t\tthis.isShow = false;\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t\r\n</style>\r\n"],"sourceRoot":""} |