From aa608d0eacaf83c05c3cee9f9362e3b232562d3b Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Tue, 18 Mar 2025 10:40:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.wxss | 7 +- components/bottom-drawer/index.js | 6 +- components/job-sub/index.wxml | 4 +- pages/detail/index.wxml | 4 +- pages/firstBill/index.js | 1 + pages/firstBill/index.wxml | 3 +- pages/listSharePage/index.wxml | 2 +- pages/message/index.js | 40 ++------- pages/message/index.wxml | 2 +- pages/mine/index.wxml | 4 +- pages/userDetail/index.js | 181 +++++++++++++++++++++++++++----------- pages/userDetail/index.json | 3 + pages/userDetail/index.wxml | 121 ++++++++++++++++--------- pages/userDetail/index.wxss | 1 + project.config.json | 2 +- subPage/todayBill/index.js | 3 +- subPage/todayBill/index.json | 2 +- subPage/todayBill/index.wxml | 8 +- 18 files changed, 252 insertions(+), 142 deletions(-) diff --git a/app.wxss b/app.wxss index e2e78db..e4414ef 100644 --- a/app.wxss +++ b/app.wxss @@ -251,7 +251,12 @@ page { .pr8 { padding-right: 8px; } - +.pt4 { + padding-top: 4px; +} +.pt6 { + padding-top: 6px; +} .pt8 { padding-top: 8px; } diff --git a/components/bottom-drawer/index.js b/components/bottom-drawer/index.js index c3f880e..94e4519 100644 --- a/components/bottom-drawer/index.js +++ b/components/bottom-drawer/index.js @@ -94,9 +94,9 @@ Component({ }, hideLeft () { // this.data.show = false - // this.setData({ - // show: false - // }) + this.setData({ + show: false + }) var eventDetail = { type: this.data.drawerType }; diff --git a/components/job-sub/index.wxml b/components/job-sub/index.wxml index 7bceb16..38868e8 100644 --- a/components/job-sub/index.wxml +++ b/components/job-sub/index.wxml @@ -7,9 +7,9 @@ - + - {{item.jobName || item.aliasName}} + {{item.jobName || item.aliasName}} {{item.update}} diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index 29d5f8c..236bb92 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -49,9 +49,9 @@ - + {{jobDetail.record.jobName}} - {{jobDetail.record.update}} + {{jobDetail.record.update}} diff --git a/pages/firstBill/index.js b/pages/firstBill/index.js index 87a34b0..dac0f9a 100644 --- a/pages/firstBill/index.js +++ b/pages/firstBill/index.js @@ -10,6 +10,7 @@ import { } from '../../utils/request.js' Page({ data: { + appId: app.globalData.appId, isSwiper: true, toped: "1", jobNum: 0, // 48小时更新职位数 diff --git a/pages/firstBill/index.wxml b/pages/firstBill/index.wxml index 6159e12..b8ee45b 100644 --- a/pages/firstBill/index.wxml +++ b/pages/firstBill/index.wxml @@ -1081,7 +1081,8 @@ - + + - + {{searchCityParamStorage.name == '' ? '全国' : searchCityParamStorage.shortName}} diff --git a/pages/message/index.js b/pages/message/index.js index 7b1fb50..cbebb31 100644 --- a/pages/message/index.js +++ b/pages/message/index.js @@ -29,36 +29,8 @@ Page({ content: '按偏好订阅每日接收推送', time: '下午 1:30', }, - // { - // title: '发单助手', - // url: '/subPage/todayBill/index', - // img: '../../assets/images/fadan.svg', - // content: '按偏好订阅每日接收推送', - // time: '下午 1:30', - // }, - // { - // title: '报名助手', - // url: '/subPage/todayBill/index', - // img: '../../assets/images/baoming.svg', - // content: '按偏好订阅每日接收推送', - // time: '下午 1:30', - // }, - // { - // title: '账单助手', - // url: '/subPage/todayBill/index', - // img: '../../assets/images/zhangdan.svg', - // content: '按偏好订阅每日接收推送', - // time: '下午 1:30', - // }, - // { - // title: '智能匹配助手', - // url: '/subPage/chat/index?title=智能匹配助手', - // img: '../../assets/images/chat.svg', - // content: 'AI大模型智能匹配', - // time: '下午 1:30', - // }, - - ] + ], + showTimeStr: '' }, /** @@ -92,7 +64,7 @@ Page({ time: '下午 2:30', }, { - title: '每日发单', + title: '今日发单', url: '/subPage/todayBill/index', img: '../../assets/images/mrfd.svg', content: '按偏好订阅每日接收推送', @@ -136,7 +108,7 @@ Page({ time: '下午 2:30', }, { - title: '每日发单', + title: '今日发单', url: '/subPage/todayBill/index', img: '../../assets/images/mrfd.svg', content: '按偏好订阅每日接收推送', @@ -151,11 +123,13 @@ Page({ }); } setTimeout(() => { + console.log('new Date().getHours() ', new Date().getHours()); this.setData({ serviceInfo: app.globalData.serviceInfo, isLoading: true, messageClick: wx.getStorageSync("messageClick" + app.globalData.loginUserInfo.id), - list: this.data.list + list: this.data.list, + showTimeStr: new Date().getHours() > 0 && new Date().getHours() <= 7 ? '准备中' : '8:00' }); }, 10); }, diff --git a/pages/message/index.wxml b/pages/message/index.wxml index db5d2e8..7dd51fa 100644 --- a/pages/message/index.wxml +++ b/pages/message/index.wxml @@ -25,7 +25,7 @@ {{item.title}} - + {{showTimeStr}} {{item.content || '-'}} diff --git a/pages/mine/index.wxml b/pages/mine/index.wxml index 4dc43e8..c78b49e 100644 --- a/pages/mine/index.wxml +++ b/pages/mine/index.wxml @@ -1,7 +1,7 @@ - + @@ -276,7 +276,7 @@ - + diff --git a/pages/userDetail/index.js b/pages/userDetail/index.js index 86745c2..755b455 100644 --- a/pages/userDetail/index.js +++ b/pages/userDetail/index.js @@ -1,54 +1,135 @@ // pages/userdetail/index.js let app = getApp(); +import { customRequest } from '../../utils/request.js'; Page({ - /** - * 页面的初始数据 - */ - data: { - userInfo: {}, - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) {}, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () {}, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - this.setData({ - userInfo: app.globalData.loginUserInfo.user, - }); - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () {}, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () {}, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () {}, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () {}, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage1: function () {}, + /** + * 页面的初始数据 + */ + data: { + userInfo: {}, + configInfo: {}, + drawerShow: false, + teamList: [], + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getTeamList() + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + if (wx.getStorageSync("configInfo")) { + this.setData({ + configInfo: { ...wx.getStorageSync("configInfo"), biao: false }, + }); + console.log('configInfo', this.data.configInfo); + } + setTimeout(() => { + console.log('app.globalData.loginUserInfo',app.globalData.loginUserInfo); + this.setData({ + userInfo: app.globalData.loginUserInfo, + }); + }, 100); + + }, + showToggle () { + this.setData({ + drawerShow: true + }) + }, + toogleTeam (e) { + console.log(e); + let that = this + let item = e.currentTarget.dataset.item; + console.log(item); + if (wx.getStorageSync("LOGINUSER_ID") == item.id) { + return false + } + wx.showLoading({ + title: '切换中...', + }); + customRequest(`/yishoudan/agency/group/user/changeGroup/${item.id}`, { header: 'headers', method: 'GET', data: {} }).then((res) => { + console.log(res); + if (res.data.status == 200) { + that.checkToken(item) + app.getConfigInfo() + app.getServiceInfo() + wx.hideLoading(); + wx.showToast({ + title: '切换成功', + icon: 'success', + duration: 2000 + }) + } else { + that.getTeamList() + } + }) + }, + getTeamList () { + let that = this + customRequest("/yishoudan/agency/group/user/listByUser", { header: 'headers', method: 'GET', data: {} }).then((res) => { + console.log(res); + res.data.data.forEach(item => { + if (item.id == app.globalData.loginUserInfo.user.agencyId) { + item.checked = true; + } + }); + console.log('res.data.data', res.data.data); + that.setData({ + teamList: res.data.data + }) + }) + }, + checkToken (_item) { + let that = this + wx.setStorageSync("LOGINUSER_ID", _item.id); + customRequest('/appLoginByToken', { header: 'headers', method: 'GET', data: {} }).then((res) => { + console.log(res); + app.globalData.agencyStatus = res.data.data.agencyStatus; + app.globalData.loginUserInfo = res.data.data; + wx.setStorageSync("loginUser", res.data.data); + wx.setStorageSync("LOGINUSER_ID", res.data.data.user.agencyId); + this.setData({ + drawerShow: false + }) + that.onLoad() + that.onShow() + + }) + }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage1: function () { }, }); diff --git a/pages/userDetail/index.json b/pages/userDetail/index.json index 8af5935..01fcfab 100644 --- a/pages/userDetail/index.json +++ b/pages/userDetail/index.json @@ -1,4 +1,7 @@ { + "usingComponents": { + "bottom-drawer": "../../components/bottom-drawer/index" + }, "navigationBarTitleText": "个人信息", "backgroundColor": "#f5f5f5" } \ No newline at end of file diff --git a/pages/userDetail/index.wxml b/pages/userDetail/index.wxml index 4b2064b..c31a743 100644 --- a/pages/userDetail/index.wxml +++ b/pages/userDetail/index.wxml @@ -1,51 +1,51 @@ - - - - + + + + 头像 + --> - - + + - + - + - - - 用户名 + + + 用户名 {{userInfo.nickName}} - + - - - 性别 + + + 性别 - - - 未知 - + + + 未知 + - - + + 手机号 - {{userInfo.tel || '暂无'}} - + {{userInfo.tel || '暂无'}} + @@ -58,23 +58,62 @@ - --> - - - 实名认证 - - 去认证 - + --> + + + + 实名认证 + + 去认证 + + - - - - - 实名认证 - - {{userInfo.realName}} - + + + + + 实名认证 + + + + {{userInfo.realName}} + + + + + + + + + + + + 当前团队 + + + + + + {{userInfo.agencyName || '-'}} + + + + + - - \ No newline at end of file + + + 切换团队 + + + + + {{item.agencyName}} + + {{item.checked ? '当前':''}} + + + + + diff --git a/pages/userDetail/index.wxss b/pages/userDetail/index.wxss index 96c972b..e0b046d 100644 --- a/pages/userDetail/index.wxss +++ b/pages/userDetail/index.wxss @@ -1,3 +1,4 @@ +@import '../mine/index.wxss'; .container { padding: 10px; } diff --git a/project.config.json b/project.config.json index 858bc26..577cad2 100644 --- a/project.config.json +++ b/project.config.json @@ -44,7 +44,7 @@ "tabIndent": "insertSpaces", "tabSize": 2 }, - "appid": "wxb0dea4d11428c6a5", + "appid": "wxe431e0b3abd9ae0b", "packOptions": { "ignore": [], "include": [] diff --git a/subPage/todayBill/index.js b/subPage/todayBill/index.js index ff998d2..b2b91e7 100644 --- a/subPage/todayBill/index.js +++ b/subPage/todayBill/index.js @@ -97,7 +97,8 @@ Page({ 点击:#小程序:伯才供应链 点击:#小程序:伯才供应链`, textShow: '', - noticList: [] + noticList: [], + showPage: new Date().getHours() > 0 && new Date().getHours() <= 7 ? false : true }, /** diff --git a/subPage/todayBill/index.json b/subPage/todayBill/index.json index dee307f..c1182c9 100644 --- a/subPage/todayBill/index.json +++ b/subPage/todayBill/index.json @@ -1,4 +1,4 @@ { - "navigationBarTitleText" : "每日发单" + "navigationBarTitleText" : "今日发单" } \ No newline at end of file diff --git a/subPage/todayBill/index.wxml b/subPage/todayBill/index.wxml index 7d37030..372105f 100644 --- a/subPage/todayBill/index.wxml +++ b/subPage/todayBill/index.wxml @@ -1,8 +1,8 @@ - + - {{'今天'}} 08:3{{index + 1}} + {{'今天'}} 08:0{{index}} @@ -25,5 +25,9 @@ + + + 暂未发单 +