1 |
- {"version":3,"sources":["uni-app:///main.js","webpack:///G:/item/appBase/pages/set/address.vue?386e","webpack:///G:/item/appBase/pages/set/address.vue?2c08","webpack:///G:/item/appBase/pages/set/address.vue?3067","webpack:///G:/item/appBase/pages/set/address.vue?8edb","uni-app:///pages/set/address.vue","webpack:///G:/item/appBase/pages/set/address.vue?0dad","webpack:///G:/item/appBase/pages/set/address.vue?7155"],"names":["createPage","Page"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,+F;AACAA,UAAU,CAACC,gBAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoH;AACpH;AAC2D;AACL;AACc;;;AAGpE;AAC2K;AAC3K,gBAAgB,oLAAU;AAC1B,EAAE,6EAAM;AACR,EAAE,kFAAM;AACR,EAAE,2FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,sFAAU;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;AAA+nB,CAAgB,opBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACmCnpB,yD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eACA,EACA,IADA,kBACA,CACA,SACA,SADA,EAEA,eAFA,GAIA,CANA,EAOA,MAPA,kBAOA,MAPA,EAOA,CACA,iCACA,mBACA,CAVA,EAWA,WACA;AACA,eAFA,yBAEA,kBACA,4BACA,OADA,EAEA,UAFA,IAGA,IAHA,CAGA,sCACA,yBACA,CALA,EAMA,CATA,EAUA;AACA,aAXA,qBAWA,IAXA,EAWA,GAXA,EAWA,mBACA,sDACA,iBACA,SACA,CAHA,EAIA,qCACA,+BACA,WADA,IAEA,IAFA,CAEA,wCACA,qBACA,CAJA,EAIA,KAJA,CAIA,cACA,eACA,CANA,EAOA,CAxBA;AAyBA;AACA,cA1BA,sBA0BA,IA1BA,EA0BA;AACA;AACA,mBADA;AAEA,UAFA,CAEA;AACA;AACA,OAJA;AAKA;AACA;AACA,KAlCA;AAmCA;AACA,gBApCA,wBAoCA,IApCA,EAoCA;AACA;AACA;AACA;AACA;AACA;AACA,KA1CA;AA2CA;AACA,cA5CA,sBA4CA,IA5CA,EA4CA,IA5CA,EA4CA;AACA;AACA,iGADA;;AAGA,KAhDA;AAiDA;AACA,eAlDA,yBAkDA;AACA;AACA;AACA,KArDA,EAXA,E;;;;;;;;;;;;;ACpCA;AAAA;AAAA;AAAA;AAAypC,CAAgB,0nCAAG,EAAC,C;;;;;;;;;;;ACA7qC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/set/address.js","sourcesContent":["import 'uni-pages';\nimport Vue from 'vue'\nimport Page from './pages/set/address.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./address.vue?vue&type=template&id=2f77d044&\"\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&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\work\\\\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/set/address.vue\"\nexport default component.exports","export * from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./address.vue?vue&type=template&id=2f77d044&\"","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 \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\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 \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\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=\"content b-t\">\r\n\t\t<view class=\"list\" v-for=\"(item, index) in addressList\" :key=\"index\" @click=\"checkAddress(item)\">\r\n\t\t\t<view class=\"wrapper\">\r\n\t\t\t\t<view class=\"address-box\">\r\n\t\t\t\t\t<text class=\"name\">{{ item.real_name }}</text>\r\n\t\t\t\t\t<text class=\"mobile\">{{ item.phone }}</text>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"u-box\">\r\n\t\t\t\t\t<text class=\"address\">{{ item.province + item.city + item.district }} {{ item.detail }}</text>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"buttom\">\r\n\t\t\t\t<view class=\"default-buttom\" @click.stop=\"defaultUp(item,index)\">\r\n\t\t\t\t\t<view class=\"iconfont iconroundcheckfill checkbox\" :class=\"{ checked: item.is_default == 1 }\"></view>\r\n\t\t\t\t\t<text class=\"text\">设为默认地址</text>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"operation\">\r\n\t\t\t\t\t<view @click.stop=\"addAddress('edit', item)\">\r\n\t\t\t\t\t\t<text class=\"iconfont iconedit\"></text>\r\n\t\t\t\t\t\t<text class=\"text\">编辑</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"blank\"></view>\r\n\t\t\t\t\t<view @click.stop=\"delAddress(item)\">\r\n\t\t\t\t\t\t<text class=\"iconfont icondelete\"></text>\r\n\t\t\t\t\t\t<text class=\"text\">删除</text>\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<button class=\"add-btn\" @click=\"addAddress('add')\">新增地址</button>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\nimport { getAddressList,setAddressDefault,addressDel } from '@/api/user.js';\r\nexport default {\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tsource: 0,\r\n\t\t\taddressList: []\r\n\t\t};\r\n\t},\r\n\tonLoad(option) {\r\n\t\tthis.source = option.source||0\r\n\t\tthis.loadAddress();\r\n\t},\r\n\tmethods: {\r\n\t\t// 加载地址\r\n\t\tloadAddress() {\r\n\t\t\tgetAddressList({\r\n\t\t\t\tpage: 1,\r\n\t\t\t\tlimit: 100\r\n\t\t\t}).then(({ data }) => {\r\n\t\t\t\tthis.addressList = data;\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 设为默认地址\r\n\t\tdefaultUp(data,ind) {\r\n\t\t\tthis.addressList=this.addressList.map((e) => {\r\n\t\t\t\te.is_default=0\r\n\t\t\t\treturn e\r\n\t\t\t})\r\n\t\t\tthis.addressList[ind].is_default=1\r\n\t\t\tsetAddressDefault({\r\n\t\t\t\tid: data.id\r\n\t\t\t}).then(({ data }) => {\r\n\t\t\t\tthis.loadAddress();\r\n\t\t\t}).catch((e) => {\r\n\t\t\t\tconsole.log(e);\r\n\t\t\t});\r\n\t\t},\r\n\t\t//删除地址\r\n\t\tdelAddress(item) {\r\n\t\t\taddressDel({\r\n\t\t\t\tid:item.id\r\n\t\t\t}).then(({data})=>{\r\n\t\t\t\tthis.$api.msg('删除成功')\r\n\t\t\t})\r\n\t\t\tlet s = this.addressList.indexOf(item);\r\n\t\t\tthis.addressList.splice(s, 1);\r\n\t\t},\r\n\t\t//选择地址\r\n\t\tcheckAddress(item) {\r\n\t\t\tif (this.source == 1) {\r\n\t\t\t\t//this.$api.prePage()获取上一页实例,在App.vue定义\r\n\t\t\t\tthis.$api.prePage().addressData = item;\r\n\t\t\t\tuni.navigateBack();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 添加地址\r\n\t\taddAddress(type, item) {\r\n\t\t\tuni.navigateTo({\r\n\t\t\t\turl: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`\r\n\t\t\t});\r\n\t\t},\r\n\t\t//添加或修改成功之后回调\r\n\t\trefreshList() {\r\n\t\t\t// 重新加载地址\r\n\t\t\tthis.loadAddress()\r\n\t\t}\r\n\t}\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\">\r\npage {\r\n\tpadding-bottom: 120rpx;\r\n\tpadding-top: 20rpx;\r\n\tbackground-color: $page-color-base;\r\n}\r\n.content {\r\n\tposition: relative;\r\n}\r\n.list {\r\n\talign-items: center;\r\n\tpadding: 20rpx 30rpx;\r\n\tbackground: #fff;\r\n\tmargin: 20rpx;\r\n\tmargin-top: 0;\r\n\t.buttom {\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tjustify-content: space-between;\r\n\t\tpadding-top: 10rpx;\r\n\t\t.checkbox {\r\n\t\t\tfont-size: 44rpx;\r\n\t\t\tline-height: 1;\r\n\t\t\tpadding: 4rpx;\r\n\t\t\tcolor: $font-color-disabled;\r\n\t\t\tbackground: #fff;\r\n\t\t\tborder-radius: 50px;\r\n\t\t}\r\n\t\t.checkbox.checked {\r\n\t\t\tcolor: $base-color;\r\n\t\t}\r\n\t\t.default-buttom {\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items: center;\r\n\t\t}\r\n\t\t.operation {\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items: center;\r\n\t\t\t.blank {\r\n\t\t\t\twidth: 30rpx;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.text {\r\n\t\t\tpadding-left: 10rpx;\r\n\t\t\tfont-size: 24rpx;\r\n\t\t\tcolor: #666666;\r\n\t\t}\r\n\t}\r\n}\r\n.wrapper {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tflex: 1;\r\n\tborder-bottom: 1px solid #f0f0f0;\r\n\tpadding-bottom: 20rpx;\r\n}\r\n.address-box {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: space-between;\r\n\t.address {\r\n\t\tfont-size: $font-base + 2rpx;\r\n\t\tcolor: $font-color-dark;\r\n\t}\r\n\t.mobile {\r\n\t\tfont-size: $font-base;\r\n\t\tcolor: rgba(51, 51, 51, 1);\r\n\t}\r\n}\r\n.u-box {\r\n\tfont-size: $font-base;\r\n\tcolor: $font-color-light;\r\n\tmargin-top: 16rpx;\r\n\t.name {\r\n\t\tmargin-right: 30rpx;\r\n\t}\r\n}\r\n.icon-bianji {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\theight: 80rpx;\r\n\tfont-size: 40rpx;\r\n\tcolor: $font-color-light;\r\n\tpadding-left: 30rpx;\r\n}\r\n\r\n.add-btn {\r\n\tposition: fixed;\r\n\tleft: 30rpx;\r\n\tright: 30rpx;\r\n\tbottom: 16rpx;\r\n\tz-index: 95;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\twidth: 690rpx;\r\n\theight: 80rpx;\r\n\tfont-size: $font-lg;\r\n\tcolor: #fff;\r\n\tbackground-color: $base-color;\r\n\tborder-radius: 10rpx;\r\n}\r\n</style>\r\n","import mod from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./address.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\work\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./address.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1618025084379\n var cssReload = require(\"D:/work/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":""}
|