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