曹睿
2025-04-22 2fa9c764993b4a7ad51754d0e8587990f96f1529
feat: 完成至扫码
已修改21个文件
已添加5个文件
995 ■■■■■ 文件已修改
.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/auth/index.ts 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/product/manage.ts 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/product/twist.ts 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/product/wire.ts 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/user.ts 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/product_card/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/worker-calling-card/index.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/z-paging-swiper-item/z-paging-swiper-item.vue 303 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/enums/ResultCodeEnum.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/models/base.ts 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/index/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/login/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/components/ProductionCard.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/detail/twistDetail.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/detail/wireDetail.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/index.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/list/index.vue 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/receive/monofil.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/twist/report/index.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/wire/report/wire.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/production/wire/report/wireForm.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.ts 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/types/global.d.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -4,7 +4,7 @@
VITE_APP_PORT = 4096
# API åŸºç¡€è·¯å¾„,开发环境下的请求前缀
VITE_APP_BASE_API = '/mes'
VITE_APP_BASE_API = 'http://114.132.189.42:7002/mes'
# API æœåŠ¡å™¨çš„ URL
VITE_APP_API_URL = 'http://114.132.189.42:7002'
VITE_APP_API_URL = 'http://114.132.189.42:7002/mes'
src/api/auth/index.ts
@@ -9,14 +9,10 @@
   * @returns è¿”回 token
   */
  login(data: LoginFormData): Promise<LoginResult> {
    console.log("data", data);
    return request<LoginResult>({
      url: "/login",
      method: "POST",
      data: data,
      header: {
        "Content-Type": "application/x-www-form-urlencoded",
      },
    });
  },
