1 line
20 KiB
Plaintext
1 line
20 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/Lee/leave-unused/pagesA/address/address.vue?6bf1","webpack:///D:/Lee/leave-unused/pagesA/address/address.vue?51e4","webpack:///D:/Lee/leave-unused/pagesA/address/address.vue?5a4c","webpack:///D:/Lee/leave-unused/pagesA/address/address.vue?749c","uni-app:///pagesA/address/address.vue","webpack:///D:/Lee/leave-unused/pagesA/address/address.vue?41c3","webpack:///D:/Lee/leave-unused/pagesA/address/address.vue?c3cd"],"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;AAAA;AAAgI;AAChI;AAC2D;AACL;AACqC;;;AAG3F;AAC6K;AAC7K,gBAAgB,uLAAU;AAC1B,EAAE,6EAAM;AACR,EAAE,8FAAM;AACR,EAAE,uGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,kGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;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;AAAspB,CAAgB,mqBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC0E1qB;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,uBAXA,EAWA;AACA,gBAZA,EAYA;AACA,sBAbA;;AAeA,GAjBA;AAkBA,QAlBA,kBAkBA,EAlBA,EAkBA;AACA;AACA;AACA;AACA,GAtBA;AAuBA,QAvBA,oBAuBA;AACA;AACA,GAzBA;AA0BA,SA1BA,qBA0BA;AACA;AACA,GA5BA;AA6BA;AACA;AACA,cAFA,sBAEA,EAFA,EAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBADA;;AAGA,OAJA,EAIA,GAJA;AAKA,KAXA;AAYA;AACA,cAbA,wBAaA;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,KApCA;AAqCA;AACA,eAtCA,yBAsCA;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,KAzEA;;AA2EA;AACA,cA5EA,wBA4EA;AACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KA1FA;;AA4FA;AACA,kBA7FA,0BA6FA,EA7FA,EA6FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAVA;AAWA,KAzGA;;AA2GA;AACA,YA5GA,oBA4GA,EA5GA,EA4GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAFA,EAEA,IAFA;AAGA;AACA,SATA;AAUA;AACA,KAzHA;;AA2HA;AACA,cA5HA,sBA4HA,EA5HA,EA4HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAFA,EAEA,IAFA;AAGA;AACA,SATA;AAUA;AACA,KAzIA;AA0IA;AACA,YA3IA,oBA2IA,EA3IA,EA2IA;AACA;AACA;AACA;AACA;AACA,KAhJA;;AAkJA;AACA,WAnJA,qBAmJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA3JA;;AA6JA;AACA,UA9JA,kBA8JA,CA9JA,EA8JA;AACA;AACA;AACA;AACA,KAlKA;;AAoKA;AACA,WArKA,qBAqKA;AACA;AACA,KAvKA,EA7BA,E;;;;;;;;;;;;;AC1EA;AAAA;AAAA;AAAA;AAAq9B,CAAgB,o8BAAG,EAAC,C;;;;;;;;;;;ACAz+B;AACA,OAAO,KAAU,EAAE,kBAKd","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&scoped=true&\"\nvar renderjs\nimport script from \"./address.vue?vue&type=script&lang=js&\"\nexport * from \"./address.vue?vue&type=script&lang=js&\"\nimport style0 from \"./address.vue?vue&type=style&index=0&id=79b5c755&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../HbuilderX/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 \"79b5c755\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pagesA/address/address.vue\"\nexport default component.exports","export * from \"-!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./address.vue?vue&type=template&id=79b5c755&scoped=true&\"","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/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HbuilderX/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/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HbuilderX/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\">\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=\"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\t<view class=\"change-btn font24 color-ff background-orange\" v-if=\"showChange\" @tap=\"changeAddr(item.id)\">选择地址</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=\"text\" 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\tshowChange:false, //是否显示\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=='change'){\r\n\t\t\t\tthis.showChange = true;\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\t// 缓存地址id\r\n\t\t\t\tuni.setStorageSync('addr_id',id);\r\n\t\t\t\t// 返回\r\n\t\t\t\tsetTimeout(()=>{\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},400)\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 scoped>\r\n\t.addr-tips{\r\n\t\ttext-align: center;\r\n\t\tmargin-top: 40rpx;\r\n\t}\r\n</style>\r\n","import mod from \"-!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./address.vue?vue&type=style&index=0&id=79b5c755&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./address.vue?vue&type=style&index=0&id=79b5c755&scoped=true&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1665565548784\n var cssReload = require(\"D:/HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""} |