index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <template>
  2. <view>
  3. <u-navbar title="充电中" :is-back="false">
  4. <view class="slot-wrap">
  5. <view class="navbar-left"></view>
  6. <view class="navbar-right" @click="f5()" style=" color: #1d7cff;">
  7. <u-icon name="shuaxin" custom-prefix="custom-icon" color="#1677ff" size="40"></u-icon>刷新
  8. </view>
  9. </view>
  10. </u-navbar>
  11. <swiper class="swiper" style=" height: 650px;">
  12. <swiper-item>
  13. <view class="chargeInfo">
  14. <view class="chargeInfo-text">
  15. <p>桩名:打赏打赏安舒打赏</p>
  16. <p>桩号:121564</p>
  17. </view>
  18. <view class="chargeInfo-btn">
  19. 通道:5
  20. </view>
  21. </view>
  22. <view class="chargeImg">
  23. <img src="/static/img/charge1.png" alt="">
  24. <!-- <img src="/static/img/charge2.png" alt=""> -->
  25. </view>
  26. <view class="chargeTime">
  27. <p>剩余时长</p>
  28. <u-line-progress active-color="#ececec" height="48" :percent="percent">
  29. <div style="
  30. border-radius: 100px;
  31. min-width: 70px; width: 100%;background-color: rgba(51, 136, 255, 100);height: 8px;">
  32. &nbsp;
  33. <div class="" style="float: right;
  34. padding: 0 8px;
  35. border-radius: 100px;
  36. background-color: rgba(51, 136, 255, 100);
  37. color: rgb(255, 255, 255);
  38. font-size: 12px;
  39. text-align: center;
  40. font-family: -apple-system;
  41. top: -5px;
  42. position: relative;
  43. ">{{percent}}%</div>
  44. </div>
  45. </u-line-progress>
  46. </view>
  47. <view class="chargeData">
  48. <view class="chargeData-item">
  49. <u-icon name="jiagebaohu" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
  50. <h2>0.25元</h2>
  51. <p>消费金额</p>
  52. </view>
  53. <view class="chargeData-item">
  54. <u-icon name="dian" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
  55. <h2>100</h2>
  56. <p>充电功率</p>
  57. </view>
  58. </view>
  59. <view class="chargeBtn">
  60. <view class="chargeBtn-item" @click="returnMoney()">退款</view>
  61. <view class="chargeBtn-item" @click="showTips()">费用说明</view>
  62. </view>
  63. </swiper-item>
  64. <swiper-item>
  65. <view class="chargeInfo">
  66. <view class="chargeInfo-text">
  67. <p>桩名:打赏打赏安舒打赏</p>
  68. <p>桩号:121564</p>
  69. </view>
  70. <view class="chargeInfo-btn">
  71. 通道:5
  72. </view>
  73. </view>
  74. <view class="chargeImg">
  75. <img src="/static/img/charge1.png" alt="">
  76. <!-- <img src="/static/img/charge2.png" alt=""> -->
  77. </view>
  78. <view class="chargeTime">
  79. <p>剩余时长</p>
  80. <u-line-progress active-color="#2979ff" :percent="70"></u-line-progress>
  81. </view>
  82. <view class="chargeData">
  83. <view class="chargeData-item">
  84. <u-icon name="jiagebaohu" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
  85. <h2>0.25元</h2>
  86. <p>消费金额</p>
  87. </view>
  88. <view class="chargeData-item">
  89. <u-icon name="dian" custom-prefix="custom-icon" color="#1677ff" size="56"></u-icon>
  90. <h2>100</h2>
  91. <p>充电功率</p>
  92. </view>
  93. </view>
  94. <view class="chargeBtn">
  95. <view class="chargeBtn-item" @click="returnMoney()">退款</view>
  96. <view class="chargeBtn-item" @click="showTips()">费用说明</view>
  97. </view>
  98. </swiper-item>
  99. </swiper>
  100. <Tabbar :current="0"></Tabbar>
  101. </view>
  102. </template>
  103. <script>
  104. import Tabbar from '@/components/Tabbar.vue'
  105. import * as API from '@/apis/index.js'
  106. export default {
  107. data() {
  108. return {
  109. percent:0,
  110. detail: {
  111. },
  112. detailIng: {
  113. },
  114. }
  115. },
  116. methods: {
  117. showTips() {},
  118. returnMoney() {
  119. },
  120. f5() {
  121. uni.showLoading({
  122. title: "加载中",
  123. mask: true,
  124. })
  125. var data = {
  126. companyId: this.companyId,
  127. };
  128. API.getCompany(data).then((res) => {
  129. this.companyInfo = res.data
  130. this.getCompanyDetails()
  131. }).catch(error => {
  132. uni.showToast({
  133. title: error
  134. })
  135. })
  136. },
  137. },
  138. components: {
  139. Tabbar
  140. },
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .slot-wrap {
  145. display: flex;
  146. align-items: center;
  147. justify-content: space-between;
  148. flex: 1;
  149. }
  150. .navbar-right {
  151. display: flex;
  152. margin-right: 20rpx;
  153. align-items: center;
  154. }
  155. .chargeInfo {
  156. padding: 10px;
  157. position: relative;
  158. .chargeInfo-text {
  159. p {
  160. color: #777;
  161. margin-bottom: 5px;
  162. }
  163. }
  164. .chargeInfo-btn {
  165. background-color: #E0EDFF;
  166. width: 72px;
  167. height: 32px;
  168. border-radius: 16px 0 0 16px;
  169. line-height: 32px;
  170. text-align: center;
  171. position: absolute;
  172. right: 0;
  173. top: 16px;
  174. color: #1677FF;
  175. }
  176. }
  177. .chargeImg {
  178. height: 300px;
  179. width: 300px;
  180. margin: 10px auto 0;
  181. img {
  182. height: 100%;
  183. width: 100%;
  184. }
  185. }
  186. .chargeTime {
  187. padding: 20px 30px;
  188. text-align: center;
  189. p {
  190. color: #999;
  191. margin-bottom: 10px;
  192. }
  193. }
  194. .chargeBtn {
  195. display: flex;
  196. justify-content: space-around;
  197. padding: 20px 50px;
  198. .chargeBtn-item {
  199. width: 80px;
  200. height: 32px;
  201. background-color: #1677FF;
  202. line-height: 32px;
  203. color: #fff;
  204. text-align: center;
  205. border-radius: 16px;
  206. }
  207. }
  208. .chargeData {
  209. display: flex;
  210. justify-content: space-around;
  211. .chargeData-item {
  212. text-align: center;
  213. h2 {
  214. font-size: 24px;
  215. font-weight: normal;
  216. color: #1677FF;
  217. margin: 10px 0;
  218. }
  219. p {
  220. color: #999;
  221. }
  222. }
  223. }
  224. </style>