index.vue 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511
  1. <template>
  2. <view>
  3. <ujp-navbar title="首页" :show="false"></ujp-navbar>
  4. <view class="u-navbar-placeholder" v-show="flag&&newsList.length > 0" style="width: 100%; height: 68rpx;"></view>
  5. <!-- 头部图片 -->
  6. <view :class="indexStyle.backgroundClass">
  7. <view class="backgroundClass">
  8. <!-- 新闻 -->
  9. <view class=" options-item" v-show="flag&&newsList.length > 0">
  10. <!-- ////@click="toNewsArticleDetails" -->
  11. <ujp-notice-bar @click="toNewsArticleDetails" :color="indexStyle.noticeBarColor"
  12. :bgColor="indexStyle.noticeBarBgColor" :list="newsList"></ujp-notice-bar>
  13. </view>
  14. <view class="banner" v-if="bannerList.length">
  15. <u-swiper bg-color="#fff" :img-mode="'scaleToFill'" :list="bannerList" @click="clickBanner"
  16. :name="'picUrl'">
  17. </u-swiper>
  18. </view>
  19. <!-- 选项列表 -->
  20. <view :class="{
  21. 'option-list-spring':indexStyle.spring,
  22. 'option-list':!indexStyle.spring
  23. }"
  24. >
  25. <view class="list-item" @click="getScanCode">
  26. <view class="icon " v-if="indexStyle.spring">
  27. <img src="@/assets/img/spring/riFill-qr-scan-2-fill.svg">
  28. </view>
  29. <view v-else class="icon ">
  30. <img src="@/assets/img/spring/index1.png">
  31. </view>
  32. <view class="text ">
  33. 扫码充电
  34. </view>
  35. </view>
  36. <view class="list-item" @click="fastRecharge">
  37. <view class="icon " v-if="indexStyle.spring">
  38. <img src="@/assets/img/spring/riFill-wallet-3-fill.svg">
  39. </view>
  40. <view v-else class="icon ">
  41. <img src="@/assets/img/spring/index2.png">
  42. </view>
  43. <view class="text ">
  44. 快速充值
  45. </view>
  46. </view>
  47. <view class="list-item" @click="chargingRecord">
  48. <view class="icon " v-if="indexStyle.spring">
  49. <img src="@/assets/img/spring/riFill-todo-fill.svg">
  50. </view>
  51. <view v-else class="icon ">
  52. <img src="@/assets/img/spring/index3.png">
  53. </view>
  54. <view class="text " oldstyle="font-size: 18px;">
  55. 充电记录
  56. </view>
  57. </view>
  58. <view class="list-item" @click="toSearchPile">
  59. <view class="icon " v-if="indexStyle.spring">
  60. <img src="@/assets/img/spring/riFill-road-map-fill.svg">
  61. </view>
  62. <view v-else class="icon ">
  63. <img src="@/assets/img/spring/index4.png">
  64. </view>
  65. <view class="text " oldstyle="font-size: 18px;">
  66. 附近站点
  67. </view>
  68. </view>
  69. </view>
  70. <!-- 充值活动 -->
  71. <view class=" top-up" v-if="activityList.length > 0 && !activityListShow">
  72. <view class="card-box">
  73. <view class="card" v-for="(item,index) in activityList" :key="item.id"
  74. @click="rechargeActivity(item)">
  75. <img :src="item.picUrl" alt="">
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <u-modal v-model="showOss" class="showOss" :show-title="false" :show-confirm-button="false">
  81. <view class="slot-content">
  82. <u-image width="250px" style="margin: auto;min-height: 250px;" mode="widthFix"
  83. @click="clickBanner(showOssIndex,true)" :src="showOssImg">
  84. <view slot="loading" style="height: 200px;">
  85. <u-loading mode="flower" size="186">
  86. </u-loading>
  87. </view>
  88. </u-image>
  89. <u-image width="36px" style="margin: auto;" mode="widthFix" @click="showOss=false"
  90. src="../../assets/img/if-close-line-circled.png"></u-image>
  91. </view>
  92. </u-modal>
  93. <!-- 专享优惠券 -->
  94. <!--
  95. <view class="couponmain" v-if="false&&bannerListTop[showTopIndex].topmodel=='coupon'">
  96. <view class="main">
  97. <view class="exclusive">
  98. <p class="exclusive1">恭喜你</p>
  99. <p class="exclusive2">获得{{bannerListTop[showTopIndex].value}}元月卡卷</p>
  100. <view class="img">
  101. <img src="../../assets/img/Frame915.png" alt="">
  102. <view class="num">
  103. {{bannerListTop[showTopIndex].value}}<span class="unit">元</span>
  104. </view>
  105. <view class="unit2">月卡优惠券</view>
  106. <view class="ticket-info">
  107. <view class="ticket-name">
  108. {{bannerListTop[showTopIndex].text}}
  109. </view>
  110. </view>
  111. </view>
  112. <view class="exclusive-text"> 持月卡在指定站点充电,充电服务费全免</view>
  113. <button class="exclusive-btn" @click="clickBannerTop()" shape="circle">立即开通</button>
  114. </view>
  115. </view>
  116. </view> -->
  117. <u-modal v-model="showTop" v-if="getBannerInfoTopBl" class="showOss" :show-title="false"
  118. :show-confirm-button="false">
  119. <view class="slot-content">
  120. <swiper class="swiper" circular :indicator-dots="bannerListTop.length+(showNt?1:0)!=1" :autoplay="true" :interval="2500"
  121. :duration="500">
  122. <swiper-item class="swiperitem" v-if="showNt">
  123. <u-image width="600" style="margin: auto;min-height: 250px;" mode="widthFix"
  124. v-show="showNtStep==0" src="@/assets/img/nt/f5surprised-1.png">
  125. <view slot="loading" style="height: 200px;">
  126. <u-loading mode="flower" size="186">
  127. </u-loading>
  128. </view>
  129. </u-image>
  130. <view style="color: #ecc07d;
  131. font-size: 64rpx;
  132. position: relative;
  133. top: -220rpx;
  134. right: -100rpx; width: 400rpx;" @click="showNtStepClick" v-show="showNtStep==0">
  135. <span>.</span>
  136. </view>
  137. <u-image width="600" height="700" style="margin: auto;;min-height: 250px;"
  138. mode="scaleToFill" v-show="showNtStep==1" src="@/assets/img/nt/f5surprised-2.png">
  139. </u-image>
  140. <u-image width="600" style="margin: auto;min-height: 250px;" mode="widthFix"
  141. v-show="showNtStep==2" src="@/assets/img/nt/nt-activity-3.png">
  142. </u-image>
  143. <u-image width="500" style="color: #FFFFFF;
  144. font-size: 64rpx;
  145. position: relative;
  146. top: -540rpx;
  147. right: -60rpx;height: 0;
  148. " mode="widthFix" v-show="showNtStep==2" src="@/assets/img/nt/f5surprised-3.png">
  149. </u-image>
  150. <view style="color: #ecc07d;
  151. font-size: 72rpx;
  152. position: relative;
  153. top: -180rpx;
  154. right: -144rpx; width: 310rpx;" @click="showNtStepClick" v-show="showNtStep==2">
  155. <span>.</span>
  156. </view>
  157. <view style="color: #FFFFFF;
  158. font-size: 64rpx;
  159. position: relative;
  160. top: -528rpx;
  161. right: -80rpx;" :style="{
  162. right:showNtValue>99?'-80rpx':(showNtValue>9?'-95rpx':'-110rpx')
  163. }" v-show="showNtStep==1"><b>{{showNtValue}}</b>
  164. <span style="font-size: 28rpx;">元</span>
  165. </view>
  166. <view style="color: #ecc07d;
  167. font-size: 72rpx;
  168. position: relative;
  169. top: -270rpx;
  170. right: -144rpx; width: 310rpx;" @click="showNtStepClick" v-show="showNtStep==1">
  171. <span>.</span>
  172. </view>
  173. </swiper-item>
  174. <swiper-item class="swiperitem" v-for="(item,i) in bannerListTop" :key="i">
  175. <u-image width="500" height="500" bgColor="#ff000000"
  176. style="margin: auto;min-height: 250px;" mode="widthFix" @click="clickBannerTopI(i)"
  177. :src="item.picUrl">
  178. <view slot="loading" style="height: 200px;">
  179. <u-loading mode="flower" size="186">
  180. </u-loading>
  181. </view>
  182. </u-image>
  183. </swiper-item>
  184. </swiper>
  185. <u-image width="36px" style="margin: auto; margin-top: 10px;" mode="widthFix" @click="showTop=false"
  186. src="../../assets/img/if-close-line-circled.png"></u-image>
  187. </view>
  188. </u-modal>
  189. <!-- 模式选择 -->
  190. <u-mask :show="show">
  191. <view class="wrap">
  192. <view class="shema" @tap.stop>
  193. <view class="title">
  194. 设置浏览模式
  195. </view>
  196. <view class="">
  197. <u-radio-group v-model="value">
  198. <u-radio v-for="(item, index) in list" :key="index" :name="item.name"
  199. :disabled="item.disabled" active-color="#00B962">
  200. {{item.name}}
  201. <p v-if="item.name == '长辈模式'">字体更大 看的清楚</p>
  202. <p v-if="item.name == '标准模式'">信息丰富 功能全面</p>
  203. </u-radio>
  204. </u-radio-group>
  205. </view>
  206. <view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
  207. <view class="btn-box">
  208. <u-button class="choice-btn" type="success" shape="circle"
  209. @click="elderClick">我选好了</u-button>
  210. </view>
  211. </view>
  212. </view>
  213. </u-mask>
  214. <!-- <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  215. <view class="img-box">
  216. <view class="img-1" v-for="(item,index) in activityList" :key="item.id"
  217. @click="rechargeActivity(item)">
  218. <img :src="item.picUrl" alt="">
  219. </view>
  220. </view> -->
  221. </view>
  222. <!-- 最新活动 -->
  223. <view class=" top-up" v-if="activityList.length > 0 && activityListShow">
  224. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  225. <view class="img-box2">
  226. <view class="left-image" :style="{backgroundImage: 'url(' + activityDateList.picUrl + ')'}"
  227. @click="rechargeActivity(activityDateList)">
  228. <p>{{activityDateList.name}}</p>
  229. <view class="time-activities">
  230. 距活动结束仅剩 <text class="time">{{description}}</text>
  231. </view>
  232. </view>
  233. <view class="right-image">
  234. <img class="margin-bottom" v-for="(item,index) in activityList" :key="item.id"
  235. @click="rechargeActivity(item)" :src="item.narrowUrl" alt="">
  236. <!-- <img class="margin-bottom" src="../../assets/img/topup2.png" alt="" @click="rechargeActivity(0)">
  237. <img class="margin-bottom" src="../../assets/img/topup3.png" alt="" @click="rechargeActivity(1)"> -->
  238. </view>
  239. </view>
  240. </view>
  241. <template v-if="message == 'getLocation:ok' && stationList.length != 0 && chargeList.length == 0">
  242. <view class=" top-up">
  243. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>附近站点
  244. <view class="pack-up" v-show="!listShow" @click="listShow=true">
  245. 收起<text class="iconfont">&#xe607;</text>
  246. </view>
  247. <view class="pack-up" v-if="listShow" @click="listShow=false">
  248. 展开<text class="iconfont">&#xe62c;</text>
  249. </view>
  250. </view>
  251. </view>
  252. <!-- 附近站点 -->
  253. <template v-for="(stationData,i) in stationList">
  254. <view class="station" :key="i+'abc'" v-show="!listShow||i==0"
  255. @click="gotoStationDetails(stationData)">
  256. <view class="head">
  257. <view class="title oldTextjp" oldstyle="font-size: 20px;">
  258. {{stationData.name}}
  259. </view>
  260. <view class="distance ">
  261. <text class="iconfont"
  262. style="color:#666666">&#xe615;</text>{{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}}
  263. </view>
  264. </view>
  265. <view v-if="quickChargeReduceMethod1(stationData)&&personInfo&&personInfo.userType==2"
  266. style="margin-top: 10rpx;color: rgba(255, 121, 0, 1);font-size: 28rpx; display: flex; align-items: center;" >
  267. <span style="color: #fff;background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  268. border-radius: 4px;
  269. padding: 0rpx 10rpx;
  270. margin-right: 8rpx;
  271. font-size: 24rpx;
  272. line-height:40rpx;
  273. " >活动</span>
  274. 快充订单满{{stationData.quickChargeDegree}}度服务费{{discountRatio10(stationData.quickChargeDiscountRatio)}}折
  275. </view>
  276. <view v-if="quickChargeReduceMethod2(stationData)&&personInfo&&personInfo.userType==2"
  277. style="margin-top: 10rpx;color: rgba(255, 121, 0, 1);font-size: 28rpx; display: flex; align-items: center;" >
  278. <span style="color: #fff;background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  279. border-radius: 4px;
  280. padding: 0rpx 10rpx;
  281. margin-right: 8rpx;
  282. font-size: 24rpx;
  283. line-height:40rpx;
  284. " >活动</span>
  285. 喜迎国庆,充电有奖
  286. </view>
  287. <view class="sign" v-if="stationData.stationType==50">
  288. <view class="sign-tag sign-0" v-if="stationData.isRecommend">推荐</view>
  289. <view class="sign-tag sign-5" v-if="stationData.isAlways">常用</view>
  290. <view class="sign-tag sign-6" v-if="stationData.isSpecial">特价</view>
  291. {{stationData.address}}
  292. </view>
  293. <view class="sign" v-else>
  294. <view class="sign-tag sign-0" v-if="stationData.isRecommend">推荐</view>
  295. <view class="sign-tag sign-5" v-if="stationData.isAlways">常用</view>
  296. <view class="sign-tag sign-6" v-if="stationData.isSpecial">特价</view>
  297. <!-- -->
  298. <view class="sign-1"
  299. v-if="stationData.giveDiscount&&stationData.discountRatio&&stationData.discountRatio!=100">
  300. 会员{{discountRatio10(stationData.discountRatio)}}折</view>
  301. <view class="sign-3" v-if="stationData.category=='超充'">160kW超充站</view>
  302. <view class="sign-4" v-if="stationData.nightLowPriceEnabled">
  303. 夜间超低价</view>
  304. <view class="sign-2" v-if="stationData.platformType==1">自营站</view>
  305. <view class="sign-2" v-if="stationData.tagList.length != 0"
  306. v-for="(tagName,tagIndex) in stationData.tagList" :style="'border: 1px solid '+tagNameBy(tagName,1)+';color:'+tagNameBy(tagName,1)"
  307. :key="tagIndex">{{tagNameBy(tagName,0)}}</view>
  308. </view>
  309. <view class="price-free oldTextClass">
  310. <view class="price" v-if="personInfo&&personInfo.userType==2">
  311. <view class="price-1">
  312. <text class="num">
  313. {{!stationData.giveDiscount ? (stationData.electricityPrice+stationData.servicePrice).toFixed(2)
  314. : (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  315. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  316. </view>
  317. <view class="price-2 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  318. <text
  319. class="num">{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  320. <text class="unit ">元/度</text>
  321. </view>
  322. </view>
  323. <!-- 游客价格-->
  324. <view class="price" v-else>
  325. <view class="price-1">
  326. <text class="num">
  327. {{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  328. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  329. </view>
  330. <view class="price-3 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  331. <text class="num1">会员</text>
  332. <text
  333. class="num">{{ (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  334. <text class="unit ">元/度</text>
  335. </view>
  336. </view>
  337. <view class="free">
  338. <view class="fast" v-if="stationData.fastNum">
  339. <view class="fast-font">
  340. </view>
  341. <view class="num">
  342. {{stationData.fastAvailableNum}}
  343. </view>
  344. <view class="num1">
  345. /{{stationData.fastNum}}
  346. </view>
  347. </view>
  348. <view class="slow oldTextjp2" oldstyle="margin-left: 1px;" v-if="stationData.slowNum">
  349. <view class="slow-font">
  350. </view>
  351. <view class="num">
  352. {{stationData.slowAvailableNum}}
  353. </view>
  354. <view class="num1">
  355. /{{stationData.slowNum}}
  356. </view>
  357. </view>
  358. </view>
  359. </view>
  360. </view>
  361. <view class="piccBanner" v-for="(itemJNT,index ) in bannerListJNT" @click="gotoUrl2(itemJNT.linkUrl)"
  362. :key="i+'_'+index" style="
  363. text-align: center;
  364. padding: 4px 16px;
  365. margin-top: 8px; " v-show="index==0"
  366. v-if="(stationList.length<=2&&stationList.length-1==i)||(stationList.length>2&&i==1)">
  367. <image :src="itemJNT.picUrl" style="height: 204rpx;width: 100%;border-radius: 10px;"></image>
  368. </view>
  369. </template>
  370. <view class="bottom" @click="searchStationData(true)" v-if="recordsTotal2!=stationList.length">
  371. <view class="bot">
  372. <view class="bot-line"></view>
  373. <view class="bot-text " style="color: #00B962;">点击查看更多站点</view>
  374. <view class="bot-line"></view>
  375. </view>
  376. </view>
  377. <view class="bottom" v-else>
  378. <view class="bot">
  379. <view class="bot-line"></view>
  380. <view class="bot-text " style="color: #00B962;">已经到底了</view>
  381. <view class="bot-line"></view>
  382. </view>
  383. </view>
  384. </template>
  385. <template v-if="loading&&message == 'getLocation:ok' && stationList.length == 0 && chargeList.length == 0">
  386. <view class="location-box">
  387. <view class="location">
  388. <view class="location-text">
  389. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  390. {{loading?'查询失败':'加载中'}}
  391. </view>
  392. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  393. {{loading?'未查询到可用的站点':'正在为你查找附近的站点'}}
  394. </view>
  395. <view class="text-3 oldTextjp2" v-if="loading" oldstyle="font-size: 16px;"
  396. @click="toSearchPile">
  397. 去找桩
  398. </view>
  399. </view>
  400. <view class="img-box">
  401. <img src="@/assets/static/img/暂无网络信号-缺省页 1.png">
  402. </view>
  403. </view>
  404. </view>
  405. </template>
  406. <!-- 定位 -->
  407. <view class="location-box"
  408. v-if="message != 'getLocation:ok' && stationList.length == 0 && chargeList.length == 0">
  409. <view class="location">
  410. <view class="location-text">
  411. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  412. 定位中...
  413. </view>
  414. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  415. 授权定位后可查询附近充电站
  416. </view>
  417. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;" @click="getPoint()">
  418. 重新定位
  419. </view>
  420. </view>
  421. <view class="img-box">
  422. <img src="@/assets/static/img/暂无网络信号-缺省页 1.png">
  423. </view>
  424. </view>
  425. </view>
  426. <!-- 附近站点 -->
  427. <view class="station" v-for="(stationData,i) in defaultStation" :key="i"
  428. v-if="stationList.length == 0 && chargeList.length == 0"
  429. @click="gotoStationDetails(stationData)">
  430. <view class="head">
  431. <view class="title oldTextjp" oldstyle="font-size: 20px;">
  432. {{stationData.name}}
  433. </view>
  434. <view class="distance " v-if="false">
  435. <text class="iconfont"
  436. style="color:#666666">&#xe615;</text>{{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}}
  437. </view>
  438. </view>
  439. <view v-if="quickChargeReduceMethod1(stationData)&&personInfo&&personInfo.userType==2"
  440. style="margin-top: 10rpx;color: rgba(255, 121, 0, 1);font-size: 28rpx; display: flex; align-items: center;" >
  441. <span style="color: #fff;background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  442. border-radius: 4px;
  443. padding: 0rpx 10rpx;
  444. margin-right: 8rpx;
  445. font-size: 24rpx;
  446. line-height:40rpx;
  447. " >活动</span>
  448. 快充订单满{{stationData.quickChargeDegree}}度服务费{{discountRatio10(stationData.quickChargeDiscountRatio)}}折
  449. </view>
  450. <view v-if="quickChargeReduceMethod2(stationData)&&personInfo&&personInfo.userType==2"
  451. style="margin-top: 10rpx;color: rgba(255, 121, 0, 1);font-size: 28rpx; display: flex; align-items: center;" >
  452. <span style="color: #fff;background: linear-gradient(93.02deg, rgba(255,121,0,1) 39.4%,rgba(255,174,0,1) 93.51%);
  453. border-radius: 4px;
  454. padding: 0rpx 10rpx;
  455. margin-right: 8rpx;
  456. font-size: 24rpx;
  457. line-height:40rpx;
  458. " >活动</span>
  459. 喜迎国庆,充电有奖
  460. </view>
  461. <view class="sign">
  462. <view class="sign-tag sign-0">推荐</view>
  463. <!-- -->
  464. <view class="sign-1"
  465. v-if="stationData.giveDiscount&&stationData.discountRatio&&stationData.discountRatio!=100">
  466. 会员{{discountRatio10(stationData.discountRatio)}}折</view>
  467. <view class="sign-3" v-if="stationData.category=='超充'">160kW超充站</view>
  468. <view class="sign-4" v-if="stationData.nightLowPriceEnabled">
  469. 夜间超低价</view>
  470. <view class="sign-2" v-if="stationData.platformType==1">自营站</view>
  471. <view class="sign-2" v-if="stationData.tagList.length != 0"
  472. v-for="(tagName,tagIndex) in stationData.tagList" :style="'border: 1px solid '+tagNameBy(tagName,1)+';color:'+tagNameBy(tagName,1)"
  473. :key="tagIndex">{{tagNameBy(tagName,0)}}</view>
  474. </view>
  475. <view class="price-free oldTextClass">
  476. <view class="price" v-if="personInfo&&personInfo.userType==2">
  477. <view class="price-1 ">
  478. <text class="num">
  479. {{!stationData.giveDiscount ? (stationData.electricityPrice+stationData.servicePrice).toFixed(2)
  480. : (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  481. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  482. </view>
  483. <view class="price-2 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  484. <text class="num">{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  485. <text class="unit ">元/度</text>
  486. </view>
  487. </view>
  488. <!-- 游客价格-->
  489. <view class="price" v-else>
  490. <view class="price-1">
  491. <text class="num">
  492. {{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  493. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  494. </view>
  495. <view class="price-3 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  496. <text class="num1">会员</text>
  497. <text
  498. class="num">{{ (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  499. <text class="unit ">元/度</text>
  500. </view>
  501. </view>
  502. <view class="free">
  503. <view class="fast" v-if="stationData.fastNum">
  504. <view class="fast-font">
  505. </view>
  506. <view class="num">
  507. {{stationData.fastAvailableNum}}
  508. </view>
  509. <view class="num">
  510. /{{stationData.fastNum}}
  511. </view>
  512. </view>
  513. <view class="slow oldTextjp2" oldstyle="margin-left: 1px;" v-if="stationData.slowNum">
  514. <view class="slow-font">
  515. </view>
  516. <view class="num">
  517. {{stationData.slowAvailableNum}}
  518. </view>
  519. <view class="num1">
  520. /{{stationData.slowNum}}
  521. </view>
  522. </view>
  523. </view>
  524. </view>
  525. </view>
  526. <view class="piccBanner" v-for="(itemJNT,index ) in bannerListJNT" :key="'a_'+index" v-show="index==0"
  527. v-if="stationList.length == 0 && chargeList.length == 0" @click="gotoUrl2(itemJNT.linkUrl)" style="
  528. text-align: center;
  529. padding: 4px 16px;
  530. margin-top: 8px; ">
  531. <image :src="itemJNT.picUrl" style="height: 204rpx;width: 100%;border-radius: 10px;"></image>
  532. </view>
  533. <!-- 新闻 -->
  534. <view class="news-title news-title2" v-if="chargeList.length > 0">
  535. <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
  536. <view class="line" style="margin-top:4px;"></view>充电车辆
  537. <view class="lineBox" v-if="chargeList.length > 1">{{chargeList.length }}</view>
  538. </view>
  539. <view class="more oldTextjp2" oldstyle="font-size:16px;" v-if="chargeList.length > 3" @click="toAll">查看全部
  540. <view class="more-icon iconfont"> &#xe600;</view>
  541. </view>
  542. </view>
  543. <!-- 充电状态 -->
  544. <view class="state1 state" v-if="chargeList.length > 0" v-for="(item,index) in chargeList" v-show="index<3"
  545. :key="item.id" @click="gotoUrl('pages/searchPile/chargeProcess/dcCharging?id=' + item.id)">
  546. <view class="state-text">
  547. <view class="text-5 " oldstyle="font-size: 20px;">
  548. <span v-if="item.carNumber">{{item.carNumber}}</span>
  549. <template v-if="item.status == '0'">
  550. 启动充电中...
  551. </template>
  552. <template v-else-if="item.status == '1'&&item.endSoc">
  553. 充电中 {{item.endSoc}}%
  554. </template>
  555. <template v-else>
  556. {{item.statusText}}...
  557. </template>
  558. </view>
  559. <view v-if="item.status == '0'" class="text-21 " oldstyle="font-size: 16px;">
  560. 启动中
  561. </view>
  562. <view v-if="item.status == '1'" class="show20240403Main " >
  563. <view class="show20240403" style="margin-right: 16rpx;" >已充电
  564. <span
  565. class="text-21"> {{getPercent(item)}}</span>
  566. </view>
  567. <view class="show20240403" >预计费用
  568. <span class="text-22">{{item.dueFee != null ? item.dueFee.toFixed(2) : '0.00'}}元</span>
  569. </view>
  570. </view>
  571. <!-- <view v-if="item.status == '2'" class="text-2" style="color: red;">
  572. 超出时间将收取占位费
  573. </view> -->
  574. <view v-if="item.status == '4'" class="text-21 " >
  575. <span v-if="item.waitNum==1">请耐心等待</span>
  576. <span v-else>前方等待{{item.waitNum-1}}位</span>
  577. </view>
  578. <view class="text-4 " oldstyle="font-size: 16px;">
  579. <!-- {{item.deviceName}}枪{{channelNoShow(item.channelNo,item.manufacturer,item.customNo)}}/{{item.stationName}}<br /> -->
  580. 当前电价<span class="text-4-span " > {{item.chargingCostPrice.toFixed(2)}}</span>元/度 起
  581. <!-- <p ></p> -->
  582. </view>
  583. </view>
  584. <view class="img-box4">
  585. <img v-if="item.status == '0'" src="@/assets/static/img/等待中-缺省页.png">
  586. <img v-if="item.status == '1'" src="@/assets/static/img/充电中-缺省页.png">
  587. <img v-if="item.status == '2'" src="@/assets/static/img/已充满-缺省页.png">
  588. <img v-if="item.status == '4'" src="@/assets/static/img/等待中-缺省页.png">
  589. <view class="img-view">
  590. <view class="more-icon iconfont">查看 &#xe600;</view>
  591. </view>
  592. </view>
  593. </view>
  594. <view class="bottom" v-if="chargeList.length > 3" @click="toAll()">
  595. <view class="bot">
  596. <view class="bot-line"></view>
  597. <view class="bot-text " style="color: #00B962;">点击查看全部充电车辆</view>
  598. <view class="bot-line"></view>
  599. </view>
  600. </view>
  601. <!-- 新闻 -->
  602. <view id="options-item" class="news-title" v-if="newsList.length > 0">
  603. <ujp-notice-bar @click="toNewsArticleDetails" color="#FF3D00" bg-color="#fff"
  604. :list="newsList"></ujp-notice-bar>
  605. </view>
  606. <view class="news-title news-title2" v-if="mallList.length">
  607. <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
  608. <view class="line" style="margin-top:4px;"></view>{{mallTitle}}
  609. </view>
  610. <!-- <view class="more oldTextjp2" oldstyle="font-size:16px;" @click="bhz">
  611. 进入商城<u-icon name="arrow-right"></u-icon>
  612. </view> -->
  613. </view>
  614. <view class="shopList">
  615. <view class="shopItem" v-for="(item,i) in mallList"
  616. @click="gotoUrl('pages/store/commodityDetails?id='+item.id)" :key="i">
  617. <view class="shopItemImg">
  618. <u-image v-if="item.pic" width="308" height="308" :src="item.pic" mode="scaleToFill"></u-image>
  619. <u-image v-else width="308" height="308" src="@/assets/img/chargesite_default.png"></u-image>
  620. </view>
  621. <view class="shopItemNameView">
  622. <view class="shopItemName">
  623. <img v-if="item.own" style="width:52px; height:16px; vertical-align: middle;"
  624. src="@/assets/img/buy/ptzy.png">
  625. {{item.name}}
  626. </view>
  627. <view class="shopItemPrice">
  628. <view class="shopItemPrice1" v-if="item.price">¥{{item.price}}</view>
  629. <view class="shopItemPrice1" style="font-size: 32rpx;" v-else>来电咨询</view>
  630. <view class="shopItemPrice2" v-if="item.price">
  631. <img src="@/assets/img/antOutline-shopping-cart@3x.png" alt="">
  632. </view>
  633. <view class="shopItemPrice2" v-else >
  634. <img src="@/assets/img/arcoDesign-phone@3x.png"
  635. alt="">
  636. </view>
  637. </view>
  638. </view>
  639. </view>
  640. <view @click="bhz" style="width: 100%; text-align: center;
  641. color: #00B962;">
  642. 点击查看全部商品
  643. <u-icon name="arrow-right-double" color="#00B962" size="22"></u-icon>
  644. </view>
  645. </view>
  646. <view class="bottom">
  647. <view class="bot">
  648. <view class="bot-line"></view>
  649. <view class="bot-text oldTextjp2" oldstyle="font-size: 14px;">已经到底了</view>
  650. <view class="bot-line"></view>
  651. </view>
  652. </view>
  653. <!-- 导航栏 -->
  654. <view class="navigation">
  655. <view class="login-prompt" v-if="!userId">
  656. 登录显示更多会员服务
  657. <text class="button" @click="toLogin">登录/注册</text>
  658. </view>
  659. </view>
  660. <view class="slogan-4 " v-show="couponList.length||bannerListTop.length"
  661. @click="showTop=true,getBannerInfoTopBl=true">
  662. <u-icon :class="{
  663. imageshake :couponList.length&&showNtStep==0
  664. }" size="45" name="gift"></u-icon>
  665. </view>
  666. <u-modal v-model="youdianshow"
  667. :show-cancel-button="true"
  668. confirm-text="前往优电联盟"
  669. @confirm="gotoUd"
  670. >
  671. <view class="slot-content" style="padding: 20px;">
  672. 该站点已升级为<span style="color: #63c380;">“优电联盟”</span>充电站,请使用优电联盟平台充电
  673. <br/>
  674. <span style="color: red;font-size: 24rpx;">
  675. <!-- *原51充电联盟会员使用原手机号登录后可共享您的余额、优惠券等账户信息 -->
  676. *与51充电联盟会员共享数据,包括账户余额、优惠卡券等。
  677. </span>
  678. </view>
  679. </u-modal>
  680. <Tabbar :spring="indexStyle.spring" :current="0" ref="tabbarMain" ></Tabbar>
  681. </view>
  682. </template>
  683. <script>
  684. import * as API from '@/apis/index.js'
  685. import * as newsApi from '@/apis/news.js'
  686. import * as WxJsApi from '@/utils/wxJsApi.js'
  687. import * as siteApi from '@/apis/site.js'
  688. import * as loginApi from '@/apis/login.js'
  689. import * as userApi from '@/apis/user.js'
  690. import * as mallApi from '@/apis/mall.js'
  691. import MapLoader from '@/utils/AMap'
  692. import Tabbar from '@/components/Tabbar.vue'
  693. import {
  694. newDate,
  695. currentTimeStamp,
  696. parseUnixTime,
  697. secondsDistance,
  698. hourDistanceArr
  699. } from '@/utils'
  700. export default {
  701. components: {
  702. Tabbar
  703. },
  704. data() {
  705. return {
  706. youdianshow:false,
  707. youdianurl:"",
  708. listShow: false,
  709. stationList: [],
  710. bannerList: [],
  711. bannerListTop: [],
  712. bannerListJNT: [],
  713. timeOut: false,
  714. pointTimeOut: true,
  715. mallList: [],
  716. chargeList: [],
  717. activityList: [],
  718. userId: '',
  719. newsList: [],
  720. pageIndex: 1,
  721. recordsTotal: 0,
  722. longitude: '',
  723. latitude: '',
  724. message: '',
  725. indexLogo: '',
  726. showOss: false,
  727. showOssImg: '',
  728. showOssIndex: '',
  729. loading: false,
  730. showTop: false,
  731. showTopImg: '',
  732. showTopIndex: 0,
  733. mallTitle: "",
  734. getBannerInfoTopBl: true,
  735. newsListData: [],
  736. show: false,
  737. list: [{
  738. name: '长辈模式',
  739. disabled: false
  740. },
  741. {
  742. name: '标准模式',
  743. disabled: false
  744. },
  745. ],
  746. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  747. value: '长辈模式',
  748. elderStatus: false,
  749. fontMode: '',
  750. description: '00:00:00',
  751. activityDate: '',
  752. activityDateList: {},
  753. activityListShow: false,
  754. personInfo: {},
  755. showNt: false,
  756. showNtStep: 0,
  757. showNtValue: 30,
  758. couponList: [],
  759. couponSelect: {},
  760. pageIndex2: 1,
  761. recordsTotal2: 0,
  762. defaultStation: [],
  763. flag: true,
  764. windowHeight: 300,
  765. springShow:false,
  766. indexStyle: {
  767. noticeBarBgColor: "#fff",
  768. noticeBarColor: "#FF3D00",
  769. backgroundClass: "background",
  770. spring: false,
  771. }
  772. }
  773. },
  774. onLoad(op) {
  775. this.findNoLTextConfigure()
  776. this.mallTitle = process.car.branchParameter == "youdian" ? '优电商城' : '51商城'
  777. if (op.jpcode) {
  778. var k = API.codeOperation(op.jpcode)
  779. if (k) {
  780. uni.navigateTo({
  781. url: k
  782. })
  783. }
  784. }
  785. },
  786. onUnload() {
  787. this.timeOut = false;
  788. this.pointTimeOut = false;
  789. },
  790. onHide() {
  791. this.timeOut = false;
  792. this.pointTimeOut = false;
  793. },
  794. onReachBottom() {
  795. // if (this.newsList.length < this.recordsTotal) {
  796. // this.myLoadmore();
  797. // }
  798. },
  799. onShow() {
  800. if (this.$refs.tabbarMain) {
  801. this.$refs.tabbarMain.setcount(0);
  802. }
  803. if (!this.pointTimeOut) {
  804. this.pointTimeOut = true
  805. this.getPointTimeOut();
  806. }
  807. this.getUserInfo();
  808. },
  809. onReady() {
  810. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  811. // //(res)
  812. }).catch(error => {
  813. //(res)
  814. })
  815. this.getBannerInfo("homepage");
  816. this.getBannerInfoTop("home-top");
  817. this.getBannerInfo("JNT", "bannerListJNT");
  818. //this.getBannerInfoTop("home-top");
  819. this.getPointTimeOut();
  820. this.getNewsList();
  821. this.spring()
  822. this.getActivityInfoList();
  823. this.getChargingStationDetail()
  824. this.getMallList()
  825. var _this = this
  826. uni.getSystemInfo({
  827. success: function(res) {
  828. _this.windowHeight = res.windowHeight
  829. }
  830. });
  831. },
  832. onPageScroll(e) {
  833. this.onPageScrollMethod()
  834. },
  835. updated() {
  836. this.onPageScrollMethod()
  837. },
  838. methods: {
  839. gotoStationDetails(stationData){
  840. if(stationData.stationType==50&&stationData.fastNum==0&&stationData.slowNum==1){
  841. this.gotoUrl('pages/searchPile/stationAndPile/chargingPileDetails?isback=1&sid=' + stationData.id)
  842. }else{
  843. this.gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)
  844. }
  845. },
  846. getPercent(chargingRecord) {
  847. if (!chargingRecord.startTime) {
  848. return '00:00:00'
  849. }
  850. var Hour = 0;
  851. var Fen = 0;
  852. var S = 0;
  853. if (chargingRecord.status == 1) {
  854. var second = secondsDistance(newDate(chargingRecord.startTime));
  855. var ms = second;
  856. Hour = parseInt(Math.floor(ms / (60 * 60)));
  857. Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
  858. S = parseInt(Math.floor(ms % (60)));
  859. }
  860. var obj = (Hour > 9 ? "" : "0") + Hour + ":" + (Fen > 9 ? "" : "0") + Fen + ":" + (S > 9 ? "" : "0") + S
  861. return obj;
  862. },
  863. showChargingMinute(estimateMinute) {
  864. var value="";
  865. var ms =estimateMinute
  866. if (ms > 0) {
  867. var Hour = parseInt(Math.floor(ms / 60 ));
  868. var Fen = parseInt(Math.floor(ms % 60 ));
  869. // value = Hour + "小时" + Fen+"分钟"
  870. if(Hour){
  871. value += Hour + "时"
  872. }
  873. if(Fen){
  874. value += Fen+"分"
  875. }
  876. }
  877. return value;
  878. },
  879. findNoLTextConfigure() {
  880. this.spring()
  881. loginApi.findNoLTextConfigure().then((response) => {
  882. this.carhelp.setConfig(response.data.configure)
  883. this.spring()
  884. }).catch(error => {
  885. uni.showToast({
  886. title: error,
  887. icon: "none"
  888. })
  889. })
  890. },
  891. spring() {
  892. this.springShow=false;
  893. try{
  894. if(this.carhelp.getConfig().spring2025){
  895. var spring2025=this.carhelp.getConfig().spring2025
  896. var sz=spring2025.split(',')
  897. if(sz&&sz.length==2){
  898. var time1=new Date(sz[0])
  899. var time2=new Date(sz[1])
  900. var time0=new Date()
  901. if(time0>time1&&time0<time2){
  902. this.springShow=true;
  903. }
  904. }
  905. }
  906. this.$forceUpdate()
  907. }catch(e){
  908. }
  909. if(!this.springShow){
  910. return
  911. }
  912. this.indexStyle.noticeBarBgColor = "#C00000"
  913. this.indexStyle.noticeBarColor = "#FFD695"
  914. this.indexStyle.backgroundClass = "background-spring"
  915. this.indexStyle.spring = true;
  916. if (this.activityList.length) {
  917. this.activityList.forEach(item => {
  918. if (item.clickUrl == '#/pages/discountCard/productDetails') {
  919. var img = require("@/assets/img/spring/activityInfo1.png")
  920. item.picUrl = img
  921. }
  922. if (item.clickUrl == '#/pages/monthlyCardActivity/monthlyCardBuy') {
  923. var img = require("@/assets/img/spring/activityInfo2.png")
  924. item.picUrl = img
  925. }
  926. })
  927. }
  928. },
  929. gotoArticleDetails(item) {
  930. if (item.linkType == "2") {
  931. this.gotoUrl2(item.externalUrl)
  932. } else {
  933. this.gotoUrl('pages/article/articleDetails?id=' + item.id)
  934. }
  935. },
  936. getMallList() {
  937. mallApi.mallList({
  938. pageIndex: 1,
  939. pageSize: 4,
  940. }).then((res) => {
  941. this.mallList = res.data.data;
  942. //uni.hideLoading();
  943. }).catch(error => {
  944. uni.showToast({
  945. title: error,
  946. icon: "none"
  947. })
  948. })
  949. },
  950. onPageScrollMethod() {
  951. const query = uni.createSelectorQuery().in(this);
  952. query.select('#options-item').boundingClientRect(data => {
  953. // console.log("节点离页面顶部的距离为" + data.top);
  954. //console.log(this.windowHeight,e.scrollTop ,data.top)
  955. if (data) {
  956. if (this.windowHeight >= data.top + 80) {
  957. this.flag = false;
  958. } else {
  959. this.flag = true;
  960. }
  961. }
  962. }).exec();
  963. },
  964. getChargingStationDetail() {
  965. var defaultStation = process.car.defaultStation
  966. for (var item in defaultStation) {
  967. siteApi.getChargingStationDetail({
  968. stationId: defaultStation[item]
  969. }).then((res) => {
  970. var station = res.data.station
  971. //this.MapLoaderthen(station)
  972. this.defaultStation.push(station)
  973. }).catch(error => {
  974. uni.showToast({
  975. title: error,
  976. icon: "none"
  977. })
  978. })
  979. }
  980. },
  981. getf5surprised() {
  982. userApi.exchangeGroupDetail("逢5红包").then((res) => {
  983. var message = res.message;
  984. this.couponList = res.data;
  985. if (this.couponList.length) {
  986. var list = res.data;
  987. var x = 0;
  988. for (var i in list) {
  989. var obj = list[i]
  990. if (!obj.probability) {
  991. continue;
  992. }
  993. var end = x + obj.probability;
  994. obj.start = x;
  995. obj.end = end;
  996. x = end;
  997. }
  998. var code = parseInt(Math.random() * x)
  999. // console.log(code)
  1000. // console.log(list)
  1001. var selectObj = null;
  1002. for (var i in list) {
  1003. var obj = list[i]
  1004. if (!obj.probability) {
  1005. continue;
  1006. }
  1007. if (code >= obj.start && code < obj.end) {
  1008. selectObj = obj;
  1009. this.couponSelect = selectObj;
  1010. break
  1011. }
  1012. }
  1013. if (selectObj) {
  1014. this.showNt = true
  1015. this.showTop = true;
  1016. this.showNtStep = 0;
  1017. this.showNtValue = this.couponSelect.totalDiscount
  1018. } else {
  1019. //this.getBannerInfoTop("home-top");
  1020. }
  1021. //console.log(selectObj)
  1022. // this.exchangeDetailF5(selectObj.key);
  1023. } else if (message == '1001') { //
  1024. //周五,但是因为手里有卷, 所以不能抽
  1025. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  1026. var time = this.carhelp.get("getf5surprised-time");
  1027. if ((time && nowtime == time)) {
  1028. //this.getBannerInfoTop("home-top");
  1029. } else {
  1030. this.carhelp.set("getf5surprised-time", nowtime);
  1031. }
  1032. this.showNt = true
  1033. this.showTop = true;
  1034. this.showNtStep = 2;
  1035. } else {
  1036. //this.getBannerInfoTop("home-top");
  1037. }
  1038. }).catch(error => {
  1039. uni.showToast({
  1040. title: error,
  1041. icon: "none"
  1042. })
  1043. })
  1044. },
  1045. getNewYear() {
  1046. //var obj=this.carhelp.get("newyear_activity2023-2-15")
  1047. //
  1048. var sz = ["1615623336912621591", "1615623336912621590"];
  1049. var code = parseInt(Math.random() * 2)
  1050. this.carhelp.set("newyear_activity2023-2-15", {
  1051. nt: sz[code],
  1052. code: code,
  1053. status: 0
  1054. })
  1055. //先查询另一个领取过没
  1056. userApi.exchangeDetail({
  1057. key: sz[code == 0 ? 1 : 0]
  1058. }).then((res) => {
  1059. if (!res.data.enabled) {
  1060. if (res.data.code == 2) {
  1061. //未开始
  1062. } else {
  1063. //已经结束
  1064. }
  1065. //this.getBannerInfoTop("home-top");
  1066. } else if (res.data.status == 1) {
  1067. //this.getBannerInfoTop("home-top");
  1068. //已经兑换,或者不能兑换
  1069. } else if (res.data.status == 2) {
  1070. // this.showNtValue=res.data.totalDiscount
  1071. this.exchangeDetail(sz[code]);
  1072. } else {
  1073. //res.data.status==0
  1074. //this.showNtValue=res.data.totalDiscount
  1075. this.exchangeDetail(sz[code], sz[code == 0 ? 1 : 0]);
  1076. }
  1077. }).catch(error => {
  1078. //this.showNt = false;
  1079. uni.showToast({
  1080. title: error,
  1081. icon: "none"
  1082. })
  1083. })
  1084. },
  1085. exchangeDetail(exchangeCode, code2) {
  1086. uni.showLoading({
  1087. title: "加载中",
  1088. mask: true,
  1089. })
  1090. userApi.exchangeDetail({
  1091. key: exchangeCode
  1092. }).then((res) => {
  1093. uni.hideLoading();
  1094. //
  1095. if (!res.data.enabled) {
  1096. if (res.data.code == 2) {
  1097. //未开始
  1098. } else {
  1099. //已经结束
  1100. }
  1101. //this.getBannerInfoTop("home-top");
  1102. } else if (res.data.status == 1) {
  1103. //this.getBannerInfoTop("home-top");
  1104. //已经兑换,
  1105. } else if (res.data.status == 2) {
  1106. if (code2) {
  1107. //试试另一张卷
  1108. var c = this.carhelp.get("newyear_activity2023-2-15")
  1109. if (c) {
  1110. this.carhelp.set("newyear_activity2023-2-15", {
  1111. nt: code2,
  1112. code: c.code == 0 ? 1 : 0,
  1113. status: 0
  1114. })
  1115. }
  1116. this.exchangeDetail(code2)
  1117. } else {
  1118. //this.getBannerInfoTop("home-top");
  1119. }
  1120. //不能兑换
  1121. } else {
  1122. this.showNt = true
  1123. this.showTop = true;
  1124. this.showNtStep = 0;
  1125. this.showNtValue = res.data.totalDiscount
  1126. }
  1127. }).catch(error => {
  1128. //this.showNt = false;
  1129. uni.showToast({
  1130. title: error,
  1131. icon: "none"
  1132. })
  1133. })
  1134. },
  1135. redeemF5(exchangeCode) {
  1136. uni.showLoading({
  1137. title: "加载中",
  1138. mask: true,
  1139. })
  1140. userApi.exchangeByGroupFive({
  1141. key: exchangeCode
  1142. }).then((res) => {
  1143. uni.hideLoading();
  1144. this.showNtStep = 1
  1145. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  1146. this.carhelp.set("getf5surprised-time", nowtime);
  1147. }).catch(error => {
  1148. //this.showNt = false;
  1149. uni.showToast({
  1150. title: error,
  1151. icon: "none"
  1152. })
  1153. })
  1154. },
  1155. redeemNow(exchangeCode) {
  1156. uni.showLoading({
  1157. title: "加载中",
  1158. mask: true,
  1159. })
  1160. userApi.exchange({
  1161. key: exchangeCode
  1162. }).then((res) => {
  1163. uni.hideLoading();
  1164. this.showNtStep = 1
  1165. this.carhelp.set("newyear_activity2023-2-15", {
  1166. nt: exchangeCode,
  1167. status: 1
  1168. })
  1169. }).catch(error => {
  1170. //this.showNt = false;
  1171. uni.showToast({
  1172. title: error,
  1173. icon: "none"
  1174. })
  1175. })
  1176. },
  1177. showNtStepClick() {
  1178. if (this.showNtStep == 0) {
  1179. if (this.personInfo.userType == 1) {
  1180. this.showTop = false;
  1181. //this.showNt = false;
  1182. uni.showModal({
  1183. title: "提示",
  1184. content: "游客无法兑换,请先注册为会员后再兑换",
  1185. confirmText: "前往注册",
  1186. success: res1 => {
  1187. if (res1.confirm) {
  1188. uni.navigateTo({
  1189. url: '/pages/login/login'
  1190. })
  1191. } else if (res1.cancel) {
  1192. //('用户点击取消');
  1193. }
  1194. }
  1195. })
  1196. } else if (!this.personInfo.carLicense) {
  1197. this.showTop = false;
  1198. uni.showModal({
  1199. title: "提示",
  1200. content: "请先车辆认证后再兑换",
  1201. confirmText: "车辆信息",
  1202. success: res1 => {
  1203. if (res1.confirm) {
  1204. uni.navigateTo({
  1205. url: '/pages/user/car/carDet'
  1206. })
  1207. } else if (res1.cancel) {
  1208. //('用户点击取消');
  1209. }
  1210. }
  1211. })
  1212. } else {
  1213. this.redeemF5(this.couponSelect.key);
  1214. }
  1215. } else if (this.showNtStep == 1 || this.showNtStep == 2 || this.showNtStep == 3 || this.showNtStep == 4) {
  1216. //this.showNt = false;
  1217. uni.navigateTo({
  1218. url: "/pages/user/coupon/myCoupon"
  1219. })
  1220. }
  1221. },
  1222. test() {
  1223. if (process.env.NODE_ENV === "development") {
  1224. }
  1225. },
  1226. goSearch() {
  1227. this.$refs.tabbarMain.beforeSwitch(1)
  1228. },
  1229. nextTop(index) {
  1230. this.showTopImg = this.bannerListTop[index + 1].picUrl;
  1231. this.showTopIndex = index + 1;
  1232. },
  1233. getDescriptionTime() {
  1234. var date = this.activityDate;
  1235. var dateMonth1 = new Date().getMonth() + 1;
  1236. var dateDay1 = new Date().getDate();
  1237. var dateMonth2 = parseInt(date.slice(5, 7));
  1238. var dateDay2 = parseInt(date.slice(8, 10));
  1239. if (dateMonth1 < dateMonth2) {
  1240. var days = new Date(new Date().getFullYear(), dateMonth1, 0).getDate();
  1241. dateDay2 = dateDay2 + days;
  1242. console.log(dateDay2)
  1243. }
  1244. if (dateDay1 < dateDay2 - 2) {
  1245. this.description = dateDay2 - dateDay1 + '天'
  1246. } else {
  1247. var dateTime2 = new Date(date).getTime()
  1248. var c = hourDistanceArr(new Date(), new Date(dateTime2))
  1249. if (c[0] < 10) {
  1250. c[0] = '0' + c[0];
  1251. }
  1252. if (c[1] < 10) {
  1253. c[1] = '0' + c[1];
  1254. }
  1255. if (c[2] < 10) {
  1256. c[2] = '0' + c[2];
  1257. }
  1258. this.description = c[0] + ':' + c[1] + ':' + c[2];
  1259. if (this.description == '00:00:00') {
  1260. this.activityListShow = false;
  1261. }
  1262. setTimeout(() => {
  1263. this.getDescriptionTime();
  1264. }, 1000)
  1265. }
  1266. },
  1267. getUserInfo() {
  1268. uni.showLoading({
  1269. title: "加载中",
  1270. mask: true,
  1271. })
  1272. loginApi.findByOpenId({
  1273. openId: this.carhelp.getOpenId(),
  1274. noerror: true,
  1275. }).then((res) => {
  1276. uni.hideLoading();
  1277. if (res.code == 200 && res.result) {
  1278. this.personInfo = res.data.regUser;
  1279. var token = res ? res.data.token : '';
  1280. this.carhelp.setPersonInfo(res.data.regUser);
  1281. this.carhelp.setToken(token);
  1282. this.carhelp.setPersonInfoPlus(res.data);
  1283. }
  1284. if (res.data && res.data.regUser) {
  1285. // if (res.data.regUser.fontMode == null) {
  1286. // this.show = true;
  1287. // } else {
  1288. // this.show = false;
  1289. // this.fontMode = res.data.regUser.fontMode;
  1290. // if (this.fontMode == '1') {
  1291. // this.carhelp.set("getElderModeClass", "长辈模式");
  1292. // } else {
  1293. // this.carhelp.set("getElderModeClass", "标准模式");
  1294. // }
  1295. // }
  1296. this.userId = res.data.regUser.id;
  1297. this.getFindChargeData();
  1298. if (res.data.regUser.fontMode == "1") {
  1299. this.checked = true;
  1300. this.carhelp.set("getElderModeClass", "长辈模式")
  1301. }
  1302. if (this.carhelp.get("getElderModeClass")) {
  1303. if (this.carhelp.get("getElderModeClass") == "长辈模式") {
  1304. this.elderStatus = true;
  1305. } else {
  1306. this.elderStatus = false;
  1307. }
  1308. } else {
  1309. this.carhelp.set("getElderModeClass", "标准模式");
  1310. this.elderStatus = false;
  1311. }
  1312. } else {
  1313. if (!this.carhelp.get("getElderModeClass")) {
  1314. this.carhelp.set("getElderModeClass", "标准模式");
  1315. }
  1316. this.elderStatus = true;
  1317. var obj = this.carhelp.get("friends_invitation")
  1318. // this.carhelp.set("friends_invitation",{
  1319. // op:op,
  1320. // date:new Date().getTime()
  1321. // })
  1322. if (obj && false) {
  1323. if (obj.date + 1000 * 60 * 60 * 24 > new Date().getTime()) {
  1324. this.friendsInvitation(obj)
  1325. }
  1326. }
  1327. }
  1328. }).catch(error => {
  1329. uni.showToast({
  1330. title: error,
  1331. icon: "none"
  1332. })
  1333. })
  1334. },
  1335. friendsInvitation(obj) {
  1336. uni.showLoading({
  1337. title: "加载中",
  1338. mask: true,
  1339. })
  1340. API.findActivity({
  1341. id: obj.op.id,
  1342. code: obj.op.icode
  1343. }).then((res) => {
  1344. uni.hideLoading()
  1345. obj.activityInfo = res.data.activityInfo;
  1346. var name = res.data.activityInfo.name;
  1347. var title = "参与活动"
  1348. var okbtn = "前往注册"
  1349. var endTime = res.data.activityInfo.endTime;
  1350. if (endTime && secondsDistance(newDate(endTime)) > 0) {
  1351. name = "活动已结束"
  1352. okbtn = "继续注册"
  1353. title = "提示"
  1354. obj = null
  1355. }
  1356. this.carhelp.set("friends_invitation", obj)
  1357. uni.showModal({
  1358. title: title,
  1359. content: name,
  1360. confirmText: okbtn,
  1361. success: res1 => {
  1362. if (res1.confirm) {
  1363. uni.navigateTo({
  1364. url: '/pages/login/login'
  1365. })
  1366. } else if (res1.cancel) {
  1367. //('用户点击取消');
  1368. }
  1369. }
  1370. })
  1371. }).catch(error => {
  1372. uni.showToast({
  1373. title: error,
  1374. icon: "none"
  1375. })
  1376. })
  1377. },
  1378. clickBannerTopI(i) {
  1379. var mod = this.bannerListTop[i];
  1380. //this.showTop = false;
  1381. this.clickBanner(0, true, mod)
  1382. },
  1383. clickBannerTop() {
  1384. var mod = this.bannerListTop[this.showTopIndex];
  1385. this.showTop = false;
  1386. this.clickBanner(0, true, mod)
  1387. },
  1388. clickBanner(index, bl, modout) {
  1389. var uurl = "";
  1390. var mod = this.bannerList[index]
  1391. var mod = {}
  1392. if (modout) {
  1393. mod = modout;
  1394. }else{
  1395. mod =this.bannerList[index]
  1396. }
  1397. mod.clickUrl = mod.linkUrl
  1398. if (mod.linkPicUrl && !bl) {
  1399. this.showOss = true;
  1400. this.showOssImg = mod.linkPicUrl;
  1401. this.showOssIndex = index;
  1402. } else if (mod.clickUrl == null) {
  1403. } else if (mod.clickUrl.indexOf('http') == 0) {
  1404. window.location = mod.clickUrl + uurl;
  1405. } else if (mod.clickUrl.slice(-5) == 'login' && this.userId) {
  1406. } else if (mod.clickUrl.indexOf('#/') == 0) {
  1407. if (mod.clickUrl.indexOf("?") == -1) {
  1408. mod.clickUrl += '?';
  1409. }
  1410. var url = mod.clickUrl.split("#")[1]
  1411. //window.location = mod.clickUrl;
  1412. uni.navigateTo({
  1413. url: url + uurl
  1414. })
  1415. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  1416. } else {
  1417. uni.navigateTo({
  1418. url: mod.clickUrl + uurl
  1419. })
  1420. }
  1421. },
  1422. getBannerInfoTop(code) {
  1423. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  1424. var time = this.carhelp.get("bannerListTop");
  1425. if ((time && nowtime == time)) {
  1426. this.getBannerInfoTopBl = false;
  1427. }
  1428. // uni.showLoading({
  1429. // title: "加载中",
  1430. // mask: true,
  1431. // })
  1432. newsApi.getBannerInfo(code).then((res) => {
  1433. this.bannerListTop = res.data;
  1434. if (this.bannerListTop.length) {
  1435. this.showTop = true;
  1436. this.showTopImg = this.bannerListTop[0].picUrl;
  1437. this.showTopIndex = 0;
  1438. }
  1439. this.carhelp.set("bannerListTop", nowtime);
  1440. //this.test()
  1441. var userInfo = this.carhelp.getPersonInfo();
  1442. if (userInfo && userInfo.id) {
  1443. this.getf5surprised()
  1444. } else {}
  1445. //uni.hideLoading()
  1446. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  1447. }).catch(error => {
  1448. uni.showToast({
  1449. title: error,
  1450. icon: "none"
  1451. })
  1452. })
  1453. },
  1454. getBannerInfo(code, list) {
  1455. newsApi.getBannerInfo(code).then((res) => {
  1456. if (list) {
  1457. this[list] = res.data;
  1458. } else {
  1459. this.bannerList = res.data;
  1460. }
  1461. //uni.hideLoading()
  1462. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  1463. }).catch(error => {
  1464. uni.showToast({
  1465. title: error,
  1466. icon: "none"
  1467. })
  1468. })
  1469. },
  1470. elderClick() {
  1471. if (this.value == "长辈模式") {
  1472. this.elderStatus = true;
  1473. this.carhelp.set("getElderModeClass", "长辈模式");
  1474. this.fontMode = '1';
  1475. } else {
  1476. this.elderStatus = false;
  1477. this.carhelp.set("getElderModeClass", "标准模式");
  1478. this.fontMode = '0';
  1479. }
  1480. API.changeFont({
  1481. fontMode: this.fontMode
  1482. }).then((res) => {
  1483. this.show = false;
  1484. }).catch(error => {
  1485. uni.showToast({
  1486. title: error,
  1487. icon: "none"
  1488. })
  1489. })
  1490. },
  1491. bhz() {
  1492. // uni.showToast({
  1493. // title: "备货中,敬请期待",
  1494. // icon: "none"
  1495. // })
  1496. uni.navigateTo({
  1497. url: "/pages/store/51store"
  1498. })
  1499. },
  1500. getPointTimeOut() {
  1501. setTimeout(() => {
  1502. if (this.pointTimeOut) {
  1503. this.getPoint();
  1504. }
  1505. }, 1000)
  1506. },
  1507. getFindChargeData() {
  1508. API.findChargeData().then((res) => {
  1509. //this.onPageScrollMethod()
  1510. this.chargeList = res.data.chargingRecordList;
  1511. var list = res.data.chargingRecordList;
  1512. for (var i = 0; i < list.length; i++) {
  1513. if (list[i].status == '1' || list[i].status == '4') {
  1514. this.timeOut = true;
  1515. }
  1516. }
  1517. if (this.timeOut && this.pointTimeOut) {
  1518. setTimeout(() => {
  1519. this.getFindChargeData();
  1520. }, 5000)
  1521. }
  1522. }).catch(error => {
  1523. uni.showToast({
  1524. title: error,
  1525. icon: "none"
  1526. })
  1527. })
  1528. },
  1529. toAll() {
  1530. uni.navigateTo({
  1531. url: '/pages/index/all'
  1532. })
  1533. },
  1534. toSearchPile() {
  1535. uni.navigateTo({
  1536. url: '/pages/searchPile/searchPile'
  1537. })
  1538. },
  1539. toLogin() {
  1540. uni.navigateTo({
  1541. url: '/pages/login/login'
  1542. })
  1543. },
  1544. toNewsNotice() {
  1545. // uni.navigateTo({
  1546. // url: '/pages/article/newsNotice'
  1547. // })
  1548. uni.navigateTo({
  1549. url: '/pages/index/activity'
  1550. })
  1551. },
  1552. toNewsArticleDetails(e) {
  1553. // uni.navigateTo({
  1554. // url: '/pages/article/newsNotice'
  1555. // })
  1556. if (e == undefined) {
  1557. console.log("toNewsArticleDetails1", e)
  1558. } else {
  1559. console.log("toNewsArticleDetails1", e)
  1560. var item = this.newsListData[e]
  1561. this.gotoArticleDetails(item)
  1562. }
  1563. // console.log("toNewsArticleDetails2",e)
  1564. //var item=this.newsListData[e]
  1565. //this.gotoArticleDetails(item)
  1566. },
  1567. gotoUd(){
  1568. window.location.href=this.youdianurl;
  1569. },
  1570. //微信扫二维码
  1571. getScanCode() {
  1572. if (this.userId) {
  1573. WxJsApi.scanQRCode(1).then(res => {
  1574. var url=res;
  1575. //("scanQRCode------" + res)
  1576. if(res&&this.branchParameterBl()&&url.indexOf('youdian.hbjp.com.cn')!=-1){
  1577. if(url.indexOf('?code=')!=-1){
  1578. url=url.replace('?code=','?code1233=')
  1579. }
  1580. if(process.car.NODE_ENV=='test'){
  1581. url='https://youdian.hbjp.com.cn/charging-prod/mobile-charging-car-test/#/'
  1582. +url.split("#/")[1]
  1583. }else{
  1584. url='https://youdian.hbjp.com.cn/charging-prod/mobile-charging-car/#/'
  1585. +url.split("#/")[1]
  1586. }
  1587. console.log(url)
  1588. //window.location.href=url;
  1589. this.youdianurl=url
  1590. this.youdianshow=true
  1591. }else if (res) {
  1592. API.scanCode(res).then((response) => {
  1593. }).catch(error => {
  1594. uni.showToast({
  1595. title: error,
  1596. icon: "none"
  1597. })
  1598. })
  1599. }
  1600. }).catch(error => {
  1601. })
  1602. } else {
  1603. uni.navigateTo({
  1604. url: '/pages/login/login'
  1605. })
  1606. }
  1607. },
  1608. fastRecharge() {
  1609. if (this.userId) {
  1610. if (this.personInfo.userType == 1) {
  1611. uni.showToast({
  1612. title: "游客模式只支持“先付后退”"
  1613. })
  1614. } else {
  1615. uni.navigateTo({
  1616. url: '/pages/user/finance/recharge'
  1617. })
  1618. }
  1619. } else {
  1620. uni.navigateTo({
  1621. url: '/pages/login/login'
  1622. })
  1623. }
  1624. },
  1625. chargingRecord() {
  1626. if (this.userId) {
  1627. uni.navigateTo({
  1628. url: '/pages/record/index'
  1629. })
  1630. } else {
  1631. uni.navigateTo({
  1632. url: '/pages/login/login'
  1633. })
  1634. }
  1635. },
  1636. rechargeActivity(item) {
  1637. if (this.userId) {
  1638. var uurl = "&uid=" + this.userId;
  1639. var mod = item
  1640. if (mod.clickUrl == null) {
  1641. } else if (mod.clickUrl.indexOf('http') == 0) {
  1642. window.location = mod.clickUrl + uurl;
  1643. } else if (mod.clickUrl.indexOf('#/') == 0) {
  1644. if (mod.clickUrl.indexOf("?") == -1) {
  1645. mod.clickUrl += '?';
  1646. }
  1647. var url = mod.clickUrl.split("#")[1]
  1648. //window.location = mod.clickUrl;
  1649. uni.navigateTo({
  1650. url: url + uurl
  1651. })
  1652. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  1653. } else {
  1654. uni.navigateTo({
  1655. url: mod.clickUrl + uurl
  1656. })
  1657. }
  1658. } else {
  1659. uni.navigateTo({
  1660. url: '/pages/login/login'
  1661. })
  1662. }
  1663. },
  1664. getActivityInfoList() {
  1665. uni.showLoading({
  1666. title: "加载中",
  1667. mask: true,
  1668. })
  1669. API.activityInfoList({
  1670. pageIndex: 1,
  1671. pageSize: 10
  1672. }).then((res) => {
  1673. uni.hideLoading()
  1674. var list = res.data.data;
  1675. for (let i = 0; i < list.length; i++) {
  1676. if (list[i].type == 2 && list[i].endTime != null) {
  1677. this.activityListShow = true;
  1678. var reg = new RegExp('-', 'gi');
  1679. this.activityDate = list[i].endTime.replace(reg, '/');
  1680. console.log(this.activityDate)
  1681. this.activityDateList = list[i];
  1682. list.splice(i, 1);
  1683. this.getDescriptionTime();
  1684. }
  1685. }
  1686. this.activityList = list;
  1687. this.spring()
  1688. }).catch(error => {
  1689. uni.showToast({
  1690. title: error,
  1691. icon: "none"
  1692. })
  1693. })
  1694. },
  1695. searchStationData(bl) {
  1696. if (bl) {
  1697. this.pageIndex2++;
  1698. }
  1699. var data = {
  1700. longitude: this.longitude,
  1701. latitude: this.latitude,
  1702. pageIndex: this.pageIndex2,
  1703. pageSize: 3
  1704. }
  1705. if (this.carhelp.getPersonInfo()) {
  1706. data.openId = this.carhelp.getOpenId()
  1707. }
  1708. this.loading = false
  1709. siteApi.searchStationData(data).then((response) => {
  1710. //this.onPageScrollMethod()
  1711. if (this.pageIndex2 == 1) {
  1712. this.stationList = response.data.data;
  1713. // this.listForm.totalPage = response.data.totalPage;
  1714. } else {
  1715. this.stationList = [
  1716. ...this.stationList,
  1717. ...response.data.data
  1718. ];
  1719. }
  1720. this.recordsTotal2 = response.data.recordsTotal;
  1721. this.loading = true
  1722. if (false && response.data.data.length && false) {
  1723. var stationDataList = response.data.data;
  1724. MapLoader().then(AMap1 => {
  1725. for (var i in stationDataList) {
  1726. var item = stationDataList[i]
  1727. var lnglat = new AMap.LngLat(this.longitude, this.latitude);
  1728. var myDistance = lnglat.distance([item.longitude, item.latitude]);
  1729. item.distance = myDistance / 1000;
  1730. console.log(item.distance)
  1731. }
  1732. })
  1733. //this.stationData = stationDataList;
  1734. }
  1735. }).catch(error => {
  1736. console.log(error, "123")
  1737. uni.showToast({
  1738. title: error,
  1739. icon: "none"
  1740. })
  1741. })
  1742. },
  1743. getPoint() {
  1744. if (this.stationList.length != 0) {
  1745. return
  1746. }
  1747. WxJsApi.getLocation().then((res) => {
  1748. this.latitude = parseFloat(res.latitude);
  1749. this.longitude = parseFloat(res.longitude);
  1750. this.message = res.errMsg;
  1751. if (res.errMsg != 'getLocation:ok') {
  1752. uni.showToast({
  1753. title: res
  1754. })
  1755. } else {
  1756. this.searchStationData()
  1757. }
  1758. }).catch(error => {
  1759. uni.showToast({
  1760. title: error,
  1761. icon: "none"
  1762. })
  1763. })
  1764. },
  1765. getNewsList(bl) {
  1766. uni.showLoading({
  1767. title: "加载中",
  1768. mask: true,
  1769. })
  1770. newsApi.newsInfoList({
  1771. pageIndex: 1,
  1772. pageSize: 5,
  1773. shortName: 'GDXW',
  1774. //shortName:'TZGG'
  1775. }).then((res) => {
  1776. uni.hideLoading()
  1777. var data1 = res.data.data;
  1778. var data2 = [];
  1779. if (data1.length == 1) {
  1780. data2 = [
  1781. ...data1,
  1782. ...data1
  1783. ]
  1784. } else {
  1785. data2 = [
  1786. ...data1
  1787. ]
  1788. }
  1789. this.newsListData = data2
  1790. this.newsList = data2.map(item => {
  1791. return item.title
  1792. })
  1793. }).catch(error => {
  1794. uni.showToast({
  1795. title: error,
  1796. icon: "none"
  1797. })
  1798. })
  1799. },
  1800. myLoadmore() {
  1801. //this.pageIndex += 1;
  1802. //this.getNewsList()
  1803. },
  1804. }
  1805. }
  1806. </script>
  1807. <style lang="scss" scoped>
  1808. .swiper {
  1809. height: 700rpx;
  1810. .swiperitem {
  1811. height: 700rpx;
  1812. }
  1813. }
  1814. .couponmain {
  1815. .main {
  1816. margin: 100px auto 0;
  1817. position: relative;
  1818. .content {
  1819. padding: 24px;
  1820. padding-top: 50px;
  1821. background-color: #fff;
  1822. box-shadow: 0px 0px 0px 1px rgba(254, 229, 147, 100);
  1823. border: 2px solid rgba(253, 217, 141, 100);
  1824. border-radius: 8px;
  1825. .img {
  1826. width: 44vw;
  1827. height: 134px;
  1828. position: absolute;
  1829. top: -88px;
  1830. right: 0px;
  1831. img {
  1832. width: 100%;
  1833. height: 100%;
  1834. }
  1835. }
  1836. .title {
  1837. font-size: 16px;
  1838. color: rgba(84, 45, 45, 100);
  1839. margin-bottom: 13px;
  1840. }
  1841. .text {
  1842. line-height: 24px;
  1843. color: rgba(84, 45, 45, 100);
  1844. font-size: 16px;
  1845. text-align: justify;
  1846. text-decoration: underline;
  1847. text-decoration-color: #ECE3BA;
  1848. text-indent: 32px;
  1849. }
  1850. .sign {
  1851. text-align: right;
  1852. margin-top: 8px;
  1853. font-size: 16px;
  1854. }
  1855. }
  1856. // 专享优惠券
  1857. .exclusive {
  1858. background-color: #F5E4C8;
  1859. margin-top: 20px;
  1860. padding: 32rpx 32rpx 32rpx 32rpx;
  1861. box-shadow: 0px 0px 0px 1px rgba(254, 229, 147, 100);
  1862. border: 2px solid rgba(253, 217, 141, 100);
  1863. border-radius: 8px;
  1864. .exclusive1 {
  1865. font-size: 48rpx;
  1866. color: rgba(51, 51, 51, 1);
  1867. font-family: SourceHanSerif-bold;
  1868. }
  1869. .exclusive2 {
  1870. font-family: PingFangSC-regular;
  1871. color: rgba(51, 51, 51, 1);
  1872. font-size: 36rpx;
  1873. }
  1874. p {
  1875. width: 100%;
  1876. text-align: center;
  1877. //color: rgba(255, 73, 75, 100);
  1878. //font-size: 20px;
  1879. }
  1880. .img {
  1881. // width: 74.4vw;
  1882. // height: 84px;
  1883. margin-top: 16px;
  1884. position: relative;
  1885. img {
  1886. width: 100%;
  1887. height: 100%;
  1888. }
  1889. }
  1890. .num {
  1891. font-size: 54rpx;
  1892. color: rgba(252, 237, 179, 100);
  1893. position: absolute;
  1894. top: 10px;
  1895. left: 8vw;
  1896. font-weight: 600;
  1897. .unit {
  1898. font-size: 24rpx;
  1899. color: rgba(252, 237, 179, 100);
  1900. }
  1901. }
  1902. .unit2 {
  1903. font-size: 12px;
  1904. color: #FFF;
  1905. position: absolute;
  1906. top: 90rpx;
  1907. left: 24rpx;
  1908. }
  1909. .exclusive-text {
  1910. color: #333333;
  1911. font-size: 16rpx;
  1912. }
  1913. .exclusive-btn {
  1914. width: 80%;
  1915. margin-top: 48rpx;
  1916. border-radius: 50px;
  1917. background: linear-gradient(90.58deg, rgba(225, 208, 165, 1) 0.05%, rgba(228, 190, 132, 1) 98.67%);
  1918. color: rgba(51, 51, 51, 1);
  1919. font-size: 36rpx;
  1920. text-align: center;
  1921. box-shadow: 0px 8rpx 20rpx 0px rgba(184, 155, 103, 40);
  1922. font-family: -apple-system;
  1923. // width: 87.4%;
  1924. // margin-top: 20px;
  1925. // background-image: linear-gradient(#ffff00, #ff9600);
  1926. // color: #521e00;
  1927. // font-size: 20px;
  1928. // border-radius: 50px;
  1929. }
  1930. .ticket-info {
  1931. width: 40vw;
  1932. text-align: center;
  1933. position: absolute;
  1934. top: 18px;
  1935. right: 16rpx;
  1936. .ticket-name {
  1937. line-height: 40rpx;
  1938. color: rgba(16, 16, 16, 100);
  1939. font-size: 16rpx;
  1940. }
  1941. .condition {
  1942. line-height: 22px;
  1943. color: #8a6f6f;
  1944. font-size: 12px;
  1945. }
  1946. }
  1947. }
  1948. }
  1949. }
  1950. .oldTextClassF {
  1951. .text-2 {
  1952. font-size: 36rpx !important;
  1953. }
  1954. .text-3 {
  1955. font-size: 34rpx !important;
  1956. }
  1957. .station .price-free .price-1 .num {
  1958. font-size: 48rpx !important;
  1959. line-height: 40rpx;
  1960. font-weight: bold;
  1961. }
  1962. }
  1963. ::v-deep .u-image__loading {
  1964. background: #ff000000;
  1965. }
  1966. // 头部图片
  1967. img {
  1968. width: 100%;
  1969. // height: 100%;
  1970. }
  1971. .background-spring {
  1972. background: linear-gradient(#ec866d 10%, #F3F4F4 30%);
  1973. //padding-top: 28rpx;
  1974. .backgroundClass {
  1975. background-image: url('@/assets/img/spring/2025/index1.jpg');
  1976. padding-top: 50rpx;
  1977. background-size: 100% 100%;
  1978. /* 横向100%,纵向50% */
  1979. background-position: center;
  1980. /* 保证图像居中显示 */
  1981. background-repeat: no-repeat;
  1982. /* 不重复显示图像 */
  1983. }
  1984. .options-item {
  1985. box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.4);
  1986. border: 2px solid rgba(255, 214, 149, 1);
  1987. }
  1988. }
  1989. .background {
  1990. background: linear-gradient(#D6EEDC, #F3F4F4);
  1991. .backgroundClass {
  1992. padding-top: 44rpx;
  1993. }
  1994. }
  1995. .banner {
  1996. width: 91.4%;
  1997. margin: 0 auto;
  1998. border-radius: 12px;
  1999. height: 200rpx;
  2000. overflow: hidden;
  2001. ::v-deep uni-swiper {
  2002. height: 200rpx !important;
  2003. }
  2004. }
  2005. // 选项列表
  2006. .option-list-spring {
  2007. padding-top: 30rpx;
  2008. line-height: 40rpx;
  2009. border-radius: 8px;
  2010. text-align: center;
  2011. margin: auto;
  2012. display: flex;
  2013. justify-content: space-around;
  2014. .list-item {
  2015. // 图标
  2016. .icon {
  2017. background-image: url('@/assets/img/spring/optionBg.svg');
  2018. background-position: center;
  2019. background-repeat: no-repeat;
  2020. background-size: 100% 100%;
  2021. width: 100rpx;
  2022. height: 100rpx;
  2023. // border-radius: 99px;
  2024. line-height: 80rpx;
  2025. font-size: 48rpx;
  2026. text-align: center;
  2027. margin: auto;
  2028. color: #ffffff;
  2029. display: flex;
  2030. align-items: center;
  2031. justify-content: center;
  2032. img{
  2033. width: 48rpx;
  2034. height: 48rpx;
  2035. }
  2036. }
  2037. .text {
  2038. margin-top: 8rpx;
  2039. }
  2040. }
  2041. }
  2042. // 选项列表
  2043. .option-list {
  2044. padding-top: 30rpx;
  2045. line-height: 40rpx;
  2046. border-radius: 8px;
  2047. text-align: center;
  2048. margin: auto;
  2049. display: flex;
  2050. justify-content: space-around;
  2051. .list-item {
  2052. // 图标
  2053. .icon {
  2054. width: 80rpx;
  2055. height: 80rpx;
  2056. border-radius: 99px;
  2057. line-height: 80rpx;
  2058. font-size: 48rpx;
  2059. text-align: center;
  2060. margin: auto;
  2061. color: #ffffff;
  2062. }
  2063. .text {
  2064. margin-top: 8rpx;
  2065. }
  2066. }
  2067. }
  2068. .flex {
  2069. display: flex;
  2070. }
  2071. // 站点
  2072. .pack-up {
  2073. float: right;
  2074. font-size: 16px;
  2075. color: rgba(119, 119, 119, 100);
  2076. }
  2077. .station,
  2078. .location,
  2079. .state1 {
  2080. overflow: hidden;
  2081. box-shadow: 0px 4rpx 12rpx 0px #008c4a33;
  2082. }
  2083. // 附近站点改版
  2084. .station {
  2085. width: 91.4%;
  2086. border-radius: 8px;
  2087. padding: 12px 12px 12px 11px;
  2088. background-color: #fff;
  2089. margin: 8px auto 0;
  2090. .head {
  2091. display: flex;
  2092. justify-content: space-between;
  2093. align-items: center;
  2094. .title {
  2095. color: rgba(16, 16, 16, 100);
  2096. font-size: 32rpx;
  2097. font-weight: 550;
  2098. width: 440rpx;
  2099. text-overflow: ellipsis;
  2100. overflow: hidden;
  2101. white-space: nowrap;
  2102. }
  2103. .distance {
  2104. width: 180rpx;
  2105. color: rgba(102, 102, 102, 100);
  2106. font-size: 32rpx;
  2107. text-align: end;
  2108. .iconfont {
  2109. font-size: 24rpx;
  2110. margin-right: 4rpx;
  2111. }
  2112. }
  2113. }
  2114. .sign {
  2115. display: flex;
  2116. flex-wrap: wrap;
  2117. margin-top: 16rpx;
  2118. height: 46rpx;
  2119. overflow: hidden;
  2120. .sign-tag {
  2121. line-height: 40rpx;
  2122. border-radius: 8rpx;
  2123. //background-color: rgba(255, 255, 255, 100);
  2124. //color: rgba(255, 139, 0, 100);
  2125. font-size: 24rpx;
  2126. text-align: center;
  2127. //border: 1px solid rgba(255, 139, 0, 100);
  2128. padding: 0 8rpx 14rpx 8rpx;
  2129. margin-right: 16rpx;
  2130. margin-bottom: 8rpx;
  2131. }
  2132. .sign-0 {
  2133. background: linear-gradient(89.4deg, rgba(129, 97, 255, 1) 2.8%, rgba(169, 147, 255, 1) 98.02%);
  2134. color: rgba(255, 255, 255, 1);
  2135. padding: 0 10rpx;
  2136. //border: 1px solid rgba(255, 139, 0, 100);
  2137. }
  2138. .sign-5 {
  2139. background: linear-gradient(89.4deg, rgba(255, 61, 0, 1) 2.8%, rgba(255, 134, 0, 1) 98.02%);
  2140. color: rgba(255, 255, 255, 1);
  2141. padding: 0 10rpx;
  2142. }
  2143. .sign-6 {
  2144. //background: linear-gradient(89.4deg, rgba(255,61,0,1) 2.8%,rgba(255,134,0,1) 98.02%);
  2145. background: linear-gradient(89.4deg, rgba(0, 164, 87, 1) 2.8%, rgba(0, 206, 141, 1) 98.02%);
  2146. color: rgba(255, 255, 255, 1);
  2147. padding: 0 10rpx;
  2148. }
  2149. .sign-1 {
  2150. line-height: 40rpx;
  2151. border-radius: 8rpx;
  2152. background-color: rgba(255, 255, 255, 100);
  2153. color: rgba(255, 139, 0, 100);
  2154. font-size: 24rpx;
  2155. text-align: center;
  2156. border: 1px solid rgba(255, 139, 0, 100);
  2157. padding: 0 8rpx;
  2158. margin-right: 16rpx;
  2159. margin-bottom: 8rpx;
  2160. }
  2161. .sign-2 {
  2162. line-height: 40rpx;
  2163. border-radius: 8rpx;
  2164. background-color: rgba(255, 255, 255, 100);
  2165. color: rgba(153, 153, 153, 100);
  2166. font-size: 24rpx;
  2167. text-align: center;
  2168. border: 1px solid rgba(204, 204, 204, 100);
  2169. padding: 0 8rpx;
  2170. margin-right: 16rpx;
  2171. margin-bottom: 8rpx;
  2172. }
  2173. .sign-3 {
  2174. line-height: 40rpx;
  2175. border-radius: 8rpx;
  2176. background-color: rgba(255, 255, 255, 100);
  2177. color: #8161FF;
  2178. font-size: 24rpx;
  2179. text-align: center;
  2180. border: 1px solid #8161FF;
  2181. padding: 0 8rpx;
  2182. margin-right: 16rpx;
  2183. margin-bottom: 8rpx;
  2184. }
  2185. .sign-4 {
  2186. line-height: 40rpx;
  2187. border-radius: 8rpx;
  2188. background-color: rgba(255, 255, 255, 100);
  2189. color: #00B962;
  2190. font-size: 24rpx;
  2191. text-align: center;
  2192. border: 1px solid #00B962;
  2193. padding: 0 8rpx;
  2194. margin-right: 16rpx;
  2195. margin-bottom: 8rpx;
  2196. }
  2197. }
  2198. .price-free {
  2199. display: flex;
  2200. justify-content: space-between;
  2201. margin-top: 8rpx;
  2202. .price {
  2203. display: flex;
  2204. align-items: baseline;
  2205. }
  2206. .price-1 {
  2207. .num {
  2208. color: rgba(255, 98, 0, 100);
  2209. font-size: 44rpx;
  2210. }
  2211. .unit {
  2212. font-size: 12px;
  2213. color: rgba(153, 153, 153, 100);
  2214. }
  2215. }
  2216. .price-2 {
  2217. font-size: 24rpx;
  2218. margin-left: 8rpx;
  2219. color: #999999;
  2220. text-decoration: line-through;
  2221. }
  2222. .price-3 {
  2223. font-size: 24rpx;
  2224. color: #fff;
  2225. margin-left: 8rpx;
  2226. padding-right: 9rpx;
  2227. background: #00B962;
  2228. border-radius: 8rpx;
  2229. .num1 {
  2230. padding-left: 12rpx;
  2231. border-radius: 8rpx 0 8rpx 8rpx;
  2232. padding-right: 18rpx;
  2233. background: #121212;
  2234. -webkit-clip-path: polygon(0 0, 93% 0, 84% 100%, 0% 100%);
  2235. clip-path: polygon(0 0, 93% 0, 84% 100%, 0% 100%);
  2236. }
  2237. }
  2238. }
  2239. .free {
  2240. display: flex;
  2241. align-items: center;
  2242. .slow,
  2243. .fast {
  2244. display: flex;
  2245. .sp-font {
  2246. width: 40rpx;
  2247. height: 40rpx;
  2248. line-height: 40rpx;
  2249. border-radius: 4px;
  2250. background-color: #7a68f6;
  2251. color: #fff;
  2252. font-size: 28rpx;
  2253. text-align: center;
  2254. margin-right: 2rpx;
  2255. }
  2256. .fast-font {
  2257. width: 40rpx;
  2258. height: 40rpx;
  2259. line-height: 40rpx;
  2260. border-radius: 8rpx;
  2261. // background-color: rgba(186, 240, 215, 100);
  2262. // color: rgba(0, 130, 69, 100);
  2263. background-color: #1677FF;
  2264. color: rgba(255, 255, 255, 1);
  2265. font-size: 28rpx;
  2266. text-align: center;
  2267. margin-right: 8rpx;
  2268. }
  2269. .slow-font {
  2270. width: 40rpx;
  2271. height: 40rpx;
  2272. line-height: 40rpx;
  2273. border-radius: 8rpx;
  2274. // background-color: rgba(226, 226, 226, 100);
  2275. // color: rgba(128, 128, 128, 100);
  2276. background-color: #00B962;
  2277. color: rgba(255, 255, 255, 1);
  2278. font-size: 28rpx;
  2279. text-align: center;
  2280. margin-right: 8rpx;
  2281. }
  2282. .num {
  2283. font-size: 32rpx;
  2284. color: #666;
  2285. line-height: 40rpx;
  2286. }
  2287. .num1 {
  2288. font-size: 32rpx;
  2289. color: #bbb;
  2290. line-height: 40rpx;
  2291. }
  2292. }
  2293. .slow {
  2294. margin-left: 24rpx;
  2295. }
  2296. }
  2297. }
  2298. //定位
  2299. .location {
  2300. width: 91.4%;
  2301. background-color: #ffffff;
  2302. height: 120px;
  2303. display: flex;
  2304. justify-content: space-between;
  2305. margin: 20px auto 0;
  2306. border-radius: 8px;
  2307. border: #F2F4F4 1px;
  2308. .location-text {
  2309. padding: 24px 0 0 28px;
  2310. .text-1 {
  2311. height: 16px;
  2312. line-height: 16px;
  2313. color: rgba(16, 16, 16, 100);
  2314. font-size: 16px;
  2315. text-align: left;
  2316. }
  2317. .text-2 {
  2318. height: 17px;
  2319. line-height: 17px;
  2320. color: rgba(102, 102, 102, 100);
  2321. font-size: 12px;
  2322. text-align: left;
  2323. margin-top: 6px;
  2324. white-space: nowrap; //强制不换行
  2325. text-overflow: ellipsis; //文本超出出现省略号
  2326. overflow: hidden;
  2327. }
  2328. .text-3 {
  2329. width: 200rpx;
  2330. height: 24px;
  2331. line-height: 22px;
  2332. border-radius: 50px;
  2333. color: rgba(0, 185, 98, 100);
  2334. font-size: 12px;
  2335. text-align: center;
  2336. border: 1px solid rgba(0, 185, 98, 100);
  2337. margin-top: 11px;
  2338. }
  2339. }
  2340. .img-box {
  2341. //width: 120px;
  2342. margin: auto;
  2343. img {
  2344. width: 200rpx;
  2345. }
  2346. }
  2347. }
  2348. .img-box4 {
  2349. // height: 260rpx;
  2350. padding-top: 30rpx;
  2351. display: flex;
  2352. flex-direction: column;
  2353. justify-content: space-between;
  2354. align-items: flex-end;
  2355. img {
  2356. max-width: 200rpx;
  2357. }
  2358. .img-view {
  2359. color: #777777 ;
  2360. float: right;
  2361. font-size: 10px;
  2362. margin-top: 3px;
  2363. position: relative;
  2364. bottom: 30rpx;
  2365. left: -15px;
  2366. .iconfont {
  2367. font-size: 14px;
  2368. }
  2369. }
  2370. }
  2371. .show20240403Main{
  2372. display: flex;
  2373. // flex-wrap: wrap;
  2374. font-size: 32rpx;
  2375. //margin: 8rpx 0;
  2376. .show20240403{
  2377. white-space: pre;
  2378. }
  2379. .text-21,.text-22 {
  2380. margin-left: 8rpx;
  2381. font-size: 32rpx;
  2382. font-weight: bold;
  2383. color: rgba(0, 185, 98, 1);
  2384. }
  2385. }
  2386. .text-4{
  2387. font-size: 28rpx;
  2388. //margin-top: 12rpx;
  2389. color: rgba(119, 119, 119, 1);
  2390. .text-4-span{
  2391. margin: 0 12rpx;
  2392. font-size: 32rpx;
  2393. font-weight: bold;
  2394. color: rgba(0, 0, 0, 1.0);
  2395. }
  2396. }
  2397. .state {
  2398. width: 91.4%;
  2399. background-color: #ffffff;
  2400. padding-bottom: 40rpx;
  2401. display: flex;
  2402. margin: 20rpx auto 0;
  2403. border-radius: 8px;
  2404. border: #F2F4F4 1px;
  2405. .state-text {
  2406. .text-1 {
  2407. white-space: pre;
  2408. }
  2409. padding: 48rpx 0 0 24rpx;
  2410. Z-INDEX: 99;
  2411. .text-1 {
  2412. height: 16px;
  2413. line-height: 16px;
  2414. color: rgba(0, 185, 98, 1);
  2415. font-size: 16px;
  2416. text-align: left;
  2417. font-weight: bold;
  2418. span {
  2419. color: rgba(16, 16, 16, 1);
  2420. margin-right: 12rpx;
  2421. }
  2422. }
  2423. .text-2 {
  2424. width: 160%;
  2425. height: 17px;
  2426. line-height: 17px;
  2427. color: #101010;
  2428. text-align: left;
  2429. margin-top: 12px;
  2430. span {
  2431. font-weight: bold;
  2432. margin-right: 6rpx;
  2433. margin-left: 6rpx;
  2434. }
  2435. .text-21 {
  2436. color: rgba(0, 185, 98, 1);
  2437. }
  2438. .text-22 {
  2439. color: #ed7847;
  2440. }
  2441. }
  2442. .text-3 {
  2443. font-size: 14px;
  2444. line-height: 20px;
  2445. margin-top: 6px;
  2446. color: #999999;
  2447. }
  2448. }
  2449. .img-box {
  2450. width: 120px;
  2451. height: 120px;
  2452. margin-right: 20px;
  2453. }
  2454. }
  2455. .state1{
  2456. padding-bottom: 0px;
  2457. display: flex;
  2458. justify-content: space-between;
  2459. .state-text {
  2460. width: 70%;
  2461. .text-5 {
  2462. font-size: 36rpx;
  2463. color: rgba(0, 185, 98, 1);
  2464. text-align: left;
  2465. font-weight: bold;
  2466. span {
  2467. color: rgba(16, 16, 16, 1);
  2468. margin-right: 12rpx;
  2469. }
  2470. }
  2471. padding: 40rpx 0 40rpx 24rpx;
  2472. display: flex;
  2473. z-index: 99;
  2474. flex-direction: column;
  2475. justify-content: space-around;
  2476. }
  2477. }
  2478. //充值
  2479. .top-up {
  2480. width: 91.4%;
  2481. margin: 24rpx auto 0;
  2482. .top-up-title {
  2483. color: rgba(16, 16, 16, 100);
  2484. font-size: 16px;
  2485. }
  2486. .card-box {
  2487. display: flex;
  2488. justify-content: space-between;
  2489. //padding: 0 0 16px 0;
  2490. .card {
  2491. width: 48.3%;
  2492. height: 65px;
  2493. img {
  2494. width: 100%;
  2495. height: 100%;
  2496. }
  2497. }
  2498. }
  2499. .img-box2 {
  2500. margin-top: 12px;
  2501. display: flex;
  2502. justify-content: space-between;
  2503. img {
  2504. width: 100%;
  2505. height: 100%;
  2506. }
  2507. .left-image {
  2508. width: 48.3%;
  2509. height: 166px;
  2510. padding: 8px 0 0 12px;
  2511. // background: url(@/assets/img/topup1.png);
  2512. background-repeat: no-repeat;
  2513. background-position: 30% 10%;
  2514. background-size: cover;
  2515. p {
  2516. color: rgba(56, 47, 33, 100);
  2517. font-size: 24px;
  2518. line-height: 28px;
  2519. font-weight: 600;
  2520. }
  2521. .time-activities {
  2522. color: rgba(56, 39, 14, 100);
  2523. font-size: 16px;
  2524. line-height: 22px;
  2525. margin-top: 4px;
  2526. .time {
  2527. margin-left: 4px;
  2528. color: #fa3534;
  2529. font-weight: bold;
  2530. }
  2531. }
  2532. }
  2533. .right-image {
  2534. width: 48.3%;
  2535. display: flex;
  2536. flex-direction: column;
  2537. justify-content: space-between;
  2538. .margin-top {
  2539. margin-top: 12px;
  2540. }
  2541. img {
  2542. height: 77px;
  2543. }
  2544. }
  2545. ;
  2546. }
  2547. }
  2548. .lineBox {
  2549. background-color: rgba(0, 145, 67, 100);
  2550. padding: 0px 3px;
  2551. background-color: rgba(0, 185, 98, 1);
  2552. color: rgba(255, 255, 255, 1);
  2553. margin-left: 6px;
  2554. border-radius: 3px;
  2555. }
  2556. // 小竖线
  2557. .line {
  2558. display: inline-block;
  2559. width: 3px;
  2560. height: 12px;
  2561. margin-right: 7px;
  2562. background-color: rgba(0, 145, 67, 100);
  2563. }
  2564. // 新闻公告
  2565. .news-title2 {
  2566. display: flex;
  2567. }
  2568. // 新闻公告
  2569. .news-title {
  2570. padding: 0 16px;
  2571. margin-top: 12px;
  2572. color: rgba(16, 16, 16, 100);
  2573. font-size: 16px;
  2574. //display: flex;
  2575. justify-content: space-between;
  2576. background-color: #F2F4F4;
  2577. .news-title-left {
  2578. display: flex;
  2579. }
  2580. .more {
  2581. font-size: 14px;
  2582. color: #777777;
  2583. display: flex;
  2584. line-height: 20px;
  2585. align-items: center;
  2586. .more-icon {
  2587. font-size: 24px
  2588. }
  2589. }
  2590. }
  2591. .news {
  2592. background-color: #fff;
  2593. width: 91.4%;
  2594. margin: 12px auto 0;
  2595. border-radius: 8px;
  2596. .news-content {
  2597. display: flex;
  2598. justify-content: space-between;
  2599. padding: 12px;
  2600. .content-text {
  2601. width: 56.2%;
  2602. height: 100%;
  2603. line-height: 21px;
  2604. color: #101010;
  2605. text-align: left;
  2606. font-size: 14px;
  2607. }
  2608. .content-title {
  2609. width: 100%;
  2610. overflow: hidden;
  2611. text-overflow: ellipsis;
  2612. display: -webkit-box;
  2613. -webkit-box-orient: vertical;
  2614. -webkit-line-clamp: 3;
  2615. }
  2616. .content-img {
  2617. width: 40.57%;
  2618. height: 100%;
  2619. border-radius: 4px;
  2620. overflow: hidden;
  2621. img {
  2622. width: 100%;
  2623. height: 80%;
  2624. }
  2625. }
  2626. .news-time {
  2627. margin-top: 5%;
  2628. color: #999999;
  2629. width: 80px;
  2630. height: 20px;
  2631. font-size: 14px;
  2632. }
  2633. }
  2634. }
  2635. .bottom {
  2636. width: 100%;
  2637. height: 60px;
  2638. .bot {
  2639. width: 100%;
  2640. margin: 0 auto;
  2641. padding: 0 17.3%;
  2642. justify-content: space-between;
  2643. display: flex;
  2644. .bot-line {
  2645. margin-top: 20px;
  2646. width: 21.3%;
  2647. height: 0px;
  2648. border: 1px solid rgba(207, 210, 213, 100);
  2649. }
  2650. .bot-text {
  2651. white-space: nowrap;
  2652. height: 17px;
  2653. margin-top: 13px;
  2654. margin-left: 12px;
  2655. margin-right: 12px;
  2656. font-size: 12px;
  2657. text-align: center;
  2658. color: rgba(182, 189, 195, 100);
  2659. }
  2660. }
  2661. }
  2662. // 导航栏
  2663. .navigation {
  2664. width: 100%;
  2665. // height: 40px;
  2666. padding: 10px 0;
  2667. background-color: #fff;
  2668. position: fixed;
  2669. bottom: 0;
  2670. left: 0;
  2671. display: flex;
  2672. justify-content: space-around;
  2673. text-align: center;
  2674. color: #999999;
  2675. .nav-icon {
  2676. width: 54px;
  2677. font-size: 24px
  2678. }
  2679. .nav-text {
  2680. font-size: 14px;
  2681. }
  2682. }
  2683. .shema {
  2684. width: 70%;
  2685. padding-bottom: 20px;
  2686. border-radius: 16px;
  2687. background-color: #fff;
  2688. position: fixed;
  2689. top: 100px;
  2690. left: 0;
  2691. right: 0;
  2692. margin: 0 auto;
  2693. z-index: 9999;
  2694. .title {
  2695. height: 33px;
  2696. color: rgba(16, 16, 16, 100);
  2697. font-size: 24px;
  2698. text-align: center;
  2699. padding: 16px 0;
  2700. }
  2701. .u-radio-group {
  2702. margin: 16px 5vw;
  2703. }
  2704. ::v-deep .u-radio {
  2705. width: 60vw !important;
  2706. padding: 24px 24px 40px;
  2707. line-height: 20px;
  2708. border-radius: 16px;
  2709. text-align: center;
  2710. border: #101010 1px solid;
  2711. margin-top: 12px;
  2712. }
  2713. ::v-deep .u-radio__label {
  2714. text-align: left;
  2715. height: 24px;
  2716. // color: rgba(0, 185, 98, 100);
  2717. font-size: 24px;
  2718. }
  2719. p {
  2720. height: 22px;
  2721. color: rgba(102, 102, 102, 100);
  2722. font-size: 14px;
  2723. margin-top: 12px;
  2724. white-space: nowrap
  2725. }
  2726. .hint {
  2727. text-align: center;
  2728. }
  2729. .btn-box {
  2730. margin-top: 20px;
  2731. .choice-btn {
  2732. width: 80%;
  2733. }
  2734. }
  2735. }
  2736. .wrap {
  2737. display: flex;
  2738. align-items: center;
  2739. justify-content: center;
  2740. height: 100%;
  2741. }
  2742. // 登录提示
  2743. .login-prompt {
  2744. width: 91.4%;
  2745. height: 40px;
  2746. line-height: 40px;
  2747. border-radius: 50px;
  2748. text-align: left;
  2749. padding-left: 16px;
  2750. padding-right: 4px;
  2751. background-color: rgba(0, 0, 0, 0.6);
  2752. position: fixed;
  2753. bottom: 75px;
  2754. color: #ffffff;
  2755. .button {
  2756. width: 88px;
  2757. height: 32px;
  2758. line-height: 32px;
  2759. border-radius: 50px;
  2760. background-color: rgba(0, 185, 98, 100);
  2761. text-align: center;
  2762. float: right;
  2763. margin-top: 4px;
  2764. }
  2765. }
  2766. .showOss {
  2767. ::v-deep .u-model,
  2768. ::v-deep .u-mode-center-box {
  2769. background-color: transparent;
  2770. }
  2771. }
  2772. .carNone {
  2773. display: flex;
  2774. flex-direction: column;
  2775. justify-content: center;
  2776. align-items: center;
  2777. img {
  2778. width: 100%;
  2779. height: 100%;
  2780. }
  2781. p {
  2782. margin-top: -60px;
  2783. }
  2784. }
  2785. .shopItemName {
  2786. min-height: 30px;
  2787. }
  2788. .shopItemPrice2 {
  2789. border-radius: 25px;
  2790. width: 64rpx;
  2791. height: 64rpx;
  2792. display: flex;
  2793. justify-content: center;
  2794. /* text-decoration: underline; */
  2795. color: #fff;
  2796. text-align: center;
  2797. align-items: center;
  2798. background: linear-gradient(180deg, rgba(255, 98, 0, 1) 0%, rgba(255, 40, 0, 1) 100%);
  2799. img{
  2800. width: 40rpx;
  2801. height: 40rpx;
  2802. }
  2803. }
  2804. .slogan-4 {
  2805. margin-top: 10px;
  2806. display: flex;
  2807. justify-content: center;
  2808. /* text-decoration: underline; */
  2809. text-align: center;
  2810. position: fixed;
  2811. /* top: 40px; */
  2812. bottom: 180px;
  2813. right: 20px;
  2814. height: 80rpx;
  2815. width: 80rpx;
  2816. line-height: 20px;
  2817. font-size: 16px;
  2818. background: linear-gradient(95deg, #FF9800, #FF5722);
  2819. box-shadow: 0 4rpx 24rpx 0 #FF5722;
  2820. //padding-top: 8px;
  2821. color: #fff;
  2822. border-radius: 25px;
  2823. }
  2824. .imageshake {
  2825. position: relative;
  2826. animation: shake 0.5s ease-in-out infinite;
  2827. }
  2828. @keyframes shake {
  2829. 0% {
  2830. transform: rotate(0deg);
  2831. }
  2832. 25% {
  2833. transform: rotate(8deg);
  2834. }
  2835. 50% {
  2836. transform: rotate(0deg);
  2837. }
  2838. 75% {
  2839. transform: rotate(-8deg);
  2840. }
  2841. 100% {
  2842. transform: rotate(0deg);
  2843. }
  2844. }
  2845. .shopList {
  2846. width: 91.4%;
  2847. margin: 8px auto 0;
  2848. border-radius: 8px;
  2849. padding: 12px 12px 12px 11px;
  2850. background-color: #fff;
  2851. display: flex;
  2852. justify-content: space-between;
  2853. flex-wrap: wrap;
  2854. .shopItem {
  2855. width: 45%;
  2856. margin: 3px;
  2857. margin-bottom: 32rpx;
  2858. .shopItemImg {
  2859. // width: 288rpx;
  2860. // height:288rpx ;
  2861. }
  2862. .shopItemPrice {
  2863. display: flex;
  2864. justify-content: space-between;
  2865. align-items: flex-end;
  2866. .shopItemPrice1 {
  2867. color: rgba(255, 40, 0, 1);
  2868. font-size: 40rpx;
  2869. text {
  2870. font-size: 24rpx
  2871. }
  2872. }
  2873. }
  2874. }
  2875. }
  2876. .options-item {
  2877. width: 100%;
  2878. // display: flex;
  2879. // justify-content: center;
  2880. background: rgb(255, 255, 255);
  2881. position: relative;
  2882. position: fixed;
  2883. left: 0;
  2884. right: 0;
  2885. top: 0;
  2886. z-index: 991;
  2887. }
  2888. .news-text {
  2889. width: 100%;
  2890. white-space: nowrap;
  2891. overflow: hidden;
  2892. text-overflow: ellipsis;
  2893. }
  2894. .rotate-animation {
  2895. animation: rotate 3s linear infinite;
  2896. }
  2897. @keyframes rotate {
  2898. from {
  2899. transform: rotate(0deg);
  2900. }
  2901. to {
  2902. transform: rotate(360deg);
  2903. }
  2904. }
  2905. ::v-deep .springclass{
  2906. .u-tabbar__content__item{
  2907. .u-icon__img {
  2908. width:56rpx !important;
  2909. height:56rpx !important
  2910. }
  2911. }
  2912. .u-tabbar__content__item:nth-child(1){
  2913. .u-icon__img {
  2914. width:72rpx !important;
  2915. height:72rpx !important
  2916. }
  2917. }
  2918. }
  2919. </style>