我是一個產(chǎn)品,不會寫代碼,我增加了微信頭像獲取和圖片上傳和下載的隱私協(xié)議,目前已通過,我想問下,小程序上我加了一個彈窗獲取頭像圖片并上傳,采取調(diào)用uploadImageOne方法,為什么報錯,需要怎么處理
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
["components/eidtUserModal/index"], {
'00fc':function(){
Component({
/**
* 組件的屬性列表
*/
properties: {
hide: {
type: Boolean,
value: true
}
},
/**
* 組件的初始數(shù)據(jù)
*/
data(){
return{
mp_is_new: this.$Cache.get("MP_VERSION_ISNEW") || !1,
userInfo: {
avatar: "",
nickname: ""
},
canvasStatus: !1
}
},
/**
* 組件的方法列表
*/
methods: {
mounted: function() {},
// 調(diào)用頭像
onChooseAvatar(t) {
this.setData({avatar:t.detail.avatarUrl})
var a = this,
n = t.detail.avatarUrl;
this.$util.uploadImageOne("upload/image",
n, (function(t) {
a.userInfo.avatar = t.data.url
}), (function(t) {}))
// n, (function(t) {
// a.userInfo.avatar = t.data.url
// }), (function(t) {}))
},
// 調(diào)用昵稱
bindblur(e){
this.nickname = e.detail.value;
},
formSubmit: function(e) {
var c = this;var p = this;
if(avatar){
console.log('===================')
}
},
// 取消授權(quán)跳轉(zhuǎn)到個人中心頁面
hidepopup:function(e){
if(e.target.dataset.canclose){
console.log(e.target.dataset.canclose)
this.setData({
hide:true});
wx.navigateBack();
}}
}
})
}
},
[
["00fc", "common/runtime", "common/vendor"]
]
]);