problem description
how does WeChat Mini Programs request the interface successfully and then call the interface forwarded by Wechat
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)
<button formType="submit" wx:if="{{executorDtata.length==1}}" open-type="share"></button>
create:function(e){
console.log("2222222")
var that = this;
if (this.data.taskContent.replace(/\s+/g, "")){
wx.request({
url: getApp().globalData.url + "/createTack",
data: {
groupId: getApp().globalData.groupId,
isRepeat: this.data.listNoId ? 1 : 0,
taskContent: this.data.taskContent,
executeUserId: this.data.executorZid,
remindUserIds: this.data.remindNoZid,
remindTime: this.data.time,
remindWeek: this.data.listNoId,
flag: this.data.executorDtata.length > 1 ? 0 : 1
},
header: {
Authorization: getApp().globalData.token,
// formId: e.detail.formId
formId: 1
},
success: function (res) {
if (res.data.code == 100) {
that.onShareAppMessage()
}
}
})
}else{
wx.showToast({
title: "",
duration: 1000,
icon: "none"
})
}
},
onShareAppMessage: function(ops) {
if (ops.from === "button") {
console.log("1111111111")
return {
title: "",
desc: "",
path: "/pages/join/join?inviteUserId=" + this.data.shareZid + "&groupId=" + this.data.shareGroupId,
imageUrl: "../../images/userimg.jpg",
success: (res) => {
wx.reLaunch({
url: "../task/task",
})
},
fail: (res) => {
console.log("", JSON.stringify(res));
}
}
}
},
what result do you expect? What is the error message actually seen?