diff --git a/ruoyi-uih5/api/system/salary.js b/ruoyi-uih5/api/system/salary.js index 58da6bd..3a97ac3 100644 --- a/ruoyi-uih5/api/system/salary.js +++ b/ruoyi-uih5/api/system/salary.js @@ -4,7 +4,7 @@ import request from '@/utils/request' // 查询个人工资 export function getSalary(query) { return request({ - url: '/wx/emp/salary', + url: '/pay/wx/emp/salary', method: 'get', data: query }) @@ -13,7 +13,7 @@ export function getSalary(query) { // 查询月包活 export function getBaohuo(query) { return request({ - url: '/secure/wocheck/getbaohuo', + url: '/pay/wocheck/getbaohuo', method: 'get', data: query }) @@ -22,7 +22,7 @@ export function getBaohuo(query) { // 查询日工工时 export function listDwhours(query) { return request({ - url: '/wx/emp/dayWork', + url: '/pay/wx/emp/dayWork', method: 'get', data: query }) @@ -31,7 +31,7 @@ export function listDwhours(query) { // 查询月帮工 export function getBanggong(query) { return request({ - url: '/secure/wocheck/getbanggong', + url: '/pay/wocheck/getbanggong', method: 'get', data: query }) diff --git a/ruoyi-uih5/config.js b/ruoyi-uih5/config.js index a82a618..8008d63 100644 --- a/ruoyi-uih5/config.js +++ b/ruoyi-uih5/config.js @@ -1,6 +1,6 @@ // 应用全局配置 module.exports = { - baseUrl: 'http://172.16.9.9:8090', + baseUrl: 'https://payroll.ruanfa.com.cn/prod-api', // baseUrl: 'http://localhost:8090', // 应用信息 appInfo: { diff --git a/ruoyi-uih5/pages/baohuo.vue b/ruoyi-uih5/pages/baohuo.vue index 8cdf0bf..ecfd92b 100644 --- a/ruoyi-uih5/pages/baohuo.vue +++ b/ruoyi-uih5/pages/baohuo.vue @@ -138,9 +138,10 @@ methods: { getUser() { getUserProfile().then(response => { - this.user = response.data + this.user = response.data.user this.queryParams.empName = this.user.nickName this.queryParams.date = this.date + this.queryParams.tenantId = this.user.tenantId this.getBaohuolist(); this.getBgList(); }) @@ -151,6 +152,7 @@ this.user = {} this.queryParams.empName = '' this.queryParams.date = this.date + this.queryParams.tenantId = '' this.bhgongziList = [] this.baohuoList = [] this.bhhelpList = [] diff --git a/ruoyi-uih5/pages/daywork.vue b/ruoyi-uih5/pages/daywork.vue index 0e88889..d866a66 100644 --- a/ruoyi-uih5/pages/daywork.vue +++ b/ruoyi-uih5/pages/daywork.vue @@ -128,8 +128,9 @@ // 查询用户 getUser() { getUserProfile().then(response => { - this.user = response.data + this.user = response.data.user this.queryParams.empName = this.user.nickName + this.queryParams.tenantId = this.user.tenantId this.getDwhourslist(); }) }, @@ -138,6 +139,7 @@ this.date = e.detail.value; this.user = {} this.queryParams.empName = '' + this.queryParams.tenantId = '' this.queryParams.dwYearMonth = this.date this.dwhoursList = [] this.getUser(); diff --git a/ruoyi-uih5/pages/index.vue b/ruoyi-uih5/pages/index.vue index a19f091..634fe59 100644 --- a/ruoyi-uih5/pages/index.vue +++ b/ruoyi-uih5/pages/index.vue @@ -162,8 +162,9 @@ // 查询用户 getUser() { getUserProfile().then(response => { - this.user = response.data + this.user = response.data.user this.queryParams.employeeName = this.user.nickName + this.queryParams.tenantId = this.user.tenantId this.queryParams.year = new Date(this.date).toISOString().slice(0,4) this.queryParams.month = new Date(this.date).toISOString().slice(5,7) this.getSalarylist() @@ -176,6 +177,7 @@ this.queryParams.employeeName = '' this.queryParams.year = '' this.queryParams.month = '' + this.queryParams.tenantId='' this.salarylist = [] this.getUser() }, diff --git a/ruoyi-uih5/pages/login.vue b/ruoyi-uih5/pages/login.vue index 512b011..25ae1b4 100644 --- a/ruoyi-uih5/pages/login.vue +++ b/ruoyi-uih5/pages/login.vue @@ -64,7 +64,7 @@ this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled if (this.captchaEnabled) { this.codeUrl = 'data:image/gif;base64,' + res.data.img - this.loginForm.uuid = res.uuid + this.loginForm.uuid = res.data.uuid } }) }, diff --git a/ruoyi-uih5/pages/mine/index.vue b/ruoyi-uih5/pages/mine/index.vue index 15f4e68..0f8e2a5 100644 --- a/ruoyi-uih5/pages/mine/index.vue +++ b/ruoyi-uih5/pages/mine/index.vue @@ -107,6 +107,9 @@ return uni.getSystemInfoSync().windowHeight - 50 } }, + created() { + console.log(this.$store.state.user,55555) + }, methods: { handleToInfo() { this.$tab.navigateTo('/pages/mine/info/index') diff --git a/ruoyi-uih5/pages/mine/info/index.vue b/ruoyi-uih5/pages/mine/info/index.vue index 65c861a..cc51265 100644 --- a/ruoyi-uih5/pages/mine/info/index.vue +++ b/ruoyi-uih5/pages/mine/info/index.vue @@ -28,7 +28,7 @@ methods: { getUser() { getUserProfile().then(response => { - this.user = response.data + this.user = response.data.user this.roleGroup = response.roleGroup this.postGroup = response.postGroup }) diff --git a/ruoyi-uih5/store/modules/user.js b/ruoyi-uih5/store/modules/user.js index c1ec441..88c1a66 100644 --- a/ruoyi-uih5/store/modules/user.js +++ b/ruoyi-uih5/store/modules/user.js @@ -46,8 +46,8 @@ const user = { const uuid = userInfo.uuid return new Promise((resolve, reject) => { login(username, password, code, uuid).then(res => { - setToken(res.token) - commit('SET_TOKEN', res.token) + setToken(res.data.token) + commit('SET_TOKEN', res.data.token) resolve() }).catch(error => { reject(error) @@ -59,7 +59,7 @@ const user = { GetInfo({ commit, state }) { return new Promise((resolve, reject) => { getInfo().then(res => { - const user = res.user + const user = res.data.user const avatar = (user == null || user.avatar == "" || user.avatar == null) ? require("@/static/images/profile.jpg") : baseUrl + user.avatar const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName if (res.roles && res.roles.length > 0) {