You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
6.0 KiB

import{r as t,l as e,s as a,q as s,a as o,b as i,c as n,w as c,i as l,o as r,d as p,e as u,u as d,t as m,f as A,g as f,F as y,n as g,h as w,j as h,k as C,m as x,p as k,v as B}from"./index-DkGewvWo.js";import{_ as I}from"./u-navbar.CwZJfInl.js";import{o as v,a as N,r as b}from"./uni-app.es.Bo01BzMV.js";import{_ as S}from"./u-icon.x7ElsZU9.js";import{_ as D}from"./oneBtn.l7bYA2mW.js";import{c as H}from"./car.CcI8AEaV.js";import{a as _,o as L}from"./index.esm.mx2S9eBV.js";import{_ as E}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./u-status-bar.DDNs5qwz.js";const R=E({__name:"index",setup(E){let R=H(),{mapKey:Y}=k;const T=()=>{console.log("11"),console.log(uni.webView),uni.webView.postMessage({data:{action:"goApp"}}),uni.webView.navigateBack()},J=t([{name:"小车",type:"C1/C2/C3",style:"width: 114rpx;height: 61rpx;",icon:new URL("/h5/assets/car4-B-ssq5qs.png",import.meta.url).href,id:"1"},{name:"货车",type:"A2/B2",style:"width: 106rpx;height: 68rpx;",icon:new URL("/h5/assets/car2-DruWO2TW.png",import.meta.url).href,id:"1"},{name:"客车",type:"A1/B1/A3",style:"width: 106rpx;height: 68rpx;",icon:new URL("/h5/assets/car1-BcevCpG2.png",import.meta.url).href,id:"1"},{name:"摩托车",type:"D/E/F",style:"width: 102rpx;height: 73rpx;",icon:new URL("/h5/assets/car3-DPlZfL4O.png",import.meta.url).href,id:"1"}]),O=t("");function Q(){g({url:"/pages/exercises/theoryStudy/theoryStudy"})}async function j(){const{data:t}=await s();let e=t.map((t=>(t.descriptionArr=t.description.split(":"),t)));J.value=e,O.value=t[0]}v((async t=>{let s=t.phone?t.phone:"18267103167",o=t.type?t.type:"1";if(!s)return uni.$u.toast("未查到您的手机号");await async function(t,s){console.log("会执行吗??");const o=await e({username:t,type:s});console.log(o),o.data.phone=t,o.data.type=s,a("loginInfo",o.data)}(s,o),j()})),N((()=>{j().then((()=>{o()})).catch((()=>{o()}))}));let P=[];function U(){w({type:"wgs84",success:function(t){console.log("当前位置的经度:"+t.longitude),console.log("当前位置的纬度:"+t.latitude);L("https://apis.map.qq.com/ws/geocoder/v1/",{key:Y,location:t.latitude+","+t.longitude,output:"jsonp"}).then((t=>{console.log("jsonp",t.result.address_component);let{province:e,city:a,district:s}=t.result.address_component;console.log(e,a,s);let o=P.find((t=>t.cityName==a));if(!o)return uni.$u.toast("获取定位失败,请手动选择城市");R.setCar("city",o.code),R.setCar("cityName",o.cityName),console.log(o,"当前城市")})).catch((()=>{uni.$u.toast("获取定位失败,请手动选择城市")}))},fail(){uni.$u.toast("获取定位失败,请手动选择城市")}})}return function(){let t=_.map((t=>t.cityInfoList.map((t=>({cityName:t.cityName,pinYin:t.cityPinyin,py:t.cityAcronym.toLocaleLowerCase(),code:t.cityCode,cityInitial:t.cityInitial})))));P=t.flat(),console.log(P)}(),(t,e)=>{const a=b(i("up-navbar"),I),s=l,o=b(i("up-icon"),S),g=h,w=b(i("u-icon"),S),k=B,v=b(i("oneBtn"),D);return r(),n(s,{class:"content"},{default:c((()=>[p(a,{title:"选择类型",onLeftClick:T,autoBack:!1}),p(s,{class:"padding"},{default:c((()=>[p(s,{class:"tit"},{default:c((()=>[u("请选择城市")])),_:1}),p(s,{class:"ard_row"},{default:c((()=>[p(s,{class:"leftBox",onClick:U},{default:c((()=>[p(o,{name:"map",size:"20"}),d(R).carInfo.cityName?(r(),n(s,{key:0,class:"text"},{default:c((()=>[u(m(d(R).carInfo.cityName)+" ",1),p(g,{style:{"font-size":"20rpx",color:"blue","margin-left":"10rpx"}},{default:c((()=>[u("(包函当地题库)")])),_:1})])),_:1})):(r(),n(s,{key:1,class:"text"},{default:c((()=>[u("选择城市")])),_:1}))])),_:1}),p(s,{class:"moreBox",onClick:e[0]||(e[0]=e=>t.$goPage("/pages/index/comp/city"))},{default:c((()=>[p(s,{class:"txt"},{default:c((()=>[u("选择城市")])),_:1}),p(w,{name:"arrow-right",color:"#1989FA",size:"14"})])),_:1})])),_:1}),p(s,{class:"tit"},{default:c((()=>[u("请选择需要学习的题库类型")])),_:1}),p(s,{class:"ul"},{default:c((()=>[(r(!0),A(y,null,f(J.value,((t,e)=>(r(),n(s,{class:C(["li",{active:t.id==O.value.id}]),key:e,onClick:e=>function(t){O.value=t,R.setCar("carType",t.carType),R.setCar("carTypeName",t.title)}(t)},{default:c((()=>[t.id==O.value.id?(r(),n(s,{key:0,class:"checkBox"},{default:c((()=>[p(k,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAuCAYAAACYlx/0AAAAAXNSR0IArs4c6QAAA99JREFUaEPtmlvIplMUx39/LtxQKJQrTVEOpUlIDSIhMaiZcRgxOQ0mN2ScbrggY5QSGRMhhiLHSSkpmStckLOSXFGGHHIK+XuX9qfP9z3vu9fznr553+/b9V49/2ft9f/vtdZeez+vWORDi5w/SwIsRcAUKmB7D2AzcDzwC7BD0s1NVKcuBWwfATwHHDKH8OuSTpkrwlQJUMi/BCzrEtgbJUVk/DemRgDbhwLPdn6H98jq7ZJWTp0Atg8u5I+slLTNkjZOlQC2DwSeBk5I1POVkrZPjQCF/FPAiQnyWyWtn5oiaHt/4HHg9AT5LZKunppt0PZ+wJPAqQnyt0m6vRtu4nYB2/sC25Ir35N8iDJRApSwfxQ4I7HymyTdVMNNjAC29wYeA86ukQIaC97E1gDbe5aw/18T00WINPmJSAHbu5V9fk1i5bdJuiiBq7fCtq8pp6lIkzhNPdDG8LCwtp8AMqSiGbpE0p9t5m6sAbZfAM6ZYyhOWOslfddmgkGwtqPgrUvYeBFY05Z8YwrYvh64p8uk7wIXSvo04dRAkE6XtxW4ImEkyK+T9GMCOw8yLwJsh8FelfYH4DRJb/czYeYd2w8DlyWwEZWXSvopgW2ENAnwMnBWwuBaSdGHD3W0IB9pGj78NogDTQLcANydNHqrpDuT2CrM9paoM1UgvAKcL+nnBLYnpE0R7GboEUmXD+qI7TuAWxJ2gnyE/TcJbBXStRNsEYoxyauRs5K+qs7YALD9IHBV4t3XgPMkfZ/ApiA9W2HbNwJ3pSzB+yUnP0zi/4W1mCOKbpD/so39GrZ6FrC9thw9a7bieUTABZLezIBtbwDuT2DfKTn/RQLbClIVoKzSMSXM90lav1hSdHBdh+0rgYcS9j4CVkv6JIFtDUkJUEQ4rHPXHtte7eJxxonrJN3b5JHt2ONjr6+NSKcI+49rwH6fpwUoIsRNTDieOZXFKxEF0aX9PeNgC/Lvla5zJCs/408rAYoIu8d5O7aipOpxCxs7xE7b0ddHf18bH5TefuQtd2sBZq1k3K9vqjEpz98CosnJkP8cOFdSq90k6cc8WN8ClGhYVT5I9Dv/3Pc+A1aNi3xMPpAARYQV5WNkXFMPMnYCJ4+T/FAEKCLEl9i4rzuuTwXiKLti3OSHJkAR4YCyQ5zZUoRfgWMXgvxQBZhVHLNn+XjlL2D5QpEfiQAlGq4F7qtEwh/AUQtJfmQCFBFWA890EeF34OiFJj9SAYoIy4HnOwXyoFlCfAuctCuQH7kARYS9gCiM8YelHcAbnc/UX7cslCODD9wHjMyzMRleEmBMQu+y0yz6CPgH8yknPsjX9ysAAAAASUVORK5CYII=",mode:""})])),_:1})):x("",!0),p(s,{class:"icon"},{default:c((()=>[p(k,{src:t.cover,mode:""},null,8,["src"])])),_:2},1024),p(s,{class:"name"},{default:c((()=>[u(m(t.title),1)])),_:2},1024),(r(!0),A(y,null,f(t.descriptionArr,((t,e)=>(r(),n(s,{class:"carType",key:e},{default:c((()=>[u(m(t),1)])),_:2},1024)))),128))])),_:2},1032,["onClick","class"])))),128))])),_:1}),p(s,{class:"btnBox"},{default:c((()=>[p(v,{text:"确 定",onOneBtnClick:Q})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-4bc3d483"]]);export{R as default};