Explorar o código

修改文件路径,删除废弃文件

wyling007 %!s(int64=3) %!d(string=hai) anos
pai
achega
4c96e28bad

+ 0 - 4
src/api/request.ts

@@ -6,10 +6,6 @@ const request = axios.create({
 	baseURL: import.meta.env.MODE === "development" ? "/dev-api" : "/prod-api",
 });
 
-request.interceptors.request.use(requestLogger);
-
-request.interceptors.response.use(responseLogger);
-
 request.interceptors.request.use((config) => {
 	// 是否需要设置 token
 	if (config.headers.isToken !== false) {

+ 1 - 1
src/hooks/exercise/wrong.ts

@@ -1,5 +1,5 @@
 import { ref, watch, onBeforeMount, Ref, computed, nextTick, ComputedRef } from "vue";
-import { CollectionModel } from "@/dataModel/collection";
+import { CollectionModel } from "@/model/collection";
 import { RouterBus } from "@/hooks";
 import { Notify } from "vant";
 

+ 0 - 325
src/logicModel/exercise.ts

@@ -1,325 +0,0 @@
-import {
-  ref,
-  watch,
-  onBeforeMount,
-  computed,
-  nextTick,
-  ComputedRef,
-} from "vue";
-import * as API from "@/api";
-import { Howl, Howler } from "howler";
-import { useRoute } from "vue-router";
-import { CollectionModel } from "@/dataModel/collection";
-import { RouterBus } from "@/hooks";
-import { Notify } from "vant";
-
-class Execrise {
-  constructor() {}
-
-  /** 答题模式切换 */
-  useTopicMode = () => {
-    const answerTypeList = ref([
-      { name: "顺序练习" },
-      { name: "随机练习" },
-      { name: "背题模式" },
-    ]);
-    const currentType = ref(0);
-    const typeParams = computed(() => {
-      switch (currentType.value) {
-        case 0:
-          return {
-            order: true, //顺序练习
-            answerShow: false, //背题模式
-          };
-        case 1:
-          return {
-            order: false, //顺序练习
-            answerShow: false, //背题模式
-          };
-        case 2:
-          return {
-            order: true, //顺序练习
-            answerShow: true, //背题模式
-          };
-      }
-    });
-
-    return {
-      answerTypeList,
-      currentType,
-      typeParams,
-    };
-  };
-}
-
-//语音设置
-export function useAudioSet(currentSubject: ComputedRef<any>) {
-  const aotuPlayFlag = ref(false);
-
-  let sound: Howl;
-  /**
-   * 播放音频
-   * @param audioUrl
-   */
-  const audioPlay = (audioUrl: string | string[]) => {
-    audioPause();
-    sound = new Howl({
-      src: audioUrl,
-    });
-    sound.once("load", function () {
-      sound.play();
-    });
-    if (typeof audioUrl === "object") {
-      sound.once("end", () => {
-        sound = new Howl({
-          src: audioUrl[1],
-        });
-        sound.once("load", function () {
-          sound.play();
-        });
-      });
-    }
-  };
-
-  /**
-   * 停止播放
-   */
-  const audioPause = () => {
-    sound && sound.pause();
-  };
-
-  /**
-   * 读题
-   */
-  const subjectAudioPlay = (
-    type: "读题" | "读官方解释" | "读技巧解释" | "读题+答案"
-  ) => {
-    switch (type) {
-      case "读题":
-        audioPlay(currentSubject.value.issuemp3);
-        break;
-      case "读官方解释":
-        audioPlay(currentSubject.value.explainjsmp3);
-        break;
-      case "读技巧解释":
-        audioPlay(currentSubject.value.explainMp3);
-        break;
-      case "读题+答案":
-        audioPlay([
-          currentSubject.value.issuemp3,
-          currentSubject.value.answermp3,
-        ]);
-        break;
-      default:
-        break;
-    }
-  };
-
-  //音频模块end
-  const aotuPlaySet = () => {
-    aotuPlayFlag.value = !aotuPlayFlag.value;
-    aotuPlayFlag.value ? subjectAudioPlay("读题") : audioPause();
-  };
-
-  //自动读题
-  watch(currentSubject, () => {
-    if (aotuPlayFlag.value) subjectAudioPlay("读题"); //自动读题
-  });
-
-  return {
-    aotuPlayFlag,
-    aotuPlaySet,
-    subjectAudioPlay,
-  };
-}
-
-const useSubjectList = () => {
-  const subjectList = ref<any[]>([]); //题目列表
-  const subjectTotal = ref(0); //题目总数
-  const pageNum = ref(1); //当前请求页码
-  const pageSize = ref(100); //当前请求每页数据
-  const query = useRoute().query; //路由query参数
-  onBeforeMount(async () => {
-    const res = await API.getTopicList({
-      ...query,
-      pageNum: pageNum.value,
-      pageSize: pageSize.value,
-    });
-    subjectList.value = res.list;
-    subjectTotal.value = res.total;
-  });
-  //加载下一页数据
-  const loadNewSubject = async () => {
-    if (subjectList.value.length == subjectTotal.value) return;
-    pageNum.value++;
-    const res = await API.getTopicList({
-      ...query,
-      pageNum: pageNum.value,
-      pageSize: pageSize.value,
-    });
-    subjectList.value = subjectList.value.concat(res.list);
-  };
-  const currentSubjectIndex = ref(0); //当前题目下标
-  //当前题目内容
-  const currentSubject = computed(() => {
-    return subjectList.value[currentSubjectIndex.value];
-  });
-  return {
-    subjectList,
-    subjectTotal,
-    loadNewSubject,
-    currentSubject,
-    currentSubjectIndex,
-  };
-};
-
-const useSubjectCheck = (
-  currentSubject: ComputedRef<any>,
-  nextSubject: () => Promise<void>
-) => {
-  const trueNum = ref(0); //正确数量
-  const falseNum = ref(0); //错误数量
-  const isJumpNext = ref(false); //答对跳转下一题
-  const wrongModel = new CollectionModel("wrong");
-  const collectionModel = new CollectionModel("collection");
-  const {
-    route: { query },
-  } = new RouterBus();
-
-  /** 批量新增收藏 */
-  const addsCullection = async (ids: number[]) => {
-    const questionList = ids.map((id) => {
-      return {
-        carType: query.vehicle as CollectionAndWrongType.CarType,
-        km: query.name as CollectionAndWrongType.Km,
-        questionId: id,
-      };
-    });
-    collectionModel.adds(questionList);
-  };
-
-  /** 收藏当前题目 */
-  const addCurrentQuestion = async () => {
-    const res = await collectionModel.adds([
-      {
-        carType: query.vehicle as CollectionAndWrongType.CarType,
-        km: query.name as CollectionAndWrongType.Km,
-        questionId: currentSubject.value.id,
-      },
-    ]);
-    if (res.data == 1) {
-      currentSubject.value.isCollection = true;
-      Notify({ type: "success", message: "收藏成功" });
-    } else {
-      currentSubject.value.isCollection = true;
-      Notify({ type: "primary", message: res.msg });
-    }
-  };
-  /**
-   * 选择答案后进行校验
-   */
-  const userAnswerChange = () => {
-    currentSubject.value.optsBack = currentSubject.value.opts.map(
-      (val: String) => {
-        let status;
-        if (currentSubject.value.answer.includes(val)) {
-          status = 1;
-        } else {
-          status = 0;
-        }
-        if (currentSubject.value.userAnswer.includes(val)) {
-          status += 2;
-        }
-        return { opt: val, status };
-      }
-    );
-    if (
-      JSON.stringify(currentSubject.value.answer) ==
-      JSON.stringify(currentSubject.value.userAnswer)
-    ) {
-      //答案正确
-      currentSubject.value.isTrue = true;
-      trueNum.value++;
-      if (isJumpNext.value) {
-        nextTick(() => {
-          nextSubject();
-        });
-      }
-    } else {
-      //答案错误
-      wrongModel.adds([
-        {
-          carType: query.vehicle as CollectionAndWrongType.CarType,
-          km: query.name as CollectionAndWrongType.Km,
-          questionId: currentSubject.value.id,
-        },
-      ]);
-      currentSubject.value.isTrue = false;
-      falseNum.value++;
-    }
-  };
-
-  return {
-    trueNum,
-    falseNum,
-    isJumpNext,
-    userAnswerChange,
-    addCurrentQuestion,
-  };
-};
-
-export const useSubjectShowLogic = () => {
-  const {
-    subjectList,
-    subjectTotal,
-    loadNewSubject,
-    currentSubject,
-    currentSubjectIndex,
-  } = useSubjectList(); //获取题目列表
-
-  const nextBtnState = ref(true); //下一题数据请求锁
-
-  /** 展示下一题 */
-  const nextSubject = async () => {
-    if (currentSubjectIndex.value < subjectList.value.length - 1) {
-      currentSubjectIndex.value++;
-    } else {
-      if (nextBtnState.value) {
-        //禁用下一题按钮
-        nextBtnState.value = false;
-        //题目数量不足加载数据
-        await loadNewSubject();
-        //启用按钮
-        nextBtnState.value = true;
-      }
-    }
-  };
-
-  /** 展示上一题  */
-  const lastSubject = () => {
-    if (currentSubjectIndex.value > 0) {
-      currentSubjectIndex.value--;
-    }
-  };
-
-  const {
-    trueNum,
-    falseNum,
-    isJumpNext,
-    userAnswerChange,
-    addCurrentQuestion,
-  } = useSubjectCheck(currentSubject, nextSubject);
-
-  return {
-    currentSubject,
-    currentSubjectIndex,
-    subjectTotal,
-    nextSubject,
-    lastSubject,
-    trueNum,
-    falseNum,
-    isJumpNext,
-    userAnswerChange,
-    addCurrentQuestion,
-  };
-};

+ 0 - 0
src/dataModel/cashOut.ts → src/model/cashOut.ts


+ 0 - 0
src/dataModel/collection.ts → src/model/collection.ts


+ 0 - 0
src/dataModel/myBranchList.ts → src/model/myBranchList.ts


+ 0 - 0
src/dataModel/test.ts → src/model/test.ts


+ 0 - 4
src/route/guard.ts

@@ -13,10 +13,6 @@ const guard = (router: Router) => {
 			return;
 		}
 
-		if (true) {
-			console.log(location);
-		}
-
 		//监听到登陆事件
 		if (to.query.state === "LOGIN") {
 			const toast = Toast.loading({

+ 1 - 1
src/views/cashOut/components/cashout.vue

@@ -18,7 +18,7 @@
 
 <script lang="ts">
 	import { Toast } from "vant";
-	import { CashOutModel } from "@/dataModel/cashOut";
+	import { CashOutModel } from "@/model/cashOut";
 	const cashOutModel = new CashOutModel();
 	const useCashout = () => {
 		const amount = ref<number>();

+ 1 - 1
src/views/cashOut/index.vue

@@ -37,7 +37,7 @@
 </template>
 
 <script lang="ts">
-	import { CashOutModel } from "@/dataModel/cashOut";
+	import { CashOutModel } from "@/model/cashOut";
 	import { ref, onBeforeMount } from "vue";
 	const cashOutModel = new CashOutModel();
 

+ 240 - 286
src/views/collection/components/list.vue

@@ -1,311 +1,265 @@
 <template>
-  <div class="listcom-box">
-    <div class="list-box">
-      <van-checkbox-group v-model="checked" ref="checkboxGroup">
-        <van-cell-group>
-          <van-pull-refresh v-model="refreshing" @refresh="onLoad">
-            <van-list
-              v-model="loading"
-              :finished="finished"
-              finished-text="没有更多了"
-              @load="onLoad"
-            >
-              <van-swipe-cell
-                v-for="(item, index) in list"
-                :key="index"
-                :disabled="isChoose"
-              >
-                <van-cell
-                  class="cell-box"
-                  clickable
-                  :title="`${item.id}. ${item.issue}`"
-                  @click="goWrongReview(item.id)"
-                >
-                  <template #icon v-if="isChoose">
-                    <van-checkbox :name="item.id" class="checkbox" />
-                  </template>
-                </van-cell>
-                <template #right>
-                  <van-button
-                    square
-                    style="height: 100%"
-                    type="danger"
-                    text="删除"
-                    @click="deleteClick(item.id)"
-                  />
-                  <van-button
-                    square
-                    style="height: 100%"
-                    type="primary"
-                    text="收藏"
-                    @click="collectionClick(item.id)"
-                    v-if="props.type == 'wrong'"
-                  />
-                </template>
-              </van-swipe-cell>
-            </van-list>
-          </van-pull-refresh>
-        </van-cell-group>
-      </van-checkbox-group>
-    </div>
-    <div class="bottom-cell">
-      <div>
-        <span v-if="!isChoose" @click="isChoose = true">批量选中</span>
-        <div class="choose" v-else>
-          <van-checkbox v-model="isSelectAll">全选</van-checkbox>
-          <span
-            @click="
-              isChoose = false;
-              unSelectAll();
-            "
-            >取消</span
-          >
-        </div>
-      </div>
-      <div>
-        <div class="operate">
-          <van-button
-            round
-            type="danger"
-            size="small"
-            :disabled="checked.length == 0"
-            @click="deletesClick"
-            >删除选中</van-button
-          >
-          <van-button
-            round
-            type="primary"
-            size="small"
-            :disabled="checked.length == 0"
-            @click="collectionClick"
-            v-if="props.type == 'wrong'"
-            >移入收藏夹</van-button
-          >
-        </div>
-      </div>
-    </div>
-  </div>
+	<div class="listcom-box">
+		<div class="list-box">
+			<van-checkbox-group v-model="checked" ref="checkboxGroup">
+				<van-cell-group>
+					<van-pull-refresh v-model="refreshing" @refresh="onLoad">
+						<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
+							<van-swipe-cell v-for="(item, index) in list" :key="index" :disabled="isChoose">
+								<van-cell class="cell-box" clickable :title="`${item.id}. ${item.issue}`" @click="goWrongReview(item.id)">
+									<template #icon v-if="isChoose">
+										<van-checkbox :name="item.id" class="checkbox" />
+									</template>
+								</van-cell>
+								<template #right>
+									<van-button square style="height: 100%" type="danger" text="删除" @click="deleteClick(item.id)" />
+									<van-button square style="height: 100%" type="primary" text="收藏" @click="collectionClick(item.id)" v-if="props.type == 'wrong'" />
+								</template>
+							</van-swipe-cell>
+						</van-list>
+					</van-pull-refresh>
+				</van-cell-group>
+			</van-checkbox-group>
+		</div>
+		<div class="bottom-cell">
+			<div>
+				<span v-if="!isChoose" @click="isChoose = true">批量选中</span>
+				<div class="choose" v-else>
+					<van-checkbox v-model="isSelectAll">全选</van-checkbox>
+					<span
+						@click="
+							isChoose = false;
+							unSelectAll();
+						"
+						>取消</span
+					>
+				</div>
+			</div>
+			<div>
+				<div class="operate">
+					<van-button round type="danger" size="small" :disabled="checked.length == 0" @click="deletesClick">删除选中</van-button>
+					<van-button round type="primary" size="small" :disabled="checked.length == 0" @click="collectionClick" v-if="props.type == 'wrong'">移入收藏夹</van-button>
+				</div>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script lang="ts">
-import { CollectionModel } from "@/dataModel/collection";
-import { RouterBus } from "@/hooks";
-/**
- * 列表hook
- */
-const useQuestionList = (type: CollectionAndWrongType.type) => {
-  const collectionModel = new CollectionModel(type);
-  const questionList = ref<Test.QuestionInfo[]>([]);
-  const collectionList = ref<CollectionAndWrongType.QuestionRes[]>([]);
-  const {
-    route: { query },
-  } = new RouterBus();
+	import { CollectionModel } from "@/model/collection";
+	import { RouterBus } from "@/hooks";
+	/**
+	 * 列表hook
+	 */
+	const useQuestionList = (type: CollectionAndWrongType.type) => {
+		const collectionModel = new CollectionModel(type);
+		const questionList = ref<Test.QuestionInfo[]>([]);
+		const collectionList = ref<CollectionAndWrongType.QuestionRes[]>([]);
+		const {
+			route: { query },
+		} = new RouterBus();
 
-  const total = ref(0);
-  const pageNum = ref(1);
-  const pageSize = ref(20);
-  /** 刷新数据 */
-  const refreshing = ref(false);
-  /**加载中 */
-  const loading = ref(false);
-  /**数据是否全部加载完成 */
-  const finished = ref(false);
+		const total = ref(0);
+		const pageNum = ref(1);
+		const pageSize = ref(20);
+		/** 刷新数据 */
+		const refreshing = ref(false);
+		/**加载中 */
+		const loading = ref(false);
+		/**数据是否全部加载完成 */
+		const finished = ref(false);
 
-  /** 删除已收藏的问题 */
-  const deletes = async (ids: number[]) => {
-    const res = await collectionModel.deletes(ids, collectionList.value);
-    //乐观删除本地数据
-    questionList.value = questionList.value.filter(
-      (item) => !ids.includes(item.id)
-    );
-  };
+		/** 删除已收藏的问题 */
+		const deletes = async (ids: number[]) => {
+			const res = await collectionModel.deletes(ids, collectionList.value);
+			//乐观删除本地数据
+			questionList.value = questionList.value.filter((item) => !ids.includes(item.id));
+		};
 
-  /** 加入收藏 */
-  const addsCollection = async (ids: number[]) => {
-    const list = collectionList.value.filter((item) =>
-      ids.includes(item.questionId)
-    );
-    const params = list.map((item) => {
-      return {
-        carType: item.carType,
-        km: item.km,
-        questionId: item.questionId,
-      };
-    });
-    const collectionModel = new CollectionModel("collection");
-    const res = await collectionModel.adds(params);
-    //收藏成功则删除错题
-    // if (res.data == 1) {
-    deletes(ids);
-    // }
-  };
+		/** 加入收藏 */
+		const addsCollection = async (ids: number[]) => {
+			const list = collectionList.value.filter((item) => ids.includes(item.questionId));
+			const params = list.map((item) => {
+				return {
+					carType: item.carType,
+					km: item.km,
+					questionId: item.questionId,
+				};
+			});
+			const collectionModel = new CollectionModel("collection");
+			const res = await collectionModel.adds(params);
+			//收藏成功则删除错题
+			// if (res.data == 1) {
+			deletes(ids);
+			// }
+		};
 
-  /**获取下一页数据 */
-  const onLoadData = async () => {
-    if (loading.value) return;
-    loading.value = true;
-    if (refreshing.value) {
-      collectionList.value = [];
-      questionList.value = [];
-      pageNum.value = 1;
-      refreshing.value = false;
-    }
-    const res = await collectionModel.getList({
-      carType: query.vehicle as CollectionAndWrongType.CarType,
-      km: query.name as CollectionAndWrongType.Km,
-      pageNum: pageNum.value,
-      pageSize: pageSize.value,
-    });
-    total.value = res.total;
-    collectionList.value.push(...res.collectionList);
-    questionList.value.push(...res.rows);
-    loading.value = false;
-    finished.value = questionList.value.length >= total.value;
-    pageNum.value++;
-  };
+		/**获取下一页数据 */
+		const onLoadData = async () => {
+			if (loading.value) return;
+			loading.value = true;
+			if (refreshing.value) {
+				collectionList.value = [];
+				questionList.value = [];
+				pageNum.value = 1;
+				refreshing.value = false;
+			}
+			const res = await collectionModel.getList({
+				carType: query.vehicle as CollectionAndWrongType.CarType,
+				km: query.name as CollectionAndWrongType.Km,
+				pageNum: pageNum.value,
+				pageSize: pageSize.value,
+			});
+			total.value = res.total;
+			collectionList.value.push(...res.collectionList);
+			questionList.value.push(...res.rows);
+			loading.value = false;
+			finished.value = questionList.value.length >= total.value;
+			pageNum.value++;
+		};
 
-  return {
-    questionList,
-    deletes,
-    finished,
-    loading,
-    onLoadData,
-    refreshing,
-    addsCollection,
-  };
-};
+		return {
+			questionList,
+			deletes,
+			finished,
+			loading,
+			onLoadData,
+			refreshing,
+			addsCollection,
+		};
+	};
 </script>
 
 <script setup lang="ts">
-import { ref, watch } from "vue";
+	import { ref, watch } from "vue";
 
-const { goWrongReview } = new RouterBus();
+	const { goWrongReview } = new RouterBus();
 
-interface Props {
-  type: "wrong" | "collection";
-}
+	interface Props {
+		type: "wrong" | "collection";
+	}
 
-const props = withDefaults(defineProps<Props>(), {});
+	const props = withDefaults(defineProps<Props>(), {});
 
-//当前视图事务
-const {
-  questionList: list, //题目列表
-  finished, //是否全部加载完成
-  refreshing /** 重载状态 */,
-  loading /**显示加载状态 */,
-  onLoadData: onLoad /**加载数据 */,
-  deletes, //批量删除
-  addsCollection, //加入收藏,移除错题
-} = useQuestionList(props.type);
+	//当前视图事务
+	const {
+		questionList: list, //题目列表
+		finished, //是否全部加载完成
+		refreshing /** 重载状态 */,
+		loading /**显示加载状态 */,
+		onLoadData: onLoad /**加载数据 */,
+		deletes, //批量删除
+		addsCollection, //加入收藏,移除错题
+	} = useQuestionList(props.type);
 
-const isChoose = ref(false); //开启批量选中
-const isSelectAll = ref(false); //是否全选
-const checked = ref([]); //选中内容
-const checkboxGroup = ref(); //多选框组件实例
-const isType = ref(0); //0错题 1收藏
-//选择全选
-watch(isSelectAll, (value) => {
-  if (value) {
-    selectAll();
-  } else {
-    unSelectAll();
-  }
-});
-// //全选状态改变
-watch(checked, (val) => {
-  if (val.length == 0) {
-    isSelectAll.value = false;
-  }
-  if (val.length === list.value.length) {
-    isSelectAll.value = true;
-  }
-});
-//全选
-const selectAll = () => {
-  checkboxGroup.value.toggleAll(true);
-};
-//取消全选
-const unSelectAll = () => {
-  checked.value = [];
-};
-//单个删除
-const deleteClick = (id: number) => {
-  deletes([id]);
-};
-//批量删除
-const deletesClick = () => {
-  deletes(checked.value);
-};
+	const isChoose = ref(false); //开启批量选中
+	const isSelectAll = ref(false); //是否全选
+	const checked = ref([]); //选中内容
+	const checkboxGroup = ref(); //多选框组件实例
+	const isType = ref(0); //0错题 1收藏
+	//选择全选
+	watch(isSelectAll, (value) => {
+		if (value) {
+			selectAll();
+		} else {
+			unSelectAll();
+		}
+	});
+	// //全选状态改变
+	watch(checked, (val) => {
+		if (val.length == 0) {
+			isSelectAll.value = false;
+		}
+		if (val.length === list.value.length) {
+			isSelectAll.value = true;
+		}
+	});
+	//全选
+	const selectAll = () => {
+		checkboxGroup.value.toggleAll(true);
+	};
+	//取消全选
+	const unSelectAll = () => {
+		checked.value = [];
+	};
+	//单个删除
+	const deleteClick = (id: number) => {
+		deletes([id]);
+	};
+	//批量删除
+	const deletesClick = () => {
+		deletes(checked.value);
+	};
 
-//单个收藏
-const collectionClick = (id: number) => {
-  addsCollection([id]);
-};
-//批量收藏
-const collectionsClick = () => {
-  addsCollection(checked.value);
-};
+	//单个收藏
+	const collectionClick = (id: number) => {
+		addsCollection([id]);
+	};
+	//批量收藏
+	const collectionsClick = () => {
+		addsCollection(checked.value);
+	};
 </script>
 
 <style lang="scss" scoped>
-.listcom-box {
-  height: calc(100vh - 50px);
-  display: flex;
-  flex-direction: column;
-}
+	.listcom-box {
+		height: calc(100vh - 50px);
+		display: flex;
+		flex-direction: column;
+	}
 
-.list-box {
-  flex-grow: 1;
-  overflow-y: auto;
-  .cell-box {
-    min-height: 70px;
-  }
-}
-.checkbox {
-  margin-right: 5px;
-}
-.bottom-cell {
-  flex-shrink: 0;
-  border-top: 1px solid #bdbaba;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 100vw;
-  height: 50px;
-  box-sizing: border-box;
-  font-size: 13px;
-  font-weight: 400;
-  font-family: PingFang SC;
-  background-color: #ffffff;
-  padding: 10px 15px;
-  .choose {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    width: 100px;
-  }
-  .operate {
-    display: flex;
-    justify-content: space-between;
+	.list-box {
+		flex-grow: 1;
+		overflow-y: auto;
+		.cell-box {
+			min-height: 70px;
+		}
+	}
+	.checkbox {
+		margin-right: 5px;
+	}
+	.bottom-cell {
+		flex-shrink: 0;
+		border-top: 1px solid #bdbaba;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		width: 100vw;
+		height: 50px;
+		box-sizing: border-box;
+		font-size: 13px;
+		font-weight: 400;
+		font-family: PingFang SC;
+		background-color: #ffffff;
+		padding: 10px 15px;
+		.choose {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			width: 100px;
+		}
+		.operate {
+			display: flex;
+			justify-content: space-between;
 
-    span {
-      height: 30px;
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      color: #ffffff;
-      border-radius: 15px;
+			span {
+				height: 30px;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				color: #ffffff;
+				border-radius: 15px;
 
-      &:nth-of-type(1) {
-        background-color: #ff4d53;
-      }
-      &:active {
-        filter: brightness(50%);
-      }
-      &:nth-of-type(2) {
-        background-color: #498ef5;
-      }
-    }
-  }
-}
+				&:nth-of-type(1) {
+					background-color: #ff4d53;
+				}
+				&:active {
+					filter: brightness(50%);
+				}
+				&:nth-of-type(2) {
+					background-color: #498ef5;
+				}
+			}
+		}
+	}
 </style>

+ 110 - 129
src/views/myBranch/index.vue

@@ -1,141 +1,122 @@
 <template>
-  <div class="header-back">
-    <m-nav-bar :transparent="true" title="我的下级" style="color: #ffffff" />
-    <div class="user-data">
-      <m-user-avatar />
-      <m-user-name />
-    </div>
-  </div>
-  <van-tabs style="margin: -82px 10px; border-radius: 15px; overflow: hidden">
-    <van-tab
-      :title="item.title"
-      v-for="(item, index) in branchList"
-      :key="index"
-    >
-      <van-search
-        class="search"
-        shape="round"
-        placeholder="请输入下级代理昵称"
-        v-model="searchValue"
-      />
-      <div class="test-scores content-box">
-        <table class="table" v-if="item.userList.length > 0">
-          <tr>
-            <th>头像</th>
-            <th>昵称</th>
-            <th>绑定时间</th>
-          </tr>
-          <tr
-            v-for="(userInfo, index) in item.userList.filter((userInfo) =>
-              userInfo.nickName.includes(searchValue)
-            )"
-            :key="index"
-          >
-            <td>
-              <van-image
-                round
-                width="50px"
-                height="50px"
-                :src="userInfo.headImage"
-              />
-            </td>
-            <td>{{ userInfo.nickName }}</td>
-            <td>{{ userInfo.createTime }}</td>
-          </tr>
-        </table>
-        <div v-else style="text-align: center">暂无数据</div>
-      </div></van-tab
-    >
-  </van-tabs>
+	<div class="header-back">
+		<m-nav-bar :transparent="true" title="我的下级" style="color: #ffffff" />
+		<div class="user-data">
+			<m-user-avatar />
+			<m-user-name />
+		</div>
+	</div>
+	<van-tabs style="margin: -82px 10px; border-radius: 15px; overflow: hidden">
+		<van-tab :title="item.title" v-for="(item, index) in branchList" :key="index">
+			<van-search class="search" shape="round" placeholder="请输入下级代理昵称" v-model="searchValue" />
+			<div class="test-scores content-box">
+				<table class="table" v-if="item.userList.length > 0">
+					<tr>
+						<th>头像</th>
+						<th>昵称</th>
+						<th>绑定时间</th>
+					</tr>
+					<tr v-for="(userInfo, index) in item.userList.filter((userInfo) => userInfo.nickName.includes(searchValue))" :key="index">
+						<td>
+							<van-image round width="50px" height="50px" :src="userInfo.headImage" />
+						</td>
+						<td>{{ userInfo.nickName }}</td>
+						<td>{{ userInfo.createTime }}</td>
+					</tr>
+				</table>
+				<div v-else style="text-align: center">暂无数据</div>
+			</div></van-tab
+		>
+	</van-tabs>
 </template>
 
 <script lang="ts">
-import { MyBranchListModel } from "@/dataModel/myBranchList";
-import { ref, onBeforeMount } from "vue";
+	import { MyBranchListModel } from "@/model/myBranchList";
+	import { ref, onBeforeMount } from "vue";
 
-const useMyBranchList = () => {
-  const branchList = ref<BranchType.dataInfo[]>([]);
-  const myBranchListModel = new MyBranchListModel();
-  const setData = async () => {
-    const data = await myBranchListModel.getData();
-    branchList.value = data;
-  };
-  setData();
-  return {
-    branchList,
-  };
-};
+	const useMyBranchList = () => {
+		const branchList = ref<BranchType.dataInfo[]>([]);
+		const myBranchListModel = new MyBranchListModel();
+		const setData = async () => {
+			const data = await myBranchListModel.getData();
+			branchList.value = data;
+		};
+		setData();
+		return {
+			branchList,
+		};
+	};
 </script>
 
 <script lang="ts" setup>
-const { branchList } = useMyBranchList();
-const searchValue = ref("");
+	const { branchList } = useMyBranchList();
+	const searchValue = ref("");
 </script>
 
 <style scoped lang="scss">
-.header-back {
-  width: 375px;
-  padding-bottom: 82px;
-  background: linear-gradient(180deg, #498ef5 0%, #4da8e6 100%);
-  border-radius: 0px 0px 82px 82px;
-  .user-data {
-    display: flex;
-    flex-direction: column;
-    justify-content: space-between;
-    align-items: center;
-    padding: 19px 17px 24px;
-    font-size: 23px;
-    color: #ffffff;
-  }
-}
-.content-box {
-  width: 345px;
-  background: #ffffff;
-  box-shadow: 0px 0px 8px rgba(124, 129, 136, 0.2);
-  border-radius: 10px;
-  position: relative;
-  left: 50%;
-  transform: translateX(-50%);
-  margin-top: 10px;
-}
-.summary {
-  display: flex;
-  justify-content: space-around;
-  box-sizing: border-box;
-  overflow: hidden;
-  .search {
-    width: 100%;
-  }
-}
-.test-scores {
-  font-size: 13px;
-  font-family: PingFang SC;
-  font-weight: 400;
-  line-height: 19px;
-  color: #0a1a33;
-  padding: 15px;
-  box-sizing: border-box;
-  .table {
-    width: 100%;
-    border-collapse: collapse;
-    font-size: 13px;
-    th {
-      padding: 5px;
-      color: #0a1a33;
-    }
-    td {
-      text-align: center;
-      padding: 5px;
-      color: #8a9099;
-    }
-    tr {
-      &:nth-of-type(n) {
-        background: #ffffff;
-      }
-      &:nth-of-type(2n) {
-        background: rgba(73, 142, 245, 0.15);
-      }
-    }
-  }
-}
+	.header-back {
+		width: 375px;
+		padding-bottom: 82px;
+		background: linear-gradient(180deg, #498ef5 0%, #4da8e6 100%);
+		border-radius: 0px 0px 82px 82px;
+		.user-data {
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+			align-items: center;
+			padding: 19px 17px 24px;
+			font-size: 23px;
+			color: #ffffff;
+		}
+	}
+	.content-box {
+		width: 345px;
+		background: #ffffff;
+		box-shadow: 0px 0px 8px rgba(124, 129, 136, 0.2);
+		border-radius: 10px;
+		position: relative;
+		left: 50%;
+		transform: translateX(-50%);
+		margin-top: 10px;
+	}
+	.summary {
+		display: flex;
+		justify-content: space-around;
+		box-sizing: border-box;
+		overflow: hidden;
+		.search {
+			width: 100%;
+		}
+	}
+	.test-scores {
+		font-size: 13px;
+		font-family: PingFang SC;
+		font-weight: 400;
+		line-height: 19px;
+		color: #0a1a33;
+		padding: 15px;
+		box-sizing: border-box;
+		.table {
+			width: 100%;
+			border-collapse: collapse;
+			font-size: 13px;
+			th {
+				padding: 5px;
+				color: #0a1a33;
+			}
+			td {
+				text-align: center;
+				padding: 5px;
+				color: #8a9099;
+			}
+			tr {
+				&:nth-of-type(n) {
+					background: #ffffff;
+				}
+				&:nth-of-type(2n) {
+					background: rgba(73, 142, 245, 0.15);
+				}
+			}
+		}
+	}
 </style>

+ 1 - 1
src/views/myIntegral/components/settlement.ts

@@ -1,6 +1,6 @@
 import { mountComponent, useUnmountComponent } from "@/utils/mount-component";
 import Settlement from "./settlement.vue";
-import { BranchModel } from "@/dataModel/myBranchList";
+import { BranchModel } from "@/model/myBranchList";
 import { ref } from "vue";
 import { Toast } from "vant";
 import { useUpdateUserInfo } from "@/hooks";

+ 1 - 1
src/views/myIntegral/index.vue

@@ -33,7 +33,7 @@
 </template>
 
 <script lang="ts">
-	import { BranchModel } from "@/dataModel/myBranchList";
+	import { BranchModel } from "@/model/myBranchList";
 	import { ref, onBeforeMount } from "vue";
 
 	export type UserInfo = {