refuelDetail.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863
  1. <template>
  2. <view class="refuelDetail">
  3. <!-- <zs-header :background="background"></zs-header> -->
  4. <!-- <image class="banner" :src="info.logo" mode=""></image> -->
  5. <view class="tag-title">
  6. 超值优惠券·加油更便宜
  7. </view>
  8. <view class="content">
  9. <view class="block shopInfo">
  10. <view class="title-box">
  11. <view class="title">
  12. {{info.storeName}}
  13. </view>
  14. <view class="diatance-box">
  15. <image class="icon" src="../static/refuel/nav-icon-black.png" mode=""></image>
  16. {{(distance/1000).toFixed(2)}}km
  17. </view>
  18. </view>
  19. <view class="address">
  20. {{info.address}}
  21. </view>
  22. <view class="time">
  23. 营业时间 周一至周日 {{info.openTimeHourStart}}:00 - {{info.openTimeHourEnd}}:00
  24. </view>
  25. <view class="address-box">
  26. <view class="distance">
  27. 距离您{{(distance/1000).toFixed(2)}}公里
  28. </view>
  29. <view class="btn-box">
  30. <view class="btn" @click="handleNavigation">
  31. <image class="icon" src="../static/refuel/nav-icon.png" mode=""></image>
  32. 导航
  33. </view>
  34. <view class="btn" @click="handleCall">
  35. <image class="icon" src="../static/refuel/tel-icon.png" mode=""></image>
  36. 电话
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="price-box block">
  42. <view class="price">
  43. ¥{{price.vipPrice?(price.vipPrice/100).toFixed(2):'--'}}/L <view class="label">优惠价</view>
  44. </view>
  45. <view class="right-box">
  46. <view class="old-price">
  47. 油站价¥{{price.cityPrice?(price.storePrice/100).toFixed(2):'--'}}/L
  48. </view>
  49. <view class="old-price">
  50. 国标价¥{{price.cityPrice?(price.cityPrice/100).toFixed(2):'--'}}/L
  51. </view>
  52. </view>
  53. </view>
  54. <view class="block">
  55. <view class="block-title">
  56. 选择油号/油枪
  57. </view>
  58. <view class="choose-box">
  59. <view class="item" :class="[num?'active':'']" @click="hanleChoose">
  60. {{num||"请选择油号"}}
  61. <image class="icon" src="../static/shop-desc.png" mode=""></image>
  62. </view>
  63. <view class="item" :class="[gun?'active':'']" @click="hanleChoose">
  64. {{gun ? (gun + '号枪'):"请选择油枪"}}
  65. <image class="icon" src="../static/shop-desc.png" mode=""></image>
  66. </view>
  67. </view>
  68. <view class="input-box">
  69. <input class="price-input" type="digit" v-model="amount" placeholder-class="placeholder" placeholder-style="color:#AAAAAA;font-weight: 500;" placeholder="请输入加油金额,优惠价格计算" />
  70. <view class="unit">
  71. ¥
  72. </view>
  73. </view>
  74. </view>
  75. <view class="order-box block">
  76. <view class="item">
  77. <view class="label">
  78. 订单金额
  79. </view>
  80. <view class="value-box">
  81. <view class="num">
  82. 约{{(payInfo.litre/1000).toFixed(2)}}升
  83. </view>
  84. <view class="value">
  85. {{'¥'+ (payInfo.totalPrice/100).toFixed(2) }}
  86. </view>
  87. </view>
  88. </view>
  89. <view class="item">
  90. <view class="label">
  91. 服务费
  92. </view>
  93. <view class="value" :class="[!payInfo.totalPrice?'gray':'']">
  94. {{payInfo.totalPrice?'¥'+(payInfo.serviceFee/100).toFixed(2) : '输入金额后查看服务费'}}
  95. </view>
  96. </view>
  97. <view class="item">
  98. <view class="label">
  99. 优惠券减免金额
  100. </view>
  101. <view class="value" :class="[!payInfo.totalPrice?'gray':'',payInfo.promotionAmount?'red':'']">
  102. {{payInfo.totalPrice?'-¥'+(payInfo.promotionAmount/100).toFixed(2) : '输入金额后查看优惠金额'}}
  103. </view>
  104. </view>
  105. <view class="item">
  106. <view class="label">
  107. 优惠券
  108. </view>
  109. <view class="value gray">
  110. {{payInfo.totalPrice?'暂无可用' : '输入金额后查看优惠券'}}
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <view class="buy-box">
  116. <view class="total-price">
  117. <view class="label">
  118. 合计:
  119. </view>
  120. <view class="price">
  121. ¥ {{(payInfo.realPrice/100).toFixed(2)}}
  122. </view>
  123. </view>
  124. <!-- <button class="btn" :class="[btnDisabled?'disabled':'']" type="default" :loading="loading" :disabled="btnDisabled" @click="handlePay">立即支付</button> -->
  125. <button class="btn" type="default" :loading="loading" :disabled="btnDisabled" @click="handlePay">立即支付</button>
  126. </view>
  127. <u-popup :show="show" round="16rpx" mode="bottom" @close="close">
  128. <view class="popup-title">
  129. 选择油号/油枪
  130. </view>
  131. <view class="item-box">
  132. <view class="sub-title">
  133. 选择油号
  134. </view>
  135. <view class="box">
  136. <view class="item" :class="[numIndex === index ?'active':'']" v-for="(item,index) in info.itemInfoList" :key="item.itemId" @click="handleTab(item,'',index)">
  137. {{item.itemName}}
  138. </view>
  139. </view>
  140. </view>
  141. <view class="item-box">
  142. <view class="sub-title">
  143. 选择油枪
  144. <view class="notice">
  145. 请与加油员确认油枪号
  146. </view>
  147. </view>
  148. <view class="box">
  149. <view class="item" :class="[gun == item ?'active':'',(index+1)%4 == 0?'m0':'']" v-for="(item,index) in gunList" :key="item" @click="handleTab(item,'gun')">
  150. {{item}}号
  151. </view>
  152. </view>
  153. </view>
  154. </u-popup>
  155. <map class="map" id="map"></map>
  156. </view>
  157. </template>
  158. <script>
  159. import { queryStoreDetail,queryCalPrice,queryNewOrder } from '@/api/refuel.js';
  160. import {debounce} from '@/utils/tool.js'
  161. // 腾讯地图
  162. var QQMapWX = require('@/libs/qqmap-wx-jssdk.min.js');
  163. var qqmapsdk = new QQMapWX({key:'KX5BZ-B64RC-RO62W-AMWAZ-VVTC3-YAFXF'});
  164. export default {
  165. data() {
  166. return {
  167. type:1,
  168. map:null,
  169. show:false,
  170. loading:false,
  171. info:null,
  172. distance:0,
  173. itemId:'',//油号id
  174. num:'',//油号
  175. numIndex:undefined,//选择油号的index
  176. gun:'',//油枪
  177. price:{//选择的油号价格
  178. cityPrice:0,
  179. vipPrice:0,
  180. storePrice:0
  181. },
  182. storeId:'',
  183. amount:'',//输入金额
  184. payInfo:{//计算出来的金额
  185. discountPrice: 0,
  186. itemName: "",
  187. litre: 0,
  188. priceDetailVo: {deductionDetail: null, gunCoupon: null},
  189. promotionAmount: 0,
  190. realPrice: 0,
  191. serviceFee: 0,
  192. storeId: "",
  193. totalPrice: 0,
  194. },
  195. epId:'',//店铺id
  196. }
  197. },
  198. watch: {
  199. amount:debounce(function(val){
  200. if(!val){
  201. this.payInfo = {//计算出来的金额
  202. discountPrice: 0,
  203. itemName: "",
  204. litre: 0,
  205. priceDetailVo: {deductionDetail: null, gunCoupon: null},
  206. promotionAmount: 0,
  207. realPrice: 0,
  208. serviceFee: 0,
  209. storeId: "",
  210. totalPrice: 0,
  211. }
  212. }
  213. this.queryCalPrice()
  214. // else if(!this.num||!this.gun){
  215. // uni.showToast({
  216. // title:'请选择油号/油枪',
  217. // icon:'none'
  218. // })
  219. // }else if(val<10){
  220. // uni.showToast({
  221. // title:'加油金额不能小于10',
  222. // icon:'none'
  223. // })
  224. // }
  225. })
  226. },
  227. computed: {
  228. btnDisabled(){
  229. if(!this.payInfo.realPrice || !this.num || !this.gun || this.loading || this.amount<10){
  230. return true
  231. }else{
  232. return false
  233. }
  234. },
  235. gunList() {
  236. if(this.numIndex == undefined){
  237. return []
  238. }else{
  239. return this.info.itemInfoList[this.numIndex].gunNoList
  240. }
  241. },
  242. query(){
  243. return {
  244. amount:this.amount*100,
  245. itemName :this.num,
  246. storeId:this.storeId,
  247. }
  248. },
  249. notice(){
  250. if(this.amount&&this.amount<10){
  251. return uni.showToast({
  252. title:'加油金额不能小于10',
  253. icon:'none'
  254. })
  255. }else if(!this.num||!this.gun){
  256. return uni.showToast({
  257. title:'请选择油号/油枪',
  258. icon:'none'
  259. })
  260. }else if(!this.amount){
  261. return uni.showToast({
  262. title:'请输入加油金额',
  263. icon:'none'
  264. })
  265. }
  266. else if(this.amount>999){
  267. this.amount = 999
  268. return uni.showToast({
  269. title:'加油最大金额999',
  270. icon:'none'
  271. })
  272. }
  273. }
  274. },
  275. methods: {
  276. handleTab(item,type,index){
  277. if(type == 'gun'){
  278. this.gun = item
  279. this.show = false
  280. }else{
  281. this.gun = ''
  282. this.numIndex = index
  283. this.itemId = item.itemId
  284. this.num = item.itemName
  285. this.price.cityPrice = item.cityPrice
  286. this.price.vipPrice = item.vipPrice
  287. this.price.storePrice = item.storePrice
  288. }
  289. this.queryCalPrice()
  290. },
  291. handleNavigation() {
  292. uni.openLocation({
  293. latitude: this.info.lat,
  294. longitude: this.info.lon,
  295. name:this.info.storeName,
  296. address:this.info.address,
  297. success: function () {
  298. console.log('success');
  299. }
  300. });
  301. // this.map.openMapApp({
  302. // longitude:this.info.lon,
  303. // latitude:this.info.lat,
  304. // destination:this.info.storeName,
  305. // success(res){
  306. // console.log(res);
  307. // }
  308. // })
  309. },
  310. handleCall() {
  311. if(this.info.tel){
  312. uni.makePhoneCall({
  313. phoneNumber: this.info.tel //仅为示例
  314. });
  315. }else{
  316. uni.showToast({
  317. title:'商家没有预留电话',
  318. icon:'none'
  319. })
  320. }
  321. },
  322. hanleChoose(){
  323. this.show = true
  324. },
  325. close(){
  326. this.show = false
  327. },
  328. // 加油站详情
  329. queryStoreDetail(storeId){
  330. queryStoreDetail(storeId).then(res=>{
  331. this.info = res.content
  332. this.getDistance()
  333. this.info.itemInfoList.map((item,index)=>{
  334. if(item.itemName == '92#'){
  335. this.numIndex = index
  336. this.itemId = item.itemId
  337. this.num = item.itemName
  338. this.price.cityPrice = item.cityPrice
  339. this.price.vipPrice = item.vipPrice
  340. this.price.storePrice = item.storePrice
  341. }
  342. })
  343. })
  344. },
  345. queryCalPrice(){
  346. if(this.num&&this.gun&&this.amount>=10){
  347. uni.showLoading({
  348. title:'计算中'
  349. })
  350. queryCalPrice(this.query).then(res=>{
  351. uni.hideLoading()
  352. if(res.state == 'Success'){
  353. this.payInfo = res.content
  354. }
  355. })
  356. }
  357. },
  358. getDistance(){
  359. let location = JSON.parse(uni.getStorageSync('location'))
  360. qqmapsdk.calculateDistance({from:{latitude:location.latitude,longitude:location.longitude},to:[{latitude:this.info.location[1],longitude:this.info.location[0]}],success:(res)=>{
  361. console.log(res);
  362. this.distance = res.result.elements[0].distance
  363. }})
  364. },
  365. getRad(d) {
  366. return d * Math.PI / 180.0;
  367. },
  368. /*参数:两地的经纬度数值*/
  369. getFlatternDistance(lat1, lng1, lat2, lng2) {
  370. var radLat1 = this.getRad(lat1);
  371. var radLat2 = this.getRad(lat2);
  372. var a = radLat1 - radLat2;
  373. var b = this.getRad(lng1) - this.getRad(lng2);
  374. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
  375. Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
  376. s = s * 6378137.0;//地球半径 单位米;
  377. s = Math.round(s * 10000) / 10000; //输出为米
  378. s = s.toFixed(0)
  379. return s
  380. },
  381. handlePay(){
  382. let that = this
  383. let location = JSON.parse(uni.getStorageSync('location'))
  384. console.log('不能超过(米):',this.amount*1000,'距离加油站(米):',this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon))
  385. if(this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)>1000){
  386. return uni.showModal({
  387. title:'提示',
  388. content:'您当前距离加油站较远,请到达加油站后与加油员确定信息',
  389. confirmText:'刷新位置',
  390. success: function (res) {
  391. if (res.confirm) {
  392. uni.showLoading({
  393. title:'刷新中'
  394. })
  395. uni.getLocation({
  396. type: 'gcj02',
  397. success: (res) => {
  398. // 存储经纬度
  399. uni.setStorageSync('location',JSON.stringify({latitude:res.latitude,longitude:res.longitude}))
  400. uni.hideLoading()
  401. that.getDistance()
  402. }
  403. })
  404. }
  405. }
  406. })
  407. }
  408. this.loading = true
  409. let query = {
  410. "channel":'ZhongShu',
  411. "epId": this.epId,
  412. "itemName":this.num,
  413. "gunNo": this.gun,
  414. "itemId": this.itemId,
  415. "litre": this.payInfo.litre,
  416. "openExtra": "",
  417. "originalAmount": this.payInfo.totalPrice,
  418. "outNewUserFlag": "",
  419. "paymentAmount": this.payInfo.realPrice,
  420. "promotionInfo": [
  421. {
  422. "allowanceId": "string",
  423. "allowanceType": 0
  424. }
  425. ],
  426. "serviceFee": this.payInfo.serviceFee,
  427. "storeId":this.storeId,
  428. "storePrice": this.price.storePrice,
  429. "vipPrice": this.price.vipPrice
  430. }
  431. queryNewOrder(query).then(res=>{
  432. this.loading = false
  433. if(res.state == 'Success'){
  434. uni.navigateToMiniProgram({
  435. appId:"wx0d252f6ed9755862", // 滴滴加油小程序appId
  436. path: `packageA/pages/open-energy-pay/index?orderId=${res.content.xjOrderId}&tradeId=${res.content.tradeId}`, // 滴滴加油收银台页面地址,需要拼接orderId和tradeId
  437. envVersion: 'release' // 固定release
  438. })
  439. }
  440. })
  441. }
  442. },
  443. onReady() {
  444. this.map = uni.createMapContext("map", this);
  445. },
  446. onShow() {
  447. if(!this.btnDisabled){
  448. uni.reLaunch({
  449. url:'/my/order/index'
  450. })
  451. }
  452. },
  453. onLoad(options) {
  454. this.epId = options.epId
  455. // '5154031457384536897'
  456. this.storeId = options.id
  457. this.queryStoreDetail(options.id)
  458. }
  459. }
  460. </script>
  461. <style lang="scss" >
  462. .refuelDetail{
  463. background: #F5F5F6;
  464. height: 100vh;
  465. padding-bottom: 200rpx;
  466. .banner{
  467. width: 100%;
  468. height: 382rpx;
  469. }
  470. .tag-title{
  471. font-weight: 600;
  472. font-size: 32rpx;
  473. color: #EE4320;
  474. height: 220rpx;
  475. background: linear-gradient( 180deg, rgba(238,67,32,0.15) 0%, rgba(255,255,255,0) 100%);
  476. padding: 20rpx 24rpx;
  477. box-sizing: border-box;
  478. }
  479. .block{
  480. margin: 0 24rpx 20rpx;
  481. background: #fff;
  482. border-radius: 8rpx 8rpx 8rpx 8rpx;
  483. padding: 28rpx 24rpx ;
  484. }
  485. .content{
  486. margin-top: -142rpx;
  487. // min-height: 500rpx;
  488. // border-radius: 16rpx 16rpx 0 0;
  489. // position: relative;
  490. // z-index: 2;
  491. // background: #fff;
  492. // padding: 28rpx 24rpx;
  493. .shopInfo{
  494. background-image: url('@/static/white-map.png');
  495. background-repeat: no-repeat;
  496. background-size: 318rpx 295rpx;
  497. background-position: right top;
  498. .title-box{
  499. display: flex;
  500. align-items: flex-end;
  501. justify-content: space-between;
  502. .title{
  503. font-weight: 600;
  504. font-size: 32rpx;
  505. color: #222222;
  506. width: 500rpx;
  507. white-space: nowrap;
  508. overflow: hidden;
  509. text-overflow: ellipsis;
  510. margin-top: 10rpx;
  511. }
  512. .diatance-box{
  513. display: flex;
  514. align-items: center;
  515. font-weight: 400;
  516. font-size: 24rpx;
  517. color: #222222;
  518. .icon{
  519. width: 20rpx;
  520. height: 20rpx;
  521. margin-right: 8rpx;
  522. }
  523. }
  524. }
  525. .time{
  526. font-weight: 300;
  527. font-size: 24rpx;
  528. color: #AAAAAA;
  529. padding: 20rpx 0;
  530. border-bottom: 1rpx solid #F0F0F0;
  531. }
  532. .address{
  533. font-weight: 400;
  534. font-size: 24rpx;
  535. color: #222222;
  536. line-height: 40rpx;
  537. overflow: hidden;
  538. padding-right: 20rpx;
  539. text-overflow: ellipsis;
  540. /* 弹性伸缩盒子模型显示 */
  541. display: -webkit-box;
  542. /* 限制在一个块元素显示的文本的行数 */
  543. -webkit-line-clamp: 2;
  544. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  545. -webkit-box-orient: vertical;
  546. margin-top: 10rpx;
  547. }
  548. .address-box{
  549. display: flex;
  550. align-items: center;
  551. justify-content: space-between;
  552. // width: 702rpx;
  553. // height: 140rpx;
  554. // background-image: url('@/static/white-map.png');
  555. // background-repeat: repeat;
  556. // background-size: 100% 140rpx;
  557. box-sizing: border-box;
  558. padding-top: 20rpx;
  559. .distance{
  560. font-weight: 300;
  561. font-size: 24rpx;
  562. color: #AAAAAA;
  563. }
  564. .btn-box{
  565. display: flex;
  566. .btn+.btn{
  567. margin-left: 16rpx;
  568. }
  569. .btn{
  570. width: 120rpx;
  571. height: 52rpx;
  572. line-height: 52rpx;
  573. text-align: center;
  574. font-weight: 400;
  575. font-size: 24rpx;
  576. color: #222222;
  577. display: flex;
  578. align-items: center;
  579. .icon{
  580. width: 30rpx;
  581. height: 30rpx;
  582. padding-right: 10rpx;
  583. }
  584. }
  585. }
  586. }
  587. }
  588. .price-box{
  589. display: flex;
  590. align-items: center;
  591. justify-content: space-between;
  592. .price{
  593. font-weight: 600;
  594. font-size: 36rpx;
  595. color: #EE4320;
  596. display: flex;
  597. align-items: center;
  598. .label{
  599. font-size: 22rpx;
  600. }
  601. }
  602. .right-box{
  603. display: flex;
  604. align-items: center;
  605. .old-price{
  606. font-weight: 300;
  607. font-size: 24rpx;
  608. color: #AAAAAA;
  609. margin-left: 20rpx;
  610. }
  611. }
  612. }
  613. .block-title{
  614. font-weight: 600;
  615. font-size: 28rpx;
  616. color: #222222;
  617. padding-bottom: 24rpx;
  618. }
  619. .choose-box{
  620. display: flex;
  621. justify-content: space-between;
  622. .item{
  623. width: 316rpx;
  624. height: 80rpx;
  625. line-height: 80rpx;
  626. text-align: center;
  627. background: #F0F0F0;
  628. border-radius: 8rpx;
  629. font-weight: 600;
  630. font-size: 28rpx;
  631. color: #222222;
  632. position: relative;
  633. .icon{
  634. width: 32rpx;
  635. height: 32rpx;
  636. position: absolute;
  637. top: 50%;
  638. right: 24rpx;
  639. transform: translateY(-50%);
  640. }
  641. }
  642. .item.active{
  643. background: #FFF6F5;
  644. color: #FF4D3A;
  645. }
  646. }
  647. .input-box{
  648. position: relative;
  649. overflow: hidden;
  650. margin-top: 20rpx;
  651. width: 100%;
  652. height: 120rpx;
  653. line-height: 120rpx;
  654. border-radius: 16rpx;
  655. background: #F0F0F0;
  656. .price-input{
  657. position: absolute;
  658. top: 50%;
  659. left: 72rpx;
  660. height: 70rpx;
  661. line-height: 70rpx;
  662. width: 450rpx;
  663. transform: translateY(-50%);
  664. font-weight: bold;
  665. font-size: 32rpx;
  666. color: #222;
  667. box-sizing: border-box;
  668. }
  669. .placeholder{
  670. font-size: 32rpx;
  671. color: #AAAAAA;
  672. height: 64rpx;
  673. line-height: 64rpx;
  674. }
  675. .unit{
  676. position: absolute;
  677. top: 50%;
  678. left: 28rpx;
  679. transform: translateY(-50%);
  680. font-size: 32rpx;
  681. color: #222222;
  682. font-weight: bold;
  683. }
  684. }
  685. .order-box{
  686. padding: 0 24rpx;
  687. .item{
  688. display: flex;
  689. align-items: center;
  690. justify-content: space-between;
  691. padding: 24rpx 0;
  692. border-bottom: 1rpx solid #F0F0F0;
  693. .label{
  694. font-weight: 300;
  695. font-size: 28rpx;
  696. color: #222222;
  697. }
  698. .value-box{
  699. display: flex;
  700. align-items: center;
  701. .num{
  702. font-weight: 300;
  703. font-size: 28rpx;
  704. color: #AAAAAA;
  705. }
  706. }
  707. .value{
  708. font-weight: 300;
  709. font-size: 28rpx;
  710. color: #222222;
  711. margin-left: 20rpx;
  712. }
  713. .gray{
  714. color: #AAAAAA!important;
  715. }
  716. .red{
  717. color: #EE4320!important;
  718. font-weight: 600!important;
  719. font-size: 28rpx!important;
  720. }
  721. }
  722. }
  723. }
  724. .buy-box {
  725. position: fixed;
  726. bottom: 0%;
  727. left: 0%;
  728. width: 100%;
  729. display: flex;
  730. align-items: center;
  731. justify-content: space-between;
  732. box-sizing: border-box;
  733. padding: 10rpx 30rpx env(safe-area-inset-bottom);
  734. border-top: 1rpx solid #EEEEEE;
  735. background: #fff;
  736. .total-price {
  737. display: flex;
  738. align-items: center;
  739. .label {
  740. color: #181818;
  741. font-size: 28rpx;
  742. }
  743. .price {
  744. font-size: 36rpx;
  745. font-weight: 800;
  746. color: #EE4320;
  747. margin-left: 10rpx;
  748. }
  749. }
  750. .btn {
  751. width: 280rpx;
  752. height: 80rpx;
  753. line-height: 80rpx;
  754. text-align: center;
  755. background: $uni-color-primary;
  756. box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
  757. border-radius: 46rpx 46rpx 46rpx 46rpx;
  758. font-weight: 800;
  759. color: #FFFFFF;
  760. font-size: 28rpx;
  761. margin: 0;
  762. }
  763. .btn.disabled{
  764. filter: grayscale(1);
  765. }
  766. }
  767. .map{
  768. position: absolute;
  769. top: -9999rpx;
  770. left: -9999rpx;
  771. }
  772. .u-popup__content{
  773. padding: 28rpx 24rpx;
  774. background: #F9F9F9 !important;
  775. .popup-title{
  776. font-weight: 600;
  777. font-size: 32rpx;
  778. color: #222222;
  779. }
  780. .item-box{
  781. width: 100%;
  782. background: #FFFFFF;
  783. border-radius: 16rpx 16rpx 16rpx 16rpx;
  784. margin-top: 20rpx;
  785. padding: 24rpx;
  786. box-sizing: border-box;
  787. .sub-title{
  788. font-weight: 600;
  789. font-size: 28rpx;
  790. color: #222222;
  791. margin-bottom: 20rpx;
  792. display: flex;
  793. align-items: flex-end;
  794. .notice{
  795. font-weight: 300;
  796. font-size: 24rpx;
  797. color: #AAAAAA;
  798. margin-left: 20rpx;
  799. }
  800. }
  801. .box{
  802. display: flex;
  803. flex-wrap: wrap;
  804. max-height: 600rpx;
  805. overflow: auto;
  806. .item{
  807. width: 148rpx;
  808. height: 52rpx;
  809. line-height: 52rpx;
  810. text-align: center;
  811. background: #F0F0F0;
  812. border-radius: 8rpx 8rpx 8rpx 8rpx;
  813. font-weight: 400;
  814. font-size: 28rpx;
  815. color: #222222;
  816. margin-bottom: 20rpx;
  817. margin-right: 20rpx;
  818. }
  819. .item.active{
  820. background: #FFF6F5;
  821. color: #EE4320;
  822. font-weight: bold;
  823. }
  824. .item.m0{
  825. margin-right: 0!important;
  826. }
  827. }
  828. }
  829. }
  830. }
  831. </style>