index.vue 77 KB

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