index.vue 38 KB

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