index.vue 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346
  1. <template>
  2. <view>
  3. <!-- 20240830取消提示弹框 -->
  4. <view v-if="false" @click="endGuide" class="guide-box">
  5. <!-- 引导框,这里可以放置引导提示信息 -->
  6. <view
  7. style="margin: 30% auto;display: grid;justify-items: center;border: 5px double #004aff94;width: 250px;height: 250px;align-content: center;background-color: white;border-radius: 10px">
  8. <view style="display: flex;align-items: center;color: #c50303;font-size: x-large;font-weight: 800;">
  9. <image style="width: 50px;height: 50px;" src="../../static/quan.png"></image>
  10. <text>领取一元支付券</text>
  11. </view>
  12. <text class="shake-animation">选择插座,购买安全险;</text>
  13. <text class="shake-animation">领取支付优惠券,开始充电;</text>
  14. <view style="display: flex;align-items: center;color: #787272;font-size: small;margin-top: 60px">
  15. <image style="width: 25px;height: 25px;" src="../../static/mayi.png"></image>
  16. <text>蚂蚁保</text>
  17. <image style="width: 25px;height: 25px;" src="../../static/x.png"></image>
  18. <image style="width: 23px;height: 23px;" src="../../static/zongan.png"></image>
  19. <text>众安保险</text>
  20. </view>
  21. <!-- <button style="width: 150px;border-radius: 20px;margin-top: 10px" type="primary"
  22. @click="endGuide">我知道了</button> -->
  23. </view>
  24. </view>
  25. <view class="head">
  26. <view style="float: left;">
  27. <view id="header-content1">
  28. <view id="header-score1">
  29. 余额:<span>{{goods==''?0:data.balance}}</span>
  30. </view>
  31. </view>
  32. <view class="cz-panel">
  33. <view class="fz1 cz-btn" @click="selectCF();">
  34. 充值
  35. </view>
  36. </view>
  37. </view>
  38. <view style="float: right;display: flex;">
  39. <view @click="mycenter()" style="margin-right: 5px;color: #4592FF;">
  40. 个人中心
  41. </view>
  42. <view @click="customers()" style="margin-right: 5px;color: #4592FF;">联系客服</view>
  43. </view>
  44. </view>
  45. <view>
  46. <uni-popup ref="popup" background-color="#fff;" :is-mask-click="false">
  47. <view style="width: 80%; text-align: center; font-size: 16px; margin: 0 auto; padding: 7px;">
  48. 充值活动中, 充值金额仅用于【充电使用】, 不支持设备自动退款, 如需退款请点击右上角【联系客服】联系设备运营者退款
  49. </view>
  50. <span style=" display: flex;
  51. align-items: center;
  52. justify-content: center;
  53. flex-wrap: wrap;">
  54. <view v-if="recharge.length<1">暂无充值套餐</view>
  55. <view v-for="(item, index) in recharge" :key="index" class="each_option_recharge">
  56. <view class="item" @click="payOrder(item[0], item[1])">
  57. <view class="item-number-p">
  58. <image class="icon" src="../../static/chong.png" />
  59. <text>{{ item[0] }}元</text>
  60. </view>
  61. <view v-if="item[1] > 0" class="item-status-p">
  62. <image class="icon" src="../../static/song.png" />
  63. <text>{{ item[1] }}元</text>
  64. </view>
  65. </view>
  66. </view>
  67. <view class="cz-po-cs" @click="canCZ()">
  68. 取消
  69. </view>
  70. </span>
  71. </uni-popup>
  72. </view>
  73. <view class="info-pane">
  74. <view>
  75. {{goods==''?'':goods.sub_region_name}}
  76. </view>
  77. <view>
  78. <text>设备编号: {{goods==''?'':goods.sn}}</text>
  79. <!-- 设备编号:{$goods['sn']}-->
  80. <view style="float: left;">
  81. <view @click="coupons()" id="applyCoupons">
  82. <view class="applyCouponsClass" style="background: none">
  83. <view id="" style="color:#4592FF;font-weight: bold">
  84. 办理卡券
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. <view :style="hide_show" class="tip-panel-all tip-panel-zf animate-bounce-down">
  92. <view class="tip-panel-bor-all tip-panel-bor"></view>
  93. <view class="tip-panel-text-all tip-panel-text">
  94. 遇到问题</br>
  95. 及时联系客服
  96. </view>
  97. </view>
  98. <view class="s">
  99. </view>
  100. <view class="bk-mk"></view>
  101. <view class="options-panel">
  102. <view style="background-color: #ffffff; padding: 10px 3px;
  103. border-radius: 8px;">
  104. <view style="width: 47%;display: inline-block;padding-left: 6px;">
  105. 选择插座
  106. </view>
  107. <view style="width: 49%;display: inline-block;text-align: right;" @tap="port_refresh()">刷新
  108. </view>
  109. <view v-for="item in port_list" :key="item.port_id">
  110. <view class="each-option">
  111. <view
  112. :class="{'item-selected':selectedNum==item.port_id,'item-busy':item.status==2,'item-disable':item.status==3,'item-disable':item.status==4,'item-ready':item.status==5}"
  113. class="item" @click="channel_select( item.port_id,item.status);" :id="'port_'+item.port_id">
  114. <view class="item-number">{{item.port_id}}号</view>
  115. <view class="item-status">{{getStatus(item.status) }}</view>
  116. </view>
  117. </view>
  118. <input type="hidden" style="display: none;" name="updatetime" :value="item.updatetime">
  119. <input type="hidden" style="display: none;" :id="'port_status_'+(item.port_id)"
  120. :value="item.status">
  121. </view>
  122. <view style="clear: both;"></view>
  123. </view>
  124. <input type="hidden" style="display: none;" name="selected_port" id="selected_port">
  125. <view class="ct-panel" style="width: 100%;">
  126. <view class="fz1">
  127. 选择套餐
  128. </view>
  129. <!-- 用户自定义是否显示主板计费规则 -->
  130. <view v-if="isempty(fee_tpl.board_rules_hide)" class="fz1" style="text-align: right;font-size: 14px;">
  131. 计费方式:
  132. </view>
  133. <view v-if="isempty(fee_tpl.board_rules_hide)" class="fz1 ct-ck" style="font-size: 14px;"
  134. @click="showTip();">
  135. {{data==''?'':data.fee_type_name}}
  136. </view>
  137. </view>
  138. <!-- 用户自定义是否显示主板计费规则 -->
  139. <view class="fee" v-if="fee_rule.show_rule" v-show="tip_panel_show">
  140. <view class="fee-h1 elec">电价({{ fee_rule.fee_type_text }})</view>
  141. <view class="ele-price-title flexSpaceBetween">
  142. <view class="title-item">{{ fee_rule.title.title1 }}</view>
  143. <view class="title-item">{{ fee_rule.title.title2 }}</view>
  144. <view class="title-item" v-if="!isempty(fee_rule.title.title3)">{{ fee_rule.title.title3 }}</view>
  145. </view>
  146. <view v-for="(item, key) in fee_rule.list" :key="key" class="time-item flexSpaceBetween">
  147. <text class="item">{{ item.v1 }}</text>
  148. <text class="item">{{ item.v2 }}</text>
  149. <text class="item" v-if="!isempty(fee_rule.title.title3)">{{ item.v3 }}</text>
  150. </view>
  151. <template v-if="!isempty(fee_rule.service_fee)">
  152. <view v-if="[1, 3].includes(fee_rule.service_fee.type)" class="flexSpaceBetween service-fee">
  153. <view class="fee-item">服务费({{ fee_rule.service_fee.type_name }})</view>
  154. <view class="fee-item">{{ fee_rule.service_fee.config }}{{ fee_rule.service_fee.unit }}</view>
  155. </view>
  156. <view v-else class="service-fee">
  157. <view class="fee-h1">服务费({{ fee_rule.service_fee.type_name }})</view>
  158. <view class="flexSpaceBetween sub-title">
  159. <view>功率档位(W)</view>
  160. <view>服务费(元/度)</view>
  161. </view>
  162. <view class="flexSpaceBetween sub-item" v-for="(v, k) in fee_rule.service_fee.config" :key="k">
  163. <view class="flex"
  164. >{{ v[0] }}<text class="sub-power" v-if="!isempty(v[1])"> ~ {{ v[1] }}</text></view
  165. >
  166. <view>{{ v[2] }}</view>
  167. </view>
  168. </view>
  169. </template>
  170. <view class="fee-tips-bottom">发改委 [2024] 537号文件,实行电费+服务费的资费模式。</view>
  171. </view>
  172. <view v-if="!isempty(fee_tpl.full_stop_fee)" class="pay-btn-content" style="position: relative;">
  173. <view @click="full_to_stop(data.balance, fee_tpl.full_stop_fee);" class="pay-btn item-tc"
  174. style="color: #454955;text-align: left;">
  175. <view class="weui-flex3" style="padding: 6px 15px 0px 15px;font-size: 15px;font-weight: bold;">
  176. <view>
  177. 充满自停
  178. </view>
  179. <view style="font-size: 14px;
  180. color: #9199af;font-weight: normal;">
  181. <!-- {if empty($item['remark'])} -->
  182. <!-- <text v-if="item.remark!='.'">
  183. {{item.remark}}
  184. </text> -->
  185. <text>
  186. 套餐</text>
  187. <!-- {/if}
  188. {/if} -->
  189. </view>
  190. </view>
  191. <view class="weui-flex1"
  192. style="text-align: right;font-weight: bold;font-size: 26px;color: #ff6565;line-height: 52px;padding: 0px 12px">
  193. </view>
  194. </view>
  195. </view>
  196. <view v-for="item in params_sort" >
  197. <view v-if="!isempty(item.mny)" class="pay-btn-content" style="position: relative;">
  198. <view @click="selectmenu(item.mny)" :id="''+item.mny" class="pay-btn item-tc"
  199. style="color: #454955;text-align: left;" :class="total==item.mny?'item-selected':''">
  200. <view class="weui-flex3" style="padding: 6px 15px 0px 15px;font-size: 15px;font-weight: bold;">
  201. <view>
  202. {{item.mny}}元
  203. <text v-if="data.fee_type==1 && (isempty(goods.time_hide) && !isempty(item.tm))">
  204. {{item.tm}}分钟
  205. </text>
  206. <text v-if="!isempty(goods.para_type)&&(isempty(goods.coin_hide)&&!isempty(item.coin))">
  207. {$item['coin']}币
  208. </text>
  209. </view>
  210. <view style="font-size: 14px;
  211. color: #9199af;font-weight: normal;">
  212. <text v-if="isempty(item.remark)&&goods.type!=9">套餐</text>
  213. <text v-else-if="item.remark!='.'">
  214. {{item.remark}}
  215. </text>
  216. </view>
  217. </view>
  218. <view class="weui-flex1"
  219. style="text-align: right;font-weight: bold;font-size: 26px;color: #ff6565;line-height: 52px;padding: 0px 12px">
  220. <span>{{item.mny}}</span><span style="font-size: 13px;">元</span>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <input type="hidden" style="display: none;" id="selected_num" :value="selectedNum">
  226. <input type="hidden" style="display: none;" id="total" :value="total">
  227. <input type="hidden" id="dev_status_checked" style="display: none;" value="0">
  228. <input type="hidden" id="dev_status_unavail" style="display: none;" :value="dev_status_unavail">
  229. </view>
  230. <view style="height: 100px;"></view>
  231. <view @click="startCharging()" class="confirm-panel">
  232. <view class="confirm-btn" id="confirm">
  233. 开始充电
  234. </view>
  235. </view>
  236. <view>
  237. <!-- 提示窗示例 -->
  238. <uni-popup ref="alertDialog" type="dialog">
  239. <uni-popup-dialog mode="base" title="客服服务">
  240. <view style="display: grid;line-height: 25px;">
  241. <text>支付成功后,设备未立即启动,可能存在网络延迟,请稍等。若仍未启动,可采用如下方式:</text>
  242. <view style="color: #4592FF;display: flex;justify-content: space-between;" @click="feedback()">
  243. 反馈问题<uni-icons style="margin-right: 0;" type="right"></uni-icons>
  244. </view>
  245. <view style="color: #4592FF;display: flex;justify-content: space-between;">
  246. 客服电话:<text style="margin-right: 0;">{{telephone}}</text></view>
  247. </view>
  248. </uni-popup-dialog>
  249. </uni-popup>
  250. </view>
  251. <view>
  252. <!-- 退出弹框 -->
  253. <uni-popup ref="popupclose" type="dialog">
  254. <uni-popup-dialog mode="base" title="注意" showClose="false" @close="closeout" @confirm="closeout">
  255. <view style="display: grid;line-height: 25px;">
  256. <text>请重新扫描设备二维码进入小程序</text>
  257. </view>
  258. </uni-popup-dialog>
  259. </uni-popup>
  260. <!--
  261. <uni-popup ref="popupclose" type="dialog">
  262. <uni-popup-message type="success" message="成功消息" :duration="2000">
  263. <view style="display: grid;line-height: 25px;">
  264. <text>请重新扫描设备二维码进入小程序</text>
  265. <button @click="exitMiniProgram">退出</button>
  266. </view>
  267. </uni-popup-message>
  268. </uni-popup> -->
  269. </view>
  270. <!-- 广告 -->
  271. <view>
  272. <riding-risk-component-pop :visible="visible" onPopupClose="onPopupClose" onSuccess="onSuccess"
  273. onAdError="onAdError" onClose="onClose"></riding-risk-component-pop>
  274. </view>
  275. <!-- 支付券 -->
  276. <uni-popup :is-mask-click="false" ref="popupmarketings" type="message">
  277. <view
  278. style=" background-color: #f1f1f1c7;width: 320px;height: 450px;display: flex;flex-direction: column;align-items: center;">
  279. <view style="display: grid;padding: 12px 10px;">
  280. <text style="text-align: center;margin: auto;font-weight: 900;color: #e94242;">{{message1}}</text>
  281. <text style="margin: auto;font-size: 12px;color: #4e4646">{{message2}}</text>
  282. </view>
  283. <view>
  284. <image style="margin: 0px 10px;width: 200px;height: 200px;" src="../../static/market.png"></image>
  285. </view>
  286. <get-coupon onBeforeGetCoupon="onBeforeGetCoupon" onGetCouponSuccess="onGetCouponSuccess"
  287. onGetCouponFail="onGetCouponFail" onUseImmediately="onUseImmediately" onClose="onClose"
  288. :params="params" :dialogBtnType="dialogBtnType" :dialogBtnStyle="dialogBtnStyle" :zIndex="9998">
  289. <button style="text-align: center;color: #4592FF;width: 200px;">领取优惠券</button>
  290. </get-coupon>
  291. <button style="text-align: center;color: #c30061;width: 200px;margin-top: 20px;"
  292. @click="closeMarket()">关闭领取</button>
  293. </view>
  294. </uni-popup>
  295. </view>
  296. </template>
  297. <script>
  298. import config from '@/config.js'
  299. let pluginIns;
  300. export default {
  301. data() {
  302. return {
  303. message1: '领取优惠券',
  304. message2: '1、本券不可兑换现金,不可找零。\n2、如果消费并使用优惠券后,订单发生退款,优惠券无法退还。',
  305. loading: false,
  306. balance: '0', // 示例余额
  307. data: '',
  308. goods: '',
  309. port_list: '',
  310. fee_tpl: '',
  311. fee_rule:{},
  312. params_sort: [],
  313. oem_info: '',
  314. ports: [{
  315. id: '1',
  316. status: '空闲'
  317. },
  318. {
  319. id: '2',
  320. status: '使用中'
  321. },
  322. {
  323. id: '3',
  324. status: '禁用'
  325. },
  326. {
  327. id: '4',
  328. status: '故障'
  329. },
  330. {
  331. id: '5',
  332. status: '已接入'
  333. },
  334. {
  335. id: '6',
  336. status: '已预约'
  337. },
  338. {
  339. id: '7',
  340. status: '完成'
  341. },
  342. {
  343. id: '8',
  344. status: '急停'
  345. }
  346. ],
  347. fee_type_names: [{
  348. type: 2,
  349. name: '按功率计费'
  350. },
  351. {
  352. type: 1,
  353. name: '按时间计费'
  354. },
  355. {
  356. type: 3,
  357. name: '按电量计费'
  358. },
  359. {
  360. type: 4,
  361. name: '刷卡免费模式'
  362. }
  363. ],
  364. tip_panel_show: false,
  365. hide_show: '',
  366. checkSelectShow: false,
  367. selectedNum: '',
  368. total: '',
  369. telephone: '',
  370. dev_status_unavail: 0,
  371. processing: false,
  372. recharge: [],
  373. checkClazz: '',
  374. openid: '',
  375. unionid: '',
  376. starting: false,
  377. dev_status_checked: 0,
  378. sessionId: '',
  379. device_sn: '',
  380. visible: false,
  381. hasPop:false,
  382. title: '',
  383. showMask: true,
  384. scanChannel:0,
  385. // alipay
  386. params: [{
  387. //活动id
  388. activityId: '2024062400826004792330551163',
  389. outBizNo: '202305226095221590xxxxxxxxx',
  390. }],
  391. dialogBtnType: 2,
  392. dialogBtnStyle: {
  393. color: '#000',
  394. borderColor: '#59bdff',
  395. backgroundColor: '#59bdff'
  396. },
  397. marketStatus: 'unknown',
  398. marketingIs: false,
  399. succBack: false,
  400. showGuide: false // 控制引导框的显示
  401. }
  402. },
  403. onReady() {
  404. if (this.device_sn == '') {
  405. this.mycenter();
  406. //this.$refs.popupclose.open("center")
  407. }
  408. //this.$refs.popupmarketings.open("center")
  409. },
  410. onShow() {
  411. var _this = this
  412. _this.selectedNum = ''
  413. _this.total = ''
  414. _this.hide_show = '';
  415. setTimeout(function() {
  416. _this.hide_show = 'display: none;';
  417. console.log("这段代码将在1000毫秒后执行");
  418. }, 3000);
  419. _this.flushed(_this.device_sn);
  420. my.getAuthCode({
  421. scopes: 'auth_user',
  422. success: (res) => {
  423. console.log('res>>>auth_user>>' + JSON.stringify(res))
  424. uni.request({
  425. method: 'get',
  426. url: config.baseUrl +
  427. 'app/index.php?i=1&j=1&c=entry&m=wdl_shopping&debugSkip=true&do=getOpenId&auth_code=' +
  428. res.authCode + '&state=' +
  429. _this
  430. .sessionId,
  431. success(res) {
  432. console.log('openid>>>>>>>>===' + JSON.stringify(res.data.openid))
  433. }
  434. })
  435. },
  436. });
  437. },
  438. onLoad(option) {
  439. //领券弹框
  440. this.$scope.onGetCouponSuccess = this.onGetCouponSuccess.bind(this)
  441. this.$scope.onUseImmediately = this.onUseImmediately.bind(this)
  442. this.$scope.onGetCouponFail = this.onGetCouponFail.bind(this)
  443. //领券弹框
  444. //保险
  445. console.log("这段index>>onload>>" + JSON.stringify(option));
  446. this.$scope.onPopupClose = this.onPopupClose.bind(this)
  447. this.$scope.onSuccess = this.onSuccess.bind(this)
  448. this.$scope.onClose = this.onClose.bind(this)
  449. this.$scope.onAdError = this.onAdError.bind(this)
  450. //保险
  451. var _this = this
  452. _this.device_sn = uni.getStorageSync("device_sn")
  453. _this.title = uni.getStorageSync("title")
  454. _this.scanChannel = uni.getStorageSync("channel")
  455. _this.sessionId = 'we7sid-' + uni.getStorageSync("sessionId")
  456. // _this.device_sn = 'GD1B397202'
  457. // _this.sessionId = 'we7sid-' + '01deee25ece67d8f799372954746638d';
  458. uni.setNavigationBarTitle({
  459. title: _this.title
  460. })
  461. },
  462. methods: {
  463. endGuide() {
  464. // 结束引导
  465. this.showGuide = false;
  466. // 将引导结束状态存储到本地
  467. //uni.setStorageSync('isGuideShown', true);
  468. },
  469. closeMarket() {
  470. //关闭领取弹框
  471. var _this = this
  472. uni.showModal({
  473. title: '提示',
  474. content: '确认不领取该优惠券?',
  475. success: function(res) {
  476. if (res.confirm) {
  477. console.log('用户点击确定');
  478. _this.$refs.popupmarketings.close()
  479. } else if (res.cancel) {
  480. console.log('用户点击取消');
  481. }
  482. }
  483. });
  484. },
  485. onUseImmediately() {
  486. this.$refs.popupmarketings.close()
  487. console.log('去支付')
  488. },
  489. //保险弹框冲突不使用
  490. onClosed() {
  491. console.log('领个券关闭>>>>')
  492. this.$refs.popupmarketings.close()
  493. },
  494. onGetCouponSuccess(e) {
  495. console.log('领券成功', e)
  496. uni.showToast({
  497. title: '领取成功',
  498. icon: 'success',
  499. duration: 1000,
  500. })
  501. //this.$refs.popupmarketings.close()
  502. },
  503. onGetCouponFail(e) {
  504. console.log('领券失败', e)
  505. uni.showToast({
  506. title: '领券失败',
  507. icon: 'fail',
  508. duration: 1000,
  509. })
  510. },
  511. closeout(e) {
  512. // 如果成功退出小程序,会直接结束小程序进程,一般情况已经来不及执行success/complete回调。
  513. my.exitMiniProgram();
  514. },
  515. onShowBtn() {
  516. if(this.hasPop){
  517. return;
  518. }
  519. this.visible = true
  520. this.hasPop=true
  521. },
  522. onPopupClose() {
  523. this.visible = false
  524. },
  525. onSuccess() {
  526. console.log("加载成功")
  527. if (this.device_sn == "" || this.device_sn == null) {
  528. this.showGuide = false;
  529. return;
  530. }
  531. this.showGuide = true;
  532. },
  533. async onClose(err) {
  534. console.log('关闭保险领取')
  535. uni.showLoading({
  536. title: '获取中,请稍候'
  537. });
  538. //console.log('广告关闭???????????>>>>' + JSON.stringify(err))
  539. //广告关闭判断是否购买保险成功
  540. var _this = this
  541. var bizId = err.bizId
  542. if (!_this.isempty(bizId)) {
  543. //验证回调
  544. _this.doSomething();
  545. await uni.request({
  546. method: 'get',
  547. url: config.baseUrl +
  548. 'app/index.php?i=1&j=1&c=auth&a=alipay_code_money&do=succ_back&bizId=' +
  549. bizId + '&state=' +
  550. _this
  551. .sessionId,
  552. success(res) {
  553. console.log('验证回调接口是否有用户购买成功的信息>.1')
  554. if (res.data.code == 1) {
  555. _this.succBack = true;
  556. } else {
  557. _this.succBack = false
  558. uni.showToast({
  559. title: '用户购未购买'
  560. })
  561. console.log('验证回调接口是否有用户购买未购买的信息>.1.5')
  562. uni.hideLoading();
  563. return
  564. }
  565. },
  566. fail(res) {
  567. console.log('验证回调接口是否有用户购买失败的信息>.2')
  568. _this.succBack = false
  569. uni.showToast({
  570. title: '验证购买失败'
  571. })
  572. uni.hideLoading();
  573. return
  574. },
  575. complete(res) {
  576. console.log('验证回调接口是否有用户购买完成的信息>.3')
  577. //_this.succBack = false
  578. return;
  579. }
  580. })
  581. if (!_this.succBack) {
  582. return
  583. }
  584. } else {
  585. console.log("广告关闭,未知bizid4")
  586. // uni.showToast({
  587. // title: '未知bizid'
  588. // })
  589. uni.hideLoading();
  590. return
  591. }
  592. console.log("广告关闭,查询的回调结果为true,购买保险成功5")
  593. //购买成功继续
  594. //1.判断活动情况 2.活动正常弹出领券
  595. console.log('验证是否发券的结果???????????>>>>6')
  596. await uni.request({
  597. method: 'get',
  598. url: config.baseUrl +
  599. 'app/index.php?i=1&j=1&c=entry&m=wdl_shopping&debugSkip=true&do=marketing&state=' +
  600. _this
  601. .sessionId,
  602. success(res) {
  603. console.log('咨询用户是否可以领取该活动优惠券>.7')
  604. if (res.data.rv == 1) {
  605. //成功,弹出领取福利窗口
  606. _this.showMask = true
  607. _this.message1 = res.data.msg.voucher_display_pattern_info.voucher_name
  608. _this.message2 = res.data.msg.voucher_display_pattern_info.voucher_description
  609. _this.marketStatus = res.data.msg.activity_base_info.activity_status
  610. _this.params = [{
  611. activityId: res.data.msg.activity_base_info.activity_id,
  612. outBizNo: bizId,
  613. }]
  614. // 活动已激活: ACTIVE
  615. // 活动已暂停: PAUSE
  616. // 活动已结束: FINISHED
  617. if (_this.marketStatus == 'ACTIVE') {
  618. _this.$refs.popupmarketings.open("center")
  619. } else {
  620. uni.showToast({
  621. title: _this.marketStatus == 'PAUSE' ? '活动暂停' : _this
  622. .marketStatus ==
  623. 'FINISHED' ? '活动已结束' : _this.marketStatus
  624. })
  625. uni.hideLoading();
  626. }
  627. }
  628. },
  629. fail(res) {
  630. console.log('咨询用户是否可以领取该活动优惠券失败8>.')
  631. uni.showToast({
  632. title: '优惠券加载失败'
  633. })
  634. uni.hideLoading();
  635. },
  636. complete(res) {
  637. console.log('咨询用户是否可以领取该活动优惠券完成9>.')
  638. _this.$scope.onClose = _this.onClosed.bind(_this)
  639. }
  640. })
  641. uni.hideLoading();
  642. },
  643. onAdError(err) {
  644. console.log('广告加载失败???????????>>>>' + JSON.stringify(err))
  645. },
  646. sleep(duration = 2000) {
  647. return new Promise(resolve => {
  648. setTimeout(resolve, duration);
  649. });
  650. },
  651. // 使用示例
  652. async doSomething() {
  653. console.log('开始睡眠');
  654. await sleep(1500); // 休眠5秒
  655. console.log('休眠结束');
  656. },
  657. flushed(sn) {
  658. if (this.device_sn == "" || this.device_sn == null) {
  659. return;
  660. }
  661. uni.showLoading({
  662. title: '获取中,请稍候'
  663. });
  664. console.log('flushed设备详情>>>' + this.sessionId)
  665. var _this = this
  666. uni.request({
  667. method: 'get',
  668. url: config.baseUrl +
  669. '/app/index.php?i=1&j=1&c=entry&debugSkip=true&debug=1&isajax=1&m=wdl_shopping&do=wepay&sn=' +
  670. sn + '&channel='+_this.scanChannel+'&state=' +
  671. _this
  672. .sessionId,
  673. success(res) {
  674. console.log('res>>>' + JSON.stringify(res))
  675. _this.goods = res.data.goods
  676. _this.port_list = res.data.port_list
  677. _this.fee_tpl = res.data.fee_tpl
  678. _this.data = res.data.data
  679. _this.params_sort = res.data.params_sort
  680. _this.oem_info = res.data.oem_info
  681. _this.fee_rule = res.data.fee_rule
  682. uni.hideLoading();
  683. // uni.showToast({
  684. // title: '因支付宝用户系统升级,若您的余额丢失,请进入右上角 个人中心 点击同步余额功能。给您造成了不便,深表歉意。',
  685. // duration: 3000
  686. // });
  687. },
  688. fail(res) {
  689. console.log(JSON.stringify(res))
  690. uni.hideLoading();
  691. },
  692. complete() {
  693. _this.dev_status_check();
  694. uni.hideLoading();
  695. }
  696. })
  697. },
  698. coupons() {
  699. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  700. this.$refs.popupclose.open("center")
  701. return;
  702. }
  703. //var url = config.baseUrl + "/app/index.php?i=1&j=1&c=entry&m=wdl_shopping&do=coupons&sn=" + this.goods.sn
  704. //
  705. console.log('coupons?>>>>>>')
  706. uni.navigateTo({
  707. url: '/pages/coupons/coupons?sn=' + this.goods.sn
  708. })
  709. },
  710. payOrder(recharge, award) {
  711. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  712. this.$refs.popupclose.open("center")
  713. return;
  714. }
  715. //console.log('>>>'+JSON.stringify(window.location.href) )
  716. if (this.processing) { // 判断是否在处理中
  717. return;
  718. }
  719. if (this.goods.weid === '0') {
  720. uni.showToast({
  721. title: '设备未绑定,请登录管理后台扫码绑定后再操作',
  722. icon: 'none'
  723. });
  724. return;
  725. }
  726. uni.showLoading({
  727. title: '支付发起中,请稍后'
  728. });
  729. uni.hideLoading();
  730. // setTimeout(function() {
  731. // uni.hideLoading();
  732. // }, 4000);
  733. this.processing = true;
  734. // uni.navigateTo({
  735. // url:'/pages/userrecharge/userrecharge?dev_id=' + this.goods.id + '&weid=' + this.goods.weid + '&recharge='+recharge+'&award='+award
  736. // })
  737. const url = config.baseUrl +
  738. "app/index.php?i=1&j=1&c=entry&do=recharge&m=wdl_shopping&alipay_mini=1" +
  739. "&dev_id=" + this.goods.id + "&weid=" + this
  740. .goods.weid + "&recharge=" + recharge + "&award=" + award + '&state=' + this.sessionId;
  741. const params = {
  742. recharge,
  743. award,
  744. callback: '', // 获取当前页面路径
  745. ajax: '1'
  746. };
  747. uni.request({
  748. url,
  749. data: params,
  750. method: 'get',
  751. success: (res) => {
  752. console.log('payOrder()>>res>>>' + JSON.stringify(res))
  753. this.processing = false;
  754. uni.hideLoading();
  755. if (res.data.rv == '1') {
  756. const is_third = res.data.is_third || '';
  757. if (is_third == 1) {
  758. // uni.navigateTo({
  759. // url:'/pages/userrecharge/userrecharge?src='+res.data.order.payUrl,
  760. // })
  761. uni.request({
  762. url: res.data.order.payUrl,
  763. method: 'get',
  764. success(res) {
  765. console.log('succ>>>' + JSON.stringify(res))
  766. },
  767. fail(res) {
  768. console.log('fail>>>>>>' + res)
  769. }
  770. })
  771. } else {
  772. this.tradePay(res.data.trade_no);
  773. }
  774. } else {
  775. uni.showToast({
  776. title: res.data.msg,
  777. icon: 'none'
  778. });
  779. uni.navigateBack({
  780. delta: 1 // 回退一级页面,如果当前页面是首页,将返回首页
  781. });
  782. }
  783. },
  784. fail: (error) => {
  785. this.processing = false;
  786. uni.hideLoading();
  787. console.error('请求出错:', error);
  788. },
  789. complete: () => {
  790. uni.hideLoading();
  791. },
  792. dataType: 'json'
  793. });
  794. },
  795. tradePay(trade_no) {
  796. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  797. this.$refs.popupclose.open("center")
  798. return;
  799. }
  800. var _this = this
  801. _this.canCZ()
  802. uni.requestPayment({
  803. provider: 'alipay',
  804. orderInfo: trade_no, //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
  805. success: function(res) {
  806. console.log('success:' + JSON.stringify(res));
  807. //刷新当前页面
  808. _this.flushed(_this.goods.sn);
  809. },
  810. fail: function(err) {
  811. console.log('fail:' + JSON.stringify(err));
  812. _this.flushed(_this.goods.sn);
  813. }
  814. });
  815. },
  816. selectCF() {
  817. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  818. this.$refs.popupclose.open("center")
  819. return;
  820. }
  821. //充值
  822. var url = config.baseUrl + "api/dev_info.php?do=recharge_options_get&uid=" + this.goods.weid +
  823. '&region_id=' + this.goods.region_id + '&state=' + this.sessionId;
  824. uni.request({
  825. url,
  826. method: 'get',
  827. success: (res) => {
  828. console.log('selectCF>>' + JSON.stringify(res))
  829. this.recharge = res.data.list
  830. this.$refs.popup.open("bottom")
  831. }
  832. })
  833. },
  834. canCZ() {
  835. this.$refs.popup.close()
  836. },
  837. port_refresh() {
  838. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  839. this.mycenter();
  840. // this.$refs.popupclose.open("center")
  841. return;
  842. }
  843. //刷新
  844. var _this = this
  845. const url = config.baseUrl + "api/devstate.php?do=dev_state_req_id&dev_id=" + _this.goods.id + '&state=' +
  846. _this.sessionId;
  847. if (_this.processing) {
  848. return;
  849. }
  850. uni.showLoading({
  851. title: '获取中,请稍候'
  852. });
  853. _this.processing = true;
  854. const param = {
  855. dev_id: _this.goods.id,
  856. sn: _this.goods.sn
  857. };
  858. uni.request({
  859. url,
  860. data: param,
  861. method: 'get',
  862. success: (res) => {
  863. _this.processing = false;
  864. console.log('刷新>>>' + JSON.stringify(res))
  865. setTimeout(() => {
  866. uni.hideLoading();
  867. // 假设当前在pages.json中定义了pages/index/index页面
  868. uni.redirectTo({
  869. url: '/pages/index/index'
  870. })
  871. }, 3000);
  872. },
  873. fail: (error) => {
  874. console.error(error);
  875. uni.hideLoading();
  876. uni.showToast({
  877. icon: 'error',
  878. title: '刷新失败'
  879. })
  880. _this.processing = false;
  881. }
  882. });
  883. },
  884. port_status_req() {
  885. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  886. this.mycenter();
  887. //this.$refs.popupclose.open("center")
  888. return;
  889. }
  890. const url = config.baseUrl + "api/devstate.php?do=dev_state_req_id&dev_id=" + this.dev.id + '&state=' +
  891. _this.sessionId;
  892. const param = {
  893. dev_id: this.goods.id,
  894. sn: this.goods.sn
  895. };
  896. uni.request({
  897. url,
  898. data: param,
  899. method: 'POST',
  900. success: (res) => {
  901. // 在这里处理响应
  902. console.log('' + res)
  903. },
  904. fail: (error) => {
  905. console.error(error);
  906. }
  907. });
  908. },
  909. dev_status_check() {
  910. var _this = this
  911. const dev_status_get_url = config.baseUrl + "api/dev_info.php?do=dev_status_check&state=" + _this
  912. .sessionId;
  913. const dev_status_get_param = {
  914. dev_id: _this.goods.id,
  915. title: _this.goods.title,
  916. type: _this.goods.type
  917. };
  918. console.log('dev_status_check>dev_status_get_param>>' + JSON.stringify(dev_status_get_url))
  919. try {
  920. const res = uni.request({
  921. url: dev_status_get_url,
  922. data: dev_status_get_param,
  923. method: 'GET',
  924. success(res) {
  925. console.log('dev_status_check>>' + JSON.stringify(res))
  926. if (res.data.rv == '1') {
  927. _this.dev_status_checked = 1;
  928. return;
  929. }
  930. if (res.data.rv == '0') {
  931. uni.showToast({
  932. title: res.data.msg,
  933. icon: 'none'
  934. });
  935. return;
  936. }
  937. if (res.data.rv == '2') {
  938. _this.port_status_req();
  939. let get_count = 0;
  940. const timer = setInterval(async () => {
  941. const res = await uni.request({
  942. url: dev_status_get_url,
  943. data: dev_status_get_param,
  944. method: 'GET'
  945. });
  946. if (res[1].data.rv === '1') {
  947. clearInterval(timer);
  948. _this.dev_status_checked = 1;
  949. uni.hideLoading();
  950. uni.showToast({
  951. title: '设备查询成功,请选择套餐',
  952. icon: 'none'
  953. });
  954. return;
  955. }
  956. get_count++;
  957. if (get_count > 5) {
  958. clearInterval(timer);
  959. _this.dev_status_unavail = 1;
  960. uni.hideLoading();
  961. uni.showToast({
  962. title: '设备异常,请选择其他设备',
  963. icon: 'none'
  964. });
  965. return;
  966. }
  967. }, 4000);
  968. }
  969. }
  970. });
  971. } catch (error) {
  972. console.error(error);
  973. }
  974. },
  975. feedback() {
  976. //反馈问题
  977. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  978. this.$refs.popupclose.open("center")
  979. return;
  980. }
  981. uni.navigateTo({
  982. url: '/pages/feedback/feedback?weid=' + this.goods.weid + '&state=' + this.sessionId
  983. })
  984. },
  985. channel_select(port_id, status) {
  986. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  987. this.$refs.popupclose.open("center")
  988. return;
  989. }
  990. //选择插座
  991. if (status == 1) {
  992. //空闲
  993. for (let ports of this.port_list) {
  994. console.log('port_' + port_id)
  995. if (ports.port_id == port_id) {
  996. console.log('port_>>' + port_id)
  997. if (this.selectedNum != port_id) {
  998. this.selectedNum = port_id
  999. console.log('selectedNum>' + this.selectedNum)
  1000. //保险弹框
  1001. this.onShowBtn()
  1002. } else {
  1003. this.selectedNum = ''
  1004. }
  1005. }
  1006. }
  1007. if (this.selectedNum == '') {
  1008. this.total = ''
  1009. }
  1010. } else {
  1011. //非空闲不可用
  1012. uni.showToast({
  1013. title: '端口' + port_id + '不可用,请重新选择',
  1014. icon: 'error'
  1015. })
  1016. }
  1017. },
  1018. selectmenu(mny) {
  1019. //选择套餐
  1020. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  1021. this.$refs.popupclose.open("center")
  1022. return;
  1023. }
  1024. console.log('mny>>' + JSON.stringify(mny))
  1025. var channel = this.selectedNum
  1026. if (channel == "") {
  1027. uni.showToast({
  1028. title: '请先选择端口',
  1029. icon: 'error'
  1030. })
  1031. return false;
  1032. }
  1033. console.log('.params_sort>' + JSON.stringify(this.params_sort))
  1034. if (this.total == mny) {
  1035. this.total = ''
  1036. } else {
  1037. this.total = mny
  1038. }
  1039. var total_int = parseInt(this.total);
  1040. var balance = parseInt(this.balance);
  1041. console.log('mny>>' + JSON.stringify(mny))
  1042. if (1 == this.fee_tpl.pay_mode) {
  1043. if (total_int > balance) {
  1044. uni.showToast({
  1045. icon: 'error',
  1046. title: '请先充值使用充值余额支付'
  1047. });
  1048. return false;
  1049. }
  1050. }
  1051. },
  1052. showTip() {
  1053. //计费模型展示
  1054. this.tip_panel_show = !this.tip_panel_show
  1055. },
  1056. // isempty(item) {
  1057. // //判断工具
  1058. // if (item == 0 || item == '' || item == null) {
  1059. // return true;
  1060. // } else {
  1061. // return false;
  1062. // }
  1063. // },
  1064. isempty(value) {
  1065. if (value === null || value === undefined || value==0) {
  1066. return true;
  1067. }
  1068. if (typeof value === 'string' && value.trim().length === 0) {
  1069. return true;
  1070. }
  1071. if (Array.isArray(value) && value.length === 0) {
  1072. return true;
  1073. }
  1074. if (typeof value === 'object' && Object.keys(value).length === 0) {
  1075. return true;
  1076. }
  1077. return false;
  1078. },
  1079. getStatus(status) {
  1080. //选择端口
  1081. const port = this.ports.find(p => p.id == status);
  1082. return port ? port.status : '未知状态'; // 如果找不到对应的端口,返回'未知状态'
  1083. },
  1084. getFeeType(type) {
  1085. const feeType = this.fee_type_names.find(f => f.type == type);
  1086. return feeType ? feeType.name : '未知状态'; // 如果找不到对应的端口,返回'未知状态'
  1087. },
  1088. goToCenter() {
  1089. // 跳转至个人中心的逻辑
  1090. },
  1091. mycenter() {
  1092. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  1093. console.log("not login 进入登录页面");
  1094. //this.mycenter();
  1095. // this.$refs.popupclose.open("center")
  1096. uni.redirectTo({
  1097. url: '/pages/auth/auth'
  1098. })
  1099. return;
  1100. }
  1101. let oid = 1
  1102. if (!this.isempty(this.oem_info.uid) && !this.isempty(this.oem_info.mp_permit)) {
  1103. oid = this.oem_info.uid
  1104. }
  1105. uni.navigateTo({
  1106. url: '/pages/user/user?&oid=' + oid + '&sessionid=' + this.sessionId
  1107. })
  1108. },
  1109. customers() {
  1110. // 联系客服的逻辑
  1111. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  1112. this.$refs.popupclose.open("center")
  1113. return;
  1114. }
  1115. var _this = this
  1116. uni.request({
  1117. method: 'get',
  1118. url: config.baseUrl + "api/dev_info.php?do=customer_service&uid=" + _this.goods.weid +
  1119. '&region_id=' + _this.goods.region_id + '&state=' + _this.sessionId,
  1120. success(res) {
  1121. console.log(JSON.stringify(res.data))
  1122. if (res.data.rv == 1) {
  1123. _this.telephone = res.data.msg
  1124. _this.$refs.alertDialog.open("center")
  1125. } else {
  1126. uni.showToast({
  1127. icon: 'none',
  1128. title: res.data.msg
  1129. })
  1130. }
  1131. },
  1132. fail(res) {
  1133. console.log(res)
  1134. }
  1135. })
  1136. },
  1137. close() {
  1138. this.$refs.alertDialog.close()
  1139. },
  1140. selectPackage(pe) {
  1141. // 选择套餐的逻辑
  1142. this.selectedPackage = pe;
  1143. },
  1144. startCharging() {
  1145. console.log('...111')
  1146. if (this.sessionId == 'we7sid-' || this.sessionId == '') {
  1147. this.$refs.popupclose.open("center")
  1148. return;
  1149. }
  1150. // 开始充电的逻辑
  1151. // uni.showToast({
  1152. // title: '充电开始',
  1153. // icon: 'success'
  1154. // });
  1155. if (this.starting == true) {
  1156. return false;
  1157. }
  1158. if (this.goods.weid == '0') {
  1159. uni.showToast({
  1160. title: '设备未绑定,请登录管理后台扫码绑定后再操作',
  1161. icon: 'none'
  1162. });
  1163. return false;
  1164. }
  1165. if (this.selectedNum == "") {
  1166. uni.showToast({
  1167. title: '请选择端口',
  1168. icon: 'none'
  1169. });
  1170. return false;
  1171. }
  1172. if (this.total == '') {
  1173. uni.showToast({
  1174. title: '请选择套餐',
  1175. icon: 'none'
  1176. });
  1177. return false;
  1178. }
  1179. if (this.dev_status_unavail == 1) {
  1180. uni.showToast({
  1181. title: '设备异常,请选择其他设备',
  1182. icon: 'none'
  1183. });
  1184. return false;
  1185. }
  1186. if (this.dev_status_checked == 0) {
  1187. uni.showToast({
  1188. title: '查询设备中,请稍候',
  1189. icon: 'none'
  1190. });
  1191. return false;
  1192. }
  1193. if (!this.selectedNum || !this.total) {
  1194. uni.showToast({
  1195. title: '请选择插座和套餐',
  1196. icon: 'none'
  1197. });
  1198. return;
  1199. }
  1200. //0611:转到H5支付
  1201. uni.navigateTo({
  1202. url: '/pages/rechargepay/rechargepay?id=' + this.goods.id + '&sn=' + this.goods.sn +
  1203. '&title=' + this.goods.title + '&total=' + this.total + '&channel=' + this.selectedNum +
  1204. '&sessionid=' + this.sessionId
  1205. })
  1206. },
  1207. full_to_stop(balance, fee) {
  1208. this.total = ''
  1209. let surplus = parseInt(balance);
  1210. if (surplus === 0) {
  1211. uni.showToast({
  1212. title: '余额为0,请充值',
  1213. icon: 'none'
  1214. });
  1215. return;
  1216. }
  1217. const channel = this.selectedNum; // 假设这是获取渠道值的方法
  1218. if (!channel) {
  1219. uni.showToast({
  1220. title: '请先选择端口',
  1221. icon: 'none'
  1222. });
  1223. return;
  1224. }
  1225. const dev_status_unavail = this.dev_status_unavail; // 假设这是获取设备状态值的方法
  1226. if (dev_status_unavail === 1) {
  1227. uni.showToast({
  1228. title: '设备异常,请选择其他设备',
  1229. icon: 'none'
  1230. });
  1231. return;
  1232. }
  1233. const dev_status_checked = this.dev_status_checked; // 假设这是获取设备状态检查值的方法
  1234. if (dev_status_checked === 0) {
  1235. uni.showLoading({
  1236. mask: true,
  1237. title: '查询设备中,请稍候'
  1238. });
  1239. return;
  1240. }
  1241. if (this.processing) {
  1242. return;
  1243. }
  1244. console.log('surplus>>' + surplus + '<><>' + fee)
  1245. if (surplus >= fee) {
  1246. surplus = fee;
  1247. } else {
  1248. uni.showToast({
  1249. title: '充满自停将预扣费' + fee + '元,余额不足,请先点击上方充值',
  1250. icon: 'none'
  1251. });
  1252. return;
  1253. }
  1254. const msg = '充满自停将预扣费' + fee + '元, 充电结束后退回多余的余额,请确认';
  1255. uni.showModal({
  1256. title: '操作确认',
  1257. content: msg,
  1258. success: (res) => {
  1259. if (res.confirm) {
  1260. this.processing = true;
  1261. this.doPostRequest(channel, fee);
  1262. } else if (res.cancel) {
  1263. // 取消操作
  1264. }
  1265. }
  1266. });
  1267. },
  1268. doPostRequest(channel, surplus) {
  1269. // 这里是发送充满自停请求
  1270. uni.showLoading({
  1271. mask: true,
  1272. title: '请稍候'
  1273. });
  1274. console.log('dev_id>>' + this.goods.id)
  1275. console.log('channel>>' + channel)
  1276. console.log('total>>' + surplus)
  1277. var _this = this;
  1278. // const url = config.baseUrl + 'app/index.php?i=1&j=1&c=auth&a=devstart&do=dev_full_to_stop&dev_id=' +
  1279. // _this.goods.id + '&state=' + _this.sessionId
  1280. //console.log('dev_full_to_stop>>>' + url)
  1281. const params = {
  1282. 'channel': channel,
  1283. 'total': surplus
  1284. };
  1285. console.log('充满自停>>>'+config.baseUrl+'app/index.php?i=1&j=1&c=auth&a=devstart&do=dev_full_to_stop&dev_id=' +_this.goods.id + '&state=' + _this.sessionId)
  1286. console.log('canshu>>'+JSON.stringify(params))
  1287. uni.request({
  1288. url: config.baseUrl+'app/index.php?i=1&j=1&c=auth&a=devstart&do=dev_full_to_stop&alipay=1&dev_id=' +
  1289. _this.goods.id + '&state=' + _this.sessionId,
  1290. method: 'get',
  1291. data: params,
  1292. success: (res) => {
  1293. uni.hideLoading()
  1294. console.log('doPostRequest>>' + JSON.stringify(res))
  1295. _this.processing = false;
  1296. if (res.data.rv === '1') {
  1297. uni.showToast({
  1298. title: res.data.msg
  1299. });
  1300. setTimeout(() => {
  1301. _this.showmp(surplus)
  1302. }, 2000);
  1303. } else {
  1304. uni.showToast({
  1305. title: res.data.msg,
  1306. icon: 'none'
  1307. });
  1308. }
  1309. },
  1310. fail: (err) => {
  1311. console.error('请求失败:', err);
  1312. uni.hideLoading()
  1313. _this.processing = false;
  1314. uni.showToast({
  1315. title: '请求失败,请稍后重试',
  1316. icon: 'none'
  1317. });
  1318. },
  1319. complete() {
  1320. _this.processing = false
  1321. uni.hideLoading()
  1322. }
  1323. });
  1324. },
  1325. showmp(surplus) {
  1326. //启动完成跳转,
  1327. uni.navigateTo({
  1328. url: '/pages/showmp/showmp?oid=1&total=' + surplus + '&dev_id=' + this.goods.id + "&sn=" + this
  1329. .device_sn + "&state=" + this.sessionId,
  1330. })
  1331. },
  1332. formatDate(time) {
  1333. let date = new Date(time * 1000);
  1334. let year = date.getUTCFullYear();
  1335. let month = date.getUTCMonth() + 1;
  1336. let day = date.getUTCDate();
  1337. let hours = date.getUTCHours();
  1338. let minutes = date.getUTCMinutes();
  1339. let seconds = date.getUTCSeconds();
  1340. // 为了使结果更加易读,可以对月、日、小时、分钟和秒进行补零操作
  1341. month = month < 10 ? '0' + month : month;
  1342. day = day < 10 ? '0' + day : day;
  1343. hours = hours < 10 ? '0' + hours : hours;
  1344. minutes = minutes < 10 ? '0' + minutes : minutes;
  1345. seconds = seconds < 10 ? '0' + seconds : seconds;
  1346. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  1347. }
  1348. }
  1349. };
  1350. </script>
  1351. <style scoped>
  1352. /* */
  1353. .popup-content {
  1354. align-items: center;
  1355. justify-content: center;
  1356. padding: 15px;
  1357. height: 50px;
  1358. background-color: #fff;
  1359. }
  1360. .info-pane {
  1361. padding: 0px 8px;
  1362. font-size: 15px;
  1363. margin-top: 49px
  1364. }
  1365. .ct-panel {
  1366. display: flex;
  1367. padding: 5px 2px 0px 8px;
  1368. }
  1369. .ct-ck {
  1370. text-align: right;
  1371. font-weight: bold;
  1372. position: relative;
  1373. padding-right: 40px;
  1374. }
  1375. .ct-ck:after {
  1376. content: " ";
  1377. display: inline-block;
  1378. -webkit-transform: rotate(135deg);
  1379. transform: rotate(135deg);
  1380. height: 9px;
  1381. width: 9px;
  1382. border-width: 2px 2px 0 0;
  1383. border-color: #247aff;
  1384. border-style: solid;
  1385. position: absolute;
  1386. right: 11px;
  1387. top: 5px;
  1388. }
  1389. .ct-ck1:after {
  1390. -webkit-transform: rotate(315deg);
  1391. transform: rotate(315deg);
  1392. top: 12px;
  1393. }
  1394. .tip-panel {
  1395. border-top: 1px #AEAEAE solid;
  1396. display: none;
  1397. padding-left: 8px;
  1398. }
  1399. /* */
  1400. .kt {
  1401. position: fixed;
  1402. right: 0px;
  1403. top: 45px;
  1404. width: 60px;
  1405. /* border: 1px #089BFB solid; */
  1406. z-index: 999;
  1407. border-radius: 30px 0px 0px 30px;
  1408. padding: 5px;
  1409. background-color: #ffffff;
  1410. box-shadow: -2px 2px 6px #939a9e;
  1411. }
  1412. .kt-ic {
  1413. color: #089BFB;
  1414. }
  1415. .kt-f {
  1416. font-size: 11px;
  1417. text-align: center;
  1418. color: #089BFB;
  1419. }
  1420. .cz-po {
  1421. display: none;
  1422. z-index: 1001;
  1423. width: 95%;
  1424. /* height: 200px; */
  1425. border-radius: 5px;
  1426. position: fixed;
  1427. left: 0;
  1428. right: 0;
  1429. bottom: 0px;
  1430. background-color: #ffffff;
  1431. margin: auto;
  1432. padding: 10px 8px 81px 8px;
  1433. }
  1434. .kt-po {
  1435. display: none;
  1436. z-index: 1001;
  1437. width: 80%;
  1438. height: 200px;
  1439. border-radius: 5px;
  1440. position: fixed;
  1441. left: 0;
  1442. right: 0;
  1443. top: 12px;
  1444. bottom: 0;
  1445. background-color: #ffffff;
  1446. margin: auto;
  1447. padding: 8px;
  1448. }
  1449. .cz-po-cs {
  1450. margin-top: 20px;
  1451. text-align: center;
  1452. color: #ff8c56;
  1453. bottom: 12px;
  1454. /* margin: auto; */
  1455. right: 0px;
  1456. left: 0px;
  1457. font-size: 18px;
  1458. width: 100%;
  1459. height: 50px;
  1460. }
  1461. .kt-po-cs {
  1462. text-align: center;
  1463. color: #ff8c56;
  1464. position: absolute;
  1465. bottom: 12px;
  1466. margin: auto;
  1467. right: 0px;
  1468. left: 0px;
  1469. font-size: 18px;
  1470. padding-top: 8px;
  1471. }
  1472. .kt-po-ft {
  1473. color: #089BFB;
  1474. padding: 10px;
  1475. border-bottom: 1px #ddd solid;
  1476. }
  1477. .bk-mk {
  1478. position: fixed;
  1479. top: 0px;
  1480. right: 0px;
  1481. width: 100%;
  1482. height: 100%;
  1483. z-index: 1000;
  1484. background-color: #565656;
  1485. filter: alpha(Opacity=80);
  1486. -moz-opacity: 0.5;
  1487. opacity: 0.5;
  1488. display: none;
  1489. }
  1490. .gg-phone {
  1491. margin: auto;
  1492. box-sizing: border-box;
  1493. position: relative;
  1494. display: block;
  1495. width: 22px;
  1496. height: 22px;
  1497. transform: scale(var(--ggs, 1))
  1498. }
  1499. .gg-phone::after,
  1500. .gg-phone::before {
  1501. content: "";
  1502. display: block;
  1503. box-sizing: border-box;
  1504. position: absolute
  1505. }
  1506. .gg-phone::after {
  1507. width: 18px;
  1508. height: 18px;
  1509. border-top-left-radius: 1px;
  1510. border-bottom-right-radius: 1px;
  1511. border-bottom-left-radius: 12px;
  1512. border-left: 4px solid;
  1513. border-bottom: 4px solid;
  1514. left: 2px;
  1515. bottom: 0px;
  1516. background:
  1517. linear-gradient(to left,
  1518. currentColor 10px,
  1519. transparent 0) no-repeat right 11px/6px 4px,
  1520. linear-gradient(to left,
  1521. currentColor 10px,
  1522. transparent 0) no-repeat -1px 0/4px 6px
  1523. }
  1524. .gg-phone::before {
  1525. width: 20px;
  1526. height: 20px;
  1527. border: 6px double;
  1528. border-top-color: transparent;
  1529. border-bottom-color: transparent;
  1530. border-left-color: transparent;
  1531. border-radius: 50%;
  1532. transform: rotate(-45deg);
  1533. bottom: 0px;
  1534. left: 2px
  1535. }
  1536. /* */
  1537. .options-panel {
  1538. /* background: #ffffff; */
  1539. overflow: hidden;
  1540. }
  1541. .each-option {
  1542. position: relative;
  1543. float: left;
  1544. padding: 5px 0px;
  1545. width: 18%;
  1546. box-sizing: border-box;
  1547. border: 0px red solid;
  1548. text-align: center;
  1549. color: #2A2A2A;
  1550. border-radius: 5px;
  1551. margin: 1%;
  1552. height: 58px;
  1553. }
  1554. .item {
  1555. border-radius: 5px;
  1556. height: 65px;
  1557. background-color: #F2F7FF;
  1558. display: grid;
  1559. align-content: space-around;
  1560. justify-items: center;
  1561. }
  1562. .item-busy {
  1563. color: #FF7D12;
  1564. background-color: #FFF3E9;
  1565. }
  1566. .item-zt {
  1567. color: #959595;
  1568. background-color: #F9F9F9;
  1569. }
  1570. .item-disable {
  1571. color: #FF4747;
  1572. background-color: #FFF0F0;
  1573. }
  1574. .item-number {
  1575. font-size: 18px;
  1576. line-height: 23px;
  1577. padding-top: 5px;
  1578. }
  1579. .item-status {
  1580. font-size: 14px;
  1581. line-height: 20px;
  1582. padding-top: 1px;
  1583. }
  1584. .item-selected {
  1585. color: #1B7BFF !important;
  1586. background: #EDF4FF;
  1587. border: 1px #1B7BFF solid !important;
  1588. height: 58px;
  1589. position: relative;
  1590. margin: 0 auto;
  1591. text-align: center;
  1592. background-color: #fff;
  1593. }
  1594. .item-selected:before {
  1595. content: '';
  1596. position: absolute;
  1597. right: -1px;
  1598. bottom: -1px;
  1599. border: 12px solid #089BFB;
  1600. border-top-color: transparent;
  1601. border-left-color: transparent;
  1602. border-radius: 0px 0px 7px 0px;
  1603. }
  1604. .item-selected:after {
  1605. content: '';
  1606. width: 2px;
  1607. height: 6px;
  1608. position: absolute;
  1609. right: 3px;
  1610. bottom: 4px;
  1611. border: 2px solid #fff;
  1612. border-top-color: transparent;
  1613. border-left-color: transparent;
  1614. transform: rotate(45deg);
  1615. }
  1616. /* */
  1617. .each-tc {
  1618. position: relative;
  1619. float: left;
  1620. width: 29.333333333%;
  1621. box-sizing: border-box;
  1622. border: 0px red solid;
  1623. text-align: center;
  1624. color: #2A2A2A;
  1625. border-radius: 5px;
  1626. margin: 2%;
  1627. }
  1628. .item-tc {
  1629. border-radius: 5px;
  1630. height: 40px;
  1631. background-color: #ffffff;
  1632. /* border: 1px #AEAEAE solid; */
  1633. }
  1634. .item-tc-nr {
  1635. font-size: 15px;
  1636. line-height: 40px;
  1637. border-radius: 5px;
  1638. }
  1639. /* */
  1640. .confirm-panel {
  1641. background-color: #ffffff;
  1642. border-radius: 0px 0px 5px 5px;
  1643. padding: 5px 0px 24px 0px;
  1644. position: fixed;
  1645. bottom: 0px;
  1646. width: 100%;
  1647. }
  1648. .confirm-btn {
  1649. margin: 0 auto;
  1650. width: 93%;
  1651. height: 50px;
  1652. text-align: center;
  1653. font-size: 17px;
  1654. color: #ffffff;
  1655. background-color: #089BFB;
  1656. line-height: 50px;
  1657. border-radius: 7px;
  1658. }
  1659. /* */
  1660. .cz-panel {
  1661. display: flex;
  1662. background-color: #ffffff;
  1663. padding: 8px;
  1664. border-radius: 5px;
  1665. margin-left: 110px;
  1666. }
  1667. .cz-btn {
  1668. width: 71px;
  1669. height: 28px;
  1670. text-align: center;
  1671. font-size: 14px;
  1672. color: #ffffff;
  1673. background-color: #089BFB;
  1674. line-height: 19px;
  1675. border-radius: 20px;
  1676. }
  1677. .fz1 {
  1678. flex: 1;
  1679. line-height: 28px;
  1680. }
  1681. .fz2 {
  1682. flex: 2;
  1683. line-height: 40px;
  1684. }
  1685. .fz3 {
  1686. flex: 3;
  1687. line-height: 40px;
  1688. }
  1689. /* */
  1690. .bot {
  1691. text-align: center;
  1692. height: 50px;
  1693. line-height: 45px;
  1694. background: #fff;
  1695. position: fixed;
  1696. left: 0;
  1697. bottom: 0;
  1698. z-index: 1;
  1699. width: 100%;
  1700. background-color: #ffffff;
  1701. color: #636363;
  1702. display: flex;
  1703. }
  1704. .gg-clipboard {
  1705. box-sizing: border-box;
  1706. position: relative;
  1707. display: block;
  1708. transform: scale(var(--ggs, 1));
  1709. width: 18px;
  1710. height: 18px;
  1711. border: 2px solid;
  1712. border-radius: 2px;
  1713. margin: auto;
  1714. }
  1715. .gg-clipboard::after,
  1716. .gg-clipboard::before {
  1717. content: "";
  1718. display: block;
  1719. box-sizing: border-box;
  1720. position: absolute;
  1721. border-radius: 2px;
  1722. width: 10px;
  1723. left: 2px
  1724. }
  1725. .gg-clipboard::before {
  1726. border: 2px solid;
  1727. border-bottom-left-radius: 3px;
  1728. border-bottom-right-radius: 3px;
  1729. top: -2px;
  1730. height: 6px
  1731. }
  1732. .gg-clipboard::after {
  1733. height: 2px;
  1734. background: currentColor;
  1735. box-shadow: 0 -4px 0 0;
  1736. bottom: 2px
  1737. }
  1738. .cl-f {
  1739. font-size: 12px;
  1740. line-height: 26px;
  1741. }
  1742. .cl-it {
  1743. padding: 5px;
  1744. color: #636363;
  1745. }
  1746. .cl-gx {
  1747. background-color: #59bdff;
  1748. color: #ffffff;
  1749. line-height: 50px;
  1750. }
  1751. .ph {
  1752. width: 18px;
  1753. height: 18px;
  1754. }
  1755. a {
  1756. text-decoration: none;
  1757. color: #000000;
  1758. }
  1759. .options_panel_recharge {
  1760. margin-top: 7px;
  1761. border-radius: 8px 8px 0px 0px;
  1762. background: #ffffff;
  1763. padding: 7px;
  1764. overflow: hidden;
  1765. }
  1766. .each_option_recharge {
  1767. position: relative;
  1768. float: left;
  1769. padding: 5px 0px;
  1770. width: 31.3333333%;
  1771. box-sizing: border-box;
  1772. border: 0px red solid;
  1773. text-align: center;
  1774. color: #2A2A2A;
  1775. border-radius: 5px;
  1776. margin: 1%;
  1777. height: 72px;
  1778. }
  1779. .tip-panel-all {
  1780. position: fixed;
  1781. border: 2px solid #636363;
  1782. border-radius: 8px;
  1783. z-index: 1002;
  1784. background-color: #000000;
  1785. filter: alpha(opacity=50);
  1786. /* IE */
  1787. -moz-opacity: 0.5;
  1788. /* Moz + FF */
  1789. opacity: 0.5;
  1790. }
  1791. .tip-panel-zf {
  1792. width: 103px;
  1793. height: 55px;
  1794. top: 46px;
  1795. right: 14px;
  1796. }
  1797. .tip-panel-gx {
  1798. width: 189px;
  1799. height: 58px;
  1800. bottom: 67px;
  1801. right: 13px;
  1802. }
  1803. .tip-panel-bor-all {
  1804. width: 0px;
  1805. height: 0;
  1806. position: relative;
  1807. }
  1808. .tip-panel-bor {
  1809. border: 17px solid transparent;
  1810. border-bottom-color: #000000;
  1811. top: -29px;
  1812. left: 60px;
  1813. }
  1814. .tip-panel-bor-gx {
  1815. border: 12px solid transparent;
  1816. border-top-color: #000000;
  1817. top: 60px;
  1818. left: 108px;
  1819. }
  1820. .tip-panel-text-all {
  1821. position: relative;
  1822. text-align: center;
  1823. color: #ffffff;
  1824. }
  1825. .tip-panel-text {
  1826. top: -30px;
  1827. left: 0px;
  1828. font-size: 15px;
  1829. }
  1830. .tip-panel-text-gx {
  1831. top: -22px;
  1832. left: 1px;
  1833. }
  1834. @-webkit-keyframes bounce-down {
  1835. 25% {
  1836. -webkit-transform: translateY(-5px);
  1837. }
  1838. 50%,
  1839. 100% {
  1840. -webkit-transform: translateY(0);
  1841. }
  1842. 75% {
  1843. -webkit-transform: translateY(5px);
  1844. }
  1845. }
  1846. @keyframes bounce-down {
  1847. 25% {
  1848. transform: translateY(-5px);
  1849. }
  1850. 50%,
  1851. 100% {
  1852. transform: translateY(0);
  1853. }
  1854. 75% {
  1855. transform: translateY(5px);
  1856. }
  1857. }
  1858. .animate-bounce-down {
  1859. -webkit-animation: bounce-down 1.2s linear infinite;
  1860. animation: bounce-down 1.2s linear infinite;
  1861. }
  1862. @-webkit-keyframes bounce-down-gx {
  1863. 25% {
  1864. -webkit-transform: translateY(5px);
  1865. }
  1866. 50%,
  1867. 100% {
  1868. -webkit-transform: translateY(0);
  1869. }
  1870. 75% {
  1871. -webkit-transform: translateY(-5px);
  1872. }
  1873. }
  1874. @keyframes bounce-down-gx {
  1875. 25% {
  1876. transform: translateY(5px);
  1877. }
  1878. 50%,
  1879. 100% {
  1880. transform: translateY(0);
  1881. }
  1882. 75% {
  1883. transform: translateY(-5px);
  1884. }
  1885. }
  1886. .animate-bounce-down-gx {
  1887. -webkit-animation: bounce-down-gx 1.2s linear infinite;
  1888. animation: bounce-down-gx 1.2s linear infinite;
  1889. }
  1890. /* */
  1891. .head {
  1892. text-align: center;
  1893. height: 45px;
  1894. line-height: 45px;
  1895. box-shadow: 0 1px 1px 1px #eee;
  1896. background: #fff;
  1897. position: fixed;
  1898. left: 0;
  1899. top: 44px;
  1900. z-index: 1;
  1901. width: 100%;
  1902. color: #000;
  1903. }
  1904. #header-content1 {
  1905. height: 30px;
  1906. float: left;
  1907. background-color: #FFF;
  1908. border-radius: 20px;
  1909. position: absolute;
  1910. /* left: 5%; */
  1911. top: 6px;
  1912. line-height: 30px;
  1913. padding-left: 16px;
  1914. font-size: 14px;
  1915. }
  1916. #header-score1 {
  1917. border-radius: 40px;
  1918. padding: 0px 10px;
  1919. }
  1920. .head {
  1921. text-align: center;
  1922. height: 45px;
  1923. line-height: 45px;
  1924. box-shadow: 0 1px 1px 1px #eee;
  1925. background: #fff;
  1926. position: fixed;
  1927. left: 0;
  1928. top: 0;
  1929. z-index: 1;
  1930. width: 100%;
  1931. color: #000;
  1932. }
  1933. .pay-btn {
  1934. background-color: #ffffff;
  1935. border: 1px solid #ffffff;
  1936. height: 100%;
  1937. width: 100%;
  1938. font-size: 18px;
  1939. border-radius: 11px;
  1940. display: -webkit-box;
  1941. display: -webkit-flex;
  1942. display: flex;
  1943. padding: 5px 0px;
  1944. box-shadow: 1px 1px 8px #e0e0e8;
  1945. }
  1946. .weui-flex1 {
  1947. -webkit-box-flex: 1;
  1948. -webkit-flex: 1;
  1949. flex: 1;
  1950. }
  1951. .weui-flex3 {
  1952. -webkit-box-flex: 3;
  1953. -webkit-flex: 3;
  1954. flex: 3;
  1955. }
  1956. .pay-btn:active {
  1957. background-color: #eceef2;
  1958. border-radius: 11px;
  1959. outline: none;
  1960. color: #ffffff;
  1961. }
  1962. .pay-btn-content {
  1963. padding: 5px 5px;
  1964. }
  1965. a {
  1966. color: #1677ff;
  1967. text-decoration: none;
  1968. }
  1969. .relod-btn {
  1970. border: 1px solid #1677ff;
  1971. color: #1677ff;
  1972. }
  1973. body,
  1974. html {
  1975. background: #efeff4;
  1976. }
  1977. #header_integral_text {
  1978. height: 20px;
  1979. padding-top: 15px;
  1980. padding-right: 15px;
  1981. line-height: 20px;
  1982. font-weight: bold;
  1983. color: #1677ff;
  1984. font-size: 14px;
  1985. display: inline-flex;
  1986. }
  1987. .applyCouponsClass {
  1988. margin-left: 80vw;
  1989. color: #008eff;
  1990. font-size: 14px;
  1991. font-weight: bold;
  1992. position: absolute;
  1993. }
  1994. .coupone_wrap {
  1995. margin-top: 200px;
  1996. }
  1997. .coupon_btn {
  1998. width: 100%;
  1999. height: 50px;
  2000. text-align: center;
  2001. margin-top: 100px;
  2002. }
  2003. </style>
  2004. <style lang="scss" scoped>
  2005. .icon {
  2006. width: 30px;
  2007. height: 30px;
  2008. }
  2009. .item-number-p {
  2010. display: flex;
  2011. color: #1296db;
  2012. font-size: 18px;
  2013. font-weight: 700;
  2014. padding-top: 5px;
  2015. flex-direction: row;
  2016. justify-content: space-evenly;
  2017. align-items: center;
  2018. }
  2019. .item-status-p {
  2020. color: #f33e3e;
  2021. ;
  2022. font-size: 14px;
  2023. line-height: 20px;
  2024. padding-top: 1px;
  2025. display: flex;
  2026. flex-direction: row;
  2027. justify-content: space-evenly;
  2028. align-items: center;
  2029. }
  2030. .guide-box {
  2031. position: fixed;
  2032. top: 0;
  2033. left: 0;
  2034. width: 100%;
  2035. height: 100%;
  2036. background-color: rgba(0, 0, 0, 0.15);
  2037. z-index: 1000;
  2038. align-content: space-around;
  2039. justify-content: center;
  2040. }
  2041. @keyframes shake {
  2042. 0% {
  2043. transform: translateX(0);
  2044. }
  2045. 25% {
  2046. transform: translateX(-3px);
  2047. }
  2048. 50% {
  2049. transform: translateX(3px);
  2050. }
  2051. 75% {
  2052. transform: translateX(-3px);
  2053. }
  2054. 100% {
  2055. transform: translateX(3px);
  2056. }
  2057. }
  2058. .shake-animation {
  2059. display: inline-block;
  2060. animation: shake 0.8s;
  2061. /* 调整时间可以控制动画的速度 */
  2062. animation-iteration-count: infinite;
  2063. /* 让动画无限循环 */
  2064. font-size: larger;
  2065. font-weight: 600;
  2066. color: #3f00ff;
  2067. margin-top: 20px;
  2068. }
  2069. </style>
  2070. <style lang="scss" scoped>
  2071. .flexSpaceBetween{
  2072. display: flex;
  2073. justify-content: space-between;
  2074. align-items: center;
  2075. }
  2076. .fee {
  2077. padding:20rpx;
  2078. background: #ffffff;
  2079. border-radius: 10rpx;
  2080. border: 1rpx solid #ccc;
  2081. margin: 20rpx 0 30rpx 0;
  2082. .ele-price-title {
  2083. .title-item {
  2084. width: 33.3333%;
  2085. text-align: center;
  2086. }
  2087. }
  2088. .time-item {
  2089. font-size: 30rpx;
  2090. margin: 5rpx 0;
  2091. .item {
  2092. width: 33.3333%;
  2093. text-align: center;
  2094. }
  2095. }
  2096. .service-fee {
  2097. padding: 20rpx 0 0 20rpx;
  2098. border-top: 1rpx solid #dcdfe2;
  2099. margin-top: 20rpx;
  2100. .fee-item {
  2101. width: 50%;
  2102. text-align: center;
  2103. &:first-child {
  2104. text-align: left;
  2105. }
  2106. }
  2107. .sub-title {
  2108. margin-bottom: 10rpx;
  2109. }
  2110. .sub-item {
  2111. margin-bottom: 10rpx;
  2112. .sub-power {
  2113. margin-left: 10rpx;
  2114. }
  2115. }
  2116. }
  2117. .fee-h1 {
  2118. margin-bottom: 10rpx;
  2119. &.elec {
  2120. padding-left: 20rpx;
  2121. }
  2122. }
  2123. .fee-tips-bottom{
  2124. padding:10rpx;
  2125. background: #f9deca;
  2126. }
  2127. }
  2128. </style>