代码优化
This commit is contained in:
parent
71cd6d5f9b
commit
d2d30ae968
|
|
@ -19,7 +19,7 @@ class HttpConfig {
|
|||
// baseUrl = "https://z.csgmall.com.cn/gl"
|
||||
// baseUrl = "http://192.168.2.160:39080" // 梁超
|
||||
// baseUrl = "http://192.168.2.218:39080" // 福
|
||||
target = "http://192.168.2.81:39080" // 开发阶段后台ip
|
||||
target = "http://192.168.0.56:21626" // 开发阶段后台ip
|
||||
// #endif
|
||||
// 基地址 (部署时使用 需要加 dev-api)
|
||||
// authPath = `${this.baseUrl}/dev-api/auth`
|
||||
|
|
|
|||
|
|
@ -393,6 +393,23 @@
|
|||
},
|
||||
onShow() {
|
||||
let that = this;
|
||||
that.$api.fetchMaterial
|
||||
.getDeptList()
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
// console.log(res, "获取单位和工程---");
|
||||
that.fetchedList = res.data.data;
|
||||
that.deptRange = res.data.data.map((item) => {
|
||||
return {
|
||||
text: item["unitName"],
|
||||
value: item["id"],
|
||||
};
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
console.log(uni.getStorageSync("userInfo").userid);
|
||||
console.log(uni.getStorageSync("userInfo").sysUser.companyId);
|
||||
// 初始化获取机具退料申请列表
|
||||
|
|
@ -423,11 +440,32 @@
|
|||
console.log(err);
|
||||
});
|
||||
// 初始化获取退料单位,退料工程列表
|
||||
|
||||
// that.$api.fetchMaterial
|
||||
// .getDeptList()
|
||||
// .then((res) => {
|
||||
// if (res.data.code == 200) {
|
||||
// console.log(res);
|
||||
// that.fetchedList = res.data.data;
|
||||
// that.deptRange = res.data.data.map((item) => {
|
||||
// return {
|
||||
// text: item["name"],
|
||||
// value: item["id"],
|
||||
// };
|
||||
// });
|
||||
// console.log(that.deptRange, "**************");
|
||||
// }
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
},
|
||||
onload() {
|
||||
that.$api.fetchMaterial
|
||||
.getDeptList()
|
||||
.then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
console.log(res);
|
||||
console.log(res, "获取单位和工程---");
|
||||
that.fetchedList = res.data.data;
|
||||
that.deptRange = res.data.data.map((item) => {
|
||||
return {
|
||||
|
|
@ -435,7 +473,6 @@
|
|||
value: item["id"],
|
||||
};
|
||||
});
|
||||
console.log(that.deptRange);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue