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 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 @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. methods: {
  288. init() {
  289. this.loadModelList()
  290. this.contrilList = getFunctionTag().activeTag
  291. const user_token = storage.getUserToken()
  292. this.car_info = uni.getStorageSync('car_info') || {};
  293. const app = getApp();
  294. this.isBluethConnect = app.globalData.nearLockCheck
  295. if (!user_token) return
  296. this.newsNumFn()
  297. this.isLogin = true
  298. this.loadUserCarList()
  299. // #ifdef APP
  300. //蓝牙配对所需权限 运行小程序需要隐藏
  301. // const permissionArr = permision.requestAndroidPermissions(this.platform)
  302. // console.log(permissionArr, 'permissionArr');
  303. // this.setData({
  304. // authStepList: permissionArr
  305. // })
  306. // permissionArr.map(item => {
  307. // if (!item.state) this.isOpenAllPermission = true
  308. // })
  309. // #endif
  310. // if (!this.car_info.car_sn) {
  311. // } else {
  312. // this.loadCarDetail(this.car_info.car_sn)
  313. // }
  314. },
  315. retry() {
  316. },
  317. async newsNumFn() {
  318. let {
  319. data
  320. } = await request.postApi(config_gyq.API_FLK_MESSAGE_UNREAD_COUNT, {})
  321. if (data.code == 200) {
  322. this.newsList = data.data
  323. }
  324. },
  325. changCar(e) {
  326. this.car_info = e
  327. },
  328. routerLink(url) {
  329. uni.navigateTo({
  330. url
  331. })
  332. },
  333. loadIsLogin() {
  334. uni.navigateTo({
  335. url: '/pages/loginRegister/login',
  336. })
  337. },
  338. toMoreInfoPage() {
  339. uni.navigateTo({
  340. url: '/pages/moreInfo/moreInfo',
  341. });
  342. },
  343. navTravelingTrack() {
  344. uni.navigateTo({
  345. url: '/pages/travelingTrack/travelingTrack?longitude=' + this.longitude + '&latitude=' + this
  346. .latitude,
  347. success: function(res) {},
  348. fail: function(res) {},
  349. complete: function(res) {}
  350. });
  351. },
  352. inductiveUnlockHandle() {
  353. uni.navigateTo({ url: '/pages/bluetoothUnlock/bluetoothPair' })
  354. // console.log(!this.isOpenAllPermission,this.isBluethConnect,'this.isBluethConnect');
  355. // if(this.isBluethConnect){
  356. // uni.navigateTo({ url: '/pages/bluetoothUnlock/unlockSet' })
  357. // }else{
  358. // if(!this.isOpenAllPermission){
  359. // common.simpleToast('所需权限开启成功,前往开启蓝牙配对...');
  360. // uni.navigateTo({ url: '/pages/bluetoothUnlock/bluetoothPair' })
  361. // }else{
  362. // this.setData({
  363. // isShowPermission:true,
  364. // })
  365. // }
  366. // }
  367. },
  368. closePermission() {
  369. this.setData({
  370. isShowPermission: false
  371. })
  372. },
  373. showInduction() {
  374. this.isHideInduction = true
  375. },
  376. loadModelList() {
  377. if (this.isModel) {
  378. return
  379. }
  380. this.isModel = true
  381. const me = this
  382. http.postApi(config.API_RECOMMEND_CAR_MODEL_LIST, {}, (resp) => {
  383. if (resp.data.code === 200) {
  384. const list = resp.data.data
  385. const img_list = resp.data.data.map(item => item.image)
  386. me.setData({
  387. model_list: list,
  388. img_list: img_list
  389. })
  390. } else {
  391. common.simpleToast(resp.data.msg);
  392. }
  393. })
  394. },
  395. srcFn(url) {
  396. uni.navigateTo({
  397. url: url
  398. });
  399. },
  400. navToPage(e) {
  401. const me = this
  402. const url = e.currentTarget.dataset.url;
  403. if (!url) {
  404. return;
  405. }
  406. uni.navigateTo({
  407. url: url
  408. });
  409. },
  410. loadUserCarList() {
  411. const me = this
  412. http.postApi(config.API_FLK_CAR_DEVICE_LIST, {}, (resp) => {
  413. if (resp.data.code === 200) {
  414. const list = resp.data.data.list
  415. let isCar = false
  416. let itemCar = {}
  417. for (let i = 0; i < list.length; i++) {
  418. let item = list[i];
  419. if (item.car_sn == this.car_info.car_sn) {
  420. isCar = true
  421. itemCar = item
  422. }
  423. }
  424. if (!isCar) {
  425. if (list.length > 0) {
  426. uni.removeStorageSync('car_info')
  427. me.setData({
  428. car_list: list,
  429. car_sn: list[0].car_sn || '',
  430. })
  431. me.loadCarDetail(list[0].car_sn)
  432. } else {
  433. uni.removeStorageSync('car_info')
  434. this.car_info = {}
  435. }
  436. } else {
  437. me.loadCarDetail(itemCar.car_sn)
  438. }
  439. } else {
  440. common.simpleToast(resp.data.msg);
  441. }
  442. })
  443. },
  444. loadCarDetail(car_sn) {
  445. const me = this
  446. http.postApi(config.API_FLK_CAR_DETAIL, {
  447. car_sn
  448. }, (resp) => {
  449. uni.hideLoading();
  450. console.log(resp.data)
  451. if (resp.data.code === 200) {
  452. resp.data.data.car_sn = car_sn
  453. const _car_image=resp.data.data.model_images?resp.data.data.model_images.split(','):[]
  454. me.setData({
  455. car_info: resp.data.data,
  456. car_image:_car_image
  457. })
  458. uni.setStorageSync('car_info', this.car_info);
  459. //判断逾期
  460. if (!resp.data.data.sold_time) return
  461. let time = Math.ceil(resp.data.data.hire_end_time - Math.floor(new Date()) / 1000) / 60
  462. if (time > 0) {
  463. this.isOverdueShow = true
  464. this.car_info.hire_end_time = common.getTimeToDay(time)
  465. } else {
  466. this.isOverdueShow = false
  467. }
  468. // if(!this.time){
  469. // this.time = setInterval(()=>{
  470. // this.loadCarDetail(car_sn)
  471. // },5000)
  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>