You can not 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 lines
17 KiB
1 lines
17 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/addressManage.vue?406a","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/addressManage.vue?6bdf","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/addressManage.vue?94a0","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/addressManage.vue?e97f","uni-app:///pages/user/address/addressManage.vue","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/addressManage.vue?5658","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/addressManage.vue?7bbe"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","addressData","name","mobile","default","country","province","city","citycode","district","adcode","formatted_address","address","address_name","location","addressList","tips","addressType","onLoad","title","onNavigationBarButtonTap","methods","switchChange","btnClick","console","successSelectAddress","getInputtips","uni","url","key","keywords","success","res","item","blurInputtips","setTimeout","confirmInputtips","focusInputtips","addressTisp","confirm"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,sBAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0H;AAC1H;AACiE;AACL;AACa;;;AAGzE;AACwK;AACxK,gBAAgB,+KAAU;AAC1B,EAAE,mFAAM;AACR,EAAE,wFAAM;AACR,EAAE,iGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,4FAAU;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,iNAEN;AACP,KAAK;AACL;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;AAAmoB,CAAgB,ioBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eC0CvpB;EACAC;IACA;MACAC;QACAC;QACAC;QACAC;QACA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACA;QACAC;QAAA;QACAC;QAAA;QACAC;MACA;;MACAC;QACAD;QACAJ;QACAM;MACA;MACAC;IACA;EACA;EACAC;IACA;IACA;MACA;IACA;IACA;MACAC;MACA;IACA;IACA;IACA;EACA;EACAC;IACA;EACA;EACAC;IACAC;MACA;QACA;MACA;QACA;MACA;IACA;IACAC;MACAC;MACA;IACA;IACAC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACA;IACA;IACAC;MAAA;MACA;MACA;QACAC;UACAC;UACA5B;YACA6B;YACAC;YACAhB;YACAP;UACA;UACAwB;YACA;YACAC;cACA;gBACAC;gBACAA;cACA;cACAlB;YACA;YACA;UACA;QACA;MACA;IACA;IACA;IACAmB;MAAA;MACA;MACAC;QACA;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;MACA;MACA;MACA;MACA;IACA;IACA;IACAC;MACA;MACA;QACA;QACA;MACA;MACA;QAAA;QACA;QACA;MACA;MACA;QACA;QACA;MACA;MACA;QACA;QACA;MACA;MACA;MACA;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;ACtLA;AAAA;AAAA;AAAA;AAAg6B,CAAgB,03BAAG,EAAC,C;;;;;;;;;;;ACAp7B;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/user/address/addressManage.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/user/address/addressManage.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./addressManage.vue?vue&type=template&id=0c66dada&\"\nvar renderjs\nimport script from \"./addressManage.vue?vue&type=script&lang=js&\"\nexport * from \"./addressManage.vue?vue&type=script&lang=js&\"\nimport style0 from \"./addressManage.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../k/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 = \"pages/user/address/addressManage.vue\"\nexport default component.exports","export * from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./addressManage.vue?vue&type=template&id=0c66dada&\"","var components\ntry {\n components = {\n wanlAddress: function () {\n return import(\n /* webpackChunkName: \"components/wanl-address/wanl-address\" */ \"@/components/wanl-address/wanl-address.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 \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./addressManage.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./addressManage.vue?vue&type=script&lang=js&\"","<!-- 2020年2月17日18:18:53 完成 -->\r\n<template>\r\n\t<view>\r\n\t\t<view class=\"edgeInsetTop\"></view>\r\n\t\t<view class=\"cu-form-group\" v-show=\"addressType\">\r\n\t\t\t<view class=\"title\">联系人</view>\r\n\t\t\t<input type=\"text\" placeholder=\"姓名\" v-model=\"addressData.name\"></input>\r\n\t\t</view>\r\n\t\t<view class=\"cu-form-group\" v-show=\"addressType\">\r\n\t\t\t<view class=\"title\">手机号</view>\r\n\t\t\t<input type=\"number\" placeholder=\"手机号码\" maxlength=\"11\" v-model=\"addressData.mobile\"></input>\r\n\t\t</view>\r\n\t\t<view class=\"cu-form-group\">\r\n\t\t\t<view class=\"title\">所在地区</view>\r\n\t\t\t<input type=\"text\" @tap=\"btnClick\" :value=\"addressData.formatted_address\" placeholder=\"选择地区\" />\r\n\t\t</view>\r\n\t\t<view class=\"cu-form-group align-start\">\r\n\t\t\t<view class=\"title\">详细地址</view>\r\n\t\t\t<textarea maxlength=\"-1\" @input=\"getInputtips\" @focus=\"focusInputtips\" @confirm=\"confirmInputtips\" @blur=\"blurInputtips\"\r\n\t\t\t :placeholder-style=\"addressData.adcode==''?'color: #bbb':''\" :adjust-position=\"false\" :value=\"addressData.address?(addressData.address_name+addressData.address):''\"\r\n\t\t\t :disabled=\"addressData.adcode==''?true:false\" :placeholder=\"addressData.adcode==''?'还没有选择地区哦~ 选择地区后完成此项':'支持智能联想,输入小区名试试~'\"></textarea>\r\n\t\t</view>\r\n\t\t<view class=\"cu-form-group margin-top-bj\" v-show=\"addressType\">\r\n\t\t\t<view class=\"title\">设为默认</view>\r\n\t\t\t<switch @change=\"switchChange\" :class=\"addressData.default == 1?'checked':''\" :checked=\"addressData.default == 1\"></switch>\r\n\t\t</view>\r\n\t\t<scroll-view scroll-y=\"true\" class=\"tipsScroll\" v-show=\"!addressType\">\r\n\t\t\t<view class=\"item\" v-for=\"(item,index) in addressList.tips\" :key=\"index\" @tap=\"addressTisp(item)\">\r\n\t\t\t\t<view>{{item.address}}</view>\r\n\t\t\t\t<text>{{item.name}}</text>\r\n\t\t\t</view>\r\n\t\t</scroll-view>\r\n\t\t<!-- 1.0.5升级 -->\r\n\t\t<!-- 1.0.6升级 -->\r\n\t\t<view class=\"padding-bj flex flex-direction margin-top\" v-show=\"addressType\">\r\n\t\t\t<button @tap=\"confirm\" class=\"cu-btn wanl-bg-orange lg\">完成</button>\r\n\t\t</view>\r\n\t\t<wanl-address ref='wanlAddress' @selectAddress=\"successSelectAddress\"></wanl-address>\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\taddressData: {\r\n\t\t\t\t\tname: '',\r\n\t\t\t\t\tmobile: '',\r\n\t\t\t\t\tdefault: 0,\r\n\t\t\t\t\t//地区\r\n\t\t\t\t\tcountry: '', // 国家\r\n\t\t\t\t\tprovince: '', //省份\r\n\t\t\t\t\tcity: '', // 城市\r\n\t\t\t\t\tcitycode: '', // 城市代码\r\n\t\t\t\t\tdistrict: '', // 县\r\n\t\t\t\t\tadcode: '', // 地区代码\r\n\t\t\t\t\tformatted_address: '', //详细地区\r\n\t\t\t\t\t//详情\r\n\t\t\t\t\taddress: '', //详细地址\r\n\t\t\t\t\taddress_name: '', // 地址名称\r\n\t\t\t\t\tlocation: '' //经纬度\r\n\t\t\t\t},\r\n\t\t\t\taddressList: {\r\n\t\t\t\t\tlocation: '',\r\n\t\t\t\t\tadcode: '',\r\n\t\t\t\t\ttips: {}\r\n\t\t\t\t},\r\n\t\t\t\taddressType: true\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad(option) {\r\n\t\t\tlet title = '新增地址 ';\r\n\t\t\tif (option.type === 'newadd') {\r\n\t\t\t\tthis.addressData.default = 1\r\n\t\t\t}\r\n\t\t\tif (option.type === 'edit') {\r\n\t\t\t\ttitle = '编辑地址'\r\n\t\t\t\tthis.addressData = JSON.parse(option.data)\r\n\t\t\t}\r\n\t\t\tthis.manageType = option.type;\r\n\t\t\tthis.$wanlshop.title(title);\r\n\t\t},\r\n\t\tonNavigationBarButtonTap() {\r\n\t\t\tthis.confirm()\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tswitchChange(e) {\r\n\t\t\t\tif (e.detail.value) {\r\n\t\t\t\t\tthis.addressData.default = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.addressData.default = 0;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tbtnClick() {\r\n\t\t\t\tconsole.log(123)\r\n\t\t\t\tthis.$refs.wanlAddress.show()\r\n\t\t\t},\r\n\t\t\tsuccessSelectAddress(address) {\r\n\t\t\t\tthis.addressData.country = address.country;\r\n\t\t\t\tthis.addressData.province = address.province;\r\n\t\t\t\tthis.addressData.city = address.city;\r\n\t\t\t\tthis.addressData.citycode = address.citycode;\r\n\t\t\t\tthis.addressData.district = address.district;\r\n\t\t\t\tthis.addressData.formatted_address = address.formatted_address;\r\n\t\t\t\tthis.addressData.location = address.location;\r\n\t\t\t\tthis.addressData.adcode = address.adcode;\r\n\t\t\t\tthis.addressList.location = address.location;\r\n\t\t\t\tthis.addressList.adcode = address.adcode;\r\n\t\t\t},\r\n\t\t\t//调用高德地图搜索相关地址\r\n\t\t\tgetInputtips(event) {\r\n\t\t\t\tlet keywords = event.detail.value;\r\n\t\t\t\tif (keywords) {\r\n\t\t\t\t\tuni.request({\r\n\t\t\t\t\t\turl: 'https://restapi.amap.com/v3/assistant/inputtips',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tkey: this.$wanlshop.config('amapkey'),\r\n\t\t\t\t\t\t\tkeywords: keywords,\r\n\t\t\t\t\t\t\tlocation: this.addressList.location,\r\n\t\t\t\t\t\t\tcity: this.addressList.adcode\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tsuccess: (res) => {\r\n\t\t\t\t\t\t\tlet addressList = [];\r\n\t\t\t\t\t\t\tres.data.tips.forEach(item => {\r\n\t\t\t\t\t\t\t\tif (item.address.length == 0) {\r\n\t\t\t\t\t\t\t\t\titem.address = '暂未收录地址';\r\n\t\t\t\t\t\t\t\t\titem.location = '113.294701,22.666562';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\taddressList.push(item);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tthis.addressList.tips = addressList;\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\tblurInputtips(event) {\r\n\t\t\t\tthis.addressData.address = event.detail.value;\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.addressType = true;\r\n\t\t\t\t}, 10);\r\n\t\t\t},\r\n\t\t\t// 详细地址已完成\r\n\t\t\tconfirmInputtips(event) {\r\n\t\t\t\tthis.addressType = true;\r\n\t\t\t},\r\n\t\t\t// 详细地址获取焦点\r\n\t\t\tfocusInputtips(event) {\r\n\t\t\t\tthis.addressType = false;\r\n\t\t\t},\r\n\t\t\t// 详细地址替换\r\n\t\t\taddressTisp(data) {\r\n\t\t\t\tthis.addressData.adcode = data.adcode;\r\n\t\t\t\tthis.addressData.address = data.address;\r\n\t\t\t\tthis.addressData.address_name = data.name;\r\n\t\t\t\tthis.addressData.location = data.location;\r\n\t\t\t\tthis.addressType = true;\r\n\t\t\t},\r\n\t\t\t//提交\r\n\t\t\tconfirm() {\r\n\t\t\t\tlet data = this.addressData;\r\n\t\t\t\tif (!data.name) {\r\n\t\t\t\t\tthis.$wanlshop.msg('请填写收货人姓名');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (!/^1[0-9]{10,10}$/.test(data.mobile)) { // 1.0.2升级\r\n\t\t\t\t\tthis.$wanlshop.msg('请输入正确的手机号码');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (!data.city) {\r\n\t\t\t\t\tthis.$wanlshop.msg('请选择地区');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (!data.address) {\r\n\t\t\t\t\tthis.$wanlshop.msg('请填写详细信息');\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tthis.$wanlshop.prePage().refreshList(data, this.manageType);\r\n\t\t\t\tthis.$wanlshop.msg(`地址${this.manageType=='edit' ? '修改': '添加'}成功`);\r\n\t\t\t\tthis.$wanlshop.back(1);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t.cu-form-group {\r\n\t\tpadding: 0 25rpx;\r\n\t}\r\n\r\n\t.cu-form-group .title {\r\n\t\tmin-width: calc(4em + 15px);\r\n\t\tfont-size: 26rpx;\r\n\t}\r\n\r\n\t.cu-form-group input,\r\n\t.cu-form-group textarea {\r\n\t\tfont-size: 26rpx;\r\n\t}\r\n\r\n\t.cu-btn.lg {\r\n\t\tfont-size: 32rpx;\r\n\t\theight: 86rpx;\r\n\t}\r\n\r\n\t.tipsScroll {\r\n\t\twidth: 100%;\r\n\t\theight: 500rpx;\r\n\t\tpadding: 0 50rpx;\r\n\t}\r\n\r\n\t.tipsScroll .item {\r\n\t\tmargin: 25rpx 0;\r\n\t}\r\n\r\n\t.tipsScroll .item view {\r\n\t\tcolor: #B8B8B8;\r\n\t\tfont-size: 22rpx;\r\n\t}\r\n\r\n\t.tipsScroll .item text {\r\n\t\tcolor: #333;\r\n\t}\r\n</style>\r\n","import mod from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./addressManage.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./addressManage.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1699839784054\n var cssReload = require(\"C:/Users/liudan/Desktop/k/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":""} |