parkingFeeDetail.vue 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893
  1. <template>
  2. <div class="scroll-Y">
  3. <div class="warp">
  4. <div
  5. :class="{
  6. warp_index: true,
  7. warp_index1: true,
  8. 'bgc-blue': custTypeId === 1,
  9. 'bgc-green': custTypeId === 2,
  10. }"
  11. >
  12. {{ parkInfo.carno | formatCarno }}
  13. </div>
  14. <div class="warp_index">
  15. <div>停车场</div>
  16. <div class="warp_index_color">{{ parkInfo.parkname }}</div>
  17. </div>
  18. <div class="warp_index">
  19. <div>入场时间</div>
  20. <div class="warp_index_color">{{ parkInfo.entertime }}</div>
  21. </div>
  22. <div class="warp_index">
  23. <div>已停车时长</div>
  24. <div class="warp_index_color">{{ parkingTime }}</div>
  25. </div>
  26. <div class="warp_index">
  27. <div>应缴</div>
  28. <div class="warp_index_color">
  29. {{ (parkInfo.servicefee / 100) | currency }}
  30. </div>
  31. </div>
  32. </div>
  33. <div class="warp">
  34. <div
  35. class="warp_index warp_index_da"
  36. v-if="
  37. parkFee.parkInfoEntity &&
  38. (parkFee.parkInfoEntity.consumeReduce ||
  39. parkFee.parkInfoEntity.memberLevelReduce)
  40. "
  41. >
  42. <div>停车优惠</div>
  43. <div class="warp_index_color" @click="discounts">
  44. <div
  45. style="margin-right: 10px"
  46. :class="hasDiscount ? 'text-red' : ''"
  47. >
  48. {{ discountDesc }}
  49. </div>
  50. <img
  51. style="width: 26px; height: 26px"
  52. src="static/images/arrows.png"
  53. />
  54. </div>
  55. </div>
  56. <div
  57. class="warp_index warp_index_da"
  58. v-if="
  59. parkFee.parkInfoEntity && parkFee.parkInfoEntity.isuseintegral === 1
  60. "
  61. >
  62. <div>积分减免</div>
  63. <div class="warp_index_color" @click="toggle('bottom')">
  64. <div
  65. style="margin-right: 10px"
  66. :class="bonusCopy > integral || duration ? 'text-red' : ''"
  67. >
  68. {{ integralDesc }}
  69. </div>
  70. <img
  71. style="width: 26px; height: 26px"
  72. src="static/images/arrows.png"
  73. />
  74. </div>
  75. </div>
  76. <div
  77. class="warp_index warp_index_da"
  78. v-if="
  79. parkFee.parkInfoEntity && parkFee.parkInfoEntity.isuseticket === 1
  80. "
  81. >
  82. <div>优惠劵</div>
  83. <div class="warp_index_color" @click="coupon">
  84. <div
  85. style="margin-right: 10px"
  86. :class="couponCount > 0 ? 'text-red' : ''"
  87. >
  88. {{ couponDesc }}
  89. </div>
  90. <img
  91. style="width: 26px; height: 26px"
  92. src="static/images/arrows.png"
  93. />
  94. </div>
  95. </div>
  96. <!-- 纸质券 -->
  97. <div
  98. class="warp_index warp_index_da"
  99. v-if="
  100. (parkFee.parkInfoEntity &&
  101. parkFee.parkInfoEntity.papercoupons === 1) ||
  102. isShowPapercoupons
  103. "
  104. >
  105. <div>纸质优惠劵</div>
  106. <div class="warp_index_color" @click="paperCoupon">
  107. <div style="margin-right: 10px" class="text-red">
  108. 扫描纸质优惠劵二维码
  109. </div>
  110. <img
  111. style="width: 26px; height: 26px"
  112. src="static/images/arrows.png"
  113. />
  114. </div>
  115. </div>
  116. <div
  117. :class="{
  118. warp_index: true,
  119. color_warp_index: custTypeId !== 0,
  120. warp_index_da: true,
  121. }"
  122. >
  123. <div>优惠金额:</div>
  124. <div class="warp_index_color" style="color: #ff0000">
  125. -{{ discountTotalFee | currency }}
  126. </div>
  127. </div>
  128. <div :class="{ warp_index: true, color_warp_index: custTypeId !== 0 }">
  129. <div>应付金额:</div>
  130. <div class="warp_index_color" style="color: #ff0000">
  131. {{ actualFee | currency }}
  132. </div>
  133. </div>
  134. </div>
  135. <div
  136. class="top_content"
  137. v-if="parkFee.parkInfoEntity && parkFee.parkInfoEntity.payinstruction"
  138. >
  139. <div class="title_box">
  140. <span class="btn">缴费说明</span>
  141. </div>
  142. <div class="info" :class="!isShow ? 'is-show' : ''">
  143. <span>{{ parkFee.parkInfoEntity.payinstruction }}</span>
  144. </div>
  145. <div
  146. class="top-down"
  147. @click="togglePayinstruction"
  148. v-if="!isShow && parkFee.parkInfoEntity.payinstruction.length > 60"
  149. >
  150. </div>
  151. <div
  152. class="top-down"
  153. @click="togglePayinstruction"
  154. v-if="isShow && parkFee.parkInfoEntity.payinstruction.length > 60"
  155. >
  156. </div>
  157. </div>
  158. <div class="flewx">
  159. <div class="flewx-content">
  160. 应付<span style="color: #ff0000; font-size: 32px; padding-left: 20px">{{
  161. actualFee | currency
  162. }}</span>
  163. <span style="color: #8d8d8d; padding-left: 30px; font-size: 28px"
  164. >已优惠{{ discountTotalFee | currency }}元</span
  165. >
  166. <uni-countdown
  167. v-if="payCarno"
  168. splitorColor="#FF0000"
  169. color="#FF0000"
  170. :show-day="false"
  171. :show-hour="false"
  172. :second="refreshTime"
  173. @timeup="resetCountDown()"
  174. >
  175. <span style="align-self: center; font-size: 26px; color: #ff0000"
  176. >后同步最新费用</span
  177. >
  178. </uni-countdown>
  179. </div>
  180. <div
  181. :class="{
  182. flewx_index3: true,
  183. blue_flewx_index3: custTypeId === 1,
  184. green_flewx_index3: custTypeId === 2,
  185. 'btn-disabled': payBtnDisabled,
  186. }"
  187. @click="toPay"
  188. >
  189. 支付{{this.parkInfo.servicefee}}-{{this.parkFee.parkInfoEntity}}
  190. </div>
  191. </div>
  192. <uni-popup ref="popup" type="bottom" :animation="false" :maskClick="false">
  193. <div class="popue_box">
  194. <div class="popue_box_index1">积分减免</div>
  195. <div class="popue_box_index">
  196. <div>减免规则</div>
  197. <div style="color: #989898">
  198. {{ integral }}积分抵扣{{
  199. parkMallCode === 5 ? integralToValue + '元' : '1小时'
  200. }}
  201. </div>
  202. </div>
  203. <div class="popue_box_index">
  204. <div style="font-weight: 700">可用积分</div>
  205. <div style="color: #ed1c24">{{ bonus }}分</div>
  206. </div>
  207. <div class="popue_box_index">
  208. <div>抵扣{{ parkMallCode === 5 ? '金额' : '时长' }}</div>
  209. <div class="popue_box_index" style="width: 325px">
  210. <div class="popue_box_index4_xs">
  211. <div class="popue_box_index4_xs_index1" @click="durationMinus">
  212. -
  213. </div>
  214. <div class="popue_box_index4_xs_index2">{{ duration }}</div>
  215. <div class="popue_box_index4_xs_index3" @click="durationAdd">
  216. +
  217. </div>
  218. </div>
  219. <div style="color: #808080">
  220. {{ parkMallCode === 5 ? '元' : '小时' }}
  221. </div>
  222. </div>
  223. </div>
  224. <div class="popue_box_index5">
  225. <div
  226. :class="{
  227. popue_box_index4_by: true,
  228. blue_popue_box_index4_by: custTypeId === 1,
  229. green_popue_box_index4_by: custTypeId === 2,
  230. }"
  231. @click="cancel"
  232. >
  233. 取消
  234. </div>
  235. <div
  236. :class="{
  237. popue_box_index4_by1: true,
  238. blue_popue_box_index4_by1: custTypeId === 1,
  239. green_popue_box_index4_by1: custTypeId === 2,
  240. }"
  241. @click="confirm"
  242. >
  243. 确定
  244. </div>
  245. </div>
  246. </div>
  247. </uni-popup>
  248. </div>
  249. </template>
  250. <script>
  251. // const app = getApp()
  252. const app = {};
  253. import moment from 'moment';
  254. import { mapState } from 'vuex';
  255. import MemberCacheTool from '@/utils/member-cache-tool.js';
  256. import log from '@/utils/log.js';
  257. import { compare } from '@/utils/location.js';
  258. import uni from '@/utils/uniHooks';
  259. export default {
  260. data() {
  261. return {
  262. bindflag: '',
  263. initFlag: true, // 用作应缴费用为0时的提示弹框标记
  264. animationChilc: false,
  265. duration: 0, // 积分兑换时长
  266. durationCopy: 0, // 积分兑换时长备份
  267. orderno: '',
  268. params: {},
  269. integral: 0, // 积分
  270. bonus: 0, // 当前积分
  271. bonusCopy: 0, // 积分备份
  272. bonusfee: 0, // 积分减免金额
  273. hourMoney: 15,
  274. payCarno: '',
  275. picUrl: '',
  276. parkInfo: {},
  277. parkFee: {},
  278. checkedTotal: 0, // 已选择优惠项目数
  279. discountTotal: {}, // 已选择优惠项目统计(时间、费用)
  280. couponCount: 0, // 可选优惠券数量
  281. checkedCouponCount: 0, // 已选优惠券数量
  282. couponInfo: {}, // 已选择电子券信息
  283. paperCouponInfo: {}, // 已选择纸质优惠券信息
  284. isShowPapercoupons: false, // 未登录时显示纸质优惠券
  285. // dimension: 1, // 计算维度 浦东0.5小时 其它停车场1小时
  286. maxonetimediscountFee: 0, // 每次优惠上限金额
  287. maxonedaydiscountFee: 0, // 每天优惠上限金额
  288. discountTotalFeeCopy: 0, // 用于超限判断
  289. parkMallCode: 0, // 0静安 1浦东 2杭州 3北京 4沈阳 5深圳
  290. hasDiscount: false, // 是否有会员减免、消费减免
  291. isShow: true, // 缴费说明true:显示全部 false:显示部分
  292. orderCreateTime: '', // 订单创建时间
  293. refreshTime: 180, // 停车场重置费用倒计时3分钟
  294. isPageHide: false, // 用于其它有人吗倒计时重置时不再弹出优惠框
  295. isShowPopup: false, // 优惠提示是否显示
  296. preUrl: '',
  297. integralToValue: 0, // 深圳前海停车500积分兑换5元
  298. integralMaxMoney: 0, // 深圳前海停车积分上限
  299. };
  300. },
  301. computed: {
  302. // 支付按钮状态
  303. payBtnDisabled() {
  304. return (
  305. !this.parkInfo.servicefee ||
  306. (this.member && !this.parkFee.parkInfoEntity)
  307. );
  308. },
  309. // 已停车时长
  310. parkingTime() {
  311. const time = this.parkInfo.serviceMin;
  312. const days = parseInt(time / 60 / 24);
  313. const hours = parseInt((time / 60) % 24);
  314. const minutes = parseInt(time % 60);
  315. if (days > 0) {
  316. return `${days}天 ${hours}小时 ${minutes}分钟`;
  317. }
  318. if (hours > 0) {
  319. return `${hours}小时 ${minutes}分钟`;
  320. }
  321. return `${minutes}分钟`;
  322. },
  323. // 停车优惠(首停、会员减免、消费减免)
  324. discountDesc() {
  325. if (this.hasDiscount) {
  326. if (this.checkedTotal > 0) {
  327. return `已选择${this.checkedTotal}项优惠`;
  328. }
  329. return '立即使用';
  330. } else {
  331. return '暂无可用优惠';
  332. }
  333. },
  334. // 积分减免
  335. integralDesc() {
  336. if (this.duration > 0) {
  337. // 深圳特殊处理(单位:金额)
  338. if (this.parkMallCode === 5) {
  339. return `已选择兑换${this.duration}元`;
  340. }
  341. return `已选择兑换${this.duration}小时`;
  342. }
  343. if (this.bonusCopy < this.integral) {
  344. return `${this.integral}积分可停车1小时`;
  345. }
  346. console.log(354, this.member);
  347. if (
  348. this.parkMallCode === 3 &&
  349. this.member?.currnentintegral >= this.integral &&
  350. !this.bonus
  351. ) {
  352. return `今日已达上限`;
  353. }
  354. return `${this.bonus}积分可减免`;
  355. },
  356. // 电子券
  357. couponDesc() {
  358. if (this.checkedCouponCount > 0) {
  359. return `已选择${this.checkedCouponCount}张优惠劵`;
  360. } else {
  361. if (this.couponCount > 0) {
  362. return `您有${this.couponCount}张可用优惠劵`;
  363. }
  364. return `暂无可用优惠券`;
  365. }
  366. },
  367. // 实际支付金额
  368. actualFee() {
  369. const fee = this.parkInfo.servicefee / 100 - this.discountTotalFee;
  370. return fee > 0 ? fee : 0;
  371. },
  372. // 优惠金额
  373. discountTotalFee() {
  374. let total = 0;
  375. if (this.discountTotal?.fee > 0) {
  376. total += this.discountTotal.fee; // 首停、会员、消费减免
  377. }
  378. if (this.bonusfee > 0) {
  379. total += this.bonusfee; // 积分减免
  380. }
  381. if (this.couponInfo?.couponfee > 0) {
  382. total += this.couponInfo.couponfee; // 电子券减免
  383. }
  384. this.discountTotalFeeCopy = total;
  385. // 超出上限按上限计算(parkMallCode: 0静安 1浦东 2杭州 3北京 4沈阳 5深圳)
  386. if (this.parkMallCode === 1) {
  387. if (total > this.maxonetimediscountFee) {
  388. total = this.maxonetimediscountFee;
  389. }
  390. }
  391. if (this.parkMallCode === 5) {
  392. if (total > this.maxonedaydiscountFee) {
  393. total = this.maxonedaydiscountFee;
  394. }
  395. }
  396. // 沈阳超限处理(maxonedaydiscountFee 会员、消费、电子券减免)
  397. if (this.parkMallCode === 4) {
  398. if (total - this.bonusfee > this.maxonedaydiscountFee) {
  399. total = this.maxonedaydiscountFee + this.bonusfee;
  400. }
  401. }
  402. if (this.paperCouponInfo.paperDiscountFee > 0) {
  403. total += this.paperCouponInfo.paperDiscountFee; // 纸质券减免
  404. this.discountTotalFeeCopy += this.paperCouponInfo.paperDiscountFee;
  405. }
  406. uni.setStorageSync('parkingTotal', {
  407. time: total / this.hourMoney,
  408. fee: total,
  409. feeCopy: this.discountTotalFeeCopy,
  410. bonusfee: this.bonusfee || 0,
  411. });
  412. return total;
  413. },
  414. // 页面初始化出发条件
  415. isInit() {
  416. console.log(426426426426, this.member);
  417. return {
  418. projectId: this.projectId,
  419. member: this.member,
  420. };
  421. },
  422. ...mapState({
  423. custTypeId: (state) => state.custTypeId,
  424. paramsScene: (state) => state.paramsScene,
  425. mallid: (state) => state.mallId,
  426. openId: (state) => state.openid,
  427. member: (state) => state.member,
  428. groupId: (state) => state.groupId,
  429. mobile: (state) => state.mobile,
  430. projectId: (state) => state.projectId,
  431. }),
  432. },
  433. // 分享好友
  434. onShareAppMessage: function (res) {
  435. return {
  436. title: '缴费详情', // 分享标题
  437. // desc: this.params.shareDescribe, // 分享描述
  438. imageUrl: '', // 分享图标
  439. path: `/pages/parkingFee/parkingFeeDetail?orderno=${this.orderno}&id=${this.id}&mallid=${app.globalData.mallid}`,
  440. };
  441. },
  442. // 分享朋友圈
  443. onShareTimeline: function (res) {
  444. return {
  445. title: '缴费详情', // 分享标题
  446. // desc: this.params.shareDescribe, // 分享描述
  447. imageUrl: '', // 分享图标
  448. path: `/pages/parkingFee/parkingFeeDetail?orderno=${this.orderno}&id=${this.id}&mallid=${app.globalData.mallid}`,
  449. };
  450. },
  451. created() {
  452. this.picUrl = this.$picUrl;
  453. this.payCarno = this.$route.query.carno;
  454. this.orderno = this.$route.query.orderno;
  455. this.id = this.$route.query.id;
  456. // 场景二维码记录(是否扫码进入)
  457. // app.globalData.paramsScene = {};
  458. this.$store.commit('SET_PARAMS_SCENE', {});
  459. // this.$saveSceneQrcodeDetail(
  460. // 'page',
  461. // 'parkingFeeDetail:' + this.$route.query.id,
  462. // '缴费详情',
  463. // '',
  464. // '',
  465. // '',
  466. // ''
  467. // );
  468. // this.init();
  469. // this.createParkOrder();
  470. // if (JSON.stringify(app.globalData.userInfo) !== "{}" && JSON.stringify(app.globalData.member) !== "{}") {
  471. // this.createParkOrder();
  472. // } else {
  473. // this.$refs.authorize.login("/pages/parkingFee/parkingFeeDetail", () => {
  474. // this.createParkOrder();
  475. // });
  476. // }
  477. // 埋点本地化
  478. this.preUrl = uni.getStorageSync('previousUrl');
  479. uni.setStorageSync('previousUrl', '/pages/parkingFee/parkingFeeDetail.vue');
  480. },
  481. watch: {
  482. isInit() {
  483. console.log(
  484. 493493493,
  485. this.isInit,
  486. this.isInit?.projectId,
  487. this.isInit?.member?.vipcode
  488. );
  489. if (
  490. this.isInit &&
  491. this.isInit?.projectId &&
  492. this.isInit?.member?.vipcode
  493. ) {
  494. this.init();
  495. this.createParkOrder();
  496. }
  497. },
  498. // member() {
  499. // this.init();
  500. // this.createParkOrder();
  501. // },
  502. // projectId() {
  503. // console.log(490490490, this.projectId)
  504. // }
  505. },
  506. mounted() {
  507. console.log('页面被打开了');
  508. console.log('订单时间:' + this.orderCreateTime);
  509. // log.info('订单时间:' + this.orderCreateTime);
  510. // return;
  511. // 用户加载页面是计算规则
  512. if (
  513. this.isInit &&
  514. this.isInit?.projectId &&
  515. this.isInit?.member?.vipcode
  516. ) {
  517. this.isPageHide = false;
  518. // 如果订单时间+3分钟-当前时间<=0 刷新订单
  519. if (this.orderCreateTime) {
  520. const countDownTime = moment(this.orderCreateTime)
  521. .add(180, 's')
  522. .diff(moment(), 's');
  523. console.log('剩余时间:' + countDownTime);
  524. log.info('剩余时间:' + countDownTime);
  525. if (countDownTime <= 0) {
  526. setTimeout(() => {
  527. this.createParkOrder();
  528. }, 300);
  529. } else {
  530. this.refreshTime = countDownTime;
  531. }
  532. }
  533. return
  534. // 优惠减免(首停、会员、消费)
  535. this.checkedTotal = uni.getStorageSync('checkedTotal');
  536. this.discountTotal = uni.getStorageSync('discountTotal');
  537. // 电子券减免(停车券)
  538. this.couponInfo = uni.getStorageSync('couponInfo');
  539. this.checkedCouponCount = uni.getStorageSync('checkedCouponList').length;
  540. // 纸质优惠券
  541. this.paperCouponInfo = uni.getStorageSync('paperCouponInfo');
  542. }
  543. },
  544. onHide() {
  545. this.isPageHide = true;
  546. },
  547. methods: {
  548. // 页面初始清空缓存
  549. init() {
  550. // 优惠减免(首停、会员、消费)
  551. uni.removeStorageSync('checkedList'); // 选中list
  552. uni.removeStorageSync('checkedTotal'); // 选中count数
  553. uni.removeStorageSync('discountTotal'); // 减免信息(时长、费用)
  554. // 停车减免(优惠、积分、停车券)
  555. uni.removeStorageSync('parkFee');
  556. // 电子券优惠信息
  557. uni.removeStorageSync('checkedCouponList'); // 选中list
  558. uni.removeStorageSync('couponInfo'); // 减免信息(时长、费用)
  559. uni.removeStorageSync('list'); // 电子券list
  560. // 总停车优惠信息(时长、费用)
  561. uni.removeStorageSync('parkingTotal');
  562. // 应缴金额
  563. uni.removeStorageSync('servicefee');
  564. // 订单号
  565. uni.removeStorageSync('orderno');
  566. // 纸质优惠券
  567. uni.removeStorageSync('paperCouponInfo');
  568. },
  569. // 重置倒计时
  570. resetCountDown() {
  571. this.refreshTime = 0;
  572. this.createParkOrder();
  573. },
  574. // 创建订单
  575. async createParkOrder() {
  576. try {
  577. // return;
  578. uni.showLoading({
  579. title: '加载中',
  580. });
  581. // const openId = MemberCacheTool.getOpenId(app);
  582. // const params = {
  583. // carno: this.payCarno,
  584. // mallid: this.mallid,
  585. // openId: this.openId,
  586. // vipcode:
  587. // this.member?.vipcode || uni.getStorageSync('member')?.vipcode,
  588. // mobile: this.mobile,
  589. // groupId: this.groupId,
  590. // createuser: 'sys_miniprogram',
  591. // };
  592. // const params = {"carno":"沪K99118","createuser":"sys_miniprogram","groupId":"8a8884e77cc9e70a017cca14d07e0002","mallid":"8a88835c7cd96d31017cda3f77e80003","mobile":"13901890884","openId":"ozdsB4_V8HXo0pwmyMc612j8CUY0","vipcode":"01900734052"}
  593. const params = {
  594. carno: '皖EEEEEE',
  595. mallid: '8aaa80b47c784020017c78b00d060022',
  596. openId: 'ozdsB4yx3I7ez2Ba3DgEmeSR-CFY',
  597. vipcode: 'KERRY100212801',
  598. mobile: '15267617473',
  599. groupId: '8aaa81947c6e1ca0017c7201e82d0001',
  600. createuser: 'sys_miniprogram',
  601. };
  602. this.$md(params);
  603. console.log(623)
  604. // console.log(567, this.$baseURL + 'api/1.0/park/createParkOrderAndCarFee')
  605. console.log({
  606. // path: this.$baseURL + 'api/1.0/park/createParkOrder',
  607. path: this.$baseURL + 'api/1.0/park/createParkOrderAndCarFee',
  608. // path: 'http://172.21.90.87:8083/xcrm-api/api/1.0/park/createParkOrderAndCarFee',
  609. data: params,
  610. method: 'POST',
  611. header: JSON.parse(uni.getStorageSync('handleUser')),
  612. });
  613. /*const res = await this.$request({
  614. url: this.$baseURL + 'api/1.0/park/createParkOrderAndCarFee',
  615. // path: 'http://172.21.90.87:8083/xcrm-api/api/1.0/park/createParkOrderAndCarFee',
  616. data: params,
  617. method: 'POST',
  618. header: JSON.parse(uni.getStorageSync('handleUser')),
  619. });*/
  620. const res = {
  621. data: {
  622. code: 0,
  623. msg: 'success',
  624. data: {
  625. id: null,
  626. parkServiceFee: null,
  627. noCarNo: null,
  628. parkPayFee: null,
  629. addFee: null,
  630. outTradeNo: null,
  631. isUseFree: null,
  632. type: null,
  633. openTime: null,
  634. parkname: null,
  635. parkcode: 'kerry_bj_park',
  636. parksign: null,
  637. channel: null,
  638. orderno: null,
  639. tradeId: '90C01E53-874E-4B44-ABED-D2E43B71518E',
  640. accountId: null,
  641. merchantAccount: null,
  642. status: 1,
  643. remark: null,
  644. carno: '浙C12410',
  645. mobile: null,
  646. vipcode: null,
  647. vipName: null,
  648. memberGrade: null,
  649. entertime: '2022-08-31 10:03:30',
  650. outtime: '2022-09-13 15:07:38',
  651. serviceMin: 19024.0,
  652. servicehour: 317.07,
  653. servicefee: 18825,
  654. bonusfee: null,
  655. bonus: null,
  656. newMemberBonus: null,
  657. newMemberBonusMin: null,
  658. bonusFeeMin: null,
  659. couponfee: null,
  660. couponfeeMin: null,
  661. otherfee: 0,
  662. consumeFee: null,
  663. consumeFeeHour: null,
  664. consumeFeeMin: null,
  665. consumeTicket: null,
  666. useConsumeFee: null,
  667. memberGradeFee: null,
  668. memberGradeFeeHour: null,
  669. memberGradeFeeMin: null,
  670. paperCouponFee: null,
  671. paperCouponFeeMin: null,
  672. paperCoupons: null,
  673. paperCouponCode: null,
  674. firstParkFee: null,
  675. firstParkFeeMin: null,
  676. payfee: null,
  677. doflag: null,
  678. totalfee: null,
  679. usetotalfee: null,
  680. paytype: null,
  681. paykind: null,
  682. paychannel: null,
  683. integraladjustid: null,
  684. refundIntegralAdjustId: null,
  685. couponcode: null,
  686. mallid: null,
  687. createuser: null,
  688. updateuser: null,
  689. deptId: null,
  690. groupId: null,
  691. creator: null,
  692. createDate: null,
  693. updater: null,
  694. updateDate: null,
  695. openId: null,
  696. refundNo: null,
  697. wxState: null,
  698. isInvoice: null,
  699. invoiceId: null,
  700. payStatus: null,
  701. notifyStatus: null,
  702. timeoutStatus: null,
  703. refundStatus: null,
  704. parkMallCode: null,
  705. projectId: null,
  706. pspName: null,
  707. newMemeberBonusFee: null,
  708. },
  709. },
  710. };
  711. console.log('590590590res', res);
  712. // return;
  713. uni.hideLoading();
  714. if (res.data.code === 0) {
  715. this.bindflag = res.data.data.bind;
  716. this.parkInfo = res.data.data;
  717. this.parkMallCode = this.parkInfo.parkMallCode;
  718. this.orderCreateTime = this.parkInfo.createDate;
  719. uni.setStorageSync('servicefee', this.parkInfo.servicefee / 100);
  720. uni.setStorageSync('orderno', this.parkInfo.orderno);
  721. if (!this.parkInfo.servicefee && this.initFlag) {
  722. this.initFlag = false;
  723. return uni.showModal({
  724. showCancel: false,
  725. title: '提示',
  726. content: '当前无需缴费',
  727. complete: () => {
  728. // this.createParkOrder();
  729. this.$router.back();
  730. },
  731. });
  732. }
  733. console.log(629, this.member);
  734. if (this.member) {
  735. console.log(639);
  736. this.getDiscount();
  737. } else {
  738. // 未登录状态显示纸质券
  739. this.isShowPapercoupons = true;
  740. }
  741. this.refreshTime = 180;
  742. } else {
  743. uni.showModal({
  744. showCancel: false,
  745. title: '提示',
  746. content: res.data.msg,
  747. complete(r) {
  748. this.$router.back();
  749. },
  750. });
  751. }
  752. } catch (err) {
  753. console.log(err);
  754. }
  755. },
  756. // 获取优惠、停车场相关配置
  757. getDiscount() {
  758. uni.showLoading({
  759. title: '加载中',
  760. });
  761. console.log(662, this.member);
  762. // return
  763. const params = {
  764. carno: this.payCarno,
  765. mallid: this.mallid,
  766. vipcode: this.member.vipcode,
  767. groupId: this.groupId,
  768. };
  769. console.log(670, params);
  770. // return;
  771. this.$md(params);
  772. this.$request({
  773. url: this.$baseURL + 'api/1.0/park/discount',
  774. data: params,
  775. method: 'POST',
  776. header: JSON.parse(uni.getStorageSync('handleUser')),
  777. })
  778. .then((res) => {
  779. uni.hideLoading();
  780. if (res.data.code === 0) {
  781. this.parkFee = res.data.data;
  782. if (this.parkFee.parkIntegraltomoneyList) {
  783. this.integral = this.parkFee.parkIntegraltomoneyList[0].integral;
  784. this.integralToValue =
  785. this.parkFee.parkIntegraltomoneyList[0].value || 0;
  786. this.integralMaxMoney =
  787. this.parkFee.parkIntegraltomoneyList[0].integralMaxHour || 0;
  788. this.bonus = this.parkFee.parkIntegraltomoneyList[0].bonus;
  789. // 深圳特殊处理(单位:金额)
  790. if (this.parkMallCode === 5) {
  791. if (this.duration) {
  792. this.bonus -=
  793. (this.duration * this.integral) / this.integralToValue;
  794. this.bonusfee = this.duration;
  795. this.durationCopy = this.duration;
  796. }
  797. } else {
  798. if (this.duration) {
  799. this.bonus -= this.duration * this.integral;
  800. this.bonusfee = this.duration * this.hourMoney;
  801. this.durationCopy = this.duration;
  802. }
  803. }
  804. this.bonusCopy = this.bonus;
  805. }
  806. if (!this.parkFee.parkInfoEntity) {
  807. return;
  808. }
  809. const reg = /[;;]/g;
  810. this.parkFee.parkInfoEntity.payinstruction =
  811. this.parkFee.parkInfoEntity.payinstruction.replace(reg, '\r\n');
  812. this.hourMoney = this.parkFee.parkInfoEntity.needmoney;
  813. this.parkMallCode = this.parkFee.parkInfoEntity.parkMallCode;
  814. if (this.parkFee.memberTicketList) {
  815. this.couponCount = this.parkFee.memberTicketList.length;
  816. }
  817. // 上限金额
  818. this.maxonetimediscountFee =
  819. this.parkFee.parkInfoEntity.maxonetimediscount * this.hourMoney;
  820. // 深圳特殊处理(单位:金额)
  821. if (this.parkMallCode === 5) {
  822. this.maxonedaydiscountFee =
  823. this.parkFee.parkInfoEntity.maxOneDayHour -
  824. this.parkFee.parkInfoEntity
  825. .ticketandMemeberGradeAndConsumeUseHour || 0;
  826. } else {
  827. this.maxonedaydiscountFee =
  828. (this.parkFee.parkInfoEntity.maxOneDayHour -
  829. this.parkFee.parkInfoEntity
  830. .ticketandMemeberGradeAndConsumeUseHour) *
  831. this.hourMoney || 0;
  832. }
  833. if (this.maxonedaydiscountFee < 0) {
  834. this.maxonedaydiscountFee = 0;
  835. }
  836. uni.setStorageSync('parkFee', JSON.stringify(this.parkFee));
  837. // 如果有可使用会员减免、消费减免,追加弹框提示
  838. if (
  839. this.parkFee.parkInfoEntity.consumeReduce ||
  840. this.parkFee.parkInfoEntity.memberLevelReduce
  841. ) {
  842. if (
  843. (this.parkFee.parkMemberOrderReducesEntityList &&
  844. this.parkFee.parkMemberOrderReducesEntityList[0]) ||
  845. (this.parkFee.parkConsumeReducesEntityList &&
  846. this.parkFee.parkConsumeReducesEntityList[0])
  847. ) {
  848. this.hasDiscount = true;
  849. // if (!this.parkInfo.servicefee) {
  850. // return;
  851. // }
  852. // let confirmColor = '#703a98';
  853. // if (this.custTypeId === 1) {
  854. // confirmColor = '#023694';
  855. // }
  856. // if (this.custTypeId === 2) {
  857. // confirmColor = '#0B683A';
  858. // }
  859. // if (this.checkedTotal || this.isPageHide || this.isShowPopup) {
  860. // return;
  861. // }
  862. // this.isShowPopup = true;
  863. // uni.showModal({
  864. // title: '停车优惠',
  865. // content: '您有停车优惠可使用, 前往使用!',
  866. // cancelText: '返回',
  867. // confirmText: '点击查看',
  868. // confirmColor: confirmColor,
  869. // success: res => {
  870. // if (res.confirm) {
  871. // this.discounts();
  872. // }
  873. // this.isShowPopup = false;
  874. // }
  875. // })
  876. }
  877. }
  878. // 自动勾选优惠
  879. if (
  880. !this.discountTotalFee &&
  881. (this.hasDiscount ||
  882. this.bonusCopy > this.integral ||
  883. this.couponCount)
  884. ) {
  885. this.autoCheckDiscounts();
  886. }
  887. } else {
  888. uni.showModal({
  889. showCancel: false,
  890. title: '提示',
  891. content: res.data.msg,
  892. complete(r) {
  893. // this.$router.back();
  894. },
  895. });
  896. }
  897. })
  898. .catch((err) => {
  899. console.log(err);
  900. });
  901. },
  902. // 积分取消
  903. cancel() {
  904. this.duration = this.durationCopy;
  905. this.bonus = this.bonusCopy;
  906. // 深圳特殊处理(单位:金额)
  907. if (this.parkMallCode === 5) {
  908. this.bonusfee = this.duration;
  909. } else {
  910. this.bonusfee = this.duration * this.hourMoney;
  911. }
  912. this.$refs.popup.close();
  913. },
  914. // 积分确认
  915. confirm() {
  916. this.bonusCopy = this.bonus;
  917. this.durationCopy = this.duration;
  918. this.$refs.popup.close();
  919. },
  920. // 减积分
  921. durationMinus() {
  922. if (this.duration > 0) {
  923. // 深圳特殊处理(单位:金额)
  924. if (this.parkMallCode === 5) {
  925. this.duration -= this.integralToValue;
  926. } else {
  927. this.duration--;
  928. }
  929. this.bonus += this.integral;
  930. }
  931. // 深圳特殊处理(单位:金额)
  932. if (this.parkMallCode === 5) {
  933. this.bonusfee = this.duration;
  934. } else {
  935. this.bonusfee = this.duration * this.hourMoney;
  936. }
  937. },
  938. // 加积分
  939. durationAdd() {
  940. // 浦东每次缴费超限控制
  941. if (
  942. this.parkMallCode === 1 &&
  943. this.discountTotalFee >= this.maxonetimediscountFee
  944. ) {
  945. return uni.showToast({
  946. title: `超出抵扣上限,每次最高可抵扣${this.parkFee.parkInfoEntity.maxonetimediscount}小时`,
  947. icon: 'none',
  948. });
  949. }
  950. // 北京积分上限控制
  951. if (this.parkMallCode === 3) {
  952. const bonusMax =
  953. this.parkFee.parkInfoEntity.integralMaxHour -
  954. this.parkFee.parkInfoEntity.integralUseHour || 0;
  955. if (this.duration >= bonusMax) {
  956. return uni.showToast({
  957. title: `超出抵扣上限,每日最高可抵扣${this.parkFee.parkInfoEntity.integralMaxHour}小时`,
  958. icon: 'none',
  959. });
  960. }
  961. }
  962. // 深圳积分上限控制
  963. if (this.parkMallCode === 5) {
  964. if (this.discountTotalFee >= this.maxonedaydiscountFee) {
  965. return uni.showToast({
  966. title: `超出抵扣上限,每日最高可抵扣${this.parkFee.parkInfoEntity.maxOneDayHour}元`,
  967. icon: 'none',
  968. });
  969. }
  970. if (this.duration >= this.integralMaxMoney) {
  971. return uni.showToast({
  972. title: `超出抵扣上限,每次最高可抵扣${this.integralMaxMoney}元`,
  973. icon: 'none',
  974. });
  975. }
  976. }
  977. if (this.bonus - this.integral >= 0) {
  978. this.bonus -= this.integral;
  979. // 深圳特殊处理(单位:金额)
  980. if (this.parkMallCode === 5) {
  981. this.duration += this.integralToValue;
  982. } else {
  983. this.duration++;
  984. }
  985. } else {
  986. uni.showToast({
  987. title: '积分不足',
  988. icon: 'none',
  989. });
  990. }
  991. // 深圳特殊处理(单位:金额)
  992. if (this.parkMallCode === 5) {
  993. this.bonusfee = this.duration;
  994. } else {
  995. this.bonusfee = this.duration * this.hourMoney;
  996. }
  997. },
  998. // 积分减免弹出
  999. toggle(type) {
  1000. if (
  1001. this.parkFee.parkIntegraltomoneyList &&
  1002. this.parkFee.parkIntegraltomoneyList.length
  1003. ) {
  1004. this.$refs['popup'].open();
  1005. }
  1006. },
  1007. // 跳转纸质优惠
  1008. paperCoupon() {
  1009. this.$router.push({
  1010. path: '/parkingFeePaperCoupon',
  1011. query: {
  1012. parkInfo: this.parkInfo,
  1013. },
  1014. });
  1015. },
  1016. // 电子优惠劵
  1017. coupon() {
  1018. if (!this.couponCount) {
  1019. return uni.showToast({
  1020. title: '暂无可使用的优惠券,请前往积分商城兑换优惠券',
  1021. icon: 'none',
  1022. });
  1023. }
  1024. this.$router.push({
  1025. path: './parkingFeeCoupon',
  1026. });
  1027. },
  1028. // 跳转首停、会员、消费减免页面
  1029. discounts() {
  1030. if (!this.hasDiscount && this.parkMallCode !== 2) {
  1031. return uni.showToast({
  1032. title: '暂无可用优惠',
  1033. icon: 'none',
  1034. });
  1035. }
  1036. this.$router.push({
  1037. path: '/parkingFeeDiscounts',
  1038. });
  1039. },
  1040. // 自动勾选优惠 优先级:会员/消费->电子券->积分
  1041. autoCheckDiscounts() {
  1042. if (!this.parkFee || !this.parkInfo.servicefee) {
  1043. return;
  1044. }
  1045. const serviceFee = this.parkInfo.servicefee / 100; // 应缴费用
  1046. // 自动选取消费减免
  1047. if (
  1048. this.parkFee.parkConsumeReducesEntityList &&
  1049. this.parkFee.parkConsumeReducesEntityList[0] &&
  1050. this.parkFee.parkConsumeReducesEntityList[0].recuceContent
  1051. ) {
  1052. this.autoConsume(serviceFee);
  1053. }
  1054. // 自动选取会员等级减免
  1055. if (
  1056. this.parkFee.parkMemberOrderReducesEntityList &&
  1057. this.parkFee.parkMemberOrderReducesEntityList[0] &&
  1058. this.parkFee.parkMemberOrderReducesEntityList[0].reduceContent
  1059. ) {
  1060. this.autoMember();
  1061. }
  1062. // 自动选取电子券减免
  1063. if (this.couponCount) {
  1064. this.autoCoupon(serviceFee);
  1065. }
  1066. // 自动选取积分减免
  1067. if (this.bonusCopy > this.integral) {
  1068. this.autoBonus(serviceFee);
  1069. }
  1070. },
  1071. // 自动选取消费减免
  1072. autoConsume(serviceFee) {
  1073. let consumeTime =
  1074. +this.parkFee.parkConsumeReducesEntityList[0].recuceContent || 0; // 消费减免时长
  1075. let consumeFee = 0; // 消费减免费用
  1076. const isSplit = this.parkFee.parkInfoEntity.isSplit === 0 ? 0 : 1; // 是否拆分 0: 可拆 1: 不可拆
  1077. const serviceTime = Math.ceil(serviceFee / this.hourMoney); // 停车时长(防止有小数情况向上取整)
  1078. /*************************************************** 静安 ***************************************************/
  1079. if (this.parkMallCode === 0) {
  1080. // 超过上限取上限
  1081. if (consumeTime > this.parkFee.parkInfoEntity.remainReduceTime) {
  1082. consumeTime = this.parkFee.parkInfoEntity.remainReduceTime;
  1083. }
  1084. // 拆分消费减免
  1085. if (isSplit === 0) {
  1086. // 减免时长超出停车时长取停车时长
  1087. if (consumeTime > serviceTime) {
  1088. consumeTime = serviceTime;
  1089. }
  1090. }
  1091. // 消费减免费用
  1092. consumeFee = consumeTime * this.hourMoney;
  1093. }
  1094. /*************************************************** 浦东 ***************************************************/
  1095. if (this.parkMallCode === 1) {
  1096. // 可用消费减免时长上限
  1097. let remainReduceTime = this.parkFee.parkInfoEntity.remainReduceTime;
  1098. if (remainReduceTime > this.parkFee.parkInfoEntity.maxonetimediscount) {
  1099. remainReduceTime = this.parkFee.parkInfoEntity.maxonetimediscount;
  1100. }
  1101. // 超过上限取上限
  1102. if (consumeTime > remainReduceTime) {
  1103. consumeTime = remainReduceTime;
  1104. }
  1105. // 拆分消费减免
  1106. if (isSplit === 0) {
  1107. // 减免时长超出停车时长取停车时长
  1108. if (consumeTime > serviceTime) {
  1109. consumeTime = serviceTime;
  1110. }
  1111. }
  1112. // 消费减免费用
  1113. consumeFee = consumeTime * this.hourMoney;
  1114. }
  1115. /*************************************************** 杭州 ***************************************************/
  1116. if (this.parkMallCode === 2) {
  1117. // 超过上限取上限
  1118. if (consumeTime > this.parkFee.parkInfoEntity.remainReduceTime) {
  1119. consumeTime = this.parkFee.parkInfoEntity.remainReduceTime;
  1120. }
  1121. // 消费减免费用
  1122. consumeFee = consumeTime * this.hourMoney;
  1123. }
  1124. /*************************************************** 沈阳 ***************************************************/
  1125. if (this.parkMallCode === 4) {
  1126. // 超过上限取上限
  1127. if (
  1128. consumeTime >
  1129. this.parkFee.parkInfoEntity.maxOneDayHour -
  1130. this.parkFee.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour
  1131. ) {
  1132. consumeTime =
  1133. this.parkFee.parkInfoEntity.maxOneDayHour -
  1134. this.parkFee.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour;
  1135. }
  1136. // 消费减免费用
  1137. consumeFee = consumeTime * this.hourMoney;
  1138. }
  1139. // 实时显示
  1140. this.checkedTotal++;
  1141. this.discountTotal = {
  1142. memberGradeFee: 0,
  1143. consumeFee: consumeFee,
  1144. useConsumeFee:
  1145. this.parkFee.parkConsumeReducesEntityList[0].consumerLimit,
  1146. time: consumeTime,
  1147. fee: consumeFee,
  1148. };
  1149. // 存入缓存(用于子页面停车优惠画面显示)
  1150. uni.setStorageSync('checkedList', ['reduces']);
  1151. uni.setStorageSync('checkedTotal', this.checkedTotal);
  1152. uni.setStorageSync('discountTotal', this.discountTotal);
  1153. },
  1154. // 自动选取会员等级减免
  1155. autoMember() {
  1156. // 支付金额0 则无需后续减免
  1157. if (!this.actualFee) {
  1158. return;
  1159. }
  1160. const memberGradeTime =
  1161. +this.parkFee.parkMemberOrderReducesEntityList[0].reduceContent || 0; // 会员等级减免时长
  1162. const memberGradeFee = memberGradeTime * this.hourMoney; // 会员等级减免费用
  1163. // 浦东每次超限
  1164. if (this.parkMallCode === 1) {
  1165. // 超出每次减免上限 则无需后续
  1166. if (this.discountTotalFee >= this.maxonetimediscountFee) {
  1167. return;
  1168. }
  1169. }
  1170. // 沈阳(会员等级+消费+电子券)、深圳每日超限
  1171. if (this.parkMallCode === 4 || this.parkMallCode === 5) {
  1172. // 超出每日减免上限 则无需后续
  1173. if (this.discountTotalFee >= this.maxonedaydiscountFee) {
  1174. return;
  1175. }
  1176. }
  1177. // 实时显示
  1178. let checkedList = [];
  1179. if (uni.getStorageSync('discountTotal')) {
  1180. this.discountTotal.memberGradeFee = memberGradeFee;
  1181. this.discountTotal.time += memberGradeTime;
  1182. this.discountTotal.fee += memberGradeFee;
  1183. checkedList = ['reduces', 'member'];
  1184. } else {
  1185. this.discountTotal = {
  1186. memberGradeFee: memberGradeFee,
  1187. consumeFee: 0,
  1188. useConsumeFee: 0,
  1189. time: memberGradeTime,
  1190. fee: memberGradeFee,
  1191. };
  1192. checkedList = ['member'];
  1193. }
  1194. this.checkedTotal++;
  1195. // 存入缓存(用于子页面停车优惠画面显示)
  1196. uni.setStorageSync('checkedList', checkedList);
  1197. uni.setStorageSync('checkedTotal', this.checkedTotal);
  1198. uni.setStorageSync('discountTotal', this.discountTotal);
  1199. },
  1200. // 自动选取电子券减免
  1201. autoCoupon(serviceFee) {
  1202. console.log('查看 actualFee 的状态', this.actualFee)
  1203. // 支付金额0 则无需后续减免
  1204. if (!this.actualFee) {
  1205. return;
  1206. }
  1207. // 浦东 超出每次减免上限 则无需后续
  1208. if (
  1209. this.parkMallCode === 1 &&
  1210. this.discountTotalFee >= this.maxonetimediscountFee
  1211. ) {
  1212. return;
  1213. }
  1214. // 沈阳(会员等级+消费+电子券)、深圳 超出每日减免上限 则无需后续
  1215. if (
  1216. (this.parkMallCode === 4 || this.parkMallCode === 5) &&
  1217. this.discountTotalFee >= this.maxonedaydiscountFee
  1218. ) {
  1219. return;
  1220. }
  1221. // 杭州 超出电子券使用数量上限 则无需后续
  1222. if (
  1223. this.parkMallCode === 2 &&
  1224. this.parkFee.parkInfoEntity.useTicketNum ===
  1225. this.parkFee.parkInfoEntity.couponcodeNum
  1226. ) {
  1227. return;
  1228. }
  1229. const checkedCouponList = []; // 所选电子券
  1230. let couponList = this.parkFee.memberTicketList; // 所有电子券
  1231. let couponFee = 0;
  1232. let couponCode = '';
  1233. // 电子券价值统一转换金额方便后续排序 type 1: 金额 2: 时长
  1234. couponList.forEach((e) => {
  1235. e.disabled = true;
  1236. e.checked = false;
  1237. if (e.carType == '2') {
  1238. e.value = e.parktime * this.hourMoney;
  1239. } else if (e.carType == '1') {
  1240. e.value = e.ticketValue;
  1241. }
  1242. });
  1243. // 电子券按叠加规则分组
  1244. const couponListRule1 = couponList.filter(
  1245. (e) => e.superpositionrule == '1'
  1246. ); // 不可叠加
  1247. const couponListRule2 = couponList.filter(
  1248. (e) => e.superpositionrule == '2'
  1249. ); // 同类型可叠加
  1250. // 电子券按价值排序
  1251. if (couponListRule1 && couponListRule1.length > 1) {
  1252. couponListRule1.sort(compare('value'));
  1253. }
  1254. if (couponListRule2 && couponListRule2.length > 1) {
  1255. couponListRule2.sort(compare('value'));
  1256. }
  1257. // 排序后的全部电子券
  1258. couponList = [...couponListRule1, ...couponListRule2];
  1259. // 如果不可叠加电子券价值大于可叠加总和则使用不可叠加电子券
  1260. let couponListRule1Max = 0;
  1261. if (couponListRule1 && couponListRule1.length) {
  1262. couponListRule1Max = couponListRule1[couponListRule1.length - 1].value;
  1263. }
  1264. let couponListRule2Sum = 0;
  1265. if (couponListRule2 && couponListRule2.length) {
  1266. couponListRule2.forEach((e) => {
  1267. couponListRule2Sum += e.value;
  1268. });
  1269. }
  1270. let isCheckedRule1 = false;
  1271. if (
  1272. couponListRule1Max >= couponListRule2Sum &&
  1273. couponListRule2Sum < serviceFee - this.discountTotalFee
  1274. ) {
  1275. isCheckedRule1 = true;
  1276. }
  1277. // 使用不可叠加电子券
  1278. if (isCheckedRule1 && couponListRule1 && couponListRule1.length) {
  1279. for (let i = 0; i < couponListRule1.length; i++) {
  1280. const coupon = couponListRule1[i];
  1281. const checkedIndex = couponList.findIndex(
  1282. (e) => e.couponCode === coupon.couponCode
  1283. );
  1284. // 浦东每次上限处理
  1285. if (this.parkMallCode === 1) {
  1286. if (
  1287. this.discountTotalFee + coupon.value >
  1288. this.maxonetimediscountFee
  1289. ) {
  1290. couponList[checkedIndex - 1].checked = true;
  1291. couponList[checkedIndex - 1].disabled = false;
  1292. checkedCouponList.push(checkedIndex - 1);
  1293. couponFee += coupon.value;
  1294. couponCode += coupon.couponCode + '#';
  1295. break;
  1296. }
  1297. }
  1298. // 沈阳(会员等级+消费+电子券)、深圳 超出每日减免上限处理
  1299. if (this.parkMallCode === 4 || this.parkMallCode === 5) {
  1300. if (
  1301. this.discountTotalFee + coupon.value >
  1302. this.maxonedaydiscountFee
  1303. ) {
  1304. couponList[checkedIndex - 1].checked = true;
  1305. couponList[checkedIndex - 1].disabled = false;
  1306. checkedCouponList.push(checkedIndex - 1);
  1307. couponFee += coupon.value;
  1308. couponCode += coupon.couponCode + '#';
  1309. break;
  1310. }
  1311. }
  1312. // 若当前减免已经使费用减免为0则跳出循环
  1313. if (coupon.value >= serviceFee - this.discountTotalFee) {
  1314. couponList[checkedIndex].checked = true;
  1315. couponList[checkedIndex].disabled = false;
  1316. checkedCouponList.push(checkedIndex);
  1317. couponFee += coupon.value;
  1318. couponCode += coupon.couponCode + '#';
  1319. break;
  1320. }
  1321. // 循环到最后一张券
  1322. if (i === couponListRule1.length - 1) {
  1323. couponList[checkedIndex].checked = true;
  1324. couponList[checkedIndex].disabled = false;
  1325. checkedCouponList.push(checkedIndex);
  1326. couponFee += coupon.value;
  1327. couponCode += coupon.couponCode + '#';
  1328. }
  1329. }
  1330. }
  1331. // 未使用规则1的电子券则继续
  1332. if (!isCheckedRule1 && couponListRule2 && couponListRule2.length) {
  1333. // 使用同类型可叠加电子券
  1334. let sum = 0; // 电子券价值累加
  1335. for (const coupon of couponListRule2) {
  1336. sum += coupon.value;
  1337. // 浦东每次上限处理
  1338. if (
  1339. this.parkMallCode === 1 &&
  1340. this.discountTotalFee + sum > this.maxonetimediscountFee
  1341. ) {
  1342. break;
  1343. }
  1344. // 沈阳(会员等级+消费+电子券)、深圳每日上限处理
  1345. if (
  1346. (this.parkMallCode === 4 || this.parkMallCode === 5) &&
  1347. this.discountTotalFee + sum > this.maxonedaydiscountFee
  1348. ) {
  1349. break;
  1350. }
  1351. const checkedIndex = couponList.findIndex(
  1352. (e) => e.couponCode === coupon.couponCode
  1353. );
  1354. couponList[checkedIndex].checked = true;
  1355. couponList[checkedIndex].disabled = false;
  1356. checkedCouponList.push(checkedIndex);
  1357. couponFee = sum;
  1358. couponCode += coupon.couponCode + '#';
  1359. // 杭州电子券使用数量上限处理
  1360. if (
  1361. this.parkMallCode === 2 &&
  1362. checkedCouponList.length ===
  1363. this.parkFee.parkInfoEntity.useTicketNum -
  1364. this.parkFee.parkInfoEntity.couponcodeNum
  1365. ) {
  1366. break;
  1367. }
  1368. // 若当前减免已经使费用减免为0则跳出循环
  1369. if (sum >= serviceFee - this.discountTotalFee) {
  1370. break;
  1371. }
  1372. }
  1373. }
  1374. // 实时显示
  1375. if (couponCode.lastIndexOf('#') === couponCode.length - 1) {
  1376. couponCode = couponCode.slice(0, couponCode.length - 1);
  1377. }
  1378. this.couponInfo = {
  1379. couponfee: couponFee,
  1380. couponcode: couponCode,
  1381. };
  1382. this.checkedCouponCount = checkedCouponList.length;
  1383. // 存入缓存(用于子页面停车优惠画面显示)
  1384. console.log('将 checkedCouponList 写入缓存----》')
  1385. uni.setStorageSync('checkedCouponList', checkedCouponList);
  1386. uni.setStorageSync('list', couponList);
  1387. uni.setStorageSync('couponInfo', this.couponInfo);
  1388. },
  1389. // 自动选取积分减免
  1390. autoBonus(serviceFee) {
  1391. // 支付金额0 则无需后续减免
  1392. if (!this.actualFee) {
  1393. return;
  1394. }
  1395. // 浦东 超出每次减免上限 则无需后续
  1396. if (
  1397. this.parkMallCode === 1 &&
  1398. this.discountTotalFee >= this.maxonetimediscountFee
  1399. ) {
  1400. return;
  1401. }
  1402. // 深圳积分特殊处理(金额计算) 其它停车场小时计算
  1403. if (this.parkMallCode === 5) {
  1404. if (this.discountTotalFee >= this.maxonedaydiscountFee) {
  1405. return;
  1406. }
  1407. let bonus = this.bonus;
  1408. // 剩余可减免金额
  1409. const remainDiscountFee =
  1410. this.maxonedaydiscountFee - this.discountTotalFee;
  1411. // 剩余停车金额
  1412. let remainFee = serviceFee - this.discountTotalFee;
  1413. if (remainFee > remainDiscountFee) {
  1414. remainFee = remainDiscountFee;
  1415. }
  1416. let bonusAll = (remainFee * this.integral) / this.integralToValue; // 全部减免所需积分
  1417. if (bonusAll < this.integral) {
  1418. bonusAll = this.integral;
  1419. }
  1420. // 取余
  1421. const remainBonus = bonusAll % this.integral;
  1422. const remainMyBonus = this.bonus % this.integral;
  1423. // 如果有余数 做倍数处理
  1424. if (remainBonus) {
  1425. bonusAll = bonusAll - remainBonus + this.integral;
  1426. }
  1427. if (remainMyBonus) {
  1428. bonus = this.bonus - remainMyBonus;
  1429. }
  1430. if (bonus <= bonusAll) {
  1431. // 积分可兑换多少金额 小数向下取整
  1432. this.duration = Math.floor(
  1433. (bonus * this.integralToValue) / this.integral
  1434. );
  1435. } else {
  1436. this.duration = (bonusAll * this.integralToValue) / this.integral;
  1437. }
  1438. if (this.duration > this.integralMaxMoney) {
  1439. this.duration = this.integralMaxMoney;
  1440. }
  1441. } else {
  1442. // 剩余停车时长(有小数情况因此向上取整)
  1443. const serviceTime = Math.ceil(
  1444. (serviceFee - this.discountTotalFee) / this.hourMoney
  1445. );
  1446. const bonusAll = serviceTime * this.integral; // 全部减免所需积分
  1447. if (this.bonus <= bonusAll) {
  1448. // 积分不够兑换整小时 向下取整
  1449. this.duration = Math.floor(this.bonus / this.integral);
  1450. } else {
  1451. this.duration = serviceTime;
  1452. }
  1453. }
  1454. // 浦东每次减免上限处理
  1455. if (this.parkMallCode === 1) {
  1456. const bonusMax = Math.floor(
  1457. (this.maxonetimediscountFee - this.discountTotalFee) / this.hourMoney
  1458. );
  1459. if (this.duration > bonusMax) {
  1460. this.duration = bonusMax;
  1461. }
  1462. }
  1463. // 北京积分减免每日上限处理
  1464. if (this.parkMallCode === 3) {
  1465. const bonusMax =
  1466. this.parkFee.parkInfoEntity.integralMaxHour -
  1467. this.parkFee.parkInfoEntity.integralUseHour || 0;
  1468. if (this.duration > bonusMax) {
  1469. this.duration = bonusMax;
  1470. }
  1471. }
  1472. // 深圳特殊处理(单位:金额)
  1473. if (this.parkMallCode === 5) {
  1474. this.bonus -= (this.duration * this.integral) / this.integralToValue;
  1475. this.bonusfee = this.duration;
  1476. } else {
  1477. this.bonus -= this.duration * this.integral;
  1478. this.bonusfee = this.duration * this.hourMoney;
  1479. }
  1480. this.durationCopy = this.duration;
  1481. this.bonusCopy = this.bonus;
  1482. },
  1483. // 节流函数
  1484. throttle(fc, waitTime = 1500, imme = true) {
  1485. if (imme) {
  1486. if (!this.flag) {
  1487. this.flag = true;
  1488. typeof fc === 'function' && fc();
  1489. this.timer = setTimeout(() => {
  1490. this.flag = false;
  1491. }, waitTime);
  1492. }
  1493. } else {
  1494. if (!this.flag) {
  1495. this.flag = true;
  1496. this.timer = setTimeout(() => {
  1497. this.flag = false;
  1498. typeof fc === 'function' && fc();
  1499. }, waitTime);
  1500. }
  1501. }
  1502. },
  1503. // 支付前
  1504. toPay() {
  1505. this.throttle(() => {
  1506. // 北京特殊处理
  1507. if (this.parkMallCode === 3 && this.discountTotalFee) {
  1508. return uni.showModal({
  1509. title: '提示',
  1510. content: '请确认是否使用优惠,确认后无法返还!',
  1511. success: (res) => {
  1512. if (res.confirm) {
  1513. this.goPay();
  1514. }
  1515. },
  1516. });
  1517. }
  1518. this.goPay();
  1519. }, 3000);
  1520. },
  1521. // 支付
  1522. goPay() {
  1523. console.log(159515951595, this.$kipAppId)
  1524. // this.kerryPayment()
  1525. // return
  1526. // console.log(1580, this.parkMallCode);
  1527. // window.toWXSendMsg({
  1528. // type: 'openWxPay',
  1529. // options: { title: '1589', mask: true },
  1530. // });
  1531. // window.subscribe('wxPayOver',(options) =>{
  1532. // console.log(1596, options)
  1533. // })
  1534. // if (
  1535. // !this.parkInfo.servicefee ||
  1536. // (this.member && !this.parkFee.parkInfoEntity)
  1537. // ) {
  1538. // return;
  1539. // }
  1540. uni.showLoading({
  1541. title: '加载中',
  1542. });
  1543. let bonus = this.duration * this.integral;
  1544. // 深圳特殊处理(单位:金额)
  1545. if (this.parkMallCode === 5) {
  1546. bonus = (this.duration * this.integral) / this.integralToValue;
  1547. }
  1548. // const openId = MemberCacheTool.getOpenId(app);
  1549. // const openId = 'oIUfO5QBRfEmnaqj7To0C4_0JUTA';
  1550. const openId = this.openId;
  1551. console.log(1614, this.actualFee);
  1552. const params = {
  1553. carno: this.parkInfo.carno,
  1554. mallid: this.mallid,
  1555. groupId: this.groupId,
  1556. openId: openId,
  1557. vipcode: this.member?.vipcode || uni.getStorageSync('member')?.vipcode,
  1558. createuser: 'sys_miniprogram',
  1559. orderno: this.parkInfo.orderno || '7719219221312412c21v3218u',
  1560. bonusfee: this.bonusfee * 100,
  1561. bonus: bonus,
  1562. couponfee: this.couponInfo.couponfee * 100 || 0,
  1563. couponfeeMin: (this.couponInfo.couponfee / this.hourMoney) * 60 || 0,
  1564. couponcode: this.couponInfo.couponcode,
  1565. paperCoupons: JSON.stringify(this.paperCouponInfo.paperCouponList), // 纸质优惠券券码 多个以#分割
  1566. paperCouponCode: this.paperCouponInfo.paperCouponcode, // 纸质优惠券券码 多个以#分割
  1567. paperCouponFee: this.paperCouponInfo.paperDiscountFee * 100 || 0, // 纸质优惠券优惠金额,单位:分
  1568. paperCouponFeeMin:
  1569. parseInt(this.paperCouponInfo.paperDiscountTime * 60) || 0, // 纸质优惠券优惠时长,单位:分钟
  1570. bonusFeeMin: this.duration * 60, // 积分抵扣时长,单位:分钟
  1571. consumeFeeMin:
  1572. (this.discountTotal.consumeFee / this.hourMoney) * 60 || 0, // 消费减免时长,单位:分钟
  1573. firstParkFeeMin:
  1574. (this.discountTotal.firstParkFee / this.hourMoney) * 60 || 0, // 首停减免时长 单位 分钟
  1575. memberGradeFeeMin:
  1576. (this.discountTotal.memberGradeFee / this.hourMoney) * 60 || 0, // 会员等级减免时长,单位:分钟
  1577. consumeFee: this.discountTotal.consumeFee * 100 || 0,
  1578. consumeFeeHour: this.discountTotal.consumeFee / this.hourMoney || 0,
  1579. useConsumeFee:
  1580. this.parkMallCode === 3 ? '0.0' : this.discountTotal.useConsumeFee,
  1581. memberGradeFee: this.discountTotal.memberGradeFee * 100 || 0,
  1582. memberGradeFeeHour:
  1583. this.discountTotal.memberGradeFee / this.hourMoney || 0,
  1584. firstParkFee: this.discountTotal.firstParkFee * 100 || 0,
  1585. usetotalfee:
  1586. ((this.discountTotal.memberGradeFee || 0) +
  1587. (this.discountTotal.consumeFee || 0) +
  1588. this.bonusfee +
  1589. (this.couponInfo.couponfee || 0) +
  1590. (this.paperCouponInfo.paperDiscountFee || 0)) *
  1591. 100,
  1592. payfee: parseFloat((this.actualFee * 100).toFixed(2)),
  1593. totalfee:
  1594. this.discountTotalFee * 100 < this.parkInfo.servicefee
  1595. ? this.discountTotalFee * 100
  1596. : this.parkInfo.servicefee,
  1597. paytype: this.actualFee > 0 ? 3 : 1,
  1598. projectId: this.projectId,
  1599. };
  1600. console.log(1663, this.actualFee);
  1601. let path =
  1602. this.actualFee > 0
  1603. ? 'api/1.0/park/weixinPay'
  1604. : 'api/1.0/park/notWeixinPay';
  1605. // 北京特殊处理
  1606. if (this.parkMallCode === 3) {
  1607. path = 'api/1.0/park/dealParkOrderBj';
  1608. }
  1609. this.$md(params);
  1610. console.log(165516551655, this.actualFee);
  1611. console.log(1654, this.$baseURL + path);
  1612. this.$request({
  1613. url: this.$baseURL + path,
  1614. data: params,
  1615. method: 'POST',
  1616. header: JSON.parse(uni.getStorageSync('handleUser')),
  1617. })
  1618. .then((res) => {
  1619. uni.hideLoading();
  1620. if (res.data.code === 0) {
  1621. // 北京特殊处理
  1622. if (this.parkMallCode === 3 && false) {
  1623. if (!res.data.data.syncId) {
  1624. uni.showToast({
  1625. title: '缴费成功',
  1626. icon: 'none',
  1627. });
  1628. this.$router.back();
  1629. return;
  1630. }
  1631. console.log(this.bindflag, 'bindflag');
  1632. const accountInfo = uni.getAccountInfoSync();
  1633. const {
  1634. miniProgram: { envVersion },
  1635. } = accountInfo;
  1636. if (this.bindflag === 0) {
  1637. uni.navigateToMiniProgram({
  1638. appId: 'wx192b7d2e8dcbefd0',
  1639. path: this.$etcpAppPath,
  1640. extraData: {
  1641. params: {
  1642. token: res.data.data.token,
  1643. syncId: res.data.data.syncId,
  1644. payType: 6,
  1645. CarNumber: res.data.data.CarNumber,
  1646. actionId: 1,
  1647. payAcType: 2,
  1648. },
  1649. },
  1650. envVersion: 'trial',
  1651. success: (res) => {
  1652. console.log(res);
  1653. this.$router.back();
  1654. },
  1655. });
  1656. } else if (this.bindflag === 1) {
  1657. uni.navigateToMiniProgram({
  1658. appId: 'wx192b7d2e8dcbefd0',
  1659. path: this.$etcpAppPath,
  1660. extraData: {
  1661. params: {
  1662. token: res.data.data.token,
  1663. syncId: res.data.data.syncId,
  1664. payType: 6,
  1665. CarNumber: res.data.data.CarNumber,
  1666. actionId: 1,
  1667. },
  1668. },
  1669. envVersion: 'trial',
  1670. success: (res) => {
  1671. console.log(res);
  1672. this.$router.back();
  1673. },
  1674. });
  1675. }
  1676. return;
  1677. }
  1678. console.log(17211721172117211721);
  1679. if (this.actualFee > 0) {
  1680. // 微信支付
  1681. this.kerryPayment(res.data.data, params);
  1682. } else {
  1683. // 埋点位置
  1684. this.sensorsClick('$ClickParkingPay', {
  1685. car_no: params.carno,
  1686. pay_fee: params.payfee,
  1687. total_fee: params.totalfee,
  1688. redirect_path: 'pages/parkingFee/parkingFeeSuccess',
  1689. });
  1690. this.$router.replace({
  1691. path: './parkingFeeSuccess?carno=' + this.parkInfo.carno,
  1692. });
  1693. }
  1694. } else {
  1695. uni.showModal({
  1696. showCancel: false,
  1697. title: '提示',
  1698. content: res.data.msg,
  1699. complete: (r) => {
  1700. // uni.navigateBack({})
  1701. this.createParkOrder();
  1702. },
  1703. });
  1704. }
  1705. })
  1706. .catch((err) => {
  1707. console.log(err);
  1708. uni.hideLoading();
  1709. uni.showToast({
  1710. title: JSON.stringify(err),
  1711. icon: 'none',
  1712. });
  1713. });
  1714. },
  1715. // 埋点方法
  1716. sensorsClick(eventName, params) {
  1717. let optionsQuery = uni.getStorageSync('options_query');
  1718. let fixedParams = {
  1719. cta_itemno: '',
  1720. cta_name: '',
  1721. previous_path: this.preUrl || '',
  1722. // 原previous_path: uni.getStorageSync('previousUrl') || ''
  1723. // previous_path: 使用sdk预置参数$referrer,
  1724. $brand_id: uni.getStorageSync('groupId'),
  1725. $location: uni.getStorageSync('mallid'),
  1726. $channel: optionsQuery.channel || '',
  1727. // $utm_lbs: this.optionsQuery.utm_lbs || '',
  1728. $utm_channel: optionsQuery.utm_channel || '',
  1729. $utm_method: optionsQuery.utm_method || '',
  1730. $utm_source: optionsQuery.utm_source || '',
  1731. $utm_function: optionsQuery.utm_function || '',
  1732. $utm_user: optionsQuery.utm_user || '',
  1733. },
  1734. finalParams = Object.assign(fixedParams, params);
  1735. this.$sensors.track(eventName, finalParams);
  1736. },
  1737. // 嘉里第三方支付接口
  1738. kerryPayment(session='011cad54-735f-4e92-8f1b-f22bdfe073cd', payParams) {
  1739. // window.toWXSendMsg({
  1740. // type: 'openWxPay',
  1741. // options: {
  1742. // session
  1743. // },
  1744. // });
  1745. // return
  1746. console.log(1782, 1782, 1782, session, payParams);
  1747. const openId = MemberCacheTool.getOpenId(app);
  1748. // const appId = uni.getAccountInfoSync().miniProgram.appId;
  1749. // const appId = 'wx192b7d2e8dcbefd0';
  1750. // const appId = 'wxd830fe4d1e04988e';
  1751. const appId = 'wx92c3e55fbef6b2af';
  1752. const params = {
  1753. region: 'cn',
  1754. payChannel: 'MINI_PROGRAM',
  1755. payOption: 'WECHATPAY',
  1756. appId: appId,
  1757. // openId: openId,
  1758. openId: this.openId
  1759. };
  1760. this.$md(params);
  1761. // let path =
  1762. // this.$kipPaymentUrl + 'services/session/' + session + '/transactions';
  1763. // https://qa-payment.kerryplus.com/services/session/7c6a199a-fbcb-48b0-a9c1-b325c2c9bf88/transactions
  1764. // let path = 'kipPaymentUrl/services/session/' + session + '/transactions';
  1765. let path = `/qaPayment/services/session/${session}/transactions`
  1766. this.$request({
  1767. // url: this.$baseURL + `services/session/${session}/transactions`,
  1768. url: path,
  1769. data: params,
  1770. method: 'POST',
  1771. header: JSON.parse(uni.getStorageSync('handleUser')),
  1772. })
  1773. .then((res) => {
  1774. console.log(res);
  1775. if (res.data?.code == '000000') {
  1776. const prepayJson = res.data.data.params;
  1777. window.toWXSendMsg({
  1778. type: 'openWxPay',
  1779. options: {
  1780. provider: 'wxpay',
  1781. timeStamp: prepayJson.timeStamp,
  1782. nonceStr: prepayJson.nonceStr,
  1783. package: prepayJson.package,
  1784. signType: prepayJson.signType,
  1785. paySign: prepayJson.paySign,
  1786. },
  1787. });
  1788. window.subscribe('wxPayOver', (options) => {
  1789. console.log(1596, options);
  1790. });
  1791. return;
  1792. // 微信支付接口
  1793. // uni.requestPayment({
  1794. // provider: 'wxpay',
  1795. // timeStamp: prepayJson.timeStamp,
  1796. // nonceStr: prepayJson.nonceStr,
  1797. // package: prepayJson.package,
  1798. // signType: prepayJson.signType,
  1799. // paySign: prepayJson.paySign,
  1800. // success: () => {
  1801. // uni.showModal({
  1802. // showCancel: false,
  1803. // title: '提示',
  1804. // content: '支付成功',
  1805. // complete: () => {
  1806. // this.sensorsClick('$ClickParkingPay', {
  1807. // car_no: payParams.carno,
  1808. // pay_fee: payParams.payfee,
  1809. // total_fee: payParams.totalfee,
  1810. // redirect_path: 'pages/parkingFee/parkingFeeSuccess',
  1811. // });
  1812. // this.$router.replace({
  1813. // path: './parkingFeeSuccess?carno=' + this.parkInfo.carno,
  1814. // });
  1815. // },
  1816. // });
  1817. // },
  1818. // fail: () => {
  1819. // this.failedParkOrder();
  1820. // },
  1821. // });
  1822. } else {
  1823. this.failedParkOrder();
  1824. }
  1825. })
  1826. .catch((err) => {
  1827. console.log(err);
  1828. this.failedParkOrder();
  1829. });
  1830. },
  1831. // 支付失败弹框 重新创建订单
  1832. reCreateParkOrder() {
  1833. uni.showModal({
  1834. showCancel: false,
  1835. title: '提示',
  1836. content: '支付失败',
  1837. complete: (r) => {
  1838. this.createParkOrder();
  1839. },
  1840. });
  1841. },
  1842. // 支付失败后返还优惠券
  1843. failedParkOrder() {
  1844. const param = {
  1845. orderno: this.parkInfo.orderno,
  1846. };
  1847. this.$md(param);
  1848. this.$request({
  1849. path: this.$baseURL + 'api/1.0/park/failedParkOrder',
  1850. data: param,
  1851. method: 'POST',
  1852. header: JSON.parse(uni.getStorageSync('handleUser')),
  1853. })
  1854. .then((res) => {
  1855. this.reCreateParkOrder();
  1856. })
  1857. .catch((err) => {
  1858. this.reCreateParkOrder();
  1859. });
  1860. },
  1861. //缴费说明隐藏显示
  1862. togglePayinstruction() {
  1863. this.isShow = !this.isShow;
  1864. }
  1865. },
  1866. };
  1867. </script>
  1868. <style lang="less" scoped>
  1869. .scroll-Y {
  1870. width: 100%;
  1871. display: flex;
  1872. flex-direction: column;
  1873. height: 100vh;
  1874. background: #f2f2f2;
  1875. //padding-bottom: 20px;
  1876. }
  1877. .wrap {
  1878. display: flex;
  1879. flex-direction: column;
  1880. width: 100%;
  1881. .parkingFee {
  1882. display: flex;
  1883. flex-direction: column;
  1884. .parkingFee-top {
  1885. display: flex;
  1886. flex-direction: column;
  1887. background: #c69c6d;
  1888. .top_content {
  1889. padding: 35px;
  1890. box-sizing: border-box;
  1891. display: flex;
  1892. flex-direction: column;
  1893. span {
  1894. font-size: 24px;
  1895. color: #fff;
  1896. text-align: left;
  1897. }
  1898. .title_box {
  1899. display: flex;
  1900. align-items: center;
  1901. justify-content: space-between;
  1902. margin-bottom: 30px;
  1903. .btn {
  1904. padding: 8px 14px;
  1905. box-sizing: border-box;
  1906. color: #c69c6d;
  1907. background: #fff;
  1908. border-radius: 20px;
  1909. text-align: center;
  1910. }
  1911. }
  1912. }
  1913. .top_menu {
  1914. background: #fff;
  1915. padding: 30px 0;
  1916. box-sizing: border-box;
  1917. display: flex;
  1918. justify-content: space-between;
  1919. border-radius: 15px 15px 0 0;
  1920. .menu_item {
  1921. display: flex;
  1922. flex-direction: column;
  1923. align-items: center;
  1924. width: 33.3%;
  1925. img {
  1926. width: 102px;
  1927. height: 102px;
  1928. }
  1929. span {
  1930. font-size: 24px;
  1931. margin-top: 24px;
  1932. }
  1933. }
  1934. }
  1935. }
  1936. .parkingFee-bottom {
  1937. width: 100%;
  1938. display: flex;
  1939. flex-direction: column;
  1940. padding: 14px 25px;
  1941. box-sizing: border-box;
  1942. // 车牌号查询
  1943. .parkingFee-search {
  1944. width: 100%;
  1945. display: flex;
  1946. flex-direction: column;
  1947. background: #fff;
  1948. border-radius: 24px;
  1949. padding: 26px 25px 20px;
  1950. box-sizing: border-box;
  1951. .search_tip {
  1952. color: #999;
  1953. font-size: 24px;
  1954. text-align: center;
  1955. }
  1956. .searchPrice {
  1957. margin: 0 auto;
  1958. width: 40%;
  1959. height: 60px;
  1960. line-height: 60px;
  1961. border-radius: 20px;
  1962. }
  1963. }
  1964. .search-list {
  1965. display: flex;
  1966. flex-direction: column;
  1967. background: #fff;
  1968. padding: 0 30px;
  1969. box-sizing: border-box;
  1970. margin-top: 20px;
  1971. border-radius: 24px;
  1972. width: 100%;
  1973. .list_item {
  1974. padding: 38px 0;
  1975. box-sizing: border-box;
  1976. display: flex;
  1977. align-items: center;
  1978. justify-content: space-between;
  1979. border-bottom: 1px solid #f2f2f2;
  1980. span {
  1981. font-size: 28px;
  1982. }
  1983. button {
  1984. height: 60px;
  1985. line-height: 60px;
  1986. margin: 0;
  1987. }
  1988. }
  1989. }
  1990. }
  1991. }
  1992. }
  1993. // 缴费说明
  1994. .payInstruct_wrap {
  1995. width: 300px;
  1996. margin: 0 auto;
  1997. display: flex;
  1998. flex-direction: column;
  1999. background: #fff;
  2000. border-radius: 20px;
  2001. .scroll {
  2002. height: 600px;
  2003. display: flex;
  2004. flex-direction: column;
  2005. padding: 20px;
  2006. box-sizing: border-box;
  2007. .payInstruct_title {
  2008. font-size: 30px;
  2009. text-align: center;
  2010. padding: 20px 0;
  2011. box-sizing: border-box;
  2012. border-bottom: 1px solid #f2f2f2;
  2013. }
  2014. .payInstruct_con {
  2015. display: flex;
  2016. width: 100%;
  2017. padding: 20px 10px;
  2018. box-sizing: border-box;
  2019. span {
  2020. font-size: 28px;
  2021. color: #999;
  2022. }
  2023. }
  2024. }
  2025. }
  2026. // 车牌号 & 虚拟键盘
  2027. .input-box {
  2028. width: 100%;
  2029. height: 70px;
  2030. margin: auto;
  2031. background: rgba(255, 255, 255, 1);
  2032. box-shadow: 0px 6px 8px 0px rgba(96, 100, 112, 0.1);
  2033. border-radius: 0.4rem;
  2034. margin: 1rem auto;
  2035. display: flex;
  2036. justify-content: center;
  2037. .li {
  2038. flex: 1;
  2039. border: 1px solid rgba(206, 208, 210, 1);
  2040. box-sizing: border-box;
  2041. margin: 0 2px;
  2042. font-size: 30px;
  2043. display: flex;
  2044. align-items: center;
  2045. justify-content: center;
  2046. color: #323233;
  2047. img {
  2048. width: 80%;
  2049. height: 100%;
  2050. }
  2051. &.active {
  2052. border-color: #3e67ff;
  2053. }
  2054. &:nth-child(2) {
  2055. margin-right: 26px;
  2056. }
  2057. }
  2058. }
  2059. .class-van-button-small {
  2060. min-width: 0;
  2061. border-radius: 10px;
  2062. margin: 10px 3px;
  2063. box-shadow: 10px 10px 10px #aaa;
  2064. }
  2065. .class-plate-box {
  2066. width: 100%;
  2067. padding: 24px 0;
  2068. box-sizing: border-box;
  2069. position: relative;
  2070. }
  2071. .plate_number {
  2072. width: 100%;
  2073. display: flex;
  2074. flex-direction: column;
  2075. .plate_number_wrap {
  2076. width: 100%;
  2077. display: flex;
  2078. flex-direction: column;
  2079. background: #eaf1f9;
  2080. padding: 0 0 10px;
  2081. box-sizing: border-box;
  2082. .close-box {
  2083. width: 100%;
  2084. font-size: 24px;
  2085. color: #3e67ff;
  2086. text-align: right;
  2087. margin-right: 1.25rem;
  2088. div {
  2089. padding: 10px;
  2090. }
  2091. }
  2092. .plate_chinese_box {
  2093. width: 100%;
  2094. display: flex;
  2095. flex-wrap: wrap;
  2096. justify-content: center;
  2097. button {
  2098. width: 9%;
  2099. height: 2.5rem;
  2100. line-height: 2.5rem;
  2101. text-align: center;
  2102. padding: 0;
  2103. font-size: 28px;
  2104. .class-van-button-small;
  2105. }
  2106. }
  2107. }
  2108. }
  2109. .allBoard {
  2110. width: 100%;
  2111. display: flex;
  2112. flex-direction: column;
  2113. .allBoard_wrap {
  2114. width: 100%;
  2115. display: flex;
  2116. flex-direction: column;
  2117. background: #eaf1f9;
  2118. padding: 0 0 10px;
  2119. box-sizing: border-box;
  2120. }
  2121. .close-box {
  2122. padding-top: 22px;
  2123. box-sizing: border-box;
  2124. font-size: 24px;
  2125. color: #3e67ff;
  2126. text-align: right;
  2127. margin-right: 1.25rem;
  2128. }
  2129. .plate_number_box {
  2130. width: 100%;
  2131. display: flex;
  2132. flex-wrap: wrap;
  2133. justify-content: center;
  2134. button {
  2135. width: 9%;
  2136. height: 2.5rem;
  2137. line-height: 2.5rem;
  2138. text-align: center;
  2139. padding: 0;
  2140. font-size: 28px;
  2141. .class-van-button-small;
  2142. }
  2143. }
  2144. }
  2145. .vehicleMgt-list {
  2146. display: flex;
  2147. flex-direction: column;
  2148. margin-bottom: 35px;
  2149. .vehicleMgt-title {
  2150. display: flex;
  2151. padding: 30px;
  2152. box-sizing: border-box;
  2153. border-bottom: 1px solid #f2f2f2;
  2154. span {
  2155. font-size: 28px;
  2156. }
  2157. }
  2158. .vehicleMgt-content {
  2159. display: flex;
  2160. flex-direction: column;
  2161. background: #fff;
  2162. .item {
  2163. display: flex;
  2164. align-items: center;
  2165. justify-content: space-between;
  2166. padding: 15px 36px;
  2167. box-sizing: border-box;
  2168. border-bottom: 1px solid #f2f2f2;
  2169. span {
  2170. font-size: 28px;
  2171. }
  2172. }
  2173. }
  2174. }
  2175. .delBtn {
  2176. color: #c69c6d;
  2177. height: 38px;
  2178. line-height: 38px;
  2179. font-size: 20px;
  2180. width: 124px;
  2181. border: 1px solid #c69c6d;
  2182. border-radius: 19px;
  2183. text-align: center;
  2184. }
  2185. .payThe {
  2186. width: 100%;
  2187. .pay_index {
  2188. text-align: center;
  2189. padding: 20px 0;
  2190. font-size: 20px;
  2191. margin-bottom: 5px;
  2192. background-color: #fff;
  2193. font-weight: 600;
  2194. }
  2195. .pay_title {
  2196. display: flex;
  2197. justify-content: space-between;
  2198. background-color: #fff;
  2199. border-bottom: 1px solid #eee;
  2200. padding: 15px 30px;
  2201. .title {
  2202. font-size: 16px;
  2203. }
  2204. .dk_desc {
  2205. font-size: 12px;
  2206. color: #999;
  2207. margin-top: 3px;
  2208. }
  2209. .value {
  2210. font-size: 14px;
  2211. color: #999;
  2212. }
  2213. }
  2214. .payjf {
  2215. font-size: 12px;
  2216. color: #999;
  2217. margin-right: 18px;
  2218. margin-top: 12px;
  2219. }
  2220. .paySelect {
  2221. color: rgba(16, 16, 16, 100);
  2222. font-size: 20px;
  2223. font-family: Arial;
  2224. border: 1px solid rgba(187, 187, 187, 100);
  2225. border-radius: 10px;
  2226. margin-left: 80px;
  2227. width: 260px;
  2228. height: 80px;
  2229. }
  2230. .paySelect1 {
  2231. color: rgba(16, 16, 16, 100);
  2232. font-size: 20px;
  2233. font-family: Arial;
  2234. border: 1px solid rgba(187, 187, 187, 100);
  2235. width: 200px;
  2236. height: 50px;
  2237. display: flex;
  2238. align-items: center;
  2239. justify-content: space-between;
  2240. background-color: #f2f2f2;
  2241. margin-top: 5px;
  2242. .pay-se-l {
  2243. height: 50px;
  2244. width: 50px;
  2245. line-height: 50px;
  2246. text-align: center;
  2247. font-size: 50px;
  2248. background-color: #fff;
  2249. }
  2250. }
  2251. .payjfzk {
  2252. font-size: 20px;
  2253. color: #8b8c8b;
  2254. margin-top: 10px;
  2255. margin-left: 210px;
  2256. }
  2257. .pay_time {
  2258. font-size: 28px;
  2259. margin-left: 180px;
  2260. padding-bottom: 40px;
  2261. }
  2262. .pay_time1 {
  2263. margin-top: 26px;
  2264. }
  2265. }
  2266. .pay_jiaof {
  2267. width: 80%;
  2268. height: 70px;
  2269. line-height: 70px;
  2270. background-color: #c69c6d;
  2271. text-align: center;
  2272. color: rgba(255, 255, 255, 100);
  2273. font-size: 28px;
  2274. font-family: Microsoft Yahei;
  2275. border-radius: 10px;
  2276. margin: 20px auto;
  2277. }
  2278. // 停车券弹窗
  2279. .ticketPopup {
  2280. display: flex;
  2281. flex-direction: column;
  2282. background: #fff;
  2283. border-radius: 20px 20px 0 0;
  2284. z-index: 999;
  2285. .popup-title {
  2286. display: flex;
  2287. justify-content: center;
  2288. align-items: center;
  2289. padding: 30px 42px;
  2290. box-sizing: border-box;
  2291. border-bottom: 1px solid #f2f2f2;
  2292. position: relative;
  2293. span {
  2294. color: #999;
  2295. font-size: 28px;
  2296. }
  2297. .useRule-text {
  2298. position: absolute;
  2299. right: 42px;
  2300. color: rgb(58, 130, 248);
  2301. }
  2302. }
  2303. .popup_scroll {
  2304. height: 70vh;
  2305. background: #f2f2f2;
  2306. }
  2307. .popup_content {
  2308. width: 100%;
  2309. height: 100%;
  2310. display: flex;
  2311. flex-direction: column;
  2312. padding: 10px 20px;
  2313. box-sizing: border-box;
  2314. .item {
  2315. display: flex;
  2316. margin-bottom: 16px;
  2317. .item-image {
  2318. border: 2px solid #f2f2f2;
  2319. border-right: 2px dashed #f2f2f2;
  2320. padding: 16px;
  2321. border-radius: 16px 0 0 16px;
  2322. box-sizing: border-box;
  2323. display: flex;
  2324. align-items: center;
  2325. justify-content: center;
  2326. background: #fff;
  2327. &.cro {
  2328. position: relative;
  2329. }
  2330. .img {
  2331. width: 130px;
  2332. height: 130px;
  2333. border-radius: 8px;
  2334. img {
  2335. width: 100%;
  2336. height: 100%;
  2337. }
  2338. }
  2339. }
  2340. .item-content {
  2341. flex: 1;
  2342. border: 2px solid #f2f2f2;
  2343. border-radius: 0 8px 8px 0;
  2344. padding: 16px;
  2345. box-sizing: border-box;
  2346. background: #fff;
  2347. display: flex;
  2348. position: relative;
  2349. &.cro_ {
  2350. position: relative;
  2351. }
  2352. .content {
  2353. display: flex;
  2354. flex-direction: column;
  2355. justify-content: center;
  2356. flex: 1;
  2357. .h3 {
  2358. font-size: 28px;
  2359. line-height: 48px;
  2360. font-weight: 600;
  2361. }
  2362. .h3.color_disabled {
  2363. color: #838181;
  2364. font-weight: 400;
  2365. }
  2366. .span {
  2367. font-size: 24px;
  2368. color: #838181;
  2369. line-height: 40px;
  2370. }
  2371. }
  2372. .erwm_box {
  2373. display: flex;
  2374. flex-direction: column;
  2375. align-items: flex-end;
  2376. justify-content: space-between;
  2377. img {
  2378. width: 52px;
  2379. height: 52px;
  2380. }
  2381. .tag {
  2382. position: absolute;
  2383. bottom: 0;
  2384. right: 0;
  2385. border-radius: 16px;
  2386. padding: 5px 10px;
  2387. box-sizing: border-box;
  2388. background: #f7931e;
  2389. text-align: center;
  2390. color: #fff;
  2391. width: 122px;
  2392. font-size: 24px;
  2393. }
  2394. }
  2395. }
  2396. }
  2397. }
  2398. // 对勾
  2399. .dot {
  2400. position: absolute;
  2401. top: 0;
  2402. right: 0;
  2403. width: 2.25rem;
  2404. height: 2.375rem;
  2405. }
  2406. }
  2407. // 弹窗按钮
  2408. .popup_button {
  2409. width: 100%;
  2410. display: flex;
  2411. align-items: center;
  2412. justify-content: space-between;
  2413. padding: 10px 20px;
  2414. box-sizing: border-box;
  2415. .desc .num {
  2416. color: #c69c6d;
  2417. font-size: 18px;
  2418. }
  2419. .ok_btn {
  2420. height: 110px;
  2421. line-height: 110px;
  2422. text-align: center;
  2423. background: #c69c6d;
  2424. color: #fff !important;
  2425. width: 120px;
  2426. height: 40px;
  2427. line-height: 40px;
  2428. border-radius: 40px;
  2429. }
  2430. }
  2431. .warp {
  2432. width: 94%;
  2433. margin-left: 3%;
  2434. margin-top: 20px;
  2435. background-color: #fff;
  2436. border-radius: 10px;
  2437. padding-bottom: 10px;
  2438. .warp_index {
  2439. width: 650px;
  2440. margin-left: 27.5px;
  2441. display: flex;
  2442. align-items: center;
  2443. justify-content: space-between;
  2444. padding: 20px 0;
  2445. font-size: 28px;
  2446. }
  2447. .warp_index1 {
  2448. justify-content: center;
  2449. font-size: 40px;
  2450. padding: 30px 0;
  2451. border-bottom: 1px solid #f2f2f2;
  2452. }
  2453. .color_warp_index {
  2454. color: #000000;
  2455. }
  2456. .bgc-blue {
  2457. .bgc-color('blue');
  2458. }
  2459. .bgc-green {
  2460. .bgc-color('green');
  2461. }
  2462. .bgc-color(@value) {
  2463. @color: 'color-@{value}';
  2464. color: #fff;
  2465. background-color: @@color;
  2466. margin: 0;
  2467. width: 100%;
  2468. border-radius: 10px 10px 0 0;
  2469. }
  2470. .warp_index_da {
  2471. padding: 30px 0;
  2472. border-bottom: 1px solid #f2f2f2;
  2473. }
  2474. .warp_index_color {
  2475. color: #999999;
  2476. display: flex;
  2477. align-items: center;
  2478. }
  2479. }
  2480. .flewx {
  2481. width: 100%;
  2482. height: 130px;
  2483. background-color: #fff;
  2484. position: fixed;
  2485. bottom: 0;
  2486. display: flex;
  2487. align-items: center;
  2488. justify-content: space-around;
  2489. // padding-bottom: constant(safe-area-inset-bottom);
  2490. // padding-bottom: env(safe-area-inset-bottom);
  2491. padding-bottom: 20px;
  2492. .flewx-content {
  2493. position: absolute;
  2494. left: 16px;
  2495. }
  2496. .flewx_index3 {
  2497. width: 150px;
  2498. height: 70px;
  2499. border-radius: 50px;
  2500. text-align: center;
  2501. font-size: 28px;
  2502. line-height: 70px;
  2503. color: #fff;
  2504. background-image: linear-gradient(to right, #7e4fa1, #433c7f);
  2505. box-shadow: 2px 3px 5px #888888;
  2506. position: absolute;
  2507. right: 16px;
  2508. }
  2509. .blue_flewx_index3 {
  2510. .color_flewx_index3('blue');
  2511. }
  2512. .green_flewx_index3 {
  2513. .color_flewx_index3('green');
  2514. }
  2515. .color_flewx_index3(@value) {
  2516. @color: 'color-@{value}';
  2517. background-image: none;
  2518. background-color: @@color;
  2519. }
  2520. .btn-disabled {
  2521. color: hsla(0, 0%, 100%, 0.6);
  2522. cursor: not-allowed;
  2523. background-color: rgb(128, 128, 128);
  2524. background-image: none;
  2525. }
  2526. }
  2527. .popue_box {
  2528. height: 530px;
  2529. background-color: #fff;
  2530. position: fixed;
  2531. bottom: 0;
  2532. left: 0;
  2533. right: 0;
  2534. .popue_box_index {
  2535. width: 92%;
  2536. margin-left: 4%;
  2537. font-size: 30px;
  2538. height: 90px;
  2539. border-bottom: 1px solid #f5f5f5;
  2540. display: flex;
  2541. align-items: center;
  2542. justify-content: space-between;
  2543. }
  2544. .popue_box_index1 {
  2545. font-size: 32px;
  2546. width: 92%;
  2547. margin-left: 4%;
  2548. font-weight: 700;
  2549. height: 90px;
  2550. line-height: 90px;
  2551. border-bottom: 1px solid #f5f5f5;
  2552. text-align: center;
  2553. }
  2554. .popue_box_index4_xs {
  2555. width: 250px;
  2556. height: 55px;
  2557. border: 2px solid #e5e6ec;
  2558. display: flex;
  2559. align-items: center;
  2560. justify-content: space-between;
  2561. border-radius: 10px;
  2562. .popue_box_index4_xs_index1 {
  2563. width: 54px;
  2564. height: 54px;
  2565. background-color: #f5f8fb;
  2566. text-align: center;
  2567. line-height: 54px;
  2568. border-right: 1px solid #e5e6ec;
  2569. }
  2570. .popue_box_index4_xs_index3 {
  2571. width: 54px;
  2572. height: 54px;
  2573. background-color: #f5f8fb;
  2574. text-align: center;
  2575. line-height: 54px;
  2576. border-left: 1px solid #e5e6ec;
  2577. }
  2578. }
  2579. .popue_box_index5 {
  2580. font-size: 30px;
  2581. width: 92%;
  2582. margin-left: 4%;
  2583. font-weight: 700;
  2584. height: 140px;
  2585. line-height: 90px;
  2586. display: flex;
  2587. align-items: center;
  2588. justify-content: space-between;
  2589. }
  2590. .popue_box_index4_by {
  2591. width: 320px;
  2592. height: 90px;
  2593. line-height: 90px;
  2594. color: #fff;
  2595. border-radius: 60px;
  2596. text-align: center;
  2597. color: #7e4fa1;
  2598. font-weight: 700;
  2599. border: 1px solid #7e4fa1;
  2600. }
  2601. .blue_popue_box_index4_by {
  2602. .color_popue_box_index4_by('blue');
  2603. }
  2604. .green_popue_box_index4_by {
  2605. .color_popue_box_index4_by('green');
  2606. }
  2607. .color_popue_box_index4_by(@value) {
  2608. @color: 'color-@{value}';
  2609. color: @@color;
  2610. border: 1px solid @@color;
  2611. }
  2612. .popue_box_index4_by1 {
  2613. width: 320px;
  2614. height: 90px;
  2615. line-height: 90px;
  2616. color: #fff;
  2617. border-radius: 60px;
  2618. text-align: center;
  2619. background-image: linear-gradient(to right, #7e4fa1, #433c7f);
  2620. border: 1px solid #7e4fa1;
  2621. }
  2622. .blue_popue_box_index4_by1 {
  2623. .color-background-color('blue');
  2624. }
  2625. .green_popue_box_index4_by1 {
  2626. .color-background-color('green');
  2627. }
  2628. }
  2629. .text-purple {
  2630. color: #703a98;
  2631. }
  2632. .text-red {
  2633. color: #ff0000;
  2634. }
  2635. .top_content {
  2636. padding: 25px 35px 120px;
  2637. box-sizing: border-box;
  2638. display: flex;
  2639. flex-direction: column;
  2640. span {
  2641. font-size: 24px;
  2642. color: #898989;
  2643. text-align: left;
  2644. }
  2645. .title_box {
  2646. display: flex;
  2647. align-items: center;
  2648. justify-content: space-between;
  2649. margin-bottom: 20px;
  2650. .btn {
  2651. padding: 0px 14px;
  2652. box-sizing: border-box;
  2653. border-radius: 20px;
  2654. font-size: 30px;
  2655. color: #000;
  2656. text-align: center;
  2657. }
  2658. }
  2659. .info {
  2660. padding-left: 18px;
  2661. font-size: 27px;
  2662. width: 95%;
  2663. color: #666;
  2664. line-height: 45px;
  2665. }
  2666. .is-show {
  2667. word-break: break-all;
  2668. text-overflow: ellipsis;
  2669. overflow: hidden;
  2670. display: -webkit-box;
  2671. -webkit-line-clamp: 2;
  2672. -webkit-box-orient: vertical;
  2673. }
  2674. .top-down {
  2675. text-align: center;
  2676. color: #d6d2d2;
  2677. }
  2678. }
  2679. </style>