123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743 |
- <template>
- <view>
- <ujp-navbar title="自营站充电服务费6折卡"></ujp-navbar>
- <view class="header">
- <img src="../../assets/img/9-4/productDetails.png" alt="">
- </view>
-
- <view class="main">
- <view class="infos">
- <view class="title">
- {{detail.name}}
- </view>
- <view class="price" style="font-style: italic;" v-if="detail.id">
- ¥{{detail.price}}元
- </view>
- <view class="price" style=" color: #777777;" v-else>
- 请选择规格
- </view>
- <!-- 使用范围 -->
- <view class="usable-range">
- <view class="item">
- <u-icon name="checkmark-circle"></u-icon>
- 仅可优惠充电服务费
- </view>
- <view class="item">
- <u-icon name="checkmark-circle"></u-icon>
- 新能源车主可用
- </view>
- <view class="item">
- <u-icon name="checkmark-circle"></u-icon>
- 仅平台自营站可用
- </view>
- </view>
- </view>
- <!-- 规格 -->
- <view class="specification" v-if="isPayText==''">
- <view class="title">
- 规格
- </view>
- <view class="value" @click="show=true" v-if="detail.id">
- 可用{{detail.chargeDegreeLimit}}度(有效期{{setValidity(detail.periodOfValidity)}}) <u-icon name="arrow-right" color="#999" size="28"></u-icon>
- </view>
- <view class="value" v-else @click="show=true" style=" color: #777777;">
- 请选择规格 <u-icon name="arrow-right" color="#999" size="28"></u-icon>
- </view>
-
- </view>
-
- <view class="notice2">
-
-
- <view class="upupupView" v-show="flag==1">
- <view class="upupupImg">
- <img src="@/assets/img/upupup.svg">
- </view>
-
- <p>上划查看更多内容</p>
- </view>
-
- </view>
- <!-- 适用站点 -->
- <view class="applicable-site">
- <img src="@/assets/img/9-4/标题装饰左.svg">
- 适用站点:平台自营站
- <img src="@/assets/img/9-4/标题装饰右.svg">
- <view style="font-size: 24rpx;color: rgba(119, 119, 119, 1);font-weight: 400;text-align: start;">
- 暂不适用站点:恩施花硒谷华美达安可酒店充电站、恩施青花民族医院充电站
- </view>
-
- </view>
-
- <!-- 服务费 -->
- <view class="service-charge">
- <view class="box">
- <view class="discount">
- 自营站充电服务费6折
- </view>
- </view>
- <view class="priceMain" >
- <view class="price" v-for="(item,i) in cardList"
-
- @click="checkboxChange(item.monthlyRentCard)"
- :key="i" >
- <view class="item">
- <text>{{item.monthlyRentCard.price}}</text>元
- </view>
- <view class="hint1">
- <view class="item2" >
- <p>累计{{item.monthlyRentCard.chargeDegreeLimit}}度内可用</p>
- <p>有效期{{setValidity(item.monthlyRentCard.periodOfValidity)}}</p>
- </view>
-
- </view>
-
-
- </view>
- </view>
-
-
- </view>
-
- <!-- 价格对比 -->
- <view class="price-comparison">
-
- <view class="headline">
- <view class="station">
- 青少年宫充电站
- </view>
- <span class="price-comparison1">
- 服务费6折卡
- </span>
- </view>
- <!-- 折扣价 -->
- <view class="discount-price">
- <view class="tag">
- 折后服务费
- </view>
- <view class="price">
- <span class="priceNum">0.23</span>
- <text>元/度(不含电价)</text>
- </view>
- </view>
- <!-- 原价 -->
- <view class="original-cost">
- <view class="tag">
- 原价服务费
- </view>
- <view class="price">
- <span class="priceNum">0.38</span>元/度(不含电价)
- </view>
- </view>
-
- </view>
-
- <!-- 提示2 -->
- <view class="hint2" v-if="false">
- <!-- *预估省钱金额计算不含购卡金额,月充电超出度数上限,可续购本商品。 -->
- </view>
- <view class="example">
- <view class="exampleTitle">*省钱估算</view>
- 以青少年宫充电站低谷时段价格为例,服务费为:0.38元/度,使用6折卡后服务费为:0.23元/度,每度优惠0.15元,338度(12.9元6折卡)累计可优惠50.7元,1000度(29.9元6折卡)累计可优惠150元。
- <br/>上述估算价格为当时价格,仅供参考,实时价格请前往平台各站点查询。
- <br/>预估省钱金额计算不含购卡金额,月充电超出度数上限,可续购本商品。</view>
- <u-line color="#F2F2F2" margin="80rpx 0 0 0"></u-line>
- </view>
-
- <!-- 自营站 -->
- <view class="self-station" v-if="stationslist.length" >
- <view class="headline">
- <img src="@/assets/img/9-4/标题装饰左.svg">
- 查看你所在城市的自营站
- <img src="@/assets/img/9-4/标题装饰右.svg">
-
- </view>
- <view class="map">
- <img src="../../assets/img/map.png" alt="">
- <view class="station-detail">
- <view class="title">
- <view class="title-l">
- 你附近<text style="color:#FF6923;">{{' '}}5公里{{' '}} </text>内的充电站
- </view>
- <view class="title-r" @click="gotoUrl('pages/searchPile/searchPile')" >
- 更多<u-icon name="arrow-right" color="#999999"></u-icon>
- </view>
- </view>
- <view class="station-amount">
- <view class="item">
- <view class="number">
- {{stationslist.length}}
- </view>
- <view class="name">
- 平台自营站
- </view>
- </view>
- <view class="item" v-if="false">
- <view class="number">
- 2
- </view>
- <view class="name">
- 平台自营超充站
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="main">
-
- <!-- 相关问题 -->
- <view class="related-issues">
- <view class="headline">
- <img src="@/assets/img/9-4/标题装饰左.svg">
- 关于自营站充电服务费6折卡
- <img src="@/assets/img/9-4/标题装饰右.svg">
-
-
- </view>
- <view class="item">
- <view class="question">
- Q:购买服务费6折卡可以在哪些充电站享受优惠?优惠范围是什么?
- </view>
- <view class="answer">
- A:平台自营站均(不适用站除外)可使用,其它充电站点暂不支持。服务费6折卡可享受额度范围内的充电服务费6折;但不包含电费、停车费、占位费等其他费用。
- </view>
- </view>
- <view class="item">
- <view class="question">
- Q:什么是额度上限和有效期内可用?
- </view>
- <view class="answer">
- A:在产品有效期内,使用服务费6折卡累计抵扣度数达到规定电量额度上限后,<span style="color: #00b962;font-weight: bold;">本单超出充电额度部分仍然以6折优惠计算</span>,后续订单将不再继续享受服务费6折优惠。产品有效期到期后,即使累计使用度数没有达到额度上限,后续订单也不再继续享受服务费6折优惠。
- </view>
- </view>
- <view class="item">
- <view class="question">
- Q:我有多张不同的充电卡和优惠券,可以和服务费6折卡同时使用吗?
- </view>
- <view class="answer">
- A:同一笔订单中,暂不支持服务费6折卡与其它充电卡(服务费包月会员或其它折扣卡)一起使用;6折卡可以与账户余额或优惠券一起使用。
- </view>
- </view>
- <view class="item">
- <view class="question">
- Q:服务费6折卡的度数上限和有效期可以累计吗?
- </view>
- <view class="answer">
- A:不可以。当现有服务费6折卡达抵扣上限或剩余有效期为0天时,用户可以续购服务费6折卡。
- </view>
- </view>
- <view class="item">
- <view class="question">
- Q:启动充电后或结束充电后购买的服务费6折卡,可以使用吗?
- </view>
- <view class="answer-form">
- <view class="title">
- 是否可以使用服务费6折卡
- </view>
- <view class="before">
- <view class="b-top">
- 启动充电前购买
- </view>
- <view class="b-bottom">
- 本单结算可以使用
- </view>
- </view>
- <view class="later">
- <view class="l-top">
- 启动充电后购买
- </view>
- <view class="l-bottom">
- 本单不可用,下一单结算可以使用
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 产品细则 -->
- <view class="product-rules">
- <view class="headline">
- <img src="@/assets/img/9-4/标题装饰左.svg">
- 充电服务费6折卡产品细则
- <img src="@/assets/img/9-4/标题装饰右.svg">
-
-
- </view>
- <!-- 产品介绍 -->
- <view class="item">
- <view class="title">
- 产品介绍:
- </view>
- <view class="content">
- <p> - 购卡的用户在平台自营站(不适用站除外)享受有效期内充电服务费6折的权益,该产品不可转赠。
- </p>
- <p>- 该产品有两种不同规格,单一账户不可重复购买,度数及有效期不可累加。
- </p>
- <p>- 购买成功后,可在{{projectName}}公众号 - 汽车充电 - 我的中查看。</p>
- </view>
- </view>
- <!-- 服务说明 -->
- <view class="item">
- <view class="title">
- 服务说明:
- </view>
- <view class="content">
- <p>- 购买自营站充电服务费6折卡可享平台自营站(不适用站除外)服务费6折权益,该产品不可转赠。</p>
- <p>- 该产品针对充电服务费享受折扣,不包含电费、停车费、占位费等其他费用。</p>
- <p>- 自营站充电服务费6折卡购买后即刻生效,启动充电前购买成功支持本单可用,启动充电后完成购买仅下一单可用。</p>
- <p>- 338度自营站充电服务费6折卡(限338度,有效期30天)和1000度自营站充电服务费6折卡(限1000度,有效期90天)均为同一种产品,是充电服务费6折卡的两种不同规格。</p>
- </view>
- </view>
- <!-- 适用对象 -->
- <view class="item">
- <view class="title">
- 适用对象:
- </view>
- <view class="content">
- <p>- 新能源车主可购买,购买该卡的手机号所绑定的{{projectName}}为使用该卡的唯一账号。</p>
- <p>- 该产品建议符合以下场景购买:①未拥有“充电服务费折扣卡”的车主;②已购买“充电服务费折扣卡”且该卡已过期的车主。</p>
- </view>
- </view>
- <!-- 适用充电站 -->
- <view class="item">
- <view class="title">
- 适用充电站:
- </view>
- <view class="content">
- <p>- 自营站充电服务费6折卡,平台车主可在平台自营站(不适用站除外)使用,其他充电站点不支持使用。</p>
-
- </view>
- </view>
- <!-- 叠加规则 -->
- <view class="item">
- <view class="title">
- 叠加规则:
- </view>
- <view class="content">
- <p>- 该卡与其他折扣类电卡(如:服务费包月会员等)针对同一订单不可叠加使用。</p>
- <p>- 该卡与账户余额和优惠券可叠加使用</p>
- </view>
- </view>
- <!-- 开票说明 -->
- <view class="item">
- <view class="title">
- 开票说明:
- </view>
- <view class="content">
- <p>- 如需开具发票,请前往{{projectName}}公众号 - 汽车充电 - 我的 - 我的发票中申请。</p>
-
- </view>
- </view>
- </view>
-
-
-
- </view>
- <!-- 拒绝交易说明 -->
- <view class="explain">
- <view class="headline">
- 自营站充电服务费6折卡拒绝交易说明
- </view>
- <view class="title">
- 购卡人/持卡人存在以下情形的,{{projectName}}有权拒绝交易、暂停或终止对购卡人/持卡人的服务,所有损失应由购卡人/持卡人自行承担:
- </view>
- <view class="answer">
- <p> 1、发卡人、售卡企业根据国家适用法律、法规核实购卡人/持卡人身份及自营站充电服务费6折卡交易信息等情况,遭拒绝的;</p>
- <p> 2、冒用他人身份或使用伪造、变造身份证明文件购买或使用自营站充电服务费6折卡的;</p>
- <p>3、在发卡人公布的售卡或充值渠道之外购买自营站充电服务费6折卡的;</p>
- <p>4、在购买或使用自营站充电服务费6折卡时存在欺诈行为;</p>
- <p>5、违反本章程购买或使用自营站充电服务费6折卡;</p>
- <p>6、使用伪造、变造的自营站充电服务费6折卡;或有其他损害发卡人、售卡企业或其他购卡人/持卡人的合法权益的情形。</p>
- </view>
- </view>
- <!-- 政策变更说明 -->
- <view class="explain">
- <view class="headline">
- 自营站充电服务费6折卡政策变更说明
- </view>
- <view class="answer">
- 如本自营充电服务费6折卡方案发生任何变更、调整、终止的,{{projectName}}有权提前进行公示,届时请以{{projectName}}更新并发布的最新版本为准。
- </view>
- </view>
- <!-- 价格说明 -->
- <view class="price-explain">
- <view class="title">
- <view class="title-l">
- 价格说明
- </view>
- <view class="title-r" v-if="false">
- 收起<u-icon name="arrow-up" color="#999999"></u-icon>
- </view>
- </view>
- <view class="explain-item">
- <view class="item-title">
- 划线价格
- </view>
- <view class="item-value">
- 划线的价格是商品的专柜价、吊牌价、正品零售价、指导价.曾经展示过的销售价等,仅供你参考。
- </view>
- </view>
- <view class="explain-item">
- <view class="item-title">
- 未划线价格
- </view>
- <view class="item-value">
- 未划线的价格是商品的销售标价,具体的成交价格因使用优惠券、积分等发生变化,最终以订单结算价格为准。
- </view>
- </view>
- <p>此说明仅当出现价格比较时有效。若这件商品针对划线价格进行了特殊说明,以特殊说明为准。</p>
- </view>
- <!-- 底部 -->
- <view class="bottom">
- <view class="option" @click="openModal">
- <view class="icon">
- <u-icon name="server-fill" size="40"></u-icon>
- </view>
- <view class="text">
- 联系客服
- </view>
- </view>
- <view class="option" @click="gotoUrl('pages/discountCard/myOrder')">
- <view class="icon">
- <u-icon name="order" size="40"></u-icon>
- </view>
- <view class="text">
- 我的订单
- </view>
- </view>
- <view class="button" v-if="isPayText==''"
- @click="show = true" >
- 立即购买
- </view>
-
- <view class="button isPayText" v-else
- @click="isPayTextBtn" >
- {{isPayText}}
- </view>
- </view>
- <!-- 弹出层 -->
- <view >
- <u-popup v-model="show" mode="bottom" :closeable='true'>
-
- <view class="popup">
- <!-- 商品信息 -->
- <view class="class-infos">
- <view class="picture">
- <img :src="detail.image" alt="">
- </view>
- <view class="infos">
- <view class="class-name">
- {{detail.name}}
- </view>
- <view class="price">
- {{detail.price}}元
- </view>
- <view class="price-detail" v-if="detail.id" >
- <!-- 已选:可用338度(有效期30天) -->
- 已选:可用{{detail.chargeDegreeLimit}}度(有效期{{setValidity(detail.periodOfValidity)}})
-
- </view>
- <view class="price-detail" v-else style=" color: rgb(119, 119, 119);" >
- <!-- 已选:可用338度(有效期30天) -->
- 请选择规格
- </view>
- </view>
- </view>
- <!-- 规格 -->
- <view class="specification">
- <view class="title">
- 规格
- </view>
- <view class="specification-options">
- <view v-for="(item,i) in cardList" :key="i"
- @click="checkboxChange(item.monthlyRentCard)"
- :class="{
- 'item-checked':cardId==item.monthlyRentCard.id
- }"
- class="options-item ">
- 可用{{item.monthlyRentCard.chargeDegreeLimit}}度(有效期{{setValidity(item.monthlyRentCard.periodOfValidity)}})
- </view>
-
- </view>
- </view>
- <!-- 数量 -->
- <view class="amount" v-if="false">
- <view class="title">
- 数量(单笔订单限购1件)
- </view>
- <u-number-box v-model="value" max="1"></u-number-box>
- </view>
- </view>
- <view class="bottom" style="box-shadow: none;">
- <view class="option" @click="openModal">
- <view class="icon">
- <u-icon name="server-fill" size="40"></u-icon>
- </view>
- <view class="text">
- 联系客服
- </view>
- </view>
- <view class="option" @click="gotoUrl('pages/discountCard/myOrder')">
- <view class="icon">
- <u-icon name="order" size="40"></u-icon>
- </view>
- <view class="text">
- 我的订单
- </view>
- </view>
- <view class="button" @click="openPayModel">
- 立即购买
- </view>
- </view>
- </u-popup>
-
- </view>
- <u-action-sheet :list="list" @click="click" v-model="showPay"></u-action-sheet>
- <u-modal v-model="showModel" :show-cancel-button="true" @cancel="getUserInfo()" @confirm="confirm"
- confirm-text="支付成功?" title="扫码支付">
- <view style="
- text-align: center;
- ">
- <img id="qrcode2" :src="qrCodeImg">
- </view>
- <view style="
- text-align: center;
- ">请使用支付宝扫码</view>
-
- </u-modal>
-
- <u-modal v-model="show1" @confirm="gotoGz" cancel-text="暂不关注" confirm-text="前往关注" confirm-color="#53b56b"
- :show-cancel-button="true" ref="uModal2" :asyncClose="true">
- <view style="padding: 15px;">请先关注<span style=" color: #53b56b;">{{projectName}}</span>公众号,购买折扣卡</view>
-
-
- </u-modal>
-
- <u-modal v-model="show3" @confirm="confirmPhone" confirm-text="拨打电话" confirm-color="#606266"
- :show-cancel-button="true" ref="uModal" :asyncClose="true" title="客服电话" :content="consumerPhone"
- :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
-
- <u-modal v-model="infoSet1" @confirm="infoSet1=false,gotoUrl('pages/user/dataSet')" cancel-text="取消"
- confirm-text="完善个人信息" confirm-color="#53b56b" :show-cancel-button="true" ref="uModal2" :asyncClose="true">
- <view style="padding: 15px;">购买折扣卡需要完善以下2点<br />
- 1.填写真实姓名<br />
- 2.填写车牌号<br />
- </view>
- </u-modal>
- <img id="qrcode" style="display: none;">
-
-
- </view>
- </template>
- <script>
- import * as API_weixin from '@/apis/weixin.js'
-
- import * as Pay from '@/apis/weixin.js'
- import * as API from '@/apis/card.js'
- import * as loginApi from '@/apis/login.js'
- import * as api from '@/apis/site.js';
- import * as WxJsApi from '@/utils/wxJsApi.js'
-
-
- import QRCode from 'qrcodejs2'
- import {
- newDate,
- convertCanvasToImage,
- } from '@/utils'
- import {
- wxPayJs
- } from '@/utils/wxpay'
-
- export default {
- data() {
- return {
- stationslist:[],
- checked: "false",
- cardId: '',
- qrCodeImg: "",
- showModel: false,
- show:false,//选择规格
- showPay:false,//支付方式
- value: 1,
- cardList: [],
- projectName: "",
- list: [{
- text: '微信',
-
- }, {
- text: '支付宝'
- }],
- submitForm: {},
- ykgz: '',
- detail: {},
- ispay: false,
- show3: false,
- show2: true,
- show1: false,
- infoSet: true,
- infoSet1: false,
- userCard: null,
- isReady: false,
- userInfo: {},
- elderStatus: false,
- consumerPhone: "400-8899-619",
- longitude: '',
- latitude: '',
- scrollLeftSet: 0,
- scrollLeftOldSet: 0,
- scrollLeftSetBl: false,
- flag: 0, //0 初始化, 1 ,开始判断, 2已经滑动
- startTime:null,
-
- }
- },
- onReady() {
- var consumerPhone = "400-8899-619"
- // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
- if (consumerPhone) {
- this.consumerPhone = consumerPhone
- }
-
- //this.ykgz = this.carhelp.getConfig().ykgz
-
- var userCard = this.carhelp.getPersonInfoPlus().userCard
- if(userCard&&userCard.classify==2){
- this.userCard=userCard
- this.ispay = this.userCardBool(this.userCard)
- }
-
-
- //this.checkSubscribe()
- this.getCardList();
-
- WxJsApi.getLocation().then((res) => {
-
- this.latitude = parseFloat(res.latitude);
- this.longitude = parseFloat(res.longitude);
-
- this.searchStationData();
- }).catch(error => {
- uni.showToast({
- title:JSON.stringify(error)
- })
- })
- },
- onShow() {
-
- //this.checkSubscribe();
-
- },
- computed: {
- isPayText(){
- var memberLevel=1
- if(this.userInfo.memberLevel){
- memberLevel=this.userInfo.memberLevel
- }
- var text=""
- if(this.cardList.length==0){
- text="未上架"
- }else if(this.ispay&&this.startTime&&this.startTime>0){
- text=this.detail.startBuyTime.substring(0,10)+"上架"
- }else if(this.ispay&&this.userCard.classify=="1"){
- text="已购买其他卡"
- }else if(this.userInfo.userType=='1'){
- text="游客无法购买"
- }else if(!this.isReady){
- text="加载中"
- }else if(this.ispay){
- text=this.userCard.endTime.substring(0,10)+"到期"
- }else if(!this.show2){
- text="关注公众号"
- }else if(!this.infoSet){
- text="完善个人信息"
- }
-
- return text
- },
- endCardBool() {
- if (!this.cardList.length) {
- return false;
- }
- var date = new Date().getTime()
- if (!this.detail.endTime) {
- return true;
- }
- var date2 = newDate(this.detail.endTime).getTime();
-
- if (date < date2) {
- return true;
- } else {
- return false;
- }
- }
- },
- onPageScroll(e) {
-
- if (this.flag == 1) {
- if (e.scrollTop >= 50) {
- this.flag = 2;
- } else {
-
- }
- }
- },
- methods: {
- openPayModel(){
- if (!this.cardId) {
- uni.showToast({
- title:"请选择产品规格"
- })
- return
- }
- this.showPay=true;
- },
- openModal() {
- //this.show3 = true;
- uni.navigateTo({
- url:"/pages/service/service"
- })
- },
- searchStationData(obj) {
- let data1 = {
- latitude: this.latitude,
- longitude: this.longitude,
- findType: "1",
- platformType:'1',
- radius: 5,
- pageIndex: 1,
- pageSize: 999
- };
-
- uni.showLoading({})
-
- if (this.carhelp.getPersonInfo()) {
- data1.openId = this.carhelp.getOpenId()
- }
-
- api.getChargingStationData(data1).then(res => {
- uni.hideLoading()
-
- var stationslist=res.data.data
- this.stationslist = stationslist;
-
-
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
-
- },
- isPayTextBtn(){
- if(this.isPayText=='关注公众号'){
- this.gotoGz()
- }else if(this.isPayText=='完善个人信息'){
- uni.navigateTo({
- url:"/pages/user/dataSet"
- })
- }
- },
- confirmPhone() {
- this.show = false;
- uni.makePhoneCall({
- phoneNumber: this.consumerPhone //仅为示例
- });
- },
- checkboxChange(monthlyRentCard) {
-
- this.detail = monthlyRentCard;
- this.cardId = monthlyRentCard.id
- uni.showToast({
- title: "已选中 "+this.detail.price+"元,可用"+this.detail.chargeDegreeLimit+"度"
- })
- // monthlyRentCard.checked = true
- // for (var i in this.cardList) {
- // var obj = this.cardList[i].monthlyRentCard;
- // if (this.cardId == obj.id) {
-
- // } else {
- // obj.checked = false
- // }
- // }
-
- },
- gotoGz() {
- //this.carhelp.setGzDate()
- var url = process.car.gzUrl;
- window.location.href = url
-
- },
- checkSubscribe() {
-
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API_weixin.checkSubscribe({
- openId: this.carhelp.getOpenId()
- }).then((res) => {
-
- uni.hideLoading()
- if (res.data == "0") {
- this.show1 = true
-
- } else {
- this.getUserInfo();
-
- //this.getCardList();
- this.show2 = true;
- //this.carhelp.setGzDate()
- }
-
- //setGzDate
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
-
- },
- userCardBool(userCard) {
- if(this.startTime&&this.startTime>0){
- console.log(this.startTime)
- return true
- }
-
- if (userCard) {
- var date = new Date().getTime()
- var date2 = newDate(userCard.endTime).getTime();
- if (date < date2) {
- return true;
- }
- }
- return false
- },
- getCardList() {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API.cardList({
- type:2
- }).then((response) => {
-
- uni.hideLoading()
- this.cardList = response.data.cardList;
-
- if (this.cardList.length) {
- this.detail = {
- ...this.cardList[0].monthlyRentCard
- }
- this.detail.id=null
- // this.cardId = this.detail.id;
- // this.cardList[0].monthlyRentCard.checked = true
- if(this.detail.startBuyTime){
- this.startTime=(newDate(this.detail.startBuyTime).getTime()-new Date().getTime())
- }
- }
- this.getUserInfo()
- this.isReady = true;
- //cardId: this.cardId
-
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
- },
- getUserInfo() {
-
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- loginApi.findByOpenId({
- openId: this.carhelp.getOpenId(),
- noerror: true
- }).then((res) => {
-
-
- if (res.code == 200 && res.result) {
-
- if (res.data.regUser) {
- var userInfo = res.data.regUser
- this.userInfo = userInfo;
- // if (userInfo.userType == "1") {
-
- // } else if (userInfo.carId && userInfo.realName) {
- // this.infoSet = true;
-
- // } else {
- // this.infoSet = false;
- // if (this.endCardBool) {
- // this.infoSet1 = true;
- // }
-
- // }
-
- var userCard = res.data.userCard;
- this.userCard = userCard
- this.ispay = this.userCardBool(userCard)
-
- } else {
-
- }
- if (this.flag == 0) {
- this.flag = 1;
- setTimeout(() => {
- this.flag = 2;
- }, 5000)
- }
- }
- uni.hideLoading();
-
-
-
-
-
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- submit(type) {
-
- if (!this.endCardBool) {
- return
- }
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API.openCard({
- cardId: this.cardId
- }).then((response) => {
- this.submitForm.id = response.data.orderInfoId
-
- if (type == 0) {
- this.wxpy()
- }
- if (type == 1) {
- this.alpy()
- }
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
-
- },
- alpy() {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- var listcanvas = document.getElementsByTagName('canvas')
-
- if (listcanvas.length > 0) {
- document.getElementById("qrcode").removeChild(document.getElementsByTagName('canvas')[0]);
- }
- Pay.alpay(this.submitForm).then((response) => {
-
- let qrcode = new QRCode('qrcode', {
- width: 200,
- height: 200,
- text: response.data.qr_code,
- correctLevel: QRCode.CorrectLevel.M,
-
- })
- this.outOrderNo = response.data.outOrderNo;
- var canvas = document.getElementsByTagName('canvas')[0];
- this.qrCodeImg = convertCanvasToImage(canvas);
- uni.hideLoading()
- this.showModel = true
-
- }).catch(error => {
- uni.showToast({
-
- title: error
- })
- })
- },
- wxpy() {
-
- Pay.wxpay(this.submitForm).then((response) => {
-
- if (!response.result) {
- uni.showToast({
- title: response.message
- })
- return
- }
- var data = response.data
- uni.hideLoading()
- //("Pay+"+new Date().getTime())
- wxPayJs(data);
-
- }).catch(error => {
- uni.showToast({
-
- title: error
- })
-
- })
- },
- confirm() {
- this.getUserInfo();
- uni.redirectTo({
- url: "/pages/discountCard/paymentSuccess?id=" + this.outOrderNo
- })
- },
- click(index) {
- console.log(`点击了第${index + 1}项,内容为:${this.list[index].text}`)
- this.submit(index);
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #fff;
- padding-bottom: 200px;
- }
- </style>
- <style>
- @keyframes movepoint {
- 25% {
- top: 10px;
- }
- 100% {
- top: 15px;
- }
- }
- .upupupImg {
- height: 80px;
- }
- .upupupView {
- text-align: center;
- font-size: 12px;
- padding: 30rpx;
- border-radius: 12px;
- position: absolute;
- background: rgb(0 0 0 / 70%);
- top: 50%;
- transform: translate(-50%);
- left: 50%;
- color: #fff;
- z-index: 999;
- }
- .upupupView img {
- top: 15px;
- position: relative;
- width: 60px;
- z-index: 999;
- animation: movepoint 2s infinite;
- -webkit-animation: movepoint 2s infinite;
- }
- </style>
- <style lang="scss" scoped>
- .header {
- width: 100%;
- height: 200px;
- img{
- width: 100%;
- height: 100%;
- }
- // background: linear-gradient(30deg, rgba(59, 182, 254, 1) 13.4%, rgba(0, 185, 98, 1) 85.87%);
- // position: relative;
- // padding: 48rpx;
- .cover {
- width: 160rpx;
- height: 330rpx;
- position: absolute;
- right: 32rpx;
- bottom: 0;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .text1 {
- color: rgba(255, 255, 255, 1);
- font-size: 64rpx;
- font-family: 'YouSheBiaoTiHei';
- }
- .tag {
- display: flex;
- align-items: center;
- color: #fff;
- margin-bottom: 16rpx;
- .icon {
- margin-right: 8rpx;
- }
- }
- .usable-range {
- margin-top: 30rpx;
- color: rgba(49, 36, 102, 1);
- font-size: 24rpx;
- }
- }
-
-
- .main {
- padding: 24rpx 40rpx 0rpx 40rpx;
- .infos {
- color: rgba(51, 51, 51, 1);
- font-size: 40rpx;
- .title,
- .price {
- font-weight: bold;
- }
- .price {
- margin: 16rpx 0 32rpx;
- font-size: 40rpx;
- }
- }
- // 使用范围
- .usable-range {
- background-color: rgba(246, 246, 246, 1);
- padding: 16rpx 24rpx 24rpx;
- font-size: 24rpx;
- display: flex;
- flex-wrap: wrap;
- border-radius: 4px;
- .item {
- width: 50%;
- margin-top: 8rpx;
- color: rgba(51, 51, 51, 1);
- ::v-deep.u-icon--right {
- margin-right: 4rpx;
- }
- }
- }
- // 规格
- .specification {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 48rpx;
- .title {
- color: rgba(119, 119, 119, 1);
- font-size: 32rpx;
- }
- .value {
- color: rgba(16, 16, 16, 1);
- font-size: 32rpx;
- ::v-deep.uicon-arrow-right {
- margin-left: 8rpx;
- }
- }
- }
- // 适用站点
- .applicable-site {
- text-align: center;
- margin: 80rpx 0;
- color: #333333 ;
- font-weight: bold;
- font-size: 36rpx;
- img{
- width: 48rpx;
- height: 24rpx;
- margin: 0 16rpx;
- }
-
- }
- // 服务费
- .service-charge {
- border-radius: 12px;
- border: 1px solid rgba(0, 185, 98, 1);
- padding: 80rpx 40rpx 56rpx;
- position: relative;
- .box {
- width: 400rpx;
- // height: 64rpx;
- position: absolute;
- top: -32rpx;
- right: 0;
- left: 0;
- margin: 0 auto;
- .discount {
- margin: 0 auto;
- height: 32px;
- line-height: 32px;
- background-color: rgba(0, 185, 98, 1);
- text-align: center;
- box-shadow: 0px 0px 0px 16px rgba(255, 255, 255, 1);
- color: #fff;
- font-size: 32rpx;
- font-weight: bold;
- }
- }
- .priceMain{
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- .price {
- display: flex;
- justify-content: space-between;
- flex-direction: column;
- margin-top: 20rpx;
- .item {
- width: 272rpx;
- height: 128rpx;
- line-height: 128rpx;
- border-radius: 8px;
- background: linear-gradient(180deg, rgba(77, 196, 140, 1) 0%, rgba(122, 212, 170, 1) 24%, rgba(255, 255, 255, 1) 81%);
- text-align: center;
- border: 1px solid rgba(77, 196, 140, 1);
- color: rgba(16, 16, 16, 1);
- z-index: 699;
- text {
- font-size: 64rpx;
- }
- }
- }
- .hint1 {
- display: flex;
- justify-content: space-between;
- text-align: center;
- margin-top: 20rpx;
- color: rgba(51, 51, 51, 1);
- font-size: 24rpx;
- justify-content: center;
- .item {
- width: 272rpx;
- }
- }
- }
-
- // 价格对比
- .price-comparison {
- padding: 24rpx;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
- margin-top: 48rpx;
- .price-comparison1{
- border-radius: 0px 8px 0px 12px;
- background-color: rgba(0, 185, 98, 1);
- padding :8rpx 18rpx;
- line-height: 40rpx;
- font-size: 24rpx;
- color:#fff;
- position: relative;
-
- top: -26rpx;
- left: 24rpx;
- }
- .headline {
- display: flex;
- align-items: center;
- font-weight: bold;
- font-size: 36rpx;
- justify-content: space-between;
- .station {
- color: rgba(16, 16, 16, 1);
- }
- .time {
- color: #999999;
- }
- img{
- width: 20px;
- height: 10px;
- margin: 0 6px;
- }
- }
- // 折扣价
- .discount-price {
- display: flex;
- align-items: center;
- margin-top: 24rpx;
-
-
- .tag {
- width: 176rpx;
- height: 48rpx;
- line-height: 48rpx;
- background-color: rgba(214, 251, 234, 1);
- color: rgba(0, 185, 98, 1);
- font-size: 24rpx;
- text-align: center;
- }
- .price {
- color: rgba(0, 0, 0, 1);
- font-size: 44rpx;
- margin-left: 16rpx;
- .priceNum {
- font-weight: bold;
- }
- text {
- color: rgba(153, 153, 153, 1);
- font-size: 28rpx;
- margin-left: 8rpx;
- }
- }
- }
- // 原价
- .original-cost {
- display: flex;
- align-items: center;
- margin-top: 16rpx;
- .tag {
- width: 176rpx;
- height: 48rpx;
- line-height: 48rpx;
- background-color: rgba(242, 242, 242, 1);
- color: rgba(153, 153, 153, 1);
- font-size: 24rpx;
- text-align: center;
- text-decoration: line-through;
- }
- .price {
- color: rgba(153, 153, 153, 1);
- font-size: 28rpx;
- margin-left: 16rpx;
- text-decoration: line-through;
- .priceNum{
- font-weight: bold;
- margin-right: 4rpx;
- }
- }
- }
-
- }
- .example {
- margin-top: 20rpx;
- .exampleTitle{
-
- color: rgba(0, 185, 98, 1);
- font-size: 24rpx;
- font-weight: bold;
- margin-bottom: 10rpx;
- }
-
- color: rgba(119, 119, 119, 1);
- font-size: 24rpx;
- }
- .hint2 {
- color: rgba(153, 153, 153, 1);
- font-size: 24rpx;
- line-height: 34rpx;
- margin-top: 32rpx;
- }
- // 相关问题
- .related-issues {
- .headline {
- color: rgba(16, 16, 16, 1);
- font-size: 44rpx;
- font-family: 'YouSheBiaoTiHei';
- text-align: center;
- img{
- width: 20px;
- height: 10px;
- margin: 0 6px;
- }
- }
- .question {
- color: rgba(51, 51, 51, 1);
- line-height: 40rpx;
- font-weight: bold;
- margin-top: 32rpx;
- }
- .answer {
- color: #333333;
- margin-top: 16rpx;
- line-height: 40rpx;
- }
- .answer-form {
- display: flex;
- border: 1px solid #cccccc;
- height: 150rpx;
- font-size: 22rpx;
- margin-top: 16rpx;
- .title {
- //padding: 0 16rpx;
- text-align: center;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #333333;
- line-height: 40rpx;
- }
- .before,
- .later {
- min-width: 234rpx;
- .b-top,
- .l-top {
- color: #333333;
- height: 56rpx;
- line-height: 56rpx;
- text-align: center;
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 0 16rpx;
- }
- .b-top {
- border: 1px solid #cccccc;
- border-top: none;
- }
- .l-top {
- border-bottom: 1px solid #cccccc;
- }
- .b-bottom,
- .l-bottom {
- height: 94rpx;
- color: #777777;
- text-align: center;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .b-bottom {
- border-left: 1px solid #cccccc;
- border-right: 1px solid #cccccc;
-
- }
- .l-bottom {
- line-height: 44rpx;
- }
- }
- }
- }
- // 产品细则
- .product-rules {
- margin-top: 80rpx;
- .headline {
- color: rgba(16, 16, 16, 1);
- font-size: 44rpx;
- font-family: 'YouSheBiaoTiHei';
- text-align: center;
- img{
- width: 20px;
- height: 10px;
- margin: 0 6px;
- }
- }
- .item {
- .title {
- color: #111111;
- font-weight: bold;
- margin-bottom: 16rpx;
- margin-top: 32rpx;
- }
- .content {
- color: #333333;
- p {
- margin-bottom: 24rpx;
- line-height: 40rpx;
- font-size: 24rpx
- }
- }
- }
- }
-
- }
-
- // 自营站
- .self-station{
- margin-top: 48rpx;
- .headline{
- color: rgba(16, 16, 16, 1);
- font-size: 44rpx;
- font-family: 'YouSheBiaoTiHei';
- text-align: center;
- img{
- width: 20px;
- height: 10px;
- margin: 0 6px;
- }
- }
- .map{
- margin-top: 32rpx;
- position: relative;
- img{
- width: 100%;
- height: 100%;
- }
- .station-detail{
-
- padding: 60rpx;
- border-radius: 8px;
- background-color: rgba(255, 255, 255, 1);
- position: absolute;
- bottom:40rpx;
- left: 40rpx;
- right: 40rpx;
- .title{
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .station-amount{
- display: flex;
- justify-content: center;
- align-items: center;
- text-align: center;
- margin-top: 40rpx;
- .number{
- color: rgba(16, 16, 16, 1);
- font-size: 64rpx;
- }
- .name{
- color: rgba(153, 153, 153, 1);
- margin-top: 8rpx;
- }
- }
- }
-
- }
- }
- // 拒绝交易说明
- .explain{
- padding:0 30rpx;
- margin-top: 80rpx;
- line-height: 48rpx;
- .headline{
- color: rgba(16, 16, 16, 1);
- font-size: 44rpx;
- font-family: 'YouSheBiaoTiHei';
- text-align: center;
- margin-bottom: 32rpx;
- img{
- width: 20px;
- height: 10px;
- margin: 0 6px;
- }
- }
- .title{
- color: #111111;
- font-weight: bold;
- padding: 0 10rpx;
-
- }
- .answer{
- color: #333333;
- padding: 0 10rpx;
- margin-top: 16rpx;
- }
- }
- // 价格说明
- .price-explain{
- padding: 0 40rpx;
- margin-top: 80rpx;
- color: rgba(153, 153, 153, 1);
- font-size: 24rpx;
- line-height: 34rpx;
- .title{
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 32rpx;
- ::v-deep.uicon-arrow-up{
- margin-left: 8rpx;
-
- }
- .title-l{
- color: rgba(51, 51, 51, 1);
- }
- .title-r{
- color: rgba(119, 119, 119, 1);
- }
- }
- .explain-item{
- margin-bottom: 40rpx;
- .item-title{
- margin-bottom: 16rpx;
- }
- }
- }
- // 底部
- .bottom{
- padding: 30rpx 40rpx;
- background-color: rgba(255, 255, 255, 1);
- box-shadow: 0px -6px 6px 0px rgba(0, 0, 0, 0.05);
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- align-items: center;
- z-index: 999;
- justify-content: space-between;
- .option{
- color:#101010;
- // margin-right: 32rpx;
- .icon{
- text-align: center;
- }
- .text{
- font-size: 24rpx;
- margin-top: 8rpx;
- }
- }
- .button{
- width: 400rpx;
- height: 96rpx;
- line-height: 96rpx;
- border-radius: 50px;
- background: #00b962;
-
- color: rgba(255, 255, 255, 1);
- font-size: 36rpx;
- text-align: center;
- // margin-left: auto;
- }
- .isPayText{
- background:#9E9E9E
- }
- }
- .popup{
- padding: 32rpx;
- padding-top:80rpx;
- height:850rpx;
- padding-bottom:50rpx;
- border-radius: 12px;
- .class-infos{
- display: flex;
- align-items: center;
- .picture{
- width: 152rpx;
- height: 152rpx;
- border-radius: 4px;
- overflow: hidden;
- img{
- width: 100%;
- height: 100%;
- }
- }
- .infos{
- margin-left: 24rpx;
- .class-name{
- color: rgba(51, 51, 51, 1);
- font-size: 40rpx;
- font-weight: bold;
-
- }
- .price{
- color: rgba(16, 16, 16, 1);
- font-size: 32rpx;
- margin-top: 12rpx;
-
- }
- .price-detail{
- color: rgba(16, 16, 16, 1);
- font-size: 28rpx;
- margin-top: 12rpx;
-
- }
- }
- }
- // 规格
- .specification{
- margin-top: 80rpx;
- .title{
- color: rgba(119, 119, 119, 1);
- }
- .specification-options{
- margin-top: 24rpx;
- .options-item{
- width: 442rpx;
-
- height: 64rpx;
- line-height: 64rpx;
- border-radius: 50px;
- background-color: rgba(239, 244, 242, 1);
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- text-align: center;
- margin-bottom: 24rpx;
- }
- .item-checked{
- background-color: rgba(0, 185, 98, 1);
- color: rgba(255, 255, 255, 1);
- }
- }
- }
- // 数量
- .amount{
- margin-top: 80rpx;
- .title{
- color: rgba(119, 119, 119, 1);
- margin-bottom: 24rpx;
- }
- }
-
-
-
-
- }
- ::v-deep.u-drawer-content{
- border-radius: 12px;
- }
- </style>
|