这是js里的
publish1(){
console.log();
const {
type,
multiArray,
multiIndex,
name,
date,
region,
phone,
desc,
imgList,
} =this.data;
console.log();
db.collection('publish').add({
data:{
type,
classify1:multiArray[0][multiIndex[0]],
classify2:multiArray[1][multiIndex[1]],
name,
date,
region,
phone,
desc,
imgList
},
success:(res)=>{
console.log(res);
wx.switchTab({
url: '../index/index',
success:() => {
wx.showToast({
title: '发布成功',
})
}
})
}
})
},
这是wxml里的
<view class="body">
<view class="top">
<text>X</text>
<button size="mini" bindtap="publish1" class="publish-btn" >publish</button>
</view>
把fail函数放出来看看报什么错?