index.vue 20 KB

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