onUser.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223
  1. <template>
  2. <view class="pageBox">
  3. <view class="userOff" v-if="actionCartItem">
  4. <view class="navBox">
  5. <view class="flex topIconBox">
  6. <image @click="navTo('/pages/index/shopTab?type=1')" class="topIcon"
  7. src="../../../static/controller/witchShop.png" mode="widthFix"></image>
  8. <view v-if="actionCartItem" class="clamp padding-l-10 padding-r-10">
  9. {{actionCartItem.car_name||''}}
  10. </view>
  11. <image @click="navTo('/pages/index/notice')" class="topIcon"
  12. src="../../../static/controller/witchMessage.png" mode="widthFix">
  13. </image>
  14. <view class="topIconNum flex" v-if="notify>0">
  15. <text>
  16. {{notify}}
  17. </text>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="actionBox">
  22. <image class="cartImg" :src="actionCartItem.image" mode="aspectFit"></image>
  23. <view class="timeBox" v-if="actionCartItem.day>0">
  24. <view style="border-radius: 20rpx;"
  25. class="rowContentBox flexCenter lineBorder padding-l-20 padding-r-20 padding-t-10 padding-b-10">
  26. <view class="tipMen"></view>
  27. <view class="dayBox" v-if="actionCartItem.car_operate">
  28. <view>
  29. {{actionCartItem.day}}
  30. </view>
  31. <view class="oldDay margin-t-10">
  32. 剩余天数
  33. </view>
  34. </view>
  35. <view class="dayBox" v-else>
  36. <view class="oldDay margin-t-10 font-color-red">
  37. 已欠费
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="leftNotify" v-if="fx">
  43. <navigator url="/pages/index/share">
  44. <image class="img" src="../../../static/image/redPage.png" mode="aspectFill"></image>
  45. </navigator>
  46. </view>
  47. </view>
  48. <view class="content">
  49. <view class="contentButtom flexCenter">
  50. <view class="buttomBox flex">
  51. <view class="leftBox">
  52. <view class="buttom buttomLg ">
  53. <view @click="authSet" class="rowContentBox flexCenter lineBorder">
  54. <view class="tipMen"></view>
  55. <view class="centerTextBox">
  56. <view>
  57. <image class="tipIcon" src="../../../static/controller/shouquan.png"
  58. mode="aspectFit"></image>
  59. </view>
  60. <view class="margin-t-10">
  61. 授权
  62. </view>
  63. </view>
  64. </view>
  65. <view class="rightPaddingBg">
  66. </view>
  67. <view class="buttomPaddingBg">
  68. </view>
  69. </view>
  70. <view class="leftCenterButtom buttom" @click="navTo('/pages/user/money/recharge')">
  71. <view class="rowContentBox flexCenter lineBorder">
  72. <view class="tipMen"></view>
  73. <view>
  74. <view>
  75. </view>
  76. <view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="topBageBg"></view>
  81. <view class="bottomBageBg"></view>
  82. </view>
  83. <view class="buttomLg buttom">
  84. <view @click="navTo('/pages/user/reportForRepair/Report?id='+actionCartItem.car_number)"
  85. class="rowContentBox flexCenter lineBorder">
  86. <view class="tipMen"></view>
  87. <view class="centerTextBox">
  88. <view>
  89. <image class="tipIcon" src="../../../static/controller/baoxiu.png"
  90. mode="aspectFit"></image>
  91. </view>
  92. <view class="margin-t-10">
  93. 报修
  94. </view>
  95. </view>
  96. </view>
  97. <view class="topPaddingBg"></view>
  98. <view class="rightPaddingBg"></view>
  99. </view>
  100. </view>
  101. <view class="centerBgBox">
  102. <view class="centerBg lineBorder borderRadiusAll">
  103. <view class="borTopHide"></view>
  104. <view class="borBottomHide"></view>
  105. </view>
  106. <view class="bgGray borderRadiusAll"></view>
  107. <view class="contentOrg borderRadiusAll">
  108. <view class="contentOrgBg borderRadiusAll centerBox lineBorder2 flexCenter">
  109. <view class="centerBoxJb borderRadiusAll lineBorder2">
  110. <view class="boxBgJb borderRadiusAll flexCenter">
  111. <view class="flex-center">
  112. <view class="iconButtomBox borderRadiusAll flexCenter"
  113. :class="{greedBg:actionCartItem.status==1||actionCartItem.status==3||actionCartItem.status==4}"
  114. @click="tabCarStatus('tab',actionCartItem)">
  115. <view class="mr borderRadiusAll "></view>
  116. <view class="iconButtomJb">
  117. <view>
  118. <image class="img"
  119. src="../../../static/controller/qidong.png"
  120. mode="aspectFit"></image>
  121. </view>
  122. <view class="margin-t-10"
  123. v-if="actionCartItem.status==1||actionCartItem.status==3||actionCartItem.status==4">
  124. 启动
  125. </view>
  126. <view class="margin-t-10" v-else>
  127. 关闭
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <view class="line left"></view>
  135. <view class="line right"></view>
  136. <view @click="alertCartList" class="topButtomTipBox posbuttom flexCenter">
  137. <view class="centerTextBox">
  138. <view>
  139. <image class="tipIcon" src="../../../static/controller/huanche.png"
  140. mode="aspectFit"></image>
  141. </view>
  142. <view class="margin-t-10">
  143. 换车
  144. </view>
  145. </view>
  146. </view>
  147. <view class="rightButtomTipBox posbuttom flexCenter"
  148. @click="tabCarStatus('seek',actionCartItem)">
  149. <view class="centerTextBox">
  150. <view>
  151. <image class="tipIcon" src="../../../static/controller/xunche.png"
  152. mode="aspectFit"></image>
  153. </view>
  154. <view class="margin-t-10">
  155. 寻车
  156. </view>
  157. </view>
  158. </view>
  159. <view
  160. @click="openMap(actionCartItem.cartInfo.latitude,actionCartItem.cartInfo.longitude)"
  161. class="bottomButtomTipBox posbuttom flexCenter">
  162. <view class="centerTextBox">
  163. <view>
  164. <image class="tipIcon" src="../../../static/controller/dingwei.png"
  165. mode="aspectFit"></image>
  166. </view>
  167. <view class="margin-t-10">
  168. 定位
  169. </view>
  170. </view>
  171. </view>
  172. <view class="leftButtomTipBox posbuttom flexCenter"
  173. @click="tabCarStatus('unlock',actionCartItem)">
  174. <view class="centerTextBox">
  175. <view>
  176. <image class="tipIcon" src="../../../static/controller/kaisuo.png"
  177. mode="aspectFit"></image>
  178. </view>
  179. <view class="margin-t-10">
  180. 开座垫
  181. </view>
  182. </view>
  183. </view>
  184. </view>
  185. </view>
  186. </view>
  187. <view class="rightBox">
  188. <view class="rightButtom buttom flex">
  189. <view class="centerTextBox">
  190. <view>
  191. {{actionCartItem.bfb||0}}%
  192. </view>
  193. <view>
  194. <image class="tipIcon" src="../../../static/controller/dianchi.png"
  195. mode="aspectFit"></image>
  196. </view>
  197. </view>
  198. <view class="rightElectric flexCenter">
  199. <view class="electric" :class="{greedBg:actionCartItem.bfb>91}"></view>
  200. <view class="electric" :class="{greedBg:actionCartItem.bfb>83}"></view>
  201. <view class="electric" :class="{greedBg:actionCartItem.bfb>75}"></view>
  202. <view class="electric" :class="{greedBg:actionCartItem.bfb>66}"></view>
  203. <view class="electric" :class="{yellowBg:actionCartItem.bfb>58}"></view>
  204. <view class="electric" :class="{yellowBg:actionCartItem.bfb>50}"></view>
  205. <view class="electric" :class="{yellowBg:actionCartItem.bfb>41}"></view>
  206. <view class="electric" :class="{yellowBg:actionCartItem.bfb>33}"></view>
  207. <view class="electric" :class="{redGb:actionCartItem.bfb>24}"></view>
  208. <view class="electric" :class="{redGb:actionCartItem.bfb>16}"></view>
  209. <view class="electric" :class="{redGb:actionCartItem.bfb>8}"></view>
  210. <view class="electric" :class="{redGb:actionCartItem.bfb>0}"></view>
  211. </view>
  212. </view>
  213. <view class=" buttomLg buttom" @click="navTo('/pages/index/route?id='+actionCartItem.car_number)">
  214. <view class="topBageBg"></view>
  215. <view class="rowContentBox flexCenter lineBorder">
  216. <view class="tipMen"></view>
  217. <view class="centerTextBox margin-l-40 padding-l-30">
  218. <view>
  219. <image class="tipIcon" src="../../../static/controller/xincheng.png"
  220. mode="aspectFit"></image>
  221. </view>
  222. <view class="margin-t-10">
  223. 行程
  224. </view>
  225. </view>
  226. </view>
  227. <view class="topPaddingBg"></view>
  228. <view class="leftPaddingBg"></view>
  229. </view>
  230. </view>
  231. </view>
  232. </view>
  233. </view>
  234. </view>
  235. <uni-popup ref="popup" type="bottom" v-if="actionCartItem">
  236. <view class="cartListAlertButtom">
  237. <view class="cartTitle flex">
  238. <view>
  239. 请选择更换的车辆
  240. </view>
  241. <image @click="popupClose" class="exit" src="../../../static/icon/goodsExit.png" mode="scaleToFill">
  242. </image>
  243. </view>
  244. <view class="actionCartBox">
  245. <view class="itemCart flex" :class="{action:item.id==actionCartItem.id}"
  246. v-for="(item,index) in myCartList" @click="changeCart(index)" :key='index'>
  247. <image class="cartImg" :src="item.image" mode="scaleToFill"></image>
  248. <view class="content">
  249. <view class="title clamp2" :class="{action:item.id==actionCartItem.id}">
  250. {{item.car_name||''}}
  251. </view>
  252. <view class="address margin-t-20" :class="{action:item.id==actionCartItem.id}">
  253. {{item.address||"暂无定位信息"}}
  254. </view>
  255. </view>
  256. </view>
  257. </view>
  258. <view style="height: 1px;"></view>
  259. </view>
  260. </uni-popup>
  261. </view>
  262. </template>
  263. <script>
  264. import {
  265. mycar,
  266. getCarInfo,
  267. getcar_status,
  268. car_switch,
  269. getUserInfo
  270. } from '@/api/user.js';
  271. import {
  272. mapState,
  273. mapMutations
  274. } from 'vuex';
  275. // #ifdef MP
  276. import {
  277. openGetAddress,
  278. } from '@/utils/rocessor.js';
  279. // #endif
  280. // #ifdef H5
  281. import weixinObj from "@/plugin/jweixin-module/index.js";
  282. import {
  283. weixindata
  284. } from "@/utils/wxAuthorized.js"
  285. // #endif
  286. export default {
  287. props: {
  288. notify: {
  289. type: Number,
  290. default: 0
  291. },
  292. },
  293. data() {
  294. return {
  295. chickedMyCart: 0, //默认选中的车辆
  296. // 我的车辆
  297. myCartList: [],
  298. ladingCart: false, //判断是否已经加载过我的车辆
  299. // #ifdef H5
  300. iconPath: '../../static/image/location.png', //定位图标地址
  301. // #endif
  302. // #ifndef H5
  303. iconPath: '../../../static/image/location.png', //定位图标地址
  304. // #endif
  305. timeOut: '', //用于存放调用定时获取对象数据
  306. reachangeAlert:false,//判断是否已经提示过充值
  307. };
  308. },
  309. watch: {
  310. reachange(newValue, oldValue) {
  311. if (newValue && (this.actionCartItem.auth_num != -1)) {
  312. uni.showModal({
  313. title: '错误',
  314. content: '您的余额已不足三天支付是否马上充值',
  315. cancelText: '关闭',
  316. confirmText: '马上充值',
  317. success: res => {
  318. if (res.confirm) {
  319. this.navTo('/pages/user/money/recharge');
  320. }
  321. },
  322. });
  323. }
  324. }
  325. },
  326. computed: {
  327. ...mapState('user', ['address', 'userInfo']),
  328. ...mapState(['fx']),
  329. actionCartItem() {
  330. if (this.myCartList[this.chickedMyCart]) {
  331. return this.myCartList[this.chickedMyCart]
  332. } else {
  333. return false
  334. }
  335. },
  336. reachange() {
  337. // 余额
  338. const a1 = +this.userInfo.now_money;
  339. if (!this.actionCartItem) {
  340. return false
  341. }
  342. // 三天内应该付的金额
  343. const a2 = this.actionCartItem.day_deducted * 3;
  344. if (a1 < a2 && !this.reachangeAlert&&this.actionCartItem.day>0) {
  345. // 处理已加载提示用户充值信息
  346. this.reachangeAlert = true;
  347. return (new Date()).getTime()
  348. } else {
  349. return false
  350. }
  351. }
  352. },
  353. created() {
  354. this.getUserInfo();
  355. },
  356. beforeDestroy() {
  357. },
  358. methods: {
  359. ...mapMutations('user', ['setAddress', 'setUserInfo']),
  360. // 加载初始数据
  361. getUserInfo() {
  362. getUserInfo({})
  363. .then(({
  364. data
  365. }) => {
  366. this.setUserInfo(data)
  367. })
  368. .catch(e => {
  369. console.log(e);
  370. });
  371. },
  372. // 设置tabbar背景颜色
  373. setTabbar() {
  374. uni.setTabBarStyle({
  375. backgroundColor: '#25273E'
  376. })
  377. },
  378. // 父元素启动监听
  379. onStartGetCartInfo() {
  380. console.log('监听');
  381. if (this.timeOut) {
  382. this.outGetCartInfo();
  383. }
  384. this.onGetCartInfo()
  385. },
  386. // 关闭定时获取车辆信息
  387. outGetCartInfo() {
  388. clearInterval(this.timeOut)
  389. },
  390. onGetCartInfo() {
  391. this.getCarInfo(this.myCartList[this.chickedMyCart]);
  392. this.timeOut = setInterval((e) => {
  393. this.getCarInfo(this.myCartList[this.chickedMyCart]);
  394. }, 60000)
  395. },
  396. // tab改变事件
  397. changetab(tab) {
  398. this.myCartList[this.chickedMyCart].status = tab
  399. },
  400. // 关闭车辆选择弹窗
  401. popupClose() {
  402. this.$refs.popup.close();
  403. },
  404. // 显示车辆选择列表
  405. alertCartList() {
  406. // 打开选择弹窗
  407. this.$refs.popup.open();
  408. },
  409. // 打开地图导航
  410. openMap(lat, long) {
  411. uni.openLocation({
  412. latitude: +lat,
  413. longitude: +long,
  414. complete(e) {
  415. console.log(e, '地图打开');
  416. }
  417. })
  418. },
  419. // 切换更新车辆信息
  420. changeCart(index) {
  421. this.$refs.popup.close();
  422. this.chickedMyCart = index;
  423. // 判断是否已经加载过车辆信息未加载则更新信息
  424. // if(!this.myCartList[this.chickedMyCart].cartInfoLoading){
  425. const cart = this.myCartList[this.chickedMyCart];
  426. this.getCarInfo(cart);
  427. this.$emit("changeCart", cart)
  428. // }
  429. },
  430. // 载入我的车辆列表
  431. loadCard() {
  432. let that = this;
  433. mycar({}).then((e) => {
  434. // 判断数据是由有过更新
  435. if (that.myCartList.length != e.data.data.length) {
  436. that.myCartList = e.data.data.map((e) => {
  437. // 保存百分比
  438. e.bfb = 0;
  439. // 保存车辆消息
  440. e.cartInfo = {}
  441. // 判断是否已经加载数据
  442. e.cartInfoLoading = false
  443. return e
  444. });
  445. // 初始化选中的车辆
  446. that.chickedMyCart = 0;
  447. that.getCarInfo(that.myCartList[that.chickedMyCart])
  448. }
  449. }).catch((e) => {
  450. console.log();
  451. })
  452. },
  453. // 加载车辆信息
  454. getCarInfo(item) {
  455. getcar_status({
  456. car_number: item.car_number
  457. }).then((e) => {
  458. // console.log(e, '车辆');
  459. if (e.data.id) {
  460. // 保存车辆信息
  461. item.cartInfo = e.data;
  462. // 保存电量百分比
  463. item.bfb = +e.data.residue
  464. item.cartInfo.latitude = +item.cartInfo.latitude;
  465. item.cartInfo.longitude = +item.cartInfo.longitude;
  466. if (!item.cartInfoLoading) {
  467. this.onStartGetCartInfo()
  468. }
  469. // item.day = e.data.day;
  470. item.cartInfoLoading = true;
  471. }
  472. }).catch((e) => {
  473. console.log(e);
  474. })
  475. },
  476. // 调用切换
  477. tabCarStatus(type = 'tab', item) {
  478. uni.showLoading({
  479. title: '请求发送中',
  480. mask: true
  481. });
  482. let that = this;
  483. let data = {
  484. car_number: item.car_number,
  485. };
  486. // 是否开关锁
  487. if (type == 'tab') {
  488. data.status = (item.status == 1) ? 2 : 1;
  489. }
  490. // 是否解锁
  491. if (type == 'unlock') {
  492. data.status = 7;
  493. }
  494. // 是否寻车
  495. if (type == 'seek') {
  496. data.status = 5;
  497. }
  498. // #ifdef H5
  499. let bool = uni.getStorageSync('weichatBrowser') || '';
  500. uni.showLoading({
  501. title: '获取地址中',
  502. mask: true
  503. });
  504. // 判断是否公众号
  505. if (bool) {
  506. weixindata().then(() => {
  507. weixinObj.getLocation({
  508. type: 'gcj02',
  509. success: (e) => {
  510. uni.hideLoading()
  511. data.latitude = e.latitude;
  512. data.longitude = e.longitude;
  513. that.car_switch(data, type, item)
  514. },
  515. fail() {
  516. uni.hideLoading()
  517. }
  518. });
  519. })
  520. } else {
  521. uni.getLocation({
  522. type: 'gcj02',
  523. success(e) {
  524. uni.hideLoading()
  525. data.latitude = e.latitude;
  526. data.longitude = e.longitude;
  527. that.car_switch(data, type, item)
  528. },
  529. fail(e) {
  530. uni.hideLoading()
  531. console.log(e, 'cw');
  532. }
  533. })
  534. }
  535. // #endif
  536. // #ifdef MP
  537. // 判断是否已经有位置数据
  538. if (!that.address.latitude || !that.address.longitude) {
  539. // 判断是否已经获取授权
  540. openGetAddress().then((e) => {
  541. uni.showLoading({
  542. title: '获取地址中',
  543. mask: true
  544. });
  545. // 获取当前选中开锁的对象
  546. wx.startLocationUpdateBackground({
  547. type: 'gcj02',
  548. success: (e) => {
  549. uni.hideLoading()
  550. // 调用鉴定位置变化事件
  551. wx.onLocationChange((res) => {
  552. console.log(res, '位置数据');
  553. // 保存当前经纬度
  554. that.setAddress({
  555. latitude: res.latitude,
  556. longitude: res.longitude
  557. })
  558. // 判断是否已经加载过最近商家信息
  559. if (!that.loadShopData) {
  560. data.latitude = res.latitude;
  561. data.longitude = res.longitude;
  562. that.car_switch(data, type, item)
  563. that.loadShopData = true;
  564. }
  565. })
  566. },
  567. fail: () => {
  568. uni.hideLoading()
  569. }
  570. })
  571. })
  572. } else {
  573. data.latitude = that.address.latitude;
  574. data.longitude = that.address.longitude;
  575. that.car_switch(data, type, item)
  576. }
  577. // #endif
  578. // #ifdef APP
  579. uni.getLocation({
  580. type:'gcj02',
  581. success(res){
  582. data.latitude =res.latitude;
  583. data.longitude = res.longitude;
  584. that.car_switch(data, type, item);
  585. },fail(e) {
  586. uni.showModal({
  587. title: '授权失败',
  588. content: '未授权定位权限无法开启仪表盘功能',
  589. showCancel: false,
  590. });
  591. console.log(e);
  592. }
  593. })
  594. // #endif
  595. },
  596. // 保存地址
  597. car_switch(data, type, item) {
  598. uni.showLoading({
  599. title: '请求发送中',
  600. mask: true
  601. });
  602. car_switch(data).then((e) => {
  603. if (type == 'tab') {
  604. item.status = (item.status == 1) ? 2 : 1;
  605. }
  606. uni.hideLoading()
  607. uni.showToast({
  608. title: e.msg
  609. });
  610. }).catch((e) => {
  611. uni.hideLoading()
  612. uni.showModal({
  613. title: '错误',
  614. content: e.msg,
  615. showCancel: false,
  616. });
  617. })
  618. },
  619. // 判断是否有权限授权车辆
  620. authSet(){
  621. if(this.actionCartItem.auth_num!=-1){
  622. this.navTo('/pages/user/myCart/authorization?id='+this.actionCartItem.car_number)
  623. }else{
  624. uni.showModal({
  625. title: '提示',
  626. content: '该车辆是他人授权给您的车辆您无权二次授权',
  627. showCancel: false,
  628. });
  629. }
  630. },
  631. navTo(url) {
  632. uni.navigateTo({
  633. url: url
  634. })
  635. }
  636. },
  637. };
  638. </script>
  639. <style lang="scss">
  640. $paddingJg:40rpx;
  641. // 按钮黑色背景
  642. $bgBlack:#161727;
  643. // 底色
  644. $contentBg:#373c5a;
  645. // 按钮包裹框背景颜色
  646. $maxBoxBg:#1f2136;
  647. .pageBox {
  648. height: 0;
  649. min-height: 100%;
  650. }
  651. .flexCenter {
  652. display: flex;
  653. justify-content: center;
  654. align-items: center;
  655. }
  656. .navBox {
  657. /* #ifdef APP */
  658. padding-top: var(--status-bar-height);
  659. padding-bottom: 30rpx;
  660. /* #endif */
  661. /* #ifdef H5 || MP */
  662. padding-top: 30rpx;
  663. padding-bottom: 30rpx;
  664. /* #endif */
  665. background-color: $contentBg;
  666. flex-shrink: 0;
  667. }
  668. .topIconBox {
  669. padding: 0 $paddingJg;
  670. position: relative;
  671. color: #FFFFFF;
  672. font-size: $font-base + 2rpx;
  673. .topIconNum {
  674. position: absolute;
  675. top: -10rpx;
  676. right: 20rpx;
  677. font-size: $font-sm;
  678. min-width: 30rpx;
  679. min-height: 30rpx;
  680. border-radius: 100rpx;
  681. background-color: $color-red;
  682. padding: 5rpx;
  683. justify-content: center;
  684. }
  685. .topIcon {
  686. transform: rotateZ(-90deg);
  687. width: 45rpx;
  688. height: 45rpx;
  689. flex-shrink: 0;
  690. }
  691. }
  692. .userOff {
  693. display: flex;
  694. flex-direction: column;
  695. height: 100%;
  696. .actionBox {
  697. background-color: #0f1025;
  698. flex-shrink: 1;
  699. flex-grow: 1;
  700. text-align: center;
  701. height: 400rpx;
  702. position: relative;
  703. .cartImg {
  704. height: 100%;
  705. width: 100%;
  706. }
  707. .leftNotify {
  708. position: absolute;
  709. top: 20rpx;
  710. left: 30rpx;
  711. .img {
  712. width: 120rpx;
  713. height: 120rpx;
  714. }
  715. }
  716. .timeBox {
  717. position: absolute;
  718. color: #FFFFFF;
  719. right: 30rpx;
  720. top: 30rpx;
  721. font-size: $font-base;
  722. font-weight: bold;
  723. .dayBox {
  724. z-index: 1;
  725. line-height: 1;
  726. }
  727. .oldDay {
  728. font-size: $font-sm - 2rpx;
  729. color: $font-color-disabled;
  730. }
  731. .tipMen {
  732. transform-origin: top left;
  733. margin-left: 0;
  734. }
  735. }
  736. }
  737. .content {
  738. flex-shrink: 0;
  739. flex-grow: 1;
  740. }
  741. .lineBorder {
  742. border: 1px solid #aaaec7;
  743. }
  744. .lineBorder2 {
  745. border: 1px solid #b7cbf2;
  746. }
  747. .rowContentBox {
  748. overflow: hidden;
  749. background-color: $contentBg;
  750. .tipMen {
  751. position: absolute;
  752. top: 0;
  753. left: 0;
  754. transform-origin: top left;
  755. margin-left: -40rpx;
  756. transform: rotateZ(-45deg);
  757. height: 100%;
  758. width: 100%;
  759. background-image: linear-gradient(to bottom, rgba(69, 75, 113, 1) 0%, transparent 100%);
  760. }
  761. }
  762. .rowContentBox,
  763. .centerBox {
  764. height: 100%;
  765. width: 100%;
  766. position: relative;
  767. }
  768. .contentButtom {
  769. width: 750rpx;
  770. height: 100%;
  771. background-color: $maxBoxBg;
  772. font-size: $font-base;
  773. line-height: 1;
  774. .centerTextBox {
  775. text-align: center;
  776. margin-left: -70rpx;
  777. }
  778. .tipIcon {
  779. width: 46rpx;
  780. height: 46rpx;
  781. }
  782. .buttomBox {
  783. width: 750rpx;
  784. padding: 40rpx;
  785. color: #B2B9D3;
  786. .buttom {
  787. padding: 10rpx;
  788. background-color: $bgBlack;
  789. position: relative;
  790. .rightPaddingBg,
  791. .topPaddingBg,
  792. .leftPaddingBg,
  793. .buttomPaddingBg {
  794. position: absolute;
  795. background-color: $bgBlack;
  796. z-index: 11;
  797. }
  798. .topPaddingBg,
  799. .buttomPaddingBg {
  800. height: 12rpx;
  801. width: 180rpx;
  802. left: 0;
  803. }
  804. .rightPaddingBg,
  805. .leftPaddingBg {
  806. height: 180rpx;
  807. width: 10rpx;
  808. top: 0rpx;
  809. }
  810. .topPaddingBg {
  811. top: -1px;
  812. }
  813. .buttomPaddingBg {
  814. button: 0rpx;
  815. }
  816. .rightPaddingBg {
  817. right: 0rpx;
  818. }
  819. .leftPaddingBg {
  820. left: 0;
  821. }
  822. .topBageBg,
  823. .bottomBageBg {
  824. height: 30rpx;
  825. width: 180rpx;
  826. background-color: $maxBoxBg;
  827. position: absolute;
  828. z-index: 10;
  829. }
  830. .topBageBg {
  831. top: -30rpx;
  832. }
  833. .bottomBageBg {
  834. bottom: -30rpx;
  835. }
  836. }
  837. .centerBox {
  838. // background-image: linear-gradient(to bottom, #49548d 0%, transparent 100%);
  839. background-color: rgba($color: #49548d, $alpha: 0.5);
  840. box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5) inset;
  841. }
  842. .buttomLg {
  843. width: 180rpx;
  844. height: 180rpx;
  845. }
  846. .leftBox {
  847. .leftCenterButtom {
  848. margin: 30rpx 0;
  849. width: 80rpx;
  850. height: 120rpx;
  851. background-size: 80rpx 120rpx;
  852. z-index: 99;
  853. .tipMen {
  854. margin-left: 0rpx;
  855. }
  856. }
  857. }
  858. .centerBgBox {
  859. flex-shrink: 1;
  860. position: relative;
  861. .borderRadiusAll {
  862. border-radius: 1000rpx;
  863. }
  864. .bgGray {
  865. position: absolute;
  866. top: 0;
  867. left: 0;
  868. background-color: $maxBoxBg;
  869. width: 530rpx;
  870. height: 530rpx;
  871. z-index: 20;
  872. left: -265rpx;
  873. top: -265rpx;
  874. }
  875. .contentOrg {
  876. position: absolute;
  877. background-color: $bgBlack;
  878. width: 480rpx;
  879. height: 480rpx;
  880. left: -240rpx;
  881. top: -240rpx;
  882. z-index: 99;
  883. padding: 20rpx;
  884. .contentOrgBg {
  885. width: 100%;
  886. height: 100%;
  887. position: relative;
  888. background-color: $contentBg;
  889. background-image: linear-gradient(to bottom, rgba($color: #454b71, $alpha: 1) 0%, transparent 25%, transparent 75%, rgba($color: #454b71, $alpha: 1) 100%);
  890. .posbuttom {
  891. position: absolute;
  892. .centerTextBox {
  893. margin: 0;
  894. }
  895. }
  896. .topButtomTipBox {
  897. top: 0;
  898. padding-bottom: 20rpx;
  899. }
  900. .bottomButtomTipBox {
  901. bottom: 0;
  902. padding-top: 20rpx;
  903. }
  904. .bottomButtomTipBox,
  905. .topButtomTipBox {
  906. width: 200rpx;
  907. height: 140rpx;
  908. margin: 0 auto;
  909. }
  910. .rightButtomTipBox,
  911. .leftButtomTipBox {
  912. width: 140rpx;
  913. height: 200rpx;
  914. }
  915. .rightButtomTipBox {
  916. padding-left: 20rpx;
  917. right: 0;
  918. }
  919. .leftButtomTipBox {
  920. padding-right: 20rpx;
  921. left: 0;
  922. }
  923. .line {
  924. position: absolute;
  925. width: calc(440rpx + 2px);
  926. height: 20rpx;
  927. border-top: 1px solid #b7cbf2;
  928. border-bottom: 1px solid #b7cbf2;
  929. border-left: 1px solid $bgBlack;
  930. border-right: 1px solid $bgBlack;
  931. background-color: $bgBlack;
  932. box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5);
  933. &.left {
  934. transform: rotateZ(45deg);
  935. }
  936. &.right {
  937. transform: rotateZ(-45deg);
  938. }
  939. }
  940. .centerBoxJb {
  941. width: 200rpx;
  942. height: 200rpx;
  943. background-color: $bgBlack;
  944. box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5);
  945. position: relative;
  946. .boxBgJb {
  947. background-color: $bgBlack;
  948. width: 100%;
  949. height: 100%;
  950. position: absolute;
  951. z-index: 1;
  952. .iconButtomBox {
  953. font-size: $font-base;
  954. color: #FFFFFF;
  955. font-weight: bold;
  956. width: 160rpx;
  957. height: 160rpx;
  958. background-color: #DEDEDE;
  959. text-align: center;
  960. background-color: #F6C531;
  961. position: relative;
  962. &.greedBg {
  963. background-color: $color-green;
  964. }
  965. .mr {
  966. position: absolute;
  967. height: 100%;
  968. width: 100%;
  969. background-image: linear-gradient(to bottom, rgba($color: #FFFFFF, $alpha: 0.2) 0%, rgba($color: #FFFFFF, $alpha: 0) 50%, rgba($color: #FFFFFF, $alpha: 0) 100%);
  970. box-shadow: 0px 0px 20rpx rgba($color: #FFFFFF, $alpha: 0.5) inset;
  971. }
  972. .iconButtomJb {
  973. .img {
  974. width: 75rpx;
  975. height: 75rpx;
  976. }
  977. }
  978. }
  979. }
  980. }
  981. }
  982. }
  983. .centerBg {
  984. position: absolute;
  985. left: -280rpx;
  986. top: -280rpx;
  987. background-color: $bgBlack;
  988. width: 560rpx;
  989. height: 560rpx;
  990. z-index: 10;
  991. .borTopHide {
  992. top: -10rpx;
  993. left: 120rpx;
  994. }
  995. .borBottomHide,
  996. .borTopHide {
  997. position: absolute;
  998. height: 100rpx;
  999. width: 316rpx;
  1000. background-color: $maxBoxBg;
  1001. }
  1002. .borBottomHide {
  1003. left: 120rpx;
  1004. bottom: -10rpx;
  1005. }
  1006. }
  1007. }
  1008. .rightBox {
  1009. flex-shrink: 0;
  1010. .rightElectric {
  1011. flex-direction: column;
  1012. padding-right: 6rpx;
  1013. .electric {
  1014. width: 40rpx;
  1015. height: 10rpx;
  1016. // border-radius: 10rpx;
  1017. background-color: $maxBoxBg;
  1018. margin-bottom: 16rpx;
  1019. // &:last-child{
  1020. // border-bottom-left-radius: 10rpx;
  1021. // border-bottom-right-radius: 10rpx;
  1022. // }
  1023. // &:first-child{
  1024. // border-top-left-radius: 10rpx;
  1025. // border-top-right-radius: 10rpx;
  1026. // }
  1027. &.greedBg {
  1028. background-color: $color-green;
  1029. }
  1030. &.yellowBg {
  1031. background-color: #F6C531;
  1032. }
  1033. &.redGb {
  1034. background-color: #DE2C2C;
  1035. }
  1036. }
  1037. }
  1038. .rightButtom {
  1039. position: relative;
  1040. z-index: 11;
  1041. margin-bottom: 30rpx;
  1042. width: 180rpx;
  1043. height: 330rpx;
  1044. padding-left: 30rpx;
  1045. padding-top: 16rpx;
  1046. align-items: flex-start;
  1047. .centerTextBox {
  1048. text-align: right;
  1049. margin-left: 16rpx;
  1050. }
  1051. }
  1052. }
  1053. }
  1054. }
  1055. }
  1056. .cartListAlertButtom {
  1057. position: relative;
  1058. padding-top: 20rpx;
  1059. border-top-left-radius: 30rpx;
  1060. border-top-right-radius: 30rpx;
  1061. background-color: #FFFFFF;
  1062. z-index: 999;
  1063. /* #ifdef H5 */
  1064. padding-bottom: var(--window-bottom);
  1065. /* #endif */
  1066. .actionCartBox {
  1067. padding-bottom: 40rpx;
  1068. .itemCart {
  1069. background-color: #F3F6F8;
  1070. margin: 0 30rpx 30rpx;
  1071. padding: 0 30rpx;
  1072. border-radius: 20rpx;
  1073. height: 200rpx;
  1074. text-align: left;
  1075. &.action {
  1076. background-color: $color-green;
  1077. }
  1078. .cartImg {
  1079. width: 120rpx;
  1080. height: 120rpx;
  1081. }
  1082. .content {
  1083. flex-grow: 1;
  1084. padding-left: 20rpx;
  1085. }
  1086. .title {
  1087. font-size: $font-base;
  1088. font-weight: bold;
  1089. color: $font-color-base;
  1090. &.action {
  1091. color: #FFFFFF;
  1092. }
  1093. }
  1094. .address {
  1095. line-height: 1;
  1096. font-size: $font-sm - 2rpx;
  1097. color: $font-color-disabled;
  1098. &.action {
  1099. color: #FFFFFF;
  1100. }
  1101. }
  1102. }
  1103. }
  1104. .cartTitle {
  1105. margin: 0 30rpx;
  1106. margin-bottom: 30rpx;
  1107. font-size: $font-lg;
  1108. font-weight: bold;
  1109. .exit {
  1110. width: 50rpx;
  1111. height: 50rpx;
  1112. }
  1113. }
  1114. }
  1115. </style>