Uni-app + uview 个人信息页 修改用户昵称、性别、个性签名

Profile.vue >





mine.js > api

import $http from './request.js'
import {Decrypt} from'@/utils/aes/aes.js'
 
export default {
  //获取用户信息
  getUserInfo() {
    return $http.request({
      url: '/member/getInfo',
      method: 'GET',
      header:{
      	"Content-Type": "application/json",
      	"Authorization": Decrypt(uni.getStorageSync('token'))
      }
    })
  },
  //修改个人信息
  updateProfile({token,...params}){
    return $http.request({
    	url: '/member/update',
    	method: 'POST',
      data:{
        ...params
      },
    	header:{
    		"Content-Type": "application/json",
        "token":token,
        "Authorization":Decrypt(uni.getStorageSync('token'))
    	}
    })
  }  
}

你可能感兴趣的:(uni-app,uni-app)