@@ -53,6 +49,7 @@
/** ç™»å½•响应 */
export interface LoginResult {
  /** è®¿é—®token */
  token: string;
  accessToken: string;
  /** token ç±»åž‹ */
  tokenType?: string;
src/api/product/manage.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
import request from "@/utils/request";
import { BaseResult } from "@/models/base";
const ManageApi = {
  getProductList(params: any) {
    return request<BaseResult<any>>({
      url: "/app/intoProduction",
      method: "GET",
      data: params,
    });
  },
  // æŸ¥è¯¢æ‹‰ä¸ç»žçº¿æŠ¥å·¥
  getReportList(params: any) {
    return request<BaseResult<any>>({
      url: "/app/getWireOutput",
      method: "GET",
      data: params,
    });
  },
  // æŸ¥è¯¢è‡ªæ£€ä¿¡æ¯
  getSelfInspection(params: any) {
    return request<BaseResult<any>>({
      url: "/app/getSelfInspection",
      method: "GET",
      data: params,
    });
  },
  // æŸ¥è¯¢é¢†ç”¨ä¿¡æ¯
  getStrandedWireDish(params: any) {
    return request<BaseResult<any>>({
      url: "/app/getStrandedWireDish",
      method: "GET",
      data: params,
    });
  },
};
export default ManageApi;
src/api/product/twist.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
import request from "@/utils/request";
import { BaseResult } from "@/models/base";
const TwistApi = {
  // èŽ·å–æ‹‰ä¸è¯¦æƒ…
  getTwistDetailById(params: any) {
    return request<BaseResult<any>>({
      url: "/app/getById1",
      method: "GET",
      data: params,
    });
  },
  // æ–°å¢žæ‹‰ä¸æŠ¥å·¥
  addWireOutput(data: any) {
    return request<BaseResult<any>>({
      url: "/app/addWireOutput",
      method: "POST",
      data: data,
    });
  },
};
export default TwistApi;
src/api/product/wire.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
import request from "@/utils/request";
import { BaseResult } from "@/models/base";
const WireApi = {
  // èŽ·å–æ‹‰ä¸è¯¦æƒ…
  getWireDetailById(params: any) {
    return request<BaseResult<any>>({
      url: "/app/getById",
      method: "GET",
      data: params,
    });
  },
  // æ–°å¢žæ‹‰ä¸æŠ¥å·¥
  addWireOutput(data: any) {
    return request<BaseResult<any>>({
      url: "/app/addWireOutput",
      method: "POST",
      data: data,
    });
  },
};
export default WireApi;
src/api/system/user.ts
@@ -10,7 +10,7 @@
   */
  getUserInfo(): Promise<UserInfo> {
    return request<UserInfo>({
      url: `${USER_BASE_URL}/me`,
      url: `/getUserInfo`,
      method: "GET",
    });
  },
@@ -142,11 +142,14 @@
export interface UserInfo {
  /** ç”¨æˆ·ID */
  userId?: number;
  roleName?: string;
  userName?: string;
  /** ç”¨æˆ·å */
  username?: string;
  /** æ˜µç§° */
  nickName?: string;
  nickname?: string;
  /** å¤´åƒURL */
@@ -157,6 +160,8 @@
  /** æƒé™ */
  perms?: string[];
  user?: any;
  role?: any;
}
/**
src/components/product_card/index.vue
@@ -2,9 +2,9 @@
  <wd-card class="card_bg">
    <template #title>
      <view class="flex justify-between w-full">
        <text class="font-medium text-[#252525]">设备编号: 1234567891</text>
        <text class="font-medium text-[#252525]">设备编号: {{ data.deviceModel }}</text>
        <wd-tag color="#0D867F" bg-color="#E7F4EC">
          <text class="text-xs">JL/B20-400-35</text>
          <text class="text-xs">{{ data.model }}</text>
        </wd-tag>
      </view>
    </template>
@@ -16,7 +16,7 @@
          </view>
          <text class="text-[#646874] mx-2">
            æ€»éœ€æ±‚数量:
            <text class="text-[#252525]">274m</text>
            <text class="text-[#252525]">{{ data.totalAmount }}m</text>
          </text>
        </view>
      </wd-col>
@@ -29,7 +29,7 @@
          </view>
          <text class="text-[#646874] mx-2">
            å·²ç”Ÿäº§æ•°é‡:
            <text class="text-[#252525]">202m</text>
            <text class="text-[#252525]">{{ data.amount }}m</text>
          </text>
        </view>
      </wd-col>
@@ -40,7 +40,7 @@
          </view>
          <text class="text-[#646874] mx-2">
            å¾…排产数量:
            <text class="text-[#252525]">72m</text>
            <text class="text-[#252525]">{{ data.unAmount }}m</text>
          </text>
        </view>
      </wd-col>
@@ -48,9 +48,17 @@
  </wd-card>
</template>
<script setup lang="ts">
defineProps({
  data: {
    type: Object,
    default: () => {},
  },
});
</script>
<style lang="scss" scoped>
.card_bg {
  margin-top: 12px;
  box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.05);
  padding-bottom: 10px;
}
src/components/worker-calling-card/index.vue
@@ -3,12 +3,12 @@
    <template #title>
      <view>
        <text class="font-medium">
          å‘¨ç¼çŽŸ
          <text class="text-[#0D867F] text-xs">·生产操作工</text>
          {{ user.nickName }}
          <text class="text-[#0D867F] text-xs">·{{ user.roleName }}</text>
        </text>
      </view>
      <view>
        <text class="font-medium text-[#3D3D3D] text-sm">工号: sc1989201</text>
        <text class="font-medium text-[#3D3D3D] text-sm">工号: {{ user.userName }}</text>
      </view>
    </template>
    <view class="mt-2">
@@ -16,7 +16,24 @@
    </view>
  </wd-cell>
</template>
<script setup lang="ts"></script>
<script setup lang="ts">
import { useUserStore } from "@/store/modules/user";
import { nextTick } from "vue";
const userStore = useUserStore();
const userInfo: any = computed(() => userStore.userInfo);
const user = reactive({
  nickName: "",
  userName: "",
  roleName: "",
});
onLoad(() => {
  nextTick();
  user.nickName = userInfo.value.user?.nickName;
  user.userName = userInfo.value.user?.userName;
  user.roleName = userInfo.value.user?.roles[0].roleName;
});
</script>
<style lang="scss" scoped>
.calling_card {
  background: #fff;
src/components/z-paging-swiper-item/z-paging-swiper-item.vue
@@ -5,156 +5,167 @@
<!-- æ»‘动切换选项卡swiper-item,此组件支持easycom规范,可以在项目中直接引用 -->
<template>
    <view class="zp-swiper-item-container">
        <z-paging ref="paging" :fixed="false"
            :auto="false" :useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle"
            :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" :virtualListCol="virtualListCol"
            @query="_queryList" @listChange="_updateList">
            <slot />
            <template #header>
                <slot name="header"/>
            </template>
            <template #cell="{item,index}">
                <slot name="cell" :item="item" :index="index"/>
            </template>
            <template #footer>
                <slot name="footer"/>
            </template>
        </z-paging>
    </view>
  <view class="zp-swiper-item-container">
    <z-paging
      ref="paging"
      :fixed="false"
      :auto="false"
      :useVirtualList="useVirtualList"
      :useInnerList="useInnerList"
      :cellKeyName="cellKeyName"
      :innerListStyle="innerListStyle"
      :preloadPage="preloadPage"
      :cellHeightMode="cellHeightMode"
      :virtualScrollFps="virtualScrollFps"
      :virtualListCol="virtualListCol"
      @query="_queryList"
      @listChange="_updateList"
    >
      <slot />
      <template #header>
        <slot name="header" />
      </template>
      <template #cell="{ item, index }">
        <slot name="cell" :item="item" :index="index" />
      </template>
      <template #footer>
        <slot name="footer" />
      </template>
    </z-paging>
  </view>
</template>
<script>
    import zPaging from '../z-paging/z-paging'
    /**
     * z-paging-swiper-item ç»„ä»¶
     * @description swiper+list极简写法中使用到,实际上就是对普通的swiper+list中swiper-item的包装封装,用以简化写法,但个性化配置局限较多
     * @tutorial https://z-paging.zxlee.cn/api/sub-components/main.html#z-paging-swiper-item配置
     * @notice ä»¥ä¸‹ä¸º z-paging-swiper-item çš„配置项
     * @property {Number} tabIndex å½“前组件的 index,也就是当前组件是 swiper ä¸­çš„第几个,默认为 0
     * @property {Number} currentIndex å½“前 swiper åˆ‡æ¢åˆ°ç¬¬å‡ ä¸ª index,默认为 0
     * @property {Boolean} useVirtualList æ˜¯å¦ä½¿ç”¨è™šæ‹Ÿåˆ—表,默认为 false
     * @property {Boolean} useInnerList æ˜¯å¦åœ¨ z-paging å†…部循环渲染列表(内置列表),默认为 false。若 useVirtualList ä¸º true,则此项恒为 true
     * @property {String} cellKeyName å†…置列表 cell çš„ key åç§°ï¼Œä»… nvue æœ‰æ•ˆï¼Œåœ¨ nvue ä¸­å¼€å¯ useInnerList æ—¶å¿…须填此项,默认为 ''
     * @property {Object} innerListStyle innerList æ ·å¼ï¼Œé»˜è®¤ä¸º {}
     * @property {Number|String} preloadPage é¢„加载的列表可视范围(列表高度)页数,默认为 12。此数值越大,则虚拟列表中加载的 dom è¶Šå¤šï¼Œå†…存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题
     * @property {String} cellHeightMode è™šæ‹Ÿåˆ—表 cell é«˜åº¦æ¨¡å¼ï¼Œé»˜è®¤ä¸º 'fixed',也就是每个 cell é«˜åº¦å®Œå…¨ç›¸åŒï¼Œå°†ä»¥ç¬¬ä¸€ä¸ª cell é«˜åº¦ä¸ºå‡†è¿›è¡Œè®¡ç®—。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】
     * @property {Number|String} virtualListCol è™šæ‹Ÿåˆ—表列数,默认为 1。常用于每行有多列的情况,例如每行有 2 åˆ—数据,需要将此值设置为 2
     * @property {Number|String} virtualScrollFps è™šæ‹Ÿåˆ—表 scroll å–样帧率,默认为 60,过高可能出现卡顿等问题
     * @example <z-paging-swiper-item ref="swiperItem" :tabIndex="index" :currentIndex="current" @query="queryList" @updateList="updateList"></z-paging-swiper-item>
     */
    export default {
        name: "z-paging-swiper-item",
        components: { zPaging },
        data() {
            return {
                firstLoaded: false
            }
        },
        props: {
            // å½“前组件的index,也就是当前组件是swiper中的第几个
            tabIndex: {
                type: Number,
                default: function() {
                    return 0
                }
            },
            // å½“前swiper切换到第几个index
            currentIndex: {
                type: Number,
                default: function() {
                    return 0
                }
            },
            // æ˜¯å¦ä½¿ç”¨è™šæ‹Ÿåˆ—表,默认为否
            useVirtualList: {
                type: Boolean,
                default: false
            },
            // æ˜¯å¦åœ¨z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true
            useInnerList: {
                type: Boolean,
                default: false
            },
            // å†…置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项
            cellKeyName: {
                type: String,
                default: ''
            },
            // innerList样式
            innerListStyle: {
                type: Object,
                default: function() {
                    return {};
                }
            },
            // é¢„加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各12页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题
            preloadPage: {
                type: [Number, String],
                default: 12
            },
            // è™šæ‹Ÿåˆ—表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。
            cellHeightMode: {
                type: String,
                default: 'fixed'
            },
            // è™šæ‹Ÿåˆ—表列数,默认为1。常用于每行有多列的情况,例如每行有2列数据,需要将此值设置为2
            virtualListCol: {
                type: [Number, String],
                default: 1
            },
            // è™šæ‹Ÿåˆ—表scroll取样帧率,默认为60,过高可能出现卡顿等问题
            virtualScrollFps: {
                type: [Number, String],
                default: 60
            },
        },
        watch: {
            currentIndex: {
                handler(newVal, oldVal) {
                    if (newVal === this.tabIndex) {
                        // æ‡’加载,当滑动到当前的item时,才去加载
                        if (!this.firstLoaded) {
                            this.$nextTick(()=>{
                                let delay = 5;
                                // #ifdef MP-TOUTIAO
                                delay = 100;
                                // #endif
                                setTimeout(() => {
                                    this.$refs.paging.reload().catch(() => {});
                                }, delay);
                            })
                        }
                    }
                },
                immediate: true
            }
        },
        methods: {
            reload(data) {
                return this.$refs.paging.reload(data);
            },
            complete(data) {
                this.firstLoaded = true;
                return this.$refs.paging.complete(data);
            },
            _queryList(pageNo, pageSize, from) {
                this.$emit('query', pageNo, pageSize, from);
            },
            _updateList(list) {
                this.$emit('updateList', list);
            }
        }
    }
import zPaging from "../z-paging/z-paging";
/**
 * z-paging-swiper-item ç»„ä»¶
 * @description swiper+list极简写法中使用到,实际上就是对普通的swiper+list中swiper-item的包装封装,用以简化写法,但个性化配置局限较多
 * @tutorial https://z-paging.zxlee.cn/api/sub-components/main.html#z-paging-swiper-item配置
 * @notice ä»¥ä¸‹ä¸º z-paging-swiper-item çš„配置项
 * @property {Number} tabIndex å½“前组件的 index,也就是当前组件是 swiper ä¸­çš„第几个,默认为 0
 * @property {Number} currentIndex å½“前 swiper åˆ‡æ¢åˆ°ç¬¬å‡ ä¸ª index,默认为 0
 * @property {Boolean} useVirtualList æ˜¯å¦ä½¿ç”¨è™šæ‹Ÿåˆ—表,默认为 false
 * @property {Boolean} useInnerList æ˜¯å¦åœ¨ z-paging å†…部循环渲染列表(内置列表),默认为 false。若 useVirtualList ä¸º true,则此项恒为 true
 * @property {String} cellKeyName å†…置列表 cell çš„ key åç§°ï¼Œä»… nvue æœ‰æ•ˆï¼Œåœ¨ nvue ä¸­å¼€å¯ useInnerList æ—¶å¿…须填此项,默认为 ''
 * @property {Object} innerListStyle innerList æ ·å¼ï¼Œé»˜è®¤ä¸º {}
 * @property {Number|String} preloadPage é¢„加载的列表可视范围(列表高度)页数,默认为 12。此数值越大,则虚拟列表中加载的 dom è¶Šå¤šï¼Œå†…存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题
 * @property {String} cellHeightMode è™šæ‹Ÿåˆ—表 cell é«˜åº¦æ¨¡å¼ï¼Œé»˜è®¤ä¸º 'fixed',也就是每个 cell é«˜åº¦å®Œå…¨ç›¸åŒï¼Œå°†ä»¥ç¬¬ä¸€ä¸ª cell é«˜åº¦ä¸ºå‡†è¿›è¡Œè®¡ç®—。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】
 * @property {Number|String} virtualListCol è™šæ‹Ÿåˆ—表列数,默认为 1。常用于每行有多列的情况,例如每行有 2 åˆ—数据,需要将此值设置为 2
 * @property {Number|String} virtualScrollFps è™šæ‹Ÿåˆ—表 scroll å–样帧率,默认为 60,过高可能出现卡顿等问题
 * @example <z-paging-swiper-item ref="swiperItem" :tabIndex="index" :currentIndex="current" @query="queryList" @updateList="updateList"></z-paging-swiper-item>
 */
export default {
  name: "z-paging-swiper-item",
  components: { zPaging },
  props: {
    // å½“前组件的index,也就是当前组件是swiper中的第几个
    tabIndex: {
      type: Number,
      default: function () {
        return 0;
      },
    },
    // å½“前swiper切换到第几个index
    currentIndex: {
      type: Number,
      default: function () {
        return 0;
      },
    },
    // æ˜¯å¦ä½¿ç”¨è™šæ‹Ÿåˆ—表,默认为否
    useVirtualList: {
      type: Boolean,
      default: false,
    },
    // æ˜¯å¦åœ¨z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true
    useInnerList: {
      type: Boolean,
      default: false,
    },
    // å†…置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项
    cellKeyName: {
      type: String,
      default: "",
    },
    // innerList样式
    innerListStyle: {
      type: Object,
      default: function () {
        return {};
      },
    },
    // é¢„加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各12页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题
    preloadPage: {
      type: [Number, String],
      default: 12,
    },
    // è™šæ‹Ÿåˆ—表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。
    cellHeightMode: {
      type: String,
      default: "fixed",
    },
    // è™šæ‹Ÿåˆ—表列数,默认为1。常用于每行有多列的情况,例如每行有2列数据,需要将此值设置为2
    virtualListCol: {
      type: [Number, String],
      default: 1,
    },
    // è™šæ‹Ÿåˆ—表scroll取样帧率,默认为60,过高可能出现卡顿等问题
    virtualScrollFps: {
      type: [Number, String],
      default: 60,
    },
  },
  data() {
    return {
      firstLoaded: false,
    };
  },
  watch: {
    currentIndex: {
      handler(newVal, oldVal) {
        if (newVal === this.tabIndex) {
          // æ‡’加载,当滑动到当前的item时,才去加载
          if (!this.firstLoaded) {
            this.$nextTick(() => {
              let delay = 5;
              // #ifdef MP-TOUTIAO
              delay = 100;
              // #endif
              setTimeout(() => {
                this.$refs.paging.reload().catch(() => {});
              }, delay);
            });
          }
        }
      },
      immediate: true,
    },
  },
  methods: {
    reload(data) {
      return this.$refs.paging.reload(data);
    },
    complete(data) {
      this.firstLoaded = true;
      return this.$refs.paging.complete(data);
    },
    _queryList(pageNo, pageSize, from) {
      this.$emit("query", pageNo, pageSize, from);
    },
    _updateList(list) {
      this.$emit("updateList", list);
    },
  },
};
</script>
<style scoped>
    .zp-swiper-item-container {
        /* #ifndef APP-NVUE */
        height: 100%;
        /* #endif */
        /* #ifdef APP-NVUE */
        flex: 1;
        /* #endif */
    }
.zp-swiper-item-container {
  /* #ifndef APP-NVUE */
  height: 100%;
  /* #endif */
  /* #ifdef APP-NVUE */
  flex: 1;
  /* #endif */
}
</style>
src/enums/ResultCodeEnum.ts
@@ -5,7 +5,7 @@
  /**
   * æˆåŠŸ
   */
  SUCCESS = "00000",
  SUCCESS = 200,
  /**
   * é”™è¯¯
   */
src/main.ts
@@ -6,7 +6,6 @@
import "@/styles/global.scss";
import { setupStore } from "@/store";
export function createApp() {
  const app = createSSRApp(App);
src/models/base.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
export interface BaseResult<T> {
  code: number; // å“åº”码
  msg: string; // å“åº”信息
  data?: T | any; // å“åº”参数
}
export interface PageResult<T = any> {
  total: number; // æ€»æ•°
  records: Array<T>; // æŸ¥è¯¢æ•°æ®åˆ—表
  size: number; // æ¯é¡µæ˜¾ç¤ºæ¡æ•°ï¼Œé»˜è®¤ 10
  current: number; // å½“前页
  pages: boolean; // æ˜¯å¦å­˜åœ¨ä¸‹ä¸€é¡µ
}
src/pages/index/index.vue
@@ -201,8 +201,8 @@
};
onReady(() => {
  loadVisitStatsData();
  loadVisitTrendData();
  // loadVisitStatsData();
  // loadVisitTrendData();
});
</script>
src/pages/login/index.vue
@@ -96,8 +96,9 @@
// ç™»å½•表单数据
const loginFormData = ref<LoginFormData>({
  username: "admin",
  password: "123456",
  // username: "31601016",
  username: "32308027",
  password: "cxjt1234",
});
// èŽ·å–é‡å®šå‘å‚æ•°
@@ -120,7 +121,6 @@
    .then(() => userStore.getInfo())
    .then(() => {
      toast.success("登录成功");
      // æ£€æŸ¥ç”¨æˆ·ä¿¡æ¯æ˜¯å¦å®Œæ•´
      if (!userStore.isUserInfoComplete()) {
        // ä¿¡æ¯ä¸å®Œæ•´ï¼Œè·³è½¬åˆ°å®Œå–„信息页面
src/pages/production/components/ProductionCard.vue
@@ -4,7 +4,7 @@
      <view class="flex justify-between w-full h-[20px]">
        <view class="text-[#646874] pl-1">{{ item.label }}</view>
        <view class="font-medium pr-1" :style="{ color: item.color ?? color }">
          {{ item.value }}
          {{ value[item.prop] }}
        </view>
      </view>
    </wd-col>
@@ -19,6 +19,12 @@
      return [];
    },
  },
  value: {
    type: Object,
    default: () => {
      return {};
    },
  },
  color: {
    type: String,
    default: "#333333",
src/pages/production/detail/twistDetail.vue
@@ -1,12 +1,12 @@
<template>
  <view>
    <ProductCard />
    <ProductCard :data="cardData" />
    <view class="mx-3">
      <wd-grid class="rounded-lg" clickable>
        <wd-grid-item
          icon="computer"
          link-type="navigateTo"
          url="/pages/production/twist/report/index"
          :url="`/pages/production/twist/report/index?id=${paramsId}`"
          text="报工"
        />
        <!-- <wd-grid-item
@@ -24,7 +24,7 @@
        <wd-grid-item
          icon="wallet"
          link-type="navigateTo"
          url="/pages/production/twist/receive/index"
          :url="`/pages/production/twist/receive/index?id=${paramsId}`"
          text="材料领用"
        />
      </wd-grid>
@@ -33,7 +33,34 @@
</template>
<script lang="ts" setup>
import { onLoad } from "@dcloudio/uni-app";
import ProductCard from "@/components/product_card/index.vue";
import TwistApi from "@/api/product/twist";
const paramsId = ref();
const cardData = reactive({
  deviceModel: undefined,
  model: undefined,
  totalAmount: undefined,
  amount: undefined,
  unAmount: undefined,
});
const getDetailData = async (id: string) => {
  const { data } = await TwistApi.getTwistDetailById({
    id: id,
  });
  cardData.deviceModel = data.deviceModel;
  cardData.model = data.model;
  cardData.totalAmount = data.totalLength;
  cardData.amount = data.length;
  cardData.unAmount = data.unLength;
};
onLoad((options: any) => {
  paramsId.value = options.id;
  getDetailData(options.id);
});
</script>
<style lang="scss" scoped></style>
src/pages/production/detail/wireDetail.vue
@@ -1,12 +1,12 @@
<template>
  <view>
    <ProductCard />
  <view class="pt-2">
    <ProductCard :data="cardData" />
    <view class="mx-3">
      <wd-grid class="rounded-lg" clickable>
        <wd-grid-item
          icon="computer"
          link-type="navigateTo"
          url="/pages/production/wire/report/wire"
          :url="`/pages/production/wire/report/wire?id=${paramsId}`"
          text="报工"
        />
        <!-- <wd-grid-item
@@ -33,7 +33,34 @@
</template>
<script lang="ts" setup>
import { onLoad } from "@dcloudio/uni-app";
import ProductCard from "@/components/product_card/index.vue";
import WireApi from "@/api/product/wire";
const paramsId = ref();
const cardData = reactive({
  deviceModel: undefined,
  model: undefined,
  totalAmount: undefined,
  amount: undefined,
  unAmount: undefined,
});
const getDetailData = async (id: string) => {
  const { data } = await WireApi.getWireDetailById({
    id: id,
  });
  cardData.deviceModel = data.deviceModel;
  cardData.model = data.model;
  cardData.totalAmount = data.totalAmount;
  cardData.amount = data.amount;
  cardData.unAmount = data.unAmount;
};
onLoad((options: any) => {
  paramsId.value = options.id;
  getDetailData(options.id);
});
</script>
<style lang="scss" scoped></style>
src/pages/production/index.vue
@@ -10,45 +10,37 @@
        </view>
      </wd-col>
    </wd-row>
    <wd-tabs v-model="tab" :lineWidth="110">
      <block v-for="(item, index) in productList" :key="index" class="tab_bg">
        <wd-tab :title="item.label">
          <view class="card_box">
            <Statistics class="statistics_box" />
            <ProductCard v-for="(item, index) in 10" @click="toDetail(index)" />
            <wd-loadmore custom-class="loadmore" state="loading" />
          </view>
        </wd-tab>
      </block>
    <wd-tabs v-model="tab" auto-line-width>
      <wd-tab :title="`待生产(${total.wait})`" class="tab_bg">
        <ProductList :api="ManageApi.getProductList" state="待完成" @ok="changeWait" />
      </wd-tab>
      <wd-tab :title="`已生产(${total.already})`" class="tab_bg">
        <ProductList :api="ManageApi.getProductList" state="已完成" @ok="changeAlready" />
      </wd-tab>
    </wd-tabs>
  </view>
</template>
<script lang="ts" setup>
import ProductCard from "@/components/product_card/index.vue";
import Statistics from "./components/Statistics.vue";
import ManageApi from "@/api/product/manage";
import { onMounted, ref } from "vue";
import ProductList from "./list/index.vue";
const tab = ref<number>(0);
const total = reactive({
  wait: 0,
  already: 0,
});
const productList = ref<any[]>([
  {
    label: "待生产(10)",
  },
  {
    label: "已生产(20)",
  },
]);
const toDetail = (type: number) => {
  if (Math.floor(type) % 2 === 0) {
    uni.navigateTo({
      url: "/pages/production/detail/wireDetail",
    });
  } else {
    uni.navigateTo({
      url: "/pages/production/detail/twistDetail",
    });
  }
const changeWait = (num: number) => {
  total.wait = num;
};
const changeAlready = (num: number) => {
  total.already = num;
};
onMounted(() => {});
</script>
<style lang="scss" scoped>
@@ -71,7 +63,7 @@
  border-bottom: 1px #dddddd solid;
}
.tab_bg {
  background: linear-gradient(0, #ffffff 29%, #f3f9f8 100%);
  background: #f3f9f8;
}
.icon_box {
@@ -83,10 +75,7 @@
  background: #e7f4ec99;
  border-radius: 50%;
}
.card_box {
  height: calc(100vh - 160px);
  overflow: scroll;
}
.statistics_box {
  margin: 15px;
}
src/pages/production/list/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,80 @@
<template>
  <view class="card_box">
    <z-paging
      ref="pagingRef"
      v-model="list"
      :fixed="false"
      :auto-show-back-to-top="true"
      @query="getList"
    >
      <template #top>
        <Statistics class="statistics_box" />
      </template>
      <ProductCard
        v-for="(item, index) in list"
        :key="index"
        :data="item"
        @click="toDetail(item.id, item.type)"
      />
    </z-paging>
  </view>
</template>
<script setup lang="ts">
import Statistics from "../components/Statistics.vue";
import ProductCard from "@/components/product_card/index.vue";
import { useUserStore } from "@/store/modules/user";
import zPaging from "@/components/z-paging/z-paging.vue";
const pagingRef = ref();
const props = defineProps({
  api: {
    type: Function,
    default: () => {},
  },
  state: {
    type: String,
    default: "",
  },
});
const emits = defineEmits(["ok"]);
const list = ref<any[]>([]);
const toDetail = (id: number, type: string) => {
  if (type == "拉丝") {
    uni.navigateTo({
      url: `/pages/production/detail/wireDetail?id=${id}`,
    });
  } else if (type == "绞线") {
    uni.navigateTo({
      url: `/pages/production/detail/twistDetail?id=${id}`,
    });
  }
};
const getList = async (pageNo: number, pageSize: number) => {
  const userStore = useUserStore();
  const userInfo: any = computed(() => userStore.userInfo);
  const { code, data } = await props.api({
    userName: userInfo.value.user?.userName,
    state: props.state,
    current: pageNo,
    size: pageSize,
  });
  if (code == 200) {
    if (data.total == 0) {
      pagingRef.value.complete(true);
    } else {
      pagingRef.value.complete(data.records);
    }
    emits("ok", data.total);
  }
};
</script>
<style lang="scss" scoped>
.card_box {
  height: calc(100vh - 140px);
}
</style>
src/pages/production/twist/receive/monofil.vue
@@ -1,15 +1,23 @@
<template>
  <view class="page">
    <CardTitle title="单丝领用" :hideAction="false">
      <template #action>
        <wd-button type="icon" icon="scan" color="#0D867F" @click="openScan"></wd-button>
  <view class="list_box">
    <z-paging
      ref="pagingRef"
      v-model="cardList"
      :fixed="false"
      :auto-show-back-to-top="true"
      @query="getList"
    >
      <template #top>
        <CardTitle title="单丝领用" :hideAction="false">
          <template #action>
            <wd-button type="icon" icon="scan" color="#0D867F" @click="openScan"></wd-button>
          </template>
        </CardTitle>
      </template>
    </CardTitle>
    <view class="list_box">
      <MonofilCard v-for="(item, index) in cardList" :key="index" />
    </view>
    <Scan ref="scanRef" />
    </z-paging>
  </view>
  <Scan ref="scanRef" />
</template>
<script setup lang="ts">
@@ -17,10 +25,13 @@
import MonofilCard from "../components/MonofilCard.vue";
import { onLoad, onUnload, onShow, onHide } from "@dcloudio/uni-app";
import Scan from "@/components/scan/index.vue";
import ManageApi from "@/api/product/manage";
import zPaging from "@/components/z-paging/z-paging.vue";
// import { useZebraScan } from "@/hooks/useZebraScan";
// const { init, start, stop, triggerScan } = useZebraScan();
const paramsId = ref();
const pagingRef = ref();
const scanRef = ref();
const cardList = ref<any[]>([]);
@@ -31,45 +42,38 @@
};
const openScan = () => {
  // uni.scanCode({
  //   onlyFromCamera: true,
  //   success: (res) => {
  //     console.log("条码类型:" + res.scanType);
  //     console.log("条码内容:" + res.result);
  //     cardList.value.push(res.result);
  //   },
  // });
  // triggerScan();
  scanRef.value.triggerScan();
};
onLoad(() => {
const getList = async () => {
  const { code, data } = await ManageApi.getStrandedWireDish({
    wireId: paramsId.value,
    type: "单丝",
  });
  if (code == 200) {
    pagingRef.value.complete(data);
  }
};
onLoad((options: any) => {
  // å¼€å¯å¹¿æ’­ç›‘听事件
  uni.$on("scan", getScanCode);
  // init(getScanCode);
  paramsId.value = options.id;
});
onUnload(() => {
  // å¼€å¯å¹¿æ’­ç›‘听事件
  uni.$off("scan", getScanCode);
  // stop();
});
onShow(() => {
  // start();
});
onShow(() => {});
onHide(() => {
  // stop();
});
onHide(() => {});
</script>
<style lang="scss" scoped>
.page {
.list_box {
  height: calc(100vh - 100px);
  background: #f3f9f8;
  .list_box {
    height: calc(100% - 100px);
    overflow: scroll;
  }
}
:deep(.wd-button__content) {
  color: #0d867f;
src/pages/production/twist/report/index.vue
@@ -1,10 +1,10 @@
<template>
  <view class="page pt-2">
    <z-paging ref="paging" refresher-only class="list">
    <z-paging ref="pagingRef" v-model="twistReportList" class="list" @query="getTwistReportList">
      <template #top>
        <CardTitle title="报工信息" :hideAction="true" :full="false" @action="addReport" />
      </template>
      <wd-card v-for="(item, index) in 6" type="rectangle" custom-class="round">
      <wd-card v-for="(item, index) in twistReportList" type="rectangle" custom-class="round">
        <template #title>
          <view class="flex justify-between">
            <view>
@@ -15,12 +15,11 @@
            <view class="text-[#A8A8A8]" @click="toEdit">编辑</view>
          </view>
        </template>
        <ProductionCard :data="cardAttr" />
        <ProductionCard :data="cardAttr" :value="item" />
        <template #footer>
          <wd-button size="small" plain @click="toCheck">自检</wd-button>
        </template>
      </wd-card>
      <wd-loadmore custom-class="loadmore" state="loading" />
    </z-paging>
    <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup">
@@ -38,7 +37,11 @@
import TwistForm from "./form.vue";
import { useToast } from "wot-design-uni";
import ProductionCard from "../../components/ProductionCard.vue";
import { onLoad } from "@dcloudio/uni-app";
import ManageApi from "@/api/product/manage";
const pagingRef = ref();
const paramsId = ref();
const toast = useToast();
const dialog = reactive({
  visible: false,
@@ -46,42 +49,36 @@
const cardAttr = ref<any[]>([
  {
    label: "合同号",
    value: "ht2921246",
    label: "领用杆号",
    prop: "poleNumber",
  },
  {
    label: "状态",
    value: "-----",
    label: "杆重(kg)",
    prop: "poleWeight",
  },
  {
    label: "客户名称",
    value: "夏志豪",
  },
  {
    label: "机台",
    value: "-----",
    label: "单丝盘号",
    prop: "monofilamentNumber",
  },
  {
    label: "规格型号",
    value: "2921246",
  },
  {
    label: "已生产数量",
    value: "0",
    prop: "model",
  },
  {
    label: "盘长(m)",
    value: "292",
    prop: "ontLength",
  },
  {
    label: "计划数量",
    value: "100",
    label: "理论重量(kg)",
    prop: "theoryWeight",
  },
  {
    label: "质量追溯号",
    value: "JX-1838",
    label: "实际重量(kg)",
    prop: "actuallyWeight",
  },
]);
const twistReportList = ref<any[]>([]);
const toEdit = () => {
  uni.navigateTo({
@@ -108,6 +105,19 @@
    url: "/pages/production/twist/selfInspect/index",
  });
};
// èŽ·å–æ‹‰ä¸æŠ¥å·¥åˆ—è¡¨
const getTwistReportList = async () => {
  const { data } = await ManageApi.getReportList({
    wireId: paramsId.value,
    type: "绞线",
  });
  pagingRef.value.complete(data);
};
onLoad((options: any) => {
  paramsId.value = options.id;
});
</script>
<style lang="scss" scoped>
src/pages/production/wire/report/wire.vue
@@ -1,26 +1,30 @@
<template>
  <view class="page pt-2">
    <z-paging ref="paging" refresher-only class="list">
    <z-paging ref="pagingRef" v-model="wireReportList" class="list" @query="getWireReportList">
      <template #top>
        <CardTitle title="报工信息" :hideAction="true" :full="false" @action="addReport" />
      </template>
      <wd-card v-for="(item, index) in 6" type="rectangle" custom-class="round">
      <wd-card
        v-for="(item, index) in wireReportList"
        :key="index"
        type="rectangle"
        custom-class="round"
      >
        <template #title>
          <view class="flex justify-between">
            <view>
              <wd-icon name="user" color="#0D867F"></wd-icon>
              <text class="text-[#0D867F] ml-2 font-medium">生产人</text>
              <text class="text-[#333333] ml-2">方兆玉</text>
              <text class="text-[#333333] ml-2">{{ item.productUser }}</text>
            </view>
            <view class="text-[#A8A8A8]" @click="toEdit">编辑</view>
          </view>
        </template>
        <ProductionCard :data="cardAttr" />
        <ProductionCard :data="cardAttr" :value="item" />
        <template #footer>
          <wd-button size="small" plain @click="toCheck">自检</wd-button>
          <wd-button size="small" plain @click="toCheck(item.id)">自检</wd-button>
        </template>
      </wd-card>
      <wd-loadmore custom-class="loadmore" state="loading" />
    </z-paging>
    <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup">
@@ -28,7 +32,7 @@
        <wd-button type="text" @click="cancel">取消</wd-button>
        <wd-button type="text" @click="submit">确定</wd-button>
      </view>
      <WireForm />
      <WireForm ref="wireFormRef" />
    </wd-popup>
    <wd-toast />
  </view>
@@ -39,7 +43,13 @@
import { useToast } from "wot-design-uni";
import ProductionCard from "../../components/ProductionCard.vue";
import zPaging from "@/components/z-paging/z-paging.vue";
import { onLoad } from "@dcloudio/uni-app";
import ManageApi from "@/api/product/manage";
import WireApi from "@/api/product/wire";
const pagingRef = ref();
const wireFormRef = ref();
const paramsId = ref();
const toast = useToast();
const dialog = reactive({
  visible: false,
@@ -47,38 +57,36 @@
const cardAttr = ref<any[]>([
  {
    label: "合同号",
    value: "ht2921246",
    label: "领用杆号",
    prop: "poleNumber",
  },
  {
    label: "状态",
    value: "-----",
    label: "杆重(kg)",
    prop: "poleWeight",
  },
  {
    label: "客户名称",
    value: "夏志豪",
  },
  {
    label: "机台",
    value: "-----",
    label: "单丝盘号",
    prop: "monofilamentNumber",
  },
  {
    label: "规格型号",
    value: "2921246",
  },
  {
    label: "已生产数量",
    value: "0",
    prop: "model",
  },
  {
    label: "盘长(m)",
    value: "292",
    prop: "ontLength",
  },
  {
    label: "计划数量",
    value: "100",
    label: "理论重量(kg)",
    prop: "theoryWeight",
  },
  {
    label: "实际重量(kg)",
    prop: "actuallyWeight",
  },
]);
const wireReportList = ref<any[]>([]);
const toEdit = () => {
  uni.navigateTo({
@@ -90,9 +98,13 @@
  dialog.visible = true;
};
const submit = () => {
const submit = async () => {
  toast.show("提交");
  dialog.visible = false;
  await WireApi.addWireOutput({
    wireId: paramsId.value,
    type: "拉丝",
    ...wireFormRef.value.model,
  });
};
const cancel = () => {
@@ -100,11 +112,24 @@
  dialog.visible = false;
};
const toCheck = () => {
const toCheck = (id: number) => {
  uni.navigateTo({
    url: "/pages/production/wire/selfInspect/index",
    url: `/pages/production/wire/selfInspect/index?id=${id}`,
  });
};
// èŽ·å–æ‹‰ä¸æŠ¥å·¥åˆ—è¡¨
const getWireReportList = async () => {
  const { data } = await ManageApi.getReportList({
    wireId: paramsId.value,
    type: "拉丝",
  });
  pagingRef.value.complete(data);
};
onLoad((options: any) => {
  paramsId.value = options.id;
});
</script>
<style lang="scss" scoped>
src/pages/production/wire/report/wireForm.vue
@@ -2,52 +2,60 @@
  <wd-form ref="form" :model="model" class="relative form_box">
    <wd-cell-group :border="true">
      <wd-input
        v-model="model.contractNo"
        label="合同号"
        v-model="model.poleNumber"
        label="领用杆号"
        label-width="100px"
        prop="contractNo"
        prop="poleNumber"
        clearable
        placeholder="请输入合同号"
        placeholder="请输入领用杆号"
      />
      <wd-input
        v-model="model.clientName"
        label="客户名称"
        v-model="model.poleWeight"
        label="杆重"
        label-width="100px"
        prop="clientName"
        prop="poleWeight"
        clearable
        placeholder="请输入客户名称"
        placeholder="请输入杆重"
      />
      <wd-input
        v-model="model.workbench"
        label="机台"
        v-model="model.monofilamentNumber"
        label="单丝盘号"
        label-width="100px"
        prop="workbench"
        prop="monofilamentNumber"
        clearable
        placeholder="请输入机台"
      />
      <wd-input
        v-model="model.monofilNo"
        label="单体编号"
        v-model="model.model"
        label="规格型号"
        label-width="100px"
        prop="monofilNo"
        prop="model"
        clearable
        placeholder="请输入单体编号"
        placeholder="请输入规格型号"
      />
      <wd-input
        v-model="model.specification"
        label="规格"
        v-model="model.ontLength"
        label="盘长"
        label-width="100px"
        prop="specification"
        prop="ontLength"
        clearable
        placeholder="请输入规格"
        placeholder="请输入盘长"
      />
      <wd-input
        v-model="model.singleDisc"
        label="单丝盘长"
        v-model="model.theoryWeight"
        label="理论重量"
        label-width="100px"
        prop="singleDisc"
        prop="theoryWeight"
        clearable
        placeholder="请输入单丝盘长"
        placeholder="请输入理论重量"
      />
      <wd-input
        v-model="model.actuallyWeight"
        label="实际重量"
        label-width="100px"
        prop="actuallyWeight"
        clearable
        placeholder="请输入实际重量"
      />
    </wd-cell-group>
  </wd-form>
@@ -57,13 +65,17 @@
import useFormData from "@/hooks/useFormData";
const { form: model } = useFormData({
  contractNo: undefined, // åˆåŒå·
  clientName: undefined, // å®¢æˆ·åç§°
  workbench: undefined, // æœºå°
  monofilNo: undefined, // å•体编号
  specification: undefined, // è§„æ ¼
  poleNumber: undefined, // é¢†ç”¨æ†å·
  poleWeight: undefined, // å®¢æˆ·åç§°
  monofilamentNumber: undefined, // å•丝盘号
  model: undefined, // è§„格型号
  ontLength: undefined, // ç›˜é•¿
  singleDisc: undefined, // å•丝盘长
});
defineExpose({
  model,
});
</script>
<style lang="scss" scoped>
src/store/modules/user.ts
@@ -10,9 +10,9 @@
  const login = (data: LoginFormData) => {
    return new Promise((resolve, reject) => {
      AuthAPI.login(data)
        .then((data) => {
          setToken(data.accessToken);
          resolve(data);
        .then((data: any) => {
          setToken(data.data.token);
          resolve(data.data);
        })
        .catch((error) => {
          console.error("登录失败", error);
@@ -40,10 +40,10 @@
  const getInfo = () => {
    return new Promise((resolve, reject) => {
      UserAPI.getUserInfo()
        .then((data) => {
          setUserInfo(data);
          userInfo.value = data;
          resolve(data);
        .then((data: any) => {
          setUserInfo(data.data);
          userInfo.value = data.data.user;
          resolve(data.data);
        })
        .catch((error) => {
          console.error("获取用户信息失败", error);
@@ -68,7 +68,8 @@
  const isUserInfoComplete = (): boolean => {
    if (!userInfo.value) return false;
    return !!(userInfo.value.nickname && userInfo.value.avatar);
    // return !!(userInfo.value.nickName && userInfo.value.avatar);
    return !!userInfo.value.nickName;
  };
  return {
src/types/global.d.ts
@@ -33,7 +33,7 @@
   * å“åº”数据
   */
  interface ResponseData<T = any> {
    code: string;
    code: number | string;
    data: T;
    msg: string;
  }
src/utils/request.ts
@@ -7,8 +7,7 @@
  // #ifdef H5
  baseApi = import.meta.env.VITE_APP_BASE_API;
  // #endif
  return new Promise((resolve, reject) => {
  return new Promise((resolve: any, reject: any) => {
    uni.request({
      ...options,
      url: `${baseApi}${options.url}`,
@@ -22,7 +21,7 @@
        // ä¸šåŠ¡çŠ¶æ€ç  00000 è¡¨ç¤ºæˆåŠŸ
        if (resData.code === ResultCodeEnum.SUCCESS) {
          resolve(resData.data);
          resolve(resData);
        }
        // ä»¤ç‰Œå¤±æ•ˆæˆ–过期处理
        else if (resData.code === ResultCodeEnum.TOKEN_INVALID) {