Bladeren bron

多余代码删除

zuypeng 1 jaar geleden
bovenliggende
commit
5b80e66012

+ 0 - 153
src/pages-order/process/index.vue

@@ -1,153 +0,0 @@
-<template>
-  <view class="page">
-    <view v-if="state.questions.length <= 0" class="flex-center mt-40 animation-loading">
-      <uv-icon name="photo"></uv-icon>
-    </view>
-    <view class="sheet">
-      <view class="sheet_bar" v-for="(item, index) in state.questions" :key="index">
-        <view class="head" @click="toggle(index)">
-          <view class="pt-32 pb-32 flex-align-center">
-            <view class="fs-28 fw-500 color-000">{{ item.question }}</view>
-            <view
-                class="width-40 ml-auto flex-end flex-shrink transition"
-                :style="{
-                transform: item.open ? 'rotate(180deg)' : 'rotate(0deg)',
-              }"
-            >
-              <uv-icon name="arrow-down"></uv-icon>
-
-            </view>
-          </view>
-        </view>
-        <view :class="['body', item.open ? 'body-open' : 'body-hidden']">
-          <view
-              v-for="(answerItem, answerIndex) in item.answer"
-              :key="answerIndex"
-              :class="[
-              'fs-28',
-              'lh-48',
-              'color-666',
-              answerIndex === 0 ? 'mt-0' : 'mt-10',
-            ]"
-          >{{ answerItem }}
-          </view
-          >
-        </view>
-      </view>
-    </view>
-    <view
-        class="flex-center flex-column contact mt-20"
-        hover-class="hover-scale"
-        @click="call"
-        v-if="state.questions.length"
-    >
-      <image
-          class="width-96"
-          mode="widthFix"
-          src="/static/contact-customer.png"
-      />
-      <view class="mt-16 color-666 fs-28">电话客服</view>
-    </view>
-  </view>
-</template>
-
-<script setup lang="ts">
-import {onHide, onShow} from "@dcloudio/uni-app";
-import {reactive} from "vue";
-import {body} from "@/utils/https"
-
-
-const initState = () => ({
-  questions: [] as any[],
-  servicerPhone: "",
-})
-
-const state = reactive(initState())
-
-const call = () => {
-  uni.makePhoneCall({
-    phoneNumber: state.servicerPhone,
-  });
-};
-
-const toggle = (index: number) => {
-  state.questions = state.questions.map((item, i) => {
-    return {
-      ...item,
-      open: item.open ? false : i === index,
-    };
-  });
-};
-
-onShow((options) => {
-  if (options) {
-    state.servicerPhone = options.service;
-  }
-  body(`faq/list`).then((res: any) => {
-    state.questions = res.list;
-  })
-});
-
-onHide(() => {
-  Object.assign(state, initState());
-})
-</script>
-
-<style lang="scss">
-.page {
-  min-height: 100vh;
-  background: #f6f7fa;
-  box-sizing: border-box;
-  padding: 40rpx 32rpx;
-}
-
-.contact {
-  height: 216rpx;
-  border-radius: 24rpx;
-  background: #fff;
-}
-
-.sheet {
-  box-sizing: border-box;
-  border-radius: 24rpx;
-  background: #fff;
-  overflow: hidden;
-
-  &_bar {
-    .head {
-      padding: 0rpx 24rpx;
-      box-sizing: border-box;
-
-      & > view {
-        border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-      }
-    }
-
-    .body {
-      box-sizing: border-box;
-      background-color: rgba(52, 125, 255, 0.06);
-      transition: all 0.3s;
-      padding: 0rpx 24rpx;
-    }
-
-    .body-hidden {
-      height: 0px;
-      overflow: hidden;
-    }
-
-    .body-open {
-      height: auto;
-      padding-top: 24rpx;
-      padding-bottom: 24rpx;
-    }
-
-    &:last-child {
-      .head {
-        & > view {
-          border-bottom: none;
-        }
-      }
-    }
-  }
-}
-</style>

+ 0 - 294
src/pages-user/account/index.vue

