whycq
2023-12-01 6196d5efa014fc9d16227d5c77f20758c802715f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let network = uni.getStorageSync('Network')
let baseUrl = ''
if (network) {
    baseUrl = `http://${network[0].ip}:${network[0].port}/${network[0].address}`
}
async function addMat(matnr) {
    let that = this,item = {};
    var ress = await uni.request({
        url: `${baseUrl}/mat/auth`,
        header: {'token': uni.getStorageSync('token')},
        data: {matnr: matnr},
    }).then((result)=> {
        item = result.data
    },(res)=>{
        console.log(res);
    })
    return item
}
 
module.exports = {
    addMat: addMat,
}