zuy преди 1 година
родител
ревизия
bfadcfbde8
променени са 4 файла, в които са добавени 40 реда и са изтрити 79 реда
  1. 3 61
      src/custom.scss
  2. 22 6
      src/pages/map/index.vue
  3. 10 8
      src/pages/order/index.vue
  4. 5 4
      src/pages/user/index.vue

+ 3 - 61
src/custom.scss

@@ -1,65 +1,4 @@
 
-/* 行为相关颜色 */
-$uni-color-primary: #007aff;
-$uni-color-success: #4cd964;
-$uni-color-warning: #f0ad4e;
-$uni-color-error: #dd524d;
-
-/* 文字基本颜色 */
-$uni-text-color: #333; // 基本色
-$uni-text-color-inverse: #fff; // 反色
-$uni-text-color-grey: #999; // 辅助灰色,如加载更多的提示信息
-$uni-text-color-placeholder: #808080;
-$uni-text-color-disable: #c0c0c0;
-
-/* 背景颜色 */
-$uni-bg-color: #fff;
-$uni-bg-color-grey: #f8f8f8;
-$uni-bg-color-hover: #f1f1f1; // 点击状态颜色
-$uni-bg-color-mask: rgba(0, 0, 0, 0.4); // 遮罩颜色
-
-/* 边框颜色 */
-$uni-border-color: #c8c7cc;
-
-/* 尺寸变量 */
-
-/* 文字尺寸 */
-$uni-font-size-sm: 12px;
-$uni-font-size-base: 14px;
-$uni-font-size-lg: 16;
-
-/* 图片尺寸 */
-$uni-img-size-sm: 20px;
-$uni-img-size-base: 26px;
-$uni-img-size-lg: 40px;
-
-/* Border Radius */
-$uni-border-radius-sm: 2px;
-$uni-border-radius-base: 3px;
-$uni-border-radius-lg: 6px;
-$uni-border-radius-circle: 50%;
-
-/* 水平间距 */
-$uni-spacing-row-sm: 5px;
-$uni-spacing-row-base: 10px;
-$uni-spacing-row-lg: 15px;
-
-/* 垂直间距 */
-$uni-spacing-col-sm: 4px;
-$uni-spacing-col-base: 8px;
-$uni-spacing-col-lg: 12px;
-
-/* 透明度 */
-$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
-
-/* 文章场景相关 */
-$uni-color-title: #2c405a; // 文章标题颜色
-$uni-font-size-title: 20px;
-$uni-color-subtitle: #555; // 二级标题颜色
-$uni-font-size-subtitle: 18px;
-$uni-color-paragraph: #3f536e; // 文章段落颜色
-$uni-font-size-paragraph: 15px;
-
 ///* flex布局 */
 .flex {
   display: flex;
@@ -80,6 +19,9 @@ $uni-font-size-paragraph: 15px;
   flex-direction: column;
   width: 100%;
   overflow: hidden;
+  align-items: center;
+  justify-content: center;
+  align-content: center;
 }
 
 .flex-margin {

+ 22 - 6
src/pages/map/index.vue

@@ -7,11 +7,11 @@
          :markers="state.covers"
          min-scale="1"
          :scale="12"
+         :show-compass="false"
          @regionchange="handleMapRegionChange"
          @updated="handleMapUpdated"
          @labeltap="handleMapTapMarker"
-         @markertap="handleMapTapMarker"
-    >
+         @markertap="handleMapTapMarker">
 
       <view class="content_reset-btn" @click="resetLocation">
         <uv-icon name="empty-address" size="28" color="#000" icon="/static/map-re-location.png"></uv-icon>
@@ -147,9 +147,25 @@ const relocation = (longitude: number, latitude: number) => {
 
 //重置地图定位
 const resetLocation = () => {
-  if (state.loading) {
-    return;
-  }
+  // if (state.loading) {
+  //   return;
+  // }
+  console.log("reset location")
+  uni.getLocation({
+    type: 'gcj02', //返回可以用于uni.openLocation的经纬度
+    success: res=>{
+      const latitude = res.latitude;
+      const longitude = res.longitude;
+      console.log("reset location",res)
+      uni.openLocation({
+        latitude: latitude,
+        longitude: longitude,
+        success: function () {
+          console.log('success');
+        }
+      });
+    }
+  });
   // eslint-disable-next-line promise/catch-or-return
   // fetchLocation().then((res: any) => {
   //   const { latitude, longitude } = res;
@@ -228,7 +244,7 @@ const handleNavStation = (station: any) => {
   &-status {
     position: absolute;
     right: 0;
-    top:0;
+    top: 0;
 
     &-text {
       background: $uni-color-primary;

+ 10 - 8
src/pages/order/index.vue

@@ -27,14 +27,16 @@
               <view class="right">¥{{ item.money }}</view>
             </view>
             <view class="action" style="text-align: right;">
-              <uv-button plain  type="primary" size="mini">{{ item.payment }}</uv-button>
-              <uv-button  type="error" size="mini" class="ml10" style="margin-left: 10px;">{{ item.delete }}</uv-button>
-<!--              <view class="button button_pay"
-                    style="width: 36px;text-align:center;font-size: 10px;">{{ item.payment }}
+              <uv-button plain type="primary" size="mini">{{ item.payment }}</uv-button>
+              <view class="ml10">
+                <uv-button type="error" size="mini" class="ml10" style="margin-left: 10px;">{{ item.delete }}</uv-button>
               </view>
-              <view class="button button_del" hover-class="none"
-                    style="width: 25px;text-align:center;font-size: 10px;">{{ item.delete }}
-              </view>-->
+              <!--              <view class="button button_pay"
+                                  style="width: 36px;text-align:center;font-size: 10px;">{{ item.payment }}
+                            </view>
+                            <view class="button button_del" hover-class="none"
+                                  style="width: 25px;text-align:center;font-size: 10px;">{{ item.delete }}
+                            </view>-->
             </view>
           </view>
         </view>
@@ -44,7 +46,7 @@
 </template>
 
 <script lang="ts" setup>
-import {reactive, ref} from 'vue'
+import {reactive} from 'vue'
 import {onHide, onShow} from "@dcloudio/uni-app";
 
 

+ 5 - 4
src/pages/user/index.vue

@@ -9,7 +9,7 @@
           <image
               src="/static/user/round.png"
               mode="heightFix"
-              style="height: 100%"
+              style="width: 12orpx;height: 120rpx"
           />
         </view>
         <view class="main flex-shrink">
@@ -231,11 +231,12 @@ onShow(() => {
 
     &_left {
       display: flex;
-
+      align-items: center;
+      align-content: center;
 
       image {
-        width: 52rpx;
-        height: 52rpx;
+        width: 42rpx;
+        height: 42rpx;
         margin-right: 20rpx;
       }