index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. <template>
  2. <view>
  3. <!-- #ifdef APP -->
  4. <u-no-network zIndex='9999' @retry='retry'></u-no-network>
  5. <!-- #endif -->
  6. <view v-if="isConnected">
  7. <block v-if="isLogin && car_info.car_sn">
  8. <view class="container-view">
  9. <!-- #ifdef MP-WEIXIN -->
  10. <view :style="{height: `${statusBarHeight + 30}px`}"></view>
  11. <!-- #endif -->
  12. <!-- #ifdef APP -->
  13. <view :style="{height: `${statusBarHeight}px`}"></view>
  14. <!-- #endif -->
  15. <!-- <navBar type="index" /> -->
  16. <view class="flex-row flex-between align-center padding_about_40">
  17. <view class="car-name-view" @tap="navSwitchCar">
  18. <text class="text" style="margin-right: 10rpx;">{{car_info.car_name}}</text>
  19. <img src="https://qiniu.bms16.com/FoSXDpVGvbdmwbX3CMUBvR7X4IzI"
  20. style="width: 14rpx;height: 14rpx;" alt="">
  21. </view>
  22. <view @click="routerLink('/pages/message/index?isSys=0')" class="news">
  23. <view v-if="newsList.device_count > 0" class="num">
  24. {{ newsList.device_count}}
  25. </view>
  26. <image src="https://qiniu.bms16.com/FtlfBtBE5-TeTI5EdrciX_u8u_Sx"
  27. style="width: 48rpx;height: 48rpx;" mode=""></image>
  28. </view>
  29. </view>
  30. <view v-if="isOverdueShow" class="overdue-view flex-row flex-between">
  31. <view class="overdue-view-text flex-row">
  32. <text class="overdue-text-left">您已逾期
  33. <text class="overdue-num">
  34. <block v-if="orderInfo.hire_duration_time">
  35. {{orderInfo.hire_duration_time.day > 0 ? orderInfo.hire_duration_time.day :'' }}<text
  36. v-if="orderInfo.hire_duration_time.day>0">日</text>{{orderInfo.hire_duration_time.hour > 0 ? orderInfo.hire_duration_time.hour :'' }}<text
  37. v-if="orderInfo.hire_duration_time.hour>0">小时</text>{{orderInfo.hire_duration_time.minute > 0 ? orderInfo.hire_duration_time.minute :'' }}<text
  38. v-if="orderInfo.hire_duration_time.minute>0">分</text>
  39. </block>
  40. </text>
  41. </text>
  42. <text style="font-size: 24rpx;opacity: 0.5;">请及时续费或归还车辆</text>
  43. </view>
  44. <view @click="routerLink('/pages/order/order')" class="renew-btn">去续费</view>
  45. </view>
  46. <view class="car-img-view" >
  47. <view class="flex-row flex-between" style="align-items: center;">
  48. <text class="quantity flex-row">{{car_info.soc}} <text
  49. style="font-size: 28rpx;font-weight: 500;">%</text></text>
  50. <view v-if="car_info.sold_time==0" @tap.stop="tapReturnCar" class="return-car-btn flex-row">
  51. <image style="width: 46rpx;height: 46rpx;" src="https://qiniu.bms16.com/FtyG7Gq2QBaVVrZmTnmZFzXhE5nN" mode=""></image>
  52. <view style="margin-left: 12rpx;">我要还车</view>
  53. </view>
  54. </view>
  55. <view class="quantity-view flex-row">
  56. <u-line-progress style="width: 100rpx;" active-color="#2ADA62" height="10"
  57. :show-percent="false" :percent="car_info.soc"></u-line-progress>
  58. <view class="quantity-text flex-row">
  59. <view style="font-weight:400;font-size: 22rpx;width: 44rpx;">{{$t("续航")}}</view>
  60. <view style="font-size: 36rpx;">{{formatDistance(car_info.remain_mail) }}<text style="font-size: 30rpx;">{{car_info.remain_mail ? car_info.remain_mail>1000?'km':'m' :'km'}}</text></view>
  61. </view>
  62. </view>
  63. <!-- <img :src="car_info.model_images||'https://qiniu.bms16.com/Fg8_p7083jpsy8BXG4bR6yMs7jQX'" style="width: 100%;height: 526rpx;" alt=""> -->
  64. <!-- <img :src="'https://qiniu.bms16.com/Fg8_p7083jpsy8BXG4bR6yMs7jQX'"
  65. style="width: 100%;height: 526rpx;" alt=""> -->
  66. <view @tap="toMoreInfoPage" class="custom-swiper-view">
  67. <u-swiper v-if="car_image.length!=0" :list="car_image" :autoplay="false" mode="none"
  68. :height="480" bgColor="transparent" class="custom-swiper">
  69. </u-swiper>
  70. <image v-else style="width: 100%;height: 480rpx;" src="https://qiniu.bms16.com/Fg8_p7083jpsy8BXG4bR6yMs7jQX" mode="">
  71. </image>
  72. </view>
  73. <view class="flex-row align-center update-time-view">
  74. <text style="margin-right: 10rpx;">{{car_info.online==1&&car_info.acc_state==1?$t("车辆已开机"): $t("车辆已关机")}} </text>
  75. <text v-if="car_info.heart_time != 0" style="margin-right: 10rpx;">{{$t("更新于")}} {{tools.formatTime( car_info.heart_time|| '')}}</text>
  76. <img :src="'https://qiniu.bms16.com/'+(isBluethConnect?'Fk3f9H_o-1Wq2xXx7I_xo7bxK1xJ':'FsL6XWGoIhfsVB7jRg6EGFVsuaTZ')"
  77. :style="{width: (isBluethConnect?32:24)+'rpx',height: '32rpx'}" alt="">
  78. </view>
  79. </view>
  80. <Control :contrilList="contrilList" @toBluetooth="inductiveUnlockHandle" @loadCarDetail="loadCarDetail"/>
  81. <!-- car_info.is_share==1 是别人共享的车 -->
  82. <!-- car_info.authority_list.indexOf(4) == -1 共享地图权限 -->
  83. <!-- car_info.authority_list.indexOf(5) == -1 共享套餐权限 -->
  84. <view :class="['flex-row', 'flex-between', 'map-card-view',car_info.exchange_package_info && car_info.exchange_package_info.activity_time&&(car_info.is_share!=1&&car_info.authority_list.indexOf(5) != -1)?'height_362':'height_260']">
  85. <MapCard v-if="car_info.is_share==1&&car_info.authority_list.indexOf(4) == -1" :car_info="car_info" :height="!!(car_info.exchange_package_info && car_info.exchange_package_info.activity_time)"/>
  86. <view class="card-right">
  87. <view class="card-bg" @tap="navTravelingTrack">
  88. <view class="flex-row flex-between card-top-title">
  89. <view class="flex-row align-center">
  90. <img style="width: 36rpx;height: 36rpx;"
  91. src="https://qiniu.bms16.com/FkrcMCV__HraZ0W0NBNdEZPIlwss" alt="">
  92. <text class="margin_l_8">{{isTrackOrAll?'最近骑行':'总里程'}}</text>
  93. </view>
  94. <view @tap.stop="isTrackOrAll=!isTrackOrAll"><img
  95. style="width: 24rpx;height: 20rpx;"
  96. src="https://qiniu.bms16.com/FltPK-o7KGS3dQ2pfQHXGSxOdzaN" alt=""></view>
  97. </view>
  98. <view class="card-top-text">{{car_info.current_mail}}<text class="font_24">km</text>
  99. </view>
  100. </view>
  101. <view v-if="car_info.exchange_package_info && car_info.exchange_package_info.activity_time&&(car_info.is_share==1&&car_info.authority_list.indexOf(5) == -1)" class="card-bg">
  102. <view class="flex-row card-top-title">
  103. <img style="width: 36rpx;height: 36rpx;"
  104. src="https://qiniu.bms16.com/FtalApKa3STyruaBxxRB4O9hHXyE" alt="">
  105. <text class="margin_l_8">{{$t("换电套餐")}}</text>
  106. </view>
  107. <view v-if="car_info.package_type == 1" class="card-top-text">
  108. {{calculateRemainingDays(car_info.exchange_package_info.expire_time)}} <text
  109. class="font_24">{{$t("天")}}</text>
  110. </view>
  111. <view v-if="car_info.package_type == 2" class=" card-top-text">{{item.last_num}} <text
  112. class="font_24">{{$t("次")}}</text></view>
  113. <view v-if="car_info.package_type == 3" class=" card-top-text">
  114. {{item.total_day}}{{$t("天")}}/{{item.last_num}} <text
  115. class="font_24">{{$t("次")}}</text>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <!-- <custom-switch :defaultPosition="'right'" :width="'400rpx'"
  121. :height="'96rpx'" v-model="switchValue" :fetchData="loadData"></custom-switch> -->
  122. <view class="config-view">
  123. <view @tap="navToPage" class="flex-row config-car-view">
  124. <view class="margin_r_20"><img class="icon_style_64"
  125. src="https://qiniu.bms16.com/Ftzyvs5whxDdMFksYChHaWKVb0Uk" alt=""></view>
  126. <view class="flex-row config-text-view" @tap="inductiveUnlockHandle">
  127. <view class="flex-row font_w_600">{{$t("感应解锁")}}</view>
  128. <view class="flex-row tip-text-config">{{isBluethConnect?$t("蓝牙配对成功"):$t("请先连接蓝牙")}}
  129. </view>
  130. </view>
  131. <img class="icon_style_28" src="https://qiniu.bms16.com/FqnbZ2iKHmzCGJA8XD30sf5g_CAm"
  132. alt="">
  133. </view>
  134. <view @tap="navToPage" data-url="/pages/userManagement/userManagement"
  135. class="flex-row config-car-view">
  136. <view class="margin_r_20"><img class="icon_style_64"
  137. src="https://qiniu.bms16.com/FhKkijkN__9UzhYNgamBFSggIlYo" alt=""></view>
  138. <view class="flex-row config-text-view">
  139. <view class="flex-row font_w_600">{{$t("用车人管理")}}</view>
  140. <view class="flex-row tip-text-config">{{car_info.share_num + $t("个家庭账号")}}</view>
  141. </view>
  142. <img class="icon_style_28" src="https://qiniu.bms16.com/FqnbZ2iKHmzCGJA8XD30sf5g_CAm"
  143. alt="">
  144. </view>
  145. <view @click="srcFn(`/pages/deviceInfo/deviceInfo`)" class="flex-row config-car-view">
  146. <view class="margin_r_20"><img class="icon_style_64"
  147. src="https://qiniu.bms16.com/FsAg6mHEBJfbtpgIHBrDdNiPo1iH" alt=""></view>
  148. <view class="flex-row config-text-view">
  149. <view class="flex-row font_w_600">{{$t("设备信息")}}</view>
  150. <view class="flex-row tip-text-config">{{$t("软件版本") + (car_info.firmware||'')}}</view>
  151. </view>
  152. <img class="icon_style_28" src="https://qiniu.bms16.com/FqnbZ2iKHmzCGJA8XD30sf5g_CAm"
  153. alt="">
  154. </view>
  155. </view>
  156. <view style="height: 264rpx;"></view>
  157. </view>
  158. </block>
  159. <block v-else>
  160. <UnleasedPages :model_list="model_list" :img_list="img_list" />
  161. </block>
  162. <BluetoothUnlockAuth ref="bluetoothUnlockAuth" />
  163. <CustomTabbar @changCar='changCar' curt-tab="home" />
  164. <AndroidUnlockAuth :authStepList="authStepList" :value="isShowPermission" @closePermission="closePermission"
  165. v-if="isShowPermission && (platform === 'android')" />
  166. <IosUnlockAuth :authStepList="authStepList" :value="isShowPermission" @closePermission="closePermission"
  167. v-else-if="isShowPermission && (platform === 'ios')" />
  168. </view>
  169. <returnCar :isShowReturnCar="isShowReturnCar" typePage="index" @closeShowReturnCarBtn="()=>isShowReturnCar=false"
  170. @navStoreBtn="navStoreBtn" @immediatelyReturnBtn="immediatelyReturnBtn" />
  171. </view>
  172. </template>
  173. <script module="tools" lang="wxs" src="@/pages/common/wxs/tools.wxs"></script>
  174. <script module="tools" lang="sjs" src="@/pages/common/wxs/tools.sjs"></script>
  175. <script>
  176. var config = require('@/common/config.js');
  177. var config_gyq = require('@/common/config_gyq.js');
  178. var common = require('@/common/common.js');
  179. var http = require('@/common/http.js');
  180. var request = require('@/common/request.js');
  181. var storage = require('@/common/storage.js');
  182. import Control from './components/control/control'
  183. import MapCard from './components/mapCard/mapCard'
  184. import UnleasedPages from './components/unleasedPages/unleasedPages'
  185. import CustomTabbar from '@/component/customTabbar/index';
  186. import BluetoothUnlockAuth from '../bluetoothUnlock/bluetoothUnlockAuth.vue'
  187. import AndroidUnlockAuth from './components/AndroidUnlockAuth.vue'
  188. import IosUnlockAuth from './components/IosUnlockAuth.vue'
  189. import ReturnCar from '@/component/returnCar/returnCar';
  190. import {
  191. getFunctionTag,
  192. } from '@/common/storage.js';
  193. import permision from "@/js_sdk/wa-permission/permission.js"
  194. let bluetooth = require('@/common/bluetooth.js');
  195. export default {
  196. data() {
  197. return {
  198. isModel: false,
  199. isConnected: false,
  200. statusBarHeight: 0,
  201. newsList: {},
  202. img_list: [],
  203. isLogin: false,
  204. isOverdueShow: false,
  205. contrilList: [],
  206. isTrackOrAll: true,
  207. model_list: [],
  208. car_list: [], //用户车辆列表
  209. car_sn: '', //当前车辆编号
  210. isHideInduction: true,
  211. car_info: {
  212. exchange_package_info: {
  213. activity_time: 0
  214. }
  215. },
  216. platform: 'android', //手机型号
  217. isShowPermission: false, //是否打开权限弹窗
  218. statusBarHeight: 0,
  219. isBluethConnect: false, //当前是否蓝牙连接或者配对
  220. isOpenAllPermission: false, //所有蓝牙配对所需权限是否已开启
  221. isShowReturnCar:false,
  222. overdueData:{},
  223. car_image:[]
  224. };
  225. },
  226. computed: {},
  227. components: {
  228. Control,
  229. MapCard,
  230. CustomTabbar,
  231. UnleasedPages,
  232. BluetoothUnlockAuth,
  233. AndroidUnlockAuth,
  234. IosUnlockAuth,
  235. ReturnCar
  236. },
  237. /**
  238. * 生命周期函数--监听页面加载
  239. */
  240. onLoad: function(options) {
  241. this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 0
  242. let _this = this
  243. // #ifdef APP
  244. uni.getNetworkType({
  245. success: (res) => {
  246. if (res.networkType == 'none') {
  247. this.isConnected = false;
  248. } else {
  249. this.isConnected = true;
  250. }
  251. }
  252. });
  253. uni.onNetworkStatusChange((res) => {
  254. _this.isConnected = res.isConnected
  255. if (res.isConnected) {
  256. _this.init()
  257. }
  258. });
  259. // #endif
  260. // #ifndef APP
  261. this.isConnected = true
  262. _this.init()
  263. // #endif
  264. },
  265. /**
  266. * 生命周期函数--监听页面显示
  267. */
  268. onShow: function() {
  269. // #ifdef APP
  270. uni.getNetworkType({
  271. success: (res) => {
  272. if (res.networkType != 'none') {
  273. this.init()
  274. }
  275. }
  276. });
  277. // #endif
  278. // #ifndef APP
  279. this.init()
  280. // #endif
  281. },
  282. // 分享给好友
  283. onShareAppMessage: function(res) { //发送给朋友
  284. return {
  285. title: this.appConfig.app_name,
  286. path: 'pages/index/index',
  287. }
  288. },
  289. methods: {
  290. init() {
  291. this.loadModelList()
  292. this.contrilList = getFunctionTag().activeTag
  293. const user_token = storage.getUserToken()
  294. this.car_info = uni.getStorageSync('car_info') || {};
  295. const app = getApp();
  296. this.isBluethConnect = app.globalData.nearLockCheck
  297. if (!user_token) return
  298. this.newsNumFn()
  299. this.isLogin = true
  300. this.loadUserCarList()
  301. // #ifdef APP
  302. //蓝牙配对所需权限 运行小程序需要隐藏
  303. // const permissionArr = permision.requestAndroidPermissions(this.platform)
  304. // console.log(permissionArr, 'permissionArr');
  305. // this.setData({
  306. // authStepList: permissionArr
  307. // })
  308. // permissionArr.map(item => {
  309. // if (!item.state) this.isOpenAllPermission = true
  310. // })
  311. // #endif
  312. // if (!this.car_info.car_sn) {
  313. // } else {
  314. // this.loadCarDetail(this.car_info.car_sn)
  315. // }
  316. },
  317. retry() {
  318. },
  319. async newsNumFn() {
  320. let {
  321. data
  322. } = await request.postApi(config_gyq.API_FLK_MESSAGE_UNREAD_COUNT, {})
  323. if (data.code == 200) {
  324. this.newsList = data.data
  325. }
  326. },
  327. changCar(e) {
  328. this.car_info = e
  329. },
  330. routerLink(url) {
  331. uni.navigateTo({
  332. url
  333. })
  334. },
  335. loadIsLogin() {
  336. uni.navigateTo({
  337. url: '/pages/loginRegister/login',
  338. })
  339. },
  340. toMoreInfoPage() {
  341. console.log(1111);
  342. uni.navigateTo({
  343. url: '/pages/moreInfo/moreInfo',
  344. });
  345. },
  346. navTravelingTrack() {
  347. uni.navigateTo({
  348. url: '/pages/travelingTrack/travelingTrack?longitude=' + this.longitude + '&latitude=' + this
  349. .latitude,
  350. success: function(res) {},
  351. fail: function(res) {},
  352. complete: function(res) {}
  353. });
  354. },
  355. inductiveUnlockHandle() {
  356. uni.navigateTo({ url: '/pages/bluetoothUnlock/bluetoothPair' })
  357. // console.log(!this.isOpenAllPermission,this.isBluethConnect,'this.isBluethConnect');
  358. // if(this.isBluethConnect){
  359. // uni.navigateTo({ url: '/pages/bluetoothUnlock/unlockSet' })
  360. // }else{
  361. // if(!this.isOpenAllPermission){
  362. // common.simpleToast('所需权限开启成功,前往开启蓝牙配对...');
  363. // uni.navigateTo({ url: '/pages/bluetoothUnlock/bluetoothPair' })
  364. // }else{
  365. // this.setData({
  366. // isShowPermission:true,
  367. // })
  368. // }
  369. // }
  370. },
  371. closePermission() {
  372. this.setData({
  373. isShowPermission: false
  374. })
  375. },
  376. showInduction() {
  377. this.isHideInduction = true
  378. },
  379. loadModelList() {
  380. if (this.isModel) {
  381. return
  382. }
  383. this.isModel = true
  384. const me = this
  385. http.postApi(config.API_RECOMMEND_CAR_MODEL_LIST, {}, (resp) => {
  386. if (resp.data.code === 200) {
  387. const list = resp.data.data
  388. const img_list = resp.data.data.map(item => item.image)
  389. me.setData({
  390. model_list: list,
  391. img_list: img_list
  392. })
  393. } else {
  394. common.simpleToast(resp.data.msg);
  395. }
  396. })
  397. },
  398. srcFn(url) {
  399. uni.navigateTo({
  400. url: url
  401. });
  402. },
  403. navToPage(e) {
  404. const me = this
  405. const url = e.currentTarget.dataset.url;
  406. if (!url) {
  407. return;
  408. }
  409. uni.navigateTo({
  410. url: url
  411. });
  412. },
  413. loadUserCarList() {
  414. const me = this
  415. http.postApi(config.API_FLK_CAR_DEVICE_LIST, {}, (resp) => {
  416. if (resp.data.code === 200) {
  417. const list = resp.data.data.list
  418. let isCar = false
  419. let itemCar = {}
  420. for (let i = 0; i < list.length; i++) {
  421. let item = list[i];
  422. if (item.car_sn == this.car_info.car_sn) {
  423. isCar = true
  424. itemCar = item
  425. }
  426. }
  427. if (!isCar) {
  428. if (list.length > 0) {
  429. uni.removeStorageSync('car_info')
  430. me.setData({
  431. car_list: list,
  432. car_sn: list[0].car_sn || '',
  433. })
  434. me.loadCarDetail(list[0].car_sn)
  435. } else {
  436. uni.removeStorageSync('car_info')
  437. this.car_info = {}
  438. }
  439. } else {
  440. me.loadCarDetail(itemCar.car_sn)
  441. }
  442. } else {
  443. common.simpleToast(resp.data.msg);
  444. }
  445. })
  446. },
  447. loadCarDetail(car_sn) {
  448. const me = this
  449. http.postApi(config.API_FLK_CAR_DETAIL, {
  450. car_sn,
  451. time:Math.floor(Date.now() / 1000)
  452. }, (resp) => {
  453. uni.hideLoading();
  454. console.log(resp.data)
  455. if (resp.data.code === 200) {
  456. resp.data.data.car_sn = car_sn
  457. const _car_image=resp.data.data.model_images?resp.data.data.model_images.split(','):[]
  458. me.setData({
  459. car_info: resp.data.data,
  460. car_image:_car_image
  461. })
  462. uni.setStorageSync('car_info', this.car_info);
  463. console.log(_car_image, 'this.car_info------------------');
  464. //判断逾期
  465. if (!resp.data.data.sold_time) return
  466. let time = Math.ceil(resp.data.data.hire_end_time - Math.floor(new Date()) / 1000) / 60
  467. if (time > 0) {
  468. this.isOverdueShow = true
  469. this.car_info.hire_end_time = common.getTimeToDay(time)
  470. } else {
  471. this.isOverdueShow = false
  472. }
  473. } else {
  474. // common.simpleToast(resp.data.msg);
  475. }
  476. })
  477. },
  478. navSwitchCar() {
  479. const me = this
  480. //如果租/购多个车辆的话可以切换当前车辆
  481. uni.navigateTo({
  482. url: `/pages/carList/carList?list=${encodeURIComponent(JSON.stringify(me.car_list))}&car_sn=${me.car_sn}`,
  483. })
  484. },
  485. formatDistance(distanceMeters) {
  486. console.log(distanceMeters,'distanceMeters');
  487. // 判断距离是否超过1000米
  488. // let distanceMeters=Number(_distanceMeters)
  489. if (distanceMeters >= 1000) {
  490. // 如果超过1000米,则转换为千米并返回
  491. return (distanceMeters / 1000).toFixed(1);
  492. } else {
  493. // 否则直接返回米
  494. try {
  495. return distanceMeters;
  496. } catch (error) {
  497. return 0;
  498. }
  499. }
  500. },
  501. navStoreBtn() {
  502. const {
  503. latitude,
  504. longitude,
  505. address,
  506. model_name
  507. } = this.car_info
  508. uni.openLocation({
  509. latitude: latitude - 0,
  510. longitude: longitude - 0,
  511. scale: 15,
  512. name: model_name,
  513. address: address,
  514. success: function(res) {}
  515. });
  516. },
  517. tapReturnCar() {
  518. this.overdueMoneyFn(this.car_info.car_sn)
  519. this.setData({
  520. isShowReturnCar: true
  521. })
  522. },
  523. //逾期费用计算
  524. async overdueMoneyFn(car_sn) {
  525. let {
  526. data
  527. } = await request.postApi(config_gyq.API_FLK_CAR_OVERDUE_MONEY, {
  528. car_sn
  529. })
  530. if (data.code == 200) {
  531. this.overdueData = data.data
  532. } else {
  533. common.simpleToast(data.msg)
  534. }
  535. },
  536. immediatelyReturnBtn() {
  537. const {
  538. car_sn,
  539. model_id
  540. } = this.car_info
  541. //提交还车图片
  542. uni.navigateTo({
  543. url: `/pages/activation/activation?isReturnCar=${true}&model_id=${model_id}&car_sn=${car_sn}&isOverdue=${this.isOverdueShow}&overdueMoney=${this.overdueData.money}&overdueTime=${this.overdueData.time}&type=index`
  544. });
  545. },
  546. }
  547. };
  548. </script>
  549. <style lang="scss" scoped>
  550. @import './index.css';
  551. .news {
  552. position: relative;
  553. margin-right: 20rpx;
  554. .num {
  555. position: absolute;
  556. right: -6rpx;
  557. top: -6rpx;
  558. min-width: 28rpx;
  559. height: 28rpx;
  560. font-size: 18rpx;
  561. display: flex;
  562. align-items: center;
  563. justify-content: center;
  564. color: #fff;
  565. line-height: 1;
  566. background-color: #FA2918;
  567. border-radius: 50%;
  568. z-index: 99;
  569. }
  570. }
  571. </style>