1 |
- "use strict";const e=require("../../common/vendor.js"),l=require("../../api/index.js"),u={data(){return{scaleInfoNew:{},scaleInfo:{name:""},isCheck:!1,type:null,topimg:"../../static/images/topImg.png",scaleDes:"测一测?",scaleNumber:"43.8W人测试过",scaleimg1:"../../static/images/1.jpg",scaleimg2:"../../static/images/2.jpg",scaleimg3:"../../static/images/3.jpg",flag:"",uid:"",source:"",modalFlag:!1,questionNum:0}},onLoad(){console.log(this.$route.query.flag),console.log(this.$route.query.uid),console.log(this.$route.query.source),this.flag=this.$route.query.flag,this.uid=this.$route.query.uid,this.source=this.$route.query.source,this.selectScale()},methods:{selectScale(){this.$request.get({url:`${l.getScaleTitle}/${this.flag}?uid=${this.uid}&source=${this.source}`,loadingTip:"加载中...",data:{}}).then(r=>{this.questionNum=r.data.questionNum,this.scaleInfo=r.data.subjectEntityDto2List[0],this.scaleInfoNew=r.data.ScaleDetailsEntity})},checkChange(r){r.detail.value.length==0?this.isCheck=!1:this.isCheck=!0},toggle(){this.$refs.popup.open()},close(){this.$refs.popup.close()},agreeFun(){this.modalFlag=!1,e.index.navigateTo({url:`/examWidght/examWidght/index?flag=${this.flag}&uid=${this.uid}&source=${this.source}`})},unAgreeFun(){this.modalFlag=!1},startTest(){console.log(this.isCheck),this.isCheck?e.index.navigateTo({url:`/examWidght/examWidght/index?flag=${this.flag}&uid=${this.uid}&source=${this.source}`}):this.modalFlag=!0},goHistory(){e.index.navigateTo({url:"/paymentPage/queryByPhone/index"})},formatArr(r){return r?JSON.parse(r):[]},formatObj(r){let n=Object.keys(r)[0];return r[n]},getMyjj(r,n){return r?r.split("——")[n]:""}}};if(!Array){const r=e.resolveComponent("uni-icons"),n=e.resolveComponent("uni-popup");(r+n)()}const a=()=>"../../node-modules/@dcloudio/uni-ui/lib/uni-icons/uni-icons.js",f=()=>"../../node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.js";Math||(a+f)();function g(r,n,m,y,t,s){return e.e({a:e.o((...o)=>s.goHistory&&s.goHistory(...o)),b:e.t(t.scaleInfoNew.scaleName),c:e.t(t.scaleInfoNew.testNum),d:e.t(t.scaleInfoNew.evaluationIntroduction),e:e.t(t.questionNum),f:e.t(Math.ceil(t.questionNum*.25)),g:t.questionNum>30},t.questionNum>30?{}:{},{h:t.scaleInfoNew.celebrityAphorism},t.scaleInfoNew.celebrityAphorism?e.e({i:e.t(s.getMyjj(t.scaleInfoNew.celebrityAphorism,0)),j:s.getMyjj(t.scaleInfoNew.celebrityAphorism,1)},s.getMyjj(t.scaleInfoNew.celebrityAphorism,1)?{k:e.t(s.getMyjj(t.scaleInfoNew.celebrityAphorism,1))}:{}):{},{l:e.f(s.formatArr(t.scaleInfoNew.relatedQuestion),(o,i,c)=>({a:e.t(o)})),m:e.t(t.scaleInfoNew.evaluationTheory),n:e.t(t.scaleInfoNew.evaluationTheoryAttention),o:e.f(s.formatArr(t.scaleInfoNew.obtained),(o,i,c)=>({a:e.t(Object.keys(o)[0]),b:e.t(s.formatObj(o))})),p:e.f(s.formatArr(t.scaleInfoNew.suitCrowd),(o,i,c)=>({a:e.t(o)})),q:e.f(s.formatArr(t.scaleInfoNew.reportContent),(o,i,c)=>({a:e.t(i+1),b:e.t(o),c:i<s.formatArr(t.scaleInfoNew.reportContent).length-1})),r:t.scaleInfoNew.reference&&t.scaleInfoNew.reference.length>0},t.scaleInfoNew.reference&&t.scaleInfoNew.reference.length>0?{s:e.f(s.formatArr(t.scaleInfoNew.reference),(o,i,c)=>({a:e.t(i+1),b:e.t(o)}))}:{},{t:e.o((...o)=>s.checkChange&&s.checkChange(...o)),v:e.o(o=>s.toggle()),w:e.o(o=>s.startTest()),x:e.o(o=>s.close()),y:e.p({type:"clear",size:"30"}),z:e.o(o=>s.close()),A:e.sr("popup","8e07d3cc-0"),B:e.p({type:"bottom",["background-color"]:"#fff"}),C:e.o(o=>s.toggle()),D:e.o(o=>s.agreeFun()),E:e.o(o=>s.unAgreeFun()),F:t.modalFlag})}const h=e._export_sfc(u,[["render",g],["__file","E:/psy_web_share/pages/index/index.vue"]]);tt.createPage(h);
|