team.js 3.9 KB

1
  1. "use strict";const e=require("../../../common/vendor.js"),t=require("../../../sheep/index.js"),s=require("../../../sheep/api/distri/team.js"),a=require("../../../sheep/hooks/useGoods.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/trade/order.js"),require("../../../sheep/api/promotion/coupon.js"),require("../../../sheep/store/sys.js"),require("../../../sheep/store/modal.js"),require("../../../sheep/config/zIndex.js"),require("../../../sheep/util/index.js"),!Array){(e.resolveComponent("s-empty")+e.resolveComponent("uni-load-more")+e.resolveComponent("s-layout"))()}Math||((()=>"../../../sheep/components/s-empty/s-empty.js")+(()=>"../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const r={__name:"team",setup(r){t.sheep.$platform.device.statusBarHeight,e.computed((()=>t.sheep.$store("user").userInfo)),t.sheep.$platform.navbar;const o=e.reactive({currentTab:0,pagination:{list:0,total:0,pageSize:11,pageNo:1},loadStatus:"",descendants:{total:0,list:[]},teamCount:0,ancestor:{}});async function n(){o.loadStatus="loading";let{code:t,data:a}=await s.TeamApi.getTeam({pageNo:o.pagination.pageNo,pageSize:o.pagination.pageSize});if(0!==t)return;o.teamCount=a.teamCount,o.ancestor=a.ancestor;let r=e._.concat(o.descendants.list,a.descendants.list);o.descendants.list=r,o.descendants.total=a.descendants.total,o.pagination.total=a.descendants.total,o.loadStatus=o.descendants.list.length<o.descendants.total?"more":"noMore"}function i(){"noMore"!==o.loadStatus&&(o.pagination.pageNo++,n())}return e.computed((()=>o.date[0]===o.date[1]?o.date[0]:o.date.join("~"))),e.onLoad((()=>{o.today=e.dayjs().format("YYYY-MM-DD"),o.date=[o.today,o.today],n()})),e.onReachBottom((()=>{i()})),(s,r)=>e.e({a:e.t(o.teamCount),b:o.ancestor.avatar,c:e.t(o.ancestor.username||"昵称:"+o.ancestor.descNickName),d:e.t(e.unref(a.points2point)(o.ancestor.residueSocial)),e:e.t(o.ancestor.socialStatusLevel||"等级1"),f:e.t(o.ancestor.descendantsCount),g:o.descendants.total>0},o.descendants.total>0?{h:e.f(o.descendants.list,((s,r,o)=>({a:e.t(s.sort),b:s.avatar||e.unref(t.sheep).$url.static("/static/images/default_avatar.png"),c:e.t(s.username||"昵称:"+s.descNickName),d:e.t(e.unref(a.points2point)(s.residueSocial)),e:e.t(s.socialStatusLevel),f:e.t(1==s.depth?"直推人":""),g:e.t(s.descendantsCount),h:s.id})))}:{i:e.p({text:"暂无团队成员",icon:"/static/data-empty.png"})},{j:e.o((()=>{})),k:o.descendants.total>0},o.descendants.total>0?{l:e.o(i),m:e.p({status:o.loadStatus,"content-text":{contentdown:"点击加载更多"}})}:{},{n:e.p({bgStyle:{backgroundColor:"#ffffff"},title:"",navbar:"normal"})})}},o=e._export_sfc(r,[["__scopeId","data-v-45e71bbf"]]);wx.createPage(o);