|
@@ -12,13 +12,13 @@ const isArray = Array.isArray || function(obj) {
|
|
const getListByUserId = function() {
|
|
const getListByUserId = function() {
|
|
let baseUrlNew = config.def().baseUrlNew
|
|
let baseUrlNew = config.def().baseUrlNew
|
|
var userInfo = uni.getStorageSync("userInfo")
|
|
var userInfo = uni.getStorageSync("userInfo")
|
|
-
|
|
|
|
- console.log("------",userInfo)
|
|
|
|
- if(userInfo){
|
|
|
|
|
|
+
|
|
|
|
+ console.log("------", userInfo)
|
|
|
|
+ if (userInfo) {
|
|
uni.request({
|
|
uni.request({
|
|
url: baseUrlNew + '/roleMenu/query/getListByUserId',
|
|
url: baseUrlNew + '/roleMenu/query/getListByUserId',
|
|
data: {
|
|
data: {
|
|
- userId: userInfo.id?userInfo.id:userInfo.data.id
|
|
|
|
|
|
+ userId: userInfo.id ? userInfo.id : userInfo.data.id
|
|
},
|
|
},
|
|
method: 'GET',
|
|
method: 'GET',
|
|
success: (res) => {
|
|
success: (res) => {
|
|
@@ -26,7 +26,7 @@ const getListByUserId = function() {
|
|
uni.setStorageSync("jurisdiction", res.data.data)
|
|
uni.setStorageSync("jurisdiction", res.data.data)
|
|
let list = getUserAllRoles(res.data.data);
|
|
let list = getUserAllRoles(res.data.data);
|
|
uni.setStorageSync("rolesList", list)
|
|
uni.setStorageSync("rolesList", list)
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -65,6 +65,23 @@ const setAudit = (item) => {
|
|
console.log(item)
|
|
console.log(item)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//获取当天日期
|
|
|
|
+const getNowFormatDate = () => {
|
|
|
|
+ var date = new Date();
|
|
|
|
+ var seperator1 = "-";
|
|
|
|
+ var year = date.getFullYear();
|
|
|
|
+ var month = date.getMonth() + 1;
|
|
|
|
+ var strDate = date.getDate();
|
|
|
|
+ if (month >= 1 && month <= 9) {
|
|
|
|
+ month = "0" + month;
|
|
|
|
+ }
|
|
|
|
+ if (strDate >= 0 && strDate <= 9) {
|
|
|
|
+ strDate = "0" + strDate;
|
|
|
|
+ }
|
|
|
|
+ var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
|
|
+ return currentdate;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -74,5 +91,6 @@ export default {
|
|
isArray,
|
|
isArray,
|
|
erpWarehouse,
|
|
erpWarehouse,
|
|
getListByUserId,
|
|
getListByUserId,
|
|
- setAudit
|
|
|
|
|
|
+ setAudit,
|
|
|
|
+ getNowFormatDate
|
|
}
|
|
}
|