@@ -1,294 +0,0 @@
-<template>
-  <view class="pt-60 pb-20 flex-center">
-    <button
-        class="avatar"
-        open-type="chooseAvatar"
-        @chooseavatar="chooseAvatar"
-    >
-      <image class="avatar_image" :src="avatar" @error="errorHandle"></image>
-      <view class="avatar_text flex-center">编辑</view>
-    </button>
-  </view>
-
-  <view class="pl-50 pr-50">
-    <view
-        class="menu flex-align-center flex-between"
-        v-for="(item, index) in state.menuList"
-        :key="index"
-        @click="edit(index)"
-    >
-      <view class="fs-30">{{ item.title }}</view>
-      <view class="flex">
-        <view
-            :class="['fs-30', 'fw-500', `mr-${item.disabled ? '0' : '20'}`]"
-            style="color: rgba(0, 0, 0, 0.8)"
-        >{{ item.value }}
-        </view
-        >
-        <uni-icons
-            type="right"
-            size="12"
-            color="rgba(0,0,0,0.4)"
-            v-if="!item.disabled"
-        ></uni-icons>
-      </view>
-    </view>
-  </view>
-
-  <style-bottom-view>
-    <view class="pl-60 pr-60 pb-40">
-      <style-button type="primary" @click="logoutUser">退出登录</style-button>
-    </view>
-  </style-bottom-view>
-</template>
-
-<script setup lang="ts">
-import {onHide, onShow} from "@dcloudio/uni-app";
-import {reactive, ref} from "vue";
-import {body, get, upload} from "@/utils/https"
-
-const avatar = ref<string>();
-const menu = ref<any[]>([]);
-const MENU_TEMPLATE = [
-  {
-    title: "昵称",
-    key: "nickname",
-    value: "",
-  },
-  {
-    title: "电话",
-    key: "",
-    disabled: true,
-  },
-  {
-    title: "车牌号",
-    key: "defaultPlateNo",
-    value: "",
-  },
-  {
-    title: "VIN码",
-    key: "vin",
-    value: "",
-  },
-  // {
-  //   title: "充电卡",
-  //   key: "",
-  //   value: "",
-  // },
-];
-
-
-const initState = () => ({
-  user: {},
-  menuList: []
-})
-
-const state = reactive(initState())
-
-const refresh = () => {
-  const _menu = [...MENU_TEMPLATE];
-  get(`user/profile`).then(res => {
-    getApp<any>().globalData.user = res;
-  })
-  // fetchProfile().then(() => {
-  //   const user = getApp<any>().globalData.user;
-  //   if (user) {
-  //     _menu[0].value = user.nickname;
-  //     _menu[1].value = user.mobilePhone;
-  //     _menu[2].value = user.defaultPlateNo;
-  //     _menu[3].value = user.vin;
-  //     // _menu[4].value = user.card_no;
-  //     avatar.value =
-  //         user.avatar ||
-  //         "https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0";
-  //     menu.value = _menu;
-  //   }
-  // });
-};
-
-const save = (form: Record<string, any>) => {
-  uni.showLoading({
-    title: "保存中",
-  });
-  return body(`user/updateProfile`, form)
-      .then((res) => {
-        uni.hideLoading();
-        uni.showToast({
-          icon: "success",
-          title: "保存成功",
-        });
-        refresh();
-        return res;
-      })
-      .catch((err) => {
-        uni.hideLoading();
-        uni.showModal({
-          content: `${err.errMsg},请重试`,
-        });
-      });
-};
-
-const chooseAvatar = (e: any) => {
-  if (e.detail.avatarUrl) {
-    uni.showLoading({
-      title: "上传中",
-    });
-    let params = {
-      url: `file/upload`,
-      filePath: e.detail.avatarUrl,
-      success: (res) => {
-        body(`user/updateAvatar`, {
-          avatar: res.url,
-        })
-            .then(() => {
-              uni.hideLoading();
-              uni.showToast({
-                title: "已更新",
-                icon: "success",
-              });
-              avatar.value = res.url;
-            })
-            .catch((err) => {
-              uni.hideLoading();
-              uni.showModal({
-                content: `${err.errMsg},请重试`,
-              });
-            });
-      }
-    }
-    upload(params)
-  } else {
-    uni.showModal({
-      content: `${e.detail.errMsg},请重试`,
-    });
-  }
-};
-const edit = (index: number) => {
-  const menuItem = menu.value[index];
-  if (menuItem.disabled) {
-    return;
-  }
-  if (!menuItem.key) {
-    uni.showToast({
-      icon: "none",
-      title: "暂不支持修改",
-    });
-    return;
-  }
-  if (/车牌/.test(menuItem.title)) {
-    uni.chooseLicensePlate({
-      success: (res) => {
-        save({
-          defaultPlateNo: res.plateNumber,
-        });
-      },
-      fail: (err) => {
-        console.log(err);
-      },
-    });
-    return;
-  }
-  uni.navigateTo({
-    url: `/pages-user/profile-edit/profile-edit?key=${menuItem.key}&title=${
-        menuItem.title
-    }${menuItem.value ? `&value=${encodeURIComponent(menuItem.value)}` : ""}`,
-  });
-};
-
-const logoutUser = () => {
-  uni.showModal({
-    title: "温馨提示",
-    content: "确定退出登录吗?",
-    confirmColor: "#2d9e95",
-    confirmText: "确定退出",
-    cancelText: "手滑了",
-    success: (res) => {
-      if (res.confirm) {
-        uni.showLoading({
-          title: "退出中",
-        });
-        logout()
-            .then(() => {
-              uni.hideLoading();
-              uni.showToast({
-                icon: "success",
-                title: "已退出",
-              });
-              clearToken();
-              setTimeout(() => {
-                uni.reLaunch({
-                  url: "/pages/map/map",
-                });
-              }, 1500);
-            })
-            .catch((err) => {
-              uni.hideLoading();
-              uni.showModal({
-                content: `${err.errMsg},请重试`,
-              });
-            });
-      }
-    },
-  });
-};
-
-const errorHandle = (e: any) => {
-  console.log(e);
-};
-
-onShow(() => {
-  if (getApp<any>().globalData.lastData.profile) {
-    const {key, value} = getApp<any>().globalData.lastData.profile;
-    save({
-      [key]: value,
-    }).then(() => {
-      getApp<any>().globalData.lastData.profile = undefined;
-    });
-  }
-});
-
-onHide(() => {
-  Object.assign(state, initState());
-})
-</script>
-
-<style lang="scss">
-.avatar {
-  position: relative;
-  height: 116rpx !important;
-  width: 116rpx !important;
-  border-radius: 50%;
-  border: 2rpx solid rgba(0, 0, 0, 0.15);
-  overflow: hidden;
-
-  &_image {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    left: 0;
-    top: 0;
-    border-radius: 50%;
-  }
-
-  &_text {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    width: 100%;
-    height: 40rpx;
-    background: rgba(0, 0, 0, 0.5);
-    color: #fff;
-    font-size: 24rpx;
-  }
-}
-
-.menu {
-  background-color: #fff;
-  height: 120rpx;
-  border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-
-  &:last-child {
-    border-bottom: none;
-  }
-}
-</style>

+ 0 - 294
src/pages-user/message/index.vue

@@ -1,294 +0,0 @@
-<template>
-  <view class="pt-60 pb-20 flex-center">
-    <button
-        class="avatar"
-        open-type="chooseAvatar"
-        @chooseavatar="chooseAvatar"
-    >
-      <image class="avatar_image" :src="avatar" @error="errorHandle"></image>
-      <view class="avatar_text flex-center">编辑</view>
-    </button>
-  </view>
-
-  <view class="pl-50 pr-50">
-    <view
-        class="menu flex-align-center flex-between"
-        v-for="(item, index) in state.menuList"
-        :key="index"
-        @click="edit(index)"
-    >
-      <view class="fs-30">{{ item.title }}</view>
-      <view class="flex">
-        <view
-            :class="['fs-30', 'fw-500', `mr-${item.disabled ? '0' : '20'}`]"
-            style="color: rgba(0, 0, 0, 0.8)"
-        >{{ item.value }}
-        </view
-        >
-        <uni-icons
-            type="right"
-            size="12"
-            color="rgba(0,0,0,0.4)"
-            v-if="!item.disabled"
-        ></uni-icons>
-      </view>
-    </view>
-  </view>
-
-  <style-bottom-view>
-    <view class="pl-60 pr-60 pb-40">
-      <style-button type="primary" @click="logoutUser">退出登录</style-button>
-    </view>
-  </style-bottom-view>
-</template>
-
-<script setup lang="ts">
-import {onHide, onShow} from "@dcloudio/uni-app";
-import {reactive, ref} from "vue";
-import {body, get, upload} from "@/utils/https"
-
-const avatar = ref<string>();
-const menu = ref<any[]>([]);
-const MENU_TEMPLATE = [
-  {
-    title: "昵称",
-    key: "nickname",
-    value: "",
-  },
-  {
-    title: "电话",
-    key: "",
-    disabled: true,
-  },
-  {
-    title: "车牌号",
-    key: "defaultPlateNo",
-    value: "",
-  },
-  {
-    title: "VIN码",
-    key: "vin",
-    value: "",
-  },
-  // {
-  //   title: "充电卡",
-  //   key: "",
-  //   value: "",
-  // },
-];
-
-
-const initState = () => ({
-  user: {},
-  menuList: []
-})
-
-const state = reactive(initState())
-
-const refresh = () => {
-  const _menu = [...MENU_TEMPLATE];
-  get(`user/profile`).then(res => {
-    getApp<any>().globalData.user = res;
-  })
-  // fetchProfile().then(() => {
-  //   const user = getApp<any>().globalData.user;
-  //   if (user) {
-  //     _menu[0].value = user.nickname;
-  //     _menu[1].value = user.mobilePhone;
-  //     _menu[2].value = user.defaultPlateNo;
-  //     _menu[3].value = user.vin;
-  //     // _menu[4].value = user.card_no;
-  //     avatar.value =
-  //         user.avatar ||
-  //         "https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0";
-  //     menu.value = _menu;
-  //   }
-  // });
-};
-
-const save = (form: Record<string, any>) => {
-  uni.showLoading({
-    title: "保存中",
-  });
-  return body(`user/updateProfile`, form)
-      .then((res) => {
-        uni.hideLoading();
-        uni.showToast({
-          icon: "success",
-          title: "保存成功",
-        });
-        refresh();
-        return res;
-      })
-      .catch((err) => {
-        uni.hideLoading();
-        uni.showModal({
-          content: `${err.errMsg},请重试`,
-        });
-      });
-};
-
-const chooseAvatar = (e: any) => {
-  if (e.detail.avatarUrl) {
-    uni.showLoading({
-      title: "上传中",
-    });
-    let params = {
-      url: `file/upload`,
-      filePath: e.detail.avatarUrl,
-      success: (res) => {
-        body(`user/updateAvatar`, {
-          avatar: res.url,
-        })
-            .then(() => {
-              uni.hideLoading();
-              uni.showToast({
-                title: "已更新",
-                icon: "success",
-              });
-              avatar.value = res.url;
-            })
-            .catch((err) => {
-              uni.hideLoading();
-              uni.showModal({
-                content: `${err.errMsg},请重试`,
-              });
-            });
-      }
-    }
-    upload(params)
-  } else {
-    uni.showModal({
-      content: `${e.detail.errMsg},请重试`,
-    });
-  }
-};
-const edit = (index: number) => {
-  const menuItem = menu.value[index];
-  if (menuItem.disabled) {
-    return;
-  }
-  if (!menuItem.key) {
-    uni.showToast({
-      icon: "none",
-      title: "暂不支持修改",
-    });
-    return;
-  }
-  if (/车牌/.test(menuItem.title)) {
-    uni.chooseLicensePlate({
-      success: (res) => {
-        save({
-          defaultPlateNo: res.plateNumber,
-        });
-      },
-      fail: (err) => {
-        console.log(err);
-      },
-    });
-    return;
-  }
-  uni.navigateTo({
-    url: `/pages-user/profile-edit/profile-edit?key=${menuItem.key}&title=${
-        menuItem.title
-    }${menuItem.value ? `&value=${encodeURIComponent(menuItem.value)}` : ""}`,
-  });
-};
-
-const logoutUser = () => {
-  uni.showModal({
-    title: "温馨提示",
-    content: "确定退出登录吗?",
-    confirmColor: "#2d9e95",
-    confirmText: "确定退出",
-    cancelText: "手滑了",
-    success: (res) => {
-      if (res.confirm) {
-        uni.showLoading({
-          title: "退出中",
-        });
-        logout()
-            .then(() => {
-              uni.hideLoading();
-              uni.showToast({
-                icon: "success",
-                title: "已退出",
-              });
-              clearToken();
-              setTimeout(() => {
-                uni.reLaunch({
-                  url: "/pages/map/map",
-                });
-              }, 1500);
-            })
-            .catch((err) => {
-              uni.hideLoading();
-              uni.showModal({
-                content: `${err.errMsg},请重试`,
-              });
-            });
-      }
-    },
-  });
-};
-
-const errorHandle = (e: any) => {
-  console.log(e);
-};
-
-onShow(() => {
-  if (getApp<any>().globalData.lastData.profile) {
-    const {key, value} = getApp<any>().globalData.lastData.profile;
-    save({
-      [key]: value,
-    }).then(() => {
-      getApp<any>().globalData.lastData.profile = undefined;
-    });
-  }
-});
-
-onHide(() => {
-  Object.assign(state, initState());
-})
-</script>
-
-<style lang="scss">
-.avatar {
-  position: relative;
-  height: 116rpx !important;
-  width: 116rpx !important;
-  border-radius: 50%;
-  border: 2rpx solid rgba(0, 0, 0, 0.15);
-  overflow: hidden;
-
-  &_image {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    left: 0;
-    top: 0;
-    border-radius: 50%;
-  }
-
-  &_text {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    width: 100%;
-    height: 40rpx;
-    background: rgba(0, 0, 0, 0.5);
-    color: #fff;
-    font-size: 24rpx;
-  }
-}
-
-.menu {
-  background-color: #fff;
-  height: 120rpx;
-  border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-
-  &:last-child {
-    border-bottom: none;
-  }
-}
-</style>

