PageSourceSearch

https://awc618.com/assets/shop-cart-7FUnNqW_.js

js awc618.com collected 2026-09-25 00:43:48 UTC 5,600 bytes, 1 lines download raw bytes

1import{_ as X,a as Y,u as Z,r as f,bQ as ee,T as te,c as ae,E as le,d as m,e as B,f as n,h as l,t as u,w as d,o as M,F as T,i as oe,j as se,k as ne,L as ce,p as k,bR as re,a5 as U,bS as A,v as D,bT as ie}from"./index-NPBbSInP.js";import{u as de}from"./order-hyllkb7y.js";const ue=()=>{const I=(i,c)=>{var s,o,t;try{s=i.toString().split(".")[1].length}catch{s=0}try{o=c.toString().split(".")[1].length}catch{o=0}return t=Math.pow(10,Math.max(s,o)),(p(i,t)+p(c,t))/t},w=(i,c)=>{var s,o,t;try{s=i.toString().split(".")[1].length}catch{s=0}try{o=c.toString().split(".")[1].length}catch{o=0}return t=Math.pow(10,Math.max(s,o)),(p(i,t)-p(c,t))/t},p=(i,c)=>{var s=0,o=i.toString(),t=c.toString();try{s+=o.split(".")[1].length}catch{}try{s+=t.split(".")[1].length}catch{}return Number(o.replace(".",""))*Number(t.replace(".",""))/Math.pow(10,s)};return{bcadd:I,bcdiv:(i,c)=>{var s,o,t=0,_=0;try{t=i.toString().split(".")[1].length}catch{}try{_=c.toString().split(".")[1].length}catch{}return s=Number(i.toString().replace(".","")),o=Number(c.toString().replace(".","")),p(s/o,Math.pow(10,_-t))},bcmul:p,bcsub:w}},_e={class:"container main_root"},he={class:"title_box"},me={class:"title"},pe={class:"drop_search"},ve={class:"cart_box"},ge={class:"cart_list"},fe={class:"cart_header"},be={class:"tab_box"},ye={class:"product_info"},Se=["src"],ke={class:"product_detail"},we={class:"product_name"},Ce={class:"product_desc"},Ve={class:"price"},$e={class:"settlement"},Ne={class:"order_title"},Me={class:"total label_value flex-justify-between"},De={class:"label"},Ie={class:"value"},xe={class:"settlement_btn"},Le={__name:"shop-cart",setup(I){const{bcadd:w,bcmul:p}=ue(),C=de(),i=Y(),{t:c}=Z(),s=f([]);ee({type:0}).then(e=>{s.value=[{title:c("cart.allCategories"),id:0},...e]});const o=f([]),t=te({keyword:"",cate_id:0}),_=ae(()=>{if(h.value.length===0)return"0.00";let e="0";return h.value.forEach(r=>{const V=p(r.price||0,r.number||0);e=w(e,V)}),Number(e).toFixed(2)}),v=()=>{re(t).then(e=>{o.value=e}).catch(e=>{console.log(e)})},x=()=>{v()},E=()=>{v()};le(()=>{v()});const y=f(null),h=f([]),S=f(!1),P=e=>{h.value=e,S.value=e.length===o.value.length&&o.value.length>0},R=e=>{e?y.value?.toggleAllSelection():y.value?.clearSelection()},j=()=>{h.value.length!==0&&(g.value=h.value.map(e=>e.sku_id),L())},F=e=>{if(e.number<=0){g.value=[e.sku_id],U().then(async()=>{try{await A({sku_ids:JSON.stringify(g.value)}),await v(),D(c("cart.deleteSuccess"),"success")}catch(r){console.error("删除失败:",r)}}).catch(()=>{e.number=1});return}ie({sku_id:e.sku_id,num:e.number}).then(()=>{})},g=f([]),O=e=>{g.value=[e.sku_id],L()},L=()=>{U().then(async()=>{try{await A({sku_ids:JSON.stringify(g.value)}),await v(),h.value=[],S.value=!1,y.value?.clearSelection(),g.value=[],D(c("cart.deleteSuccess"),"success")}catch(e){console.error("删除失败:",e)}}).catch(()=>{})},z=()=>{if(console.log("selectedItems",h.value),!h.value.length){D(c("cart.pleaseSelectProducts"),"error");return}const e=h.value.map(r=>r.id);C.orderInfo.type="cart",C.orderInfo.data=e.join(","),i.push({name:"shop-order"})};return(e,r)=>{const V=m("breadcrumb"),H=m("el-option"),J=m("el-select"),K=m("el-icon"),Q=m("el-input"),q=m("el-checkbox"),$=m("el-button"),b=m("el-table-column"),G=m("el-input-number"),W=m("el-table");return M(),B(T,null,[n(V,{title:e.$t("cart.title"),list:[{name:e.$t("app.home"),path:"index"},{name:e.$t("shop.shop"),path:"shop-list"},{name:e.$t("cart.title")}]},null,8,["title","list"]),l("div",_e,[l("div",he,[l("div",me,u(e.$t("cart.allProducts",{count:o.value.length})),1),l("div",pe,[n(J,{modelValue:t.cate_id,"onUpdate:modelValue":r[0]||(r[0]=a=>t.cate_id=a),class:"dropdown",onChange:E},{default:d(()=>[(M(!0),B(T,null,oe(s.value,a=>(M(),se(H,{key:a.id,label:a.title,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),n(Q,{modelValue:t.keyword,"onUpdate:modelValue":r[1]||(r[1]=a=>t.keyword=a),onChange:x,class:"input_box",placeholder:e.$t("cart.searchPlaceholder")},{suffix:d(()=>[n(K,{class:"coursor",color:"#333333",size:"14",onClick:x},{default:d(()=>[n(ne(ce))]),_:1})]),_:1},8,["modelValue","placeholder"])])]),l("div",ve,[l("div",ge,[l("div",fe,[n(q,{modelValue:S.value,"onUpdate:modelValue":r[2]||(r[2]=a=>S.value=a),onChange:R},{default:d(()=>[k(u(e.$t("cart.selectAll")),1)]),_:1},8,["modelValue"]),n($,{onClick:j,class:"del_btn",disabled:h.value.length===0},{default:d(()=>[k(u(e.$t("common.delete")),1)]),_:1},8,["disabled"])]),l("div",be,[n(W,{data:o.value,ref_key:"tableRef",ref:y,onSelectionChange:P,"show-
1header":!1},{default:d(()=>[n(b,{type:"selection",width:"40"}),n(b,{width:"320"},{default:d(a=>[l("div",ye,[l("img",{src:a.row.product_img,class:"product_img"},null,8,Se),l("div",ke,[l("div",we,u(a.row.product_name),1),l("div",Ce,u(a.row.sku_name),1)])])]),_:1}),n(b,{align:"center"},{default:d(a=>[l("div",Ve,"HK$"+u(a.row.price),1)]),_:1}),n(b,{align:"center"},{default:d(a=>[n(G,{modelValue:a.row.number,"onUpdate:modelValue":N=>a.row.number=N,min:0,onChange:N=>F(a.row),class:"input_number"},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),n(b,{align:"center"},{default:d(a=>[n($,{type:"info",link:"",size:"small",onClick:N=>O(a.row)},{default:d(()=>[k(u(e.$t("common.delete")),1)]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"]),l("div",$e,[l("div",Ne,u(e.$t("cart.orderDetail")),1),l("div",Me,[l("div",De,u(e.$t("order.total"))+":",1),l("div",Ie,"HK$"+u(_.value),1)]),l("div",xe,[n($,{type:"primary",onClick:z},{default:d(()=>[k(u(e.$t("order.goToCheckout")),1)]),_:1})])])])])])])],64)}}},Ue=X(Le,[["__scopeId","data-v-a6471a03"]]);export{Ue as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.