index.vue 53 KB

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