+ 0 - 294
src/pages-wash/price/index.vue

@@ -1,294 +0,0 @@
-<template>
-  <view class="pt-60 pb-20 flex-center">
-    <button
-        class="avatar"
-        open-type="chooseAvatar"
-        @chooseavatar="chooseAvatar"
-    >
-      <image class="avatar_image" :src="avatar" @error="errorHandle"></image>
-      <view class="avatar_text flex-center">编辑</view>
-    </button>
-  </view>
-
-  <view class="pl-50 pr-50">
-    <view
-        class="menu flex-align-center flex-between"
-        v-for="(item, index) in state.menuList"
-        :key="index"
-        @click="edit(index)"
-    >
-      <view class="fs-30">{{ item.title }}</view>
-      <view class="flex">
-        <view
-            :class="['fs-30', 'fw-500', `mr-${item.disabled ? '0' : '20'}`]"
-            style="color: rgba(0, 0, 0, 0.8)"
-        >{{ item.value }}
-        </view
-        >
-        <uni-icons
-            type="right"
-            size="12"
-            color="rgba(0,0,0,0.4)"
-            v-if="!item.disabled"
-        ></uni-icons>
-      </view>
-    </view>
-  </view>
-
-  <style-bottom-view>
-    <view class="pl-60 pr-60 pb-40">
-      <style-button type="primary" @click="logoutUser">退出登录</style-button>
-    </view>
-  </style-bottom-view>
-</template>
-
-<script setup lang="ts">
-import {onHide, onShow} from "@dcloudio/uni-app";
-import {reactive, ref} from "vue";
-import {body, get, upload} from "@/utils/https"
-
-const avatar = ref<string>();
-const menu = ref<any[]>([]);
-const MENU_TEMPLATE = [
-  {
-    title: "昵称",
-    key: "nickname",
-    value: "",
-  },
-  {
-    title: "电话",
-    key: "",
-    disabled: true,
-  },
-  {
-    title: "车牌号",
-    key: "defaultPlateNo",
-    value: "",
-  },
-  {
-    title: "VIN码",
-    key: "vin",
-    value: "",
-  },
-  // {
-  //   title: "充电卡",
-  //   key: "",
-  //   value: "",
-  // },
-];
-
-
-const initState = () => ({
-  user: {},
-  menuList: []
-})
-
-const state = reactive(initState())
-
-const refresh = () => {
-  const _menu = [...MENU_TEMPLATE];
-  get(`user/profile`).then(res => {
-    getApp<any>().globalData.user = res;
-  })
-  // fetchProfile().then(() => {
-  //   const user = getApp<any>().globalData.user;
-  //   if (user) {
-  //     _menu[0].value = user.nickname;
-  //     _menu[1].value = user.mobilePhone;
-  //     _menu[2].value = user.defaultPlateNo;
-  //     _menu[3].value = user.vin;
-  //     // _menu[4].value = user.card_no;
-  //     avatar.value =
-  //         user.avatar ||
-  //         "https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0";
-  //     menu.value = _menu;
-  //   }
-  // });
-};
-
-const save = (form: Record<string, any>) => {
-  uni.showLoading({
-    title: "保存中",
-  });
-  return body(`user/updateProfile`, form)
-      .then((res) => {
-        uni.hideLoading();
-        uni.showToast({
-          icon: "success",
-          title: "保存成功",
-        });
-        refresh();
-        return res;
-      })
-      .catch((err) => {
-        uni.hideLoading();
-        uni.showModal({
-          content: `${err.errMsg},请重试`,
-        });
-      });
-};
-
-const chooseAvatar = (e: any) => {
-  if (e.detail.avatarUrl) {
-    uni.showLoading({
-      title: "上传中",
-    });
-    let params = {
-      url: `file/upload`,
-      filePath: e.detail.avatarUrl,
-      success: (res) => {
-        body(`user/updateAvatar`, {
-          avatar: res.url,
-        })
-            .then(() => {
-              uni.hideLoading();
-              uni.showToast({
-                title: "已更新",
-                icon: "success",
-              });
-              avatar.value = res.url;
-            })
-            .catch((err) => {
-              uni.hideLoading();
-              uni.showModal({
-                content: `${err.errMsg},请重试`,
-              });
-            });
-      }
-    }
-    upload(params)
-  } else {
-    uni.showModal({
-      content: `${e.detail.errMsg},请重试`,
-    });
-  }
-};
-const edit = (index: number) => {
-  const menuItem = menu.value[index];
-  if (menuItem.disabled) {
-    return;
-  }
-  if (!menuItem.key) {
-    uni.showToast({
-      icon: "none",
-      title: "暂不支持修改",
-    });
-    return;
-  }
-  if (/车牌/.test(menuItem.title)) {
-    uni.chooseLicensePlate({
-      success: (res) => {
-        save({
-          defaultPlateNo: res.plateNumber,
-        });
-      },
-      fail: (err) => {
-        console.log(err);
-      },
-    });
-    return;
-  }
-  uni.navigateTo({
-    url: `/pages-user/profile-edit/profile-edit?key=${menuItem.key}&title=${
-        menuItem.title
-    }${menuItem.value ? `&value=${encodeURIComponent(menuItem.value)}` : ""}`,
-  });
-};
-
-const logoutUser = () => {
-  uni.showModal({
-    title: "温馨提示",
-    content: "确定退出登录吗?",
-    confirmColor: "#2d9e95",
-    confirmText: "确定退出",
-    cancelText: "手滑了",
-    success: (res) => {
-      if (res.confirm) {
-        uni.showLoading({
-          title: "退出中",
-        });
-        logout()
-            .then(() => {
-              uni.hideLoading();
-              uni.showToast({
-                icon: "success",
-                title: "已退出",
-              });
-              clearToken();
-              setTimeout(() => {
-                uni.reLaunch({
-                  url: "/pages/map/map",
-                });
-              }, 1500);
-            })
-            .catch((err) => {
-              uni.hideLoading();
-              uni.showModal({
-                content: `${err.errMsg},请重试`,
-              });
-            });
-      }
-    },
-  });
-};
-
-const errorHandle = (e: any) => {
-  console.log(e);
-};
-
-onShow(() => {
-  if (getApp<any>().globalData.lastData.profile) {
-    const {key, value} = getApp<any>().globalData.lastData.profile;
-    save({
-      [key]: value,
-    }).then(() => {
-      getApp<any>().globalData.lastData.profile = undefined;
-    });
-  }
-});
-
-onHide(() => {
-  Object.assign(state, initState());
-})
-</script>
-
-<style lang="scss">
-.avatar {
-  position: relative;
-  height: 116rpx !important;
-  width: 116rpx !important;
-  border-radius: 50%;
-  border: 2rpx solid rgba(0, 0, 0, 0.15);
-  overflow: hidden;
-
-  &_image {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    left: 0;
-    top: 0;
-    border-radius: 50%;
-  }
-
-  &_text {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    width: 100%;
-    height: 40rpx;
-    background: rgba(0, 0, 0, 0.5);
-    color: #fff;
-    font-size: 24rpx;
-  }
-}
-
-.menu {
-  background-color: #fff;
-  height: 120rpx;
-  border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-
-  &:last-child {
-    border-bottom: none;
-  }
-}
-</style>

