This commit is contained in:
2023-05-15 14:05:32 +08:00
parent d4573307b8
commit 15d688b0a3
1587 changed files with 33057 additions and 91924 deletions
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
/*! For license information please see 37c8d87e96c04e575f72be683de6cceb.js.LICENSE.txt */
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["sub-common/37c8d87e96c04e575f72be683de6cceb"],{"./src/components/AddressList/index.tsx":function(e,s,n){var t=n("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),r=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),a=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),d=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),c=n("./node_modules/@tarojs/taro/index.js"),l=n.n(c),i=n("./node_modules/react/cjs/react.production.min.js"),o=n("./src/api/addressManager.ts"),u=n("./src/common/common.ts"),f=n("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),m=function AddressList(e){var s,n,m,h,p=e.addButtonEnabled,x=void 0===p||p,v=e.focusBorderEnabled,j=void 0!==v&&v,w=(0,o.addressListApi)(),_=w.fetchData,b=w.state,g=(0,i.useState)(),N=(0,a.default)(g,2),k=N[0],y=N[1],V=function(){var s=(0,r.default)((0,t.default)().mark((function _callee(){var s,n;return(0,t.default)().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_();case 2:s=t.sent,e.id?y(e.id):null===(n=s.data.list)||void 0===n||n.every((function(e){return!e.is_default||(y(e.id),!1)}));case 4:case"end":return t.stop()}}),_callee)})));return function getData(){return s.apply(this,arguments)}}();(0,i.useEffect)((function(){return V(),l().eventCenter.on("addressList:refresh",V),function(){l().eventCenter.off("addressList:refresh",V)}}),[]);var A=(0,i.useState)(!1),C=(0,a.default)(A,2),L=C[0],S=C[1],T=function(){var e=(0,r.default)((0,t.default)().mark((function _callee2(){return(0,t.default)().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),e.next=3,V();case 3:S(!1);case 4:case"end":return e.stop()}}),_callee2)})));return function handleRefresh(){return e.apply(this,arguments)}}(),D=(Array.from({length:15}),(0,o.addressDeleteApi)().fetchData);return(0,f.jsxs)(d.View,{className:"address-scroll-view",children:[(0,f.jsx)(d.ScrollView,{scrollY:!0,refresherEnabled:e.refresherEnabled,enhanced:!0,refresherTriggered:L,onRefresherRefresh:T,children:(0,f.jsx)(d.View,{className:"address-scroll-view-content",children:(null==b||null===(s=b.data)||void 0===s||null===(n=s.list)||void 0===n?void 0:n.length)>0?null==b||null===(m=b.data)||void 0===m||null===(h=m.list)||void 0===h?void 0:h.map((function(s,n){return(0,f.jsxs)(d.View,{onLongPress:function onLongPress(){return function handleDelete(e){(0,c.showModal)({title:"提示",content:"是否删除地址?",success:function success(s){return(0,r.default)((0,t.default)().mark((function _callee3(){var n;return(0,t.default)().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:if(!s.confirm){t.next=5;break}return t.next=3,D({id:e.id});case 3:(n=t.sent).success?(u.alert.success("删除成功"),V()):u.alert.success(n.msg);case 5:case"end":return t.stop()}}),_callee3)})))()}})}(s)},onClick:function onClick(){return function handleSelect(s,n){e.onSelect&&e.onSelect(s,n),j&&y(null==s?void 0:s.id)}(s,n)},className:"address-list ".concat(k==s.id&&"address-active"),children:[(0,f.jsxs)(d.View,{className:"address-user",children:[s.name,(0,f.jsx)(d.Text,{className:"address-list-phone",children:s.phone.replace(s.phone.substring(3,7),"****")}),s.is_default&&(0,f.jsx)(d.Text,{className:"address-list-default",children:"默认"})]}),(0,f.jsxs)(d.View,{className:"address-list-bottom",children:[(0,f.jsx)(d.View,{className:"address-list-info",children:(0,f.jsx)(d.View,{className:"address-list-info_title",children:s.province_name+s.city_name+s.district_name})}),(0,f.jsx)(d.Navigator,{onClick:function onClick(e){return e.stopPropagation()},url:"/pages/addressAdd/index?type=edit&id=".concat(s.id),hoverClass:"none",className:"address-edit",children:(0,f.jsx)(d.Text,{className:"iconfont icon-bianji"})})]})]},s.id)})):(0,f.jsx)(d.View,{className:"address-no-data",children:"暂未添加地址"})})}),x&&(0,f.jsx)(d.Navigator,{url:"/pages/addressAdd/index?type=add",hoverClass:"none",className:"add-address",children:"添加收货地址"})]})};s.default=(0,i.memo)(m)}}]);
@@ -0,0 +1,2 @@
/*! For license information please see 5203ee5b6c7f4a9fb1ae172eb73f138a.js.LICENSE.txt */
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["sub-common/5203ee5b6c7f4a9fb1ae172eb73f138a"],{"./src/api/addressManager.ts":function(e,s,t){t.d(s,{addressAddApi:function(){return u},addressDeleteApi:function(){return i},addressDetailApi:function(){return n},addressEditApi:function(){return a},addressListApi:function(){return d}});var r=t("./src/use/useHttp.ts"),d=function addressListApi(){return(0,r.useRequest)({url:"/v1/mall/address/list",method:"get"})},u=function addressAddApi(){return(0,r.useRequest)({url:"/v1/mall/address",method:"post"})},n=function addressDetailApi(){return(0,r.useRequest)({url:"/v1/mall/address",method:"get"})},a=function addressEditApi(){return(0,r.useRequest)({url:"/v1/mall/address",method:"put"})},i=function addressDeleteApi(){return(0,r.useRequest)({url:"/v1/mall/address",method:"delete"})}}}]);
@@ -0,0 +1,157 @@
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[2].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[2].use[4]!./src/components/AddressList/index.scss ***!
\************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.common_safe_area_y {
width: 100%;
height: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
height: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
}
.hoverClass {
-webkit-filter: brightness(70%);
filter: brightness(70%);
}
.full-100 {
width: 100%;
height: 100%;
}
.address-scroll-view {
height: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
.address-scroll-view scroll-view {
height: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.address-scroll-view .address-scroll-view-content {
padding-bottom: 300rpx;
}
.address-scroll-view .address-list {
width: 704rpx;
background: #ffffff;
border-radius: 20rpx;
-webkit-box-shadow: 2rpx 4rpx 12rpx 0rpx rgba(0, 0, 0, 0.16);
box-shadow: 2rpx 4rpx 12rpx 0rpx rgba(0, 0, 0, 0.16);
padding: 30rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 18rpx auto 0;
border: 1px solid #ffffff;
border: 1px solid rgba(0, 0, 0, 0.16);
position: relative;
}
.address-scroll-view .address-active {
border: 1px solid #68b4ff;
-webkit-box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 122, 255, 0.27);
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 122, 255, 0.27);
}
.address-scroll-view .address-list:first-child {
margin-top: 0;
}
.address-scroll-view .address-list-last {
margin-bottom: 300rpx;
}
.address-scroll-view .address-user {
font-size: 28rpx;
font-family: Microsoft YaHei, Microsoft YaHei-Bold;
font-weight: 700;
text-align: left;
color: #000000;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.address-scroll-view .address-list-default {
width: 58rpx;
height: 28rpx;
background: #cde5ff;
border-radius: 6rpx;
font-size: 20rpx;
font-weight: 400;
text-align: center;
color: #4581ff;
margin-left: 30rpx;
}
.address-scroll-view .address-list-phone {
font-size: 24rpx;
font-weight: 400;
color: #ababab;
margin-left: 30rpx;
}
.address-scroll-view .address-edit {
padding: 10rpx;
position: absolute;
margin: auto;
top: 0;
right: 20rpx;
bottom: 0;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.address-scroll-view .address-edit .icon-bianji {
font-size: 40rpx;
}
.address-scroll-view .address-list-info {
font-size: 24rpx;
font-weight: 400;
color: #3c3c3c;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 80%;
}
.address-scroll-view .address-list-bottom {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-top: 18rpx;
}
.address-scroll-view .add-address {
width: 668rpx;
height: 82rpx;
background: #4581ff;
border-radius: 40rpx;
font-size: 32rpx;
font-weight: 400;
color: #ffffff;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
position: absolute;
bottom: 100rpx;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.address-scroll-view .address-no-data {
font-size: 24rpx;
font-weight: 400;
text-align: center;
color: #707070;
height: 100%;
padding-top: 40%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@@ -1,448 +0,0 @@
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[2].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/@tarojs/webpack5-runner/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[2].use[4]!./src/components/AddressList/index.scss ***!
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@charset "UTF-8";
.common_safe_area_y {
width: 100%;
height: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
height: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
background-color: transparent;
}
.flex-col {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-flow: column nowrap;
-ms-flex-flow: column nowrap;
flex-flow: column nowrap;
}
.flex-row {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-flow: row nowrap;
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
}
.justify-between {
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
}
.justify-center {
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.items-center {
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.flex-item {
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.full-100 {
width: 100%;
height: 100%;
}
.color-blue {
color: #3287EC;
}
.color-yellow {
color: #FF9100;
}
.color-green {
color: #00B837;
}
.color-grey {
color: #707070;
}
.color-white {
color: white;
}
.s-w::after {
content: "W";
font-size: 28rpx;
}
.s-e::after {
content: "E";
font-size: 28rpx;
}
.filter {
-webkit-filter: blur(1);
filter: blur(1);
}
@font-face {
font-family: "iconfont";
/* Project id 3619513 */
src: url(/styles/iconfont.ttf?t=1663556335905) format("truetype");
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16rpx;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-shouhou1:before {
content: "\e641";
}
.icon-cangku1:before {
content: "\e642";
}
.icon-saoma:before {
content: "\e643";
}
.icon-dizhi1:before {
content: "\e644";
}
.icon-huodaofukuan:before {
content: "\e645";
}
.icon-yufukuan1:before {
content: "\e646";
}
.icon-yue:before {
content: "\e647";
}
.icon-zidingyi:before {
content: "\e648";
}
.icon-jinetiaozheng:before {
content: "\e649";
}
.icon-tuikuan1:before {
content: "\e64a";
}
.icon-zhankai:before {
content: "\e63f";
}
.icon-shouqi:before {
content: "\e640";
}
.icon-lujing:before {
content: "\e63e";
}
.icon-jizhumima:before {
content: "\e63c";
}
.icon-a-jizhumima:before {
content: "\e63d";
}
.icon-weixindenglu:before {
content: "\e63b";
}
.icon-kehuxinxi:before {
content: "\e63a";
}
.icon-yewuyuanqizi:before {
content: "\e639";
}
.icon-chakanquanbukehu:before {
content: "\e638";
}
.icon-biyan:before {
content: "\e637";
}
.icon-bianji:before {
content: "\e61e";
}
.icon-daikuan:before {
content: "\e61f";
}
.icon-cangku:before {
content: "\e620";
}
.icon-guanlidingdan:before {
content: "\e621";
}
.icon-mima:before {
content: "\e622";
}
.icon-guanbi:before {
content: "\e623";
}
.icon-jianshao:before {
content: "\e624";
}
.icon-dingwei:before {
content: "\e625";
}
.icon-saomiao:before {
content: "\e626";
}
.icon-peihuo:before {
content: "\e627";
}
.icon-shaixuan:before {
content: "\e628";
}
.icon-paiming:before {
content: "\e629";
}
.icon-shanchusousuoxinxi:before {
content: "\e62a";
}
.icon-shijian:before {
content: "\e62b";
}
.icon-sousuo:before {
content: "\e62c";
}
.icon-shouhou:before {
content: "\e62d";
}
.icon-sousuofanhui:before {
content: "\e62e";
}
.icon-sousuoshanchu:before {
content: "\e62f";
}
.icon-tuikuan:before {
content: "\e630";
}
.icon-tishi:before {
content: "\e631";
}
.icon-xianxiahuizong:before {
content: "\e632";
}
.icon-xinzeng:before {
content: "\e633";
}
.icon-yonghuming:before {
content: "\e634";
}
.icon-yanjing:before {
content: "\e635";
}
.icon-yufukuan:before {
content: "\e636";
}
.icon-wodekefu:before {
content: "\e60c";
}
.icon-dizhi:before {
content: "\e60d";
}
.icon-shouhouzhongxin:before {
content: "\e60e";
}
.icon-wodeshoucang:before {
content: "\e60f";
}
.icon-shoukuanliebiao:before {
content: "\e610";
}
.icon-madanguanli:before {
content: "\e611";
}
.icon-qusechazhao:before {
content: "\e612";
}
.icon-pandiansaoma:before {
content: "\e613";
}
.icon-yaoqingma:before {
content: "\e614";
}
.icon-duizhang:before {
content: "\e615";
}
.icon-tihuoliebiao:before {
content: "\e616";
}
.icon-yangpinduibi:before {
content: "\e617";
}
.icon-yansequyang:before {
content: "\e618";
}
.icon-fahuoliebiao:before {
content: "\e619";
}
.icon-yuncangkucun:before {
content: "\e61a";
}
.icon-xiaoshou:before {
content: "\e61b";
}
.icon-qianzhicangkucun:before {
content: "\e61c";
}
.icon-lingquseka:before {
content: "\e61d";
}
.icon-gouwu1:before {
content: "\e608";
}
.icon-dingdan1:before {
content: "\e609";
}
.icon-gerenzhongxin1:before {
content: "\e60a";
}
.icon-shouye1:before {
content: "\e60b";
}
.icon-gerenzhongxin:before {
content: "\e604";
}
.icon-dingdan:before {
content: "\e605";
}
.icon-shouye:before {
content: "\e606";
}
.icon-gouwu:before {
content: "\e607";
}
.address-container {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-flow: row nowrap;
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.address-scroll-view {
height: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
.address-scroll-view scroll-view {
height: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.address-scroll-view .address-scroll-view-content {
padding-bottom: 300rpx;
}
.address-scroll-view .address-list {
background: #ffffff;
border-radius: 20rpx;
padding: 24rpx 30rpx;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 18rpx 24rpx 0;
}
.address-scroll-view .address-active {
border: 1px solid #68b4ff;
}
.address-scroll-view .address-list-last {
margin-bottom: 300rpx;
}
.address-scroll-view .address-user {
font-size: 32rpx;
font-weight: 700;
text-align: left;
color: #000000;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.address-scroll-view .address-list-default {
background: #ffffff;
border-radius: 6rpx;
font-size: 20rpx;
font-weight: 400;
text-align: center;
color: #007aff;
padding: 4rpx 10rpx;
}
.address-scroll-view .address-list-phone {
font-size: 28rpx;
font-weight: 400;
color: #717171;
margin-left: 16rpx;
margin-right: 16rpx;
}
.address-scroll-view .address-edit {
padding: 10rpx;
}
.address-scroll-view .address-edit .icon-bianji {
font-size: 40rpx;
}
.address-scroll-view .address-list-info {
font-size: 28rpx;
font-weight: 400;
color: #000000;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 557rpx;
}
.address-scroll-view .address-list-info view {
max-width: 557rpx;
}
.address-scroll-view .address-list-bottom {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-top: 10rpx;
}
.address-scroll-view .add-address {
width: 668rpx;
height: 82rpx;
background: #007aff;
border-radius: 40rpx;
font-size: 32rpx;
font-weight: 400;
color: #ffffff;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
position: absolute;
bottom: 100rpx;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.address-scroll-view .address-no-data {
font-size: 24rpx;
font-weight: 400;
text-align: center;
color: #707070;
height: 100%;
padding-top: 40%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.address-scroll-view .line {
margin-top: 16rpx;
width: 100%;
height: 1px;
background: #000000;
opacity: 0.1;
}
.address-scroll-view .bottom-font {
margin-top: 16rpx;
font-size: 28rpx;
font-weight: 400;
color: #676767;
}
@@ -1,2 +0,0 @@
/*! For license information please see dde3895fab754ea605d2697ad6817a2a.js.LICENSE.txt */
"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([["sub-common/dde3895fab754ea605d2697ad6817a2a"],{"./src/api/addressList.ts":function(e,r,s){s.d(r,{GetAddressListApi:function(){return u},MpPurchaserAddress:function(){return n},MpPurchaserAddressDelete:function(){return p},MpPurchaserAddressGet:function(){return a},MpPurchaserAddressList:function(){return d},MpPurchaserAddressPut:function(){return c}});var t=s("./src/use/useHttp.ts");var u=function GetAddressListApi(){return(0,t.useRequest)({url:"/v2/mp/district/list",method:"get"})};var d=function MpPurchaserAddressList(){return(0,t.useRequest)({url:"/v2/mp/purchaser/address/list",method:"get"})};var n=function MpPurchaserAddress(){return(0,t.useRequest)({url:"/v2/mp/purchaser/address",method:"post"})};var a=function MpPurchaserAddressGet(){return(0,t.useRequest)({url:"/v2/mp/purchaser/address",method:"get"})};var c=function MpPurchaserAddressPut(){return(0,t.useRequest)({url:"/v2/mp/purchaser/address",method:"put"})};var p=function MpPurchaserAddressDelete(){return(0,t.useRequest)({url:"/v2/mp/purchaser/address",method:"delete"})}}}]);