function isEmpty(obj) {
|
if (JSON.stringify(obj) === '{}') {
|
return true
|
}
|
return obj == "undefined" || obj == null || obj === "" || obj == {};
|
}
|
|
const baseUrl = 'http://127.0.0.1:9528'
|
|
async function getCompanyData() {
|
let _this = this,item = [];
|
var ress = await uni.request({
|
url: `${baseUrl}/dashboard/companyData/auth`,
|
header:{'token':uni.getStorageSync('token')},
|
}).then((res)=> {
|
res = res[1].data
|
if (res.code === 200) {
|
item = [
|
{name: '年度销售目标',content: res.data.yearTarget,unit: '万元'},
|
{name: '已完成销售任务',content: res.data.successMoney,unit: '万元'},
|
{name: '未完成销售任务',content: res.data.progressMoney,unit: '万元'},
|
{name: '完成率',content: res.data.yearTransactionRate,unit: '%'}
|
]
|
}
|
},(result)=>{
|
// console.log(res);
|
})
|
return item
|
}
|
|
module.exports = {
|
getCompanyData: getCompanyData
|
}
|