charge.vue 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925
  1. <template>
  2. <view>
  3. <ujp-navbar title="开始充电" :is-back="isback">
  4. <view class="exchange " slot="right" @click="showmodal2=true">充电说明</view>
  5. </ujp-navbar>
  6. <view class="carImg" v-if="personInfo&&personInfo.userType!=2">
  7. <img @click="gotoLogin" src="@/assets/img/gologin/img.png">
  8. </view>
  9. <view v-else>
  10. <!-- 优惠 -->
  11. <view class="discounts" style="padding:0 36rpx;" v-if="bannerList.length">
  12. <u-swiper bg-color="#fff" mode="none" :img-mode="'scaleToFill'" height="160" :list="bannerList"
  13. @click="clickBanner" :name="'picUrl'">
  14. </u-swiper>
  15. </view>
  16. </view>
  17. <view class="recharge">
  18. <view class="title">
  19. <view class="left lefttitle">
  20. 请选择支付方式和充电金额
  21. </view>
  22. <!-- <view class="to-recharge" @click="show=true,recordId='',otherNum_f='',fee=0">
  23. 去充值
  24. </view> -->
  25. </view>
  26. <view class="card" @click="payValue=0" :class="{
  27. cardselect:payValue==0,
  28. cardno:payValue!=0
  29. }">
  30. <view class="cardgo">
  31. <view class="cardinfo">
  32. <img src="@/assets/img/riFill-check-fill.svg" alt="">
  33. </view>
  34. </view>
  35. <view class="title">先付后退</view>
  36. <p>充电结束后,余额自动退还;不享受<span style="color:#ff3d00;">会员充电折扣、平台各类优惠券</span>等福利</p>
  37. <view class="rechargeMain" v-show="payValue==0">
  38. <view class="recharge-item" @click="moneyActiveClass_n=(item.id)"
  39. :class="moneyActiveClass_n == item.id ? 'active' : ''" v-for="(item,index) in moneyListN"
  40. :key="item.id">
  41. {{item.name}}
  42. </view>
  43. </view>
  44. </view>
  45. <view class="card" @click="paySelectMethod(1)" :class="{
  46. cardselect:payValue==1,
  47. cardno:payValue!=1
  48. }">
  49. <view class="cardgo">
  50. <view class="cardinfo">
  51. <img src="@/assets/img/riFill-check-fill.svg" alt="">
  52. </view>
  53. </view>
  54. <view class="title">会员账户余额充电</view>
  55. <p>当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元
  56. <span @click="paySelectShow()" style="color:#00B962;margin-left: 20px; ">去充值></span>
  57. </p>
  58. <view class="rechargeMain" v-show="payValue==1">
  59. <view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''"
  60. class=" recharge-item ">
  61. 充满自停
  62. </view>
  63. <view class="recharge-item" @click="moneyClick(item.id)"
  64. :class="!otherNum&&moneyActiveClass == item.id ? 'active' : ''"
  65. v-for="(item,index) in moneyList" :key="item.id">
  66. {{item.name}}元
  67. </view>
  68. <view class="recharge-item recharge-item2" :class="otherNum ? 'active' : ''" style="
  69. padding: 1px 0px;">
  70. <ujp-input v-model="otherNum" @input="ckInput" @focus="focus" type="digit" placeholder="其他金额" />
  71. </view>
  72. </view>
  73. </view>
  74. <view class="card" v-for="(companyItem,i) in companyList" :key="i" @click="paySelectMethod(2,companyItem)"
  75. :class="{
  76. cardselect:(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id),
  77. cardno:!(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id)
  78. }">
  79. <view class="cardgo">
  80. <view class="cardinfo">
  81. <img src="@/assets/img/riFill-check-fill.svg" alt="">
  82. </view>
  83. </view>
  84. <view class="title">{{companyItem.enterpriseAccount.entName}}账户余额充电</view>
  85. <p>余额{{companyItem.enterpriseAccount.totalAmount>0?companyItem.enterpriseAccount.totalAmount.toFixed(2):'0.00'}}元
  86. <span
  87. v-show="(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id)"
  88. @click="companyCarSelectBl=true"
  89. style="color:#00B962;margin-left: 40rpx; ">{{companyPaySelect.car?companyPaySelect.car+'(更换)':'选择充电车辆>'}}</span>
  90. <span style="margin-left: 40rpx; "
  91. v-show="(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id)"></span>
  92. </p>
  93. <view class="rechargeMain"
  94. v-show="(payValue==2&&companyItem.enterpriseAccount.id==companyPaySelect.enterpriseAccount.id)">
  95. <view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''"
  96. class=" recharge-item ">
  97. 充满自停
  98. </view>
  99. <view class="recharge-item recharge-item2" :class="otherNum ? 'active' : ''" style="
  100. padding: 1px 0px;">
  101. <ujp-input v-model="otherNum" @input="ckInput" @focus="focus" type="digit" placeholder="其他金额" />
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 优惠券2 -->
  106. <view class="member">
  107. <view class="actively">
  108. 优惠券
  109. </view>
  110. <view class="right" v-if="payValue=='0'">
  111. 先付后退不享受会员优惠活动
  112. </view>
  113. <view class="right" v-else-if="payValue=='2'">
  114. 企业单位用户不可使用优惠券
  115. </view>
  116. <view class="right" @click="chooseCoupons" v-else-if="selectObj.id">
  117. {{selectObj.threshold == 0 ? '无门槛' : '满'+selectObj.threshold.toFixed(2)+'元可用'}},
  118. <span class="price"
  119. v-if="selectObj.classify == '1'||selectObj.classify == '3'">抵扣{{selectObj.value.toFixed(2)}}元</span>
  120. <span class="price" v-if="selectObj.classify == '2'">服务费{{selectObj.value}}折</span>
  121. <view class="iconfont">&#xe600;</view>
  122. </view>
  123. <view class="right" @click="chooseCoupons" v-else-if="listlength">
  124. 未选择,剩余{{listlength}}张优惠券
  125. <view class="iconfont">&#xe600;</view>
  126. </view>
  127. <view class="right" @click="chooseCoupons" v-else>
  128. 无优惠券
  129. <view class="iconfont">&#xe600;</view>
  130. </view>
  131. </view>
  132. <!-- 会员活动 -->
  133. <view class="member">
  134. <view class="actively ">
  135. 会员活动
  136. </view>
  137. <view class="type" v-if="payValue=='0'">
  138. 先付后退不享受会员优惠活动
  139. </view>
  140. <view class="type" v-else-if="payValue=='2'">
  141. 企业单位用户不享受会员优惠活动
  142. </view>
  143. <template v-else-if="userCardBool">
  144. <view class="type" v-if="!vin" style="color: red;">
  145. vin码不一致
  146. </view>
  147. <view class="type" v-else-if="canUse">
  148. {{userCard.classify==1?'折扣卡':''}}
  149. {{userCard.classify==2?'服务费'+(userCard.serviceFeeDiscountRate/10)+'折卡':''}}
  150. </view>
  151. <view class="type" style="color: red;" v-else>
  152. 此充电站不支持{{userCard.classify==1?'折扣卡':''}}
  153. {{userCard.classify==2?'服务费'+(userCard.serviceFeeDiscountRate/10)+'折卡':''}}
  154. </view>
  155. </template>
  156. <template v-else>
  157. <view class="type" style="color:#999999" @click="gotoUrl('pages/discountCard/productDetails')">
  158. 尚未购买服务费6折卡<view class="iconfont">&#xe600;</view>
  159. </view>
  160. </template>
  161. </view>
  162. <view v-if="cardList.length" class="cardListView">
  163. <view class="cardListItemTitle">点击切换其他卡</view>
  164. <view class="cardListItem" v-for="(item,i) in cardList"
  165. :key="i" :class="{
  166. select:userCard.id==item.id
  167. }" @click="userCard=item" >
  168. <view class="cardListName" >
  169. {{item.cardName}}
  170. </view>
  171. <view class="cardListText" v-if="item.classify==1" >
  172. <view>充电服务费全免</view>
  173. <view>
  174. |{{thisendTime(item.endTime)}}到期
  175. </view>
  176. </view>
  177. <view class="cardListText" v-if="item.classify==2" >
  178. <view>
  179. 已用{{item.chargedDegree?item.chargedDegree.toFixed(0):0.00}}度 / 共{{item.chargeDegreeLimit}}度
  180. </view>
  181. <view>
  182. |{{thisendTime(item.endTime)}}到期
  183. </view>
  184. </view>
  185. </view>
  186. </view>
  187. </view>
  188. <view class="botton">
  189. <button class="bottonBtn" @click="submit">开始充电</button>
  190. </view>
  191. <u-modal v-model="showmodal2" confirm-text="知道了" title="充电说明">
  192. <view style="padding: 10px;font-size: 32rpx;">
  193. 1.最终结算金额将以实际充入电量为准;<br />
  194. 2.充满自停模式需要您的余额不低于10元才可充电;<br />
  195. 3.充电金额请输入1元~500元的整数。实际充电金额与所选金额会略有出入(一般误差约几分钱);<br />
  196. 4.完成充电后,在满足条件的情况下,优惠券自动抵扣;提前结束充电则不使用优惠券并返还至您的卡包。<br />
  197. 5.先付后退模式,无法享受平台会员的服务费折扣、优惠券等优惠活动。<br />
  198. </view>
  199. </u-modal>
  200. <!-- <view class="but-box" style="margin-bottom: 20px;">
  201. <u-button
  202. style=" background-color: rgba(0, 185, 98, 100);
  203. color: rgba(255, 255, 255, 100);
  204. font-size: 16px;
  205. text-align: center;"
  206. @click="submit" shape="circle">开始充电</u-button>
  207. </view> -->
  208. <u-modal v-model="showmodal" :show-cancel-button="true" title="余额不足" confirm-text="前往充值"
  209. content="账户余额不足,充值成功后开始充电" @confirm="show=true"></u-modal>
  210. <u-popup v-model="companyCarSelectBl" :closeable="true" mode="bottom" border-radius="30">
  211. <view class="indexData5content">
  212. <view class="contentTitle">
  213. 选择充电车辆
  214. </view>
  215. <view
  216. v-if="companyPaySelect&&(companyPaySelect.carList&&companyPaySelect.carList.length==0||companyPaySelect.carList==null)"
  217. style=" text-align: center;">
  218. <img src="static/img/暂无数据-缺省页.png" alt="">
  219. <p class="oldTextjp2">未分配车辆,请联系管理员</p>
  220. </view>
  221. <scroll-view v-else scroll-y="true" style="height: 520rpx;">
  222. <view style="padding-bottom: 30rpx;">
  223. <u-radio-group v-model="companyPaySelect.car" size="42">
  224. <view class="contentbody">
  225. <view v-for="(item,index) in companyPaySelect.carList"
  226. @click="companyPaySelect.car=(item.carNum),companyCarSelectBl = false;"
  227. class="contentItem" :key="index">
  228. <view class="span1">{{item.carNum}}</view>
  229. <view class="span2">
  230. <span v-show="!item.vin" style="color:#fff">aaa</span>
  231. <img v-show="item.vin" style="vertical-align: bottom;" width="20"
  232. src="@/assets/img/riLine-link-m.png" />
  233. <span v-show="item.vin" style="color:#999999 ">已关联Vin码</span>
  234. </view>
  235. <view class="span3">
  236. <u-radio style=" overflow: inherit;"
  237. @change="companyPaySelect.car=(item.carNum),companyCarSelectBl = false;"
  238. :name="item.carNum">
  239. <span style="color:#fff">.</span>
  240. </u-radio>
  241. </view>
  242. </view>
  243. </view>
  244. </u-radio-group>
  245. </view>
  246. </scroll-view>
  247. </view>
  248. </u-popup>
  249. <!-- 弹窗2 -->
  250. <template>
  251. <view>
  252. <u-popup v-model="paySelect" mode="bottom">
  253. <view class="paySelect">
  254. <view class="title lefttitle ">选择支付方式</view>
  255. <u-radio-group v-model="payValueTemp">
  256. <p>
  257. <u-radio name="0" active-color="#2979f6" shape="circle" size="48">
  258. <p>{{payList[0].name}}<span>({{payList[0].tips}})</span> </p>
  259. </u-radio>
  260. </p>
  261. <p v-if="personInfo&&personInfo.userType=='2'">
  262. <u-radio name="1" active-color="#2979f6" shape="circle" size="48">
  263. <p>{{payList[1].name}}<span>({{payList[1].tips}})</span> </p>
  264. </u-radio>
  265. </p>
  266. <p v-if="false">
  267. <u-radio name="2" active-color="#2979f6" shape="circle" size="48">
  268. <p>{{payList[2].name}}<span>(其他充值金额)</span> </p>
  269. </u-radio>
  270. </p>
  271. </u-radio-group>
  272. </view>
  273. <view class="recharge" style="padding-bottom: 0;">
  274. <view class="recharge-btn transactionClass" style="margin-top: 60px;">
  275. <u-button class="success-btn" @click="paySelectMethod(1)" shape="circle" type="success"
  276. style="margin-top: 12px;margin-bottom: 16px;">
  277. <span>确定</span>
  278. </u-button>
  279. </view>
  280. </view>
  281. </u-popup>
  282. </view>
  283. </template>
  284. <!-- 弹窗 -->
  285. <template>
  286. <view>
  287. <u-popup v-model="show" mode="bottom">
  288. <view class="recharge" style="padding-bottom: 0;">
  289. <view class="title lefttitle ">选择充值金额
  290. <span class=" rightspan">当前余额
  291. <span style="color: red;">{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</span>
  292. </span>
  293. </view>
  294. <p style="color: red; font-size: 28rpx;" v-show="selectItem.amountRemark">
  295. {{selectItem.amountRemark}}代金券,退余额时将扣除已使用的优惠券金额
  296. </p>
  297. <view class="rechargeMain">
  298. <view class="recharge-item"
  299. :class="!otherNum_f&&moneyActiveClass_f == item.id ? 'active' : ''"
  300. v-for="(item,index) in moneyList_f" :key="item.id" @click="moneyClick_f(item.id,item)">
  301. {{item.amountDesc?item.amountDesc:item.rechargeAmount+'元'}}
  302. <view class="amount" v-if="item.amountRemark">{{item.amountRemark}}</view>
  303. </view>
  304. </view>
  305. <p class="oldTextjp2" oldstyle="font-size:16px">其他充值金额</p>
  306. <view style="margin-bottom: 32px;">
  307. <view :class="otherNum_f? 'active' : ''" class="recharge-input self-stop"
  308. style="height: 100%;width: 100%;margin-bottom: 8px;">
  309. <ujp-input v-model="otherNum_f" @input="ckInput_f" @focus="focus" type="digit"
  310. :border="true" />
  311. </view>
  312. <view style="color: rgba(153, 153, 153, 100);
  313. font-size: 12px;
  314. text-align: left;
  315. font-family: AlibabaPuHui-regular;"><span style="color:red">*</span>金额范围为1元-500元</view>
  316. </view>
  317. <view class="recharge-btn transactionClass" style="margin-top: 60px;">
  318. <view>
  319. <u-checkbox-group>
  320. <u-checkbox active-color="green" v-model="checked" shape="circle"></u-checkbox>
  321. </u-checkbox-group>
  322. 我已阅读并同意<span @click="gotoUrl('pages/article/details?code=CZXY')"
  323. style="color:#00B962">《充值协议》</span>
  324. </view>
  325. <u-button class="success-btn" shape="circle" type="success" @click="rechargeNow"
  326. style="margin-top: 12px;margin-bottom: 16px;">
  327. <span>微信充值</span>
  328. </u-button>
  329. </view>
  330. </view>
  331. </u-popup>
  332. </view>
  333. </template>
  334. </view>
  335. </template>
  336. <script>
  337. import * as API from '@/apis/chargeProcess.js'
  338. import * as API_index from '@/apis/index.js'
  339. import * as userApi from '@/apis/user.js'
  340. import * as newsApi from '@/apis/news.js'
  341. import * as API_finance from '@/apis/finance.js'
  342. import {
  343. wxPayJs
  344. } from '@/utils/wxpay'
  345. import {
  346. newDate,daysDistance
  347. } from '@/utils'
  348. import * as Pay from '@/apis/weixin.js'
  349. export default {
  350. data() {
  351. return {
  352. fee: 0,
  353. recordId: "",
  354. show2: false,
  355. stationId: "",
  356. elderMode: false,
  357. isback: true,
  358. show: false,
  359. moneyActiveClass_n: "50",
  360. moneyActiveClass: "-1",
  361. moneyActiveClass_f: "-1",
  362. detail: {},
  363. couponsuse: '',
  364. showmodal: false,
  365. showmodal2: false,
  366. //提交信息
  367. //提交信息
  368. submitForm_f: {
  369. //paytype:'YE',
  370. },
  371. submitForm: {
  372. deviceNo: '',
  373. channelNo: '',
  374. carNumber: '',
  375. chargeStrategy: 2,
  376. amount: 0
  377. //paytype:'YE',
  378. },
  379. uuid: 0,
  380. user: {},
  381. companyCarSelectBl: false,
  382. companyList: [
  383. ],
  384. companyPaySelect: {
  385. id: "",
  386. car: "aaa"
  387. },
  388. otherNum_f: '',
  389. otherNum: '',
  390. moneyList_f: [],
  391. paySelect: false,
  392. payName: "",
  393. payValueTemp: 0,
  394. payValue: 0,
  395. payList: [{
  396. name: "先付后退",
  397. tips: "游客不享受平台优惠活动",
  398. value: "1",
  399. select: false,
  400. }, {
  401. name: "个人账户支付",
  402. tips: "可使用折扣卡、优惠券、折扣卷等",
  403. value: "2",
  404. select: false,
  405. }, {
  406. name: "单位账户支付",
  407. tips: "账户余额:99999元",
  408. value: "3",
  409. select: false,
  410. }],
  411. moneyList: [
  412. {
  413. id: '10',
  414. name: '10'
  415. },
  416. {
  417. id: '20',
  418. name: '20'
  419. },
  420. {
  421. id: '50',
  422. name: '50'
  423. },
  424. {
  425. id: '100',
  426. name: '100'
  427. },
  428. ],
  429. moneyListN: [{
  430. id: '10',
  431. name: '10元'
  432. },
  433. {
  434. id: '20',
  435. name: '20元'
  436. },
  437. {
  438. id: '50',
  439. name: '50元'
  440. }
  441. ],
  442. userCard: null,
  443. canUse: false,
  444. selectObj: {},
  445. value: "",
  446. // 优惠券
  447. listlength: 0,
  448. vin: true,
  449. bannerList: [],
  450. checked: true,
  451. selectItem: {},
  452. personInfo: {},
  453. carNumber: "",
  454. show3: false,
  455. cardList:[],
  456. }
  457. },
  458. computed: {
  459. userCardBool() {
  460. if (this.userCard) {
  461. var date = new Date().getTime()
  462. var reg = new RegExp('-', 'gi')
  463. var str = this.userCard.endTime;
  464. //console.log(str.replace(reg,'/'))
  465. var date2 = new Date(str.replace(reg, '/')).getTime();
  466. if (date < date2) {
  467. return true;
  468. }
  469. }
  470. return false
  471. }
  472. },
  473. onLoad(op) {
  474. this.personInfo = this.carhelp.getPersonInfo()
  475. // if(plus){
  476. // this.userCard=plus.userCard;
  477. // }
  478. if (this.personInfo && this.personInfo.userType == "1") {
  479. this.show3 = true
  480. }
  481. this.uuid = new Date().getTime();
  482. this.stationId = op.stationId;
  483. if (op.deviceNo) {
  484. this.submitForm.deviceNo = op.deviceNo;
  485. this.submitForm.channelNo = op.gun;
  486. this.carNumber = op.carNumber;
  487. this.submitForm.carNumber = op.carNumber;
  488. this.carhelp.setGunIdCharge(this.submitForm);
  489. }
  490. if (op.vin == 'no') {
  491. this.vin = false;
  492. }
  493. if (op.isback) {
  494. this.isback = false;
  495. }
  496. this.useCoupon()
  497. var couponsuse = "充电结束后满足金额即可生效,提前结束充电则优惠券不生效并返回"
  498. // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
  499. if (couponsuse) {
  500. this.couponsuse = couponsuse
  501. }
  502. this.init()
  503. },
  504. onReady() {
  505. this.personInfo = this.carhelp.getPersonInfo()
  506. if (this.personInfo.userType == "1") {
  507. this.payValueTemp = 0;
  508. this.payValue = 0;
  509. } else {
  510. this.payValueTemp = 1;
  511. var payValueDefault = this.carhelp.get("payValueDefault");
  512. this.payValue = 1;
  513. if (payValueDefault == "1" || payValueDefault == "0") {
  514. this.payValue = payValueDefault;
  515. }
  516. }
  517. this.payName = this.payList[this.payValue].name;
  518. this.getBannerInfo("charge-start")
  519. this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
  520. if (this.elderMode)
  521. this.theme('elder')
  522. else
  523. this.theme('standard')
  524. this.getChargeList()
  525. },
  526. onShow() {
  527. this.personInfo = this.carhelp.getPersonInfo()
  528. var obj = this.carhelp.get("chooseCoupons");
  529. if (obj) {
  530. if (obj.uuid == this.uuid) {
  531. this.selectObj = obj.selectObj;
  532. }
  533. }
  534. this.getHomePage()
  535. },
  536. methods: {
  537. thisdaysDistance(endTime){
  538. var date=new Date()
  539. var date2=newDate(endTime);
  540. return daysDistance(date,date2)
  541. },
  542. getChargeList() {
  543. uni.showLoading({
  544. title: "加载中",
  545. mask: true,
  546. })
  547. API_index.personCardList({
  548. }).then((res) => {
  549. uni.hideLoading();
  550. this.cardList=res.data.cardList
  551. }).catch(error => {
  552. uni.showToast({
  553. title: error,
  554. icon: "none"
  555. })
  556. })
  557. },
  558. gotoLogin() {
  559. this.onShowRole = true
  560. if (false) {
  561. } else {
  562. uni.navigateTo({
  563. url: "/pages/login/login?jpcode=jp_team51_charge_id:A_" + this.submitForm.deviceNo
  564. })
  565. }
  566. },
  567. paySelectShow() {
  568. if (this.personInfo.userType == "1") {
  569. } else {
  570. this.show = true;
  571. this.recordId = '';
  572. this.otherNum_f = '';
  573. this.fee = 0
  574. }
  575. },
  576. //companyPaySelect
  577. paySelectCompany() {
  578. },
  579. paySelectMethod(value, company) {
  580. if (this.personInfo.userType == "1") {
  581. uni.showToast({
  582. title: "游客模式只支持“先付后退”"
  583. })
  584. } else {
  585. this.payValue = value
  586. if (value == 2) {
  587. this.companyPaySelect = company
  588. if (company.carList && company.carList.length == 1) {
  589. //this.companyPaySelect=entRegList[0]
  590. this.companyPaySelect.car = company.carList[0].carNum;
  591. }
  592. }
  593. }
  594. console.log(this.companyPaySelect)
  595. },
  596. moneyClick_f(index, item) {
  597. this.otherNum_f = '';
  598. this.moneyActiveClass_f = index;
  599. if (item) {
  600. this.selectItem = item;
  601. // if(item.imgUrl){
  602. // this.selectImg=item
  603. // }
  604. }
  605. },
  606. rechargeNow2() {
  607. //先付后退
  608. this.submitForm_f = {};
  609. var fee = 0;
  610. this.submitForm_f.amount = this.fee;
  611. uni.showLoading({
  612. title: "加载中",
  613. mask: true,
  614. })
  615. if (this.recordId) {
  616. this.submitForm_f.recordId = this.recordId
  617. }
  618. //(this.submitForm)
  619. this.wxpy()
  620. },
  621. rechargeNow() {
  622. if (!this.checked) {
  623. uni.showToast({
  624. title: "请同意《充值协议》后进行充值"
  625. })
  626. return
  627. }
  628. this.submitForm_f = {};
  629. var fee = 0;
  630. if (!this.otherNum_f) {
  631. this.submitForm_f.chargingMarketingId = this.selectItem.id;
  632. fee = this.selectItem.rechargeAmount
  633. } else {
  634. this.submitForm_f.amount = this.otherNum_f
  635. fee = this.otherNum_f
  636. }
  637. if (this.fee) {
  638. var thisfee = this.fee
  639. if (this.fee > parseFloat(fee)) {
  640. uni.showToast({
  641. title: `最少充值${thisfee}元才能启动充电`
  642. })
  643. return
  644. }
  645. }
  646. uni.showLoading({
  647. title: "加载中",
  648. mask: true,
  649. })
  650. if (this.recordId) {
  651. this.submitForm_f.recordId = this.recordId
  652. }
  653. //(this.submitForm)
  654. this.wxpy()
  655. },
  656. wxpy() {
  657. var obj = {
  658. ...this.submitForm_f
  659. }
  660. if (obj.amount) {
  661. for (var i in this.moneyList_f) {
  662. var item = this.moneyList_f[i]
  663. if (item.rechargeAmount == obj.amount) {
  664. delete obj.amount;
  665. obj.chargingMarketingId = item.id
  666. break
  667. }
  668. }
  669. }
  670. Pay.wxpay(obj).then((response) => {
  671. if (!response.result) {
  672. uni.showToast({
  673. title: response.message
  674. })
  675. return
  676. }
  677. var data = response.data
  678. uni.hideLoading()
  679. //("Pay+"+new Date().getTime())
  680. wxPayJs(data);
  681. }).catch(error => {
  682. uni.showToast({
  683. title: error
  684. })
  685. })
  686. },
  687. focus() {
  688. console.log(0)
  689. uni.pageScrollTo({
  690. scrollTop: 999999,
  691. duration: 0
  692. })
  693. },
  694. init() {
  695. var data = {
  696. type: 2,
  697. };
  698. API_finance.marketingData(data).then((res) => {
  699. this.moneyList_f = res.data.chargingMarketingList
  700. if (this.moneyList_f.length > 0) {
  701. this.selectItem = this.moneyList_f[0];
  702. this.moneyActiveClass_f = this.moneyList_f[0].id
  703. //(this.moneyActiveClass)
  704. }
  705. var list = res.data.priceList
  706. if (list.length) {
  707. this.moneyListN = [];
  708. for (var i in list) {
  709. this.moneyListN.push({
  710. id: list[i],
  711. name: list[i] + "元"
  712. })
  713. }
  714. this.moneyActiveClass_n = list[0]
  715. }
  716. }).catch(error => {
  717. uni.showToast({
  718. title: error
  719. })
  720. })
  721. },
  722. clickBanner(index) {
  723. var mod = this.bannerList[index]
  724. if (mod.linkUrl.indexOf('http') == 0) {
  725. window.location = mod.linkUrl;
  726. } else if (mod.linkUrl.indexOf('#/') == 0) {
  727. if (mod.linkUrl.indexOf("?") == -1) {
  728. mod.linkUrl += '?';
  729. }
  730. //window.location=mod.linkUrl;
  731. var url = mod.linkUrl.split("#")[1]
  732. //window.location = mod.clickUrl;
  733. uni.navigateTo({
  734. url: url
  735. })
  736. } else if (mod.linkUrl == '#' || mod.linkUrl == '') {
  737. } else {
  738. uni.navigateTo({
  739. url: mod.linkUrl
  740. })
  741. }
  742. },
  743. getBannerInfo(code) {
  744. uni.showLoading({
  745. title: "加载中",
  746. mask: true,
  747. })
  748. newsApi.getBannerInfo(code).then((res) => {
  749. uni.hideLoading();
  750. this.bannerList = res.data;
  751. // document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
  752. }).catch(error => {
  753. uni.showToast({
  754. title: error,
  755. icon: "none"
  756. })
  757. })
  758. },
  759. getPile() {
  760. },
  761. theme(type) {
  762. if (type == 'elder') {
  763. document.getElementsByTagName('body')[0].setAttribute('data-theme', type);
  764. } else {
  765. document.getElementsByTagName('body')[0].setAttribute('data-theme', type);
  766. }
  767. },
  768. chooseCoupons() {
  769. this.submitInit()
  770. this.gotoUrl('pages/user/coupon/chooseCoupons?uuid=' + this.uuid + "&amount=" + this.submitForm.amount +
  771. "&stationId=" + this.stationId)
  772. },
  773. ckInput_f(text) {
  774. if (text.indexOf('.') > 0) {
  775. var k = text.split(".")[1]
  776. if (k.length >= 3) {
  777. this.$nextTick(() => {
  778. text = parseFloat(text).toFixed(2);
  779. this.otherNum_f = text
  780. })
  781. }
  782. }
  783. var t = Number(text);
  784. if (t < 1) {
  785. this.$nextTick(() => {
  786. this.otherNum_f = '';
  787. })
  788. }
  789. if (t > 500) {
  790. this.$nextTick(() => {
  791. this.otherNum_f = 500;
  792. })
  793. }
  794. },
  795. ckInput(text) {
  796. if (text.indexOf('.') > 0) {
  797. this.$nextTick(() => {
  798. this.otherNum = text.substring(0, text.indexOf('.'))
  799. uni.showToast({
  800. title: "请输入正整数"
  801. })
  802. })
  803. }
  804. var t = Number(text);
  805. if (t < 1) {
  806. this.$nextTick(() => {
  807. this.otherNum = '';
  808. })
  809. }
  810. if (t > 500) {
  811. this.$nextTick(() => {
  812. this.otherNum = 500;
  813. })
  814. }
  815. this.selectJudge();
  816. },
  817. moneyClick(index) {
  818. this.otherNum = ''
  819. this.moneyActiveClass = index;
  820. this.selectJudge();
  821. },
  822. selectJudge() {
  823. this.submitInit()
  824. if (this.submitForm.amount == 0) {
  825. return
  826. }
  827. if (this.selectObj.id && this.selectObj.threshold > this.submitForm.amount) {
  828. uni.showToast({
  829. title: "请重新选择优惠券"
  830. })
  831. this.selectObj = {}
  832. }
  833. },
  834. radioChange(e) {},
  835. confirm() {
  836. ////(JSON.stringify(this.submitForm))
  837. if (this.payValue == 1) {
  838. if (this.selectObj.id) {
  839. this.submitForm.userCouponId = this.selectObj.id
  840. }
  841. if (this.userCardBool && this.canUse && this.vin) {
  842. this.submitForm.userCardId = this.userCard.id
  843. }
  844. } else {
  845. this.submitForm.userCouponId = ""
  846. this.submitForm.userCardId = ""
  847. }
  848. if (this.payValue == 2) {
  849. if (!this.companyPaySelect.car) {
  850. uni.showToast({
  851. title: '请选择充车辆'
  852. })
  853. return
  854. }
  855. this.submitForm.vipUserId = this.companyPaySelect.vipUser.id;
  856. this.submitForm.carNumber = this.companyPaySelect.car;
  857. } else {
  858. this.submitForm.carNumber = this.carNumber;
  859. this.submitForm.vipUserId = ""
  860. }
  861. uni.showLoading({
  862. title: "加载中",
  863. mask: true,
  864. })
  865. this.carhelp.set("payValueDefault", this.payValue);
  866. if (this.payValue == 2) {
  867. this.carhelp.set("payValueDefault3", {
  868. carNumber: this.companyPaySelect.car,
  869. companyId: this.companyPaySelect.enterpriseAccount.id,
  870. });
  871. }
  872. //this.submitForm.deviceNo = this.detail.deviceNo;
  873. API.startCarCharging(this.submitForm).then((res) => {
  874. //(JSON.stringify(this.res))
  875. if (res.data.status == "5") {
  876. uni.hideLoading()
  877. if (this.submitForm.payType == "1") {
  878. this.recordId = res.data.recordId;
  879. this.fee = res.data.fee;
  880. this.rechargeNow2() //先付后退
  881. } else {
  882. if (this.payValue == 2) {
  883. uni.showToast({
  884. title: "余额不足,请联系企业单位人员"
  885. })
  886. } else {
  887. this.showmodal = true;
  888. this.recordId = res.data.recordId;
  889. var fee = res.data.fee;
  890. this.fee = (fee - this.user.balance).toFixed(2);
  891. this.otherNum_f = this.fee;
  892. }
  893. }
  894. } else {
  895. this.gotoUrl("pages/searchPile/chargeProcess/dcCharging?id=" + res.data.recordId);
  896. }
  897. }).catch(error => {
  898. uni.hideLoading()
  899. if (error == '用户账户余额不足!') {
  900. } else {
  901. uni.showToast({
  902. title: error
  903. })
  904. }
  905. })
  906. },
  907. thisendTime(endTime){
  908. if(endTime){
  909. var reg=new RegExp('-','gi')
  910. var str=endTime.substring(0,10).replace(reg,'.')
  911. return str
  912. }
  913. return ''
  914. },
  915. getHomePage() {
  916. uni.showLoading({
  917. title: "加载中",
  918. mask: true,
  919. })
  920. API.userCard({
  921. stationId: this.stationId
  922. }).then((res) => {
  923. console.log(res)
  924. this.userCard = res.data.regUserCard
  925. this.canUse = res.data.canUse
  926. //this.user = res.data
  927. API.personalCenter({
  928. stationId: this.stationId
  929. }).then((res2) => {
  930. this.user = res2.data
  931. var entRegList = res2.data.entRegList;
  932. this.companyList = []
  933. for (var i in entRegList) {
  934. var item = entRegList[i]
  935. if (item.enterpriseAccount) {
  936. this.companyList.push(item)
  937. }
  938. }
  939. this.isReady = true;
  940. uni.hideLoading()
  941. var payValueDefault = this.carhelp.get("payValueDefault");
  942. if (payValueDefault == "2") {
  943. var payValueDefault3 = this.carhelp.get("payValueDefault3");
  944. for (var i in this.companyList) {
  945. var item = this.companyList[i]
  946. if (item.enterpriseAccount.id == payValueDefault3.companyId) {
  947. this.companyPaySelect = item;
  948. for (var j in item.carList) {
  949. var car = item.carList[j]
  950. if (car.carNum == payValueDefault3.carNumber) {
  951. this.companyPaySelect.car = payValueDefault3.carNumber;
  952. this.payValue = payValueDefault;
  953. }
  954. }
  955. }
  956. }
  957. }
  958. }).catch(error => {
  959. uni.showToast({
  960. title: error
  961. })
  962. })
  963. }).catch(error => {
  964. uni.showToast({
  965. title: error
  966. })
  967. })
  968. },
  969. useCoupon() {
  970. var obj = {
  971. status: 0,
  972. stationId: this.stationId,
  973. hideCardCoupon: 1
  974. }
  975. if (this.userCardBool) {
  976. obj.userCardId = this.userCard.id
  977. }
  978. userApi.couponList(obj).then((res) => {
  979. this.listlength = res.data.recordsTotal;
  980. //uni.hideLoading()
  981. }).catch(error => {
  982. uni.showToast({
  983. title: error
  984. })
  985. })
  986. },
  987. submitInit() {
  988. if (this.moneyActiveClass == -1 && !this.otherNum) {
  989. this.submitForm.chargeStrategy = 0;
  990. this.submitForm.amount = 0
  991. } else {
  992. this.submitForm.chargeStrategy = 2;
  993. if (this.otherNum) {
  994. this.submitForm.amount = this.otherNum
  995. } else {
  996. this.submitForm.amount = this.moneyActiveClass
  997. }
  998. }
  999. },
  1000. submit() {
  1001. if (!this.submitForm.channelNo) {
  1002. uni.showToast({
  1003. title: '请先选择充电通道'
  1004. })
  1005. return
  1006. }
  1007. this.submitForm.payType = this.payList[this.payValue].value;
  1008. if (this.submitForm.payType == "1") {
  1009. this.submitForm.amount = this.moneyActiveClass_n
  1010. this.submitForm.chargeStrategy = 2;
  1011. } else {
  1012. this.submitInit()
  1013. }
  1014. this.confirm()
  1015. },
  1016. }
  1017. }
  1018. </script>
  1019. <style>
  1020. page {
  1021. background-color: #fff;
  1022. }
  1023. </style>
  1024. <style lang="scss" scoped>
  1025. .exchange {
  1026. margin-right: 32rpx;
  1027. color: rgba(119, 119, 119, 100);
  1028. //font-size: 24rpx;
  1029. font-size: 32rpx;
  1030. //margin-right: 6rpx;
  1031. }
  1032. .rightspan {
  1033. float: right;
  1034. }
  1035. .indexData5content {
  1036. padding: 40rpx 40rpx;
  1037. .contentTitle {
  1038. color: #333333;
  1039. font-size: 40rpx;
  1040. font-weight: bold;
  1041. margin-bottom: 16rpx;
  1042. }
  1043. .contentbody {
  1044. width: 100%;
  1045. display: block;
  1046. .contentItem {
  1047. border-bottom: 1px solid #ededed;
  1048. padding: 12rpx 0;
  1049. font-size: 32rpx;
  1050. display: flex;
  1051. width: 100%;
  1052. .span1 {
  1053. padding-top: 8rpx;
  1054. width: 50%;
  1055. }
  1056. .span2 {
  1057. padding-top: 8rpx;
  1058. width: 35%;
  1059. }
  1060. .span3 {
  1061. padding-top: 8rpx;
  1062. padding-left: 8rpx;
  1063. width: 10%;
  1064. }
  1065. }
  1066. }
  1067. }
  1068. .textinfo {
  1069. padding: 40rpx;
  1070. font-size: 24rpx !important;
  1071. color: #999999;
  1072. p {
  1073. font-size: 32rpx !important;
  1074. color: #101010;
  1075. font-weight: bold;
  1076. }
  1077. }
  1078. .lefttitle {
  1079. font-weight: bold;
  1080. font-size: 32rpx
  1081. }
  1082. @import "@/_theme.scss";
  1083. .listlength {
  1084. float: right;
  1085. padding-right: 20rpx;
  1086. }
  1087. /deep/.u-drawer-content {
  1088. border-radius: 10px 10px 0 0
  1089. }
  1090. /deep/.u-radio-group {
  1091. width: 100%;
  1092. }
  1093. /deep/.u-radio {
  1094. position: relative;
  1095. }
  1096. /deep/.u-radio__icon-wrap {
  1097. position: absolute;
  1098. right: 0;
  1099. }
  1100. .recharge-item2 {
  1101. @include themeify {
  1102. font-size: themed('font-size2') !important;
  1103. }
  1104. /* font-size: 14px !important;*/
  1105. color: #999999;
  1106. }
  1107. .paySelect {
  1108. padding: 32rpx;
  1109. .title {
  1110. font-size: 40rpx
  1111. }
  1112. p {
  1113. width: 100%;
  1114. span {
  1115. color: #666;
  1116. }
  1117. .u-radio__label {
  1118. color: #333333;
  1119. }
  1120. .u-radio {
  1121. width: 100% !important;
  1122. ;
  1123. }
  1124. color: #333333;
  1125. margin-top: 16rpx;
  1126. font-size:32rpx;
  1127. }
  1128. }
  1129. .recharge {
  1130. padding: 32rpx;
  1131. padding-bottom: 100px;
  1132. .title {
  1133. @include themeify {
  1134. font-size: themed('font-size3');
  1135. }
  1136. /* font-size: 16px;*/
  1137. position: relative;
  1138. }
  1139. p {
  1140. color: #666;
  1141. margin-top: 4px;
  1142. }
  1143. .self-stop.active {
  1144. background-color: #EFFFF7;
  1145. border-color: #00B962;
  1146. color: #00B962;
  1147. }
  1148. .rechargeMain {
  1149. display: flex;
  1150. flex-wrap: wrap;
  1151. // justify-content: space-between;
  1152. margin-top: 24rpx;
  1153. margin-bottom: 10rpx;
  1154. .recharge-item {
  1155. .u-input {
  1156. text-align: center !important;
  1157. }
  1158. width: 31%;
  1159. border: 1px solid #e3e3e3;
  1160. padding: 20rpx 0;
  1161. border-radius: 4px;
  1162. text-align: center;
  1163. margin-bottom: 20rpx;
  1164. position: relative;
  1165. margin-left: 10rpx;
  1166. @include themeify {
  1167. font-size: themed('font-size3');
  1168. }
  1169. /* font-size: 16px;*/
  1170. }
  1171. .active {
  1172. background-color: #EFFFF7;
  1173. border-color: #00B962;
  1174. color: #00B962;
  1175. }
  1176. }
  1177. .self-stop {
  1178. width: 105px;
  1179. /* height: 48px;
  1180. line-height: 48px;*/
  1181. border-radius: 4px;
  1182. color: #101010;
  1183. @include themeify {
  1184. font-size: themed('font-size3');
  1185. height: themed('font-size19');
  1186. line-height: themed('font-size19')
  1187. }
  1188. /* font-size: 16px;*/
  1189. text-align: center;
  1190. font-family: Arial;
  1191. border: 1px solid rgba(227, 227, 227, 100);
  1192. margin-top: 12px;
  1193. }
  1194. }
  1195. .recharge-input {
  1196. margin-top: 8px;
  1197. margin-bottom: 32px;
  1198. }
  1199. .recharge-radio {
  1200. margin-top: 10px;
  1201. .recharge-radio-item {
  1202. display: flex;
  1203. align-items: center;
  1204. }
  1205. .recharge-radio-name {
  1206. margin-left: 8px;
  1207. }
  1208. }
  1209. .but-box {
  1210. width: 89.3%;
  1211. height: 44px;
  1212. margin: 0 auto;
  1213. position: fixed;
  1214. bottom: 0;
  1215. right: 0;
  1216. left: 0;
  1217. }
  1218. //优惠券
  1219. .discounts {
  1220. margin-top: 10px;
  1221. width: 100%;
  1222. .title {
  1223. width: 100%;
  1224. .title-1 {
  1225. /* height: 22px;*/
  1226. color: rgba(16, 16, 16, 100);
  1227. @include themeify {
  1228. font-size: themed('font-size3');
  1229. height: themed('font-size6');
  1230. }
  1231. /* font-size: 16px;*/
  1232. }
  1233. .title-2 {
  1234. margin-left: 4px;
  1235. @include themeify {
  1236. font-size: themed('font-size2');
  1237. line-height: themed('font-size5');
  1238. }
  1239. /* font-size: 14px;
  1240. line-height: 20px;*/
  1241. }
  1242. .title-3 {
  1243. float: right;
  1244. @include themeify {
  1245. font-size: themed('font-size3');
  1246. line-height: themed('font-size5');
  1247. }
  1248. /* height: 19px;
  1249. font-size: 16px;*/
  1250. }
  1251. }
  1252. .select {
  1253. position: relative;
  1254. /deep/.u-radio {
  1255. padding: 36rpx 32rpx;
  1256. margin-top: 12px;
  1257. width: 100%;
  1258. height: 48px;
  1259. border-radius: 4px;
  1260. background-color: rgba(255, 255, 255, 100);
  1261. text-align: center;
  1262. border: 1px solid rgba(227, 227, 227, 100);
  1263. position: relative;
  1264. }
  1265. // /deep/.u-radio:nth-child(3) {
  1266. //
  1267. // }
  1268. /deep/.u-radio__icon-wrap {
  1269. left: 32rpx;
  1270. background-color: #fff;
  1271. }
  1272. /deep/.u-radio__label {
  1273. margin-left: 40px;
  1274. }
  1275. }
  1276. .explain {
  1277. width: 64px;
  1278. /* height: 24px;
  1279. line-height: 24px;*/
  1280. position: absolute;
  1281. top: 10px;
  1282. right: 12px;
  1283. border-radius: 4px;
  1284. background-color: rgba(255, 255, 255, 100);
  1285. text-align: center;
  1286. border: 1px solid rgba(227, 227, 227, 100);
  1287. color: rgba(0, 185, 98, 100);
  1288. /* font-size: 12px;*/
  1289. @include themeify {
  1290. font-size: themed('font-size1');
  1291. line-height: themed('font-size7');
  1292. height: themed('font-size7');
  1293. }
  1294. }
  1295. }
  1296. // 优惠券2
  1297. .discounts2 {
  1298. margin-top: 10px;
  1299. width: 100%;
  1300. display: flex;
  1301. justify-content: space-between;
  1302. .left {
  1303. /* width: 70px;*/
  1304. // height: 20px;
  1305. color: rgba(16, 16, 16, 100);
  1306. /* font-size: 20px;*/
  1307. @include themeify {
  1308. width: 160rpx;
  1309. font-size: 40rpx;
  1310. }
  1311. }
  1312. .right {
  1313. /*
  1314. height: 16px;
  1315. line-height: 28px;*/
  1316. color: rgba(255, 61, 0, 100);
  1317. @include themeify {
  1318. font-size: themed('font-size3');
  1319. height: themed('font-size3');
  1320. line-height: themed('font-size9');
  1321. }
  1322. /* font-size: 16px;*/
  1323. text-align: right;
  1324. display: flex;
  1325. }
  1326. .iconfont {
  1327. @include themeify {
  1328. font-size: themed('font-size7');
  1329. line-height: themed('font-size10');
  1330. }
  1331. /* line-height: 29px;*/
  1332. text-align: center;
  1333. color: #b3b3b3;
  1334. /* font-size: 24px;*/
  1335. }
  1336. }
  1337. // 会员活动
  1338. .member {
  1339. margin-top: 24rpx;
  1340. display: flex;
  1341. justify-content: space-between;
  1342. flex-wrap: wrap;
  1343. align-items: center;
  1344. .actively {
  1345. color: rgba(119, 119, 119, 1);
  1346. font-size: 36rpx;
  1347. }
  1348. .type,
  1349. .right {
  1350. color: rgba(16, 18, 18, 100);
  1351. font-size: 36rpx;
  1352. //line-height: 28px;
  1353. padding-right: 10px;
  1354. display: flex;
  1355. align-items: center;
  1356. }
  1357. .iconfont {
  1358. @include themeify {
  1359. font-size: themed('font-size7');
  1360. line-height: themed('font-size10');
  1361. }
  1362. /* line-height: 29px;*/
  1363. text-align: center;
  1364. color: #b3b3b3;
  1365. /* font-size: 24px;*/
  1366. }
  1367. }
  1368. // 尾部
  1369. .botton {
  1370. border: 1px solid rgba(242, 242, 242, 1);
  1371. background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
  1372. position: fixed;
  1373. //background: #fff;
  1374. width: 100%;
  1375. padding: 24rpx 40rpx;
  1376. line-height: 88rpx;
  1377. bottom: 0;
  1378. left: 0;
  1379. z-index: 999;
  1380. //padding: 0px 32rpx 32rpx;
  1381. padding-bottom: 12px;
  1382. button {
  1383. margin-left: 40rpx;
  1384. display: flex;
  1385. align-items: center;
  1386. justify-content: center;
  1387. //width: 45.8%;
  1388. // background-color: black;
  1389. // color: #fff;
  1390. // background-color: rgba(255, 255, 255, 1);
  1391. // color: rgba(0, 185, 98, 1);
  1392. background-color: rgba(0, 185, 98, 100);
  1393. color: rgba(255, 255, 255, 100);
  1394. height: 88rpx;
  1395. border-radius: 50px;
  1396. font-size: 32rpx;
  1397. }
  1398. }
  1399. .couponsuse {
  1400. color: rgba(153, 153, 153, 100);
  1401. margin-top: 10px;
  1402. font-size: 14px;
  1403. text-align: left;
  1404. font-family: AlibabaPuHui-regular;
  1405. }
  1406. .to-recharge {
  1407. padding: 0 16px;
  1408. line-height: 36px;
  1409. border-radius: 50px 0px 0px 50px;
  1410. background: linear-gradient(#FF9000, #FFB700);
  1411. color: rgba(255, 255, 255, 100);
  1412. font-size: 16px;
  1413. text-align: center;
  1414. position: absolute;
  1415. right: -16px;
  1416. top: 0;
  1417. }
  1418. /deep/.u-checkbox__icon-wrap--checked {
  1419. background-color: #2979ff !important;
  1420. border-color: #2979ff !important;
  1421. }
  1422. .amount {
  1423. // width: 41.9%;
  1424. height: 16px;
  1425. line-height: 15px;
  1426. border-radius: 0px 4px 0px 4px;
  1427. background-color: #ec4530; //rgba(0, 185, 98, 100)
  1428. color: rgba(255, 255, 255, 100);
  1429. font-size: 10px;
  1430. text-align: center;
  1431. position: absolute;
  1432. top: 0;
  1433. right: 0;
  1434. }
  1435. .card {
  1436. overflow: hidden;
  1437. padding: 10px;
  1438. margin-top: 10px;
  1439. .title {
  1440. font-weight: bold;
  1441. }
  1442. }
  1443. .cardselect {
  1444. border-radius: 8px;
  1445. border: 2px solid rgba(0, 185, 98, 1);
  1446. .title {
  1447. color: #00B962;
  1448. font-weight: bold;
  1449. }
  1450. .cardgo {
  1451. position: relative;
  1452. .cardinfo {
  1453. background-color: #57ad55;
  1454. width: 64rpx;
  1455. height: 64rpx;
  1456. position: absolute;
  1457. top: -12px;
  1458. right: -12px;
  1459. border-radius: 0 0 0 8px;
  1460. img {
  1461. width: 64rpx;
  1462. }
  1463. }
  1464. }
  1465. }
  1466. .cardno {
  1467. border: 2px solid rgba(204, 204, 204, 1);
  1468. border-radius: 8px;
  1469. .title {
  1470. font-weight: bold;
  1471. }
  1472. .cardgo {
  1473. position: relative;
  1474. .cardinfo {
  1475. background-color: rgba(204, 204, 204, 1);
  1476. width: 64rpx;
  1477. height: 64rpx;
  1478. position: absolute;
  1479. top: -12px;
  1480. right: -12px;
  1481. border-radius: 0 0 0 8px;
  1482. img {
  1483. width: 64rpx;
  1484. }
  1485. }
  1486. }
  1487. }
  1488. .classtable {
  1489. margin: 40rpx 40rpx;
  1490. .td1 {
  1491. width: 50rpx;
  1492. padding: 12rpx 0;
  1493. text-align: center;
  1494. img {
  1495. width: 48rpx;
  1496. height: 48rpx;
  1497. }
  1498. font-size: 10px;
  1499. }
  1500. .td2 {
  1501. padding-left: 16rpx;
  1502. font-size: 12px;
  1503. line-height: 24px;
  1504. .dian {
  1505. padding: 0 10rpx
  1506. }
  1507. }
  1508. }
  1509. .carImg {
  1510. margin: 0 40rpx;
  1511. img {
  1512. width: 100%;
  1513. }
  1514. }
  1515. .cardListView{
  1516. .cardListItemTitle{
  1517. color: #777777;
  1518. font-size: 36rpx;
  1519. }
  1520. .cardListItem{
  1521. margin:5px 4px;
  1522. border: 1px solid ;
  1523. padding: 3px;
  1524. border-radius: 6px;
  1525. .cardListName{
  1526. font-size: 34rpx;
  1527. }
  1528. .cardListText{
  1529. font-size: 24rpx;
  1530. display:flex;
  1531. justify-content: space-between;
  1532. }
  1533. }
  1534. .select{
  1535. border: 2px solid #00b962;
  1536. background-color: #00b962;
  1537. color:#fff;
  1538. }
  1539. }
  1540. </style>