The Iview upload component ios mobile phone first clicks without translation, you need to click for a long time before you can call the mobile resources.

html

    <Upload name="userface" style=" cursor: pointer "
            :action="ApiTransfer("/User/SetUserFace")"
            :data="ApiTransfer("/User/SetUserFace",userFace)"
            :show-upload-list="false"
            :before-upload="handleBeforeUpload"
            :on-success="successfile"
                > 
        <div class="baseInfo">
            <span class="tx" >
                <img  :src="userFace" alt="">
                <!-- <img v-else :src="defaultTx"> -->
            </span>
             

</div> </Upload>

js
handleBeforeUpload (file) {

  var names = file.name.toLocaleUpperCase()
  if (names.indexOf(".PNG") > 0 || names.indexOf(".JPG") > 0 || names.indexOf(".JPEG") > 0) {
    this.userface = file.name
  } else {
    this.$Message.warning("JPGPNGJPEG")
    return false
  }
},
 successfile(res, file){
  console.log("",res)
  console.log("",file)
   if (res.Success) {
     this.$Message.success("")
     this.userFace = res.Description
     //this.pheiStatus=true
       let userInfo=JSON.parse(localStorage.getItem("userInfo")) 
      userInfo.head=this.userFace
      let _userInfo = JSON.stringify(userInfo)
      localStorage.setItem("userInfo",_userInfo)
      console.log("loca",localStorage.getItem("userInfo"))
    //  location.reload();
     //window.sessionStorage.setItem("headImg", this.userFace)
  }else{
    this.$Message.error(res.Description)
  }
},

       Vue.prototype.ApiTransfer = function(apiname, data) {
  console.log("url",configUrl)
  // false
  if (!apiname) {
    alert("apiname!")
    return
  }
  if (!data) return baseUrl + apiname
  if (!sessionStorage.accessToken)
    this.$router.push({
      path: "/login"
    })
  return Object.assign({}, data, {
    random: Math.random(),
    BridgePlatformName: BridgePlatformName,
    ApiName: apiname,
    accessToken: localStorage.accessToken,
    deviceToken: localStorage.deviceToken
  }) 
}
Aug.27,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37507-2b8d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37507-2b8d7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?