1 |
- import{d,e as r,s as u,i as t,x as h,B as l,A as i,C as m,aT as f,F as p,$ as g}from"./index.7994470a.js";import{C as _}from"./index.9cdb5783.js";import{C as c}from"./index.777f4790.js";import{I as n}from"./index.2fbdc579.js";import{L as w}from"./index.ec643df3.js";import{C}from"./index.895996db.js";import{U as y}from"./index.89f739a7.js";import{C as b}from"./index.c5bf3ab5.js";import"./use-tab-status.00d7316c.js";import"./index.570461cd.js";import"./index.f9e55fe3.js";import"./index.80389b79.js";import"./index.29eb1675.js";import"./index.c9af17c2.js";import"./index.3dd26d27.js";import"./use-id.117b75b2.js";import"./icon_checkbox_default.2fe5d57e.js";import"./index.a241f507.js";import"./index.0a2aeb2c.js";import"./use-height.ffa5a0f3.js";const A="_cellGroup_1m609_1",v="_image_1m609_7",B="_title_1m609_13",F="_label_1m609_19",S="_cellTitle_1m609_23",E="_button_1m609_28",D="_popup_1m609_32",G="_popupContainer_1m609_38",R="_cert_1m609_41",L="_award_1m609_46",T="_btnGroup_1m609_63",k="_lastBtn_1m609_67",x="_btnMore_1m609_76";var s={cellGroup:A,image:v,title:B,label:F,cellTitle:S,button:E,popup:D,popupContainer:G,cert:R,award:L,btnGroup:T,lastBtn:k,btnMore:x},I="./assets/award.2f8938c1.png",U="./assets/cert.7f558e5e.png";function M(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!g(a)}var it=d({name:"award-activity",data(){return{status:!1,type:"auth",list:[],dataShow:!0,loading:!1,finished:!1,params:{page:1,rows:20},exists:!1,popupShow:!1,receiveRewardId:null}},async mounted(){this.getList()},methods:{async getUserRegisterProtocol(){try{const a=await r.get(u.platformApi+"/sysUserContractRecord/checkContractSign",{params:{contractType:"REGISTER"}});this.exists=a.data}catch{}},async onGetAward(){try{await r.post(`${u.platformApi}/activity/receiveReward/${this.receiveRewardId}`),this.status=!0,this.type="success",this.receiveRewardId=null}catch{}},async onAuthSuccess(){this.popupShow=!1,this.status=!1,await this.getUserRegisterProtocol(),this.onGetAward()},async getList(){try{const a=this.params,e=await r.post(`${u.platformApi}/activity/receiveRewardList`,{data:{...a}});this.loading=!1;const o=e.data||{};if(this.list.length>0&&o.pageNo===1)return;this.list=this.list.concat(o.rows||[]),this.finished=o.pageNo>=o.totalPage,this.params.page=o.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}}},render(){let a;return t("div",{class:s.award},[t(b,null,null),this.dataShow?t(w,{class:s.videoList,loading:this.loading,"onUpdate:loading":e=>this.loading=e,finished:this.finished,finishedText:" ",immediateCheck:!1,onLoad:this.getList},M(a=this.list.map(e=>t(_,{inset:!0,class:s.cellGroup},{default:()=>[t(c,null,{icon:()=>t(n,{src:e.imgUrl,class:s.image},null),title:()=>t("div",{class:s.title},[e.rewardName]),label:()=>t("div",{class:s.label},[e.rewardDescribe])}),t(c,{center:!0,title:`\u83B7\u5956\u65F6\u95F4\uFF1A${h(e.winningTime).format("YYYY-MM-DD")}`,titleClass:s.cellTitle},{value:()=>t(l,{color:"linear-gradient(180deg, #FF8636 0%, #FF4E19 100%)",size:"small",class:s.button,onClick:()=>{this.receiveRewardId=e.receiveRewardId,this.onGetAward()}},{default:()=>[i("\u7ACB\u5373\u9886\u53D6")]})})]})))?a:{default:()=>[a]}):t(m,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u6570\u636E"},null),t(f,{show:this.status,"onUpdate:show":e=>this.status=e,class:s.popup},{default:()=>[t("div",{class:s.popupContainer},[this.type==="auth"&&t(p,null,[t(n,{src:U,class:s.cert},null),t("h3",null,[i("\u60A8\u8FD8\u6CA1\u6709\u5B9E\u540D\u8BA4\u8BC1")]),t("p",null,[i("\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u5373\u53EF\u9886\u53D6\u5956\u54C1")]),t("div",{class:[s.btnGroup,s.btnMore]},[t(l,{type:"primary",block:!0,class:s.lastBtn,onClick:()=>{this.status=!1}},{default:()=>[i("\u4EE5\u540E\u518D\u8BF4")]}),t(l,{type:"primary",block:!0,color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:()=>{this.popupShow=!0}},{default:()=>[i("\u7ACB\u5373\u8BA4\u8BC1")]})])]),this.type==="success"&&t(p,null,[t(n,{src:I,class:s.award},null),t("h3",null,[i("\u5956\u54C1\u9886\u53D6\u6210\u529F\uFF01")]),t("p",null,[i("\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u6D3B\u52A8\u5956\u54C1\u5C06\u4F1A\u5230\u8FBE\uFF5E")]),t("div",{class:[s.btnGroup]},[t(l,{type:"primary",block:!0,color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:()=>{this.status=!1,this.list=[],this.params.page=1,this.getList()}},{default:()=>[i("\u6211\u77E5\u9053\u4E86")]})])])])]}),t(C,{modelValue:this.popupShow,"onUpdate:modelValue":e=>this.popupShow=e},{default:()=>[t(y,{exists:this.exists,onSuccess:this.onAuthSuccess},null)]})])}});export{it as default};
|