sl-express/project-wl-yonghuduan-uniapp-vue3/unpackage/dist/dev/.sourcemap/mp-weixin/subPages/address-info/index.js.map
shuhongfan cf5ac25c14 init
2023-09-04 16:40:17 +08:00

1 line
37 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["uni-app:///main.js","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/subPages/address-info/index.vue?7e71","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/subPages/address-info/index.vue?2e46","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/subPages/address-info/index.vue?9d23","uni-app:///subPages/address-info/index.vue","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/components/BtnFooter/index.vue?7ed6","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/components/BtnFooter/index.vue?146e","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/components/BtnFooter/index.vue?ec6e","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/components/BtnFooter/index.vue?b538","uni-app:///components/BtnFooter/index.vue","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/subPages/address-info/components/selectArea.vue?85f2","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/subPages/address-info/components/selectArea.vue?d58f","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/subPages/address-info/components/selectArea.vue?21bd","webpack:///E:/project/project-wl-yonghuduan-uniapp-vue3/subPages/address-info/components/selectArea.vue?0b21","uni-app:///subPages/address-info/components/selectArea.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,uG,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,cAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8H;AAC9H;AACoE;AACL;AAC4B;AACR;;;AAGnF;AAC+L;AAC/L,gBAAgB,sMAAU;AAC1B,EAAE,sFAAM;AACR,EAAE,4FAAM;AACR,EAAE,qGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,gGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACxBf;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAA4uB,CAAgB,uvBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC6DhwB;;;;;;;AAOA;;;;AAIA;AACA;AACA,qE;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA,2C,CAAA;AACA,4C,CAAA;AACA,oC,CAAA;AACA;AACA,iC,CAAA;AACA,kC,CAAA;AACA;AACA,2B,CAAA;AACA;AACA;AACA,OADA,KACA,OADA;AAEA,CAHA,E,CAGA;AACA,uC,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CATA;AAUA;AACA;AACA,CAFA;AAGA;AACA;AACA;;;;;;;;;;AAUA,wBAVA,CAEA,IAFA,aAEA,IAFA,CAGA,WAHA,aAGA,WAHA,CAIA,OAJA,aAIA,OAJA,CAKA,IALA,aAKA,IALA,CAMA,MANA,aAMA,MANA,CAOA,QAPA,aAOA,QAPA,CAQA,MARA,aAQA,MARA,CASA,SATA,aASA,SATA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAtBA,CADA;AAwBA,uCAxBA;;;AA2BA;AACA;AACA;AACA;AACA,GAFA,MAEA;AACA;AACA;;AAEA,CAPA;;AASA;AACA;AACA;AACA;AACA,CAHA;AAIA;AACA;AACA;AACA,CAFA;AAGA;AACA;AACA;AACA,CAFA;AAGA;AACA;AACA;AACA,CAFA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CANA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA,CALA;AAMA;AACA;AACA;AACA;AACA,iCADA;;AAGA,GAJA,MAIA;AACA;AACA,6JADA;;AAGA;;AAEA,CAZA;AAaA;AACA;AACA;AACA;AACA;AACA,uBADA;AAEA,kBAFA;;AAIA,GALA,MAKA;AACA;AACA,2BADA;AAEA,kBAFA;;AAIA,GALA,MAKA;AACA;AACA;AACA;AACA,4BADA;AAEA,oCAFA;AAGA,sCAHA;AAIA,oCAJA;AAKA,4BALA;AAMA,gCANA;AAOA,2CAPA;AAQA,uEARA;AASA,iDATA;AAUA,UAVA,CAUA;AACA;AACA,uBADA;AAEA,yBAFA;;AAIA;AACA;AACA,uCADA;;AAGA,SAJA,MAIA;AACA;AACA,0FADA;;AAGA;;;AAGA,OA1BA;AA2BA,KA7BA,MA6BA;AACA;AACA,4BADA;AAEA,oCAFA;AAGA,sCAHA;AAIA,oCAJA;AAKA,4BALA;AAMA,gCANA;AAOA,+BAPA;AAQA,uEARA;AASA,oBATA;AAUA,iDAVA;AAWA,UAXA,CAWA;AACA;AACA,uBADA;AAEA,yBAFA;;AAIA;AACA;AACA,uCADA;;AAGA,SAJA,MAIA;AACA;AACA,0FADA;;AAGA;;AAEA,OA1BA;AA2BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA,CAtGA,C;;;;;;;;;;;;;ACpMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8H;AAC9H;AACoE;AACL;AAC4B;;;AAG3F;AAC+L;AAC/L,gBAAgB,sMAAU;AAC1B,EAAE,sFAAM;AACR,EAAE,4FAAM;AACR,EAAE,qGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,gGAAU;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;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAA4uB,CAAgB,uvBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;ACOhwB,6C;;;;;;AAMA;AACA;AACA,gBADA;AAEA,iBAFA,EADA;;AAKA;AACA,iBADA;AAEA,kBAFA,EALA;;;AAUA;;AAEA;AACA;AACA,CAFA,C;;;;;;;;;;;;ACzBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmI;AACnI;AACyE;AACL;AAC4B;;;AAGhG;AAC+L;AAC/L,gBAAgB,sMAAU;AAC1B,EAAE,2FAAM;AACR,EAAE,iGAAM;AACR,EAAE,0GAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,qGAAU;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,gQAEN;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;AAAivB,CAAgB,4vBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACsDrwB;;;;;;;;;AASA;;;AAGA,+K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,oDACA,4BACA,oCACA,cACA,YADA,EAEA,WAFA,EADA,EAKA,UACA,YADA,EAEA,WAFA,EALA,EASA,YACA,YADA,EAEA,WAFA,EATA,I,CAcA;AACA,oCACA,QADA,IAGA,4CACA,QACA,WADA,EAEA,OAFA,EADA,I,CAMA;AACA,gCACA,QADA,IAGA,wCACA,QACA,WADA,EAEA,OAFA,EADA,I,CAMA;AACA,gCACA,QADA,IAGA,wCACA,QACA,WADA,EAEA,OAFA,EADA,I,CAMA;AACA,qCACA,eADA,IAIA,qCACA,WADA,EAEA,QAFA;;AAIA;AACA,aADA;AAEA,UAFA,EAJA;;AAQA;AACA,aADA;AAEA,UAFA,EARA;;AAYA;AACA,aADA;AAEA,UAFA,EAZA;;AAgBA;AACA,aADA;AAEA,UAFA,EAhBA;;AAoBA;AACA,aADA;AAEA,UAFA,EApBA;;AAwBA;AACA,aADA;AAEA,UAFA,EAxBA;;AA4BA;AACA,aADA;AAEA,UAFA,EA5BA;;;;AAkCA;AACA;AACA;AACA;AACA;AACA,CALA;;AAOA;AACA;AACA;AACA;AACA,sBADA;AAEA,MAFA,CAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAFA;AAGA;AACA,KANA,MAMA;AACA;AACA;AACA;AACA;AACA,OAHA;AAIA,KANA,MAMA;AACA;AACA;AACA;AACA;AACA,OAHA;AAIA;AACA,GAvBA;AAwBA,CA1BA;;AA4BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAFA,MAEA;AACA;AACA;AACA;AACA,GAVA,MAUA;AACA;AACA;AACA;AACA;AACA,GALA,MAKA;AACA;AACA;AACA;;AAEA,CAtBA;;AAwBA;;AAEA;AACA,CAHA;AAIA;;AAEA;AACA,CAHA;AAIA;;AAEA;AACA,CAHA;AAIA;;AAEA;AACA,CAHA;AAIA;AACA;AACA;AACA,CAFA;AAGA;AACA;AACA;AACA,CAFA;;AAIA;AACA;AACA;AACA;AACA,mCADA;AAEA,2BAFA;AAGA,2BAHA;;AAKA,CAPA;AAQA;AACA;AACA,wBADA;AAEA,kBAFA,I","file":"subPages/address-info/index.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './subPages/address-info/index.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./index.vue?vue&type=template&id=3ff5d8d2&scoped=true&\"\nvar renderjs\nimport script from \"./index.vue?vue&type=script&setup=true&lang=js&\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=js&\"\nimport style0 from \"./index.scss?vue&type=style&index=0&id=3ff5d8d2&lang=scss&scoped=true&\"\nimport style1 from \"./components/selectArea.scss?vue&type=style&index=1&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!C:\\\\Users\\\\itcast\\\\Downloads\\\\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 \"3ff5d8d2\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"subPages/address-info/index.vue\"\nexport default component.exports","export * from \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=template&id=3ff5d8d2&scoped=true&\"","import mod from \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=script&setup=true&lang=js&\"; export default mod; export * from \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=script&setup=true&lang=js&\"","<template>\r\n\t<!-- 头部导航栏 -->\r\n\t<nav-bar title='寄快递' :handleToLink=\"handleToLink\"></nav-bar>\r\n\t<view class=\"address-info\">\r\n\t\t<!-- 实名认证 -->\r\n\t\t<view class=\"approve-tips\">\r\n\t\t\t<view class=\"circle\"></view>\r\n\t\t\t<view class=\"content\">\r\n\t\t\t\t根据国家法律法规要求寄件人名称须与实名信息一致。您可以在下单前认证或现场出示证件\r\n\t\t\t</view>\r\n\t\t\t<view class=\"btn\">实名认证</view>\r\n\t\t</view>\r\n\t\t<!-- 地址信息 -->\r\n\t\t<view class=\"address-box\">\r\n\t\t\t<view class=\"title\">\r\n\t\t\t\t<view class=\"address-title\" v-if=\"type === 'address'\">联系人信息</view>\r\n\t\t\t\t<view class=\"send-get-title\" v-else>\r\n\t\t\t\t\t<view class=\"send\" v-if=\"type==='send'\">寄</view>\r\n\t\t\t\t\t<view class=\"get\" v-else-if=\"type==='get'\">收</view>\r\n\t\t\t\t\t<view class=\"subTitle\">\r\n\t\t\t\t\t\t{{type==='send'?'寄':'收'}}件人信息\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"toAddress\">\r\n\t\t\t\t\t\t地址簿\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\t<!-- 姓名,电话 -->\r\n\t\t\t<view class=\"name-number\">\r\n\t\t\t\t<input class=\"uni-input\" :class=\"formName!==''?'active':''\" placeholder=\"姓名\" @input=\"handleFormName\"\r\n\t\t\t\t\t:value=\"formName\" />\r\n\t\t\t\t<input class=\"uni-input\" :class=\"formPhone!==''?'active':''\" placeholder=\"电话\" @input=\"handleFormPhone\"\r\n\t\t\t\t\t:value=\"formPhone\" />\r\n\t\t\t</view>\r\n\t\t\t<!-- 城市/地区 -->\r\n\t\t\t<view class=\"city-area\" @click=\"handledSelectArea\">\r\n\t\t\t\t<view class=\"label\" :class=\"areaLabel!=='城市/地区'?'active':''\">{{areaLabel}}</view>\r\n\t\t\t\t<view class=\"arrow\"></view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 详细地址 -->\r\n\t\t\t<view class=\"address-detail\">\r\n\t\t\t\t<input class=\"uni-input\" :class=\"formAddressInfo!==''?'active':''\" placeholder=\"详细地址(例如:**街**号)\"\r\n\t\t\t\t\t:value=\"formAddressInfo\" @input=\"handleFormAddressInfo\" />\r\n\t\t\t</view>\r\n\t\t\t<!-- 底部按钮区域 -->\r\n\t\t\t<view class=\"footer\">\r\n\t\t\t\t<view class=\"save-address\" @click=\"handleSaveToAddress\">\r\n\t\t\t\t\t<view class=\"checkbox\" :class=\"{active:isFromAddress?isDefaultAddress:isSaveToAddress}\"></view>\r\n\t\t\t\t\t<view class=\"label\"> {{isFromAddress?'设为默认寄件地址':'保存到地址簿'}}</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"reset-btn\" @click=\"reset\">清空</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<BtnFooter btnText='确定' :isActive=\"isConfirm\" @confirm=\"submit\"></BtnFooter>\r\n\t\t<!-- 选择省市区弹窗 -->\r\n\t\t<SelectArea ref='selectArea' @getAreaData=\"getAreaData\" :provinceId=\"provinceId\" :cityId=\"cityId\"\r\n\t\t\t:countyId=\"countyId\"></SelectArea>\r\n\t</view>\r\n</template>\r\n\r\n<script setup>\r\n\timport {\r\n\t\tref,\r\n\t\treactive,\r\n\t\tonMounted,\r\n\t\tcomputed\r\n\t\t// onLoad\r\n\t} from 'vue';\r\n\timport {\r\n\t\tonLoad,\r\n\t\tonShow\r\n\t} from '@dcloudio/uni-app';\r\n\timport BtnFooter from '@/components/BtnFooter/index.vue'\r\n\timport SelectArea from './components/selectArea.vue'\r\n\timport {\r\n\t\taddAddress,\r\n\t\tgetAddressInfoDetail,\r\n\t\teditAddress\r\n\t} from '@/pages/api/address.js'\r\n\r\n\tconst formName = ref('')\r\n\tconst formPhone = ref('')\r\n\tconst formAddressInfo = ref('')\r\n\tlet provinceId = ref('')\r\n\tlet cityId = ref('')\r\n\tlet countyId = ref('')\r\n\tconst isSaveToAddress = ref(false) //是否保存到地址簿\r\n\tconst isDefaultAddress = ref(false) //是否设置为默认地址\r\n\tconst isFromAddress = ref()//是否来自地址簿\r\n\tconst selectArea = ref()\r\n\tconst type = ref('send') //寄件人,收件人,地址簿\r\n\tconst addressType = ref() //寄件,收件\r\n\tconst editOrAdd = ref()\r\n\tconst id = ref('') //查询地址详情的id\r\n\tconst isConfirm = computed(() => {\r\n\t\treturn (Boolean(formName.value) && Boolean(formPhone.value) && Boolean(formAddressInfo.value) && areaLabel\r\n\t\t\t.value !== '城市/地区')\r\n\t}) //是否可以提交确定\r\n\tconst areaLabel = ref('城市/地区') //省市区选择的值\r\n\tonLoad((options) => {\r\n\t\tif(options.id){\r\n\t\t\tgetAddressInfo(options.id)\r\n\t\t}\r\n\t\teditOrAdd.value = options.editOrAdd\r\n\t\tid.value = options.id || ''\r\n\t\ttype.value = options.type\r\n\t\tisFromAddress.value = options.isFromAddress\r\n\t\tconsole.log(id.value, options, uni.getStorageSync('senderInfo'), 'fuck')\r\n\t})\r\n\tonMounted(() => {\r\n\t\tselectArea.value.getList()\r\n\t})\r\n\t//查询地址簿详情\r\n\tconst getAddressInfo = async (id) => {\r\n\t\tawait getAddressInfoDetail(id).then((res) => {\r\n\t\t\tconst {\r\n\t\t\t\tname,\r\n\t\t\t\tphoneNumber,\r\n\t\t\t\taddress,\r\n\t\t\t\tcity,\r\n\t\t\t\tcounty,\r\n\t\t\t\tprovince,\r\n\t\t\t\tisShow,\r\n\t\t\t\tisDefault\r\n\t\t\t} = res.data\r\n\t\t\tformName.value = name\r\n\t\t\tformPhone.value = phoneNumber\r\n\t\t\tformAddressInfo.value = address\r\n\t\t\tareaLabel.value = province.name + ' ' + city.name + ' ' + county.name\r\n\t\t\tprovinceId.value = province.id\r\n\t\t\tcityId.value = city.id\r\n\t\t\tcountyId.value = county.id\r\n\t\t\tisSaveToAddress.value = isShow\r\n\t\t\tisDefaultAddress.value = isDefault\r\n\t\t\t// selectArea.value.getList()\r\n\t\t\tconsole.log(res, province.id, cityId.value, provinceId.value, '地址簿详情')\r\n\t\t})\r\n\t\tselectArea.value.getList()\r\n\t}\r\n\r\n\t//是否保存到地址簿、是否设置为默认地址\r\n\tconst handleSaveToAddress = () => {\r\n\t\tif (type.value === 'address') {\r\n\t\t\tisDefaultAddress.value = !isDefaultAddress.value\r\n\t\t} else {\r\n\t\t\tisSaveToAddress.value = !isSaveToAddress.value\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//打开选择省市区弹窗\r\n\tconst handledSelectArea = () => {\r\n\t\tconsole.log(111)\r\n\t\tselectArea.value.handleOpen()\r\n\t}\r\n\t//处理姓名表单输入\r\n\tconst handleFormName = (event) => {\r\n\t\tformName.value = event.detail.value\r\n\t}\r\n\t//处理电话表单输入\r\n\tconst handleFormPhone = (event) => {\r\n\t\tformPhone.value = event.detail.value\r\n\t}\r\n\t//处理详细地址表单输入\r\n\tconst handleFormAddressInfo = (event) => {\r\n\t\tformAddressInfo.value = event.detail.value\r\n\t}\r\n\t//获取省市区组件的值\r\n\tconst getAreaData = (value) => {\r\n\t\tconsole.log(value, 'value')\r\n\t\tprovinceId.value = value.province.id\r\n\t\tcityId.value = value.city.id\r\n\t\tcountyId.value = value.area.id\r\n\t\tareaLabel.value = value.province.name + ' ' + value.city.name + ' ' + value.area.name\r\n\t}\r\n\t//重置表单\r\n\tconst reset = () => {\r\n\t\tformAddressInfo.value = ''\r\n\t\tformName.value = ''\r\n\t\tformPhone.value = ''\r\n\t\tareaLabel.value = ''\r\n\t}\r\n\tconst handleToLink = ()=>{\r\n\t\t// console.log('handleToLinkhandleToLink')\r\n\t\tif(isFromAddress.value){\r\n\t\t\tuni.redirectTo({\r\n\t\t\t\turl:'/pages/address/index'\r\n\t\t\t})\r\n\t\t}else{\r\n\t\t\tuni.redirectTo({\r\n\t\t\t\turl:'/pages/express-delivery/index?id=' + id.value +'&type=' + type.value + '&editOrAdd=' + editOrAdd.value + '&isFromAddress=' + isFromAddress.value\r\n\t\t\t})\r\n\t\t}\r\n\t\r\n\t}\r\n\t//提交表单\r\n\tconst submit = () => {\r\n\t\tconsole.log(editOrAdd.value,id.value,'sssss')\r\n\t\tif (!isConfirm.value) {\r\n\t\t\tuni.showToast({\r\n\t\t\t\ttitle: '请将信息填写完整',\r\n\t\t\t\ticon: 'none'\r\n\t\t\t})\r\n\t\t} else if (!(/^1[3456789]\\d{9}$/.test(formPhone.value))) {\r\n\t\t\tuni.showToast({\r\n\t\t\t\ttitle: '请填写正确的手机号码格式',\r\n\t\t\t\ticon: 'none'\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tif (editOrAdd.value === 'add' && !id.value) {\r\n\t\t\t\t// console.log('add', provinceId.value)\r\n\t\t\t\taddAddress({\r\n\t\t\t\t\tname: formName.value,\r\n\t\t\t\t\tphoneNumber: formPhone.value,\r\n\t\t\t\t\taddress: formAddressInfo.value,\r\n\t\t\t\t\tprovinceId: provinceId.value,\r\n\t\t\t\t\tcityId: cityId.value,\r\n\t\t\t\t\tcountyId: countyId.value,\r\n\t\t\t\t\ttype: type.value === 'send' ? 1 : 2,\r\n\t\t\t\t\tisShow: isFromAddress.value ? 1 : isSaveToAddress.value ? 1 : 0,\r\n\t\t\t\t\tisDefault: isDefaultAddress.value ? 1 : 0\r\n\t\t\t\t}).then((res) => {\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: '操作成功',\r\n\t\t\t\t\t\ticon: 'success'\r\n\t\t\t\t\t})\r\n\t\t\t\t\tif(isFromAddress.value){\r\n\t\t\t\t\t\tuni.redirectTo({\r\n\t\t\t\t\t\t\turl:'/pages/address/index'\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tuni.redirectTo({\r\n\t\t\t\t\t\t\turl:'/pages/express-delivery/index?id=' + res.data.id +'&type=' + type.value\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t})\r\n\t\t\t} else if (editOrAdd.value === 'edit' && id.value) {\r\n\t\t\t\teditAddress({\r\n\t\t\t\t\tname: formName.value,\r\n\t\t\t\t\tphoneNumber: formPhone.value,\r\n\t\t\t\t\taddress: formAddressInfo.value,\r\n\t\t\t\t\tprovinceId: provinceId.value,\r\n\t\t\t\t\tcityId: cityId.value,\r\n\t\t\t\t\tcountyId: countyId.value,\r\n\t\t\t\t\ttype: addressType.value,\r\n\t\t\t\t\tisShow: isFromAddress.value ? 1 : isSaveToAddress.value ? 1 : 0,\r\n\t\t\t\t\tid: id.value,\r\n\t\t\t\t\tisDefault: isDefaultAddress.value ? 1 : 0\r\n\t\t\t\t}).then((res) => {\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: '操作成功',\r\n\t\t\t\t\t\ticon: 'success'\r\n\t\t\t\t\t})\r\n\t\t\t\t\tif(isFromAddress.value){\r\n\t\t\t\t\t\tuni.redirectTo({\r\n\t\t\t\t\t\t\turl:'/pages/address/index'\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tuni.redirectTo({\r\n\t\t\t\t\t\t\turl:'/pages/express-delivery/index?id=' + res.data.id +'&type=' + type.value\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\t})\r\n\t\t\t}\r\n\t\t\t// uni.navigateBack()\r\n\r\n\t\t\t// if (type.value === 'send') {\r\n\t\t\t// \tuni.setStorage({\r\n\t\t\t// \t\tkey: 'senderInfo',\r\n\t\t\t// \t\tdata: {\r\n\t\t\t// \t\t\tsendName: formName.value,\r\n\t\t\t// \t\t\tsendPhone: formPhone.value,\r\n\t\t\t// \t\t\tsendAddress: formAddressInfo.value,\r\n\t\t\t// \t\t\tsendAreaLabel: areaLabel.value\r\n\t\t\t// \t\t}\r\n\t\t\t// \t})\r\n\t\t\t// } else {\r\n\t\t\t// \tuni.setStorage({\r\n\t\t\t// \t\tkey: 'geterInfo',\r\n\t\t\t// \t\tdata: {\r\n\t\t\t// \t\t\tname: formName.value,\r\n\t\t\t// \t\t\tphone: formPhone.value,\r\n\t\t\t// \t\t\taddress: formAddressInfo.value,\r\n\t\t\t// \t\t\tareaLabel: areaLabel.value\r\n\t\t\t// \t\t}\r\n\t\t\t// \t})\r\n\t\t\t// }\r\n\r\n\t\t\t// uni.navigateTo({\r\n\t\t\t// \turl:'/pages/express-delivery/index?name=' + formName.value\r\n\t\t\t// })\r\n\r\n\r\n\t\t}\r\n\t\tconsole.log('submit')\r\n\t}\r\n</script>\r\n\r\n<style src=\"./index.scss\" lang=\"scss\" scoped></style>\r\n<style src=\"./components/selectArea.scss\" lang=\"scss\"></style>\n","import { render, staticRenderFns, recyclableRender, components } from \"./index.vue?vue&type=template&id=0e2d1a4f&scoped=true&\"\nvar renderjs\nimport script from \"./index.vue?vue&type=script&setup=true&lang=js&\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=js&\"\nimport style0 from \"./index.scss?vue&type=style&index=0&id=0e2d1a4f&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!C:\\\\Users\\\\itcast\\\\Downloads\\\\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 \"0e2d1a4f\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/BtnFooter/index.vue\"\nexport default component.exports","export * from \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=template&id=0e2d1a4f&scoped=true&\"","var components\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 \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=script&setup=true&lang=js&\"; export default mod; export * from \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./index.vue?vue&type=script&setup=true&lang=js&\"","<template>\r\n\t<view class=\"BtnFooter\">\r\n\t\t<view class=\"btn\" :class=\"isActive?'active':''\" @click=\"handleClick\">{{btnText}}</view>\r\n\t</view>\n</template>\n\n<script setup>\r\n\timport {\r\n\t\tref,\r\n\t\treactive,\r\n\t\tonMounted,\r\n\t\tdefineEmits\r\n\t} from 'vue';\r\n\tdefineProps({\r\n\t\tbtnText:{\r\n\t\t\ttype: String,\r\n\t\t\tdefault: '确定',\r\n\t\t},\r\n\t\tisActive:{\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: false,\r\n\t\t}\r\n\t})\r\n\tconst emits = defineEmits([\"@confirm\"]);\r\n\t\r\n\tconst handleClick = ()=>{\r\n\t\temits('confirm')\r\n\t}\n</script>\n\n<style src=\"./index.scss\" lang=\"scss\" scoped></style>","import { render, staticRenderFns, recyclableRender, components } from \"./selectArea.vue?vue&type=template&id=7dfaf907&scoped=true&\"\nvar renderjs\nimport script from \"./selectArea.vue?vue&type=script&setup=true&lang=js&\"\nexport * from \"./selectArea.vue?vue&type=script&setup=true&lang=js&\"\nimport style0 from \"./selectArea.scss?vue&type=style&index=0&id=7dfaf907&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!C:\\\\Users\\\\itcast\\\\Downloads\\\\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 \"7dfaf907\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"subPages/address-info/components/selectArea.vue\"\nexport default component.exports","export * from \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./selectArea.vue?vue&type=template&id=7dfaf907&scoped=true&\"","var components\ntry {\n components = {\n uniPopup: function() {\n return import(\n /* webpackChunkName: \"uni_modules/uni-popup/components/uni-popup/uni-popup\" */ \"@/uni_modules/uni-popup/components/uni-popup/uni-popup.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 \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./selectArea.vue?vue&type=script&setup=true&lang=js&\"; export default mod; export * from \"-!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!C:\\\\Users\\\\itcast\\\\Downloads\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./selectArea.vue?vue&type=script&setup=true&lang=js&\"","<template>\r\n\t<view class=\"selectArea\">\r\n\t\t<uni-popup ref=\"popup\" type=\"bottom\">\r\n\t\t\t<view class=\"header\">\r\n\t\t\t\t<view class=\"header-title\">选择省市区</view>\r\n\t\t\t\t<view class=\"close\" @click=\"handleCancel\"></view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 搜索框 -->\r\n\t\t\t<!-- \t<view class=\"seachBox\">\r\n\t\t\t\t<uni-search-bar placeholder=\"请输入城市/区县/街道名称搜索\" cancelButton=\"none\" @confirm=\"search\" :focus=\"true\"\r\n\t\t\t\t\tv-model=\"searchValue\" @blur=\"blur\" @focus=\"focus\" @input=\"input\">\r\n\t\t\t\t\t<template v-slot:searchIcon>\r\n\t\t\t\t\t\t<view class=\"search-icon\"></view>\r\n\t\t\t\t\t</template>\r\n\t\t\t\t</uni-search-bar>\r\n\t\t\t</view> -->\r\n\t\t\t<!-- 热门城市 -->\r\n\t\t\t<!-- \t<view class=\"hot-city\">\r\n\t\t\t\t<view class=\"title\">热门城市</view>\r\n\t\t\t\t<view class=\"city-box\">\r\n\t\t\t\t\t<view class=\"city-item\" v-for=\"(item,index) in cityList\" :key=\"index\">\r\n\t\t\t\t\t\t{{item.label}}\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\t<!-- 省市区三级联动 -->\r\n\t\t\t<view class=\"province-city-area\">\r\n\t\t\t\t<view class=\"label-box\">\r\n\t\t\t\t\t<view class=\"label\">省份</view>\r\n\t\t\t\t\t<view class=\"label\">城市</view>\r\n\t\t\t\t\t<view class=\"label\">区县</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<picker-view :value=\"areaIndex.data\" :indicator-style=\"`height: 50px;`\" @change=\"bindChange\"\r\n\t\t\t\t\tclass=\"picker-view\">\r\n\t\t\t\t\t<picker-view-column>\r\n\t\t\t\t\t\t<view class=\"item\" v-for=\"(item,index) in province.data\" :key=\"index\">{{item.name}}</view>\r\n\t\t\t\t\t</picker-view-column>\r\n\t\t\t\t\t<picker-view-column>\r\n\t\t\t\t\t\t<view class=\"item\" v-for=\"(item,index) in city.data\" :key=\"index\">{{item.name}}</view>\r\n\t\t\t\t\t</picker-view-column>\r\n\t\t\t\t\t<picker-view-column>\r\n\t\t\t\t\t\t<view class=\"item\" v-for=\"(item,index) in area.data\" :key=\"index\">{{item.name}}</view>\r\n\t\t\t\t\t</picker-view-column>\r\n\t\t\t\t</picker-view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 底部 -->\r\n\t\t\t<view class=\"footer\">\r\n\t\t\t\t<view class=\"btn\" @click=\"confirm\">确定</view>\r\n\t\t\t</view>\r\n\t\t</uni-popup>\r\n\t</view>\r\n</template>\r\n\r\n<script setup>\r\n\timport {\r\n\t\tref,\r\n\t\treactive,\r\n\t\tonMounted,\r\n\t\tnextTick,\r\n\t\tdefineEmits,\r\n\t\tdefineProps,\r\n\t\tcomputed\r\n\t} from 'vue';\r\n\timport {\r\n\t\tgetArea\r\n\t} from '@/pages/api/order.js'\r\n\timport {\r\n\t\tonLoad,\r\n\t\tonShow\r\n\t} from '@dcloudio/uni-app';\r\n\tconst emits = defineEmits([\"@getAreaData\"]);\r\n\tconst popup = ref()\r\n\tlet props = defineProps({\r\n\t\tprovinceId: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: '',\r\n\t\t},\r\n\t\tcityId: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: '',\r\n\t\t},\r\n\t\tcountyId: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: '',\r\n\t\t}\r\n\t})\r\n\t//省数据\r\n\tlet province = reactive({\r\n\t\tdata: []\r\n\t})\r\n\tlet selectedProvince = reactive({\r\n\t\tdata: {\r\n\t\t\tname: '北京市',\r\n\t\t\tid: '1'\r\n\t\t}\r\n\t})\r\n\t//市数据\r\n\tconst city = reactive({\r\n\t\tdata: []\r\n\t})\r\n\tlet selectedCity = reactive({\r\n\t\tdata: {\r\n\t\t\tname: '直辖市',\r\n\t\t\tid: '2'\r\n\t\t}\r\n\t})\r\n\t//区域数据\r\n\tconst area = reactive({\r\n\t\tdata: []\r\n\t})\r\n\tlet selectedArea = reactive({\r\n\t\tdata: {\r\n\t\t\tname: '东城区',\r\n\t\t\tid: '3'\r\n\t\t}\r\n\t})\r\n\t//记录三级联动每项的index\r\n\tlet areaIndex = reactive({\r\n\t\tdata: [0, 0, 0]\r\n\t})\r\n\r\n\tconst cityList = reactive([{\r\n\t\t\tlabel: '北京',\r\n\t\t\tvalue: 1\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: '上海',\r\n\t\t\tvalue: 2\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: '广州',\r\n\t\t\tvalue: 3\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: '深圳',\r\n\t\t\tvalue: 4\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: '东莞',\r\n\t\t\tvalue: 5\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: '杭州',\r\n\t\t\tvalue: 6\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: '成都',\r\n\t\t\tvalue: 7\r\n\t\t},\r\n\t\t{\r\n\t\t\tlabel: '南京',\r\n\t\t\tvalue: 8\r\n\t\t}\r\n\t])\r\n\r\n\tconst getList = () => {\r\n\t\tconsole.log(props, 'propsssss')\r\n\t\t getAreaInfo('', province)\r\n\t\t getAreaInfo(props.provinceId || 1, city)\r\n\t\t getAreaInfo(props.cityId || 2, area)\r\n\t}\r\n\r\n\t//获取省市区\r\n\tconst getAreaInfo = (parentId, type) => {\r\n\t\tconsole.log(parentId,'parentId')\r\n\t\tgetArea({\r\n\t\t\tparentId\r\n\t\t}).then((res) => {\r\n\t\t\ttype.data = res.data\r\n\t\t\tif (type === province) {\r\n\t\t\t\t//用于解决响应式状态变更但是dom不更新的问题\r\n\t\t\t\tnextTick(()=>{\r\n\t\t\t\t\tareaIndex.data[0] = res.data.findIndex(item => item.id == props.provinceId)\r\n\t\t\t\t})\r\n\t\t\t\tconsole.log(props, res.data.findIndex(item => item.id == props.provinceId), 'province')\r\n\t\t\t} else if (type === city) {\r\n\t\t\t\tconsole.log(props, res.data, res.data.findIndex(item => item.id == props.cityId), 'city')\r\n\t\t\t\tnextTick(()=>{\r\n\t\t\t\t\tselectedCity.data = res.data[0]\r\n\t\t\t\t\tareaIndex.data[1] = res.data.findIndex(item => item.id == props.cityId)\r\n\t\t\t\t})\r\n\t\t\t} else if (type === area) {\r\n\t\t\t\tconsole.log(props.countyId, res.data, res.data.findIndex(item => item.id == props.countyId), 'area')\r\n\t\t\t\tnextTick(()=>{\r\n\t\t\t\t\tselectedArea.data = res.data[0]\r\n\t\t\t\t\tareaIndex.data[2] = res.data.findIndex(item => item.id == props.countyId)\r\n\t\t\t\t})\t\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n\r\n\t//选择省市区\r\n\tconst bindChange = (event) => {\r\n\t\t//二级地址获取\r\n\t\tif (areaIndex.data[0] !== event.detail.value[0]) {\r\n\t\t\tconsole.log(province.data[event.detail.value[0]].id, '二级地址获取')\r\n\t\t\tgetAreaInfo(province.data[event.detail.value[0]].id, city)\r\n\t\t\t//处理二级地址只有一个数据无法触发三级的问题\r\n\t\t\tif (['7362', '1', '161792'].includes(province.data[event.detail.value[0]].id)) {\r\n\t\t\t\tgetAreaInfo(Number(province.data[event.detail.value[0]].id) + 1, area)\r\n\t\t\t} else {\r\n\t\t\t\tarea.data = []\r\n\t\t\t}\r\n\t\t\tselectedProvince.data = province.data[event.detail.value[0]]\r\n\t\t} else if (areaIndex.data[1] !== event.detail.value[1]) {\r\n\t\t\t//三级地址获取\r\n\t\t\tgetAreaInfo(city.data[event.detail.value[1]].id, area)\r\n\t\t\tselectedCity.data = city.data[event.detail.value[1]]\r\n\t\t\tconsole.log('三级地址获取')\r\n\t\t} else {\r\n\t\t\tselectedArea.data = area.data[event.detail.value[2]]\r\n\t\t}\r\n\t\tareaIndex.data = event.detail.value\r\n\r\n\t}\r\n\r\n\tconst input = () => {\r\n\r\n\t\tconsole.log('input')\r\n\t}\r\n\tconst search = () => {\r\n\r\n\t\tconsole.log('search')\r\n\t}\r\n\tconst blur = () => {\r\n\r\n\t\tconsole.log('blur')\r\n\t}\r\n\tconst focus = () => {\r\n\r\n\t\tconsole.log('focus')\r\n\t}\r\n\t// 打开弹层\r\n\tconst handleOpen = () => {\r\n\t\tpopup.value.open('bottom');\r\n\t};\r\n\t// 关闭弹层\r\n\tconst handleCancel = () => {\r\n\t\tpopup.value.close('bottom');\r\n\t}\r\n\r\n\t//确认选择省市区\r\n\tconst confirm = () => {\r\n\t\thandleCancel()\r\n\t\temits(\"getAreaData\", {\r\n\t\t\tprovince: selectedProvince.data,\r\n\t\t\tcity: selectedCity.data,\r\n\t\t\tarea: selectedArea.data\r\n\t\t})\r\n\t}\r\n\t// 暴漏给父组件\r\n\tdefineExpose({\r\n\t\thandleOpen,\r\n\t\tgetList\r\n\t});\r\n</script>\r\n\r\n<style src=\"./selectArea.scss\" lang=\"scss\" scoped></style>\n"],"sourceRoot":""}