index.vue 38 KB

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