qj-b2c-store 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/context/index.d.ts +6 -0
  2. package/dist/core/demo.d.ts +1 -0
  3. package/dist/core/external.d.ts +5 -0
  4. package/dist/core/index.d.ts +2 -0
  5. package/dist/core/makeStore.d.ts +2 -0
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.js +1 -0
  8. package/dist/store/account/hooks/index.d.ts +1 -0
  9. package/dist/store/account/hooks/useAgreement.d.ts +1 -0
  10. package/dist/store/account/hooks/useMySetting.d.ts +4 -0
  11. package/dist/store/account/index.d.ts +1 -0
  12. package/dist/store/addressDetail/hooks/index.d.ts +1 -0
  13. package/dist/store/addressDetail/hooks/useAddAddress.d.ts +3 -0
  14. package/dist/store/addressDetail/index.d.ts +1 -0
  15. package/dist/store/addressList/hooks/index.d.ts +2 -0
  16. package/dist/store/addressList/hooks/useAddressItem.d.ts +3 -0
  17. package/dist/store/addressList/hooks/useAddressList.d.ts +8 -0
  18. package/dist/store/addressList/index.d.ts +1 -0
  19. package/dist/store/afterSales/hooks/afterSalesConfig.d.ts +4 -0
  20. package/dist/store/afterSales/hooks/index.d.ts +5 -0
  21. package/dist/store/afterSales/hooks/useAfterSalesApply.d.ts +23 -0
  22. package/dist/store/afterSales/hooks/useAfterSalesChooseType.d.ts +17 -0
  23. package/dist/store/afterSales/hooks/useAfterSalesDetail.d.ts +18 -0
  24. package/dist/store/afterSales/hooks/useAfterSalesList.d.ts +8 -0
  25. package/dist/store/afterSales/index.d.ts +1 -0
  26. package/dist/store/articleDetail/hooks/index.d.ts +1 -0
  27. package/dist/store/articleDetail/hooks/useArticleDetail.d.ts +7 -0
  28. package/dist/store/articleDetail/index.d.ts +1 -0
  29. package/dist/store/cart/hooks/index.d.ts +2 -0
  30. package/dist/store/cart/hooks/useCartItem.d.ts +9 -0
  31. package/dist/store/cart/hooks/useCartList.d.ts +19 -0
  32. package/dist/store/cart/index.d.ts +2 -0
  33. package/dist/store/cart/store/index.d.ts +10 -0
  34. package/dist/store/cart-next/hooks/index.d.ts +3 -0
  35. package/dist/store/cart-next/hooks/useCartListNext.d.ts +12 -0
  36. package/dist/store/cart-next/hooks/useCartOperate.d.ts +11 -0
  37. package/dist/store/cart-next/hooks/useCartTop.d.ts +4 -0
  38. package/dist/store/cart-next/index.d.ts +1 -0
  39. package/dist/store/collectionList/hooks/index.d.ts +1 -0
  40. package/dist/store/collectionList/hooks/useCollectionList.d.ts +25 -0
  41. package/dist/store/collectionList/index.d.ts +1 -0
  42. package/dist/store/coupon/hooks/index.d.ts +1 -0
  43. package/dist/store/coupon/hooks/useAllCoupon.d.ts +12 -0
  44. package/dist/store/coupon/index.d.ts +1 -0
  45. package/dist/store/couponList/hooks/index.d.ts +4 -0
  46. package/dist/store/couponList/hooks/useCouponList.d.ts +21 -0
  47. package/dist/store/couponList/hooks/useOverdue.d.ts +5 -0
  48. package/dist/store/couponList/hooks/useUnused.d.ts +5 -0
  49. package/dist/store/couponList/hooks/useUsed.d.ts +5 -0
  50. package/dist/store/couponList/index.d.ts +1 -0
  51. package/dist/store/cube/hooks/index.d.ts +6 -0
  52. package/dist/store/cube/index.d.ts +1 -0
  53. package/dist/store/evaluateDetail/hooks/index.d.ts +1 -0
  54. package/dist/store/evaluateDetail/hooks/useEvaluateDetail.d.ts +6 -0
  55. package/dist/store/evaluateDetail/index.d.ts +1 -0
  56. package/dist/store/expressInfo/hooks/index.d.ts +1 -0
  57. package/dist/store/expressInfo/hooks/useExpressInfo.d.ts +14 -0
  58. package/dist/store/expressInfo/index.d.ts +1 -0
  59. package/dist/store/footprint/hooks/index.d.ts +1 -0
  60. package/dist/store/footprint/hooks/useFootprint.d.ts +25 -0
  61. package/dist/store/footprint/index.d.ts +1 -0
  62. package/dist/store/goTop/hooks/index.d.ts +1 -0
  63. package/dist/store/goTop/hooks/useGoTop.d.ts +3 -0
  64. package/dist/store/goTop/index.d.ts +1 -0
  65. package/dist/store/goods/hooks/index.d.ts +1 -0
  66. package/dist/store/goods/hooks/useGoods.d.ts +8 -0
  67. package/dist/store/goods/index.d.ts +1 -0
  68. package/dist/store/goodsClassify/hooks/index.d.ts +1 -0
  69. package/dist/store/goodsClassify/hooks/useGoodsClassify.d.ts +7 -0
  70. package/dist/store/goodsClassify/index.d.ts +1 -0
  71. package/dist/store/goodsDetail/hooks/index.d.ts +12 -0
  72. package/dist/store/goodsDetail/hooks/useAddCoupon.d.ts +4 -0
  73. package/dist/store/goodsDetail/hooks/useAddShopping.d.ts +9 -0
  74. package/dist/store/goodsDetail/hooks/useBanner.d.ts +4 -0
  75. package/dist/store/goodsDetail/hooks/useCoupon.d.ts +40 -0
  76. package/dist/store/goodsDetail/hooks/useEvaluate.d.ts +1 -0
  77. package/dist/store/goodsDetail/hooks/useFootprint.d.ts +1 -0
  78. package/dist/store/goodsDetail/hooks/useGoodCollection.d.ts +12 -0
  79. package/dist/store/goodsDetail/hooks/useGoodDetail.d.ts +40 -0
  80. package/dist/store/goodsDetail/hooks/useGoodSku.d.ts +9 -0
  81. package/dist/store/goodsDetail/hooks/useGoodSpecAndPrice.d.ts +4 -0
  82. package/dist/store/goodsDetail/hooks/useGoodsShare.d.ts +3 -0
  83. package/dist/store/goodsDetail/hooks/usePromotion.d.ts +1 -0
  84. package/dist/store/goodsDetail/index.d.ts +3 -0
  85. package/dist/store/goodsDetail/store/index.d.ts +20 -0
  86. package/dist/store/goodsDetail/utils/index.d.ts +25 -0
  87. package/dist/store/goodsList/hooks/index.d.ts +1 -0
  88. package/dist/store/goodsList/hooks/useGoodsList.d.ts +17 -0
  89. package/dist/store/goodsList/index.d.ts +1 -0
  90. package/dist/store/index.d.ts +28 -0
  91. package/dist/store/marketing/hooks/index.d.ts +1 -0
  92. package/dist/store/marketing/hooks/useMarketingPromotion.d.ts +6 -0
  93. package/dist/store/marketing/index.d.ts +1 -0
  94. package/dist/store/notice/index.d.ts +4 -0
  95. package/dist/store/noticeDetail/hooks/index.d.ts +5 -0
  96. package/dist/store/noticeDetail/index.d.ts +1 -0
  97. package/dist/store/order/constant/index.d.ts +3 -0
  98. package/dist/store/order/hooks/config.d.ts +7 -0
  99. package/dist/store/order/hooks/index.d.ts +3 -0
  100. package/dist/store/order/hooks/useOrderList.d.ts +38 -0
  101. package/dist/store/order/hooks/useOrderOperate.d.ts +4 -0
  102. package/dist/store/order/index.d.ts +1 -0
  103. package/dist/store/orderDetail/hooks/index.d.ts +1 -0
  104. package/dist/store/orderDetail/hooks/useOrderDetail.d.ts +25 -0
  105. package/dist/store/orderDetail/index.d.ts +1 -0
  106. package/dist/store/paymentMode/hooks/index.d.ts +1 -0
  107. package/dist/store/paymentMode/hooks/useOrderResult.d.ts +14 -0
  108. package/dist/store/paymentMode/index.d.ts +1 -0
  109. package/dist/store/placeOrder/hooks/index.d.ts +6 -0
  110. package/dist/store/placeOrder/hooks/useOrderAddress.d.ts +24 -0
  111. package/dist/store/placeOrder/hooks/useOrderCoupon.d.ts +12 -0
  112. package/dist/store/placeOrder/hooks/useOrderGood.d.ts +57 -0
  113. package/dist/store/placeOrder/hooks/useOrderInfo.d.ts +5 -0
  114. package/dist/store/placeOrder/hooks/useOrderPay.d.ts +11 -0
  115. package/dist/store/placeOrder/hooks/usePlaceOrder.d.ts +47 -0
  116. package/dist/store/placeOrder/index.d.ts +2 -0
  117. package/dist/store/placeOrder/store/index.d.ts +31 -0
  118. package/dist/store/placeOrderResult/hooks/index.d.ts +1 -0
  119. package/dist/store/placeOrderResult/hooks/useOrderResult.d.ts +4 -0
  120. package/dist/store/placeOrderResult/index.d.ts +1 -0
  121. package/dist/utils/formatTime.d.ts +1 -0
  122. package/dist/utils/index.d.ts +5 -0
  123. package/dist/utils/localData.d.ts +4 -0
  124. package/dist/utils/navigator.d.ts +11 -0
  125. package/dist/utils/payment.d.ts +14 -0
  126. package/dist/utils/routerMap/index.d.ts +11 -0
  127. package/dist/utils/showToast.d.ts +1 -0
  128. package/dist/utils/useImmutableCallback.d.ts +1 -0
  129. package/package.json +26 -0
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function ApplicationContext({ initialValue, children }: {
3
+ initialValue?: Object;
4
+ children: ReactNode;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export declare function useApplicationContext(): {}[];
@@ -0,0 +1 @@
1
+ export declare function useGoodsDetail(): any;
@@ -0,0 +1,5 @@
1
+ export declare function createStore<T>(initialState: T): {
2
+ getState: () => T;
3
+ setState: (newState: T) => void;
4
+ subscribe: (listener: any) => () => boolean;
5
+ };
@@ -0,0 +1,2 @@
1
+ export * from './makeStore';
2
+ export * from './external';
@@ -0,0 +1,2 @@
1
+ import { Reducer } from 'react';
2
+ export declare function makeStore<S, A>(reducer: Reducer<S, A>, initialState?: any): any;
@@ -0,0 +1,4 @@
1
+ export * from './store';
2
+ export * from './core';
3
+ export * from './utils';
4
+ export * from './context';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{createContext as t,useReducer as e,useContext as n,useSyncExternalStore as c,useRef as i,useCallback as r,useEffect as s,useState as d,useMemo as a}from"react";import{addShoppingGoodsBySpec as l,addShoppingGoods as u,getTotalDiscountPrice as p,queryToContract as m,getResourceGoodsInfoBySkuCode as y,saveUsercoupon as g,getSetsupDisUtil as f,checkCollectExit as h,queryCollectPage as v,saveCollect as S,deleteCollectByCode as C,queryCouponListBySkuCode as b,queryPromotionListByGoodsCode as O,queryEvaluateGoodsPagetrue as N,saveFootprint as k,saveAddress as P,queryAddressBymerberCode as I,deleteAddress as L,updateAddress as M,updateShoppingGoodsNum as B,queryShoppingPage as D,queryShoppingToContract as G,deleteShoppingGoodsBatch as j,updateShoppingGoodsPmInfo as T,updateShoppingGoodsCheckState as w,queryUsercouponPageForC as x,find as A,syncContractState as E,syncContractBatchState as R,saveOrderToPay as F,paymentCommit as J,getFalgSettingForPaydate as $,calculateFreightFare as V,saveContract as q,queryUserConByGoods as U,syncContractPayState as z,confirmReceive as _,cancelContractC as H,queryContractPageC as K,cancelUnpayOrder as Q,getContractByCode as W,checkRefund as X,queryExpressInfo as Y,queryGoodsClassTree as Z,deleteCollectByCodeStr as oo,queryUseTemplate as to,saveEvaluateGoods as eo,saveEvaluateShop as no,queryFootprintPagePlat as co,deleteFootprintByCodeStr as io,queryNoticePage as ro,getNotice as so,getDoclist as ao,queryPromotioByCodePage as lo,queryPromotioPage as uo,getRefundGoods as po,saveRefund as mo,queryRefCause as yo,getRefundByCode as go,sendGoods as fo,queryExpressPageForProp as ho,cancelAfterSales as vo,queryRefundPageBuy as So,miniLogout as Co}from"qj-b2c-api";import{getEnv as bo,taroMessage as Oo,getPagesRefreshStore as No,updatePagesRefreshStore as ko,navigatorHandler as Po,getTaro as Io,navigatorBackImpl as Lo,useImmutableCallback as Mo,reLaunchHandler as Bo,setStorage as Do,taroModule as Go,getBaseUrl as jo,getStorage as To}from"@brushes/utils";import{noop as wo,isFunction as xo,get as Ao,isEmpty as Eo,orderBy as Ro,groupBy as Fo,difference as Jo,set as $o,isUndefined as Vo,isEqual as qo}from"lodash-es";import{removeRequestCacheByKey as Uo}from"@brushes/optimize";import{extendAddressData as zo}from"@brushes/shared-utils";function _o(c,i){const r=t(null),s=t(null);return[({children:t})=>{const[n,d]=e(c,i);return o(r.Provider,{value:d,children:o(s.Provider,{value:n,children:t})})},function(){return n(s)},function(){return n(r)}]}function Ho(o){let t=o;const e=new Set;return{getState:()=>t,setState:o=>{t=Object.assign(Object.assign({},t),o),e.forEach((o=>o(t)))},subscribe:o=>(e.add(o),()=>e.delete(o))}}const Ko=Ho({count:1,isNeedButton:!1,goodsNum:1,spec:[],orderType:0,offShelf:!1});function Qo(o=(o=>o)){return c(Ko.subscribe,(()=>o(Ko.getState())))}function Wo(o,t){var e={};for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&t.indexOf(n)<0&&(e[n]=o[n]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(n=Object.getOwnPropertySymbols(o);c<n.length;c++)t.indexOf(n[c])<0&&Object.prototype.propertyIsEnumerable.call(o,n[c])&&(e[n[c]]=o[n[c]])}return e}function Xo(o,t,e,n){return new(e||(e=Promise))((function(c,i){function r(o){try{d(n.next(o))}catch(o){i(o)}}function s(o){try{d(n.throw(o))}catch(o){i(o)}}function d(o){var t;o.done?c(o.value):(t=o.value,t instanceof e?t:new e((function(o){o(t)}))).then(r,s)}d((n=n.apply(o,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const Yo=(o,t)=>Xo(void 0,void 0,void 0,(function*(){const e={specStr:JSON.stringify(o),goodsCode:t};return yield l(e)})),Zo=(o,t)=>Xo(void 0,void 0,void 0,(function*(){const e=bo(),n={skuId:o,goodsNum:t,isLocalMock:!e};return yield m(n)}));function ot(o){const t=bo();return y({skuCode:o,isLocalMock:!t})}function tt(o=wo){const t=o=>{const t=(o=>{const t=Ko.getState();switch(o.type){case"plus":return Object.assign(Object.assign({},t),{count:t.count+1});case"minus":return Object.assign(Object.assign({},t),{count:t.count-1});case"select":case"initGoodSku":case"popupImpl":return Object.assign(Object.assign({},t),o.payload);default:return t}})(o);Ko.setState(t)},e=()=>{o({visible:!0})};return{dispatch:t,openPopup:()=>{e(),t({type:"popupImpl",payload:{isNeedButton:!1}})},closePopup:()=>{o({visible:!1})},addCardPopup:()=>{e(),t({type:"popupImpl",payload:{orderType:0,isNeedButton:!0}})},buyOpenPopup:()=>{e(),t({type:"popupImpl",payload:{orderType:1,isNeedButton:!0}})}}}function et(o){const t=i(null);return t.current=xo(o)?o:wo,r(((...o)=>t.current(...o)),[t])}function nt(o,t,e,n=wo){const{dispatch:c,closePopup:i}=tt(n);s((()=>{const o=Ao(t,"spec",[]),n=Ao(e,"[0]goodsMinnum",1);Eo(o)||c({type:"initGoodSku",payload:{offShelf:!1,count:n||1,spec:o}})}),[t]);const r=et(((o,t)=>{const n=Ko.getState(),{spec:i}=n;i[t]=o;const r=(s=Ro(i).join("/"),e.find((o=>o.skuName===s))||{});var s;const d=Eo(r);c({type:"select",payload:{offShelf:d,count:r.goodsMinnum||1,spec:[...i]}}),d&&Oo("该规格已下架","none")})),d=()=>Xo(this,void 0,void 0,(function*(){try{const t=Ko.getState(),{spec:e,count:n}=t,c=yield Yo(e,o),{CartList:r=0}=No();ko({CartList:r+1});const s=Ao(c,"dataObj.skuId"),d=yield((o,t)=>Xo(void 0,void 0,void 0,(function*(){const e={skuId:o,goodsNum:t};return yield u(e)})))(s,n);yield Oo(d.msg||"添加成功"),i()}catch(o){yield Oo(o,"error")}})),a=()=>Xo(this,void 0,void 0,(function*(){const t=Ko.getState(),{spec:e,count:n}=t,c=yield Yo(e,o),i=Ao(c,"dataObj.skuId");Po("orderDetermine",{skuId:i,goodsNum:n})}));return{closePopup:i,addCardImpl:d,cashImpl:a,handleChooseSize:r,handleStep:(o,t,e)=>{const{count:n}=Ko.getState();n!==t||"minus"!==e?"plus"!==e||n!==o?c({type:e}):Oo("超库存","none"):Oo(`不能小于${t}`,"none")},addShoppingImpl:()=>{const o=Ko.getState(),{orderType:t}=o;0===t?d():a()}}}const ct=()=>{const[o,t]=d(!1);return{save:e=>Xo(void 0,void 0,void 0,(function*(){if(!o)try{yield g(e),t(!0)}catch(o){}})),isPick:o}},it={rsGoodsFileDomainList:[],rsSpecValueDomainList:[],goodsRemark:"",pricesetNprice:0,goodsName:"",dataPic:"",goodsShowname:"",goodsNum:0,goodsCode:"",skuNo:"",classtreeCode:"",brandCode:"",pntreeCode:"",memberCode:"",goodsThdate:"",goodsOdate:"",goodsDayinfo:"",rsSkuDomainList:[]},rt=(o,t="")=>{const[e,n]=d(it);return s((()=>{Xo(void 0,void 0,void 0,(function*(){try{let e=o;t&&(e=(yield f({key:t})).split("_")[0]);const c=yield ot(e);n(c||it)}catch(o){}}))}),[]),e},st=o=>a((()=>o.map((o=>({imgUrl:o.goodsFileUrl,link:""})))),[o]),dt={dataObj:""};function at({skuCode:o,dataPic:t,goodsName:e,pricesetNprice:n}){const[c,i]=d(dt);s((()=>{r()}),[]);const r=()=>Xo(this,void 0,void 0,(function*(){const t={collectType:0,collectOpcode:o};try{const o=yield h(t);i(o)}catch(o){console.log(o)}})),a=()=>Xo(this,void 0,void 0,(function*(){const c={collectType:0,collectOpcode:o,collectOppic:t,collectOpcont:e,collectOpnum:n,goodsOrigin:0};return yield S(c)})),l=()=>Xo(this,void 0,void 0,(function*(){const o={collectType:0,collectCode:c.dataObj||""};return yield C(o)})),u=(o,t="success",e=1e3)=>{Io().showToast({title:o,icon:t,duration:e})};return{handleCollect:()=>Xo(this,void 0,void 0,(function*(){let o=dt;Eo(c.dataObj)?(o=yield a(),u("收藏成功")):(o=yield l(),u("取消收藏成功")),i(o),Uo(v)})),collection:c}}function lt(o,t){return a((()=>({skuList:function(o){const t=Fo(Ro(o,["specValueValue"]),"specName");return t?Object.keys(t).map((o=>({skuName:o,skuOption:t[o]}))):[]}(o),spec:Ao(t,"[0]skuName","").split("/")})),[o])}const ut=(o=[],t)=>{const e=o.find((o=>o.skuCode===t))||{};if(Eo(e))return{};const{skuNo:n,classtreeCode:c,brandCode:i,pntreeCode:r,memberCode:s}=e;return{skuCode:t,skuNo:n,classtreeCode:c,brandCode:i,pntreeCode:r,memberCode:s}},pt={promotionBegintime:"",pbName:"",discName:"",promotionCode:"",promotionName:"",couponOnceNums:0,couponOnceNumd:0,promotionEndtime:""};function mt(o,t){const[e,n]=d([]),[c,i]=d(!1);return s((()=>{(()=>{Xo(this,void 0,void 0,(function*(){const e=ut(o,t);if(Eo(e))return;const c=yield b(e);n(c)}))})()}),[t,o]),{coupon:e,visible:c,setVisible:i}}function yt(o,t){const[e,n]=d([]);return s((()=>{(()=>{Xo(this,void 0,void 0,(function*(){const e=ut(o,t);if(Eo(e))return;const c=yield O(e);n(c)}))})()}),[t,o]),e}const gt=o=>{const[t,e]=d([]);return s((()=>{Xo(void 0,void 0,void 0,(function*(){try{if(!o)return;const t=yield N({goodsCode:o,page:1,rows:10});e(t.list||[])}catch(o){}}))}),[o]),t},ft=()=>({handleShare:()=>{if(!bo())return;Io().showShareMenu({withShareTicket:!0,success:()=>{console.log("share success")}})}}),ht=o=>{s((()=>{Xo(void 0,void 0,void 0,(function*(){try{const t=yield ot(o);k({footprintType:0,footprintOpcode:o,footprintOppic:t.dataPic,footprintOpcont:t.goodsName,footprintOpnum:t.pricesetNprice,footprintOpurl:""})}catch(o){console.log(o)}}))}),[])},vt=(o=[])=>{const t=Qo((o=>o.spec)),e=a((()=>o.find((o=>o.skuName===Ro(t).join("/")||o.skuName+"/"===Ro(t).join("/")))||{}),[t,o]);return{spec:t,goodInfo:e}};function St(){return{onSubmit:(o,t,e)=>Xo(this,void 0,void 0,(function*(){try{yield P(Object.assign(Object.assign({},o),zo)),Uo(I);let{AddressList:e=0}=No();ko({AddressList:++e}),t(),Lo(-1)}catch(o){e()}}))}}function Ct(o){const[t,e]=d([]),[n,c]=d(!0);s((()=>{i()}),[o]);const i=()=>Xo(this,void 0,void 0,(function*(){const o=bo(),t=yield I({isLocalMock:!o});e(t),c(!1)})),r=(o,t)=>{const e=t[o];return t[o]=t[0],t[o].addressDefault="0",t[0]=e,t[0].addressDefault="1",[...t]};return{list:t,skullShow:n,delAddress:o=>{if(!bo())return;Io().showModal({title:"提示",content:"确认删除该地址吗?",success:t=>Xo(this,void 0,void 0,(function*(){(null==t?void 0:t.confirm)&&(yield L({addressId:o.addressId}),Uo(I),yield i())}))})},setDefault:(o,n)=>Xo(this,void 0,void 0,(function*(){if("1"!==o.addressDefault){const{addressMember:c,addressPhone:s,provinceCode:d,provinceName:a,cityCode:l,cityName:u,areaCode:p,areaName:m,addressDetail:y,addressId:g,addressCode:f,dataState:h}=o,v={addressMember:c,addressPhone:s,provinceCode:d,provinceName:a,cityCode:l,cityName:u,areaCode:p,areaName:m,addressDetail:y,addressId:g,addressCode:f,dataState:h,addressDefault:"1"};e(r(n,t)),yield M(v),yield i()}})),getAddressList:i,navigator:()=>{Po("addressEditor")}}}function bt(o){return{handlerImpl:()=>{ko({PlaceOrderAddress:o.addressId}),Lo(-1)}}}const[Ot,Nt,kt]=_o((function(o,t){switch(t.type){case"select":return Object.assign(Object.assign({},o),{select:t.payload});case"update":return Object.assign(Object.assign({},o),t.payload);default:return o}}),{id:"",count:0,loading:!1,select:[]}),Pt=()=>{const o=kt(),{select:t}=Nt();return{select:t,onChange:t=>{o({type:"select",payload:t.detail.value})},handleStep:(t,e,n)=>Xo(void 0,void 0,void 0,(function*(){if(0===e&&"minus"===n)return void Oo("不能小于0","none");const c="plus"===n?++e:--e;o({type:"update",payload:{id:t,count:c,loading:!0}})}))}},It=o=>{const[t,e]=d([]),[n,c]=d(0),r=i([]),l=kt(),{select:u,id:p,count:m}=Nt(),y=a((()=>{let o=0,e=0;return t.forEach((t=>{u.includes(t.shoppingGoodsId+"")&&(o+=t.goodsCamount,e+=t.goodsCamount*t.pricesetNprice)})),{num:o,amount:e}}),[u,t]);s((()=>{Xo(void 0,void 0,void 0,(function*(){yield f("isFirst")}))}),[o]),s((()=>{p&&g(p,m)}),[p,m]);const g=(o,t)=>Xo(void 0,void 0,void 0,(function*(){try{yield B({shoppingGoodsId:o,amount:t,goodWeight:0}),yield f()}catch(o){console.log(o)}})),f=(o="")=>Xo(void 0,void 0,void 0,(function*(){try{const t=bo(),n=yield D({isLocalMock:!t}),i=Ao(n,"list",[]),s=[];let d=0;i.forEach((o=>{const{shoppingGoodsList:t,disMoney:e=0}=Ao(o,"shoppingpackageList[0]",{shoppingGoodsList:[],disMoney:0});s.push(...t),d+=e||0})),r.current=s.map((o=>o.shoppingGoodsId+"")),o&&l({type:"select",payload:r.current}),l({type:"update",payload:{loading:!1}}),c(d),e(s)}catch(o){Oo(o.msg)}}));return{cartList:t,initImpl:f,disMoney:n,amount:y,selectAll:o=>{l({type:"select",payload:o.detail.value.includes("true")?r.current:[]})},allCart:r,toOrderImpl:()=>{0!==u.length?(Uo(G),Po("orderDetermine",{shoppingGoodsId:u.join(",")})):Oo("购物数量不能为空")},select:u,deleteCart:()=>Xo(void 0,void 0,void 0,(function*(){try{yield j({shoppingGoodsIdStr:JSON.stringify(u)}),yield f()}catch(o){console.log(o)}}))}},Lt=(o,t,e=wo)=>{const[n,c]=d([]),[r,a]=d(!1),l=i([]);s((()=>{Xo(void 0,void 0,void 0,(function*(){yield u("isFirst")}))}),[o,t]);const u=(o="")=>Xo(void 0,void 0,void 0,(function*(){try{a(!0);const t=bo(),e=yield D({isLocalMock:!t});p(e,o)}catch(o){console.log(o)}finally{a(!1)}})),p=(o,t)=>{const e=Ao(o,"list",[]),n=[];e.forEach((o=>{const t=Ao(o,"shoppingpackageList",[]);n.push(...t)})),c(n),m(n,t)},m=(o,t)=>{const{list:n,disMoney:c}=y(o);l.current=n;const i=l.current.map((o=>o.shoppingGoodsId+"")),r={};t&&(r.select=i),e(Object.assign({disMoney:c,cartInfo:l.current},r))},y=o=>{let t=[],e=0;return o.forEach((o=>{e+=o.disMoney||0,t.push(...o.shoppingGoodsList)})),{list:t,disMoney:e}};return{cartList:n,loading:r,onChange:o=>{e((t=>{var e,n;return e=o.detail.value,n=t.select,Xo(void 0,void 0,void 0,(function*(){let o="";o=e.length>n.length?Jo(e,n).join(""):Jo(n,e).join("");const{shoppingCode:t}=l.current.find((t=>t.shoppingGoodsId+""===o))||{};try{yield w({shoppingGoodsIdStr:o,shoppingCode:t,checkState:+(n.length>e.length),channelCode:"channelCode"}),yield u()}catch(o){}})),{cartInfo:l.current,select:o.detail.value}}))},handleStep:(o,t,e)=>{if(1===t&&"minus"===e)return void Oo("不能小于1","none");((o,t)=>{Xo(void 0,void 0,void 0,(function*(){try{yield B({shoppingGoodsId:o,amount:t,goodWeight:0}),yield u()}catch(o){console.log(o)}}))})(o,"plus"===e?++t:--t)},updatePm:(o,t)=>Xo(void 0,void 0,void 0,(function*(){try{yield T({shoppingGoodsId:o,promotionCode:t}),yield u()}catch(o){console.log(o)}}))}};function Mt(o=[],t=[],e=wo){const n=a((()=>{let e=0,n=[],c=0;for(let i of t)o.includes(i.shoppingGoodsId+"")&&0===i.dataState&&(n.push(i.shoppingGoodsId+""),e+=i.goodsCamount,c+=i.goodsCamount*i.pricesetNprice);return{num:e,canPayIds:n,amount:c}}),[o,t]),c=Mo((o=>o.map((o=>o.shoppingGoodsId+"")))),i=Mo((o=>{e({select:o.detail.value.includes("true")?c(t):[]})})),r=Mo((()=>Xo(this,void 0,void 0,(function*(){try{yield j({shoppingGoodsIdStr:JSON.stringify(o)}),e((o=>{let t=o.updateCount||0;return{updateCount:++t}}))}catch(o){console.log(o)}}))));return{toOrderImpl:Mo((()=>{0!==n.canPayIds.length?(Uo(G),Po("orderDetermine",{shoppingGoodsId:n.canPayIds.join(",")})):Oo("购物数量不能为空")})),deleteCart:r,selectAll:i,cartDetail:n}}function Bt(o=wo){return{editorImpl:()=>{o((o=>({isEditor:!o.isEditor})))}}}const Dt=()=>{const[o,t]=d([]),e=i(0),n=i(1),c=i(10),r=i([{id:1,label:"未使用",dataState:0,styleName:"unused",text:""},{id:2,label:"已使用",dataState:1,styleName:"used"},{id:3,label:"已失效",dataState:2,styleName:"overdue"}]);s((()=>{Xo(void 0,void 0,void 0,(function*(){yield a()}))}),[]);const a=()=>Xo(void 0,void 0,void 0,(function*(){try{const o=yield x({page:n.current,rows:c.current,dataState:r.current[e.current].dataState,pbCode:"0004,0005"});t((t=>t.concat(o.list||[]))),n.current+=1}catch(o){console.log(o)}}));return{config:r,coe:e,list:o,setList:t,getList:a,switchTab:o=>Xo(void 0,void 0,void 0,(function*(){e.current=o,n.current=1,t([]),yield a()}))}},Gt=()=>{const[o,t]=d([]),e=i(1);s((()=>{Xo(void 0,void 0,void 0,(function*(){yield n()}))}),[]);const n=()=>Xo(void 0,void 0,void 0,(function*(){e.current=1,t([]),yield c()})),c=()=>Xo(void 0,void 0,void 0,(function*(){try{const o=yield x({page:e.current,rows:100,dataState:0,pbCode:"0004,0005"});t(o.list),e.current+=1}catch(o){console.log(o)}}));return{unusedList:o,getData:c,init:n}},jt=()=>{const[o,t]=d([]),e=i(1);s((()=>{Xo(void 0,void 0,void 0,(function*(){yield n()}))}),[]);const n=()=>Xo(void 0,void 0,void 0,(function*(){e.current=1,t([]),yield c()})),c=()=>Xo(void 0,void 0,void 0,(function*(){try{const o=yield x({page:e.current,rows:100,dataState:1,pbCode:"0004,0005"});t(o.list),e.current+=1}catch(o){console.log(o)}}));return{usedList:o,getData:c,init:n}},Tt=()=>{const[o,t]=d([]),e=i(1);s((()=>{Xo(void 0,void 0,void 0,(function*(){yield n()}))}),[]);const n=()=>Xo(void 0,void 0,void 0,(function*(){e.current=1,t([]),yield c()})),c=()=>Xo(void 0,void 0,void 0,(function*(){try{const o=yield x({page:e.current,rows:100,dataState:2,pbCode:"0004,0005"});t(o.list),e.current+=1}catch(o){console.log(o)}}));return{overdueList:o,getData:c,init:n}},wt=(o,t,e)=>{const n=i(!0),c=i(0),[r,a]=d([]),[l,u]=d(!1);s((()=>{p("isFirst")}),[e]);const p=et((o=>{c.current=0,n.current=!0,m(e,o)})),m=et((({sortField:e="pricesetNprice",order:i=""},r="")=>Xo(void 0,void 0,void 0,(function*(){if(n.current){++c.current,u(!0);try{const s=yield A({distinctField:"goodsNo",sortField:e,order:i,goodsType:"00,50",page:c.current,rows:10,searchParam:t,classtreeCode:o});(Eo(s.list)||s.list.length<10)&&(n.current=!1),u(!1),a((o=>r?s.list:o.concat(s.list)))}catch(o){--c.current}}}))));return{loading:l,getData:m,list:r}};function xt({contractBillcode:o,contractBbillcode:t}){const e=Io(),[n,c]=d(!1),r=i(""),a=bo(),[l,u]=d([]),p=i({}),m=i({dataBmoney:"",contractBillcode:""});s((()=>{(()=>{Xo(this,void 0,void 0,(function*(){var e;try{const n=o?E({contractBillcode:o,isLocalMock:!a}):R({contractBbillcode:t,isLocalMock:!a}),c=yield n;m.current=c.dataObj;const i=yield F({contractBillcode:null!==(e=m.current.contractBillcode)&&void 0!==e?e:"",isLocalMock:!a});u(i.payChannelList),p.current=i}catch(o){console.log(44,o)}}))})()}),[]);const y=o=>{c(!0);const{ptradeSeqno:t,contractBlance:e,payChannelList:n}=p.current,{fchannelCode:i,faccountOuterNo:s=""}=g(n,o||r.current);return{ptradeSeqno:t,contractBlance:e,fchannelCode:i,faccountOuterNo:s}},g=(o,t)=>o.find((o=>"1"===t?o.ptfchannelAmt===t:o.fchannelCode===t))||{},f=()=>Xo(this,void 0,void 0,(function*(){var o;const t=null!==(o=m.current.contractBillcode)&&void 0!==o?o:"";Do("contractBillcode",{contractBillcode:t});const{ptradeSeqno:e,contractBlance:n,fchannelCode:c,faccountOuterNo:i}=y(),r=[{faccountIdType:"ACCOUNT",fchannelCode:c,orderAmount:m.current.dataBmoney,faccountId:i}];return yield J({ptradeSeqno:e,payCommitStr:JSON.stringify(r),contractBlance:n})})),h=()=>Xo(this,void 0,void 0,(function*(){try{const o=yield f();document.getElementById("v_html").innerHTML="<div>"+o.dataObj.htmlStr+"</div>",document.forms[0].submit(),c(!1)}catch(o){c(!1)}})),v=()=>Xo(this,void 0,void 0,(function*(){try{const o=yield f();document.getElementById("v_html").innerHTML="<div>"+o.dataObj.htmlStr+"</div>",document.getElementById("paaspaysubmit").submit(),c(!1)}catch(o){c(!1)}})),S=()=>Xo(this,void 0,void 0,(function*(){try{let o=(yield f()).dataObj.requestData;wx.requestPayment({timeStamp:o.timeStamp,nonceStr:o.nonceStr,package:o.package,signType:o.signType,paySign:o.paySign,success:function(o){var t;const e=null!==(t=m.current.contractBillcode)&&void 0!==t?t:"";Bo("result",{code:e})},fail:function(o){c(!1)},complete:function(o){c(!1)}})}catch(o){c(!1)}}));return{paymentImpl:()=>{var o;switch(r.current||Oo("请选择支付方式","none"),r.current){case"wechatmini":S();break;case"account":case"alipaywap":h();break;case"wechatwap":v();break;case"1":const{ptradeSeqno:t,contractBlance:n,fchannelCode:c,faccountOuterNo:i}=y("1"),r=[{faccountIdType:"ACCOUNT",fchannelCode:c,orderAmount:m.current.dataBmoney,faccountId:i}],s=null!==(o=m.current.contractBillcode)&&void 0!==o?o:"";e.navigateTo({url:`/package/paypassword/index?code=${s}&ptradeSeqno=${t}&payCommitStr=${JSON.stringify(r)}&contractBlance=${n}`})}},channelList:l,handleRadio:o=>{r.current=o.detail.value},contract:m,loading:n}}const At={provinceName:"",cityName:"",areaName:"",addressDetail:"",addressMember:"",addressPhone:"",addressDefault:""},Et={contractSettlOpno:0,promotionCodes:null,shoppingCountPrice:0,totalDiscountPrice:0,accountsSumPrice:0,discount:0,freight:0,comDisMoney:0,copyComDisMoney:0},Rt={dataPic:"",goodsName:"",goodsCamount:0,skuName:"",pricesetNprice:0};function Ft({skuId:o,goodsNum:t,shoppingGoodsId:e},n,c){const r=i([{dataPic:"",goodsName:"",goodsCamount:0,skuName:"",pricesetNprice:0}]),[a,l]=d([]),[u,m]=d(At),y=i(""),g=i([]),f=i([]),h=i([]),[v,S]=d(0),C=bo(),b=i(Et),O=i([]);s((()=>{(()=>{Xo(this,void 0,void 0,(function*(){S(0),b.current={contractSettlOpno:0,promotionCodes:null,shoppingCountPrice:0,totalDiscountPrice:0,accountsSumPrice:0,discount:0,freight:0,comDisMoney:0,copyComDisMoney:0},f.current=[],g.current=[],e?yield k((()=>G({shoppingGoodsIdStr:`[${e}]`}))):yield k((()=>Zo(o,t)))}))})()}),[n]);const N=()=>Xo(this,void 0,void 0,(function*(){try{const o=yield U({pmContractGoodsDomainListStr:JSON.stringify(f.current)});l(o)}catch(o){console.log(74,o)}})),k=o=>Xo(this,void 0,void 0,(function*(){try{const t=yield Promise.all([I({isLocalMock:!C}),o()]),[e=[],n=[]]=t,i=c?e.find((o=>o.addressId===c)):e.find((o=>"1"===o.addressDefault))||{};m(i),P(n,i),c=""}catch(o){console.log(o)}})),P=(o,t)=>{Eo(o)||o.forEach((o=>{o.shoppingpackageList.forEach((o=>{b.current.comDisMoney+=o.disMoney,b.current.copyComDisMoney+=o.disMoney,o.shoppingGoodsList.forEach((t=>{f.current.push(t),b.current.shoppingCountPrice+=t.pricesetNprice*t.goodsCamount,t.contractGoodsGtype=0,y.current=o.promotionCode,"00"==t.goodsType&&$().then((o=>{}))})),o.disMoney>0&&g.current.push({contractSettlBlance:0==o.promotionInType?"PM":"COP",contractPmode:"0",contractSettlGmoney:Number(o.disMoney.toFixed(2)),contractSettlPmoney:Number(o.disMoney.toFixed(2)),contractSettlOpno:o.promotionCode,contractSettlOpemo:o.promotionName}),o.giftList?(o.shoppingGoodsList.forEach((o=>{o.ginfoCode=o.pmPromotionList.find((o=>"0001"==o.pbCode)).promotionCode})),r.current=[...o.shoppingGoodsList,...o.giftList]):r.current=o.shoppingGoodsList})),L(),C&&(M(),N(),j(t))}))},L=()=>{const{shoppingCountPrice:o,totalDiscountPrice:t,discount:e,comDisMoney:n,freight:c}=b.current;S(o-t-e-n+c)},M=()=>Xo(this,void 0,void 0,(function*(){console.log(224);let n={};n=e?{shoppingGoodsIdStr:`[${e}]`}:{skuIdStr:JSON.stringify([{skuId:o,goodsNum:t}])};try{const o=yield V(Object.assign({isLocalMock:!C},n));b.current.freight=o.dataObj,L()}catch(o){console.log(180,o)}})),B=()=>{const{shoppingCountPrice:o,copyComDisMoney:t,discount:e}=b.current;return(o-t-e).toFixed(2)},D=()=>{const{shoppingCountPrice:o,copyComDisMoney:t,freight:e}=b.current;return(o-t+e).toFixed(2)},j=e=>{h.current=(e=>{const{addressMember:n,userName:c,provinceName:i,cityName:s,areaName:d,addressDetail:a,areaCode:l}=e;return[{contractPaytime:(new Date).valueOf(),goodsPbillno:0,goodsPmbillno:b.current.promotionCodes,contractProperty:"0",contractBlance:0,contractPmode:0,contractPumode:"0",goodsSupplierName:"",goodsSupplierCode:"",packageList:[{contractGoodsList:r.current,shoppingGoodsIdList:[],promotionCode:y.current,packageRemark:null}],packageMode:"",contractType:"50",ocContractSettlList:[],contractInmoney:D(),contractMoney:B(),goodsReceiptMem:n,goodsReceiptPhone:c,goodsReceiptArrdess:i+s+d+a,areaCode:l,contractNbillcode:null,skuIdList:o?[{skuId:+o,goodsNum:+t}]:[],giftSkuIdList:[]}]})(e);let n={rsSkuListStr:JSON.stringify(h.current)};var c;(c=n,Xo(void 0,void 0,void 0,(function*(){return yield p(c)}))).then((o=>{b.current.totalDiscountPrice=o.dataObj.totalDiscountPrice,b.current.contractSettlOpno=o.dataObj.contractSettlOpno,L()}))};return{savePayPrice:()=>{if(Eo(u))return;(()=>{const{contractSettlOpno:o,totalDiscountPrice:t}=b.current;o&&0!=t&&g.current.push({contractSettlBlance:"UR",contractPmode:"0",contractSettlPmoney:t,contractSettlOpno:o})})(),$o(h.current,"[0].ocContractSettlList",[...g.current,...O.current]);const o={orderDomainStr:JSON.stringify(h.current)};q(o).then((o=>{Po("paymentMode",{code:o.dataObj.contractBillcode})}))},address:u,list:r,payState:b,coupon:a,confirm:o=>{const{couponAmount:t,usercouponCode:e,promotionCode:n,discAmount:c}=o;O.current=[{contractSettlBlance:"COP",contractPmode:"0",contractSettlGmoney:+t,contractSettlPmoney:+c,contractSettlOpno:e,contractSettlOpemo:n}],b.current.discount=c,L()},amount:v}}function Jt(o){const{shoppingCountPrice:t,comDisMoney:e}=a((()=>{const t={shoppingCountPrice:0,comDisMoney:0};return o.forEach((o=>{const{shoppingCountPrice:e,comDisMoney:n}=o;t.shoppingCountPrice+=e,t.comDisMoney+=n})),t}),[o]);return{shoppingCountPrice:t,comDisMoney:e}}const $t={register:"/account/register/index",accountLogin:"/account/accountLogin/index",mobileLogin:"/account/mobileLogin/index",forgetPwd:"/account/forgetPwd/index",agreement:"/account/agreement/index",auth:"/account/auth/index",confirmPhone:"/account/confirmPhone/index",bindPhone:"/account/bindPhone/index"},Vt=["pages/index/index"],qt={addressId:"",addressInfo:{}},Ut=(o,t="success",e=1e3)=>{Io().showToast({title:o,icon:t,duration:e})};function zt({target:o,defaultQuery:t,extendQuery:e},n){const c=o.value,i=((o,t,e)=>{const n=o.concat(t);let c={};for(let o of n)c[o]=e[o];return c})(t,e,n);Po(c,i)}const _t=(o,t)=>{const e=Math.floor(o/1e3)%60,n=Math.floor(o/1e3/60)%60,c=Math.floor(o/1e3/60/60)%24;return`${Math.floor(o/1e3/60/60/24)}天 ${c}小时 ${n}分钟 ${e}秒${t}`},Ht={contractSettlBlance:"",contractPmode:"",contractSettlGmoney:0,contractSettlPmoney:0,contractSettlOpno:"",contractSettlOpemo:"",freight:0},Kt=Ho(Ht);function Qt(o=(o=>o)){return c(Kt.subscribe,(()=>o(Kt.getState())))}const Wt={provinceName:"",cityName:"",areaName:"",addressDetail:"",addressMember:"",addressPhone:"",addressDefault:"",addressId:"",areaCode:"",userName:""};function Xt(o,t,e,n){const[c,i]=d(Wt);s((()=>{(()=>{Xo(this,void 0,void 0,(function*(){try{const t=bo(),e=yield I({isLocalMock:!t,needCache:!0}),n=(()=>{const t=Ro(e,"addressDefault","asc"),n=t.find((t=>o===t.addressId))||{};return Eo(n)?t.at(-1):n})();qt.addressInfo=n,i(n),r(null==n?void 0:n.provinceCode)}catch(o){}}))})()}),[o]);const r=o=>Xo(this,void 0,void 0,(function*(){let c={};c=n?{shoppingGoodsIdStr:`[${n}]`}:{skuIdStr:JSON.stringify([{skuId:e,goodsNum:t}])};try{const t=bo(),e=yield V(Object.assign(Object.assign({isLocalMock:!t},c),{areaCode:o}));Kt.setState({freight:e.dataObj})}catch(o){}}));return c}const Yt={shoppingGoodsId:"",goodsNum:0,skuId:"",refreshNum:0},Zt={dataPic:"",goodsName:"",goodsCamount:0,skuName:"",pricesetNprice:0},oe={contractSettlOpno:0,shoppingCountPrice:0,totalDiscountPrice:0,accountsSumPrice:0,discount:0,freight:0,comDisMoney:0,copyComDisMoney:0,shoppingType:"",promotionCode:"",promotionCodes:""},te=({shoppingGoodsId:o,goodsNum:t,skuId:e})=>{const[n,c]=d([Zt]),[r,l]=d([]),[u,p]=d([]),m=i([]),[y,g]=d(0),f=Qt(),{freight:h=0}=f,v=Wo(f,["freight"]),S=i(0);s((()=>{Xo(void 0,void 0,void 0,(function*(){Kt.setState({contractSettlBlance:"",contractPmode:"",contractSettlGmoney:0,contractSettlPmoney:0,contractSettlOpno:"",contractSettlOpemo:""}),o?yield O((()=>G({shoppingGoodsIdStr:`[${o}]`}))):yield O((()=>Zo(e,t)))}))}),[]);const C=a((()=>v.contractSettlPmoney||0),[v]),b=a((()=>{const o=y-C+h-S.current;return o>=0?o:0}),[y,C,h]),O=o=>Xo(void 0,void 0,void 0,(function*(){try{const t=yield o();N(t)}catch(o){}})),N=o=>{if(Eo(o))return;let t=[],e=[],n=[];o.forEach((o=>{const c=Object.assign({},oe);c.shoppingType=o.goodsType,S.current+=o.rebMoney,o.shoppingpackageList.forEach((n=>{c.comDisMoney+=n.disMoney,c.copyComDisMoney+=n.disMoney,m.current=[];let i={channelCode:"",channelName:""};n.shoppingGoodsList.forEach(((o,e)=>{0===e&&(i=o),t.push(o),c.shoppingCountPrice+=o.pricesetNprice*o.goodsCamount,o.contractGoodsGtype=0,c.promotionCode=n.promotionCode,o.goodsType})),n.disMoney>0&&m.current.push({contractSettlBlance:0==n.promotionInType?"PM":"COP",contractPmode:"0",contractSettlGmoney:Number(n.disMoney.toFixed(2)),contractSettlPmoney:Number(n.disMoney.toFixed(2)),contractSettlOpno2:i.channelCode,contractSettlOpno1:i.channelName,contractSettlOpno:n.promotionCode,contractSettlOpemo:n.promotionName}),o.rebMoney>0&&m.current.push({contractSettlBlance:"REB",contractPmode:"0",contractSettlGmoney:Number(o.rebMoney.toFixed(2)),contractSettlPmoney:Number(o.rebMoney.toFixed(2)),contractSettlOpno:n.promotionCode,contractSettlOpemo:n.promotionName,contractSettlOpno2:i.channelCode,contractSettlOpno1:i.channelName}),n.giftList&&(n.shoppingGoodsList=n.shoppingGoodsList.map((o=>(o.ginfoCode=o.pmPromotionList.find((o=>"0001"==o.pbCode)).promotionCode,o)))),e.push(...n.shoppingGoodsList,...n.giftList||[])})),n.push(c)})),l(n),c(e),p(t),k(n)},k=o=>{let t=0;o.forEach((o=>{const{shoppingCountPrice:e,totalDiscountPrice:n,discount:c,comDisMoney:i}=o;t+=e-n-c-i})),g(t)};return{amount:y,list:n,shoppingGoodsList:u,payState:r,ocContractSettlList:m,disCount:C,payPrice:b,orderStoreInfo:v,freight:h,rebMoney:S}},ee=(o=[])=>{const[t,e]=d([]),[n,c]=d(!1),[i,r]=d();s((()=>{Xo(void 0,void 0,void 0,(function*(){try{if(Eo(o))return;const t=yield U({pmContractGoodsDomainListStr:JSON.stringify(o)});e(t)}catch(o){console.log(74,o)}}))}),[o]);const l=a((()=>(t.find((o=>o.promotionCode===i))||{}).promotionName),[i]),u=o=>{const{couponAmount:t,usercouponCode:e,promotionCode:n,discAmount:c}=o,i={contractSettlBlance:"COP",contractPmode:"0",contractSettlGmoney:+t,contractSettlPmoney:+c,contractSettlOpno:e,contractSettlOpemo:n};Kt.setState(i)};return{coupon:t,visible:n,selectCoupon:l,onChange:o=>{const e=o.detail.value,n=t.find((o=>o.promotionCode===e))||{};r(e),c(!1),u(n)},setVisible:c}};function ne({ocContractSettlList:o,payState:t,list:e},n="",c=0,r=""){const s=i([]),[a,l]=d(!1),u=o=>{const{addressMember:i,userName:s,provinceName:d,cityName:a,areaName:l,addressDetail:u,areaCode:y}=o,g=(o=>{if(o)return decodeURIComponent(o).split(",");return[]})(r);return t.map((o=>({contractPaytime:(new Date).valueOf(),goodsPbillno:0,goodsPmbillno:o.promotionCodes,contractProperty:"0",contractBlance:0,contractPmode:0,contractPumode:"0",goodsSupplierName:"",goodsSupplierCode:"",packageList:[{contractGoodsList:e,shoppingGoodsIdList:g,promotionCode:o.promotionCode,packageRemark:null}],packageMode:"",contractType:o.shoppingType,ocContractSettlList:[],contractInmoney:m(o),contractMoney:p(o),goodsReceiptMem:i,goodsReceiptPhone:s,goodsReceiptArrdess:d+a+l+u,areaCode:y,contractNbillcode:null,skuIdList:n?[{skuId:+n,goodsNum:+c}]:[],giftSkuIdList:[]})))},p=o=>{const{shoppingCountPrice:t,copyComDisMoney:e,discount:n}=o;return(t-e-n).toFixed(2)},m=o=>{const{shoppingCountPrice:t,copyComDisMoney:e}=o;return(t-e).toFixed(2)};return{savePayPrice:()=>Xo(this,void 0,void 0,(function*(){const t=qt.addressInfo;if(Eo(t))return void Oo("请选择收货地址");s.current=u(t),$o(s.current,"[0].ocContractSettlList",o.current),l(!0);const e={orderDomainStr:JSON.stringify(s.current)};try{const o=yield q(e);(()=>{if(r){const{CartList:o=0}=No();ko({CartList:o+1})}})();const{contractBillcode:t,contractBbillcode:n}=Ao(o,"dataObj",{contractBillcode:"",contractBbillcode:""});Po("paymentMode",{contractBillcode:t,contractBbillcode:n})}catch(o){Oo(o.msg||"获取订单失败")}finally{l(!1)}})),loading:a}}const ce={success:{icon:"zhifuchenggong",msg:"支付成功",buttonText:"查看订单",menuCode:"orderDetail",color:"#2ed82e"},error:{icon:"zhifushibai",info:"您的订单将保留15分钟,可点击下方“去支付”完成订单",buttonText:"去支付",menuCode:"paymentMode",color:"red"}};function ie(o){const[t,e]=d({icon:"daifahuo1",msg:"支付中",color:"#2ed82e",buttonText:"去支付",dataObj:{}}),[n,c]=d(!1),i=bo();return s((()=>{(()=>{Xo(this,void 0,void 0,(function*(){const t=Ao(Go,"taroMenu[0].menuOpcode","index");if(i){Io().setStorageSync("menuOpcode",t)}c(!0);try{const t=yield z({contractBillcode:o,isLocalMock:!i}),{sysRecode:n,dataObj:c}=t,r=Wo(t,["sysRecode","dataObj"]);e(Object.assign(Object.assign({dataObj:c,sysRecode:n},r),ce[n]))}catch(t){e(Object.assign({dataObj:{contractBillcode:o},msg:t},ce.error))}finally{c(!1)}}))})()}),[]),{result:t,loading:n}}function re(o,t){const[e,n]=d(o);return s((()=>{const e=t.filter((o=>!(Vo(o)||Eo(o)))).filter((o=>!Object.values(o).every((t=>Vo(t)||Eo(o)))));let c=o;Eo(e)||(c=e),n(c)}),[t]),e}const se=[{name:"全部",code:""},{name:"待付款",code:"1"},{name:"待发货",code:"2"},{name:"待收货",code:"3"},{name:"已完成",code:"4,5"},{name:"已取消",code:"-1"}],de=o=>{const{name:t=""}=se.find((t=>t.code.includes(o+"")))||{};return t},ae={1:[{name:"取消订单",handler:"cancel"},{name:"立即支付",handler:"pay"}],3:[{name:"物流信息",handler:"expressInfo"},{name:"确认收货",handler:"confirmReceive"}],4:[{name:"去评价",handler:"evaluate"}],5:[{name:"已完成"}]};function le({dataState:o="",contractId:t,contractBillcode:e,init:n}){const c=a((()=>ae[o+""]||[]),[o]),i=(()=>({expressInfo:()=>{Po("expressInfo",{code:e})},pay:()=>{Po("paymentMode",{contractBillcode:e})},evaluate:()=>{Po("evaluateDetail",{code:e})},confirmReceive:()=>Xo(this,void 0,void 0,(function*(){try{const{msg:o}=yield _({contractBillcode:e});Oo(o,"none"),setTimeout((()=>{null==n||n()}),500)}catch(o){}})),cancel:()=>Xo(this,void 0,void 0,(function*(){try{const{msg:o}=yield H({contractId:t});Oo(o,"none"),setTimeout((()=>{null==n||n()}),500)}catch(o){}}))}))();return{handlerImpl:o=>{i[o]()},operateArray:c}}const ue={contractBillcode:"",goodsList:[{dataPic:"",goodsName:"",dataBmoney:0,goodsCamount:0,contractGoodsId:0,dataState:0}],dataBmoney:0,dataBnum:0,dataState:0,contractId:"",contractAppraise:0};function pe(o,t){const e=i(!1),[n,c]=d(!1),[r,a]=d([ue]),l=i(0);s((()=>{u()}),[t]);const u=Mo((()=>{e.current=!1,l.current=0,p()})),p=Mo((()=>Xo(this,void 0,void 0,(function*(){if(e.current)return;c(!0),++l.current;const{code:t}=o;try{const o=bo(),n=(yield K({page:l.current,rows:10,isLocalMock:!o,childFlag:!0,dataStateStr:t})).list||[];e.current=Eo(n)||n.length<10,a((o=>1!==l.current?o.concat(n):n)),c(!1)}catch(o){}}))));return{onScroll:p,data:r,loading:n,init:u,countdownCancel:o=>Xo(this,void 0,void 0,(function*(){yield Q({contractId:o})}))}}const me={goodsList:[],dataState:"",packageRemark:"",goodsReceiptMem:"",goodsReceiptPhone:"",goodsReceiptArrdess:"",dataBmoney:0,goodsPmoney:0,contractInmoney:0,contractBillcode:"",refundMoney:0,gmtCreate:"",goodsNum:0,contractId:0},ye=o=>{const[t,e]=d(""),n=bo(),[c,i]=d(me);s((()=>{Xo(void 0,void 0,void 0,(function*(){try{const t=yield W({contractBillcode:o,isLocalMock:!n});if(Eo(t))return;e(de(t.dataState)),i(t)}catch(o){console.log(45,o)}}))}),[]);return{orderDetail:c,status:t,handleApplyBtn:(o,t)=>Xo(void 0,void 0,void 0,(function*(){try{const{contractBillcode:e,skuCode:n}=o,c=yield X({contractBillcode:e,skuCode:n});if(!1===c.success)return void Ut(c.msg,"none");Po("refundType",{contractBillcode:e,skuCode:n,dataState:t})}catch(o){console.log(o)}}))}},ge={0:"在途",1:"揽收",2:"疑难",3:"签收",4:"退签",5:"派件",8:"清关",14:"拒签"},fe=o=>{const[t,e]=d({}),[n,c]=d({});return s((()=>{Xo(void 0,void 0,void 0,(function*(){try{const t=bo(),n=yield W({contractBillcode:o,isLocalMock:!t});e(n);const i=Ao(n,"packageList[0].expressCode",""),r=Ao(n,"packageList[0].packageBillno"),s=yield Y({expressNo:r,expressType:i,isLocalMock:!t});c(JSON.parse(s.dataObj))}catch(o){console.log(o)}}))}),[]),{info:t,detail:n,stateObj:ge}};function he(){const[o,t]=d(""),[e,n]=d([]),c=bo();s((()=>{i()}),[]);const i=()=>Xo(this,void 0,void 0,(function*(){try{let o=yield Z();n(o||[]);const e=Ao(o,"[0].goodsClassCode");t(e)}catch(o){console.log(o)}}));return{activeKey:o,navList:e,flag:c,setActiveKey:t}}const ve=()=>{const[o,t]=d([{collectOpcont:"",collectOpnum:""}]),e=i(1),[n,c]=d(!1),[r,a]=d(""),[l,u]=d(!1),[p,m]=d(""),[y,g]=d(!1);s((()=>{f()}),[]);const f=()=>{e.current=1,t([]),h()},h=()=>Xo(void 0,void 0,void 0,(function*(){try{const o=yield v({row:10,page:e.current,collectType:0});t((t=>t.concat(Ao(o,"list",[])))),e.current+=1}catch(o){return console.log(o),[]}})),S=()=>{let t=[];for(let e=0;e<o.length;e++)t.push(o[e].collectCode);return t.toString()};return{collectionList:o,edit:n,setEdit:c,getData:h,collectCodeStr:r,getSelectItem:t=>{const e=t.detail.value;a(e.toString()),e.length===o.length?g(!0):(g(!1),a(""))},delItem:()=>Xo(void 0,void 0,void 0,(function*(){try{yield oo({collectCodeStr:r}),e.current=1,f()}catch(o){console.log(o)}})),init:f,checked:l,setChecked:u,handleSelectAll:o=>{o.detail.value.length?(u(!0),a(S())):u(!1)},selectAll:p,setSelectAll:m,selectAllChecked:y}},Se=o=>{const[t,e]=d([]),n=i([]),c=i({}),r=bo();s((()=>{Xo(void 0,void 0,void 0,(function*(){yield u(),yield a()}))}),[]);const a=()=>Xo(void 0,void 0,void 0,(function*(){try{const t=yield W({contractBillcode:o,isLocalMock:!r}),n=l(Ao(t,"goodsList",[])),{contractBillcode:i,memberBcode:s,memberBname:d,memberCode:a,memberName:u}=n[0];c.current={contractBillcode:i,memberBcode:s,memberBname:d,memberCode:a,memberName:u},e(n)}catch(o){console.log(o)}})),l=o=>{for(let t=0;t<o.length;t++)o[t].upImgLength=!0,o[t].upImg=[],o[t].evaluateGoodsImgs="",o[t].evaluateScopeList=[n.current[0]],o[t].evaluateGoodsContent="";return o},u=()=>Xo(void 0,void 0,void 0,(function*(){try{const o=yield to({applyTarget:"goods",isLocalMock:!r});n.current=o[0].templateValuesReList}catch(o){console.log(o)}}));return{orderInfo:t,changeStar:(o,c)=>{const i=[...t],r=[];for(let o=0;o<c;o++)r.push(n.current[o]);i[o].evaluateScopeList=r,e(i)},Submit:()=>Xo(void 0,void 0,void 0,(function*(){try{yield eo({paramStr:JSON.stringify(t)}),yield no(Object.assign({paramStr:JSON.stringify(t)},c.current)),Po("orderlist")}catch(o){console.log(o)}})),changeContent:(o,n)=>{const c=[...t];c[o].evaluateGoodsContent=n.detail.value,e(c)}}},Ce=()=>{const[o,t]=d([]),e=i(1),[n,c]=d(!1),[r,a]=d(""),[l,u]=d(!1),[p,m]=d(""),[y,g]=d(!1),[f,h]=d(!1),v=i(!1);s((()=>{S()}),[]);const S=()=>Xo(void 0,void 0,void 0,(function*(){e.current=1,v.current=!1,t([]),yield C()})),C=()=>Xo(void 0,void 0,void 0,(function*(){var o;if(!v.current){h(!0);try{const n=yield co({rows:10,page:e.current});if(0===(null===(o=n.list)||void 0===o?void 0:o.length))return;if(t((o=>1===e.current?n.list:o.concat(n.list||[]))),n.list.length<10)return void(v.current=!0);e.current+=1}catch(o){return t([]),[]}finally{h(!1)}}})),b=()=>{let o=[];for(let t=0;t<collectionList.length;t++)o.push(collectionList[t].collectCode);return o.toString()};return{footprintList:o,edit:n,setEdit:c,getData:C,getSelectItem:o=>{const t=o.detail.value;a(t.toString())},delItem:()=>Xo(void 0,void 0,void 0,(function*(){try{yield io({footprintCodeStr:r}),yield S(),c(!1)}catch(o){console.log(o)}})),init:S,checked:l,setChecked:u,handleSelectAll:o=>{o.detail.value.length?(u(!0),setCollectCodeStr(b())):u(!1)},selectAll:p,setSelectAll:m,selectAllChecked:y,loading:f}};function be(o){const[t,e]=d([]);s((()=>{(()=>{Xo(this,void 0,void 0,(function*(){try{const t=yield ro({page:1,rows:o,dataState:1}),n=Ao(t,"list",[]);e(n)}catch(o){}}))})()}),[o]);return{content:a((()=>t.map((o=>o.noticeTitle))),[t]),navigator:o=>{const e=Ao(t,`${o}.noticeId`,"");Po("noticeDetail",{noticeId:e})}}}const Oe=o=>{const[t,e]=d({});s((()=>{Xo(void 0,void 0,void 0,(function*(){yield n()}))}),[]);const n=()=>Xo(void 0,void 0,void 0,(function*(){try{const t=yield so({noticeId:o});e(t)}catch(o){console.log(o)}}));return{info:t,setInfo:e}},Ne={doclistTitle:"",doclistTitle4:"",doclistContent:""},ke=o=>{const[t,e]=d(Ne);return s((()=>{Xo(void 0,void 0,void 0,(function*(){try{const t=bo(),n=yield ao({doclistId:o,isLocalMock:!t});e(n)}catch(o){console.log(o)}}))}),[]),{info:t}},Pe=({defaultValue:o,goods:t},e)=>{const[n,c]=d(o),r=i();return s((()=>{qo(r.current,t)||(r.current=t,Eo(t)?c(o):Xo(void 0,void 0,void 0,(function*(){try{const o=yield A({[e]:t.toString(),distinctField:"goodsNo"});c(o.list)}catch(t){c(o)}})))}),[t]),{list:n}},Ie=o=>{const[t,e]=d([]),[n,c]=d([]),{coupons:i,defaultValue:r}=o;s((()=>{a()}),[i]);const a=()=>Xo(void 0,void 0,void 0,(function*(){if(0!==i.length)try{const o=yield lo({promotionCode:null==i?void 0:i.join(","),list:1});e(Ao(o,"list",[]))}catch(o){console.log(o)}else e(r)}));return{list:t,setList:e,takeCoupon:({promotionCode:o,couponAmount:t,index:e})=>Xo(void 0,void 0,void 0,(function*(){try{yield g({promotionCode:o,couponAmount:t})}catch(o){console.log(41,o)}finally{c((o=>o.concat(e)))}})),takeList:n}},Le=t([{},wo]);function Me({initialValue:t,children:e}){return o(Le.Provider,{value:d(t||{}),children:e})}function Be(){const o=n(Le);return o||[{},wo]}const De=()=>{const[,o]=Be();return{goTop:()=>{o((o=>{const{scrollTop:t}=o;return Object.assign(Object.assign({},o),{scrollTop:0===t?1:0})}))}}},Ge=({params:o})=>{const t=i([]),[e,n]=d([]),c=i(0),r=i(10);s((()=>{c.current=0,t.current=[],a()}),[o]);const a=()=>Xo(void 0,void 0,void 0,(function*(){const e=bo();++c.current;try{const i=yield uo({isLocalMock:!e,pbCode:o,list:1,page:c.current,rows:r.current}),s=Ao(i,"list",[]);t.current.push(...s),n(t.current)}catch(o){console.log(o)}}));return{list:e,getData:a}},je=({contractBillcode:o,skuCode:t})=>{const[e,n]=d({}),[c,i]=d(!1),[r,a]=d(1),[l,u]=d(0),[p,m]=d(!1),[y,g]=d(!1);s((()=>{Xo(void 0,void 0,void 0,(function*(){yield f()}))}),[]);const f=()=>Xo(void 0,void 0,void 0,(function*(){m(!0);try{const e=bo(),c=(yield po({contractBillcode:o,skuCode:t,isLocalMock:!e})).dataObj,{contractGoodsMoney:i,contractGoodsAremoney:r,goodsCamount:s,contractGoodsArefnum:d}=c,l=+i-+r;if(n(c),.01===l)return u(l),g(!0),void a(+s-+d);u(c.contractGoodsPrice)}catch(o){console.log(o)}finally{m(!1)}}));return{typeTip:c,setTypeTip:i,goodsNum:r,handleStep:o=>{if(y)return;const{goodsCamount:t,contractGoodsArefnum:n,contractGoodsMoney:c,contractGoodsAremoney:i,contractGoodsPrice:s}=e;if("plus"===o){const o=+t-+n;if(r>=o)return;u(o===r+1?c-i:(r+1)*s),a((o=>o+1))}else if("minus"===o){if(1===r)return;u((r-1)*s),a((o=>o-1))}},goodsInfo:e,goApply:(o,t,e,n)=>{Po("afterSalesApply",{refundType:o,contractBillcode:t,skuCode:e,goodsNum:n,goodsPrice:l})},loading:p,goodsPrice:l,stepLock:y}},Te=jo(),we=({contractBillcode:o,skuCode:t})=>{const[e,n]=d([]),[c,i]=d(!1),[r,a]=d(!1),[l,u]=d(""),[p,m]=d([]),[y,g]=d({}),[f,h]=d(""),[v,S]=d(!1),C=bo();s((()=>{Xo(void 0,void 0,void 0,(function*(){yield O()}))}),[]);const b=(o=0)=>o?o.toLocaleString("en-Us",{minimumFractionDigits:2}):"0",O=()=>Xo(void 0,void 0,void 0,(function*(){try{const e=yield po({contractBillcode:o,skuCode:t,isLocalMock:!C});g(e.dataObj)}catch(o){console.log(o)}})),N=o=>o.map((o=>({refundFileUrl:o})));return{tip:"请与商家协商,确认达成一致后填写协商好的退款金额。",reasonList:e,popupVisible:c,popupLoading:r,handlePopupShow:()=>Xo(void 0,void 0,void 0,(function*(){i((o=>!o)),c||0!==e.length||(yield Xo(void 0,void 0,void 0,(function*(){a(!0);try{const o=yield yo({isLocalMock:!C});n(o)}catch(o){console.log(o)}finally{a(!1)}})))})),handleChooseReason:o=>{u(o.detail.value),i(!1)},reason:l,handleChooseImg:()=>{const o=Io();o.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(t){o.uploadFile({url:`${Te}web/oc/refund/uploadRefFile.json`,filePath:t.tempFilePaths[0],name:"file",header:{"saas-agent":"qj-wemini","saas-token":To("saas-token")},success(o){const t=JSON.parse(o.data),e=bo();if("nologin"===t.errorCode)Po(e?"/account/auth/index":"/account/mobileLogin/index");else{const o=Te+t.fileUrl;m((t=>[...t,o]))}}})}})},placeholder:"描述补充,有助于商家更好的处理售后问题",imgGroup:p,handleDelImg:o=>{m((t=>[...t.slice(0,o),...t.slice(o+1)]))},limit:3,goodsInfo:y,handleFillInReason:o=>{h(o.detail.value)},handleSubmit:(o,t,e,n)=>Xo(void 0,void 0,void 0,(function*(){const{contractGoodsCode:c,goodsCamount:i,contractGoodsPrice:r}=y;if(!l)return void Ut("请填写退款信息","none");S(!0);const s={ocRefundGoodsBeanList:[{contractGoodsCode:c,goodsCamount:i,refundGoodsNum:+o,refundGoodsAmt:b(n/+o)}],contractBillcode:t,refundMoney:n,refundEx:l,refundMeo:f,ocRefundFileDomainList:N(p),refundType:e};try{const o=yield mo({params:JSON.stringify(s)});o.success&&(Ut(o.msg),setTimeout((()=>{Po("afterSalesList")}),1e3))}catch(o){console.log(o)}finally{S(!1)}})),loading:v}},xe=({refundCode:o})=>{const[t,e]=d({}),[n,c]=d([]),[i,r]=d(!1),[a,l]=d(""),[u,p]=d(""),[m,y]=d(""),[g,f]=d(!1),h=bo();s((()=>{Xo(void 0,void 0,void 0,(function*(){yield v()}))}),[]);const v=()=>Xo(void 0,void 0,void 0,(function*(){f(!0);try{Uo(go);const t=yield go({refundCode:o,isLocalMock:!h});1===t.dataState&&(yield S()),e(t)}catch(o){console.log(o)}finally{f(!1)}})),S=()=>Xo(void 0,void 0,void 0,(function*(){try{const o=yield ho({dataState:1});c(o.list)}catch(o){console.log(o)}}));return{setAfterSalesDetailInfo:e,afterSalesDetailInfo:t,submitExpressInfo:()=>Xo(void 0,void 0,void 0,(function*(){if(a&&u&&m)try{yield fo({packageBillno:a,refundCode:o,packageCode:u,packageName:m}),Uo(go),yield v()}catch(o){console.log(o)}else Ut("请填写完成信息","error")})),companyList:n,handleCancelAfterSales:t=>Xo(void 0,void 0,void 0,(function*(){try{yield vo({goodsCode:t,refundCode:o}),Uo(go),yield v()}catch(o){console.log(o)}})),popupShow:i,handlePopupShow:()=>{r((o=>!o))},chooseCompany:o=>{const t=o.detail.value.split("-");y(t[0]),p(t[1]),r(!1)},packageName:m,setPackageBillno:l,loading:g}},Ae=(o,t)=>{const e=i(!1),[n,c]=d(!1),[r,a]=d([]),l=i(0),[u,p]=d(!0),m=bo();s((()=>{y()}),[t]);const y=Mo((()=>{l.current=0,a([]),g()})),g=Mo(((t={})=>Xo(void 0,void 0,void 0,(function*(){if(e.current)return;c(!0),++l.current;const{code:t}=o;try{const o=yield So({page:l.current,rows:10,dataStates:t,isLocalMock:!m});e.current=Eo(o.list)||o.list.length<10,0===o.list.length&&p(!1),a((t=>t.concat(o.list||[])))}catch(o){--l.current,console.log(o)}finally{c(!1)}}))));return{afterSalesList:r,onScroll:g,loading:n,init:y,goAfterSalesDetail:o=>{Po("afterSalesDetail",{refundCode:o})},haseData:u}},Ee=[{name:"全部",code:""},{name:"进行中",code:"0,1,2,3,4,5"}],Re=()=>({mySettingGoBind:()=>{Po($t.confirmPhone)},mySettingLogout:()=>Xo(void 0,void 0,void 0,(function*(){const o=Io();try{const t=yield Co();o.removeStorage({key:"saas-token"}),Ut(t.msg),setTimeout((()=>{Lo(1)}),1e3)}catch(o){console.log(o)}}))});export{Me as ApplicationContext,Ot as StoreProvider,Wt as addressInitial,Ee as afterSalesTabConfig,ut as computedParams,Ho as createStore,ae as detailButton,_t as formatTime,ot as getGoodDetail,Zt as goodListIntialValue,Rt as goodListMock,Ko as goodStore,Ht as initalOrderValue,pt as initialCoupon,it as initialValue,oe as initialValueOrder,_o as makeStore,zt as navigator,Yt as orderGoodValue,de as orderStatusImpl,se as orderStatusList,Kt as orderStore,ue as orderType,tt as popupImplement,$t as routerMap,Vt as routerMapArr,Ut as showToast,ct as useAddCoupon,nt as useAddShopping,bt as useAddressItem,Ct as useAddressList,we as useAfterSalesApply,je as useAfterSalesChooseType,xe as useAfterSalesDetail,Ae as useAfterSalesList,Ie as useAllCoupon,Be as useApplicationContext,ke as useArticleDetail,st as useBanner,Pt as useCartItem,It as useCartList,Lt as useCartListNext,Mt as useCartOperate,Bt as useCartTop,ve as useCollectionList,mt as useCoupon,Dt as useCouponList,re as useCube,kt as useDispatchImpl,St as useEditAddress,gt as useEvaluate,Se as useEvaluateDetail,fe as useExpressInfo,Ce as useFootprint,De as useGoTop,at as useGoodCollection,rt as useGoodDetail,ht as useGoodFootprint,lt as useGoodSku,Qo as useGoodSkuStore,vt as useGoodSpecAndPrice,Pe as useGoods,he as useGoodsClassify,wt as useGoodsList,ft as useGoodsShare,Ge as useMarketingPromotion,Re as useMySetting,be as useNotice,Oe as useNoticeDetail,Xt as useOrderAddress,ee as useOrderCoupon,ye as useOrderDetail,te as useOrderGood,Jt as useOrderInfo,pe as useOrderList,le as useOrderOperate,ne as useOrderPay,xt as useOrderResult,ie as useOrderResultResult,Tt as useOverdue,Ft as usePlaceOrder,yt as usePromotion,Nt as useStore,Qt as useSyncOrderStore,Gt as useUnused,jt as useUsed,qt as userAddressData};
@@ -0,0 +1 @@
1
+ export * from './useMySetting';
@@ -0,0 +1 @@
1
+ export declare const useAgreement: () => {};
@@ -0,0 +1,4 @@
1
+ export declare const useMySetting: () => {
2
+ mySettingGoBind: () => void;
3
+ mySettingLogout: () => Promise<void>;
4
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useAddAddress';
@@ -0,0 +1,3 @@
1
+ export declare function useEditAddress(): {
2
+ onSubmit: (values: any, suc: any, error: any) => Promise<void>;
3
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1,2 @@
1
+ export * from './useAddressList';
2
+ export * from './useAddressItem';
@@ -0,0 +1,3 @@
1
+ export declare function useAddressItem(itemData: any): {
2
+ handlerImpl: () => void;
3
+ };
@@ -0,0 +1,8 @@
1
+ export declare function useAddressList(refreshNum: number): {
2
+ list: any[];
3
+ skullShow: boolean;
4
+ delAddress: (addressInfo: object) => void;
5
+ setDefault: (addressInfo: any, index: number) => Promise<void>;
6
+ getAddressList: () => Promise<void>;
7
+ navigator: () => void;
8
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1,4 @@
1
+ export declare const afterSalesTabConfig: {
2
+ name: string;
3
+ code: string;
4
+ }[];
@@ -0,0 +1,5 @@
1
+ export * from './useAfterSalesChooseType';
2
+ export * from './useAfterSalesApply';
3
+ export * from './useAfterSalesDetail';
4
+ export * from './useAfterSalesList';
5
+ export * from './afterSalesConfig';
@@ -0,0 +1,23 @@
1
+ interface useAfterSalesApplyType {
2
+ contractBillcode: string;
3
+ skuCode: string;
4
+ }
5
+ export declare const useAfterSalesApply: ({ contractBillcode, skuCode }: useAfterSalesApplyType) => {
6
+ tip: string;
7
+ reasonList: never[];
8
+ popupVisible: boolean;
9
+ popupLoading: boolean;
10
+ handlePopupShow: () => Promise<void>;
11
+ handleChooseReason: (e: any) => void;
12
+ reason: string;
13
+ handleChooseImg: () => void;
14
+ placeholder: string;
15
+ imgGroup: any;
16
+ handleDelImg: (coe: number) => void;
17
+ limit: number;
18
+ goodsInfo: any;
19
+ handleFillInReason: (e: any) => void;
20
+ handleSubmit: (goodsNum: number, contractBillcode: string, refundType: string, goodsPrice: any) => Promise<void>;
21
+ loading: boolean;
22
+ };
23
+ export {};
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ interface useAfterSalesChooseTypeType {
3
+ contractBillcode: string;
4
+ skuCode: string;
5
+ }
6
+ export declare const useAfterSalesChooseType: ({ contractBillcode, skuCode }: useAfterSalesChooseTypeType) => {
7
+ typeTip: boolean;
8
+ setTypeTip: import("react").Dispatch<import("react").SetStateAction<boolean>>;
9
+ goodsNum: number;
10
+ handleStep: (type: string) => void;
11
+ goodsInfo: any;
12
+ goApply: (stat: number | string, contractBillcode: string, skuCode: string, goodsNum: number) => void;
13
+ loading: boolean;
14
+ goodsPrice: number;
15
+ stepLock: boolean;
16
+ };
17
+ export {};
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ interface useAfterSalesDetailType {
3
+ refundCode: string;
4
+ }
5
+ export declare const useAfterSalesDetail: ({ refundCode }: useAfterSalesDetailType) => {
6
+ setAfterSalesDetailInfo: import("react").Dispatch<import("react").SetStateAction<{}>>;
7
+ afterSalesDetailInfo: {};
8
+ submitExpressInfo: () => Promise<void>;
9
+ companyList: never[];
10
+ handleCancelAfterSales: (goodsCode: string) => Promise<void>;
11
+ popupShow: boolean;
12
+ handlePopupShow: () => void;
13
+ chooseCompany: (e: any) => void;
14
+ packageName: string;
15
+ setPackageBillno: import("react").Dispatch<import("react").SetStateAction<string>>;
16
+ loading: boolean;
17
+ };
18
+ export {};
@@ -0,0 +1,8 @@
1
+ export declare const useAfterSalesList: (item: any, refreshNum: number) => {
2
+ afterSalesList: never[];
3
+ onScroll: (...args: any[]) => any;
4
+ loading: boolean;
5
+ init: (...args: any[]) => any;
6
+ goAfterSalesDetail: (refundCode: string) => void;
7
+ haseData: boolean;
8
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useArticleDetail';
@@ -0,0 +1,7 @@
1
+ export declare const useArticleDetail: (doclistId: number) => {
2
+ info: {
3
+ doclistTitle: string;
4
+ doclistTitle4: string;
5
+ doclistContent: string;
6
+ };
7
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1,2 @@
1
+ export * from './useCartItem';
2
+ export * from './useCartList';
@@ -0,0 +1,9 @@
1
+ export declare const useCartItem: () => {
2
+ select: any;
3
+ onChange: (e: {
4
+ detail: {
5
+ value: string[];
6
+ };
7
+ }) => void;
8
+ handleStep: (id: number, amount: number, type: string) => Promise<void>;
9
+ };
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ export declare const useCartList: (refresh: number) => {
3
+ cartList: any[];
4
+ initImpl: (isFirst?: string) => Promise<void>;
5
+ disMoney: number;
6
+ amount: {
7
+ num: number;
8
+ amount: number;
9
+ };
10
+ selectAll: (e: {
11
+ detail: {
12
+ value: string[];
13
+ };
14
+ }) => void;
15
+ allCart: import("react").MutableRefObject<any[]>;
16
+ toOrderImpl: () => void;
17
+ select: any;
18
+ deleteCart: () => Promise<void>;
19
+ };
@@ -0,0 +1,2 @@
1
+ export * from './hooks';
2
+ export * from './store';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * =========== StoreProvider, useStore, useDispatchImpl ============
3
+ * 导出三个参数
4
+ * 第一个是Provider
5
+ * 第二个是Store
6
+ * 第三个是Dispath
7
+ *
8
+ */
9
+ declare const StoreProvider: any, useStore: any, useDispatchImpl: any;
10
+ export { StoreProvider, useStore, useDispatchImpl };
@@ -0,0 +1,3 @@
1
+ export * from './useCartListNext';
2
+ export * from './useCartOperate';
3
+ export * from './useCartTop';
@@ -0,0 +1,12 @@
1
+ import { Dispatch } from 'react';
2
+ export declare const useCartListNext: (refresh: number, updateCount: number, dispatchPageStore?: Dispatch<any>) => {
3
+ cartList: any[];
4
+ loading: boolean;
5
+ onChange: (e: {
6
+ detail: {
7
+ value: string[];
8
+ };
9
+ }) => void;
10
+ handleStep: (id: number, amount: number, type: string) => void;
11
+ updatePm: (shoppingGoodsId: string, promotionCode: string) => Promise<void>;
12
+ };
@@ -0,0 +1,11 @@
1
+ import { Dispatch } from 'react';
2
+ export declare function useCartOperate(select?: Array<any>, cardGoods?: Array<any>, dispatchPageStore?: Dispatch<any>): {
3
+ toOrderImpl: (...args: any[]) => any;
4
+ deleteCart: (...args: any[]) => any;
5
+ selectAll: (...args: any[]) => any;
6
+ cartDetail: {
7
+ num: number;
8
+ canPayIds: string[];
9
+ amount: number;
10
+ };
11
+ };
@@ -0,0 +1,4 @@
1
+ import { Dispatch } from 'react';
2
+ export declare function useCartTop(dispatchPageStore?: Dispatch<any>): {
3
+ editorImpl: () => void;
4
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useCollectionList';
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ export declare const useCollectionList: () => {
3
+ collectionList: any[];
4
+ edit: boolean;
5
+ setEdit: import("react").Dispatch<import("react").SetStateAction<boolean>>;
6
+ getData: () => Promise<never[] | undefined>;
7
+ collectCodeStr: string;
8
+ getSelectItem: (e: {
9
+ detail: {
10
+ value: string[];
11
+ };
12
+ }) => void;
13
+ delItem: () => Promise<void>;
14
+ init: () => void;
15
+ checked: boolean;
16
+ setChecked: import("react").Dispatch<import("react").SetStateAction<boolean>>;
17
+ handleSelectAll: (e: {
18
+ detail: {
19
+ value: string[];
20
+ };
21
+ }) => void;
22
+ selectAll: string;
23
+ setSelectAll: import("react").Dispatch<import("react").SetStateAction<string>>;
24
+ selectAllChecked: boolean;
25
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useAllCoupon';
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ interface useAllCouponType {
3
+ defaultValue: Array<any>;
4
+ coupons: Array<any>;
5
+ }
6
+ export declare const useAllCoupon: (props: useAllCouponType) => {
7
+ list: any[];
8
+ setList: import("react").Dispatch<import("react").SetStateAction<any[]>>;
9
+ takeCoupon: ({ promotionCode, couponAmount, index }: any) => Promise<void>;
10
+ takeList: any[];
11
+ };
12
+ export {};
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1,4 @@
1
+ export * from './useCouponList';
2
+ export * from './useUnused';
3
+ export * from './useUsed';
4
+ export * from './useOverdue';
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ export declare const useCouponList: () => {
3
+ config: import("react").MutableRefObject<({
4
+ id: number;
5
+ label: string;
6
+ dataState: number;
7
+ styleName: string;
8
+ text: string;
9
+ } | {
10
+ id: number;
11
+ label: string;
12
+ dataState: number;
13
+ styleName: string;
14
+ text?: undefined;
15
+ })[]>;
16
+ coe: import("react").MutableRefObject<number>;
17
+ list: any[];
18
+ setList: import("react").Dispatch<import("react").SetStateAction<any[]>>;
19
+ getList: () => Promise<void>;
20
+ switchTab: (index: number) => Promise<void>;
21
+ };
@@ -0,0 +1,5 @@
1
+ export declare const useOverdue: () => {
2
+ overdueList: never[];
3
+ getData: () => Promise<void>;
4
+ init: () => Promise<void>;
5
+ };
@@ -0,0 +1,5 @@
1
+ export declare const useUnused: () => {
2
+ unusedList: never[];
3
+ getData: () => Promise<void>;
4
+ init: () => Promise<void>;
5
+ };
@@ -0,0 +1,5 @@
1
+ export declare const useUsed: () => {
2
+ usedList: never[];
3
+ getData: () => Promise<void>;
4
+ init: () => Promise<void>;
5
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1,6 @@
1
+ interface ImgType {
2
+ imgUrl: string;
3
+ link: string;
4
+ }
5
+ export declare function useCube<T = ImgType>(defaultValue: Array<T>, selectImg: Array<T>): Array<T>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useEvaluateDetail';
@@ -0,0 +1,6 @@
1
+ export declare const useEvaluateDetail: (code: string) => {
2
+ orderInfo: any[];
3
+ changeStar: (index: number, starNum: number) => void;
4
+ Submit: () => Promise<void>;
5
+ changeContent: (index: number, e: any) => void;
6
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useExpressInfo';
@@ -0,0 +1,14 @@
1
+ export declare const useExpressInfo: (code: string) => {
2
+ info: {};
3
+ detail: {};
4
+ stateObj: {
5
+ '0': string;
6
+ '1': string;
7
+ '2': string;
8
+ '3': string;
9
+ '4': string;
10
+ '5': string;
11
+ '8': string;
12
+ '14': string;
13
+ };
14
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useFootprint';
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ export declare const useFootprint: () => {
3
+ footprintList: any[];
4
+ edit: boolean;
5
+ setEdit: import("react").Dispatch<import("react").SetStateAction<boolean>>;
6
+ getData: () => Promise<never[] | undefined>;
7
+ getSelectItem: (e: {
8
+ detail: {
9
+ value: string[];
10
+ };
11
+ }) => void;
12
+ delItem: () => Promise<void>;
13
+ init: () => Promise<void>;
14
+ checked: boolean;
15
+ setChecked: import("react").Dispatch<import("react").SetStateAction<boolean>>;
16
+ handleSelectAll: (e: {
17
+ detail: {
18
+ value: string[];
19
+ };
20
+ }) => void;
21
+ selectAll: string;
22
+ setSelectAll: import("react").Dispatch<import("react").SetStateAction<string>>;
23
+ selectAllChecked: boolean;
24
+ loading: boolean;
25
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useGoTop';
@@ -0,0 +1,3 @@
1
+ export declare const useGoTop: () => {
2
+ goTop: () => void;
3
+ };
@@ -0,0 +1 @@
1
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export * from './useGoods';
@@ -0,0 +1,8 @@
1
+ interface useGoodsType {
2
+ defaultValue: Array<any>;
3
+ goods: Array<any>;
4
+ }
5
+ export declare const useGoods: ({ defaultValue, goods }: useGoodsType, apiKey: string) => {
6
+ list: any[];
7
+ };
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from './hooks';