index.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697
  1. <template>
  2. <view>
  3. <ujp-navbar title="月卡购买" :show="false" ></ujp-navbar>
  4. <!-- 头部图片 -->
  5. <view class="background">
  6. <view class="banner">
  7. <ujp-swiper bg-color="#fff"
  8. :img-mode="'scaleToFill'" height="120"
  9. :list="bannerList" @click="clickBanner" :name="'picUrl'" >
  10. </ujp-swiper>
  11. </view>
  12. <!-- 选项列表 -->
  13. <view class="option-list">
  14. <view class="list-item" @click="getScanCode">
  15. <view class="icon iconfont" style="background: linear-gradient(45deg,#00B962,#5FE4A6);">
  16. &#xe61a;
  17. </view>
  18. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  19. 扫码充电
  20. </view>
  21. </view>
  22. <view class="list-item" @click="fastRecharge">
  23. <view class="icon iconfont" style="background: linear-gradient(45deg,#23AD9B,#4BD2C0);">
  24. &#xe629;
  25. </view>
  26. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  27. 快速充值
  28. </view>
  29. </view>
  30. <view class="list-item" @click="chargingRecord">
  31. <view class="icon iconfont" style="background: linear-gradient(45deg,#407DE4,#6FA5FF );">
  32. &#xe625;
  33. </view>
  34. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  35. 充电记录
  36. </view>
  37. </view>
  38. <view class="list-item" @click="toSearchPile">
  39. <view class="icon iconfont" style="background: linear-gradient(45deg,#6366FF,#9D9FFF);">
  40. &#xe622;
  41. </view>
  42. <view class="text oldTextjp2" oldstyle="font-size: 18px;">
  43. 附近站点
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 充值活动 -->
  48. <view class=" top-up" v-if="activityList.length > 0 && !activityListShow">
  49. <view class="card-box">
  50. <view class="card" v-for="(item,index) in activityList" :key="item.id"
  51. @click="rechargeActivity(item)">
  52. <img :src="item.picUrl" alt="">
  53. </view>
  54. </view>
  55. </view>
  56. <u-modal v-model="showOss" class="showOss"
  57. :show-title="false" :show-confirm-button="false" >
  58. <view class="slot-content">
  59. <u-image width="250px" style="margin: auto;min-height: 250px;"
  60. mode="widthFix" @click="clickBanner(showOssIndex,true)"
  61. :src="showOssImg">
  62. <view slot="loading" style="height: 200px;" >
  63. <u-loading mode="flower" size="186" >
  64. </u-loading>
  65. </view>
  66. </u-image>
  67. <u-image width="36px" style="margin: auto;"
  68. mode="widthFix" @click="showOss=false"
  69. src="../../assets/img/if-close-line-circled.png"></u-image>
  70. </view>
  71. </u-modal>
  72. <u-modal v-model="showTop" class="showOss"
  73. :show-title="false" :show-confirm-button="false" >
  74. <view class="slot-content">
  75. <u-image width="250px;"
  76. bgColor="#ff000000"
  77. style="margin: auto;min-height: 250px;"
  78. mode="widthFix" @click="clickBannerTop()"
  79. :src="showTopImg"
  80. >
  81. <view slot="loading" style="height: 200px;" >
  82. <u-loading mode="flower" size="186" >
  83. </u-loading>
  84. </view>
  85. </u-image>
  86. <u-image width="36px" style="margin: auto;"
  87. mode="widthFix" @click="showTop=false"
  88. src="../../assets/img/if-close-line-circled.png"></u-image>
  89. </view>
  90. </u-modal>
  91. <!-- 模式选择 -->
  92. <u-mask :show="show">
  93. <view class="wrap">
  94. <view class="shema" @tap.stop>
  95. <view class="title">
  96. 设置浏览模式
  97. </view>
  98. <view class="">
  99. <u-radio-group v-model="value">
  100. <u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled" active-color="#00B962">
  101. {{item.name}}
  102. <p v-if="item.name == '长辈模式'">字体更大 看的清楚</p>
  103. <p v-if="item.name == '标准模式'">信息丰富 功能全面</p>
  104. </u-radio>
  105. </u-radio-group>
  106. </view>
  107. <view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
  108. <view class="btn-box">
  109. <u-button class="choice-btn" type="success" shape="circle" @click="elderClick">我选好了</u-button>
  110. </view>
  111. </view>
  112. </view>
  113. </u-mask>
  114. <!-- <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  115. <view class="img-box">
  116. <view class="img-1" v-for="(item,index) in activityList" :key="item.id"
  117. @click="rechargeActivity(item)">
  118. <img :src="item.picUrl" alt="">
  119. </view>
  120. </view> -->
  121. </view>
  122. <!-- 最新活动 -->
  123. <view class=" top-up" v-if="activityList.length > 0 && activityListShow">
  124. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
  125. <view class="img-box2">
  126. <view class="left-image" :style="{backgroundImage: 'url(' + activityDateList.picUrl + ')'}" @click="rechargeActivity(activityDateList)">
  127. <p>{{activityDateList.name}}</p>
  128. <view class="time-activities">
  129. 距活动结束仅剩 <text class="time">{{description}}</text>
  130. </view>
  131. </view>
  132. <view class="right-image">
  133. <img class="margin-bottom" v-for="(item,index) in activityList" :key="item.id"
  134. @click="rechargeActivity(item)" :src="item.narrowUrl" alt="">
  135. <!-- <img class="margin-bottom" src="../../assets/img/topup2.png" alt="" @click="rechargeActivity(0)">
  136. <img class="margin-bottom" src="../../assets/img/topup3.png" alt="" @click="rechargeActivity(1)"> -->
  137. </view>
  138. </view>
  139. </view>
  140. <!-- <template v-if="message == 'getLocation:ok' && stationList.length != 0 && chargeList.length == 0">
  141. <view class=" top-up" >
  142. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>附近站点
  143. <view class="pack-up" v-show="!listShow" @click="listShow=true" >
  144. 收起<text class="iconfont">&#xe607;</text>
  145. </view>
  146. <view class="pack-up" v-if="listShow" @click="listShow=false" >
  147. 展开<text class="iconfont">&#xe62c;</text>
  148. </view>
  149. </view>
  150. </view> -->
  151. <!-- 附近站点 -->
  152. <!-- <view class="station" v-for="(stationData,i) in stationList" :key="i"
  153. v-show="!listShow||i==0"
  154. @click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
  155. <view class="text">
  156. <view class="station-title">
  157. <text class="title-left" v-if="stationData.type == '1'" :style="elderStatus ? 'font-size: 14px;background-color: #9D9FFF;' : 'background-color: #9D9FFF;'">快充</text>
  158. <text class="title-left" v-if="stationData.type == '2'" :style="elderStatus ? 'font-size: 14px;background-color: #00B962;' : 'background-color: #00B962;'">慢充</text>
  159. <text class="title-left" v-if="stationData.type == '1,2'" :style="elderStatus ? 'font-size: 14px;background-color: #00BAC8;' : 'background-color: #00BAC8;'">快/慢</text>
  160. <text class="title-right oldTextjp" oldstyle="font-size: 20px;">{{stationData.name}}</text>
  161. </view>
  162. <view class="station-price">
  163. <view class="flex">
  164. <view class="price-left">{{stationData.costPrice.toFixed(2)}}</view>
  165. <view class="price-right">
  166. 元/度 起
  167. </view>
  168. </view>
  169. <view class="count-left">
  170. <span class="oldTextjp2 free-conut" oldstyle="font-size: 16px;" >空闲{{stationData.availableNum}}/</span>
  171. <span class="oldTextjp" oldstyle="font-size: 16px;">总数{{stationData.totalNum}}</span>
  172. </view>
  173. </view>
  174. <view class="park">
  175. <view class="flex" v-if="stationData.parkingDescription">
  176. <view class="park-p">p</view>
  177. <view class="park-text oldTextjp2" oldstyle="font-size: 14px;" >{{stationData.parkingDescription}}</view>
  178. </view>
  179. <view class="count-right oldTextjp" oldstyle="font-size: 16px;">
  180. <text class="iconfont" style="color: #00B962;">&#xe615;</text>
  181. {{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}}
  182. </view>
  183. </view>
  184. </view>
  185. </view>
  186. </template> -->
  187. <!-- 附近站点改版 -->
  188. <template v-if="message == 'getLocation:ok' && stationList.length != 0 && chargeList.length == 0">
  189. <view class=" top-up" >
  190. <view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>附近站点
  191. <view class="pack-up" v-show="!listShow" @click="listShow=true" >
  192. 收起<text class="iconfont">&#xe607;</text>
  193. </view>
  194. <view class="pack-up" v-if="listShow" @click="listShow=false" >
  195. 展开<text class="iconfont">&#xe62c;</text>
  196. </view>
  197. </view>
  198. </view>
  199. <!-- 附近站点 -->
  200. <view class="station" v-for="(stationData,i) in stationList" :key="i"
  201. v-show="!listShow||i==0"
  202. @click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
  203. <view class="head">
  204. <view class="title oldTextjp" oldstyle="font-size: 20px;">
  205. {{stationData.name}}
  206. </view>
  207. <view class="distance oldTextjp2" oldstyle="font-size: 16px;">
  208. <text class="iconfont" style="color:#666666">&#xe615;</text>{{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}}
  209. </view>
  210. </view>
  211. <view class="sign">
  212. <view class="sign-1" v-if="stationData.giveDiscount&&stationData.discountRatio">服务费{{stationData.discountRatio/10}}折</view>
  213. <view class="sign-2" v-if="stationData.tagList.length != 0" v-for="(tagName,tagIndex) in stationData.tagList" :key="tagIndex">{{tagName}}</view>
  214. </view>
  215. <view class="price-free oldTextClass">
  216. <view class="price">
  217. <view class="price-1">
  218. <text class="num">
  219. {{!stationData.giveDiscount ? (stationData.electricityPrice+stationData.servicePrice).toFixed(2)
  220. : (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
  221. <text class="unit " oldstyle="font-size: 48rpx;">元/度 起</text>
  222. </view>
  223. <view class="price-2 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
  224. <text class="num">{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
  225. <text class="unit ">元/度 起</text>
  226. </view>
  227. </view>
  228. <view class="free">
  229. <view class="fast" v-if="stationData.type == '1' || stationData.type == '1,2'">
  230. <view class="fast-font">
  231. </view>
  232. <view class="num">
  233. {{stationData.fastAvailableNum}}/{{stationData.fastNum}}
  234. </view>
  235. </view>
  236. <view class="slow oldTextjp2"
  237. oldstyle="margin-left: 1px;"
  238. v-if="stationData.type == '2' || stationData.type == '1,2'">
  239. <view class="slow-font">
  240. </view>
  241. <view class="num">
  242. {{stationData.slowAvailableNum}}/{{stationData.slowNum}}
  243. </view>
  244. </view>
  245. </view>
  246. </view>
  247. </view>
  248. </template>
  249. <!-- 定位 -->
  250. <view class="location-box" v-if="message != 'getLocation:ok' && stationList.length == 0 && chargeList.length == 0">
  251. <view class="location">
  252. <view class="location-text">
  253. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  254. 定位中...
  255. </view>
  256. <view class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  257. 授权定位后可查询附近充电站
  258. </view>
  259. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;" @click="getPoint()">
  260. 重新定位
  261. </view>
  262. </view>
  263. <view class="img-box">
  264. <img src="static/img/暂无网络信号-缺省页 1.png">
  265. </view>
  266. </view>
  267. </view>
  268. <!-- 充电状态 -->
  269. <view class="state1 state" v-if="chargeList.length > 0" v-for="(item,index) in chargeList" :key="item.id"
  270. @click="gotoUrl('pages/searchPile/chargeProcess/dcCharging?id=' + item.id)">
  271. <view class="state-text">
  272. <view class="text-1 oldTextjp" oldstyle="font-size: 20px;">
  273. {{item.statusText}}
  274. </view>
  275. <view v-if="item.status == '0'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  276. 启动中
  277. </view>
  278. <view v-if="item.status == '1'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  279. 已充{{item.dueFee != null ? item.dueFee.toFixed(2) : '0.00'}}元
  280. </view>
  281. <!-- <view v-if="item.status == '2'" class="text-2" style="color: red;">
  282. 超出时间将收取占位费
  283. </view> -->
  284. <view v-if="item.status == '4'" class="text-2 oldTextjp2" oldstyle="font-size: 16px;">
  285. <span v-if="item.waitNum==1">请耐心等待</span>
  286. <span v-else >前方等待{{item.waitNum-1}}位</span>
  287. </view>
  288. <view class="text-3 oldTextjp2" oldstyle="font-size: 16px;">
  289. <p style=" width: 160%;"> {{item.stationName}}/{{item.deviceName}}&nbsp;&nbsp;当前电价{{item.chargingCostPrice.toFixed(2)}}元/度</p>
  290. </view>
  291. </view>
  292. <view class="img-box" style="height: 110px;">
  293. <img v-if="item.status == '0'" src="static/img/等待中-缺省页.png">
  294. <img v-if="item.status == '1'" src="static/img/充电中-缺省页.png">
  295. <img v-if="item.status == '2'" src="static/img/已充满-缺省页.png">
  296. <img v-if="item.status == '4'" src="static/img/等待中-缺省页.png">
  297. </view>
  298. </view>
  299. <!-- 新闻 -->
  300. <view class="news-title" v-if="newsList.length > 0">
  301. <view class="news-title-left oldTextjp" oldstyle="font-size:20px;">
  302. <view class="line" style="margin-top:4px;"></view>新闻公告
  303. </view>
  304. <view class="more oldTextjp2" oldstyle="font-size:16px;" @click="toNewsNotice">更多<view class="more-icon iconfont"> &#xe600;</view>
  305. </view>
  306. </view>
  307. <view class="news">
  308. <view class="news-content" v-for="(item,index) in newsList" :key="index"
  309. @click="gotoUrl('pages/article/articleDetails?id=' + item.id)">
  310. <view class="content-text">
  311. <view class="content-title oldTextjp2" oldstyle="font-size: 18px;">{{item.title}}</view>
  312. <view class="news-time">{{item.createTime?item.createTime.slice(5,10):''}}</view>
  313. </view>
  314. <view class="content-img">
  315. <img :src="item.pic ? item.pic : 'static/img/image_default.png'" alt="">
  316. </view>
  317. </view>
  318. </view>
  319. <view class="bottom" >
  320. <view class="bot">
  321. <view class="bot-line"></view>
  322. <view class="bot-text oldTextjp2" oldstyle="font-size: 14px;">已经到底了</view>
  323. <view class="bot-line"></view>
  324. </view>
  325. </view>
  326. <!-- 导航栏 -->
  327. <view class="navigation">
  328. <view class="login-prompt" v-if="!userId">
  329. 登录显示更多会员服务
  330. <text class="button" @click="toLogin">登录/注册</text>
  331. </view>
  332. </view>
  333. <Tabbar :current="0" ref="tabbarMain" :elderStatus="elderStatus"></Tabbar>
  334. </view>
  335. </template>
  336. <script>
  337. import * as API from '@/apis/index.js'
  338. import * as newsApi from '@/apis/news.js'
  339. import * as WxJsApi from '@/utils/wxJsApi.js'
  340. import * as siteApi from '@/apis/site.js'
  341. import * as loginApi from '@/apis/login.js'
  342. import MapLoader from '@/utils/AMap'
  343. import Tabbar from '@/components/Tabbar.vue'
  344. import {
  345. newDate,
  346. currentTimeStamp,
  347. parseUnixTime,
  348. secondsDistance,
  349. hourDistanceArr
  350. } from '@/utils'
  351. export default {
  352. components: {
  353. Tabbar
  354. },
  355. data() {
  356. return {
  357. listShow:false,
  358. stationList: [],
  359. bannerList:[],
  360. bannerListTop:[],
  361. timeOut: false,
  362. pointTimeOut: true,
  363. chargeList: [],
  364. activityList: [],
  365. userId: '',
  366. newsList: [],
  367. pageIndex: 1,
  368. recordsTotal: 0,
  369. longitude: '',
  370. latitude: '',
  371. message: '',
  372. indexLogo: '',
  373. showOss:false,
  374. showOssImg:'',
  375. showOssIndex:'',
  376. showTop:false,
  377. showTopImg:'',
  378. showTopIndex:'',
  379. show: false,
  380. list: [{
  381. name: '长辈模式',
  382. disabled: false
  383. },
  384. {
  385. name: '标准模式',
  386. disabled: false
  387. },
  388. ],
  389. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  390. value: '长辈模式',
  391. elderStatus: false,
  392. fontMode: '',
  393. description: '00:00:00',
  394. activityDate: '',
  395. activityDateList: {},
  396. activityListShow: false,
  397. }
  398. },
  399. onLoad(op) {
  400. if (op.jpcode) {
  401. var k = API.codeOperation(op.jpcode)
  402. if (k) {
  403. uni.navigateTo({
  404. url: k
  405. })
  406. }
  407. }
  408. },
  409. onUnload() {
  410. this.timeOut = false;
  411. this.pointTimeOut = false;
  412. },
  413. onHide() {
  414. this.timeOut = false;
  415. this.pointTimeOut = false;
  416. },
  417. onReachBottom() {
  418. // if (this.newsList.length < this.recordsTotal) {
  419. // this.myLoadmore();
  420. // }
  421. },
  422. onShow() {
  423. if(this.$refs.tabbarMain){
  424. this.$refs.tabbarMain.setcount(0);
  425. }
  426. if( !this.pointTimeOut ){
  427. this.pointTimeOut=true
  428. this.getPointTimeOut();
  429. }
  430. this.getUserInfo();
  431. },
  432. onReady() {
  433. // if (this.carhelp.get("getElderModeClass")) {
  434. // if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  435. // this.fontMode = '1';
  436. // } else {
  437. // this.fontMode = '0';
  438. // }
  439. // API.changeFont({fontMode: this.fontMode}).then((res) => {
  440. // }).catch(error => {
  441. // uni.showToast({
  442. // title: error,
  443. // icon: "none"
  444. // })
  445. // })
  446. // }
  447. //this.getUserInfo();
  448. WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
  449. // //(res)
  450. }).catch(error => {
  451. //(res)
  452. })
  453. this.getBannerInfo("homepage");
  454. this.getBannerInfoTop("home-top");
  455. this.getPointTimeOut();
  456. this.getNewsList();
  457. this.getActivityInfoList();
  458. // if(process.env.NODE_ENV === "development"){
  459. // this.message="getLocation:ok"
  460. // this.longitude=112.28541;
  461. // this.latitude=30.308354;
  462. // this.searchStationData()
  463. // }
  464. },
  465. methods: {
  466. getDescriptionTime() {
  467. var date = this.activityDate;
  468. var dateMonth1 = new Date().getMonth()+1;
  469. var dateDay1 = new Date().getDate();
  470. var dateMonth2 = parseInt(date.slice(5,7));
  471. var dateDay2 = parseInt(date.slice(8,10));
  472. if(dateMonth1 < dateMonth2) {
  473. var days = new Date(new Date().getFullYear(), dateMonth1, 0).getDate();
  474. dateDay2 = dateDay2 + days;
  475. console.log(dateDay2)
  476. }
  477. if(dateDay1 < dateDay2-2) {
  478. this.description = dateDay2 - dateDay1 + '天'
  479. } else {
  480. var dateTime2=new Date(date).getTime()
  481. var c=hourDistanceArr(new Date(),new Date(dateTime2))
  482. if(c[0] < 10) {
  483. c[0] = '0'+c[0];
  484. }
  485. if(c[1] < 10) {
  486. c[1] = '0'+c[1];
  487. }
  488. if(c[2] < 10) {
  489. c[2] = '0'+c[2];
  490. }
  491. this.description = c[0]+':'+c[1]+':'+c[2];
  492. if(this.description == '00:00:00') {
  493. this.activityListShow = false;
  494. }
  495. setTimeout(()=>{
  496. this.getDescriptionTime();
  497. },1000)
  498. }
  499. },
  500. getUserInfo() {
  501. uni.showLoading({
  502. title: "加载中",
  503. mask: true,
  504. })
  505. loginApi.findByOpenId({
  506. openId: this.carhelp.getOpenId(),
  507. noerror:true,
  508. }).then((res) => {
  509. uni.hideLoading();
  510. if (res.code == 200&&res.result) {
  511. var token = res ? res.data.token : '';
  512. this.carhelp.setPersonInfo(res.data.regUser );
  513. this.carhelp.setToken(token);
  514. this.carhelp.setPersonInfoPlus(res.data);
  515. }
  516. console.log("--------------")
  517. if (res.data&&res.data.regUser) {
  518. if(res.data.regUser.fontMode == null) {
  519. this.show = true;
  520. } else {
  521. this.show = false;
  522. this.fontMode = res.data.regUser.fontMode;
  523. if(this.fontMode == '1') {
  524. this.carhelp.set("getElderModeClass", "长辈模式");
  525. } else {
  526. this.carhelp.set("getElderModeClass", "标准模式");
  527. }
  528. }
  529. this.userId = res.data.regUser.id;
  530. this.getFindChargeData();
  531. if (this.carhelp.get("getElderModeClass")) {
  532. if(this.carhelp.get("getElderModeClass") == "长辈模式") {
  533. this.elderStatus = true;
  534. } else {
  535. this.elderStatus = false;
  536. }
  537. }
  538. }else{
  539. this.carhelp.set("getElderModeClass", "长辈模式");
  540. this.elderStatus = true;
  541. var obj=this.carhelp.get("friends_invitation")
  542. // this.carhelp.set("friends_invitation",{
  543. // op:op,
  544. // date:new Date().getTime()
  545. // })
  546. if(obj&&false){
  547. if(obj.date+1000*60*60*24 > new Date().getTime() ){
  548. this.friendsInvitation(obj)
  549. }
  550. }
  551. }
  552. }).catch(error => {
  553. uni.showToast({
  554. title: error,
  555. icon: "none"
  556. })
  557. })
  558. },
  559. friendsInvitation(obj){
  560. uni.showLoading({
  561. title: "加载中",
  562. mask: true,
  563. })
  564. API.findActivity({
  565. id:obj.op.id,
  566. code:obj.op.icode
  567. }).then((res) => {
  568. uni.hideLoading()
  569. obj.activityInfo=res.data.activityInfo;
  570. var name=res.data.activityInfo.name;
  571. var title="参与活动"
  572. var okbtn="前往注册"
  573. var endTime=res.data.activityInfo.endTime;
  574. if(endTime&&secondsDistance(newDate(endTime))>0){
  575. name="活动已结束"
  576. okbtn="继续注册"
  577. title="提示"
  578. obj=null
  579. }
  580. this.carhelp.set("friends_invitation",obj)
  581. uni.showModal({
  582. title:title,
  583. content:name,
  584. confirmText:okbtn,
  585. success: res1 => {
  586. if (res1.confirm) {
  587. uni.navigateTo({
  588. url: '/pages/login/login'
  589. })
  590. } else if (res1.cancel) {
  591. //('用户点击取消');
  592. }
  593. }
  594. })
  595. }).catch(error => {
  596. uni.showToast({
  597. title: error,icon: "none"
  598. })
  599. })
  600. },
  601. clickBannerTop(){
  602. var mod = this.bannerListTop[this.showTopIndex];
  603. this.showTop=false;
  604. this.clickBanner(0,true,mod)
  605. },
  606. clickBanner(index,bl,modout){
  607. var uurl="";
  608. var mod = this.bannerList[index]
  609. if(modout){
  610. mod=modout;
  611. }
  612. mod.clickUrl=mod.linkUrl
  613. if (mod.linkPicUrl&&!bl) {
  614. this.showOss=true;
  615. this.showOssImg=mod.linkPicUrl;
  616. this.showOssIndex=index;
  617. }else if (mod.clickUrl == null) {
  618. } else if (mod.clickUrl.indexOf('http') == 0) {
  619. window.location = mod.clickUrl+uurl;
  620. }
  621. else if (mod.clickUrl.slice(-5) == 'login' && this.userId) {
  622. } else if (mod.clickUrl.indexOf('#/') == 0) {
  623. if (mod.clickUrl.indexOf("?") == -1) {
  624. mod.clickUrl += '?';
  625. }
  626. var url=mod.clickUrl.split("#")[1]
  627. //window.location = mod.clickUrl;
  628. uni.navigateTo({
  629. url: url+uurl
  630. })
  631. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  632. } else {
  633. uni.navigateTo({
  634. url: mod.clickUrl+uurl
  635. })
  636. }
  637. },
  638. getBannerInfoTop(code){
  639. uni.showLoading({
  640. title: "加载中",
  641. mask: true,
  642. })
  643. var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  644. newsApi.getBannerInfo(code).then((res) => {
  645. this.bannerListTop =res.data;
  646. for(var i in this.bannerListTop ){
  647. var mod=this.bannerListTop[i];
  648. var time=this.carhelp.get("bannerListTop"+mod.id);
  649. if(time&&nowtime==time){
  650. }else{
  651. this.showTop=true;
  652. this.showTopImg=mod.picUrl;
  653. this.showTopIndex=i;
  654. this.carhelp.set("bannerListTop"+mod.id,nowtime);
  655. break;
  656. }
  657. }
  658. uni.hideLoading()
  659. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  660. }).catch(error => {
  661. uni.showToast({
  662. title: error,icon: "none"
  663. })
  664. })
  665. },
  666. getBannerInfo(code){
  667. uni.showLoading({
  668. title: "加载中",
  669. mask: true,
  670. })
  671. newsApi.getBannerInfo(code).then((res) => {
  672. this.bannerList =res.data;
  673. uni.hideLoading()
  674. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  675. }).catch(error => {
  676. uni.showToast({
  677. title: error,icon: "none"
  678. })
  679. })
  680. },
  681. elderClick() {
  682. if(this.value == "长辈模式") {
  683. this.elderStatus = true;
  684. this.carhelp.set("getElderModeClass", "长辈模式");
  685. this.fontMode = '1';
  686. } else {
  687. this.elderStatus = false;
  688. this.carhelp.set("getElderModeClass", "标准模式");
  689. this.fontMode = '0';
  690. }
  691. API.changeFont({fontMode: this.fontMode}).then((res) => {
  692. this.show = false;
  693. }).catch(error => {
  694. uni.showToast({
  695. title: error,
  696. icon: "none"
  697. })
  698. })
  699. },
  700. getPointTimeOut() {
  701. setTimeout(() => {
  702. if (this.pointTimeOut) {
  703. this.getPoint();
  704. }
  705. }, 1000)
  706. },
  707. getFindChargeData() {
  708. API.findChargeData().then((res) => {
  709. this.chargeList = res.data.chargingRecordList;
  710. var list = res.data.chargingRecordList;
  711. for (var i = 0; i < list.length; i++) {
  712. if (list[i].status == '1' || list[i].status == '4') {
  713. this.timeOut = true;
  714. }
  715. }
  716. if (this.timeOut&&this.pointTimeOut) {
  717. setTimeout(() => {
  718. this.getFindChargeData();
  719. }, 5000)
  720. }
  721. }).catch(error => {
  722. uni.showToast({
  723. title: error,
  724. icon: "none"
  725. })
  726. })
  727. },
  728. toSearchPile() {
  729. uni.navigateTo({
  730. url: '/pages/searchPile/searchPile'
  731. })
  732. },
  733. toLogin() {
  734. uni.navigateTo({
  735. url: '/pages/login/login'
  736. })
  737. },
  738. toNewsNotice() {
  739. uni.navigateTo({
  740. url: '/pages/article/newsNotice'
  741. })
  742. },
  743. //微信扫二维码
  744. getScanCode() {
  745. if (this.userId) {
  746. WxJsApi.scanQRCode(1).then(res => {
  747. //("scanQRCode------" + res)
  748. if (res) {
  749. API.scanCode(res).then((response) => {
  750. }).catch(error => {
  751. uni.showToast({
  752. title: error,
  753. icon: "none"
  754. })
  755. })
  756. }
  757. }).catch(error => {
  758. })
  759. } else {
  760. uni.navigateTo({
  761. url: '/pages/login/login'
  762. })
  763. }
  764. },
  765. fastRecharge() {
  766. if (this.userId) {
  767. uni.navigateTo({
  768. url: '/pages/user/finance/recharge'
  769. })
  770. } else {
  771. uni.navigateTo({
  772. url: '/pages/login/login'
  773. })
  774. }
  775. },
  776. chargingRecord() {
  777. if (this.userId) {
  778. uni.navigateTo({
  779. url: '/pages/record/index'
  780. })
  781. } else {
  782. uni.navigateTo({
  783. url: '/pages/login/login'
  784. })
  785. }
  786. },
  787. rechargeActivity(item) {
  788. if (this.userId) {
  789. var uurl="&uid="+this.userId;
  790. var mod = item
  791. if (mod.clickUrl == null) {
  792. } else if (mod.clickUrl.indexOf('http') == 0) {
  793. window.location = mod.clickUrl+uurl;
  794. } else if (mod.clickUrl.indexOf('#/') == 0) {
  795. if (mod.clickUrl.indexOf("?") == -1) {
  796. mod.clickUrl += '?';
  797. }
  798. var url=mod.clickUrl.split("#")[1]
  799. //window.location = mod.clickUrl;
  800. uni.navigateTo({
  801. url: url+uurl
  802. })
  803. } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
  804. } else {
  805. uni.navigateTo({
  806. url: mod.clickUrl+uurl
  807. })
  808. }
  809. } else {
  810. uni.navigateTo({
  811. url: '/pages/login/login'
  812. })
  813. }
  814. },
  815. getActivityInfoList() {
  816. uni.showLoading({
  817. title: "加载中",
  818. mask: true,
  819. })
  820. API.activityInfoList({
  821. pageIndex: 1,
  822. pageSize: 10
  823. }).then((res) => {
  824. uni.hideLoading()
  825. var list = res.data.data;
  826. for (let i = 0; i < list.length; i++) {
  827. if(list[i].type==2&&list[i].endTime != null) {
  828. this.activityListShow = true;
  829. var reg=new RegExp('-','gi');
  830. this.activityDate = list[i].endTime.replace(reg,'/');
  831. console.log(this.activityDate)
  832. this.activityDateList = list[i];
  833. list.splice(i, 1);
  834. this.getDescriptionTime();
  835. }
  836. }
  837. this.activityList = list;
  838. }).catch(error => {
  839. uni.showToast({
  840. title: error,
  841. icon: "none"
  842. })
  843. })
  844. },
  845. searchStationData(){
  846. var data={
  847. longitude: this.longitude,
  848. latitude: this.latitude,
  849. pageSize:5
  850. }
  851. if (this.carhelp.getPersonInfo()) {
  852. data.openId=this.carhelp.getOpenId()
  853. }
  854. siteApi.searchStationData(data).then((response) => {
  855. this.stationList = response.data.data;
  856. if(response.data.data.length){
  857. var stationDataList = response.data.data;
  858. MapLoader().then(AMap1 => {
  859. for(var i in stationDataList){
  860. var item=stationDataList[i]
  861. var lnglat = new AMap.LngLat(this.longitude,this.latitude);
  862. var myDistance = lnglat.distance([item.longitude,item.latitude]);
  863. item.distance = myDistance/1000;
  864. console.log(item.distance)
  865. }
  866. })
  867. //this.stationData = stationDataList;
  868. }
  869. }).catch(error => {
  870. uni.showToast({
  871. title: error,
  872. icon: "none"
  873. })
  874. })
  875. },
  876. getPoint() {
  877. WxJsApi.getLocation().then((res) => {
  878. this.latitude = parseFloat(res.latitude);
  879. this.longitude = parseFloat(res.longitude);
  880. this.message = res.errMsg;
  881. if (res.errMsg != 'getLocation:ok') {
  882. uni.showToast({
  883. title: res
  884. })
  885. } else {
  886. this.searchStationData()
  887. }
  888. }).catch(error => {
  889. uni.showToast({
  890. title: error,
  891. icon: "none"
  892. })
  893. })
  894. },
  895. getNewsList(bl) {
  896. uni.showLoading({
  897. title: "加载中",
  898. mask: true,
  899. })
  900. if (bl) {
  901. this.newsList = [];
  902. this.pageIndex = 1;
  903. }
  904. newsApi.newsInfoList({
  905. pageIndex: this.pageIndex,
  906. pageSize:4,
  907. }).then((res) => {
  908. uni.hideLoading()
  909. this.newsList = [
  910. ...this.newsList,
  911. ...res.data.data
  912. ];
  913. this.recordsTotal = res.data.recordsTotal
  914. }).catch(error => {
  915. uni.showToast({
  916. title: error,
  917. icon: "none"
  918. })
  919. })
  920. },
  921. myLoadmore() {
  922. //this.pageIndex += 1;
  923. //this.getNewsList()
  924. },
  925. }
  926. }
  927. </script>
  928. <style lang="scss" scoped>
  929. .oldTextClassF{
  930. .station .price-free .price-1 .num{
  931. font-size: 48rpx !important;
  932. line-height: 40rpx;
  933. font-weight: bold;
  934. }
  935. }
  936. /deep/.u-image__loading{
  937. background:#ff000000;
  938. }
  939. // 头部图片
  940. img {
  941. width: 100%;
  942. height: 100%;
  943. }
  944. .background{
  945. background: linear-gradient(#D6EEDC,#FFFFFF );
  946. padding-top: 16px;
  947. }
  948. .banner {
  949. width: 91.4%;
  950. margin: 0 auto ;
  951. border-radius: 12px;
  952. height: 120px;
  953. overflow: hidden;
  954. }
  955. // 选项列表
  956. .option-list {
  957. padding-top: 15px;
  958. line-height: 20px;
  959. border-radius: 8px;
  960. text-align: center;
  961. margin: auto;
  962. display: flex;
  963. justify-content: space-around;
  964. .list-item {
  965. // 图标
  966. .icon {
  967. width: 40px;
  968. height: 40px;
  969. border-radius: 99px;
  970. line-height: 40px;
  971. font-size: 24px;
  972. text-align: center;
  973. margin: auto;
  974. color: #ffffff;
  975. }
  976. .text{
  977. margin-top: 4px;
  978. }
  979. }
  980. }
  981. .flex{
  982. display: flex;
  983. }
  984. // 站点
  985. .pack-up{
  986. float: right;
  987. font-size: 16px;
  988. color: rgba(119, 119, 119, 100);
  989. }
  990. // 附近站点改版
  991. .station{
  992. width: 91.4%;
  993. border-radius: 8px;
  994. padding: 12px 12px 12px 11px;
  995. background-color: #fff;
  996. margin: 8px auto 0;
  997. .head{
  998. display: flex;
  999. justify-content: space-between;
  1000. align-items: center;
  1001. .title{
  1002. color: rgba(16, 16, 16, 100);
  1003. font-size: 32rpx;
  1004. font-weight: 550;
  1005. }
  1006. .distance{
  1007. color: rgba(102, 102, 102, 100);
  1008. font-size: 24rpx;
  1009. .iconfont{
  1010. font-size: 24rpx;
  1011. margin-right: 4rpx;
  1012. }
  1013. }
  1014. }
  1015. .sign{
  1016. display: flex;
  1017. flex-wrap: wrap;
  1018. margin-top: 16rpx;
  1019. .sign-1{
  1020. line-height: 40rpx;
  1021. border-radius: 8rpx;
  1022. background-color: rgba(255, 255, 255, 100);
  1023. color: rgba(255, 139, 0, 100);
  1024. font-size: 24rpx;
  1025. text-align: center;
  1026. border: 1px solid rgba(255, 139, 0, 100);
  1027. padding: 0 8rpx;
  1028. margin-right:16rpx;
  1029. margin-bottom: 8rpx;
  1030. }
  1031. .sign-2{
  1032. line-height: 40rpx;
  1033. border-radius: 8rpx;
  1034. background-color: rgba(255, 255, 255, 100);
  1035. color: rgba(153, 153, 153, 100);
  1036. font-size: 24rpx;
  1037. text-align: center;
  1038. border: 1px solid rgba(204, 204, 204, 100);
  1039. padding: 0 8rpx;
  1040. margin-right: 16rpx;
  1041. margin-bottom: 8rpx;
  1042. }
  1043. }
  1044. .price-free{
  1045. display: flex;
  1046. justify-content: space-between;
  1047. margin-top: 8rpx;
  1048. .price{
  1049. display: flex;
  1050. align-items: baseline;
  1051. }
  1052. .price-1{
  1053. .num{
  1054. color: rgba(255, 98, 0, 100);
  1055. font-size: 44rpx;
  1056. }
  1057. .unit{
  1058. font-size: 12px;
  1059. color: rgba(153, 153, 153, 100);
  1060. }
  1061. }
  1062. .price-2{
  1063. font-size: 24rpx;
  1064. color: rgba(153, 153, 153, 100);
  1065. margin-left: 8rpx;
  1066. text-decoration: line-through;
  1067. }
  1068. }
  1069. .free{
  1070. display: flex;
  1071. align-items: center;
  1072. .slow,.fast{
  1073. display: flex;
  1074. .fast-font{
  1075. width: 40rpx;
  1076. height: 40rpx;
  1077. line-height: 40rpx;
  1078. border-radius: 8rpx;
  1079. background-color: rgba(186, 240, 215, 100);
  1080. color: rgba(0, 130, 69, 100);
  1081. font-size: 28rpx;
  1082. text-align: center;
  1083. margin-right: 8rpx;
  1084. }
  1085. .slow-font{
  1086. width: 40rpx;
  1087. height: 40rpx;
  1088. line-height: 40rpx;
  1089. border-radius: 8rpx;
  1090. background-color: rgba(226, 226, 226, 100);
  1091. color: rgba(128, 128, 128, 100);
  1092. font-size: 28rpx;
  1093. text-align: center;
  1094. margin-right: 8rpx;
  1095. }
  1096. .num{
  1097. font-size: 32rpx;color: rgba(0, 145, 67, 100);
  1098. line-height: 40rpx;
  1099. }
  1100. }
  1101. .slow{
  1102. margin-left: 24rpx;
  1103. }
  1104. }
  1105. }
  1106. //定位
  1107. .location {
  1108. width: 91.4%;
  1109. background-color: #ffffff;
  1110. height: 120px;
  1111. display: flex;
  1112. justify-content: space-between;
  1113. margin: 20px auto 0;
  1114. border-radius: 8px;
  1115. border: #F2F4F4 1px;
  1116. .location-text {
  1117. padding: 24px 0 0 28px;
  1118. .text-1 {
  1119. height: 16px;
  1120. line-height: 16px;
  1121. color: rgba(16, 16, 16, 100);
  1122. font-size: 16px;
  1123. text-align: left;
  1124. }
  1125. .text-2 {
  1126. height: 17px;
  1127. line-height: 17px;
  1128. color: rgba(102, 102, 102, 100);
  1129. font-size: 12px;
  1130. text-align: left;
  1131. margin-top: 4px;
  1132. white-space: nowrap; //强制不换行
  1133. text-overflow: ellipsis; //文本超出出现省略号
  1134. overflow: hidden;
  1135. }
  1136. .text-3 {
  1137. width: 80px;
  1138. height: 24px;
  1139. line-height: 22px;
  1140. border-radius: 50px;
  1141. color: rgba(0, 185, 98, 100);
  1142. font-size: 12px;
  1143. text-align: center;
  1144. border: 1px solid rgba(0, 185, 98, 100);
  1145. margin-top: 11px;
  1146. }
  1147. }
  1148. .img-box {
  1149. width: 120px;
  1150. height: 120px;
  1151. margin-right: 20px;
  1152. }
  1153. }
  1154. .state {
  1155. width: 91.4%;
  1156. background-color: #ffffff;
  1157. height: 120px;
  1158. display: flex;
  1159. margin: 20px auto 0;
  1160. border-radius: 8px;
  1161. border: #F2F4F4 1px;
  1162. .state-text {
  1163. width: 61.8%;
  1164. padding: 24px 0 0 28px;
  1165. .text-1 {
  1166. height: 16px;
  1167. line-height: 16px;
  1168. color: blueviolet;
  1169. font-size: 16px;
  1170. text-align: left;
  1171. }
  1172. .text-2 {
  1173. height: 17px;
  1174. line-height: 17px;
  1175. color: #101010;
  1176. text-align: left;
  1177. margin-top: 12px;
  1178. }
  1179. .text-3 {
  1180. font-size: 12px;
  1181. line-height: 20px;
  1182. margin-top: 6px;
  1183. color: #999999;
  1184. }
  1185. }
  1186. .img-box {
  1187. width: 120px;
  1188. height: 120px;
  1189. margin-right: 20px;
  1190. }
  1191. }
  1192. //充值
  1193. .top-up {
  1194. width: 91.4%;
  1195. margin: 12px auto 0 ;
  1196. .top-up-title {
  1197. color: rgba(16, 16, 16, 100);
  1198. font-size: 16px;
  1199. }
  1200. .card-box{
  1201. display: flex;
  1202. justify-content: space-between;
  1203. padding: 0 0 16px 0;
  1204. .card{
  1205. width: 48.3%;
  1206. height: 65px;
  1207. img{
  1208. width: 100%;
  1209. height: 100%;
  1210. }
  1211. }
  1212. }
  1213. .img-box2{
  1214. margin-top: 12px;
  1215. display: flex;
  1216. justify-content: space-between;
  1217. img{
  1218. width: 100%;
  1219. height: 100%;
  1220. }
  1221. .left-image{
  1222. width: 48.3%;
  1223. height: 166px;
  1224. padding: 8px 0 0 12px;
  1225. // background: url(@/assets/img/topup1.png);
  1226. background-repeat: no-repeat;
  1227. background-position: 30% 10%;
  1228. background-size: cover;
  1229. p{
  1230. color: rgba(56, 47, 33, 100);
  1231. font-size: 24px;
  1232. line-height: 28px;
  1233. font-weight: 600;
  1234. }
  1235. .time-activities{
  1236. color: rgba(56, 39, 14, 100);
  1237. font-size: 16px;
  1238. line-height: 22px;
  1239. margin-top: 4px;
  1240. .time{
  1241. margin-left: 4px;
  1242. color: #fa3534;
  1243. font-weight: bold;
  1244. }
  1245. }
  1246. }
  1247. .right-image{
  1248. width: 48.3%;
  1249. display: flex;
  1250. flex-direction: column;
  1251. justify-content: space-between;
  1252. .margin-top{
  1253. margin-top: 12px;
  1254. }
  1255. img{
  1256. height: 77px;
  1257. }
  1258. };
  1259. }
  1260. }
  1261. // 小竖线
  1262. .line {
  1263. display: inline-block;
  1264. width: 3px;
  1265. height: 12px;
  1266. margin-right: 7px;
  1267. background-color: rgba(0, 145, 67, 100);
  1268. }
  1269. // 新闻公告
  1270. .news-title {
  1271. padding: 0 16px;
  1272. margin-top: 12px;
  1273. color: rgba(16, 16, 16, 100);
  1274. font-size: 16px;
  1275. display: flex;
  1276. justify-content: space-between;
  1277. background-color: #F2F4F4;
  1278. .news-title-left {
  1279. display: flex;
  1280. }
  1281. .more {
  1282. font-size: 14px;
  1283. color: #777777;
  1284. display: flex;
  1285. line-height: 20px;
  1286. .more-icon {
  1287. font-size: 24px
  1288. }
  1289. }
  1290. }
  1291. .news {
  1292. background-color: #fff;
  1293. width: 91.4%;
  1294. margin: 12px auto 0;
  1295. border-radius: 8px;
  1296. .news-content {
  1297. display: flex;
  1298. justify-content: space-between;
  1299. padding: 12px;
  1300. .content-text {
  1301. width: 56.2%;
  1302. height: 100%;
  1303. line-height: 21px;
  1304. color: #101010;
  1305. text-align: left;
  1306. font-size: 14px;
  1307. }
  1308. .content-title {
  1309. width: 100%;
  1310. overflow: hidden;
  1311. text-overflow: ellipsis;
  1312. display: -webkit-box;
  1313. -webkit-box-orient: vertical;
  1314. -webkit-line-clamp: 3;
  1315. }
  1316. .content-img {
  1317. width: 40.57%;
  1318. height: 100%;
  1319. border-radius: 4px;
  1320. overflow: hidden;
  1321. img {
  1322. width: 100%;
  1323. height: 80%;
  1324. }
  1325. }
  1326. .news-time {
  1327. margin-top: 5%;
  1328. color: #999999;
  1329. width: 80px;
  1330. height: 20px;
  1331. font-size: 14px;
  1332. }
  1333. }
  1334. }
  1335. .bottom {
  1336. width: 100%;
  1337. height: 100px;
  1338. .bot {
  1339. width: 100%;
  1340. margin: 0 auto;
  1341. padding: 0 17.3%;
  1342. justify-content: space-between;
  1343. display: flex;
  1344. .bot-line {
  1345. margin-top: 20px;
  1346. width: 21.3%;
  1347. height: 0px;
  1348. border: 1px solid rgba(207, 210, 213, 100);
  1349. }
  1350. .bot-text {
  1351. white-space: nowrap;
  1352. height: 17px;
  1353. margin-top: 13px;
  1354. margin-left: 12px;
  1355. margin-right: 12px;
  1356. font-size: 12px;
  1357. text-align: center;
  1358. color: rgba(182, 189, 195, 100);
  1359. }
  1360. }
  1361. }
  1362. // 导航栏
  1363. .navigation {
  1364. width: 100%;
  1365. // height: 40px;
  1366. padding: 10px 0;
  1367. background-color: #fff;
  1368. position: fixed;
  1369. bottom: 0;
  1370. left: 0;
  1371. display: flex;
  1372. justify-content: space-around;
  1373. text-align: center;
  1374. color: #999999;
  1375. .nav-icon {
  1376. width: 54px;
  1377. font-size: 24px
  1378. }
  1379. .nav-text {
  1380. font-size: 14px;
  1381. }
  1382. }
  1383. .shema {
  1384. width: 70%;
  1385. padding-bottom: 20px;
  1386. border-radius: 16px;
  1387. background-color: #fff;
  1388. position: fixed;
  1389. top: 100px;
  1390. left: 0;
  1391. right: 0;
  1392. margin: 0 auto;
  1393. z-index: 9999;
  1394. .title {
  1395. height: 33px;
  1396. color: rgba(16, 16, 16, 100);
  1397. font-size: 24px;
  1398. text-align: center;
  1399. padding: 16px 0;
  1400. }
  1401. .u-radio-group {
  1402. margin: 16px 5vw;
  1403. }
  1404. /deep/.u-radio {
  1405. width: 60vw !important;
  1406. padding: 24px 24px 40px;
  1407. line-height: 20px;
  1408. border-radius: 16px;
  1409. text-align: center;
  1410. border: #101010 1px solid;
  1411. margin-top: 12px;
  1412. }
  1413. /deep/ .u-radio__label {
  1414. text-align: left;
  1415. height: 24px;
  1416. // color: rgba(0, 185, 98, 100);
  1417. font-size: 24px;
  1418. }
  1419. p {
  1420. height: 22px;
  1421. color: rgba(102, 102, 102, 100);
  1422. font-size: 14px;
  1423. margin-top: 12px;
  1424. white-space: nowrap
  1425. }
  1426. .hint {
  1427. text-align: center;
  1428. }
  1429. .btn-box {
  1430. margin-top: 20px;
  1431. .choice-btn {
  1432. width: 80%;
  1433. }
  1434. }
  1435. }
  1436. .wrap {
  1437. display: flex;
  1438. align-items: center;
  1439. justify-content: center;
  1440. height: 100%;
  1441. }
  1442. // 登录提示
  1443. .login-prompt {
  1444. width: 91.4%;
  1445. height: 40px;
  1446. line-height: 40px;
  1447. border-radius: 50px;
  1448. text-align: left;
  1449. padding-left: 16px;
  1450. padding-right: 4px;
  1451. background-color: rgba(0, 0, 0, 0.6);
  1452. position: fixed;
  1453. bottom: 75px;
  1454. color: #ffffff;
  1455. .button {
  1456. width: 88px;
  1457. height: 32px;
  1458. line-height: 32px;
  1459. border-radius: 50px;
  1460. background-color: rgba(0, 185, 98, 100);
  1461. text-align: center;
  1462. float: right;
  1463. margin-top: 4px;
  1464. }
  1465. }
  1466. .showOss{
  1467. /deep/.u-model,/deep/.u-mode-center-box{
  1468. background-color: transparent;
  1469. }
  1470. }
  1471. </style>