async get_shopapp_mime_info() { let res = await shopapp_mime_info({}); console.log('shopapp_user_login res', res) if (res.code == 200) { this.user = res.data.appUser, this.writeOff = res.data.appUser.writeOff } uni.hideLoading(); }, async get_shopapp_ticket_Check() { if (this.writeOff === 0) { let params = { ticketNo: this.id, }; } }, 上面的 if (this.writeOff === 0) { let params = { ticketNo: this.id, }; } 的判断没起作用 ,正确的代码应该怎么写呢?
async get_shopapp_mime_info() { let res = await shopapp_mime_info({}); console.log('shopapp_user_login res', res) if (res.code == 200) { this.user = res.data.appUser, this.writeOff = res.data.appUser.writeOff } uni.hideLoading(); }, async get_shopapp_ticket_Check() { if (this.writeOff === 0) { let params = { ticketNo: this.id, }; } }, 上面的 if (this.writeOff === 0) { let params = { ticketNo: this.id, }; } 的判断没起作用 ,正确的代码应该怎么写呢?
async get_shopapp_mime_info() {
let res = await shopapp_mime_info({});
console.log('shopapp_user_login res', res)
if (res.code == 200) {
this.user = res.data.appUser,
this.writeOff = res.data.appUser.writeOff
}
uni.hideLoading();
},
async get_shopapp_ticket_Check() {
if (this.writeOff === 0) {
let params = {
ticketNo: this.id,
};
}
},
上面的 if (this.writeOff === 0) {
let params = {
ticketNo: this.id,
};
}
的判断没起作用 ,正确的代码应该怎么写呢?
用户834492313
2023年12月19日
|
浏览 138
根据您提供的代码,可以看出如果 this.writeOff 的值等于0时,需要执行一段逻辑。但是在给出的代码中,缺少了对应的逻辑部分。正确的代码应该是将逻辑部分补全,例如:
复制代码
async get_shopapp_ticket_Check() {
if (this.writeOff === 0) {
let params = {
ticketNo: this.id,
};
// 执行逻辑部分,例如发送请求或其他操作
// ...
}
}
请根据具体需求,在 if 条件满足时添加相应的逻辑代码。
我要提问
复制内容
分享给好友
AI编程问答网 免责声明:
以上内容除特别注明外均来源于网友提问,AI编程问答网回答,权益归原著者所有;
