diff --git a/jsFile/tools.js b/jsFile/tools.js index c1251be..79e3bce 100644 --- a/jsFile/tools.js +++ b/jsFile/tools.js @@ -75,26 +75,6 @@ const tools = { return !reg_identity.test(identity); }, - /** - * @description 图片处理 - */ - handleImg(url) { - let imgUrl = ''; - if(url!==''){ - if(url.indexOf('jpg')!==-1 || url.indexOf('jpge')!==-1 || url.indexOf('png')!==-1 || url.indexOf('gif')!==-1){ - if(url.indexOf('https://')!==-1 || url.indexOf('http://')!==-1){ - let baseUrl = url.substring(url.indexOf('//')+2, url.length); - imgUrl = `${getApp().globalData.hostapi}`+baseUrl.substring(baseUrl.indexOf('/'), baseUrl.length); - }else{ - imgUrl = `${getApp().globalData.hostapi}`+url; - } - }else{ - imgUrl = url; - } - } - return imgUrl; - }, - /** * @description 手机号中间四位用"****"带替 */ diff --git a/pages/director/enter/enter.vue b/pages/director/enter/enter.vue index e9e9f16..6367e62 100644 --- a/pages/director/enter/enter.vue +++ b/pages/director/enter/enter.vue @@ -57,10 +57,11 @@ if(op.userType){ this.userType = op.userType; } + // 获取录入列表 + this.getEnterList(); }, onShow() { - // 获取录入列表 - this.getEnterList(); + }, onReachBottom() { if(this.enterList.length 工资总金额 - 合计:{{payInfo.amount?payInfo.amount:0}}元 + 合计:{{payInfo.amount>0?payInfo.amount:0}}元 基本工资 - {{payInfo.base_amount?payInfo.base_amount:0}}元 + {{payInfo.base_amount>0?payInfo.base_amount:0}}元 加班工资 - {{payInfo.overtime_amount?payInfo.overtime_amount:0}}元 + {{payInfo.overtime_amount>0?payInfo.overtime_amount:0}}元 待发工资 - {{payInfo.not_amount?payInfo.not_amount:0}}元 + {{payInfo.not_amount>0?payInfo.not_amount:0}}元 已发工资 - {{payInfo.done_amount?payInfo.done_amount:0}}元 + {{payInfo.done_amount>0?payInfo.done_amount:0}}元 @@ -110,10 +110,11 @@ if(op.userType){ this.userType = op.userType; } - }, - onShow() { // 获取工资列表 this.getPayList(); + }, + onShow() { + }, onReachBottom() { if(this.payList.length头像 @@ -58,15 +58,16 @@ appletName:'工地打卡', //小程序名称 isBindPhone: false, //是否绑定手机号 empowerShow:false, //是否显示授权弹窗 - isActive:false, //是否已授权 + isActive:false, //是否已授权 + baseHttps:`${getApp().globalData.hostapi}`, }; }, onLoad() { - + // 进入登录 + this.getUserProfileEv('enter'); }, onShow() { - // 进入登录 - this.getUserProfileEv('enter'); + }, methods: { // 设置logo图 @@ -122,7 +123,7 @@ }); this.$requst.upload('/api/v1/file/upload/image',{path:url}).then(res=>{ if(res.code==0) { - this.userInfo.avatarUrl = `${getApp().globalData.hostapi}`+res.data.src; + this.userInfo.avatarUrl = res.data.src; } uni.hideLoading(); }) diff --git a/pages/pagehome/pagehome.vue b/pages/pagehome/pagehome.vue index 8dcd166..a4c3dfb 100644 --- a/pages/pagehome/pagehome.vue +++ b/pages/pagehome/pagehome.vue @@ -1,7 +1,5 @@ -