+ 0 - 294
src/pages-wash/process/index.vue

@@ -1,294 +0,0 @@
-<template>
-  <view class="pt-60 pb-20 flex-center">
-    <button
-        class="avatar"
-        open-type="chooseAvatar"
-        @chooseavatar="chooseAvatar"
-    >
-      <image class="avatar_image" :src="avatar" @error="errorHandle"></image>
-      <view class="avatar_text flex-center">编辑</view>
-    </button>
-  </view>
-
-  <view class="pl-50 pr-50">
-    <view
-        class="menu flex-align-center flex-between"
-        v-for="(item, index) in state.menuList"
-        :key="index"
-        @click="edit(index)"
-    >
-      <view class="fs-30">{{ item.title }}</view>
-      <view class="flex">
-        <view
-            :class="['fs-30', 'fw-500', `mr-${item.disabled ? '0' : '20'}`]"
-            style="color: rgba(0, 0, 0, 0.8)"
-        >{{ item.value }}
-        </view
-        >
-        <uni-icons
-            type="right"
-            size="12"
-            color="rgba(0,0,0,0.4)"
-            v-if="!item.disabled"
-        ></uni-icons>
-      </view>
-    </view>
-  </view>
-
-  <style-bottom-view>
-    <view class="pl-60 pr-60 pb-40">
-      <style-button type="primary" @click="logoutUser">退出登录</style-button>
-    </view>
-  </style-bottom-view>
-</template>
-
-<script setup lang="ts">
-import {onHide, onShow} from "@dcloudio/uni-app";
-import {reactive, ref} from "vue";
-import {body, get, upload} from "@/utils/https"
-
-const avatar = ref<string>();
-const menu = ref<any[]>([]);
-const MENU_TEMPLATE = [
-  {
-    title: "昵称",
-    key: "nickname",
-    value: "",
-  },
-  {
-    title: "电话",
-    key: "",
-    disabled: true,
-  },
-  {
-    title: "车牌号",
-    key: "defaultPlateNo",
-    value: "",
-  },
-  {
-    title: "VIN码",
-    key: "vin",
-    value: "",
-  },
-  // {
-  //   title: "充电卡",
-  //   key: "",
-  //   value: "",
-  // },
-];
-
-
-const initState = () => ({
-  user: {},
-  menuList: []
-})
-
-const state = reactive(initState())
-
-const refresh = () => {
-  const _menu = [...MENU_TEMPLATE];
-  get(`user/profile`).then(res => {
-    getApp<any>().globalData.user = res;
-  })
-  // fetchProfile().then(() => {
-  //   const user = getApp<any>().globalData.user;
-  //   if (user) {
-  //     _menu[0].value = user.nickname;
-  //     _menu[1].value = user.mobilePhone;
-  //     _menu[2].value = user.defaultPlateNo;
-  //     _menu[3].value = user.vin;
-  //     // _menu[4].value = user.card_no;
-  //     avatar.value =
-  //         user.avatar ||
-  //         "https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0";
-  //     menu.value = _menu;
-  //   }
-  // });
-};
-
-const save = (form: Record<string, any>) => {
-  uni.showLoading({
-    title: "保存中",
-  });
-  return body(`user/updateProfile`, form)
-      .then((res) => {
-        uni.hideLoading();
-        uni.showToast({
-          icon: "success",
-          title: "保存成功",
-        });
-        refresh();
-        return res;
-      })
-      .catch((err) => {
-        uni.hideLoading();
-        uni.showModal({
-          content: `${err.errMsg},请重试`,
-        });
-      });
-};
-
-const chooseAvatar = (e: any) => {
-  if (e.detail.avatarUrl) {
-    uni.showLoading({
-      title: "上传中",
-    });
-    let params = {
-      url: `file/upload`,
-      filePath: e.detail.avatarUrl,
-      success: (res) => {
-        body(`user/updateAvatar`, {
-          avatar: res.url,
-        })
-            .then(() => {
-              uni.hideLoading();
-              uni.showToast({
-                title: "已更新",
-                icon: "success",
-              });
-              avatar.value = res.url;
-            })
-            .catch((err) => {
-              uni.hideLoading();
-              uni.showModal({
-                content: `${err.errMsg},请重试`,
-              });
-            });
-      }
-    }
-    upload(params)
-  } else {
-    uni.showModal({
-      content: `${e.detail.errMsg},请重试`,
-    });
-  }
-};
-const edit = (index: number) => {
-  const menuItem = menu.value[index];
-  if (menuItem.disabled) {
-    return;
-  }
-  if (!menuItem.key) {
-    uni.showToast({
-      icon: "none",
-      title: "暂不支持修改",
-    });
-    return;
-  }
-  if (/车牌/.test(menuItem.title)) {
-    uni.chooseLicensePlate({
-      success: (res) => {
-        save({
-          defaultPlateNo: res.plateNumber,
-        });
-      },
-      fail: (err) => {
-        console.log(err);
-      },
-    });
-    return;
-  }
-  uni.navigateTo({
-    url: `/pages-user/profile-edit/profile-edit?key=${menuItem.key}&title=${
-        menuItem.title
-    }${menuItem.value ? `&value=${encodeURIComponent(menuItem.value)}` : ""}`,
-  });
-};
-
-const logoutUser = () => {
-  uni.showModal({
-    title: "温馨提示",
-    content: "确定退出登录吗?",
-    confirmColor: "#2d9e95",
-    confirmText: "确定退出",
-    cancelText: "手滑了",
-    success: (res) => {
-      if (res.confirm) {
-        uni.showLoading({
-          title: "退出中",
-        });
-        logout()
-            .then(() => {
-              uni.hideLoading();
-              uni.showToast({
-                icon: "success",
-                title: "已退出",
-              });
-              clearToken();
-              setTimeout(() => {
-                uni.reLaunch({
-                  url: "/pages/map/map",
-                });
-              }, 1500);
-            })
-            .catch((err) => {
-              uni.hideLoading();
-              uni.showModal({
-                content: `${err.errMsg},请重试`,
-              });
-            });
-      }
-    },
-  });
-};
-
-const errorHandle = (e: any) => {
-  console.log(e);
-};
-
-onShow(() => {
-  if (getApp<any>().globalData.lastData.profile) {
-    const {key, value} = getApp<any>().globalData.lastData.profile;
-    save({
-      [key]: value,
-    }).then(() => {
-      getApp<any>().globalData.lastData.profile = undefined;
-    });
-  }
-});
-
-onHide(() => {
-  Object.assign(state, initState());
-})
-</script>
-
-<style lang="scss">
-.avatar {
-  position: relative;
-  height: 116rpx !important;
-  width: 116rpx !important;
-  border-radius: 50%;
-  border: 2rpx solid rgba(0, 0, 0, 0.15);
-  overflow: hidden;
-
-  &_image {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    left: 0;
-    top: 0;
-    border-radius: 50%;
-  }
-
-  &_text {
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    width: 100%;
-    height: 40rpx;
-    background: rgba(0, 0, 0, 0.5);
-    color: #fff;
-    font-size: 24rpx;
-  }
-}
-
-.menu {
-  background-color: #fff;
-  height: 120rpx;
-  border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
-
-  &:last-child {
-    border-bottom: none;
-  }
-}
-</style>

