index.vue 54 KB

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