searchPile.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788
  1. <template>
  2. <view>
  3. <ujp-navbar :is-back="false" height='88' style="background-color: bisque;">
  4. <view class="ujp-navbar-main">
  5. <view class="ujp-navbar-main1">
  6. <view style="margin-left:20rpx;width: 160rpx;" v-if="false">
  7. <uni-combox class='font2' ref="city" :border="false" v-model="area" :candidates="cities"
  8. @updateModel='updateCity' @updateSelector="updateTypeSelector(3)"></uni-combox>
  9. </view>
  10. <view style="margin-right: 20rpx; margin-left:20rpx;flex:1">
  11. <u-search height="60" :input-style='inputStyle' placeholder="查询站点地址或站名" :showAction="false"
  12. @focus="navigate"></u-search>
  13. </view>
  14. <view style="margin-right: 20rpx;" v-show="viewMode" @click="listMode">
  15. <text class="iconfont">&#xe613;</text> <text class="list font2">列表</text>
  16. </view>
  17. <view style="margin-right: 20rpx;" v-show="!viewMode" @click="mapMode">
  18. <text class="iconfont">&#xe622;</text> <text class="list font2">地图</text>
  19. </view>
  20. </view>
  21. <view class="ujp-navbar-main2" @click="dropdownShow?$refs.uDropdown.close():$refs.uDropdown.open(0)" >
  22. <view style="display: flex;" v-if="false">
  23. <view
  24. style=" min-width: 180rpx; max-width: 200rpx;margin-left:20rpx;margin-right:10rpx;flex:1; ">
  25. <uni-combox class='font2' ref="radius" :border="false" v-model="radius"
  26. :candidates="radiuses" @updateModel='updateRadius'
  27. @updateSelector="updateTypeSelector('0')"></uni-combox>
  28. </view>
  29. <view style=" min-width: 180rpx; max-width: 200rpx;flex:1; ">
  30. <uni-combox ref="type" class='font2' :border="false" v-model="type" :candidates="types"
  31. @updateModel='updateType' @updateSelector="updateTypeSelector(1)"></uni-combox>
  32. </view>
  33. </view>
  34. <view class="tagListSelect" >
  35. <view class="tagBtn tagBtnAc" v-for="(item,i) in tagBtnAcList" :key="i" >
  36. {{item}}
  37. </view>
  38. </view>
  39. <view class="tagListSelect" v-show="!dropdownShow" v-if="false" >
  40. <view class="tagBtn" @click="tagspan1Btn" :class="{
  41. 'tagBtnAc':tagspan1
  42. }">
  43. 10公里
  44. </view>
  45. <view class="tagBtn" @click="tagspan2Btn" :class="{
  46. 'tagBtnAc':tagspan2
  47. }">
  48. 直流快充
  49. </view>
  50. <view class="tagBtn" @click="tagspan3Btn" :class="{
  51. 'tagBtnAc':tagspan3
  52. }">
  53. 特价站
  54. </view>
  55. </view>
  56. <view v-show="dropdownShow" >
  57. </view>
  58. <!-- <view style="flex:1;">
  59. <uni-combox ref="stationType" class='font2' :border="false" v-model="stationType"
  60. :candidates="stationTypes" @updateModel='updateType2'
  61. @updateSelector="updateTypeSelector(2)"></uni-combox>
  62. </view> -->
  63. <view style="margin-right: 20rpx;">
  64. <!-- -->
  65. <!-- <view v-show="dropdownShow" >
  66. <u-mask :show="dropdownShow" ></u-mask>
  67. </view> -->
  68. <jp-dropdown active-color="rgb(0, 185, 98)" @open="dropdownShow=true"
  69. @close="dropdownShow=false" ref="uDropdown" style=" display: contents;" :top="180">
  70. <u-dropdown-item title="筛选">
  71. <view class="slot-content">
  72. <view v-if="dropdownShow" class="u-text-center u-content-color ">
  73. <view class="preference" style="z-index:1024;width: 100%;">
  74. <view class="content-s">
  75. <view class="preference_group">
  76. <view class="preference_group_item"><label
  77. class="preference_label">距离我</label></view>
  78. <view>
  79. <u-tag class="preference_item"
  80. v-for="(item, index) in info.miles_type" :key="index"
  81. :style="index == preference.miles_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  82. shape="circle" :text="item.text"
  83. @click="selectMiles(index)"></u-tag>
  84. </view>
  85. </view>
  86. <view class="preference_group">
  87. <view class="preference_group_item"><label
  88. class="preference_label">充电站类型</label></view>
  89. <view>
  90. <u-tag class="preference_item_medium"
  91. v-for="(item, index) in info.obc_type" :key="index"
  92. :style="index == preference.obc_type_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  93. shape="circle" :text="item.text"
  94. @click="selectOBSType(index)"></u-tag>
  95. </view>
  96. </view>
  97. <view class="preference_group" >
  98. <view class="preference_group_item"><label
  99. class="preference_label">查询站点</label></view>
  100. <view>
  101. <u-tag class="preference_item_plus"
  102. v-for="(item, index) in info.obc_status" :key="index"
  103. :style="index == preference.obc_status_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  104. shape="circle" :text="item.text"
  105. @click="selectOBSStatus(index)"></u-tag>
  106. </view>
  107. </view>
  108. <view class="preference_group">
  109. <view class="preference_group_item"><label
  110. class="preference_label">运营模式</label></view>
  111. <view>
  112. <u-tag class="preference_item_medium"
  113. v-for="(item, index) in info.obc_stationType" :key="index"
  114. :style="index == preference.obc_stationType_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  115. shape="circle" :text="item.text"
  116. @click="selectOBSType2(index)"></u-tag>
  117. </view>
  118. </view>
  119. <view class="preference_group" v-if="false">
  120. <view class="preference_group_item"><label
  121. class="preference_label">是否对外开放</label></view>
  122. <view>
  123. <u-tag class="preference_item_plus"
  124. v-for="(item, index) in info.obc_status" :key="index"
  125. :style="index == preference.obc_status_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  126. shape="circle" :text="item.text"
  127. @click="selectOBSStatus(index)"></u-tag>
  128. </view>
  129. </view>
  130. <view class="preference_group" v-if="false">
  131. <view style="margin-left: 30rpx;"><u-checkbox active-color="#00b962"
  132. shape="circle" v-model="preference.save_preference"
  133. @change="radioChange">保存偏好设置</u-checkbox></view>
  134. </view>
  135. </view>
  136. <view class="pre-btn" style="display: flex;flex-direction: row;">
  137. <view class="btn-1 font3" @click="reset" style="width: 30%;">重置</view>
  138. <view class="btn-2 font3" @click="close"
  139. style="width: 70%;background-color: #00B962;color: #fff;">确定</view>
  140. </view>
  141. </view>
  142. </view>
  143. <!-- <u-button type="primary" @click="closeDropdown">确定</u-button> -->
  144. </view>
  145. </u-dropdown-item>
  146. </jp-dropdown>
  147. </view>
  148. </view>
  149. </view>
  150. </ujp-navbar>
  151. <!-- 定位 -->
  152. <view v-show="!viewMode">
  153. <view class="location-box" v-if="message != 'getLocation:ok' && stationslist.length == 0 ">
  154. <view class="location">
  155. <view class="location-text">
  156. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  157. 定位中...
  158. </view>
  159. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  160. 授权定位后可查询附近充电站
  161. </view>
  162. <view class="text-view">
  163. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;" @click="getPoint()">
  164. 重新定位
  165. </view>
  166. <view class="text-3 text-4 oldTextjp2" oldstyle="font-size: 16px;"
  167. @click="searchStationData()">
  168. 直接搜索
  169. </view>
  170. </view>
  171. </view>
  172. <view class="img-box">
  173. <img src="@/assets/static/img/暂无网络信号-缺省页 1.png">
  174. </view>
  175. </view>
  176. </view>
  177. <view v-else-if="message == 'getLocation:ok'&&stationslist.length==0">
  178. <view class="carNone" v-if="stationslist.length == 0">
  179. <img src="@/assets/static/img/暂无数据-缺省页.png" alt="">
  180. <p class="oldTextjp2" oldstyle="font-size: 18px;">{{loading?'暂无可用充电站':'正在为你加载可用的充电站...'}}</p>
  181. </view>
  182. </view>
  183. <view>
  184. <view>
  185. <view v-for="(item,index) in (stationslist.length?stationslist:defaultStation)" :key="item.id"
  186. class="charing-slow charing-new" @click="stationDetail(item)">
  187. <view class="new-img">
  188. <img :src="item.image" v-if="item.image" class="img1">
  189. <img v-else src="@/assets/img/chargesite_default.png" class="img1" mode=""></img>
  190. <view class="img2Class" v-if="item.isRecommend||stationslist.length==0">
  191. <img src="@/assets/img/9-4/推荐.svg" class="img2">
  192. </view>
  193. <view class="img2Class" v-else-if="item.isAlways" >
  194. <img src="@/assets/img/9-4/常用.svg" class="img2">
  195. </view>
  196. <view class="img2Class" v-else-if="item.isSpecial" >
  197. <img src="@/assets/img/9-4/特价tag.svg" class="img2">
  198. </view>
  199. </view>
  200. <view class="new-body">
  201. <view class="address">
  202. <view class="name oldTextjp" oldstyle="font-size: 20px;">
  203. {{item.name}}
  204. </view>
  205. </view>
  206. <view class="sign">
  207. <!-- <view class="sign-tag sign-0" v-if="item.isRecommend||stationslist.length==0">推荐</view>
  208. <view class="sign-tag sign-5" v-if="item.isAlways" >常用</view>
  209. -->
  210. <view class="sign-tag sign-1"
  211. v-if="item.giveDiscount&&item.discountRatio&&item.discountRatio!=100">
  212. 会员{{discountRatio10(item.discountRatio)}}折</view>
  213. <view class="sign-tag sign-4" v-if="item.nightLowPriceEnabled">
  214. 夜间超低价</view>
  215. <view class="sign-tag sign-3" v-if="item.category=='超充'">160kW超充站</view>
  216. <view class="sign-tag sign-2" v-if="item.platformType==1">自营站</view>
  217. <view class="sign-tag sign-2" v-if="item.tagList.length != 0"
  218. v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}</view>
  219. <template v-if="item.stationType==50">
  220. {{item.address}}
  221. </template>
  222. </view>
  223. <view class="price-free price-freeList" style="margin-top: 16rpx;">
  224. <view class="free">
  225. <view class="fast" v-if="item.fastNum">
  226. <view class="fast-font">
  227. </view>
  228. <view class="num">
  229. {{item.fastAvailableNum}}
  230. </view>
  231. <view class="num1">
  232. /{{item.fastNum}}
  233. </view>
  234. </view>
  235. <view class="slow" v-if="item.slowNum">
  236. <view class="slow-font">
  237. </view>
  238. <view class="num">
  239. {{item.slowAvailableNum}}
  240. </view>
  241. <view class="num1">
  242. /{{item.slowNum}}
  243. </view>
  244. </view>
  245. </view>
  246. <template v-if="stationslist.length!=0">
  247. <view class="distance " v-if="item.distance != '99999999'">
  248. <text class="iconfont" style="color:#666666">&#xe615;</text>
  249. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'km' : '小于100m'}}
  250. </view>
  251. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-else>
  252. <text class="iconfont" style="color:#666666">&#xe615;</text>
  253. 暂无定位
  254. </view>
  255. </template>
  256. </view>
  257. <u-line margin="16rpx 0 "></u-line>
  258. <view class="price-free price-freeList">
  259. <view class="price" v-if="personInfo&&personInfo.userType==2">
  260. <view class="price-1">
  261. <text class="num">{{!item.giveDiscount ? (item.electricityPrice+item.servicePrice).toFixed(2)
  262. : (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</text>
  263. <text class="unit " oldstyle="font-size: 14px;">
  264. 元/度
  265. </text>
  266. </view>
  267. <view class="price-3 " v-if="prevMonthKwhBL&&item.tagList&&item.tagList.length&&(item.tagList.indexOf('6折卡')>-1||item.tagList.indexOf('月卡')>-1||item.tagList.indexOf('自营站')>-1)">
  268. <view class="num1">
  269. <img src="@/assets/img/9-4/6折卡价.svg" />
  270. </view>
  271. <text
  272. class="num">{{ (item.electricityPrice+(item.servicePrice*0.6)).toFixed(2)}}元/度</text>
  273. </view>
  274. <view class="price-3 price-3-yue " v-if="!prevMonthKwhBL&&item.tagList&&item.tagList.length&&(item.tagList.indexOf('6折卡')>-1||item.tagList.indexOf('月卡')>-1||item.tagList.indexOf('自营站')>-1)">
  275. <view class="num1">
  276. <img src="@/assets/img/9-4/月卡价格.png" />
  277. </view>
  278. <text
  279. class="num">{{ (item.electricityPrice).toFixed(2)}}元/度</text>
  280. </view>
  281. </view>
  282. <!-- 游客价格-->
  283. <view class="price" v-else>
  284. <view class="price-1">
  285. <text class="num">
  286. {{showNumJP(item.electricityPrice+item.servicePrice)}}</text>
  287. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  288. </view>
  289. <view class="price-3 " oldstyle="font-size: 48rpx;" v-if="item.giveDiscount">
  290. <text class="num1">
  291. <img src="@/assets/img/9-4/会员价.svg" />
  292. </text>
  293. <text
  294. class="num">{{ showNumJP(item.electricityPrice+item.discountServicePrice)}}元/度</text>
  295. <text class="unit "></text>
  296. </view>
  297. </view>
  298. </view>
  299. </view>
  300. </view>
  301. <u-divider margin-top="20" v-if="stationslist.length!=0" style="margin-bottom: 20px;" bg-color="#F2F4F4"
  302. >已经到底了</u-divider>
  303. </view>
  304. </view>
  305. </view>
  306. <view v-show="viewMode">
  307. <view>
  308. <Chargermap @onMoveStart="moveStart" @onMoveEnd="moveEnd" ref="amap" @onClicked="onClicked"
  309. @onload="mapdown" @clickMap="clickMap"></Chargermap>
  310. <!--@location="location"-->
  311. <view class="locationBtn" style=' ' @click="setCenter">
  312. <u-image src="@/assets/static/img/location.png" border-radius="8" bg-color="#ffffff" width="20px"
  313. height="20px"></u-image>
  314. </view>
  315. </view>
  316. <!-- 新版卡片 -->
  317. <view class="chargerCard" v-if="stationsmap.length>0">
  318. <swiper v-if="stationsmap.length>0" :current="currentIndex" @change="swiperChange"
  319. slide-change-transition-end='swiperTransitionEnd' @transition="swiperTransition">
  320. <swiper-item v-for="(item,index) in stationsmap" :key="item.id" style="height: 100%;">
  321. <view class="swiper-item" style="height: 100%; background-color: #ffffff;"
  322. @click="stationDetail(item)">
  323. <view class="charing-slow charing-slow-2" @click="stationDetail(item)">
  324. <view class="address">
  325. <view class="name oldTextjp" oldstyle="font-size: 20px;">
  326. {{item.name}}
  327. </view>
  328. <view class="distance " v-if="item.distance != '99999999'">
  329. <text class="iconfont" style="color:#666666">&#xe615;</text>
  330. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}}
  331. </view>
  332. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-else>
  333. <text class="iconfont" style="color:#666666">&#xe615;</text>
  334. 暂无定位
  335. </view>
  336. </view>
  337. <view class="sign min-h">
  338. <view class="sign-tag sign-1"
  339. v-if="item.giveDiscount&&item.discountRatio&&item.discountRatio!=100">
  340. 会员{{discountRatio10(item.discountRatio)}}折</view>
  341. <view class="sign-tag sign-3" v-if="item.category=='超充'">160kW超充站</view>
  342. <view class="sign-tag sign-4" v-if="item.nightLowPriceEnabled">
  343. 夜间超低价</view>
  344. <view class="sign-tag sign-2" v-if="item.platformType==1">自营站</view>
  345. <view class="sign-tag sign-2" v-if="item.tagList.length != 0"
  346. v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}
  347. </view>
  348. </view>
  349. <view class="price-free price-freeOne">
  350. <view class="price" v-if="personInfo&&personInfo.userType==2">
  351. <view class="price-1">
  352. <text class="num">{{!item.giveDiscount ? (item.electricityPrice+item.servicePrice).toFixed(2)
  353. : (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</text>
  354. <text class="unit " oldstyle="font-size: 14px;">
  355. 元/度
  356. </text>
  357. </view>
  358. <view class="price-2 " oldstyle="font-size: 14px;" v-if="item.giveDiscount">
  359. <text
  360. class="num">{{(item.electricityPrice+item.servicePrice).toFixed(2)}}</text>
  361. <text class="unit">元/度</text>
  362. </view>
  363. </view>
  364. <!-- 游客价格-->
  365. <view class="price" v-else>
  366. <view class="price-1">
  367. <text class="num">
  368. {{(item.electricityPrice+item.servicePrice).toFixed(2)}}</text>
  369. <text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
  370. </view>
  371. <view class="price-3 " oldstyle="font-size: 48rpx;" v-if="item.giveDiscount">
  372. <text class="num1">会员</text>
  373. <text
  374. class="num">{{ (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</text>
  375. <text class="unit ">元/度</text>
  376. </view>
  377. </view>
  378. <view class="free">
  379. <view class="fast" v-if="item.fastNum">
  380. <view class="fast-font">
  381. </view>
  382. <view class="num">
  383. {{item.fastAvailableNum}}
  384. </view>
  385. <view class="num1">
  386. /{{item.fastNum}}
  387. </view>
  388. </view>
  389. <view class="slow" v-if="item.slowNum">
  390. <view class="slow-font">
  391. </view>
  392. <view class="num">
  393. {{item.slowAvailableNum}}
  394. </view>
  395. <view class="num1">
  396. /{{item.slowNum}}
  397. </view>
  398. </view>
  399. </view>
  400. </view>
  401. </view>
  402. </view>
  403. </swiper-item>
  404. </swiper>
  405. </view>
  406. </view>
  407. <Tabbar v-if="indexStyle.spring" class="springClass" bgColor="" inColor="#fff"
  408. acColor="#f9d79e" :current="2"
  409. ref="tabbarMain" ></Tabbar>
  410. <Tabbar v-else :current="2" ref="tabbarMain" ></Tabbar>
  411. </view>
  412. </template>
  413. <script>
  414. import * as indexAPI from '@/apis/index.js'
  415. import * as api from '@/apis/site.js';
  416. import Tabbar from '@/components/Tabbar.vue';
  417. import Chargermap from '@/components/Chargermap.vue';
  418. import jpDropdown from '@/components/Udropdown.vue';
  419. import uniCombox from '@/components/uni-combox/components/uni-combox/uni-combox.vue'
  420. import * as WxJsApi from '@/utils/wxJsApi.js'
  421. import {
  422. newDate,parseUnixTime
  423. } from '@/utils'
  424. export default {
  425. components: {
  426. Chargermap,
  427. Tabbar,
  428. uniCombox,
  429. jpDropdown
  430. },
  431. data() {
  432. return {
  433. tagBtnAcList:[],
  434. personInfo: {},
  435. loading: false,
  436. viewMode: false, //列表
  437. inputStyle: {
  438. backgroundColor: 'transparent',
  439. "font-size": '32rpx',
  440. },
  441. defaultStation: [],
  442. cities: ['荆州市'],
  443. radiuses: ['1公里', '2公里', '5公里', '10公里', '20公里', '50公里', '100公里', '200公里', '500公里'],
  444. types: ['全部', '直流快充', '交流慢充'],
  445. stationTypes: ['全部', '公共充电桩', '个人充电桩'],
  446. info: {
  447. miles_type: [
  448. {
  449. value: '',
  450. text: '全部'
  451. },{
  452. distance: 1,
  453. text: '1公里'
  454. },
  455. {
  456. distance: 2,
  457. text: '2公里'
  458. },
  459. {
  460. distance: 5,
  461. text: '5公里'
  462. },
  463. {
  464. distance: 10,
  465. text: '10公里'
  466. },
  467. {
  468. distance: 20,
  469. text: '20公里'
  470. },
  471. {
  472. distance: 50,
  473. text: '50公里'
  474. },
  475. {
  476. distance: 100,
  477. text: '100公里'
  478. },
  479. {
  480. distance: 200,
  481. text: '200公里'
  482. },
  483. {
  484. distance: 500,
  485. text: '500公里'
  486. }
  487. ],
  488. obc_type: [{
  489. value: '',
  490. text: '全部'
  491. }, {
  492. value: 1,
  493. text: '直流快充'
  494. }, {
  495. value: 2,
  496. text: '交流慢充'
  497. }],
  498. obc_status: [{
  499. value: 0,
  500. text: '全部'
  501. }, {
  502. value: 1,
  503. text: '特价站'
  504. }],
  505. obc_voltage: [{
  506. value: 0,
  507. text: '低于700V'
  508. }, {
  509. value: 1,
  510. text: '700V及以上'
  511. }],
  512. obc_power: {
  513. minValue: 0,
  514. maxValue: 1000
  515. },
  516. obc_stationType: [{
  517. value: '',
  518. text: '全部'
  519. }, {
  520. value: -1,
  521. text: '自营站'
  522. }, {
  523. value: 1,
  524. text: '合作站'
  525. }, {
  526. value: 50,
  527. text: '个人桩'
  528. }]
  529. },
  530. preference: {
  531. miles_index: 4,
  532. obc_stationType_index: 0,
  533. obc_type_index: 0,
  534. obc_status_index: 0,
  535. obc_voltage_index: 0,
  536. save_preference: false,
  537. obc_power: {
  538. minValue: 0,
  539. maxValue: 500
  540. }
  541. },
  542. area: '荆州市',
  543. radius: '10公里',
  544. type: '全部',
  545. stationType: '全部',
  546. longitude: '',
  547. latitude: '',
  548. message: '',
  549. stationslist: [],
  550. stationsmap: [],
  551. pointTimeOut: true,
  552. dropdownShow: false,
  553. currentIndex: 0,
  554. carImg3span1:0,
  555. carImg3span2:0,
  556. tagspan1:true,
  557. tagspan2:false,
  558. tagspan3:false,
  559. indexStyle: {
  560. noticeBarBgColor: "#fff",
  561. noticeBarColor: "#FF3D00",
  562. backgroundClass: "background",
  563. spring: false,
  564. }
  565. }
  566. },
  567. onUnload() {
  568. //this.timeOut = false;
  569. this.pointTimeOut = false;
  570. },
  571. onHide() {
  572. //this.timeOut = false;
  573. this.pointTimeOut = false;
  574. },
  575. onShow() {
  576. if (this.$refs.tabbarMain) {
  577. this.$refs.tabbarMain.setcount(2);
  578. }
  579. if (!this.pointTimeOut) {
  580. this.pointTimeOut = true
  581. this.getPointTimeOut();
  582. }
  583. this.$nextTick(() => {
  584. this.type = this.info.obc_type[this.preference.obc_type_index].text;
  585. this.radius = this.info.miles_type[this.preference.miles_index].text;
  586. this.stationType = this.info.obc_stationType[this.preference.obc_stationType_index].text;
  587. if (this.viewMode) {
  588. this.$refs.amap.init();
  589. this.searchStationData()
  590. }
  591. })
  592. },
  593. onLoad() {
  594. this.spring()
  595. },
  596. onReady() {
  597. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  598. // //(res)
  599. }).catch(error => {
  600. //(res)
  601. })
  602. if (this.carhelp.getPersonInfo()) {
  603. // this.userId = this.carhelp.getPersonInfo().id;
  604. this.personInfo = this.carhelp.getPersonInfo();
  605. }
  606. this.getPointTimeOut();
  607. this.getChargeList()
  608. },
  609. computed: {
  610. prevMonthKwhBL(){
  611. if(this.carImg3span1>=1000){
  612. return false
  613. }
  614. return true
  615. },
  616. },
  617. methods: {
  618. spring() {
  619. this.springShow=false;
  620. try{
  621. if(this.carhelp.getConfig().spring2024){
  622. var spring2024=this.carhelp.getConfig().spring2024
  623. var sz=spring2024.split(',')
  624. if(sz&&sz.length==2){
  625. var time1=new Date(sz[0])
  626. var time2=new Date(sz[1])
  627. var time0=new Date()
  628. if(time0>time1&&time0<time2){
  629. this.springShow=true;
  630. }
  631. }
  632. }
  633. this.$forceUpdate()
  634. }catch(e){
  635. }
  636. if(!this.springShow){
  637. return
  638. }
  639. this.indexStyle.noticeBarBgColor = "#C00000"
  640. this.indexStyle.noticeBarColor = "#FFD695"
  641. this.indexStyle.backgroundClass = "background-spring"
  642. this.indexStyle.spring = true;
  643. },
  644. tagspan1Btn(){
  645. this.tagspan1=!this.tagspan1
  646. if(this.tagspan1){
  647. this.preference.miles_index=4
  648. }else{
  649. this.preference.miles_index=0
  650. }
  651. this.close(1);
  652. },
  653. tagspan2Btn(){
  654. this.tagspan2=!this.tagspan2
  655. if(this.tagspan2){
  656. this.preference.obc_type_index=1
  657. }else{
  658. this.preference.obc_type_index=0
  659. }
  660. this.close(1);
  661. },
  662. tagspan3Btn(){
  663. this.tagspan3=!this.tagspan3
  664. if(this.tagspan3){
  665. }else{
  666. }
  667. this.close(1);
  668. },
  669. getChargeList(){
  670. var obj=this.carhelp.get("carhelp_getChargeList")
  671. var time=new Date( ).toLocaleString().substr(0,12).replace("T"," ");
  672. if(obj&&time==obj.time){
  673. this.carImg3span1=parseInt(obj.electricQuantity);
  674. this.carImg3span2=parseInt(obj.totalServiceMoney) ;
  675. console.log("carhelp_getChargeList",this.carImg3span1,this.carImg3span2)
  676. return
  677. }
  678. var date =new Date().getTime()-30*1000*60*60*24;
  679. var startDate =parseUnixTime(new Date(date),'{y}-{m}-{d}');
  680. if (this.carhelp.getPersonInfo()) {
  681. indexAPI.chargingRecordData({
  682. pageIndex: 1,
  683. pageSize:999,
  684. startDate: startDate,
  685. // endDate: this.endDate
  686. }).then((res) => {
  687. var chargeList =res.data.data;
  688. var num1=0;
  689. var num2=0;
  690. for(var i in chargeList){
  691. var obj=chargeList[i]
  692. if(obj.status==2){
  693. num1+=obj.electricQuantity
  694. num2+=obj.totalServiceMoney
  695. }
  696. }
  697. console.log(num1,num2)
  698. this.carImg3span1=parseInt(num1);
  699. this.carImg3span2=parseInt(num2) ;
  700. this.carhelp.set("carhelp_getChargeList",{
  701. time: time,
  702. electricQuantity:num1,
  703. totalServiceMoney:num2
  704. })
  705. // if(num2*0.4>20){
  706. // this.carImg3Bl=true;
  707. // }else{
  708. // this.carImg4Bl=true;
  709. // }
  710. }).catch(error => {
  711. uni.showToast({
  712. title: error,
  713. icon: "none"
  714. })
  715. })
  716. }
  717. },
  718. navigate() {
  719. //('naviage to ')
  720. uni.navigateTo({
  721. url: '/pages/search/search'
  722. })
  723. },
  724. isEnabled() {
  725. if (this.viewMode) {
  726. if (this.show)
  727. return false;
  728. }
  729. return true;
  730. },
  731. stationDetail(item) {
  732. if (!this.isEnabled()) {
  733. return;
  734. }
  735. uni.navigateTo({
  736. url: 'stationAndPile/stationDetails?id=' + item.id
  737. })
  738. },
  739. setCenter() {
  740. //('getPoint')
  741. WxJsApi.getLocation().then((res) => {
  742. this.latitude = parseFloat(res.latitude);
  743. this.longitude = parseFloat(res.longitude);
  744. //let data = {position:{latitude:latitude,longitude:longitude}};
  745. let posCenter = {
  746. longitude: this.longitude,
  747. latitude: this.latitude
  748. };
  749. this.$refs.amap.setCenter(posCenter);
  750. this.searchStationData();
  751. }).catch(error => {
  752. uni.showToast({
  753. title: JSON.stringify(error)
  754. })
  755. })
  756. // //('setCenter')
  757. },
  758. updateType2(e) {
  759. this.preference.obc_stationType_index = e.value;
  760. this.close();
  761. },
  762. swiperTransitionEnd(e) {
  763. },
  764. swiperTransition(e) {
  765. //
  766. },
  767. updateType(e) {
  768. this.preference.obc_type_index = e.value;
  769. this.close();
  770. },
  771. updateRadius(e) {
  772. this.preference.miles_index = e.value;
  773. this.close();
  774. },
  775. selectOBSType(index) {
  776. this.preference.obc_type_index = index;
  777. },
  778. selectOBSType2(index) {
  779. this.preference.obc_stationType_index = index;
  780. },
  781. selectOBSStatus(index) {
  782. this.preference.obc_status_index = index;
  783. },
  784. selectOBCVoltage(index) {
  785. this.preference.obc_voltage_index = index;
  786. },
  787. selectMiles(index) {
  788. this.preference.miles_index = index;
  789. },
  790. swiperChange(e) {
  791. if (!this.viewMode) {
  792. return
  793. }
  794. this.currentIndex = e.detail.current
  795. let station = this.stationsmap[this.currentIndex];
  796. let posCenter = {
  797. longitude: station.longitude,
  798. latitude: station.latitude
  799. };
  800. // //('currentIndex'+JSON.stringify(this.currentIndex))
  801. // //('currentIndex'+JSON.stringify(posCenter))
  802. // //('station'+JSON.stringify(station))
  803. let bounds = this.$refs.amap.logMapInfo();
  804. /*if( (posCenter.latitude<bounds.bounds.northeast.lat && posCenter.latitude>bounds.bounds.sourthwest.lat)
  805. && (posCenter.longitude<bounds.bounds.northeast.lng && posCenter.longitude>bounds.bounds.sourthwest.lng)
  806. ){
  807. //('bounds'+JSON.stringify(bounds));
  808. }else{
  809. this.$refs.amap.setCenter(posCenter);
  810. }*/
  811. this.$refs.amap.updateCharger(station);
  812. this.$refs.amap.setCenter(posCenter);
  813. },
  814. listMode() {
  815. //this.close_all();
  816. this.viewMode = false
  817. },
  818. mapMode() {
  819. //this.$refs.amap.setChargerList(this.stationslist);
  820. this.$refs.amap.init();
  821. //this.currentIndex = 0;
  822. //this.close_all();
  823. this.searchStationData()
  824. this.viewMode = true
  825. },
  826. reset() {
  827. this.tagspan1=true;
  828. this.tagspan2=false;
  829. this.tagspan3=false;
  830. this.preference.obc_status_index = 0;
  831. this.preference.obc_voltage_index = 0;
  832. this.preference.obc_stationType_index = 0;
  833. this.preference.obc_type_index = 0;
  834. this.preference.miles_index = 4;
  835. this.preference.save_preference = false;
  836. // this.$refs.obc_voltage.currentValue = [0,100];
  837. this.preference.obc_power.minValue = 0;
  838. this.preference.obc_power.maxValue = 500;
  839. this.preference.obc_power.minP = Math.floor((this.preference.obc_power.minValue / (this.info.obc_power
  840. .maxValue - this.info.obc_power.minValue)) * 100);
  841. this.preference.obc_power.maxP = Math.floor((this.preference.obc_power.maxValue / (this.info.obc_power
  842. .maxValue - this.info.obc_power.minValue)) * 100);
  843. // //('minP'+this.preference.obc_power.minP)
  844. // //('maxP'+this.preference.obc_power.maxP)
  845. //this.$refs.obc_voltage.reset(this.preference.obc_power);
  846. // this.$refs.obc_voltage.currentMaxValue = this.preference.obc_power[1];
  847. // //('reset')
  848. },
  849. close(bl) {
  850. if(bl){
  851. this.tagspan1=(this.preference.miles_index==4)
  852. this.tagspan2=(this.preference.obc_type_index==1)
  853. }else{
  854. this.updateTypeSelector('')
  855. }
  856. this.type = this.info.obc_type[this.preference.obc_type_index].text;
  857. this.radius = this.info.miles_type[this.preference.miles_index].text;
  858. this.stationType = this.info.obc_stationType[this.preference.obc_stationType_index].text;
  859. if (this.preference.save_preference) {
  860. this.carhelp.set('preference', this.preference)
  861. }
  862. this.$refs.uDropdown.close();
  863. this.searchStationData();
  864. },
  865. clickMap(obj) {
  866. //this.show = false;
  867. if (obj == null || obj.type == null) return;
  868. if (obj.type == 'charger') {
  869. if (obj.obj != null) {
  870. let index = this.stationsmap.findIndex(item => item.id == obj.obj.id);
  871. this.currentIndex = index;
  872. //('find Index'+index);
  873. }
  874. }
  875. },
  876. getPoint() {
  877. if (this.stationslist.length != 0) {
  878. return
  879. }
  880. WxJsApi.getLocation().then((res) => {
  881. this.latitude = parseFloat(res.latitude);
  882. this.longitude = parseFloat(res.longitude);
  883. this.message = res.errMsg;
  884. if (res.errMsg != 'getLocation:ok') {
  885. uni.showToast({
  886. title: res
  887. })
  888. } else {
  889. uni.showToast({
  890. title: "定位中..."
  891. })
  892. this.searchStationData()
  893. }
  894. }).catch(error => {
  895. uni.showToast({
  896. title: error,
  897. icon: "none"
  898. })
  899. })
  900. },
  901. searchStationData(obj) {
  902. this.tagBtnAcList=[]
  903. let data1 = {
  904. latitude: this.latitude,
  905. longitude: this.longitude,
  906. findType: "1",
  907. pageIndex: 1,
  908. pageSize: 999
  909. };
  910. if (obj) {
  911. data1 = {
  912. ...data1,
  913. ...obj
  914. }
  915. }
  916. data1.type = this.info.obc_type[this.preference.obc_type_index].value;
  917. if (this.info.miles_type[this.preference.miles_index].distance != null){
  918. data1.radius = this.info.miles_type[this.preference.miles_index].distance.toString();
  919. this.tagBtnAcList.push(data1.radius+"公里")
  920. }
  921. if(data1.type){
  922. this.tagBtnAcList.push(this.info.obc_type[this.preference.obc_type_index].text)
  923. }
  924. if(this.tagspan3||this.preference.obc_status_index){
  925. data1.special=1
  926. this.tagBtnAcList.push("特价站")
  927. }
  928. if (this.preference.obc_stationType_index != null) {
  929. var stationType = this.info.obc_stationType[this.preference.obc_stationType_index].value
  930. if (stationType == -1) {
  931. data1.platformType = "1"
  932. } else {
  933. data1.stationType = stationType
  934. }
  935. if(stationType){
  936. this.tagBtnAcList.push(this.info.obc_stationType[this.preference.obc_stationType_index].text)
  937. }
  938. }
  939. //this.currentIndex = -1;
  940. //data1.findType = this.viewMode?"0":"1";
  941. uni.showLoading({})
  942. if (this.carhelp.getPersonInfo()) {
  943. data1.openId = this.carhelp.getOpenId()
  944. }
  945. this.loading = false
  946. api.getChargingStationData(data1).then(res => {
  947. uni.hideLoading()
  948. this.loading = true
  949. this.recordsTotal = res.data.recordsTotal;
  950. var stationslist = res.data.data
  951. if (this.viewMode) {
  952. this.stationsmap = stationslist;
  953. this.$refs.amap.setChargerList(stationslist);
  954. // this.$refs.amap.init();
  955. if (this.currentIndex == -1 || this.currentIndex > stationslist.length) {
  956. this.currentIndex = 0
  957. }
  958. if (stationslist.length) {
  959. this.$refs.amap.updateCharger(stationslist[this.currentIndex]);
  960. }
  961. let posCenter = {
  962. longitude: this.longitude,
  963. latitude: this.latitude
  964. };
  965. this.$refs.amap.setCenter(posCenter);
  966. this.$refs.amap.calcDistances([this.longitude, this.latitude], this.stationslist)
  967. // this.$refs.amap.calcDistances([this.longitude, this.latitude], this.stationslist)
  968. } else {
  969. this.stationslist = stationslist;
  970. }
  971. if (this.stationslist.length == 0) {
  972. this.getChargingStationDetail()
  973. }
  974. }).catch(error => {
  975. uni.showToast({
  976. title: error,
  977. icon: "none"
  978. })
  979. })
  980. },
  981. getChargingStationDetail() {
  982. var defaultStation = process.car.defaultStation
  983. for (var item in defaultStation) {
  984. api.getChargingStationDetail({
  985. stationId: defaultStation[item]
  986. }).then((res) => {
  987. var station = res.data.station
  988. //this.MapLoaderthen(station)
  989. this.defaultStation.push(station)
  990. }).catch(error => {
  991. uni.showToast({
  992. title: error,
  993. icon: "none"
  994. })
  995. })
  996. }
  997. },
  998. getPointTimeOut() {
  999. setTimeout(() => {
  1000. if (this.pointTimeOut) {
  1001. this.getPoint();
  1002. }
  1003. }, 1000)
  1004. },
  1005. closeDropdown() {
  1006. this.$refs.uDropdown.close();
  1007. },
  1008. close_all() {
  1009. //this.updateTypeSelector('')
  1010. },
  1011. updateTypeSelector(val) {
  1012. var sz = ["radius", "type", 'city']
  1013. for (var i in sz) {
  1014. if (i == val && val != '') {
  1015. } else {
  1016. this.$refs[sz[i]].closeSelector();
  1017. }
  1018. }
  1019. //this.show = false;
  1020. },
  1021. mapdown() {
  1022. //this.isReady = true;
  1023. //this.$refs.amap.getLocation ();
  1024. //let state = {};
  1025. uni.getSystemInfo({
  1026. success: (res) => {
  1027. let scrollH = res.windowHeight; // - uni.upx2px(88) - navbarH
  1028. let scrollW = res.windowWidth;
  1029. this.$refs.amap.setMyStyle("height:" + (scrollH - 88 - 50) + "px;width:" + scrollW +
  1030. "px;");
  1031. }
  1032. })
  1033. },
  1034. moveEnd(e) {
  1035. //('moveEnd')
  1036. this.close_all();
  1037. let posCenter = this.$refs.amap.logMapInfo();
  1038. ////('posCenter'+JSON.stringify(posCenter))
  1039. if (this.latitude == e.center.lat && this.longitude == e.center.lng) {
  1040. return
  1041. }
  1042. this.latitude = e.center.lat
  1043. this.longitude = e.center.lng
  1044. this.searchStationData();
  1045. },
  1046. moveStart(e) {
  1047. //this.close_all();
  1048. },
  1049. onClicked(e) {
  1050. this.close_all();
  1051. ////('onClicked e'+JSON.stringify(e))
  1052. },
  1053. }
  1054. }
  1055. </script>
  1056. <style lang="scss" scoped>
  1057. @import "@/_theme.scss";
  1058. .tagListSelect{
  1059. display: flex;
  1060. padding: 0 24rpx;
  1061. .tagBtn{
  1062. border-radius: 4px;
  1063. background-color: #f2f2f2;
  1064. color: rgba(51, 51, 51, 1);
  1065. font-size: 28rpx;
  1066. text-align: center;
  1067. margin: 0 8rpx;
  1068. padding: 2px 16rpx;
  1069. }
  1070. .tagBtnAc{
  1071. background-color: rgba(225, 249, 237, 1);
  1072. color: rgba(0, 185, 98, 1);
  1073. }
  1074. }
  1075. .locationBtn {
  1076. width: 30px;
  1077. height: 30px;
  1078. position: absolute;
  1079. z-index: 1023;
  1080. right: 40rpx;
  1081. bottom: 520rpx;
  1082. background: white;
  1083. display: flex;
  1084. align-items: center;
  1085. justify-content: center;
  1086. border: 1px solid;
  1087. border-radius: 8px;
  1088. }
  1089. .ujp-navbar-main {
  1090. display: flex;
  1091. flex-direction: column;
  1092. width: 100%;
  1093. height: 100%;
  1094. .ujp-navbar-main1 {
  1095. display: flex;
  1096. flex-direction: row;
  1097. height: 100%;
  1098. align-items: center;
  1099. margin-top: 0rpx;
  1100. padding-top: 0rpx;
  1101. padding-bottom: 10rpx;
  1102. }
  1103. .ujp-navbar-main2 {
  1104. display: flex;
  1105. flex-direction: row;
  1106. width: 100%;
  1107. justify-content: space-between;
  1108. align-items: center;
  1109. }
  1110. }
  1111. .preference_group_item {
  1112. padding: 15rpx;
  1113. }
  1114. .preference_group {
  1115. padding-bottom: 20rpx;
  1116. }
  1117. .preference {
  1118. background-color: #ffffff;
  1119. left: 0rpx;
  1120. // position: absolute
  1121. }
  1122. .preference_item {
  1123. margin-bottom: 10rpx;
  1124. margin-left: 20rpx;
  1125. text-align: center;
  1126. border-style: none;
  1127. width: 20%;
  1128. //height: 56rpx;
  1129. /* line-height: 14px;*/
  1130. }
  1131. .content-s {
  1132. height: 640rpx;
  1133. overflow-y: scroll;
  1134. text-align: left;
  1135. }
  1136. .preference_item_medium {
  1137. margin-bottom: 10rpx;
  1138. margin-left: 20rpx;
  1139. text-align: center;
  1140. border-style: none;
  1141. min-width: 22%;
  1142. //height: 56rpx;
  1143. @include themeify {
  1144. font-size: themed('font-size2');
  1145. line-height: themed('font-size2');
  1146. }
  1147. /* line-height: 14px;*/
  1148. }
  1149. .preference_item_plus {
  1150. margin-bottom: 10rpx;
  1151. margin-left: 20rpx;
  1152. align-items: center;
  1153. justify-content: center;
  1154. text-align: center;
  1155. width: 28%;
  1156. border-style: none;
  1157. //height: 56rpx;
  1158. @include themeify {
  1159. font-size: themed('font-size2');
  1160. line-height: themed('font-size2');
  1161. }
  1162. /* line-height: 14px;*/
  1163. }
  1164. .preference_label {
  1165. @include themeify {
  1166. color: themed('font_colorLabel');
  1167. font-size: themed('font-size1');
  1168. font-weight: themed('fontWeight');
  1169. }
  1170. margin-left: 20rpx;
  1171. margin-bottom: 100rpx;
  1172. }
  1173. .pre-btn {
  1174. width: 100%;
  1175. height: 96rpx;
  1176. z-index: 999;
  1177. }
  1178. .btn-1,
  1179. .btn-2 {
  1180. height: 96rpx;
  1181. line-height: 96rpx;
  1182. text-align: center;
  1183. border-top: 1px solid rgba(225, 228, 232, 100);
  1184. }
  1185. .station,
  1186. .location,
  1187. .state1 {
  1188. box-shadow: 0px 4rpx 12rpx 0px #008c4a33;
  1189. }
  1190. //定位
  1191. .location {
  1192. width: 91.4%;
  1193. background-color: #ffffff;
  1194. height: 120px;
  1195. display: flex;
  1196. justify-content: space-between;
  1197. margin: 20px auto 0;
  1198. border-radius: 8px;
  1199. border: #F2F4F4 1px;
  1200. .location-text {
  1201. padding: 24px 0 0 28px;
  1202. .text-1 {
  1203. height: 16px;
  1204. line-height: 16px;
  1205. color: rgba(16, 16, 16, 100);
  1206. font-size: 16px;
  1207. text-align: left;
  1208. }
  1209. .text-2 {
  1210. height: 17px;
  1211. line-height: 17px;
  1212. color: rgba(102, 102, 102, 100);
  1213. font-size: 12px;
  1214. text-align: left;
  1215. margin-top: 4px;
  1216. white-space: nowrap; //强制不换行
  1217. text-overflow: ellipsis; //文本超出出现省略号
  1218. overflow: hidden;
  1219. }
  1220. .text-view {
  1221. display: flex;
  1222. }
  1223. .text-3 {
  1224. width: 80px;
  1225. height: 24px;
  1226. line-height: 22px;
  1227. border-radius: 50px;
  1228. color: rgba(0, 185, 98, 100);
  1229. font-size: 12px;
  1230. text-align: center;
  1231. border: 1px solid rgba(0, 185, 98, 100);
  1232. margin-top: 11px;
  1233. }
  1234. .text-4 {
  1235. margin-left: 10px;
  1236. color: #ff9900;
  1237. border: 1px solid #ff9900;
  1238. }
  1239. }
  1240. .img-box {
  1241. width: 120px;
  1242. height: 120px;
  1243. margin-right: 20px;
  1244. img {
  1245. width: 100%;
  1246. height: 100%;
  1247. }
  1248. }
  1249. }
  1250. .carNone {
  1251. display: flex;
  1252. flex-direction: column;
  1253. justify-content: center;
  1254. align-items: center;
  1255. img {
  1256. width: 100%;
  1257. height: 100%;
  1258. }
  1259. p {
  1260. margin-top: -60px;
  1261. }
  1262. }
  1263. .charing-slow-2 {
  1264. margin: 0 0 20rpx 0 !important;
  1265. // border-bottom: 1px solid rgba(238, 242, 240, 100);
  1266. }
  1267. .charing-slow {
  1268. //box-shadow: 0px 4rpx 12rpx 0px #008c4a33;
  1269. background-color: #fff;
  1270. margin: 26rpx;
  1271. border-radius: 16rpx;
  1272. padding: 24rpx;
  1273. position: relative;
  1274. left: 0;
  1275. right: 0;
  1276. }
  1277. .min-h {
  1278. min-height: 65px;
  1279. }
  1280. .sign {
  1281. display: flex;
  1282. flex-wrap: wrap;
  1283. margin-top: 10px;
  1284. .sign-tag {
  1285. height: 36rpx;
  1286. line-height: 32rpx;
  1287. border-radius: 8rpx;
  1288. //background-color: rgba(255, 255, 255, 100);
  1289. //color: rgba(255, 139, 0, 100);
  1290. font-size: 10px;
  1291. text-align: center;
  1292. //border: 1px solid rgba(255, 139, 0, 100);
  1293. padding: 0 8rpx;
  1294. margin-right: 8rpx;
  1295. margin-bottom: 8rpx;
  1296. }
  1297. .sign-0 {
  1298. background: linear-gradient(89.4deg, rgba(129, 97, 255, 1) 2.8%, rgba(169, 147, 255, 1) 98.02%);
  1299. color: rgba(255, 255, 255, 1);
  1300. //padding: 0 10rpx;
  1301. //border: 1px solid rgba(255, 139, 0, 100);
  1302. }
  1303. .sign-5 {
  1304. background: linear-gradient(89.4deg, rgba(255, 61, 0, 1) 2.8%, rgba(255, 134, 0, 1) 98.02%);
  1305. color: rgba(255, 255, 255, 1);
  1306. //padding: 0 10rpx;
  1307. }
  1308. .sign-1 {
  1309. background-color: rgba(255, 255, 255, 100);
  1310. color: rgba(255, 139, 0, 100);
  1311. border: 1px solid rgba(255, 139, 0, 100);
  1312. }
  1313. .sign-2 {
  1314. background-color: rgba(255, 255, 255, 100);
  1315. color: rgba(153, 153, 153, 100);
  1316. border: 1px solid rgba(204, 204, 204, 100);
  1317. }
  1318. .sign-3 {
  1319. background-color: rgba(255, 255, 255, 100);
  1320. color: #8161FF;
  1321. border: 1px solid #8161FF;
  1322. }
  1323. .sign-4 {
  1324. background-color: rgba(255, 255, 255, 100);
  1325. color: #00B962;
  1326. border: 1px solid #00B962;
  1327. }
  1328. }
  1329. .address {
  1330. width: 100%;
  1331. line-height: 20px;
  1332. display: flex;
  1333. justify-content: space-between;
  1334. .name {
  1335. font-size: 36rpx;
  1336. white-space: nowrap;
  1337. overflow: hidden;
  1338. text-overflow: ellipsis;
  1339. }
  1340. @include themeify {
  1341. font-size: themed('font-size5');
  1342. line-height: themed('font-size7');
  1343. }
  1344. /* font-size: 11px;*/
  1345. font-weight: 600;
  1346. color: #101010;
  1347. }
  1348. .price-free {
  1349. width: 100%;
  1350. display: flex;
  1351. align-items: center;
  1352. justify-content: space-between;
  1353. }
  1354. .distance {
  1355. color: rgba(102, 102, 102, 100);
  1356. text-align: end;
  1357. font-size: 30rpx;
  1358. width: 180rpx;
  1359. min-width: 180rpx;
  1360. .iconfont {
  1361. font-size: 12px;
  1362. margin-right: 2px;
  1363. }
  1364. }
  1365. .price {
  1366. display: flex;
  1367. align-items: center;
  1368. .price-1 {
  1369. line-height: 40rpx;
  1370. .num {
  1371. //color: rgba(255, 98, 0, 100);
  1372. color: rgba(16, 16, 16, 1);
  1373. font-size: 40rpx;
  1374. //height: 44rpx;
  1375. font-weight: bold;
  1376. text-align: left;
  1377. font-family: Roboto-medium;
  1378. }
  1379. .unit {
  1380. // font-size: 12px;
  1381. color: rgba(119, 119, 119, 1);
  1382. font-size: 28rpx;
  1383. text-align: left;
  1384. font-family: AlibabaPuHui-regular;
  1385. margin-left: 8rpx;
  1386. }
  1387. }
  1388. .price-2 {
  1389. color: rgba(153, 153, 153, 100);
  1390. margin-left: 6rpx;
  1391. text-decoration: line-through;
  1392. font-size: 24rpx
  1393. }
  1394. .price-3{
  1395. display: flex;
  1396. background: linear-gradient(93.02deg, rgba(59,182,254,1) 39.4%,rgba(0,185,98,1) 92.96%);
  1397. border-radius: 4px;
  1398. height: 16px;
  1399. min-height: 16px;
  1400. margin-left: 32rpx;
  1401. // align-items: center;
  1402. line-height: 16px;
  1403. .num1{
  1404. img{
  1405. // width: 88rpx;
  1406. //width: 34px;
  1407. height: 16px;
  1408. }
  1409. /deep/.u-image{
  1410. min-height: 16px;
  1411. }
  1412. }
  1413. .num{
  1414. padding: 0 12rpx 0 8rpx;
  1415. color: rgba(255, 255, 255, 1);
  1416. font-size: 11px;
  1417. display: flex;
  1418. align-items: center;
  1419. }
  1420. }
  1421. .price-3-yue{
  1422. background: linear-gradient(88.81deg, rgba(219,199,167,1) 1.89%,rgba(194,154,93,1) 98%);
  1423. }
  1424. }
  1425. .free {
  1426. display: flex;
  1427. align-items: center;
  1428. .slow,
  1429. .fast {
  1430. display: flex;
  1431. .sp-font {
  1432. width: 40rpx;
  1433. height: 40rpx;
  1434. line-height: 40rpx;
  1435. border-radius: 4px;
  1436. background-color: #7a68f6;
  1437. color: #fff;
  1438. font-size: 28rpx;
  1439. text-align: center;
  1440. margin-right: 2rpx;
  1441. }
  1442. .fast-font {
  1443. width: 40rpx;
  1444. height: 40rpx;
  1445. line-height: 40rpx;
  1446. border-radius: 4px;
  1447. //background-color: rgba(186, 240, 215, 100);
  1448. background-color: #1677FF;
  1449. color: rgba(255, 255, 255, 1);
  1450. //color: rgba(0, 130, 69, 100);
  1451. font-size: 28rpx;
  1452. text-align: center;
  1453. margin-right: 2rpx;
  1454. }
  1455. .slow-font {
  1456. width: 40rpx;
  1457. height: 40rpx;
  1458. line-height: 40rpx;
  1459. border-radius: 4px;
  1460. // background-color: rgba(226, 226, 226, 100);
  1461. // color: rgba(128, 128, 128, 100);
  1462. background-color: #00B962;
  1463. color: rgba(255, 255, 255, 1);
  1464. font-size: 28rpx;
  1465. text-align: center;
  1466. margin-right: 2rpx;
  1467. }
  1468. .num {
  1469. font-size: 32rpx;
  1470. color: #666;
  1471. line-height: 40rpx;
  1472. }
  1473. .num1 {
  1474. font-size: 32rpx;
  1475. color: #bbb;
  1476. line-height: 40rpx;
  1477. }
  1478. }
  1479. .slow {
  1480. margin-left: 16rpx;
  1481. }
  1482. }
  1483. .chargerCard {
  1484. z-index: 999;
  1485. background-color: #fff;
  1486. margin: 0 24rpx;
  1487. border-radius: 16rpx;
  1488. // overflow: hidden;
  1489. bottom: 68px;
  1490. left: 0;
  1491. right: 0;
  1492. position: fixed;
  1493. // height: 380rpx;
  1494. // @include themeify{
  1495. // height:themed('cardHeight');
  1496. // }
  1497. }
  1498. .charing-new {
  1499. display: flex;
  1500. .new-img {
  1501. .img1 {
  1502. width: 120rpx;
  1503. height: 120rpx;
  1504. border-radius: 4px;
  1505. }
  1506. .img2Class{
  1507. top: -134rpx;
  1508. left: -16rpx;
  1509. position: relative;
  1510. border-radius: 4px 4px 4px 0px;
  1511. color: #fff;
  1512. padding: 2px 6px;
  1513. font-size: 10px;
  1514. line-height: 10px;
  1515. height: 1px;
  1516. background-blend-mode: soft-light;
  1517. .img2 {
  1518. width: 56rpx;
  1519. height: 32rpx;
  1520. min-width: 28px;
  1521. min-height: 16px;
  1522. //border-radius: 4px;
  1523. }
  1524. }
  1525. }
  1526. .new-body {
  1527. width: 75%;
  1528. margin-left: 24rpx;
  1529. //max-min-width: 65%;
  1530. .sign {
  1531. margin-top: 12rpx;
  1532. }
  1533. }
  1534. }
  1535. </style>