+ 0 - 15
src/pages.json

@@ -15,13 +15,6 @@
         "disableScroll": true
       }
     },
-    {
-      "path": "pages/coupon/index",
-      "style": {
-        "disableScroll": true,
-        "navigationBarTitleText": "卡券中心"
-      }
-    },
     {
       "path": "pages/map/index",
       "style": {
@@ -169,14 +162,6 @@
             "navigationBarBackgroundColor": "#ffffff"
           }
         },
-        {
-          "path": "process/index",
-          "style": {
-            "navigationStyle": "default",
-            "navigationBarTitleText": "进度",
-            "navigationBarBackgroundColor": "#ffffff"
-          }
-        }
       ]
     }
   ],

+ 0 - 93
src/pages/coupon/fetch.vue

@@ -1,93 +0,0 @@
-<template>
-  <view>
-    <uv-popup ref="popup_ref" mode="bottom" custom-style="min-height: 800rpx;padding:15rpx;" closeable round="10">
-      <view class="w100 flex-center">优惠领取</view>
-      <view class="coupon-list">
-        <view class="coupon-card" v-for="item in state.couponList" :key="item.id">
-
-          <view class="coupon-card-left">
-            <view class="card-content">
-              <view class="amount-content">
-                <view class="amount">
-                  <view class="price">{{ item.discountPrice }}</view>
-                  {{ item.unit }}
-                </view>
-                <view class="amount-text">
-                  {{ item.couponAmountText }}
-                </view>
-              </view>
-              <view class="coupon-info">
-                <view class="info-name">
-                  {{ item.couponName }}
-                </view>
-                <view class="info-time">
-                  {{ item.couponTime }}
-                </view>
-              </view>
-            </view>
-
-            <view class="coupon-desc">
-              {{ item.couponDesc }}
-            </view>
-          </view>
-          <view class="coupon-card-right">
-            <view class="ml10">
-              <uv-button plain type="error" size="mini" class="ml10" style="margin-left: 10px;" @click="handleFetchCoupon(item)">领取</uv-button>
-            </view>
-          </view>
-
-        </view>
-        <uv-empty v-if="state.couponList.length==0" mode="coupon" text="无可领取的优惠券"></uv-empty>
-      </view>
-    </uv-popup>
-
-  </view>
-</template>
-<script setup lang="ts">
-import {reactive, ref} from "vue";
-import {onHide} from "@dcloudio/uni-app";
-import {body, get} from "@/utils/https";
-
-const popup_ref = ref()
-
-const initState = () => ({
-  couponList: [] as any[],
-})
-
-const state = reactive(initState())
-
-onHide(() => {
-  Object.assign(state, initState());
-})
-
-/**
- * 获取优惠券列表
- */
-const loadFetchCouponList = () => {
-  body(`coupon/available`).then((res: any) => {
-    state.couponList = res.list;
-  })
-}
-
-const handleFetchCoupon = async (coupon: any) => {
-  let res = await get(`coupon/fetch`, coupon)
-}
-
-const close = () => {
-  Object.assign(state, initState());
-  popup_ref.value.close()
-}
-
-const open = () => {
-  popup_ref.value.open();
-  loadFetchCouponList();
-}
-
-defineExpose({
-  open
-})
-</script>
-
-<style scoped lang="scss">
-
-</style>

+ 0 - 321
src/pages/coupon/index.vue

