Explorar o código

feat:优化体验

needcode %!s(int64=2) %!d(string=hai) anos
pai
achega
96508fe189

+ 5 - 1
src/pages-charge/orders/orders.vue

@@ -14,7 +14,11 @@
       </view>
       <view>
         <view class="flex-align-center">
-          <view class="fs-30 fw-500">充电费用</view>
+          <view
+            class="fs-30 fw-500"
+            :style="{ opacity: item.invoiceStatus === 1 ? 0.5 : 1 }"
+            >充电费用</view
+          >
           <view
             v-if="
               isInvoice &&

+ 6 - 6
src/pages-common/invoice/invoice.vue

@@ -19,13 +19,13 @@
         <view class="fs-32 lh-48 color-000" v-else>{{ item.value }}</view>
       </view>
     </view>
-    <style-bottom-view background="transparent">
-      <view class="pl-40 pr-40 pb-30 pt-30">
-        <style-button type="primary" @click="openInvoice"
-          >查看发票</style-button
-        >
+    <view class="block pt-40 pb-40 pl-30 pr-30 flex mt-30">
+      <view class="fs-32 lh-48 color-999" style="width: 192rpx">发票</view>
+      <view class="ml-auto flex-align-center" @click="openInvoice">
+        <view class="fs-28 color-primary mr-4">立即查看</view>
+        <uni-icons type="right" size="14" color="var(--color-primary)"></uni-icons>
       </view>
-    </style-bottom-view>
+    </view>
   </view>
 </template>
 

+ 3 - 0
src/pages.json

@@ -12,6 +12,9 @@
     },
     {
       "path": "pages/user/user"
+    },
+    {
+      "path": "pages/index/index"
     }
   ],
   "subPackages": [

+ 16 - 1
src/pages/index/index.vue

@@ -1,10 +1,25 @@
 <template>
-  <view></view>
+  <view>
+    <map
+      :style="{
+        width: '100%',
+        height: '100vh',
+      }"
+      :latitude="23.098994"
+      :longitude="113.32252"
+      min-scale="1"
+      :scale="12"
+    ></map>
+  </view>
 </template>
 
 <script setup lang="ts">
+import { isDebug } from "@/utils/constant";
 import { onLoad } from "@dcloudio/uni-app";
 onLoad(() => {
+  if (isDebug) {
+    return;
+  }
   uni.switchTab({
     url: "/pages/map/map",
   });

+ 2 - 2
src/pages/map/map.vue

@@ -142,7 +142,7 @@
         }"
       >
         <image
-          src="/static/images/map-bg.png"
+          src="/static/images/map-bg.jpg"
           mode="widthFix"
           style="width: 100%"
         ></image>
@@ -231,7 +231,7 @@
             mode="widthFix"
           />
           <view class="fs-22 mt-14 color-000-5">{{
-            loading ? "加载中" : "暂无充电站信息"
+            loading ? "加载中" : token ? "暂无充电站信息" : "登录后查看更多电站信息"
           }}</view>
         </view>
       </block>

BIN=BIN
src/static/images/map-bg.jpg


BIN=BIN
src/static/images/map-bg.png


+ 9 - 9
src/utils/date.ts

@@ -1,20 +1,20 @@
 export function format(format: string, time?: number) {
-  const now = time ? new Date(time) : new Date()
+  const now = time ? new Date(time) : new Date();
   const map: Record<string, string | number> = {
     y: now.getFullYear(),
-    M: now.getMonth() + 1,
-    d: now.getDate(),
+    M: now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`,
+    d: now.getDate() > 9 ? now.getDate() : `0${now.getDate()}`,
     h: now.getHours() > 9 ? now.getHours() : `0${now.getHours()}`,
     m: now.getMinutes() > 9 ? now.getMinutes() : `0${now.getMinutes()}`,
-    s: now.getSeconds() > 9 ? now.getSeconds() : `0${now.getSeconds()}`
-  }
-  const res = []
+    s: now.getSeconds() > 9 ? now.getSeconds() : `0${now.getSeconds()}`,
+  };
+  const res = [];
   for (let i = 0; i < format.length; i++) {
     if (map[format.charAt(i)]) {
-      res.push(map[format.charAt(i)])
+      res.push(map[format.charAt(i)]);
     } else {
-      res.push(format.charAt(i))
+      res.push(format.charAt(i));
     }
   }
-  return res.join('')
+  return res.join("");
 }