select-popup.js 3.2 KB

1
  1. "use strict";const e=require("../../../common/vendor.js");require("../../../sheep/index.js");const r=require("../../../sheep/api/trade/order.js"),o=require("../../../sheep/api/product/history.js");if(require("../../../sheep/url/index.js"),require("../../../sheep/store/index.js"),require("../../../sheep/store/app.js"),require("../../../sheep/api/promotion/diy.js"),require("../../../sheep/request/index.js"),require("../../../sheep/config/index.js"),require("../../../sheep/platform/index.js"),require("../../../sheep/platform/provider/wechat/index.js"),require("../../../sheep/platform/provider/wechat/miniProgram.js"),require("../../../sheep/api/member/auth.js"),require("../../../sheep/api/member/social.js"),require("../../../sheep/api/member/user.js"),require("../../../sheep/platform/provider/apple/index.js"),require("../../../sheep/platform/share.js"),require("../../../sheep/router/index.js"),require("../../../sheep/hooks/useModal.js"),require("../../../sheep/helper/index.js"),require("../../../sheep/helper/test.js"),require("../../../sheep/helper/digit.js"),require("../../../sheep/api/member/signin.js"),require("../../../sheep/helper/throttle.js"),require("../../../sheep/platform/pay.js"),require("../../../sheep/api/pay/order.js"),require("../../../sheep/store/user.js"),require("../../../sheep/store/cart.js"),require("../../../sheep/api/trade/cart.js"),require("../../../sheep/api/pay/wallet.js"),require("../../../sheep/api/promotion/coupon.js"),require("../../../sheep/store/sys.js"),require("../../../sheep/store/modal.js"),require("../../../sheep/config/zIndex.js"),!Array){(e.resolveComponent("uni-load-more")+e.resolveComponent("su-popup"))()}Math||(s+a+(()=>"../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js")+(()=>"../../../sheep/ui/su-popup/su-popup.js"))();const s=()=>"./goods.js",a=()=>"./order.js",t={__name:"select-popup",props:{mode:{type:String,default:"goods"},show:{type:Boolean,default:!1}},emits:["select","close"],setup(s,{emit:a}){const t=a,p=s;e.watch((()=>p.mode),(()=>{i.pagination.data=[],p.mode&&n(i.pagination.page)}));const i=e.reactive({loadStatus:"",pagination:{data:[],current_page:1,total:1,last_page:1}});async function n(s,a=5){i.loadStatus="loading";const t="goods"==p.mode?await o.SpuHistoryApi.getBrowseHistoryPage({page:s,list_rows:a}):await r.OrderApi.getOrderPage({page:s,list_rows:a});let n=e._.concat(i.pagination.data,t.data.data);i.pagination={...t.data,data:n},i.pagination.current_page<i.pagination.last_page?i.loadStatus="more":i.loadStatus="noMore"}function d(){"noMore"!==i.loadStatus&&n(i.pagination.current_page+1)}return(r,o)=>({a:e.t("goods"==s.mode?"我的浏览":"我的订单"),b:e.f(i.pagination.data,((r,o,a)=>e.e("goods"==s.mode?{a:"a7e25654-1-"+a+",a7e25654-0",b:e.p({goodsData:r.goods})}:{},"order"==s.mode?{c:"a7e25654-2-"+a+",a7e25654-0",d:e.p({orderData:r})}:{},{e:r,f:e.o((e=>t("select",{type:s.mode,data:r})),r)}))),c:"goods"==s.mode,d:"order"==s.mode,e:e.p({status:i.loadStatus,"content-text":{contentdown:"上拉加载更多"}}),f:e.o(d),g:e.o((e=>t("close"))),h:e.p({show:s.show,showClose:!0,round:"10",backgroundColor:"#eee"})})}},p=e._export_sfc(t,[["__scopeId","data-v-a7e25654"]]);wx.createComponent(p);