searchPile.vue 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916
  1. <template>
  2. <view class='font1'>
  3. <ujp-navbar :is-back="false" :height='nav_height'style="background-color: bisque;">
  4. <view style="display: flex;flex-direction: column; width: 100%;height: 100%;">
  5. <view style="display: flex;flex-direction: row; height: 100%; align-items: center;margin-top:0rpx;padding-top: 0rpx;padding-bottom: 20rpx;">
  6. <view style="margin-left:20rpx;width: 160rpx;">
  7. <uni-combox class='font2' ref="city" :border="false" v-model="area" :candidates="cities" @updateModel='updateCity' @updateSelector="updateCitySelector"></uni-combox>
  8. </view>
  9. <view style="margin-left: 20rpx;margin-right: 20rpx; flex:1" >
  10. <u-search height="80" :input-style='inputStyle' placeholder="搜索站点名称" v-model="keyword" :showAction="false" @focus="navigate"></u-search></view>
  11. <view style="margin-right: 20rpx;" v-show="viewMode" @click="listMode">
  12. <text class="iconfont">&#xe613;</text> <text class="list font2">列表</text>
  13. <!-- <u-icon name="list-dot" size="26" color="#c0c4cc"></u-icon>
  14. <label>列表</label>-->
  15. </view>
  16. <view style="margin-right: 20rpx;" v-show="!viewMode" @click="mapMode">
  17. <text class="iconfont">&#xe622;</text> <text class="list font2">地图</text>
  18. <!--<u-icon name="map" size="26" color="#c0c4cc"></u-icon>
  19. <label>地图</label>
  20. -->
  21. </view>
  22. </view>
  23. <view style="display: flex;flex-direction: row;width:100%; justify-content: space-between;align-items: center;">
  24. <view style="margin-left:20rpx;width: 160rpx;">
  25. <uni-combox class='font2' ref="raidus" style="width: 200rpx;" :border="false" v-model="raidus" :candidates="radiuses" @updateModel='updateRadius' @updateSelector="updateRadiusSelector"></uni-combox>
  26. </view>
  27. <!--
  28. <view style="margin-left: 20rpx;">
  29. <label class="arrow">{{ info.miles_type[preference.miles_index].text }}</label>
  30. <u-icon name="arrow-down-fill" size="13" color="#c0c4cc"></u-icon>
  31. </view>
  32. -->
  33. <view style="margin-left:20rpx;margin-right: 20rpx;flex:1">
  34. <uni-combox ref="type" class='font2' style="width: 200rpx;" :border="false" v-model="type" :candidates="types" @updateModel='updateType' @updateSelector="updateTypeSelector"></uni-combox>
  35. </view>
  36. <!-- <view style="margin-left: 20rpx;margin-right: 20rpx;flex:1">
  37. <label class="arrow">{{ info.obc_type[preference.obc_type_index].text }}</label>
  38. <u-icon name="arrow-down-fill" size="13" color="#c0c4cc"></u-icon>
  39. </view>-->
  40. <view style="margin-right: 20rpx;" @click="open">
  41. <label v-if="show" class="arrow font2" style="color: #00b962;">{{ action }}</label>
  42. <label v-else class="arrow font2" >{{ action }}</label>
  43. <u-icon v-if="show" name="arrow-up-fill" size="13" color="#00B962"></u-icon>
  44. <u-icon v-else name="arrow-down-fill" size="13" color="#999999"></u-icon>
  45. </view>
  46. </view>
  47. </view>
  48. </ujp-navbar>
  49. <view class="content" >
  50. <view v-if="show" class="preference" :style="show ? 'z-index:1024;top:'+navBarHeight+'px;' : 'z-index:0'" style="width: 100%;">
  51. <view class="content-s">
  52. <view class="preference_group">
  53. <view class="preference_group_item"><label class="preference_label">距离我</label></view>
  54. <view>
  55. <u-tag
  56. class="preference_item"
  57. v-for="(item, index) in info.miles_type"
  58. :key="index"
  59. :style="index == preference.miles_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  60. shape="circle"
  61. :text="item.text"
  62. @click="selectMiles(index)"
  63. ></u-tag>
  64. </view>
  65. </view>
  66. <view class="preference_group">
  67. <view class="preference_group_item"><label class="preference_label">充电站类型</label></view>
  68. <view>
  69. <u-tag
  70. class="preference_item_medium"
  71. v-for="(item, index) in info.obc_type"
  72. :key="index"
  73. :style="index == preference.obc_type_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  74. shape="circle"
  75. :text="item.text"
  76. @click="selectOBSType(index)"
  77. ></u-tag>
  78. </view>
  79. </view>
  80. <view class="preference_group">
  81. <view class="preference_group_item"><label class="preference_label">是否对外开放</label></view>
  82. <view>
  83. <u-tag
  84. class="preference_item_plus"
  85. v-for="(item, index) in info.obc_status"
  86. :key="index"
  87. :style="index == preference.obc_status_index ? 'background-color:#00B962;color:#FFFFFF' : 'background-color:#EFF4F2;color:#926666'"
  88. shape="circle"
  89. :text="item.text"
  90. @click="selectOBSStatus(index)"
  91. ></u-tag>
  92. </view>
  93. </view>
  94. <view class="preference_group">
  95. <view style="margin-left: 30rpx;"><u-checkbox active-color="#00b962" shape="circle" v-model="preference.save_preference" @change="radioChange">保存偏好设置</u-checkbox></view>
  96. </view>
  97. </view>
  98. <view class="pre-btn" style="display: flex;flex-direction: row;">
  99. <view class="btn-1 font3" @click="reset" style="width: 30%;">重置</view>
  100. <view class="btn-2 font3" @click="close" style="width: 70%;background-color: #00B962;color: #fff;">确定</view>
  101. </view>
  102. </view>
  103. <u-mask :show="show" @click="show = false"></u-mask>
  104. <view v-show="!viewMode" >
  105. <!-- <view v-for="(item,index) in stationslist" :key="item.id" class="charing-slow" @click="stationDetail(item)">
  106. <text :class="item.type == '快充' ? 'fast-charge':(item.type == '慢充' ? 'trickle-charge':'fast-trickle-charge')">{{item.type}}</text> <text class="station-items">{{item.name}}</text>
  107. <view class="address">
  108. {{item.position}}
  109. </view>
  110. <view class="price">
  111. <view class="num">{{item.price}}</view>
  112. <view class="unit">
  113. 元/度 起
  114. </view>
  115. </view>
  116. <view class="park">
  117. <text class="park-p" style="color: #FFFFFF;">p</text>
  118. <text class="park-text">2小时免费停车</text>
  119. </view>
  120. <view class="free">
  121. <view class="free-num">
  122. <text style="color:#009143;">空闲{{item.idleNum}}</text>/总数{{item.total}}
  123. </view>
  124. <view class="distance">
  125. <text class="iconfont distance-font">&#xe615;</text>{{item.distance.toFixed(1)}}公里 {{item.time.toFixed(0)}}分钟
  126. </view>
  127. </view>
  128. </view> -->
  129. <view class="carNone" v-if="stationslist.length == 0">
  130. <img src="static/img/暂无数据-缺省页.png" alt="">
  131. <p class="oldTextjp2" oldstyle="font-size: 18px;">暂无可用充电站</p>
  132. </view>
  133. <view v-for="(item,index) in stationslist" :key="item.id" class="charing-slow" @click="stationDetail(item)">
  134. <view class="address">
  135. <view class="name oldTextjp" oldstyle="font-size: 20px;">
  136. {{item.name}}
  137. </view>
  138. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-if="item.distance != '99999999'">
  139. <text class="iconfont" style="color:#666666">&#xe615;</text>
  140. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}}
  141. </view>
  142. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-else>
  143. <text class="iconfont" style="color:#666666">&#xe615;</text>
  144. 暂无定位
  145. </view>
  146. </view>
  147. <view class="sign">
  148. <view class="sign-1" v-if="item.giveDiscount">服务费{{item.discountRatio/10}}折</view>
  149. <view class="sign-2" v-if="item.tagList.length != 0" v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}</view>
  150. </view>
  151. <view class="price-free">
  152. <view class="price">
  153. <view class="price-1">
  154. <view class="num">{{!item.giveDiscount ? (item.electricityPrice+item.servicePrice).toFixed(2)
  155. : (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</view>
  156. <view class="unit oldTextjp2" oldstyle="font-size: 14px;">
  157. 元/度 起
  158. </view>
  159. </view>
  160. <view class="price-2 oldTextjp2" oldstyle="font-size: 14px;" v-if="item.giveDiscount">
  161. <text class="num">{{(item.electricityPrice+item.servicePrice).toFixed(2)}}</text>
  162. <text class="unit">元/度 起</text>
  163. </view>
  164. </view>
  165. <view class="free">
  166. <view class="fast" v-if="item.type == '快充' || item.type == '快/慢'">
  167. <view class="fast-font">
  168. </view>
  169. <view class="num">
  170. {{item.fastAvailableNum}}/{{item.fastNum}}
  171. </view>
  172. </view>
  173. <view class="slow" v-if="item.type == '慢充' || item.type == '快/慢'">
  174. <view class="slow-font">
  175. </view>
  176. <view class="num">
  177. {{item.slowAvailableNum}}/{{item.slowNum}}
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. <!-- <view class="free">
  183. <text :class="item.type == '快充' ? 'fast-charge':(item.type == '慢充' ? 'trickle-charge':'fast-trickle-charge')">{{item.type}}</text>
  184. <view class="free-num">
  185. <text style="color:#009143;">空闲{{item.idleNum}}</text>/总数{{item.total}}
  186. </view>
  187. <view class="distance" v-if="item.distance!=99999999">
  188. <text class="iconfont distance-font">&#xe615;</text>
  189. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}} {{item.time.toFixed(0)}}分钟
  190. </view>
  191. <view class="distance" v-else>
  192. <text class="iconfont distance-font">&#xe615;</text>
  193. 导航
  194. </view>
  195. </view> -->
  196. </view>
  197. <u-divider margin-top="20" bg-color="#F2F4F4" v-if="stationslist.length != 0">已经到底了</u-divider>
  198. </view>
  199. <view v-show="viewMode">
  200. <view>
  201. <Chargermap @onMoveStart="moveStart" @onMoveEnd="moveEnd" ref="amap" @onClicked="onClicked" @onload="mapdown" @clickMap="clickMap"></Chargermap>
  202. <!--@location="location"-->
  203. <u-image style='position:absolute;z-index:1023;right:40rpx;bottom:520rpx; '
  204. src="@/static/img/location.png" border-radius="8" bg-color="#ffffff" width="30px" height="30px" @click="setCenter"></u-image>
  205. </view>
  206. <!-- 新版卡片 -->
  207. <view class="chargerCard" >
  208. <view class="charing-slow charing-slow-2" >
  209. <view class="address">
  210. <view class="name oldTextjp" oldstyle="font-size: 20px;">
  211. 荆鹏软件园充电站B01
  212. </view>
  213. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" >
  214. <text class="iconfont" style="color:#666666">&#xe615;</text>
  215. 小于100米
  216. </view>
  217. <!-- <view class="distance oldTextjp2" oldstyle="font-size: 16px;">
  218. <text class="iconfont" style="color:#666666">&#xe615;</text>
  219. 暂无定位
  220. </view> -->
  221. </view>
  222. <view class="sign">
  223. <view class="sign-1" >会员享服务费8.5折</view>
  224. <view class="sign-2">2小时停车免费</view>
  225. <view class="sign-2">服务费代金券</view>
  226. <view class="sign-2">包月卡</view>
  227. <view class="sign-2">超级代金券</view>
  228. </view>
  229. <view class="price-free">
  230. <view class="price">
  231. <view class="price-1">
  232. <view class="num">1.21</view>
  233. <view class="unit oldTextjp2" oldstyle="font-size: 14px;">
  234. 元/度 起
  235. </view>
  236. </view>
  237. <view class="price-2 oldTextjp2" oldstyle="font-size: 14px;" >
  238. <text class="num">1.23</text>
  239. <text class="unit">元/度 起</text>
  240. </view>
  241. </view>
  242. <view class="free">
  243. <view class="fast" >
  244. <view class="fast-font">
  245. </view>
  246. <view class="num">
  247. 1/2
  248. </view>
  249. </view>
  250. <view class="slow" >
  251. <view class="slow-font">
  252. </view>
  253. <view class="num">
  254. 1/2
  255. </view>
  256. </view>
  257. </view>
  258. </view>
  259. </view>
  260. </view>
  261. <!-- 老版卡片-->
  262. <!-- <view v-if="stationsmap.length>0" class="chargerCard" >
  263. <swiper v-if="stationsmap.length>0" :current="currentIndex" @change="swiperChange" slide-change-transition-end='swiperTransitionEnd' @transition="swiperTransition" style="height: 100%;">
  264. <swiper-item v-for="(item,index) in stationsmap" :key="item.id" style="height: 100%;">
  265. <view class="swiper-item" style="height: 100%; background-color: #ffffff;" @click="stationDetail(item)">
  266. <view class="charing-slow charing-slow-2" @click="stationDetail(item)">
  267. <view class="address">
  268. <view class="name oldTextjp" oldstyle="font-size: 20px;">
  269. {{item.name}}
  270. </view>
  271. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-if="item.distance != '99999999'">
  272. <text class="iconfont" style="color:#666666">&#xe615;</text>
  273. {{item.distance!=null && item.distance>0.1 ? item.distance.toFixed(1)+'公里' : '小于100米'}}
  274. </view>
  275. <view class="distance oldTextjp2" oldstyle="font-size: 16px;" v-else>
  276. <text class="iconfont" style="color:#666666">&#xe615;</text>
  277. 暂无定位
  278. </view>
  279. </view>
  280. <view class="sign">
  281. <view class="sign-1" v-if="item.giveDiscount">服务费{{item.discountRatio/10}}折</view>
  282. <view class="sign-2" v-if="item.tagList.length != 0" v-for="(tagName,tagIndex) in item.tagList" :key="tagIndex">{{tagName}}</view>
  283. </view>
  284. <view class="price-free">
  285. <view class="price">
  286. <view class="price-1">
  287. <view class="num">{{!item.giveDiscount ? (item.electricityPrice+item.servicePrice).toFixed(2)
  288. : (item.electricityPrice+item.discountServicePrice).toFixed(2)}}</view>
  289. <view class="unit oldTextjp2" oldstyle="font-size: 14px;">
  290. 元/度 起
  291. </view>
  292. </view>
  293. <view class="price-2 oldTextjp2" oldstyle="font-size: 14px;" v-if="item.giveDiscount">
  294. <text class="num">{{(item.electricityPrice+item.servicePrice).toFixed(2)}}</text>
  295. <text class="unit">元/度 起</text>
  296. </view>
  297. </view>
  298. <view class="free">
  299. <view class="fast" v-if="item.type == '快充' || item.type == '快/慢'">
  300. <view class="fast-font">
  301. </view>
  302. <view class="num">
  303. {{item.fastAvailableNum}}/{{item.fastNum}}
  304. </view>
  305. </view>
  306. <view class="slow" v-if="item.type == '慢充' || item.type == '快/慢'">
  307. <view class="slow-font">
  308. </view>
  309. <view class="num">
  310. {{item.slowAvailableNum}}/{{item.slowNum}}
  311. </view>
  312. </view>
  313. </view>
  314. </view>
  315. </view>
  316. <view class="card_item" >
  317. <u-button shape='circle' style="color: #00B962;" @click="getScanCode" >
  318. <u-icon name="scan" size="26" color="#00B962" ></u-icon>
  319. <label>扫码充电</label>
  320. </u-button>
  321. <view class="round" @click.stop="navigateTo(item)" v-if="item.distance!=99999999">
  322. <text class="iconfont distance-font">&#xe615;</text>
  323. <view style="margin-right: 10rpx;" >
  324. {{item.distance!=null&&item.distance>0.1 ? item.distance.toFixed(1)+'公里':'小于100米'}}
  325. </view>
  326. <view style="margin-right: 10rpx;">
  327. {{item.time!=null?item.time.toFixed(0):''}}分钟
  328. </view>
  329. </view>
  330. <view class="round" @click.stop="navigateTo(item)" v-else>
  331. <text class="iconfont distance-font">&#xe615;</text>
  332. <view style="margin-right: 10rpx;" >
  333. 导航
  334. </view>
  335. </view>
  336. </view>
  337. </view>
  338. </swiper-item>
  339. </swiper>
  340. </view> -->
  341. </view>
  342. </view>
  343. <Tabbar :current="1" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
  344. </view>
  345. </template>
  346. <script>
  347. // import api from './site-index.js'
  348. // export default api
  349. import * as indexAPI from '@/apis/index.js'
  350. import * as api from '@/apis/site.js';
  351. import Chargermap from '@/components/Chargermap.vue';
  352. import DoubleSlider from '@/components/double-slider/DoubleSlider.vue';
  353. import Tabbar from '@/components/Tabbar.vue';
  354. import uniCombox from '@/components/uni-combox/components/uni-combox/uni-combox.vue'
  355. import * as WxJsApi from '@/utils/wxJsApi.js'
  356. //import * as Map from '@/utils/openMap.js'
  357. //import MapLoader from '@/utils/AMap'
  358. //import xflSelect from '@/components/xfl-select/xfl-select.vue'
  359. let _self;
  360. export default {
  361. components: {
  362. Chargermap,
  363. DoubleSlider,
  364. Tabbar,
  365. uniCombox,
  366. // xflSelect
  367. },
  368. data() {
  369. return {
  370. elderStatus: false,
  371. inputStyle:{
  372. backgroundColor: 'transparent',
  373. "font-size":'18px',
  374. "font-weight":"normal"
  375. },
  376. nav_height:88,
  377. elderMode:false,
  378. showCity:false,
  379. showType:false,
  380. showRadius:false,
  381. cities: [ '荆州市'],
  382. radiuses:['1公里','2公里','5公里','10公里','20公里','50公里','100公里','200公里'],
  383. types:['全部','交流快充','直流慢充'],
  384. area: '荆州市',
  385. raidus:'',
  386. type:'',
  387. centerImg:'@/static/img/location.png',
  388. currentIndex:-1,
  389. navBarHeight:88,
  390. viewMode: false, //列表
  391. keyword: '',
  392. show: false,
  393. mapopen: false,
  394. isReady: false,
  395. id: '',
  396. longitude:null,
  397. latitude: null,
  398. name:'荆鹏软件园',
  399. // longitude: '',
  400. // latitude: '',
  401. nearbyStationInfo: {
  402. nearbyShiftDTOList: []
  403. },
  404. action: '筛选',
  405. preference: {
  406. miles_index: 3,
  407. obc_type_index: 0,
  408. obc_status_index: 0,
  409. obc_voltage_index: 0,
  410. save_preference: false,
  411. obc_power: { minValue: 0, maxValue: 500 }
  412. },
  413. stationsmap:[
  414. /* {name:'荆鹏软件园充电站',position:'湖北省荆州市沙市区江津东路附155号',price:1.2,idle:10,total:10,distance:0.1,time:1,type:'慢充'},
  415. {name:'荆鹏软件园充电站2',position:'湖北省荆州市沙市区江津东路附156号',price:1.2,idle:10,total:10,distance:0.1,time:1,type:'快充'},
  416. {name:'荆鹏软件园充电站3',position:'湖北省荆州市沙市区江津东路附157号',price:1.2,idle:10,total:10,distance:0.1,time:1,type:'慢充'},
  417. {name:'荆鹏大道求助站充电站',position:'湖北省荆州市沙市区江津东路附158号',price:1.2,idle:10,total:10,distance:0.1,time:1,type:'快充'},
  418. */
  419. ],
  420. first:true,
  421. timer:null,
  422. swipping:false,
  423. stationslist:[],
  424. info: {
  425. miles_type: [
  426. { distance: 1, text: '1公里' },
  427. { distance: 2, text: '2公里' },
  428. { distance: 5, text: '5公里' },
  429. { distance: 10, text: '10公里' },
  430. { distance: 20, text: '20公里' },
  431. { distance: 50, text: '50公里' },
  432. { distance: 100, text: '100公里' },
  433. { distance: 200, text: '200公里' }
  434. ],
  435. obc_type: [{ value: '', text: '全部' }, { value: 0, text: '直流快充' }, { value: 1, text: '交流慢充' }],
  436. obc_status: [{ value: 0, text: '对外开放' }, { value: 1, text: '不对外开放' }],
  437. obc_voltage: [{ value: 0, text: '低于700V' }, { value: 1, text: '700V及以上' }],
  438. obc_power: { minValue: 0, maxValue: 1000 }
  439. },
  440. userId:'',
  441. };
  442. },
  443. onLoad(op) {
  444. _self = this;
  445. var px = uni.upx2px(172);
  446. this.nav_height = px;
  447. // //('longitude0 ' + _self.longitude);
  448. // //('latitude0 ' + _self.latitude);
  449. // if (op != null) {
  450. // if (op.longitude != null) this.longitude = op.longitude;
  451. // if (op.latitude != null) this.latitude = op.latitude;
  452. // if (op.id != null) this.id = op.id;
  453. // }
  454. // if(this.elderMode)
  455. // {
  456. // window.document.getElementsByTagName('body')[0].style.setProperty('--theme', 1);
  457. // }
  458. //navigation.getPoint();
  459. let data1 = {latitude:this.latitude,longtitude:this.longitude,findType:"1"};
  460. this.getChargingStationData(data1);
  461. },
  462. onReady() {
  463. if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  464. this.elderStatus = true;
  465. } else {
  466. this.elderStatus = false;
  467. }
  468. // //('长者模式'+JSON.stringify(this.carhelp.get("getElderModeClass")));
  469. this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
  470. //this.elderMode = true;
  471. if(this.elderMode)
  472. this.theme('elder')
  473. else
  474. this.theme('standard')
  475. if (this.carhelp.getPersonInfo()) {
  476. this.userId = this.carhelp.getPersonInfo().id;
  477. }
  478. let preference = this.carhelp.get('preference',this.preference)
  479. if(preference.save_preference)
  480. {
  481. this.preference = preference;
  482. //('preference'+JSON.stringify(preference))
  483. }
  484. this.types = [];
  485. for(let i = 0;i< this.info.obc_type.length;i++){
  486. this.types.push(this.info.obc_type[i].text);
  487. }
  488. this.radiuses = [];
  489. for(let i = 0;i< this.info.miles_type.length;i++){
  490. this.radiuses.push(this.info.miles_type[i].text);
  491. }
  492. this.type = this.info.obc_type[this.preference.obc_type_index].text;
  493. this.raidus = this.info.miles_type[this.preference.miles_index].text;
  494. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  495. // //(res)
  496. }).catch(error => {
  497. //(error)
  498. })
  499. // //('longitude2 '+this.longitude)
  500. // //('latitude2 '+this.latitude)
  501. this.$refs.amap.init();
  502. //this.getPositionByLonLats();
  503. // this.$refs.amap.setMyStyle("height:1500rpx;width:100%;");
  504. // this.$refs.amap.setMyStyle("height:calc(100%-176rpx);width:100%;");
  505. // //('longitude3 '+this.longitude)
  506. // //('latitude3 '+this.latitude)
  507. },
  508. onShow() {
  509. if(this.$refs.tabbarMain){
  510. this.$refs.tabbarMain.setcount(1);
  511. }
  512. // //('onShow')
  513. if (this.isReady) {
  514. }
  515. },
  516. onHide(){
  517. this.end();
  518. },
  519. methods: {
  520. updateCitySelector(){
  521. //('updateCitySelector');
  522. this.$refs.type.closeSelector();
  523. this.$refs.raidus.closeSelector();
  524. //this.$refs.city.closeSelector();
  525. this.show = false;
  526. },
  527. updateTypeSelector(){
  528. //('updateTypeSelector');
  529. //this.$refs.type.closeSelector();
  530. this.$refs.raidus.closeSelector();
  531. this.$refs.city.closeSelector();
  532. this.show = false;
  533. },
  534. updateRadiusSelector(){
  535. //('updateRadiusSelector');
  536. this.$refs.type.closeSelector();
  537. //this.$refs.raidus.closeSelector();
  538. this.$refs.city.closeSelector();
  539. this.show = false;
  540. },
  541. updateCity(e){
  542. this.close();
  543. },
  544. updateRadius(e){
  545. this.preference.miles_index = e.value;
  546. this.close();
  547. //('updateRadius'+JSON.stringify(e))
  548. },
  549. updateType(e){
  550. this.preference.obc_type_index = e.value;
  551. this.close();
  552. //('updateType'+JSON.stringify(e))
  553. },
  554. setCenter(){
  555. //('getPoint')
  556. WxJsApi.getLocation().then((res) => {
  557. _self.latitude = parseFloat(res.latitude);
  558. _self.longitude = parseFloat(res.longitude);
  559. //let data = {position:{latitude:latitude,longitude:longitude}};
  560. let posCenter= {longitude: _self.longitude,latitude: _self.latitude};
  561. this.$refs.amap.setCenter(posCenter);
  562. }).catch(error => {
  563. uni.showToast({
  564. title:JSON.stringify(error)
  565. })
  566. })
  567. // //('setCenter')
  568. },
  569. getScanCode() {
  570. if(!this.isEnabled())
  571. return;
  572. if (this.userId) {
  573. WxJsApi.scanQRCode(1).then(res => {
  574. if(res) {
  575. indexAPI.scanCode(res).then((response) => {
  576. }).catch(error => {
  577. uni.showToast({
  578. title: error,
  579. icon: "none"
  580. })
  581. })
  582. }
  583. }).catch(error => {
  584. })
  585. } else {
  586. uni.navigateTo({
  587. url: '/pages/login/login'
  588. })
  589. }
  590. },
  591. //导航
  592. guide(signMap,item) {
  593. let self = this;
  594. if (item.position && item.position != '') {
  595. //景点位置partnerAddress 景点经纬度lng lat
  596. var lng = self.lng;
  597. var lat = self.lat;
  598. if (signMap == 'gd') {
  599. // 高德地图
  600. //('signMap')
  601. if (self.customBrowserVersion().android) {
  602. window.location.href = "androidamap://viewMap?sourceApplication=appname&poiname=" + item.position +
  603. "&lat=" + item.latitude + "&lon=" + item.longitude + "&dev=0";
  604. //判断是否跳转
  605. setTimeout(function () {
  606. let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||
  607. window.document.webkitHidden
  608. if (typeof hidden == "undefined" || hidden == false) {
  609. //调用高德地图
  610. window.location.href = "https://uri.amap.com/marker?position=" + item.longitude + "," + item.latitude +
  611. "&name=" + item.position;
  612. }
  613. }, 2000);
  614. } else if (self.customBrowserVersion().ios) {
  615. window.location.href = "iosamap://viewMap?sourceApplication=appname&poiname=" + item.position +
  616. "&lat=" + item.latitude + "&lon=" + item.longitude + "&dev=0";
  617. //判断是否跳转
  618. setTimeout(function () {
  619. let hidden = window.document.hidden || window.document.mozHidden || window.document.msHidden ||
  620. window.document.webkitHidden
  621. if (typeof hidden == "undefined" || hidden == false) {
  622. //调用高德地图
  623. window.location.href = "https://uri.amap.com/marker?position=" + item.longitude + "," + item.latitude +
  624. "&name=" + item.position;
  625. }
  626. }, 2000);
  627. }
  628. } else if (signMap == 'bd') {
  629. // 百度地图
  630. if (self.customBrowserVersion().android) {
  631. //安卓操作系统
  632. let d = new Date();
  633. let t0 = d.getTime();
  634. window.location.href = "androidamap://viewMap?sourceApplication=appname&poiname=" + item.position+
  635. "&lat=" + item.latitude + "&lon=" + item.longitude + "&dev=0";
  636. //由于打开需要1~2秒,利用这个时间差来处理--打开app后,返回h5页面会出现页面变成app下载页面,影响用户体验
  637. var delay = setInterval(function () {
  638. var d = new Date();
  639. var t1 = d.getTime();
  640. if (t1 - t0 < 3000 && t1 - t0 > 2000) {
  641. window.location.href = "http://api.map.baidu.com/marker?location=" + item.latitude + "," +
  642. item.longitude + "&title=" + item.position +
  643. "&content=充电桩&output=html&src=webapp.baidu.openAPIdemo";
  644. }
  645. if (t1 - t0 >= 3000) {
  646. clearInterval(delay);
  647. }
  648. }, 1000);
  649. }
  650. if (self.customBrowserVersion().ios) {
  651. //ios操作系统
  652. let d = new Date();
  653. let t0 = d.getTime();
  654. window.location.href = "iosamap://viewMap?sourceApplication=appname&poiname=" + self.partnerAddress +
  655. "&lat=" + lat + "&lon=" + lng + "&dev=0";
  656. //由于打开需要1~2秒,利用这个时间差来处理--打开app后,返回h5页面会出现页面变成app下载页面,影响用户体验
  657. let delay = setInterval(function () {
  658. var d = new Date();
  659. var t1 = d.getTime();
  660. if (t1 - t0 < 3000 && t1 - t0 > 2000) {
  661. window.location.href = "http://api.map.baidu.com/marker?location=" + item.latitude + "," +
  662. item.longitude + "&title=" + item.position +
  663. "&content=充电桩&output=html&src=webapp.baidu.openAPIdemo";
  664. }
  665. if (t1 - t0 >= 3000) {
  666. clearInterval(delay);
  667. }
  668. }, 1000);
  669. }
  670. }
  671. } else {
  672. uni.showToast({
  673. title:'暂时不知道充电桩位置'
  674. })
  675. }
  676. },
  677. //区分设备
  678. customBrowserVersion() {
  679. var u = navigator.userAgent;
  680. return {
  681. trident: u.indexOf('Trident') > -1, //IE内核
  682. presto: u.indexOf('Presto') > -1, //opera内核
  683. webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
  684. gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
  685. mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
  686. ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
  687. android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
  688. iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
  689. iPad: u.indexOf('iPad') > -1, //是否iPad
  690. webApp: u.indexOf('Safari') == -1, //是否web应用程序,没有头部与底部
  691. weixin: u.indexOf('MicroMessenger') > -1, //是否微信 (2015-01-22新增)
  692. qq: u.match(/\sQQ/i) == " qq", //是否QQ
  693. isBaidu: u.indexOf('baiduboxapp') !== -1, //是否为百度浏览器
  694. isqqBrowser: u.indexOf('mqqbrowser') !== -1, //是否为qq浏览器
  695. isWxBrowser: u.indexOf('micromessenger') !== -1, //是否为微信浏览器
  696. isUc: u.indexOf('ucbrowser') !== -1, //是否为uc浏览器
  697. };
  698. },
  699. navigateTo(item){
  700. /*
  701. this.elderMode = !this.elderMode;
  702. if(this.elderMode)
  703. this.theme('elder')
  704. else
  705. this.theme('standard')
  706. return;
  707. */
  708. //this.guide('gd',item);
  709. ////('导航'+JSON.stringify(item))
  710. window.location.href="https://uri.amap.com/marker?position="+ item.longitude+","+item.latitude+"&name="+item.name;
  711. //Map.getRoute(item);
  712. //Map.openMap(this.latitude, this.longitude, this.name, 'wgs84')
  713. //var startLngLat = [this.longitude, this.latitude]
  714. //var endLngLat = [item.longitude, item.latitude]
  715. ///let platform = uni.getSystemInfoSync().platform
  716. ////('platform'+JSON.stringify(platform))
  717. //this.$refs.amap.navigate(startLngLat,endLngLat);
  718. },
  719. navigate(){
  720. //('naviage to ')
  721. uni.navigateTo({
  722. url:'/pages/search/search'
  723. })
  724. },
  725. getPoint() {
  726. // //('getPoint')
  727. WxJsApi.getLocation().then((res) => {
  728. var latitude = parseFloat(res.latitude);
  729. var longitude = parseFloat(res.longitude);
  730. let data = {position:{latitude:latitude,longitude:longitude}};
  731. _self.location(data);
  732. if(_self.first)
  733. {
  734. var obj = {
  735. longitude: longitude,
  736. latitude: latitude
  737. };
  738. this.$refs.amap.setPerson(obj);
  739. //let data = {latitude:latitude,longtitude:longitude};
  740. //this.getChargingStationData(data);
  741. this.getNearbyStationInfo();
  742. _self.first = false;
  743. //this.$refs.amap.listenMove();
  744. }
  745. //('当前位置' +JSON.stringify(data))
  746. //this.latitude2 = latitude;
  747. //this.longitude2 = longitude;
  748. /*uni.showToast({
  749. title:JSON.stringify(res)
  750. })*/
  751. //this.message=JSON.stringify(res)
  752. }).catch(error => {
  753. uni.showToast({
  754. title:JSON.stringify(error)
  755. })
  756. })
  757. },
  758. start() {
  759. let self = this;
  760. // 将定时器名字赋值到变量中
  761. this.timer = setInterval(() => {
  762. ////("开始---");
  763. //self.$refs.amap.getLocation1();
  764. //self.$refs.amap.getLocation ();
  765. }, 10000);
  766. },
  767. end() {
  768. clearInterval(this.timer);
  769. this.timer = null // 这里最好清除一下,回归默认值
  770. // 众所周知,定时器返回一个随机整数,用于表示定时器的编号,后面通过名字可以取消这个定时器的执行。
  771. //(this.timer);
  772. },
  773. isEnabled(){
  774. if(this.viewMode)
  775. {
  776. if(this.show)
  777. return false;
  778. }
  779. return true;
  780. },
  781. stationDetail(item){
  782. if(!this.isEnabled())
  783. return;
  784. //('stationDetail'+JSON.stringify(item))
  785. uni.navigateTo({
  786. url:'stationAndPile/stationDetails?id='+item.id
  787. })
  788. /*
  789. uni.navigateTo({
  790. url:'stationAndPile/stationDetails?station='+encodeURIComponent(JSON.stringify(item))
  791. })
  792. */
  793. // //('stationDetail'+JSON.stringify(item))
  794. },
  795. location(e){
  796. if(e.position){
  797. //this.$refs.amap.getPositionByLonLats(e.position);
  798. if(e.position.latitude && e.position.longitude)
  799. if(this.latitude != e.position.latitude ||
  800. this.longitude != e.position.longitude)
  801. {
  802. this.longitude = e.position.longitude;
  803. this.latitude = e.position.latitude;
  804. let data = {latitude:this.latitude,longtitude:this.longitude,findType:"1"};
  805. this.getChargingStationData(data);
  806. //('获取定位'+JSON.stringify(e));
  807. }
  808. }
  809. },
  810. getChargingStationData(pos){
  811. //return;
  812. if(pos == null)
  813. return ;
  814. // //('getChargingStationData'+JSON.stringify(pos))
  815. let data1 = { pageIndex:0,pageSize:20};
  816. if(this.info.obc_type[this.preference.obc_type_index].text.indexOf('直流快充')>=0)
  817. data1.type = "1";
  818. else if(this.info.obc_type[this.preference.obc_type_index].text.indexOf('交流慢充')>=0)
  819. data1.type = "2";
  820. if(pos.longtitude != null)
  821. data1.longitude = pos.longtitude.toString();
  822. if(pos.latitude != null)
  823. data1.latitude = pos.latitude.toString();
  824. if(this.info.miles_type[this.preference.miles_index].distance!=null)
  825. data1.raidus = this.info.miles_type[this.preference.miles_index].distance.toString();
  826. // data1.online = "0";//在线
  827. if(pos.findType != null)
  828. data1.findType = pos.findType;
  829. else
  830. data1.findType = this.viewMode?"0":"1";
  831. if(data1.findType == "0")
  832. {
  833. // //('getChargingStationData res1'+JSON.stringify(res));
  834. _self.currentIndex = -1;
  835. _self.stationsmap = [];
  836. }else{
  837. _self.stationslist = [];
  838. }
  839. /*
  840. if(this.preference.obc_power.minValue!=null)
  841. data1.powerStart = this.preference.obc_power.minValue.toString();
  842. if(this.preference.obc_power.maxValue!=null)
  843. data1.powerEnd = this.preference.obc_power.maxValue.toString();
  844. */
  845. // //('data1'+JSON.stringify(data1))
  846. uni.showLoading({
  847. })
  848. if (this.carhelp.getPersonInfo()) {
  849. data1.openId=this.carhelp.getOpenId()
  850. }
  851. api.getChargingStationData(data1).then(function(res){
  852. uni.hideLoading()
  853. // //('data1'+JSON.stringify(res))
  854. if(!res.result || !res.data || !res.data.data)
  855. {
  856. //('getChargingStationData res nulll')
  857. return;
  858. }
  859. let items = res.data.data;
  860. if(data1.findType == "0")
  861. {
  862. // //('getChargingStationData res1'+JSON.stringify(res));
  863. // _self.currentIndex = -1;
  864. _self.stationsmap = [];
  865. //let stations = [];
  866. for(let i = 0;i<items.length;i++)
  867. {
  868. let obj = {
  869. name:'',
  870. position:'',
  871. price:1.2,
  872. idleNum:10,
  873. total:10,
  874. type: data1.type == "2" ? '慢充':'快充',
  875. id: i,
  876. distance:0,
  877. time:9,
  878. park: '2小时免费停车',
  879. // longitude: 112.28541 + i * 0.001,
  880. // latitude: 30.308354 + i * 0.01
  881. };
  882. if(items[i].id != null){
  883. obj.id = items[i].id;
  884. obj=items[i];
  885. }
  886. else
  887. continue;
  888. if(items[i].type.indexOf("1")>=0 && items[i].type.indexOf("2")>=0)
  889. {
  890. obj.type = '快/慢'
  891. }
  892. if(items[i].type=="1" )
  893. {
  894. obj.type = '快充'
  895. }
  896. if(items[i].type=="2" )
  897. {
  898. obj.type = '慢充'
  899. }
  900. if(items[i].name!=null)
  901. obj.name = items[i].name;
  902. if(items[i].address!=null)
  903. obj.position = items[i].address;
  904. if(items[i].costPrice!=null)
  905. obj.price = items[i].costPrice;
  906. if(items[i].availableNum!=null)
  907. obj.idleNum = items[i].availableNum;
  908. if(items[i].totalNum!=null)
  909. obj.total = items[i].totalNum;
  910. if(items[i].longitude!=null)
  911. obj.longitude = items[i].longitude;
  912. if(items[i].latitude!=null)
  913. obj.latitude = items[i].latitude;
  914. if(items[i].distance!=null)
  915. obj.distance = items[i].distance;
  916. if(items[i].time != null){
  917. obj.time = items[i].time;
  918. }
  919. if(items[i].image != null){
  920. obj.image = items[i].image;
  921. }
  922. if(items[i].parkingDescription != null){
  923. obj.parkingDescription = items[i].parkingDescription;
  924. }
  925. if(items[i].park != null)
  926. obj.park = items[i].park;
  927. /*
  928. let obj = {name:items[i].name,
  929. position:items[i].address,
  930. price:items[i].costPrice,
  931. idleNum:items[i].availableNum,
  932. total:items[i].totalNum,
  933. distance:0.1,
  934. time:1,
  935. type:'慢充',
  936. id: items[i].id,
  937. park: i%2 == 0? '以实际费用为准':'2小时免费停车',
  938. longitude: items[i].longitude,
  939. latitude: items[i].latitude
  940. };*/
  941. _self.stationsmap.push(obj);
  942. //stations.push(obj);
  943. }
  944. _self.$refs.amap.calcDistances([_self.longitude, _self.latitude],_self.stationsmap)
  945. _self.$refs.amap.setChargerList(_self.stationsmap);
  946. _self.currentIndex = 0;
  947. //if(_self.stationsmap.length>0)
  948. /*_self.$refs.amap.calcDistances([_self.longitude, _self.latitude],stations)
  949. _self.stationsmap = stations;
  950. _self.$refs.amap.setChargerList(stations);*/
  951. if(_self.stationsmap.length>0)
  952. {
  953. //('刷新Map'+JSON.stringify(_self.stationsmap));
  954. _self.$refs.amap.updateCharger(_self.stationsmap[0]);
  955. //let index = _self.stationsmap.findIndex(item => item.id == _self.stationsmap[0].id);
  956. //('刷新Map Index'+ _self.currentIndex)
  957. }
  958. }else if(data1.findType == "1")
  959. {
  960. _self.stationslist = [];
  961. // //('getChargingStationData res2'+JSON.stringify(res));
  962. for(let i = 0;i<items.length;i++)
  963. {
  964. let obj = {
  965. name:'',
  966. position:'',
  967. price:1.2,
  968. idleNum:10,
  969. total:10,
  970. type: data1.type == "2" ? '慢充':'快充',
  971. id: i,
  972. distance:0,
  973. time:9,
  974. park: '以实际费用为准',
  975. // longitude: 112.28541 + i * 0.001,
  976. // latitude: 30.308354 + i * 0.01
  977. };
  978. if(items[i].id != null){
  979. obj.id = items[i].id;
  980. obj=items[i];
  981. }
  982. else
  983. continue;
  984. if(items[i].type.indexOf("1")>=0 && items[i].type.indexOf("2")>=0)
  985. {
  986. obj.type = '快/慢'
  987. }
  988. if(items[i].type=="1" )
  989. {
  990. obj.type = '快充'
  991. }
  992. if(items[i].type=="2" )
  993. {
  994. obj.type = '慢充'
  995. }
  996. if(items[i].name!=null)
  997. obj.name = items[i].name;
  998. if(items[i].address!=null)
  999. obj.position = items[i].address;
  1000. if(items[i].costPrice!=null)
  1001. obj.price = items[i].costPrice;
  1002. if(items[i].availableNum!=null)
  1003. obj.idleNum = items[i].availableNum;
  1004. if(items[i].totalNum!=null)
  1005. obj.total = items[i].totalNum;
  1006. if(items[i].longitude!=null)
  1007. obj.longitude = items[i].longitude;
  1008. if(items[i].latitude!=null)
  1009. obj.latitude = items[i].latitude;
  1010. if(items[i].distance!=null)
  1011. obj.distance = items[i].distance;
  1012. if(items[i].time != null){
  1013. obj.time = items[i].time;
  1014. }
  1015. if(items[i].parkingDescription != null){
  1016. obj.parkingDescription = items[i].parkingDescription;
  1017. }
  1018. if(items[i].image != null){
  1019. obj.image = items[i].image;
  1020. }
  1021. if(items[i].park != null)
  1022. obj.park = items[i].park;
  1023. //arr.push(obj);
  1024. _self.stationslist.push(obj);
  1025. }
  1026. _self.$refs.amap.calcDistances([_self.longitude, _self.latitude],_self.stationslist)
  1027. // //(' getChargingStationData stations'+JSON.stringify(_self.stationslist))
  1028. }
  1029. },function(err){
  1030. uni.showToast({
  1031. title:err
  1032. })
  1033. //('getChargingStationData err'+JSON.stringify(err))
  1034. }
  1035. )
  1036. // //('getChargingStationData end')
  1037. },
  1038. /*
  1039. charge(item){
  1040. //('扫码充电')
  1041. //#ifdef MP-WEIXIN
  1042. uni.scanCode({
  1043. success:function(res){
  1044. uni.navigateTo({
  1045. url:'chargingPileDetails?pile='+encodeURIComponent(JSON.stringify(data))
  1046. })
  1047. }
  1048. })
  1049. return;
  1050. //#endif
  1051. //('扫码充电1')
  1052. uni.navigateTo({
  1053. url:'stationAndPile/chargingPileDetails'
  1054. })
  1055. }, */
  1056. moveEnd(e){
  1057. //('moveEnd')
  1058. this.close_all();
  1059. let posCenter = this.$refs.amap.logMapInfo();
  1060. ////('posCenter'+JSON.stringify(posCenter))
  1061. let data = {latitude:e.center.lat,longtitude:e.center.lng};
  1062. this.getChargingStationData(data);
  1063. },
  1064. moveStart(e){
  1065. this.close_all();
  1066. },
  1067. clickTabItem (index) {
  1068. //('clickTabaItem'+JSON.stringify(index));
  1069. this.currentIndex = index
  1070. },
  1071. swiperChange (e) {
  1072. //('swiperChange currentIndex'+JSON.stringify(this.currentIndex))
  1073. //('swiperChange'+JSON.stringify(e))
  1074. this.currentIndex = e.detail.current
  1075. let station = this.stationsmap[this.currentIndex];
  1076. let posCenter= {longitude: station.longitude,latitude: station.latitude};
  1077. // //('currentIndex'+JSON.stringify(this.currentIndex))
  1078. // //('currentIndex'+JSON.stringify(posCenter))
  1079. // //('station'+JSON.stringify(station))
  1080. let bounds = this.$refs.amap.logMapInfo();
  1081. /*if( (posCenter.latitude<bounds.bounds.northeast.lat && posCenter.latitude>bounds.bounds.sourthwest.lat)
  1082. && (posCenter.longitude<bounds.bounds.northeast.lng && posCenter.longitude>bounds.bounds.sourthwest.lng)
  1083. ){
  1084. //('bounds'+JSON.stringify(bounds));
  1085. }else{
  1086. this.$refs.amap.setCenter(posCenter);
  1087. }*/
  1088. this.$refs.amap.updateCharger(station);
  1089. this.$refs.amap.setCenter(posCenter);
  1090. },
  1091. swiperTransitionEnd(e){
  1092. //('swiperTransitionEnd'+JSON.stringify(e))
  1093. },
  1094. swiperTransition (e) {
  1095. // //('swiperTransition'+JSON.stringify(e))
  1096. },
  1097. listMode() {
  1098. this.close_all();
  1099. this.viewMode = false
  1100. },
  1101. mapMode() {
  1102. this.close_all();
  1103. this.viewMode = true
  1104. },
  1105. radioChange(e) {
  1106. // //('e'+JSON.stringify(e))
  1107. this.preference.save_preference = e.value;
  1108. // //('save_preference '+this.preference.save_preference);
  1109. },
  1110. handlerDoubleSlider(e) {
  1111. // //('e'+JSON.stringify(e))
  1112. this.preference.obc_power = e;
  1113. //this.preference.obc_power.minValue = e.minValue;
  1114. //this.preference.obc_power.maxValue = e.maxValue;
  1115. },
  1116. selectOBSType(index) {
  1117. this.preference.obc_type_index = index;
  1118. },
  1119. selectOBSStatus(index) {
  1120. this.preference.obc_status_index = index;
  1121. },
  1122. selectOBCVoltage(index) {
  1123. this.preference.obc_voltage_index = index;
  1124. },
  1125. selectMiles(index) {
  1126. this.preference.miles_index = index;
  1127. },
  1128. reset() {
  1129. this.preference.obc_status_index = 0;
  1130. this.preference.obc_voltage_index = 0;
  1131. this.preference.obc_type_index = 0;
  1132. this.preference.miles_index = 3;
  1133. this.preference.save_preference = false;
  1134. // this.$refs.obc_voltage.currentValue = [0,100];
  1135. this.preference.obc_power.minValue = 0;
  1136. this.preference.obc_power.maxValue = 500;
  1137. this.preference.obc_power.minP = Math.floor((this.preference.obc_power.minValue / (this.info.obc_power.maxValue - this.info.obc_power.minValue)) * 100);
  1138. this.preference.obc_power.maxP = Math.floor((this.preference.obc_power.maxValue / (this.info.obc_power.maxValue - this.info.obc_power.minValue)) * 100);
  1139. // //('minP'+this.preference.obc_power.minP)
  1140. // //('maxP'+this.preference.obc_power.maxP)
  1141. this.$refs.obc_voltage.reset(this.preference.obc_power);
  1142. // this.$refs.obc_voltage.currentMaxValue = this.preference.obc_power[1];
  1143. // //('reset')
  1144. },
  1145. close_all(){
  1146. this.$refs.type.closeSelector();
  1147. this.$refs.raidus.closeSelector();
  1148. this.$refs.city.closeSelector();
  1149. this.show = false;
  1150. },
  1151. open() {
  1152. this.$refs.type.closeSelector();
  1153. this.$refs.raidus.closeSelector();
  1154. this.$refs.city.closeSelector();
  1155. this.show = !this.show;
  1156. //this.$refs.obc_voltage.currentMinValue = this.preference.obc_power[0];
  1157. //this.$refs.obc_voltage.currentMaxValue = this.preference.obc_power[1];
  1158. //('open');
  1159. },
  1160. close() {
  1161. //('偏好设置' + JSON.stringify(this.preference));
  1162. this.close_all();
  1163. // this.show = false;
  1164. let data = {latitude:this.latitude,longtitude:this.longitude};
  1165. this.type = this.info.obc_type[this.preference.obc_type_index].text;
  1166. this.raidus = this.info.miles_type[this.preference.miles_index].text;
  1167. if(this.preference.save_preference)
  1168. this.carhelp.set('preference',this.preference)
  1169. this.getChargingStationData(data);
  1170. this.stationslist = this.stationsmap;
  1171. // //('close');
  1172. },
  1173. onClicked(e){
  1174. this.close_all();
  1175. ////('onClicked e'+JSON.stringify(e))
  1176. },
  1177. // 获取当前位置
  1178. clickMap(obj) {
  1179. this.show=false;
  1180. //this.currentIndex = 5;
  1181. // //('longitude1 ' + _self.longitude);
  1182. // //('latitude1 ' + _self.latitude);
  1183. if (obj == null || obj.type == null) return;
  1184. if (obj.type == 'charger') {
  1185. if (obj.obj != null) {
  1186. //_self.$refs.amap.updateCharger(obj.obj);
  1187. let index = _self.stationsmap.findIndex(item => item.id == obj.obj.id);
  1188. _self.currentIndex = index;
  1189. //('find Index'+index);
  1190. }
  1191. /*api.getChargerInfoById(obj).then(
  1192. function(data) {
  1193. if (obj.obj != null) {
  1194. //obj.obj.price = 2.25;
  1195. //obj.obj.idleNum = 12;
  1196. _self.$refs.amap.updateCharger(obj.obj);
  1197. let index = _self.stationsmap.findIndex(item => item.id == obj.obj.id);
  1198. _self.currentIndex = index;
  1199. //('find Index'+index);
  1200. }
  1201. // //('点击1'+JSON.stringify(obj));
  1202. },
  1203. function(err) {
  1204. //('点击2' + JSON.stringify(obj));
  1205. }
  1206. );*/
  1207. }
  1208. },
  1209. mapdown() {
  1210. ////('this'+JSON.stringify(this))
  1211. // //('longitude1 ' + this.longitude);
  1212. // //('latitude1 ' + this.latitude);
  1213. //this.start();
  1214. //this.$refs.amap.getLocation1();
  1215. //this.getNearbyStationInfo();
  1216. let data2 = {latitude:this.latitude,longtitude:this.longitude,findType:"0"};
  1217. this.getChargingStationData(data2);
  1218. this.isReady = true;
  1219. //this.$refs.amap.getLocation ();
  1220. //let state = {};
  1221. uni.getSystemInfo({
  1222. success: (res) => {
  1223. // #ifndef MP
  1224. let navbarH = 0
  1225. // #endif
  1226. // #ifdef MP
  1227. let navbarH = uni.upx2px(90)
  1228. // #endif
  1229. /*state.status_width = res.windowWidth;
  1230. //('window width'+state.status_width);*/
  1231. let scrollH = res.windowHeight;// - uni.upx2px(88) - navbarH
  1232. let scrollW = res.windowWidth;
  1233. // //('布局结果'+ JSON.stringify(res));
  1234. // //('scrollW'+scrollW)
  1235. //#ifdef MP-WEIXIN
  1236. const {
  1237. statusBarHeight,
  1238. windowWidth,
  1239. } = uni.getSystemInfoSync();
  1240. scrollW = windowWidth;
  1241. // //('height ' + statusBarHeight);
  1242. //this.status_height = uni.getStatusbarHeight();
  1243. let res1 = uni.getMenuButtonBoundingClientRect()
  1244. // //('layout selectHeight '+JSON.stringify(res1))
  1245. //state.selectHeight = (res1.top-res.statusBarHeight)*2+ res1.height;
  1246. //#endif
  1247. ////('status height'+state.status_height)
  1248. _self.$refs.amap.setMyStyle("height:"+(scrollH-88-50)+ "px;width:"+scrollW+"px;");
  1249. }
  1250. })
  1251. this.getPoint();
  1252. },
  1253. gotoLine(item, downid) {
  1254. uni.navigateTo({
  1255. url: '/pages/route/index?id=' + item.routeId + '&upid=' + item.startStationId + '&downid=' + downid
  1256. });
  1257. },
  1258. mapopenBtn() {
  1259. this.mapopen = !this.mapopen;
  1260. if (this.mapopen) {
  1261. this.$refs.amap.setMyStyle('width: 100%; height: 340px;');
  1262. } else {
  1263. this.$refs.amap.setMyStyle('width: 100%; height: 140px;');
  1264. }
  1265. },
  1266. getNearbyStationInfo() {
  1267. let data1 = {latitude:this.latitude,longtitude:this.longitude,findType:"1"};
  1268. this.getChargingStationData(data1);
  1269. let data2 = {latitude:this.latitude,longtitude:this.longitude,findType:"0"};
  1270. this.getChargingStationData(data2);
  1271. },
  1272. theme(type) {
  1273. if(type == 'elder')
  1274. {
  1275. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  1276. let data = {
  1277. backgroundColor: 'transparent',
  1278. "font-size":'36rpx',
  1279. "font-weight":"bold!important"
  1280. };
  1281. this.inputStyle = data;
  1282. }
  1283. else
  1284. {
  1285. document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
  1286. let data ={
  1287. backgroundColor: 'transparent',
  1288. "font-size":'36rpx',
  1289. "font-weight":"normal"
  1290. };
  1291. this.inputStyle = data;
  1292. }
  1293. }
  1294. }
  1295. };
  1296. </script>
  1297. <style lang="scss" scoped>
  1298. @import "@/_theme.scss";
  1299. .carNone{
  1300. display: flex;
  1301. flex-direction: column;
  1302. justify-content: center;
  1303. align-items: center;
  1304. img{
  1305. width: 100%;
  1306. height: 100%;
  1307. }
  1308. p{
  1309. margin-top: -60px;
  1310. }
  1311. }
  1312. .uni-combox__no-border{
  1313. white-space: nowrap;
  1314. }
  1315. .u-mask {
  1316. position: fixed;
  1317. left: 0;
  1318. top: 576px;
  1319. }
  1320. .content-s{
  1321. height: 440px;
  1322. overflow-y:scroll;
  1323. }
  1324. .cj-slider {
  1325. width: 90%;
  1326. margin: auto;
  1327. }
  1328. .cj-slide__text {
  1329. text-align: center;
  1330. padding: 20rpx;
  1331. }
  1332. .preference_group_item {
  1333. padding: 15rpx;
  1334. }
  1335. .preference_group {
  1336. padding-bottom: 20rpx;
  1337. }
  1338. .preference {
  1339. background-color: #ffffff;
  1340. left: 0rpx;
  1341. position: absolute
  1342. }
  1343. .preference_item {
  1344. margin-bottom: 10rpx;
  1345. margin-left: 20rpx;
  1346. text-align: center;
  1347. border-style: none;
  1348. width: 20%;
  1349. height: 56rpx;
  1350. @include themeify{
  1351. // font-size: themed('font-size2');
  1352. // line-height: themed('font-size2');
  1353. }
  1354. /* line-height: 14px;*/
  1355. }
  1356. .preference_item_medium {
  1357. margin-bottom: 10rpx;
  1358. margin-left: 20rpx;
  1359. text-align: center;
  1360. border-style: none;
  1361. width: 22%;
  1362. height: 56rpx;
  1363. @include themeify{
  1364. font-size: themed('font-size2');
  1365. line-height: themed('font-size2');
  1366. }
  1367. /* line-height: 14px;*/
  1368. }
  1369. .preference_item_plus {
  1370. margin-bottom: 10rpx;
  1371. margin-left: 20rpx;
  1372. align-items: center;
  1373. justify-content: center;
  1374. text-align: center;
  1375. width: 28%;
  1376. border-style: none;
  1377. height: 56rpx;
  1378. @include themeify{
  1379. font-size: themed('font-size2');
  1380. line-height: themed('font-size2');
  1381. }
  1382. /* line-height: 14px;*/
  1383. }
  1384. .preference_label {
  1385. @include themeify{
  1386. color:themed('font_colorLabel');
  1387. font-size: themed('font-size1');
  1388. font-weight: themed('fontWeight');
  1389. }
  1390. margin-left: 20rpx;
  1391. margin-bottom: 100rpx;
  1392. }
  1393. .pre-btn{
  1394. width: 100%;
  1395. height: 96rpx;
  1396. z-index: 999;
  1397. }
  1398. .btn-1,.btn-2{
  1399. height: 96rpx;
  1400. line-height: 96rpx;
  1401. text-align: center;
  1402. border-top: 1px solid rgba(225, 228, 232, 100);
  1403. }
  1404. .map{
  1405. background-color: #ffffff;
  1406. left: 0rpx;
  1407. position: absolute;
  1408. }
  1409. .chargerCard{
  1410. background-color: #fff;
  1411. margin: 0 24rpx;
  1412. border-radius: 16rpx;
  1413. // overflow: hidden;
  1414. bottom: 68px;
  1415. left: 0;
  1416. right: 0;
  1417. position: fixed;
  1418. // height: 380rpx;
  1419. // @include themeify{
  1420. // height:themed('cardHeight');
  1421. // }
  1422. }
  1423. .arrow{
  1424. margin-right: 15rpx;
  1425. }
  1426. .card_item{
  1427. display: flex;
  1428. flex-direction: row;
  1429. @include themeify{
  1430. font-size: themed('font-size2');
  1431. }
  1432. justify-content: space-between;
  1433. }
  1434. .round{
  1435. border-radius:50rpx;
  1436. background-color: #00B962;
  1437. color: #ffffff;
  1438. text-align: center;
  1439. justify-content: center;
  1440. align-items: center;
  1441. @include themeify{
  1442. font-size: themed('font-size2');
  1443. width:themed('buttonWidth')
  1444. }
  1445. /* width: 250rpx;*/
  1446. display: flex;
  1447. flex-direction: row;
  1448. }
  1449. .round2{
  1450. border-radius:50rpx;
  1451. background-color: #00B962;
  1452. color: #ffffff;
  1453. text-align: center;
  1454. justify-content: center;
  1455. align-items: center;
  1456. // width:125rpx;
  1457. }
  1458. .swiper-item{
  1459. }
  1460. .list {
  1461. margin-left: 4rpx;
  1462. }
  1463. .charing-slow-2{
  1464. margin: 0 0 10px 0 !important;
  1465. // border-bottom: 1px solid rgba(238, 242, 240, 100);
  1466. }
  1467. .charing-slow {
  1468. background-color: #fff;
  1469. margin: 40rpx;
  1470. border-radius: 16rpx;
  1471. padding: 20rpx 24rpx 20rpx;
  1472. position: relative;
  1473. left: 0;
  1474. right: 0;
  1475. }
  1476. .fast-charge {
  1477. display: inline-block;
  1478. border-radius: 50px;
  1479. border-radius: 4px;
  1480. background-color: rgba(208, 209, 255, 100);
  1481. color: rgba(56, 60, 255, 100);
  1482. margin: auto 0;
  1483. @include themeify{
  1484. width: themed('font-size18');
  1485. font-size: themed('font-size2');
  1486. line-height: themed('font-size7');
  1487. height: themed('font-size8');
  1488. }
  1489. text-align: center;
  1490. }
  1491. .fast-trickle-charge {
  1492. display: inline-block;
  1493. margin: auto 0;
  1494. border-radius: 4px;
  1495. background-color: rgba(172, 236, 240, 100);
  1496. color: rgba(0, 124, 134, 100);
  1497. @include themeify{
  1498. width: themed('font-size18');
  1499. font-size: themed('font-size2');
  1500. line-height: themed('font-size7');
  1501. height: themed('font-size8');
  1502. }
  1503. text-align: center;
  1504. }
  1505. .trickle-charge {
  1506. display: inline-block;
  1507. border-radius: 4px;
  1508. margin: auto 0;
  1509. background-color: rgba(186, 240, 215, 100);
  1510. color: rgba(0, 130, 69, 100);
  1511. @include themeify{
  1512. width: themed('font-size18');
  1513. font-size: themed('font-size2');
  1514. line-height: themed('font-size7');
  1515. height: themed('font-size8');
  1516. }
  1517. text-align: center;
  1518. }
  1519. .station-items {
  1520. display: inline-block;
  1521. /* height: 16px;
  1522. line-height: 16px;*/
  1523. @include themeify{
  1524. font-size: themed('font-size3');
  1525. font-weight: themed('fontWeight');
  1526. line-height: themed('font-size3');
  1527. height: themed('font-size3');
  1528. }
  1529. margin-left: 8rpx;
  1530. color: #101010;
  1531. }
  1532. //
  1533. .address {
  1534. width: 100%;
  1535. line-height: 20px;
  1536. display: flex;
  1537. justify-content: space-between;
  1538. .name{
  1539. font-size: 16px;
  1540. white-space: nowrap;
  1541. overflow: hidden;
  1542. text-overflow: ellipsis;
  1543. }
  1544. .distance{
  1545. color: rgba(102, 102, 102, 100);
  1546. font-size: 12px;
  1547. .iconfont{
  1548. font-size: 12px;
  1549. margin-right: 2px;
  1550. }
  1551. }
  1552. @include themeify{
  1553. font-size: themed('font-size5');
  1554. line-height: themed('font-size7');
  1555. }
  1556. /* font-size: 11px;*/
  1557. font-weight: 600;
  1558. color: #101010;
  1559. }
  1560. .price-free{
  1561. width: 100%;
  1562. display: flex;
  1563. align-items: center;
  1564. justify-content: space-between;
  1565. margin-top: 8px;
  1566. }
  1567. .price {
  1568. display: flex;
  1569. line-height: 40rpx;
  1570. .price-1{
  1571. display: flex;
  1572. justify-content: space-between;
  1573. .num {
  1574. color: rgba(255, 98, 0, 100);
  1575. @include themeify{
  1576. font-size: themed('font-size5');
  1577. height: themed('font-size5');
  1578. }
  1579. text-align: left;
  1580. font-family: Roboto-medium;
  1581. }
  1582. .unit {
  1583. // font-size: 12px;
  1584. color: rgba(102, 102, 102, 100);
  1585. @include themeify{
  1586. // font-size: themed('font-size2');
  1587. font-size: 12px;
  1588. height: themed('font-size2');
  1589. }
  1590. text-align: left;
  1591. font-family: AlibabaPuHui-regular;
  1592. margin-left: 8rpx;
  1593. }
  1594. }
  1595. .price-2{
  1596. color: rgba(153, 153, 153, 100);
  1597. margin-left: 6rpx;
  1598. text-decoration: line-through;
  1599. font-size: 24rpx
  1600. }
  1601. }
  1602. .free{
  1603. display: flex;
  1604. align-items: center;
  1605. .slow,.fast{
  1606. display: flex;
  1607. .fast-font{
  1608. width: 40rpx;
  1609. height: 40rpx;
  1610. line-height: 40rpx;
  1611. border-radius: 4px;
  1612. background-color: rgba(186, 240, 215, 100);
  1613. color: rgba(0, 130, 69, 100);
  1614. font-size: 28rpx;
  1615. text-align: center;
  1616. margin-right: 2rpx;
  1617. }
  1618. .slow-font{
  1619. width: 40rpx;
  1620. height: 40rpx;
  1621. line-height: 40rpx;
  1622. border-radius: 4px;
  1623. background-color: rgba(226, 226, 226, 100);
  1624. color: rgba(128, 128, 128, 100);
  1625. font-size: 28rpx;
  1626. text-align: center;
  1627. margin-right: 2rpx;
  1628. }
  1629. .num{
  1630. font-size: 32rpx;color: rgba(0, 145, 67, 100);
  1631. line-height: 40rpx;
  1632. }
  1633. }
  1634. .slow{
  1635. margin-left: 16rpx;
  1636. }
  1637. }
  1638. .park {
  1639. margin-top: 16rpx;
  1640. display: flex;
  1641. }
  1642. .park-p {
  1643. display: inline-block;
  1644. width: 20px;
  1645. /* height: 18px;
  1646. line-height: 12px;*/
  1647. @include themeify{
  1648. line-height: themed('font-size1');
  1649. height: themed('font-size4');
  1650. }
  1651. text-align: center;
  1652. // background-color: rgba(125, 177, 255, 100);
  1653. background-color: #00b962;
  1654. color: #fff;
  1655. }
  1656. .park-text {
  1657. display: inline-block;
  1658. color: rgba(102, 102, 102, 100);
  1659. @include themeify{
  1660. font-size: themed('font-size1');
  1661. height:themed('font-size4');
  1662. }
  1663. /* font-size: 12px;*/
  1664. text-align: left;
  1665. margin-left: 4px;
  1666. margin-top: 2px;
  1667. }
  1668. .map {
  1669. width: 100%;
  1670. height: 100%;
  1671. position: relative;
  1672. }
  1673. #container {
  1674. width: 100%;
  1675. height: 100%;
  1676. }
  1677. .distance-font {
  1678. @include themeify{
  1679. font-size: themed('font-size3');
  1680. }
  1681. /* font-size: 16px*/
  1682. }
  1683. .position{
  1684. color: #1677ff;
  1685. @include themeify{
  1686. font-size: themed('font-size2');
  1687. }
  1688. /* font-size: 14px*/
  1689. }
  1690. .position-box{
  1691. position:absolute;
  1692. top: 341px;
  1693. right: 118px;
  1694. width: 16px;
  1695. height: 16px;
  1696. /* line-height: 20px; */
  1697. background-color: rgba(22, 119, 255, 100);
  1698. text-align: center;
  1699. box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.4);
  1700. border: 2px solid rgba(255, 255, 255, 100);
  1701. border-radius: 999px;
  1702. }
  1703. .sign{
  1704. display: flex;
  1705. flex-wrap: wrap;
  1706. margin-top: 10px;
  1707. .sign-1{
  1708. line-height: 20px;
  1709. border-radius: 4px;
  1710. background-color: rgba(255, 255, 255, 100);
  1711. color: rgba(255, 139, 0, 100);
  1712. font-size: 12px;
  1713. text-align: center;
  1714. border: 1px solid rgba(255, 139, 0, 100);
  1715. padding: 0 4px;
  1716. margin-right: 8px;
  1717. margin-bottom: 4px;
  1718. }
  1719. .sign-2{
  1720. line-height: 20px;
  1721. border-radius: 4px;
  1722. background-color: rgba(255, 255, 255, 100);
  1723. color: rgba(153, 153, 153, 100);
  1724. font-size: 12px;
  1725. text-align: center;
  1726. border: 1px solid rgba(204, 204, 204, 100);
  1727. padding: 0 4px;
  1728. margin-right: 8px;
  1729. margin-bottom: 4px;
  1730. }
  1731. }
  1732. .park-text2 {
  1733. width: 140%;
  1734. }
  1735. .park-text3 {
  1736. white-space: nowrap;
  1737. text-overflow: ellipsis;
  1738. overflow: hidden;
  1739. }
  1740. </style>