zhangwei
2025-07-23 4157b22112dd8d87e907d9cb6d14f74b5d454b7a
src/views/mine/index.vue
@@ -23,7 +23,7 @@
const isLoading = ref(false);
const showDialog = ref(false);
const state = reactive({
  userInfo: {},
  userInfo: useUserStoreHook().enterpriseInfo,
  headers: {
    // Accept: "application/json, text/plain, */*",
    // "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
@@ -188,17 +188,21 @@
  showDialog: false
});
onMounted(async () => {
  let res = await cusExtendInfo();
  if (res.code == 200) {
    state.userInfo = res.result;
    state.userInfo.enterpriseTypeName = res.result.enterpriseType;
    state.ruleForm = res.result;
    state.ruleForm.enterpriseType = state.ruleForm.enterpriseType.split(",");
  } else {
    message(res.message, {
      type: "error"
    });
  }
  // let res = await useUserStoreHook().getCusExtendInfo();
  // if (res.code == 200) {
  //   state.userInfo = res.result;
  //   state.userInfo.enterpriseTypeName = res.result.enterpriseType;
  //   state.ruleForm = res.result;
  //   state.ruleForm.enterpriseType = state.ruleForm.enterpriseType.split(",");
  // } else {
  //   message(res.message, {
  //     type: "error"
  //   });
  // }
  state.ruleForm = cloneDeep(state.userInfo);
  console.log(state.userInfo);
  state.ruleForm.enterpriseType = state.ruleForm.enterpriseType.split(",");
  let nowRole = useUserStoreHook()?.exRoles;
  if (nowRole.length >= 1 && !route.query.code) {
    state.ruleForm.transactionCode = nowRole[0].code;
@@ -328,6 +332,7 @@
  let res = await changeCusExtend(obj);
  if (res.code == "200") {
    showDialog.value = false;
    await useUserStoreHook().getCusExtendInfo();
    message("修改成功!", {
      type: "success"
    });
@@ -379,7 +384,7 @@
      <template #label>
        <div class="cell-item">企业类型</div>
      </template>
      {{ state.userInfo.enterpriseTypeName }}
      {{ state.userInfo.enterpriseType }}
    </el-descriptions-item>
    <el-descriptions-item>
      <template #label>