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
16 KiB
1 lines
16 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/address.vue?815c","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/address.vue?ab38","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/address.vue?d527","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/address.vue?ea89","uni-app:///pages/user/address/address.vue","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/address.vue?3c3c","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/address/address.vue?68f8"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","source","order_id","addressList","modalName","listTouchStart","listTouchDirection","total","current_page","last_page","status","contentText","contentdown","contentrefresh","contentnomore","onPullDownRefresh","onReachBottom","onLoad","methods","loadData","url","loadingTip","page","success","uni","delAddress","id","refreshList","type","checkAddress","addAddress","ListTouchStart","ListTouchMove","ListTouchEnd"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,gBAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoH;AACpH;AAC2D;AACL;AACa;;;AAGnE;AACwK;AACxK,gBAAgB,+KAAU;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,aAAa,qMAEN;AACP,KAAK;AACL;AACA,aAAa,sNAEN;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;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACxDA;AAAA;AAAA;AAAA;AAA6nB,CAAgB,2nBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eCmCjpB;EACAC;IACA;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MACAC;QACAC;QACAC;QACAC;MACA;IACA;EACA;EACA;EACAC;IACA;IACA;IACA;EACA;EACA;EACAC;IACA;IACA;MACA;IACA;MACA;MACA;MACA;IACA;EACA;EACAC;IACA;IACA;IACA;EACA;EACAC;IACAC;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA;gBACA;kBACAC;kBACAC;kBACArB;oBACAsB;kBACA;kBACAC;oBACA;sBACA;oBACA;sBACA;sBACAC;oBACA;oBACA;oBACA;oBACA;oBACA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACA;IACAC;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA;gBACA;gBACA;kBACAL;kBACApB;oBAAA0B;kBAAA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACA;IACAC;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA;gBACA;kBACAP;kBACApB;oBAAAA;oBAAA4B;kBAAA;kBACAL;oBACA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACA;IACAM;MACA;QACA;QACA;MACA;QAAA;QACA;QACA;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;QACA;MACA;QACA;MACA;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;ACtJA;AAAA;AAAA;AAAA;AAA05B,CAAgB,o3BAAG,EAAC,C;;;;;;;;;;;ACA96B;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/user/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 './pages/user/address/address.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./address.vue?vue&type=template&id=302e77e4&\"\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=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/address.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!./address.vue?vue&type=template&id=302e77e4&\"","var components\ntry {\n components = {\n wanlEmpty: function () {\n return import(\n /* webpackChunkName: \"components/wanl-empty/wanl-empty\" */ \"@/components/wanl-empty/wanl-empty.vue\"\n )\n },\n uniLoadMore: function () {\n return import(\n /* webpackChunkName: \"components/uni-load-more/uni-load-more\" */ \"@/components/uni-load-more/uni-load-more.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 var g0 = _vm.addressList.length === 0 && _vm.status !== \"loading\"\n var l0 = _vm.__map(_vm.addressList, function (item, index) {\n var $orig = _vm.__get_orig(item)\n var g1 = _vm.addressList ? item.name.substring(0, 1) : null\n return {\n $orig: $orig,\n g1: g1,\n }\n })\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n l0: l0,\n },\n }\n )\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!./address.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!./address.vue?vue&type=script&lang=js&\"","<!-- 2020年2月15日14:57:57 完成 -->\r\n<template>\r\n\t<view>\r\n\t\t<view class=\"edgeInsetTop\"></view>\r\n\t\t<wanl-empty v-if=\"addressList.length === 0 && status !== 'loading'\" text=\"还没添加任何地址\"/>\r\n\t\t<view class=\"margin-top-bj\">\r\n\t\t\t<view class=\"cu-list menu-avatar\">\r\n\t\t\t\t<view class=\"cu-item\" :class=\"modalName == 'move-box-' + index ? 'move-cur' : ''\" v-if=\"addressList\" v-for=\"(item, index) in addressList\" :key=\"item.id\" @tap=\"checkAddress(item)\" @touchstart=\"ListTouchStart\" @touchmove=\"ListTouchMove\" @touchend=\"ListTouchEnd\" :data-target=\"'move-box-' + index\" >\r\n\t\t\t\t\t<view class=\"cu-avatar round lg\" style=\"background-color: #fe6600;\">{{ item.name.substring(0, 1) }}</view>\r\n\t\t\t\t\t<view class=\"content\">\r\n\t\t\t\t\t\t<view>\r\n\t\t\t\t\t\t\t<text class=\"wanl-pip margin-right-sm text-lg\">{{ item.name }}</text>\r\n\t\t\t\t\t\t\t<text class=\"wanl-gray-light text-sm\">{{ item.mobile }}</text>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"text-sm wanl-pip text-cut-2\" style=\"line-height: 1.3;\">\r\n\t\t\t\t\t\t\t<text class=\"wlIcon-dizhi text-red margin-right-xs\" v-if=\"item.default == 1\"></text>\r\n\t\t\t\t\t\t\t{{ item.province }} {{ item.city }} {{ item.district }} {{ item.address }}\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=\"action\" @tap.stop=\"addAddress('edit', item)\"><text class=\"wlIcon-xiugaioryijian text-xl\"></text></view>\r\n\t\t\t\t\t<view class=\"move\">\r\n\t\t\t\t\t\t<view class=\"bg-grey\" @tap.stop=\"addAddress('edit', item)\">编辑</view>\r\n\t\t\t\t\t\t<view class=\"bg-red\" @tap.stop=\"delAddress(item.id, index)\">删除</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<wanl-empty text=\"没有找到任何地址\" src=\"address_default3x\" v-else/>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<uni-load-more :status=\"status\" :content-text=\"contentText\" />\r\n\t\t<view class=\"edgeInsetBottom\"></view>\r\n\t\t<view class=\"wanlian cu-bar tabbar foot flex flex-direction\"><button @tap=\"addAddress('add')\" class=\"cu-btn wanl-bg-orange lg\">+ 增加收货地址</button></view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tsource: 0,\r\n\t\t\torder_id: 0,\r\n\t\t\taddressList: [],\r\n\t\t\tmodalName: null,\r\n\t\t\tlistTouchStart: 0,\r\n\t\t\tlistTouchDirection: null,\r\n\t\t\t//上拉下拉\r\n\t\t\ttotal: 0, //数据量\r\n\t\t\tcurrent_page: 1, //当前页码\r\n\t\t\tlast_page: 1 ,//总页码\r\n\t\t\tstatus: 'loading',\r\n\t\t\tcontentText: {\r\n\t\t\t\tcontentdown: ' ',\r\n\t\t\t\tcontentrefresh: '正在加载..',\r\n\t\t\t\tcontentnomore: ''\r\n\t\t\t}\r\n\t\t};\r\n\t},\r\n\t// 监听下拉刷新\r\n\tonPullDownRefresh() {\r\n\t\tthis.current_page = 1;\r\n\t\tthis.reload = true;\r\n\t\tthis.loadData();\r\n\t},\r\n\t// 监听上拉加载\r\n\tonReachBottom() {\r\n\t\t//判断是否最后一页\r\n\t\tif(this.current_page >= this.last_page){\r\n\t\t\tthis.status = 'noMore';\r\n\t\t}else{\r\n\t\t\tthis.current_page = this.current_page + 1; //页码+1\r\n\t\t\tthis.status = 'loading';\r\n\t\t\tthis.loadData(true);\r\n\t\t}\r\n\t},\r\n\tonLoad(option) {\r\n\t\tthis.source = option.source;\r\n\t\tthis.order_id = option.order_id;\r\n\t\tthis.loadData();\r\n\t},\r\n\tmethods: {\r\n\t\tasync loadData(reload, refresh) {\r\n\t\t\tthis.$api.get({\r\n\t\t\t\turl: '/wanlshop/address/getaddress',\r\n\t\t\t\tloadingTip: refresh?'更新列表中...':'',\r\n\t\t\t\tdata:{\r\n\t\t\t\t\tpage: reload?(this.current_page):1\r\n\t\t\t\t},\r\n\t\t\t\tsuccess: res => {\r\n\t\t\t\t\tif(reload){\r\n\t\t\t\t\t\tthis.addressList = this.addressList.concat(res.data);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthis.addressList = res.data;\r\n\t\t\t\t\t\tuni.stopPullDownRefresh();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.total = res.total; //数据量\r\n\t\t\t\t\tthis.current_page = res.current_page; //当前页码\r\n\t\t\t\t\tthis.last_page = res.last_page; //总页码\r\n\t\t\t\t\tthis.status = res.total == 0 ? 'noMore':'more';\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 删除\r\n\t\tasync delAddress(id, key) {\r\n\t\t\tthis.$delete(this.addressList, key); //vue方法\r\n\t\t\tthis.$api.post({\r\n\t\t\t\turl: '/wanlshop/address/deladdress',\r\n\t\t\t\tdata: { id: id }\r\n\t\t\t});\r\n\t\t},\r\n\t\t//添加或修改成功之后回调\r\n\t\tasync refreshList(data, type) {\r\n\t\t\tthis.$api.post({\r\n\t\t\t\turl: '/wanlshop/address/address',\r\n\t\t\t\tdata: {data: data,type: type},\r\n\t\t\t\tsuccess: (res) => {\r\n\t\t\t\t\tthis.loadData(false,true);\r\n\t\t\t\t}\r\n\t\t\t});\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\tthis.$wanlshop.prePage().loadData(item.id);\r\n\t\t\t\tthis.$wanlshop.back(1);\r\n\t\t\t}else if(this.source == 2){ //我的订单修改地址 地址ID 返回订单ID\r\n\t\t\t\tthis.$wanlshop.prePage().refreshList(item.id, this.order_id);\r\n\t\t\t\tthis.$wanlshop.back(1);\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 新增地址\r\n\t\taddAddress(type, item) {\r\n\t\t\tthis.$wanlshop.to(`/pages/user/address/addressManage?type=${type}&data=${JSON.stringify(item)}`);\r\n\t\t},\r\n\t\t// ListTouch触摸开始\r\n\t\tListTouchStart(e) {\r\n\t\t\tthis.listTouchStart = e.touches[0].pageX;\r\n\t\t},\r\n\t\t// ListTouch计算方向\r\n\t\tListTouchMove(e) {\r\n\t\t\tthis.listTouchDirection = e.touches[0].pageX - this.listTouchStart > 0 ? 'right' : 'left';\r\n\t\t},\r\n\t\t// ListTouch计算滚动\r\n\t\tListTouchEnd(e) {\r\n\t\t\tif (this.listTouchDirection == 'left') {\r\n\t\t\t\tthis.modalName = e.currentTarget.dataset.target;\r\n\t\t\t} else {\r\n\t\t\t\tthis.modalName = null;\r\n\t\t\t}\r\n\t\t\tthis.listTouchDirection = null;\r\n\t\t}\r\n\t}\r\n};\r\n</script>\r\n\r\n<style>\r\n.cu-avatar.lg {\r\n\twidth: 90rpx;\r\n\theight: 90rpx;\r\n\tfont-size: 1.5em;\r\n}\r\n.cu-list.menu-avatar>.cu-item{\r\n\theight: 160rpx;\r\n}\r\n\r\n.wanlian.cu-bar.tabbar {\r\n\tbackground-color: transparent;\r\n}\r\n.wanlian.cu-bar.tabbar .cu-btn {\r\n\twidth: calc(100% - 50rpx);\r\n}\r\n.wanlian.cu-bar.tabbar .cu-btn.lg {\r\n\tfont-size: 32rpx;\r\n\theight: 86rpx;\r\n}\r\n\r\n\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!./address.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!./address.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1699839784043\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":""} |