2 lines
8.6 KiB
JavaScript
2 lines
8.6 KiB
JavaScript
|
|
import{o as e,f as t,w as l,k as a,p as s,q as r,F as i,j as n,S as c,G as o,T as d,z as u,t as v,m as g,u as h,s as f,g as p,h as A,b as x,r as m,i as w,l as _,U as y}from"./index-Cx-ljvzK.js";import{l as D}from"./logo.DDDG-929.js";import{_ as I}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{h as C}from"./headerHeight.BKcShUBq.js";const k=I({components:{headerHeight:C,SwiperView:I({data:()=>({currentIndex:0,previewMargin:30,list:[{id:1,title:"图片1",image:"/h5/web/assets/cf-xinren-P7qyU-jg.png"},{id:2,title:"图片2",image:"/h5/web/assets/cf-fuhao-CDqf4tHs.png"},{id:3,title:"图片3",image:"/h5/web/assets/cf-xingjue-CXyOLDNy.png"},{id:4,title:"图片4",image:"/h5/web/assets/cf-xinghou-DNdIfz23.png"},{id:5,title:"图片5",image:"/h5/web/assets/cf-xingwang-8aZmaHzo.png"}]}),methods:{switchTo(e){e<0&&(e=this.list.length-1),e>=this.list.length&&(e=0),this.currentIndex=e},onSwiperChange(e){this.currentIndex=e.detail.current},handleClick(e){console.log("点击了第",e+1,"张")}}},[["render",function(v,g,h,f,p,A){const x=d,m=n,w=u,_=c;return e(),t(m,{class:"container"},{default:l((()=>[a(_,{class:"swiper",current:p.currentIndex,onChange:A.onSwiperChange,"previous-margin":p.previewMargin+"px","next-margin":p.previewMargin+"px",circular:!0,autoplay:!1},{default:l((()=>[(e(!0),s(i,null,r(p.list,((s,r)=>(e(),t(w,{key:r,style:{"align-content":"center"}},{default:l((()=>[a(m,{class:o(["swiper-item",{active:p.currentIndex===r}]),onClick:e=>A.handleClick(r)},{default:l((()=>[a(x,{class:"image",src:s.image},null,8,["src"])])),_:2},1032,["class","onClick"])])),_:2},1024)))),128))])),_:1},8,["current","onChange","previous-margin","next-margin"])])),_:1})}],["__scopeId","data-v-39ff74c7"]]),LevelProgress:I({props:{lvList:{type:Array,default:()=>[]},currentIndex:{type:Number,default:()=>0}}},[["render",function(t,l,a,n,c,d){return e(),s("div",{class:"level-container"},[(e(),s("svg",{class:"level-svg",viewBox:"0 0 500 150"},[v("defs",null,[v("filter",{id:"glowFilter"},[v("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"5"}),v("feColorMatrix",{type:"matrix",values:"\n 1 0 0 0 0\n 0 1 0 0 0\n 0 0 1 0 0\n 0 0 0 0.5 0"}),v("feBlend",{in2:"SourceGraphic",mode:"normal"})])]),v("path",{class:"track",d:"M 50 75 \n Q 250 25 450 75"}),(e(!0),s(i,null,r(a.lvList,((t,l)=>(e(),s(i,{key:l},[0===l?(e(),s("circle",{key:0,class:o(t.level===a.currentIndex?"highlight-dot":"normal-dot"),cx:"50",cy:"75",r:"6"},null,2)):g("",!0),1===l?(e(),s("circle",{key:1,class:o(t.level===a.currentIndex?"highlight-dot":"normal-dot"),cx:"250",cy:"50",r:"8",fill:"#fff",style:{filter:"drop-shadow(0 0 8px rgba(255,255,255,1))"}},null,2)):g("",!0),2===l?(e(),s("circle",{key:2,class:o(t.level===a.currentIndex?"highlight-dot":"normal-dot"),cx:"450",cy:"75",r:"6"},null,2)):g("",!0)],64)))),128))])),a.lvList&&a.lvList.length?(e(!0),s(i,{key:0},r(a.lvList,((t,l)=>(e(),s("div",{class:o(["level-text",`text-${l+1}`])},h(`Lv.${t.level}`),3)))),256)):g("",!0)])}],["__scopeId","data-v-deb39de0"]])},data:()=>({logo:D,detailData:null,statusBarHeight:0,errorPage:!0,tabs:[],listData:[],currentIndex:0,levelActiveData:null,levelList:[],levelCurrent:0,nextLevelData:null,currentSelectedLevel:2}),onLoad(e){this.errorPage=!0;const{id:t,type:l,h:a}=e;this.currentIndex=void 0!==l?+l:0,f("token",t),this.statusBarHeight=a,f("BarHeight",a),p("token")&&this.getData()},methods:{getData(){this.levelActiveData=[],this.currentIndex?this.getCharmLevel():this.getWealthLevel()},cutTabPage(e){this.currentIndex=e,this.getData()},async getCharmLevel(){A.get("/api/Level/get_level_rule",{token:p("token")||""}).then((e=>{const{data:t,code:l}=e;l&&(this.detailData=t,this.levelList=t.level.map((e=>({...e,title:e.name}))),this.levelCurrent=t.user.level,this.nextLevelData=t.level.filter((e=>e.level===t.user.level+1)),this.levelActiveData=t.level.filter((e=>e.level===t.user.level))),this.errorPage=!1})).catch((e=>{this.errorPage=!0}))},closeWeb(){const e=x().platform;"ios"===e?window.webkit.messageHandler
|