index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <template>
  2. <view>
  3. <u-navbar title="微营业厅" title-color="#fff" :is-back="false" :background="background" back-icon-color="#ffffff"></u-navbar>
  4. <!-- 账户充值 扣费记录 -->
  5. <view class="function">
  6. <view class="item" @click="gotoUrl('/pages/recharge/accountRecharge')">
  7. <view class="icon">
  8. <image class="img" src="@/assets/img/iconPark-wallet.svg" mode=""></image>
  9. </view>
  10. <view class="text">
  11. <view class="title">
  12. 账户充值
  13. </view>
  14. <view class="infos">
  15. 余额 {{personInfo.balance}}
  16. </view>
  17. </view>
  18. </view>
  19. <view class="item" @click="gotoUrl('/pages/deductionRecord/deductionRecord')">
  20. <view class="icon icon2">
  21. <image class="img" src="@/assets/img/iconPark-order.svg" mode=""></image>
  22. </view>
  23. <view class="text">
  24. <view class="title">
  25. 扣费记录
  26. </view>
  27. <view class="infos">
  28. 查看每日用电情况
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 管家服务 -->
  34. <view class="housekeeper-service">
  35. <view class="title">
  36. 管家服务
  37. </view>
  38. <view class="grid">
  39. <u-grid :col="4" :border="false">
  40. <u-grid-item @click="gotoUrl('/pages/recharge/rechargeRecord')" >
  41. <view class="icon icon1">
  42. <image class="img" src="@/assets/img/far fa-clock.svg" mode=""></image>
  43. </view>
  44. <view class="grid-text">充值记录
  45. </view>
  46. </u-grid-item>
  47. <u-grid-item @click="gotoUrl('/pages/billingRules/billingRules')" >
  48. <view class="icon icon2">
  49. <image class="img" src="@/assets/img/fas fa-file-alt.svg" mode=""></image>
  50. </view>
  51. <view class="grid-text">计费规则
  52. </view>
  53. </u-grid-item>
  54. <u-grid-item @click="gotoUrl('/pages/message/messageList?type=AA&typeName=账单提醒')">
  55. <view class="icon icon3">
  56. <image class="img" src="@/assets/img/antFill-account-book.svg" mode=""></image>
  57. </view>
  58. <view class="grid-text">账单提醒
  59. </view>
  60. </u-grid-item>
  61. <u-grid-item @click="gotoUrl('/pages/message/messageList?type=3&typeName=断电提醒')">
  62. <view class="icon icon9">
  63. <image class="img" src="@/assets/img/fas fa-exclamation-triangle.svg" mode=""></image>
  64. </view>
  65. <view class="grid-text">断电提醒
  66. </view>
  67. </u-grid-item>
  68. <u-grid-item @click="gotoUrl('/pages/message/messageList?type=5&typeName=停电通知')">
  69. <view class="icon icon5">
  70. <image class="img" src="@/assets/img/antFill-notification.svg" mode=""></image>
  71. </view>
  72. <view class="grid-text">停电通知
  73. </view>
  74. </u-grid-item>
  75. <u-grid-item @click="gotoUrl('/pages/message/messageList?type=4?type=5&typeName=故障警报')">
  76. <view class="icon icon6">
  77. <image class="img" src="@/assets/img/fas fa-exclamation-triangle.svg" mode=""></image>
  78. </view>
  79. <view class="grid-text">故障警报
  80. </view>
  81. </u-grid-item>
  82. <u-grid-item @click="gotoUrl('/pages/mine/electronicMonitoring')">
  83. <view class="icon icon7">
  84. <image class="img" src="@/assets/img/fas fa-chart-pie.svg" mode=""></image>
  85. </view>
  86. <view class="grid-text">用电监控
  87. </view>
  88. </u-grid-item>
  89. <u-grid-item @click="gotoUrl('/pages/mine/contactService')" >
  90. <view class="icon icon4">
  91. <image class="img" src="@/assets/img/if-support.svg" mode=""></image>
  92. </view>
  93. <view class="grid-text">客服热线
  94. </view>
  95. </u-grid-item>
  96. <u-grid-item v-if="false" @click="gotoUrl('/pages/billingRules/billingRules')">
  97. <view class="icon icon8">
  98. <image class="img" src="@/assets/img/fas fa-book.svg" mode=""></image>
  99. </view>
  100. <view class="grid-text">用电常识
  101. </view>
  102. </u-grid-item>
  103. </u-grid>
  104. </view>
  105. </view>
  106. <view class="cover">
  107. <view class="text">
  108. 预存余额 安心用电
  109. </view>
  110. </view>
  111. <u-modal v-model="openModalBl" @confirm="confirmPhone" confirm-text="拨打电话" confirm-color="#606266"
  112. :show-cancel-button="true" ref="uModal" :asyncClose="true" title="客服电话" content="400-8899-619"
  113. :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
  114. <u-divider border-color="#bbbbbb" half-width="80"
  115. @click="openModalBl=true"
  116. color="#777777">荆鹏电管家 服务热线 <text
  117. class="tel">400-8899-619</text></u-divider>
  118. <Tabbar :current="0" ref="tabbarMain" :prefetchNum="prefetchNum" ></Tabbar>
  119. </view>
  120. </template>
  121. <script>
  122. import * as API from '@/apis/pagejs/index.js'
  123. import * as API_message from '@/apis/pagejs/message.js'
  124. import Tabbar from '@/components/Tabbar.vue'
  125. export default {
  126. components: {
  127. Tabbar
  128. },
  129. data() {
  130. return {
  131. openModalBl:false,
  132. personInfo:{},
  133. background: {
  134. backgroundColor: '#3D86FF',
  135. },
  136. prefetchNum:0
  137. }
  138. },
  139. onLoad() {
  140. this.homePage()
  141. this.prefetch()
  142. },
  143. methods: {
  144. prefetch(){
  145. API_message.prefetch({
  146. }).then((response) => {
  147. //this.prefetchNum=response.data
  148. if (this.$refs.tabbarMain) {
  149. this.$refs.tabbarMain.setprefetchNum(response.data);
  150. }
  151. }).catch(error => {
  152. //uni.hideLoading();
  153. })
  154. },
  155. confirmPhone() {
  156. this.openModalBl = false;
  157. uni.makePhoneCall({
  158. phoneNumber:"400-8899-619" //仅为示例
  159. });
  160. },
  161. homePage(){
  162. // uni.showLoading({
  163. // title: "加载中",
  164. // mask: true,
  165. // })
  166. API.homePage({
  167. }).then((response) => {
  168. //uni.hideLoading();
  169. this.personInfo=response.data.tenantInfo;
  170. //console.log(response.data.tenantInfo)
  171. }).catch(error => {
  172. //uni.hideLoading();
  173. })
  174. }
  175. }
  176. }
  177. </script>
  178. <style lang="scss" scoped>
  179. // 账户充值 扣费记录
  180. .function {
  181. background-color: #fff;
  182. padding: 56rpx 40rpx;
  183. display: flex;
  184. justify-content: space-between;
  185. .item {
  186. display: flex;
  187. align-items: center;
  188. .icon {
  189. width: 96rpx;
  190. height: 96rpx;
  191. border-radius: 12px;
  192. background: linear-gradient(180deg, rgba(93, 155, 255, 1) 0%, rgba(0, 97, 255, 1) 100%);
  193. display: flex;
  194. align-items: center;
  195. justify-content: center;
  196. .img {
  197. width: 64rpx !important;
  198. height: 64rpx !important;
  199. }
  200. }
  201. .icon2 {
  202. background: linear-gradient(179.2deg, rgba(96, 213, 124, 1) -0.62%, rgba(0, 161, 39, 1) 97.92%);
  203. }
  204. .text {
  205. margin-left: 16rpx;
  206. .title {
  207. color: rgba(51, 51, 51, 1);
  208. font-size: 36rpx;
  209. font-weight: bold;
  210. }
  211. .infos {
  212. color: rgba(119, 119, 119, 1);
  213. font-size: 24rpx;
  214. margin-top: 8rpx;
  215. }
  216. }
  217. }
  218. }
  219. // 管家服务
  220. .housekeeper-service {
  221. background-color: #fff;
  222. margin-top: 24rpx;
  223. padding: 32rpx;
  224. .title {
  225. font-size: 36rpx;
  226. color: #333333;
  227. font-weight: bold;
  228. }
  229. .grid-text {
  230. margin-top: 28rpx;
  231. color: rgba(51, 51, 51, 1);
  232. }
  233. .icon {
  234. width: 96rpx;
  235. height: 96rpx;
  236. border-radius: 24rpx;
  237. display: flex;
  238. align-items: center;
  239. justify-content: center;
  240. .img {
  241. width: 56rpx;
  242. height: 56rpx;
  243. }
  244. }
  245. .icon1 {
  246. background: linear-gradient(181.79deg, rgba(117, 213, 224, 1) -1.13%, rgba(53, 153, 203, 1) 94.2%);
  247. }
  248. .icon2 {
  249. background: linear-gradient(179.2deg, rgba(168, 178, 238, 1) 6.28%, rgba(123, 123, 240, 1) 96.94%);
  250. }
  251. .icon3 {
  252. background: linear-gradient(180deg, rgba(121, 172, 255, 1) 0%, rgba(57, 132, 255, 1) 100%);
  253. }
  254. .icon4 {
  255. background: linear-gradient(180.82deg, rgba(247, 186, 154, 1) 0.58%, rgba(255, 128, 158, 1) 97.52%);
  256. }
  257. .icon5 {
  258. background: linear-gradient(180.4deg, rgba(127, 213, 151, 1) 2.1%, rgba(67, 176, 116, 1) 101.21%);
  259. }
  260. .icon6 {
  261. background: linear-gradient(180.29deg, rgba(255, 214, 125, 1) 0.9%, rgba(255, 150, 0, 1) 100.4%);
  262. }
  263. .icon7 {
  264. background: linear-gradient(178.44deg, rgba(122, 232, 227, 1) 3.96%, rgba(57, 182, 182, 1) 100.6%);
  265. }
  266. .icon8 {
  267. background: linear-gradient(180.4deg, rgba(127, 213, 151, 1) 2.1%, rgba(67, 176, 116, 1) 101.21%);
  268. }
  269. .icon9 {
  270. background: linear-gradient(180.29deg, rgba(255,124,112,1) 0.9%,rgba(255,79,63,1) 100.4%);
  271. }
  272. }
  273. .cover {
  274. background: radial-gradient(at 100% 100%, rgba(194, 255, 216, 1) 3%, rgba(138, 182, 232, 1) 39%, rgba(82, 110, 248, 1) 100%);
  275. color: #ffffff;
  276. text-align: center;
  277. padding: 40rpx 0;
  278. margin: 24rpx 0;
  279. .text {
  280. font-size: 64rpx;
  281. // box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.2);
  282. text-align: center;
  283. }
  284. }
  285. .tel {
  286. color: #1677FF;
  287. margin-left: 16rpx;
  288. }
  289. </style>