ruoyi-ui/src/views/self/show.vue
@@ -686,7 +686,6 @@
      </div>
    </el-dialog>
  </div>
</template>
@@ -1259,18 +1258,22 @@
    getAutobiographyInfor()
    {
      let _this = this
      getCategory().then(response=>{
      getCategory().then(response => {
        // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
        //   _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
        // })
        response.data.itemValues.replace("{", "").replace("}", "").split(",").map(elem => {
          const label = elem.split(":")[0].trim();
          const value = parseInt(elem.split(":")[1].trim());
          _this.typeOptions.push({ "label": label, "value": value });
          // this.getSrc1(value)
        })
      })
          // 判断 typeOptions 数组中是否已存在相同的 value
          if (!_this.typeOptions.some(option => option.value === value)) {
            _this.typeOptions.push({ "label": label, "value": value });
          }
          // console.log(_this.typeOptions)
          // _this.getSrc1(value)
        });
      });
      // if(AutobiographyList.ageEnd==null){
      //   this.AgeEnd='?'
@@ -1438,6 +1441,7 @@
      // 刷新页面
      // window.location.reload();
    },
    //头像修改
    uploadImage() {
      const inputElement = document.createElement("input");
      inputElement.type = "file";