问题遇到的现象和发生背景
request里对外部的info赋值不成功!!
问题相关代码,请勿粘贴截图
import {request} from "../network/request/request";
export function CententCheck(mail, title) {
const info = null;
request({
url: 'CententCheck',
params: {
mail: mail,
title: title,
}
}).then(res => {
if (res.data.success) {
if (res.data.data.length >= 1) {
this.info = true;
} else {
this.info = false;
}
} else {
console.log('数据库错误');
}
}).catch(err => {
console.log('api错误' + err);
})
return info;
}