pages-commission-index.f74a900c.js 7.9 KB

1
  1. import{_ as s}from"./s-layout.04b95866.js";import{H as a,c as e,s as t,z as l,f as o,g as i,w as c,k as n,x as r,u,v as d,y as m,j as f,a0 as p,bL as g,m as _,n as h,J as w,I as x,l as b,F as y,r as k,bg as M,i as S,_ as v,D as $,p as C}from"./index-ba48620e.js";import{_ as I}from"./_plugin-vue_export-helper.1b428a4d.js";import{e as j,_ as F}from"./phone-international-input.dd3ca29e.js";import{f as z}from"./useGoods.edb8879f.js";import{_ as B}from"./uni-load-more.966faf1b.js";const N=I({__name:"commission-info",setup(s){a((s=>({"5b60e62e":r(g)})));const p=e((()=>t.$store("user").userInfo)),g=t.$url.css("/static/img/shop/commission/background.png");return l({showMoney:!1}),(s,a)=>{const e=m,l=f;return o(),i(l,{class:"user-card ss-flex ss-col-bottom"},{default:c((()=>[n(l,{class:"card-top ss-flex ss-row-between"},{default:c((()=>[n(l,{class:"ss-flex"},{default:c((()=>[n(l,{class:"head-img-box"},{default:c((()=>[n(e,{class:"head-img",src:r(t).$url.cdn(p.value.avatar),mode:"aspectFill"},null,8,["src"])])),_:1}),n(l,{class:"ss-flex-col"},{default:c((()=>[n(l,{class:"user-name"},{default:c((()=>[u(d(p.value.nickname),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-6ca62991"]]),P=I({__name:"account-info",setup(s){e((()=>t.$store("user").userInfo));const a=l({showMoney:!1,summary:{}});return p((async()=>{let{code:s,data:e}=await g.getBrokerageUserSummary();0===s&&(a.summary=e||{})})),(s,e)=>{const l=f,m=_(h("uni-icons"),j),p=w,g=x;return o(),i(l,{class:"account-card"},{default:c((()=>[n(l,{class:"account-card-box"},{default:c((()=>[n(l,{class:"ss-flex ss-row-between card-box-header"},{default:c((()=>[n(l,{class:"ss-flex"},{default:c((()=>[n(l,{class:"header-title ss-m-r-16"},{default:c((()=>[u("账户信息")])),_:1}),n(p,{class:"ss-reset-button look-btn ss-flex",onClick:e[0]||(e[0]=s=>a.showMoney=!a.showMoney)},{default:c((()=>[n(m,{type:a.showMoney?"eye-filled":"eye-slash-filled",color:"#A57A55",size:"20"},null,8,["type"])])),_:1})])),_:1}),n(l,{class:"ss-flex",onClick:e[1]||(e[1]=s=>r(t).$router.go("/pages/user/wallet/commission"))},{default:c((()=>[n(l,{class:"header-title ss-m-r-4"},{default:c((()=>[u("查看明细")])),_:1}),n(g,{class:"cicon-play-arrow"})])),_:1})])),_:1}),n(l,{class:"card-content ss-flex"},{default:c((()=>[n(l,{class:"ss-flex-1 ss-flex-col ss-col-center"},{default:c((()=>[n(l,{class:"item-title"},{default:c((()=>[u("当前佣金(元)")])),_:1}),n(l,{class:"item-detail"},{default:c((()=>[u(d(a.showMoney?r(z)(a.summary.brokeragePrice||0):"***"),1)])),_:1})])),_:1}),n(l,{class:"ss-flex-1 ss-flex-col ss-col-center"},{default:c((()=>[n(l,{class:"item-title"},{default:c((()=>[u("昨天的佣金(元)")])),_:1}),n(l,{class:"item-detail"},{default:c((()=>[u(d(a.showMoney?r(z)(a.summary.yesterdayPrice||0):"***"),1)])),_:1})])),_:1}),n(l,{class:"ss-flex-1 ss-flex-col ss-col-center"},{default:c((()=>[n(l,{class:"item-title"},{default:c((()=>[u("累计已提(元)")])),_:1}),n(l,{class:"item-detail"},{default:c((()=>[u(d(a.showMoney?r(z)(a.summary.withdrawPrice||0):"***"),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-c2fe0f87"]]),A=I({__name:"commission-log",setup(s){const a=l({loadStatus:"",pagination:{list:[],total:0,pageNo:1,pageSize:1}});async function e(){a.loadStatus="loading";const{code:s,data:e}=await g.getBrokerageRecordPage({pageNo:a.pagination.pageNo,pageSize:a.pagination.pageSize});0===s&&(a.pagination.list=v.concat(a.pagination.list,e.list),a.pagination.total=e.total,a.loadStatus=a.pagination.list.length<a.pagination.total?"more":"noMore")}function p(){"noMore"!==a.loadStatus&&(a.pagination.pageNo++,e())}return e(),(s,e)=>{const l=m,g=f,w=x,v=_(h("uni-load-more"),B),C=$;return o(),i(g,{class:"distribution-log-wrap"},{default:c((()=>[n(g,{class:"header-box"},{default:c((()=>[n(l,{class:"header-bg",src:r(t).$url.static("/static/images/title2.png")},null,8,["src"]),n(g,{class:"ss-flex header-title"},{default:c((()=>[n(g,{class:"title"},{default:c((()=>[u("实时动态")])),_:1}),n(w,{class:"cicon-forward"})])),_:1})])),_:1}),n(C,{"scroll-y":"true",onScrolltolower:p,class:"scroll-box log-scroll","scroll-with-animation":"true"},{default:c((()=>[a.pagination.list?(o(),i(g,{key:0},{default:c((()=>[(o(!0),b(y,null,k(a.pagination.list,(s=>(o(),i(g,{class:"log-item-box ss-flex ss-row-between",key:s.id},{default:c((()=>[n(g,{class:"log-item-wrap"},{default:c((()=>[n(g,{class:"log-item ss-flex ss-ellipsis-1 ss-col-center"},{default:c((()=>[n(g,{class:"ss-flex ss-col-center"},{default:c((()=>[n(l,{class:"log-img",src:r(t).$url.static("/static/images/notice.png"),mode:"aspectFill"},null,8,["src"])])),_:1}),n(g,{class:"log-text ss-ellipsis-1"},{default:c((()=>[u(d(s.title)+" "+d(r(z)(s.price))+" 元 ",1)])),_:2},1024)])),_:2},1024)])),_:2},1024),n(w,{class:"log-time"},{default:c((()=>[u(d(r(M)(s.createTime).fromNow()),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1})):S("",!0),a.pagination.total>0?(o(),i(v,{key:1,status:a.loadStatus,color:"#333333",onClick:p},null,8,["status"])):S("",!0)])),_:1})])),_:1})}}},[["__scopeId","data-v-0299324e"]]),G=I({__name:"commission-menu",setup(s){const a=l({menuList:[{img:"/static/images/commission_icon1.png",title:"我的团队",path:"/pages/commission/team"},{img:"/static/images/commission_icon2.png",title:"佣金明细",path:"/pages/commission/wallet"},{img:"/static/images/commission_icon3.png",title:"分销订单",path:"/pages/commission/order"},{img:"/static/images/commission_icon4.png",title:"推广商品",path:"/pages/commission/goods"},{img:"/static/images/commission_icon7.png",title:"邀请海报",path:"action:showShareModal"},{title:"推广排行",path:"/pages/commission/promoter"},{title:"佣金排行",path:"/pages/commission/commission-ranking"}]});return(s,e)=>{const l=m,p=f,g=x;return o(),i(p,{class:"menu-box ss-flex-col"},{default:c((()=>[n(p,{class:"header-box"},{default:c((()=>[n(l,{class:"header-bg",src:r(t).$url.static("/static/images/title1.png")},null,8,["src"]),n(p,{class:"ss-flex header-title"},{default:c((()=>[n(p,{class:"title"},{default:c((()=>[u("功能专区")])),_:1}),n(g,{class:"cicon-forward"})])),_:1})])),_:1}),n(p,{class:"menu-list ss-flex ss-flex-wrap"},{default:c((()=>[(o(!0),b(y,null,k(a.menuList,((s,a)=>(o(),i(p,{key:a,class:"item-box ss-flex-col ss-col-center",onClick:a=>r(t).$router.go(s.path)},{default:c((()=>[n(l,{class:"menu-icon ss-m-b-10",src:r(t).$url.static(s.img),mode:"aspectFill"},null,8,["src"]),n(p,null,{default:c((()=>[u(d(s.title),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})}}},[["__scopeId","data-v-40ddf41c"]]),L=I({__name:"commission-auth",setup(s){const a=l({show:!1});return C((async()=>{const{code:s,data:e}=await g.getBrokerageUser();0!==s||(null==e?void 0:e.brokerageEnabled)||(a.show=!0)})),(s,e)=>{const l=m,d=f,p=w,g=_(h("su-popup"),F);return o(),i(g,{show:a.show,type:"center",round:"10",onClose:e[2]||(e[2]=s=>a.show=!1),isMaskClick:!1,maskBackgroundColor:"rgba(0, 0, 0, 0.7)"},{default:c((()=>[n(d,{class:"notice-box"},{default:c((()=>[n(d,{class:"img-wrap"},{default:c((()=>[n(l,{class:"notice-img",src:r(t).$url.static("/static/images/forbidden.png"),mode:"aspectFill"},null,8,["src"])])),_:1}),n(d,{class:"notice-title"},{default:c((()=>[u(" 抱歉!您没有分销权限 ")])),_:1}),n(d,{class:"notice-detail"},{default:c((()=>[u(" 该功能暂不可用 ")])),_:1}),n(p,{class:"ss-reset-button notice-btn ui-Shadow-Main ui-BG-Main-Gradient",onClick:e[0]||(e[0]=s=>r(t).$router.back())},{default:c((()=>[u(" 知道了 ")])),_:1}),n(p,{class:"ss-reset-button back-btn",onClick:e[1]||(e[1]=s=>r(t).$router.back())},{default:c((()=>[u(" 返回 ")])),_:1})])),_:1})])),_:1},8,["show"])}}},[["__scopeId","data-v-17a387fe"]]),D=I({__name:"index",setup(a){l({});const e={color:"#F7D598"};return(a,t)=>{const l=_(h("s-layout"),s);return o(),i(l,{navbar:"inner",class:"index-wrap",title:"分销中心",bgStyle:e,onShareAppMessage:""},{default:c((()=>[n(N),n(P),n(G),n(A),n(L)])),_:1})}}},[["__scopeId","data-v-8e381a85"]]);export{D as default};