@@ -1,321 +0,0 @@
-<template>
-  <view class="popup-coupon-content" :class="useInPage ? 'page' : ''">
-    <view class="input">
-      <input class="popup-content-input" v-model="state.code" placeholder="请输入优惠码"/>
-      <view class="text" @click="handleConvert" :class="state.code ? 'hasValue' : ''">
-        兑换
-      </view>
-    </view>
-    <view class="tab">
-      <view class="tab-item" @click="handleClickSelectType('available')"
-            :class="state.selecType == 'available' ? 'active' : ''">
-        <view class="tab-text">
-          可用({{ state.useNum.available }})
-        </view>
-      </view>
-      <view class="tab-item" @click="handleClickSelectType('notavailable')"
-            :class="state.selecType == 'notavailable' ? 'active' : ''">
-        <view class="tab-text">
-          不可用({{ state.useNum.notavailable }})
-        </view>
-      </view>
-    </view>
-    <view class="coupon-list">
-      <view class="coupon-card" @click="handClickCoupon(item)" v-for="item in state.couponList" :key="item.id"
-          >
-        <view class="card-content">
-          <view class="amount-content" :class="state.selecType == 'available' ? 'available' : '' ">
-            <view class="amount">
-              <view class="price">{{ item.discountPrice }}</view>
-              {{ item.unit }}
-            </view>
-            <view class="amount-text">
-              {{ item.couponAmountText }}
-            </view>
-          </view>
-          <view class="coupon-info">
-            <view class="info-name">
-              {{ item.couponName }}
-            </view>
-            <view class="info-time">
-              {{ item.couponTime }}
-            </view>
-          </view>
-        </view>
-
-        <view class="coupon-desc">
-          {{ item.couponDesc }}
-        </view>
-      </view>
-      <!--      -->
-      <!--      <PinappEmpty v-if="showEmpty"></PinappEmpty>-->
-      <uv-empty  v-if="state.couponList.length==0" mode="coupon" text="没有可用优惠券"></uv-empty>
-    </view>
-<!--    <view v-if="showClose" class="button-cancel" @click="handleClose">
-      不使用
-    </view>-->
-<!--    <tab-bar :index="1"/>-->
-  </view>
-</template>
-
-
-<script setup lang="ts">
-import {reactive, ref} from 'vue'
-import {onHide, onShow} from "@dcloudio/uni-app";
-import TabBar from "@/components/tab-bar/index.vue";
-import LoginBar from "@/components/login-bar/index.vue";
-
-
-const props = defineProps({
-  // 是否展示【不使用】按钮,浮层时候使用
-  showClose: {
-    type: Boolean,
-    default: true
-  },
-  // 页面中使用传true,浮层使用传false
-  useInPage: {
-    type: Boolean,
-    default: false
-  },
-  // 优惠券列表
-  defaultSelectType: {
-    type: String,
-    default: ''
-  },
-})
-
-
-const emits = defineEmits(['handleConvert', 'handleClose', 'handClickCoupon', 'handleSelectType'])
-
-const initState = () => ({
-  selecType: 'available', //available notavailable
-  showEmpty: false,
-  code: '',
-  useNum: {
-    available: 0,
-    notavailable: 0,
-  },
-  couponList: [] as any[]
-})
-
-const state = reactive(initState())
-
-onShow(() => {
-  let gd = getApp<any>().globalData;
-  if (!gd.token) {
-    console.error(gd)
-    return;
-  }
-  refreshCouponList();
-});
-
-onHide(() => {
-  Object.assign(state, initState());
-})
-
-const refreshCouponList = () => {
-  let available = 0,
-      notavailable = 0;
-  state.couponList.forEach(item => {
-    if (item.type == 'available') available++
-    else if (item.type == 'notavailable') notavailable++
-  })
-  state.useNum = {
-    available,
-    notavailable
-  }
-}
-
-/**
- * 点击兑换
- */
-const handleConvert = () => {
-  if (state.code) {
-    emits('handleConvert', state.code)
-  }
-}
-
-
-/**
- * 切换优惠券类别
- */
-const handleClickSelectType = (type: string) => {
-  if (state.selecType !== type) {
-    state.selecType = type;
-    emits('handleSelectType', type);
-  }
-}
-
-
-const handClickCoupon = (item: any) => {
-  emits('handClickCoupon', item)
-}
-
-const handleClose = () => {
-  emits('handleClose')
-}
-
-const handleGotoGuide = () => {
-  uni.navigateTo({
-    url: '/pages/guide/index'
-  })
-}
-
-</script>
-
-
-<style lang="scss" scoped>
-.popup-coupon-content {
-  font-size: 24rpx;
-
-  &.page {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    display: flex;
-    flex-direction: column;
-  }
-
-  .input {
-    margin-top: 20rpx;
-    padding: 0 20rpx;
-    display: flex;
-    align-items: center;
-
-    .popup-content-input {
-      border-radius: 70rpx;
-      background: #f7f8fa;
-      padding: 0 20rpx;
-      flex: 1;
-      height: 70rpx;
-      margin-right: 20rpx;
-    }
-
-    .text {
-      color: #1989fa;
-      font-size: 28rpx;
-      opacity: 0.8;
-
-      &.hasValue {
-        opacity: 1;
-      }
-    }
-  }
-
-  .tab {
-    display: flex;
-    align-items: center;
-    background: #fff;
-    box-shadow: 0 12rpx 24rpx -24rpx #969799;
-
-    .tab-item {
-      flex: 1;
-      text-align: center;
-      font-size: 28rpx;
-      font-weight: 500;
-      color: #646566;
-
-      .tab-text {
-        display: inline-block;
-        padding: 20rpx 0;
-      }
-    }
-
-    .active {
-      color: #323233;
-
-      .tab-text {
-        border-bottom: 2px solid #1989fa;
-      }
-    }
-  }
-
-  .coupon-list {
-    margin-top: 4rpx;
-    //background: #f6F7F9;
-    min-height: 340rpx;
-    flex: 1;
-    padding: 20rpx 0;
-    overflow-y: scroll;
-
-    .coupon-card {
-      margin: 0rpx 20rpx 20rpx;
-      background: #fff;
-      border-radius: 20rpx;
-      padding: 10rpx 20rpx 0 20rpx;
-
-      .card-content {
-        display: flex;
-        margin: 30rpx 0;
-
-        .amount-content {
-          display: flex;
-          flex-direction: column;
-          align-items: center;
-          padding: 0 10rpx;
-          width: 260rpx;
-
-          &.available {
-            color: #1989fa;
-          }
-
-          .amount {
-            display: flex;
-            align-items: center;
-
-            .price {
-              font-weight: 500;
-              font-size: 54rpx;
-              margin-right: 4rpx;
-            }
-          }
-
-          .amount-text {
-            margin-top: 4rpx;
-          }
-        }
-
-        .coupon-info {
-          flex: 1;
-          color: #323233;
-          margin-left: 20rpx;
-
-          .info-name {
-            font-size: 30rpx;
-            font-weight: 500;
-          }
-
-          .info-time {
-            margin-top: 20rpx;
-          }
-        }
-      }
-
-      .coupon-desc {
-        border-top: 2rpx dashed #ebedf0;
-        padding: 20rpx;
-      }
-    }
-
-    .coupon-card:last-of-type {
-      margin-bottom: 0;
-    }
-
-  }
-
-  .button-cancel {
-    margin: 20rpx;
-    height: 80rpx;
-    background: #1989fa;
-    border-radius: 80rpx;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    color: #fff;
-    font-size: 32rpx;
-    font-weight: 500;
-  }
-}
-</style>

BIN
src/static/logo.png


BIN
src/static/map-point-current.png


BIN
src/static/map-point.png


BIN
src/static/tabbar/1-1.png


BIN
src/static/tabbar/1.png


BIN
src/static/tabbar/3-1.png


BIN
src/static/tabbar/3.png


BIN
src/static/tabbar/4-1.png


BIN
src/static/tabbar/4.png


BIN
src/static/user.png


+ 0 - 538
src/utils/mixin.js

