修正IOS登录错误
This commit is contained in:
@@ -58,9 +58,15 @@ Page({
|
|||||||
|
|
||||||
console.log("用户名: "+random_username);
|
console.log("用户名: "+random_username);
|
||||||
|
|
||||||
|
// 复制本地图片到用户数据路径,如果文件不存在,先复制
|
||||||
|
const UpLoadfilePath = wx.env.USER_DATA_PATH + '/defaultAvatar.png';
|
||||||
|
try {wx.getFileSystemManager().accessSync(UpLoadfilePath);}
|
||||||
|
catch (e) {
|
||||||
|
wx.getFileSystemManager().copyFileSync('static/image/defaultAvatar.png', UpLoadfilePath);
|
||||||
|
}
|
||||||
|
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
filePath: "static/image/defaultAvatar.png",
|
filePath: UpLoadfilePath,
|
||||||
name: "HeadIconKey",
|
name: "HeadIconKey",
|
||||||
url: getApp().globalData.BaseURL+'/API/ApiChangeUserInfo.php',
|
url: getApp().globalData.BaseURL+'/API/ApiChangeUserInfo.php',
|
||||||
formData:{
|
formData:{
|
||||||
|
|||||||
Reference in New Issue
Block a user