@@ -1,538 +0,0 @@
-import {isIos, judgeIosPermission, requestAndroidPermission, gotoAppPermissionSetting} from "./permission"
-import {cfg, fileUrl, serverUrl} from "./https";
-
-
-const msg = (title, icon = 'none', duration = 1800, mask = false) => {
-    //统一提示方便全局修改
-    if (Boolean(title) === false) {
-        return;
-    }
-    uni.showToast({
-        title,
-        duration,
-        mask,
-        icon
-    });
-};
-
-const isEmptyOrNull = function (exp) {
-    return !exp || typeof (exp) == "undefined" || exp.length === 0 || exp == '' || JSON.stringify(exp) == "{}";
-};
-
-
-const fillUrl = function (url) {
-    if (!url) {
-        return "";
-    }
-    if (url.indexOf("http") === 0) {
-        return url;
-    } else {
-        return fileUrl + url;
-    }
-};
-
-const getData = function (key, callback) {
-    uni.getStorage({
-        key: key,
-        success: function (res) {
-            if (!!callback) {
-                callback(null, [res.data]);
-            }
-        }
-    });
-};
-
-const formatDateTime = date => {
-    if (!date) {
-        return "";
-    }
-    if (!date instanceof Number && !date instanceof Date) {
-        return date;
-    }
-    date = new Date(date);
-    const year = date.getFullYear();
-    const month = date.getMonth() + 1;
-    const day = date.getDate();
-    const hour = date.getHours();
-    const minute = date.getMinutes();
-    const second = date.getSeconds();
-
-    return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
-};
-
-const formatDate = date => {
-    if (!date) {
-        return "";
-    }
-    if (!date instanceof Number && !date instanceof Date) {
-        return date;
-    }
-    date = new Date(date);
-    const year = date.getFullYear();
-    const month = date.getMonth() + 1;
-    const day = date.getDate();
-    const hour = date.getHours();
-    const minute = date.getMinutes();
-    const second = date.getSeconds();
-
-    return [year, month, day].map(formatNumber).join('-');
-};
-
-const formatNumber = n => {
-    n = n.toString();
-    return n[1] ? n : '0' + n
-};
-
-const fmtMoney = v => {
-    let value = v || 0;
-    return (Number(value) / 100).toFixed(2);
-};
-
-/**
- * 根据key查找数据中对应角标
- */
-const getDataIndex = (key, data) => {
-    var value = '';
-    var i = 0;
-    while (i < data.length) {
-        if (key == data[i].key) {
-            value = i;
-            break;
-        } else {
-            i++;
-        }
-    }
-    return value;
-};
-
-const getDictValue = (type, code, dict) => {
-    if (!dict || !code) {
-        return "";
-    }
-    let dictList = dict[type];
-    if (!isEmptyOrNull(dictList)) {
-        for (let i = 0; i < dictList.length; i++) {
-            if (dictList[i].code == code) {
-                return dictList[i].value;
-            }
-        }
-    }
-    return "";
-};
-
-const contains = (array, element, key) => {
-    if (!isEmptyOrNull(array)) {
-        for (let i = 0; i < array.length; i++) {
-            if (!key) {
-                if (array[i] == element) {
-                    return true;
-                }
-            } else if (key) {
-                if (element.constructor != Object && array[i][key] == element) {
-                    return true;
-                } else if (element.constructor == Object && array[i][key] == element[key]) {
-                    return true;
-                }
-            }
-        }
-    }
-    return false;
-};
-
-const gm = {
-    data() {
-        return {
-            shareOptions: {}
-        }
-    },
-    onShareAppMessage() {
-        return {
-            title: this.shareOptions.title,
-            path: this.shareOptions.path,
-            imageUrl: this.shareOptions.imageUrl,
-            success: function (res) {
-                console.log("share success", res)
-            }
-        }
-    },
-    filters: {
-        fmtUrl(url) {
-            return fillUrl(url);
-        },
-        fmtDate(date) {
-            return formatDate(date);
-        },
-        fmtDateTime(date) {
-            return formatDateTime(date);
-        },
-        fmtMoney(money) {
-            return fmtMoney(money);
-        },
-        fmtDict(code, type) {
-            var dataList = uni.getStorage("dataList");
-            return getDictValue(type, code, dataList);
-        },
-        fmtHisDate(t) {
-            if (t === null || t === undefined) {
-                return '';
-            }
-            const date = new Date(t * 1000);
-            const year = date.getFullYear();
-            const month = date.getMonth() + 1;
-            const day = date.getDate();
-            const hour = date.getHours();
-            const minute = date.getMinutes();
-
-            const today = new Date();
-            const ty = today.getFullYear();
-            const tm = today.getMonth() + 1;
-            const td = today.getDate();
-            if (year === ty && month === tm && day === td) {
-                return [hour, minute].map(n => {
-                    n = n.toString();
-                    return n[1] ? n : '0' + n;
-                }).join(':');
-            }
-            return [month, day].map(n => {
-                n = n.toString();
-                return n[1] ? n : '0' + n;
-            }).join('-') + "  " + [hour, minute].map(n => {
-                n = n.toString();
-                return n[1] ? n : '0' + n;
-            }).join(':');
-        },
-    },
-    methods: {
-        toPage(url){
-            var tabPages =["pages/index/index","pages/category/category","pages/cart/cart","pages/account/center"]
-            if(tabPages.findIndex(item=>url.indexOf(item)>-1)>-1){
-                uni.switchTab({url:url});
-            }else{
-                uni.navigateTo({url:url});
-            }
-        },
-        copy(obj) {
-            var newobj = obj.constructor === Array ? [] : {};
-            if (typeof obj !== 'object') {
-                return;
-            }
-            for (var i in obj) {
-                newobj[i] = typeof obj[i] === 'object' ? this.copy(obj[i]) : obj[i];
-            }
-            return newobj
-        },
-        getPrePage(delta=1) {
-            let pages = getCurrentPages();
-            pages.forEach(item=>console.log("route--->",item.route))
-
-            let prePage = pages[pages.length - (delta+1)];
-            // #ifdef H5
-            return prePage;
-            // #endif
-            return prePage.$vm;
-        },
-        getUrl(url) {
-            if (url.indexOf("http") === 0) {
-                return url;
-            } else {
-                return serverUrl + url;
-            }
-        },
-        isNull(val) {
-            return isEmptyOrNull(val);
-        },
-        contains(array, element, key) {
-            return contains(array, element, key);
-        },
-        stopEvent(e) {
-            console.log("stop event")
-            e.stopPrevent();
-        },
-        uploadImages(count, scallback, fcallback) {
-            let result = [];
-            this.checkPermission("camera", () => {
-                this.checkPermission("storage", () => {
-                    uni.chooseImage({
-                        count: count, //默认9
-                        sizeType: ['original', 'compressed'],
-                        sourceType: ['album'],
-                        success: (res) => {
-                            uni.showLoading({title: "图片上传中"});
-                            const files = res.tempFilePaths;
-                            let length = files.length;
-                            for (let i = 0; i < files.length; i++) {
-                                let fp = files[i];
-                                const formData = {
-                                    thumb_mode: 1,
-                                    'X-Token': uni.getStorageSync(cfg.key.token) || ""
-                                };
-                                uni.uploadFile({
-                                    url: cfg.api.uploadUrl,
-                                    filePath: fp,
-                                    name: 'file',
-                                    formData: formData,
-                                    success: (uploadFileRes) => {
-                                        result.unshift(JSON.parse(uploadFileRes.data).result.uuid);
-                                    },
-                                    complete: () => {
-                                        length--;
-                                        if (length <= 0) {
-                                            uni.hideLoading();
-                                            setTimeout(() => {
-                                                if (scallback) {
-                                                    console.log(result)
-                                                    scallback.call(null, result);
-                                                }
-                                            }, 100)
-                                        }
-                                    }
-                                });
-                            }
-                        }
-                    });
-                });
-            })
-        },
-        uploadVideo(callback) {
-            this.checkPermission("camera", () => {
-                this.checkPermission("storage", () => {
-                    uni.chooseVideo({
-                        count: 1, //默认9
-                        sourceType: ['camera', 'album'],
-                        maxDuration: 30,
-                        success: (res) => {
-                            if (res.size > 51200000) {
-                                this.$dialog.success("只能上传小于50M的视频!");
-                                return;
-                            }
-                            uni.showLoading({
-                                title: '视频上传中'
-                            });
-                            const formData = {
-                                thumb_mode: 1,
-                                'X-Token': uni.getStorageSync(cfg.key.token) || ""
-                            };
-                            uni.uploadFile({
-                                url: cfg.api.uploadUrl,
-                                filePath: res.tempFilePath,
-                                name: 'file',
-                                formData: formData,
-                                success: (uploadFileRes) => {
-                                    callback(uploadFileRes);
-                                    uni.hideLoading();
-                                },
-                                complete: () => {
-                                    uni.hideLoading();
-                                }
-                            });
-                        }
-                    });
-                })
-            })
-        },
-        payRequest(payType, payInfo, scallback, fcallback) {
-            let _this = this;
-            //1微信 2-支付宝
-            if (payType === 1) {
-                // fcallback.apply();
-                uni.requestPayment({
-                    provider: 'wxpay',
-                    orderInfo: payInfo.wxpay,
-                    success: function (res) {
-                        scallback.apply();
-                    },
-                    fail: function (err) {
-                        console.log('fail:' + JSON.stringify(err));
-                        fcallback.apply();
-                    }
-                });
-            } else if (payType === 2) {
-                uni.requestPayment({
-                    provider: 'alipay',
-                    orderInfo: payInfo.alipay.orderString,
-                    success: function (res) {
-                        scallback.apply();
-                    },
-                    fail: function (err) {
-                        console.log('fail:' + JSON.stringify(err));
-                        fcallback.apply();
-                    }
-                });
-            }
-        },
-        getDate(date, type) {
-            let year = date.getFullYear();
-            let month = date.getMonth() + 1;
-            let day = date.getDate();
-
-            if (type === 'start') {
-                year = year - 60;
-            } else if (type === 'end') {
-                year = year + 2;
-            }
-            month = month > 9 ? month : '0' + month;
-            day = day > 9 ? day : '0' + day;
-            return `${year}年${month}月`;
-        },
-        getTimestamp(timestamp) {
-            function zeroize(num) {
-                return (String(num).length === 1 ? '0' : '') + num;
-            }
-
-            var curTimestamp = parseInt(new Date().getTime() / 1000); //当前时间戳
-
-            var curDate = new Date(curTimestamp * 1000); // 当前时间日期对象
-            var tmDate = new Date(timestamp);  // 参数时间戳转换成的日期对象
-
-            var Y = tmDate.getFullYear(), m = tmDate.getMonth() + 1, d = tmDate.getDate();
-
-            if (curDate.getFullYear() == Y && curDate.getMonth() + 1 == m && curDate.getDate() == d) {
-                return '今天';
-            } else {
-                var newDate = new Date((curTimestamp - 86400) * 1000); // 参数中的时间戳加一天转换成的日期对象
-                if (newDate.getFullYear() == Y && newDate.getMonth() + 1 == m && newDate.getDate() == d) {
-                    return '昨天';
-                } else if (curDate.getFullYear() == Y) {
-                    return zeroize(m) + '月' + zeroize(d) + '日 ';
-                } else {
-                    return Y + '年' + zeroize(m) + '月' + zeroize(d) + '日 ';
-                }
-            }
-        },
-        isPhoneNumber(phone) {
-            const reg = /^((0\d{2,3}-?\d{7,8})|(1\d{10}))$/; //校验手机号和固定电话
-            return reg.test(phone);
-        },
-        isBankCardNo(bankNo) {
-            var num = /^\d*$/;
-            return !(bankNo.length < 16 || bankNo.length > 19 || !num.test(bankNo));
-        },
-        throttle(fn, wait = 500, isImmediate = false) {
-            let flag = true;
-            if (isImmediate) {
-                return function () {
-                    if (flag) {
-                        fn.apply(this, arguments);
-                        flag = false;
-                        setTimeout(() => {
-                            flag = true
-                        }, wait)
-                    }
-                }
-            }
-            return function () {
-                if (flag == true) {
-                    flag = false
-                    setTimeout(() => {
-                        fn.apply(this, arguments)
-                        flag = true
-                    }, wait)
-                }
-            }
-        },
-        debounce(fn, wait = 500, isImmediate = false) {
-            let timerId = null;
-            let flag = true;
-            if (isImmediate) {
-                return function () {
-                    clearTimeout(timerId);
-                    if (flag) {
-                        fn.apply(this, arguments);
-                        flag = false
-                    }
-                    timerId = setTimeout(() => {
-                        flag = true
-                    }, wait)
-                }
-            }
-            return function () {
-                clearTimeout(timerId);
-                timerId = setTimeout(() => {
-                    fn.apply(this, arguments)
-                }, wait)
-            }
-        },
-        /**
-         * APP权限校验 https://ext.dcloud.net.cn/plugin?id=594
-         * @param permissionId
-         * @param scallback
-         * @param fcallback
-         */
-        checkPermission(permissionId, scallback, fcallback) {
-            let _this = this;
-            //location	位置
-            // push	推送(限iOS,注意Android上推送并不是一个权限)
-            // camera	摄像头
-            // photoLibrary	相册
-            // record	麦克风
-            // contact	通讯录
-            // calendar	日历
-            // memo	备忘录
-
-            //#ifdef APP-PLUS
-            let msg = "";
-            if (isIos) {
-                let ret = judgeIosPermission(permissionId);
-                if (ret) {
-                    if (scallback) {
-                        scallback.apply();
-                    }
-                } else {
-                    _this.askToPermission(msg, fcallback);
-                }
-            } else {
-                if (permissionId == 'camera') {
-                    msg = "相机";
-                    permissionId = "android.permission.CAMERA";
-                }
-                if (permissionId == 'storage') {
-                    msg = "存储";
-                    permissionId = "android.permission.READ_EXTERNAL_STORAGE";
-                }
-                if (permissionId == 'location') {
-                    msg = "定位";
-                    permissionId = "android.permission.ACCESS_FINE_LOCATION";
-                }
-                requestAndroidPermission(permissionId).then(res => {
-                    console.log("android permission resp:" + JSON.stringify(res))
-                    if (res == 1) {
-                        if (scallback) {
-                            scallback.apply();
-                        }
-                    } else {
-                        _this.askToPermission(msg, fcallback);
-                    }
-                })
-            }
-            //#endif
-
-            //#ifndef APP-PLUS
-            if (scallback) {
-                scallback.apply();
-            }
-            //#endif
-        },
-        askToPermission(msg, fcallback) {
-            uni.showModal({
-                content: "您未授予应用" + msg + "相关权限,是否前往APP设置?",
-                success: ms => {
-                    if (ms.confirm) {
-                        try {
-                            gotoAppPermissionSetting();
-                        } catch (e) {
-                            console.error(e)
-                        }
-                    } else if (ms.cancel) {
-                        //do nothing
-                        if (fcallback) {
-                            fcallback.apply();
-                        }
-                    }
-                }
-            });
-        },
-    }
-
-};
-
-export {gm, msg};