From 65e6cff360ca98555658e9c5f1bf31a9a4899341 Mon Sep 17 00:00:00 2001 From: "@zuopngfei" Date: Thu, 22 May 2025 18:34:51 +0800 Subject: [PATCH] dsdwe2 --- api/request.js | 3 +- api/user.js | 9 ++ app.json | 31 ++---- components/nav/index.wxml | 10 +- config/index.js | 1 + pages/chat/index.js | 85 --------------- pages/chat/index.json | 9 -- pages/chat/index.less | 110 ------------------- pages/chat/index.wxml | 58 ---------- pages/chat/index.wxs | 28 ----- pages/dataCenter/index.js | 104 ------------------ pages/dataCenter/index.json | 8 -- pages/dataCenter/index.less | 133 ----------------------- pages/dataCenter/index.wxml | 53 ---------- pages/forGetPassword/index.js | 66 ++++++++++++ pages/forGetPassword/index.json | 12 +++ pages/forGetPassword/index.less | 95 +++++++++++++++++ pages/forGetPassword/index.wxml | 51 +++++++++ pages/login/login.js | 29 +++-- pages/login/login.wxml | 65 ++++++------ pages/message/index.wxml | 4 +- pages/my/index.js | 13 ++- pages/my/index.less | 20 ++++ pages/my/index.wxml | 72 ++++--------- pages/release/index.js | 66 ------------ pages/release/index.json | 11 -- pages/release/index.less | 60 ----------- pages/release/index.wxml | 26 ----- pages/search/index.js | 181 -------------------------------- pages/search/index.json | 11 -- pages/search/index.wxml | 65 ------------ pages/search/index.wxss | 94 ----------------- pages/setting/index.js | 56 ---------- pages/setting/index.json | 9 -- pages/setting/index.less | 3 - pages/setting/index.wxml | 21 ---- project.private.config.json | 3 +- 37 files changed, 353 insertions(+), 1322 deletions(-) create mode 100644 api/user.js delete mode 100644 pages/chat/index.js delete mode 100644 pages/chat/index.json delete mode 100644 pages/chat/index.less delete mode 100644 pages/chat/index.wxml delete mode 100644 pages/chat/index.wxs delete mode 100644 pages/dataCenter/index.js delete mode 100644 pages/dataCenter/index.json delete mode 100644 pages/dataCenter/index.less delete mode 100644 pages/dataCenter/index.wxml create mode 100644 pages/forGetPassword/index.js create mode 100644 pages/forGetPassword/index.json create mode 100644 pages/forGetPassword/index.less create mode 100644 pages/forGetPassword/index.wxml delete mode 100644 pages/release/index.js delete mode 100644 pages/release/index.json delete mode 100644 pages/release/index.less delete mode 100644 pages/release/index.wxml delete mode 100644 pages/search/index.js delete mode 100644 pages/search/index.json delete mode 100644 pages/search/index.wxml delete mode 100644 pages/search/index.wxss delete mode 100644 pages/setting/index.js delete mode 100644 pages/setting/index.json delete mode 100644 pages/setting/index.less delete mode 100644 pages/setting/index.wxml diff --git a/api/request.js b/api/request.js index 8ee3f4c..764c66b 100644 --- a/api/request.js +++ b/api/request.js @@ -1,6 +1,7 @@ import config from '~/config'; -const { baseUrl } = config; +const baseUrl = 'https://ddbs.1024tool.vip/'; +console.log(config, baseUrl) const delay = config.isMock ? 500 : 0; function request(url, method = 'GET', data = {}) { const header = { diff --git a/api/user.js b/api/user.js new file mode 100644 index 0000000..ff89040 --- /dev/null +++ b/api/user.js @@ -0,0 +1,9 @@ +import request from './request' + +export const userLogin = () => { + return request({ + url: 'patient/password_login', + method: 'post', + data + }) +} \ No newline at end of file diff --git a/app.json b/app.json index 51827b6..a7b713e 100644 --- a/app.json +++ b/app.json @@ -4,21 +4,13 @@ "t-toast": "tdesign-miniprogram/toast/toast" }, "subpackages": [ - { - "root": "pages/search", - "name": "search", - "pages": ["index"] - }, + { "root": "pages/my/info-edit", "name": "edit", "pages": ["index"] }, - { - "root": "pages/chat", - "name": "chat", - "pages": ["index"] - }, + { "root": "pages/login", "name": "login", @@ -29,19 +21,12 @@ "name": "loginCode", "pages": ["loginCode"] }, + + + { - "root": "pages/dataCenter", - "name": "dataCenter", - "pages": ["index"] - }, - { - "root": "pages/setting", - "name": "setting", - "pages": ["index"] - }, - { - "root": "pages/release", - "name": "release", + "root": "pages/forGetPassword", + "name": "forGetPassword", "pages": ["index"] } ], @@ -64,7 +49,7 @@ }, { "pagePath": "pages/my/index", - "text": "我2的" + "text": "我的" } ] }, diff --git a/components/nav/index.wxml b/components/nav/index.wxml index 4e7b0f4..38a25f5 100644 --- a/components/nav/index.wxml +++ b/components/nav/index.wxml @@ -1,6 +1,6 @@ - - + + - + /> --> diff --git a/config/index.js b/config/index.js index 0dcf8fb..617b5a7 100644 --- a/config/index.js +++ b/config/index.js @@ -1,5 +1,6 @@ /** 是否使用mock代替api返回 */ export const config = { + baseUrl: 'https://ddbs.1024tool.vip/', useMock: true, }; diff --git a/pages/chat/index.js b/pages/chat/index.js deleted file mode 100644 index c8463bb..0000000 --- a/pages/chat/index.js +++ /dev/null @@ -1,85 +0,0 @@ -// pages/chat/index.js -const app = getApp(); -const { socket } = app.globalData; // 获取已连接的socketTask - -Page({ - /** 页面的初始数据 */ - data: { - myAvatar: '/static/chat/avatar.png', // 自己的头像 - userId: null, // 对方userId - avatar: '', // 对方头像 - name: '', // 对方昵称 - messages: [], // 消息列表 { messageId, from, content, time, read } - input: '', // 输入框内容 - anchor: '', // 消息列表滚动到 id 与之相同的元素的位置 - keyboardHeight: 0, // 键盘当前高度(px) - }, - - /** 生命周期函数--监听页面加载 */ - onLoad(options) { - this.getOpenerEventChannel().on('update', this.update); - }, - - /** 生命周期函数--监听页面初次渲染完成 */ - onReady() {}, - - /** 生命周期函数--监听页面显示 */ - onShow() {}, - - /** 生命周期函数--监听页面隐藏 */ - onHide() {}, - - /** 生命周期函数--监听页面卸载 */ - onUnload() { - app.eventBus.off('update', this.update); - }, - - /** 页面相关事件处理函数--监听用户下拉动作 */ - onPullDownRefresh() {}, - - /** 页面上拉触底事件的处理函数 */ - onReachBottom() {}, - - /** 用户点击右上角分享 */ - onShareAppMessage() {}, - - /** 更新数据 */ - update({ userId, avatar, name, messages }) { - this.setData({ userId, avatar, name, messages: [...messages] }); - wx.nextTick(this.scrollToBottom); - }, - - /** 处理唤起键盘事件 */ - handleKeyboardHeightChange(event) { - const { height } = event.detail; - if (!height) return; - this.setData({ keyboardHeight: height }); - wx.nextTick(this.scrollToBottom); - }, - - /** 处理收起键盘事件 */ - handleBlur() { - this.setData({ keyboardHeight: 0 }); - }, - - /** 处理输入事件 */ - handleInput(event) { - this.setData({ input: event.detail.value }); - }, - - /** 发送消息 */ - sendMessage() { - const { userId, messages, input: content } = this.data; - if (!content) return; - const message = { messageId: null, from: 0, content, time: Date.now(), read: true }; - messages.push(message); - this.setData({ input: '', messages }); - socket.send(JSON.stringify({ type: 'message', data: { userId, content } })); - wx.nextTick(this.scrollToBottom); - }, - - /** 消息列表滚动到底部 */ - scrollToBottom() { - this.setData({ anchor: 'bottom' }); - }, -}); diff --git a/pages/chat/index.json b/pages/chat/index.json deleted file mode 100644 index ca2dd25..0000000 --- a/pages/chat/index.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "usingComponents": { - "t-navbar": "tdesign-miniprogram/navbar/navbar", - "t-avatar": "tdesign-miniprogram/avatar/avatar", - "t-loading": "tdesign-miniprogram/loading/loading", - "t-button": "tdesign-miniprogram/button/button" - }, - "navigationStyle": "custom" -} diff --git a/pages/chat/index.less b/pages/chat/index.less deleted file mode 100644 index dc8246d..0000000 --- a/pages/chat/index.less +++ /dev/null @@ -1,110 +0,0 @@ -/* pages/chat/index.wxss */ -.chat-container { - display: flex; - flex-direction: column; - box-sizing: border-box; - height: 100vh; - font-size: 32rpx; - background-color: #fff; -} - -.nav-bar { - border-bottom: 1rpx solid #e7e7e7; -} - -.content { - height: 0; - flex-grow: 1; -} - -.messages { - display: flex; - flex-direction: column; - gap: 32rpx; - padding: 32rpx 24rpx; -} - -.time { - display: flex; - justify-content: center; - align-items: flex-end; - height: 56rpx; - color: #00000066; - font-size: 24rpx; - line-height: 40rpx; -} - -.message-area { - display: flex; - align-items: flex-start; - gap: 16rpx; -} - -.message { - position: relative; - box-sizing: border-box; - max-width: 510rpx; - padding: 24rpx; - font-size: 28rpx; - line-height: 44rpx; -} - -.message.self { - border-radius: 24rpx 0 24rpx 24rpx; - margin-left: auto; - background-color: #d9e1ff; -} - -.message.other { - border-radius: 0 24rpx 24rpx 24rpx; - background-color: #f3f3f3; -} - -.loading { - position: absolute; - right: calc(100% + 16rpx); - top: 50%; - transform: translateY(-50%); -} - -.block { - height: calc(env(safe-area-inset-bottom) + 129rpx); -} - -.bottom { - position: fixed; - left: 0; - right: 0; - bottom: 0; - display: flex; - justify-content: space-between; - align-items: center; - gap: 24rpx; - padding: 24rpx 24rpx calc(env(safe-area-inset-bottom) + 24rpx); - border-top: 1rpx solid #e7e7e7; - background-color: #ffffff; -} - -.input { - box-sizing: border-box; - flex-grow: 1; - height: 80rpx; - padding: 16rpx 32rpx; - border-radius: 40rpx; - border: 1rpx solid #dcdcdc; - background: #f3f3f3; - line-height: 48rpx; -} - -.input > input { - width: 100%; - height: 48rpx; - line-height: 48rpx; - margin-bottom: 40rpx; -} - -.send { - width: 128rpx !important; - margin: 0; - font-weight: normal !important; -} diff --git a/pages/chat/index.wxml b/pages/chat/index.wxml deleted file mode 100644 index f34a5a2..0000000 --- a/pages/chat/index.wxml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - {{ utils.formatTime(item.time) }} - - - - - {{ item.content }} - - - - - - - - - {{ item.content }} - - - - - - - - - - - - - - 发送 - diff --git a/pages/chat/index.wxs b/pages/chat/index.wxs deleted file mode 100644 index 0e56b0c..0000000 --- a/pages/chat/index.wxs +++ /dev/null @@ -1,28 +0,0 @@ -/** 将数字补足2位 */ -function formatNum(num) { - return num < 10 ? '0' + num : num; -} - -/** 格式化时间 */ -function formatTime(time) { - var date = getDate(time); - var now = getDate(); - var Y = date.getFullYear(), - M = date.getMonth() + 1, - D = date.getDate(), - h = date.getHours(), - m = date.getMinutes(); - var Y0 = now.getFullYear(), - M0 = now.getMonth() + 1, - D0 = now.getDate(); - if (Y === Y0) { - if (M === M0 && D === D0) return '今天 ' + formatNum(h) + ':' + formatNum(m); - if (M === M0 && D === D0 - 1) return '昨天 ' + formatNum(h) + ':' + formatNum(m); - return M + '月' + D + '日 ' + formatNum(h) + ':' + formatNum(m); - } - return Y + '年' + M + '月' + D + '日 ' + formatNum(h) + ':' + formatNum(m); -} - -module.exports = { - formatTime: formatTime, -}; diff --git a/pages/dataCenter/index.js b/pages/dataCenter/index.js deleted file mode 100644 index 1b5c202..0000000 --- a/pages/dataCenter/index.js +++ /dev/null @@ -1,104 +0,0 @@ -import request from '~/api/request'; - -Page({ - /** - * 页面的初始数据 - */ - data: { - totalSituationDataList: null, - totalSituationKeyList: null, - completeRateDataList: null, - complete_rate_keyList: null, - interactionSituationDataList: null, - interaction_situation_keyList: null, - areaDataList: null, - areaDataKeysList: null, - memberitemWidth: null, - smallitemWidth: null, - }, - - onLoad() { - this.init(); - }, - - init() { - this.getMemberData(); - this.getInteractionData(); - this.getCompleteRateData(); - this.getAreaData(); - }, - - /** - * 获取 “整体情况” 数据 - */ - getMemberData() { - request('/dataCenter/member').then((res) => { - const totalSituationData = res.data.template.succ.data.list; - this.setData({ - totalSituationDataList: totalSituationData, - }); - - // 计算每个.item元素的宽度 - const itemWidth = `${(750 - 32 * (totalSituationData.length - 1)) / totalSituationData.length}rpx`; - - // 更新.item元素的样式 - this.setData({ - memberitemWidth: itemWidth, - }); - }); - }, - - /** - * 获取 “互动情况” 数据 - */ - getInteractionData() { - request('/dataCenter/interaction').then((res) => { - const interactionSituationData = res.data.template.succ.data.list; - this.setData({ - interactionSituationDataList: interactionSituationData, - interactionSituationKeysList: Object.keys(interactionSituationData[0]), - }); - - // 计算每个.item元素的宽度 - const itemWidth = `${(750 - 32 * (interactionSituationData.length - 1)) / interactionSituationData.length}rpx`; - // 更新.item元素的样式 - this.setData({ - smallitemWidth: itemWidth, - }); - }); - }, - - /** - * 完播率 - */ - getCompleteRateData() { - request('/dataCenter/complete-rate').then((res) => { - const completeRateData = res.data.template.succ.data.list; - this.setData({ - completeRateDataList: completeRateData, - completeRateKeysList: Object.keys(completeRateData[0]), - }); - - // 计算每个.item元素的宽度 - const itemHeight = `${380 / completeRateData.length}rpx`; - - // 更新.item元素的样式 - this.setData({ - itemHeight: itemHeight, - }); - }); - }, - - /** - * 按区域统计 - */ - getAreaData() { - request('/dataCenter/area').then((res) => { - const areaData = res.data.template.succ.data.list; - this.setData({ - areaDataList: areaData, - areaDataKeysList: Object.keys(areaData[0]), - }); - }); - }, -}); diff --git a/pages/dataCenter/index.json b/pages/dataCenter/index.json deleted file mode 100644 index 284b042..0000000 --- a/pages/dataCenter/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "navigationStyle": "custom", - "usingComponents": { - "t-navbar": "tdesign-miniprogram/navbar/navbar", - "t-progress": "tdesign-miniprogram/progress/progress", - "t-empty": "tdesign-miniprogram/empty/empty" - } -} diff --git a/pages/dataCenter/index.less b/pages/dataCenter/index.less deleted file mode 100644 index 50ea3a2..0000000 --- a/pages/dataCenter/index.less +++ /dev/null @@ -1,133 +0,0 @@ -.card { - display: inline-flex; - flex-direction: column; - align-items: flex-start; - gap: 32rpx; - width: 100%; - padding: 24rpx 32rpx 32rpx 32rpx; - box-sizing: border-box; - background-color: #fff; - - .card-header { - width: 100%; - display: flex; - justify-content: space-between; - - &__title { - color: rgba(0, 0, 0, 0.9); - font-size: 32rpx; - font-weight: 600; - line-height: 48rpx; - } - - &__desc { - color: rgba(0, 0, 0, 0.4); - font-size: 24rpx; - line-height: 40rpx; - } - } - - .card-content { - display: flex; - width: 100%; - align-items: flex-start; - gap: 32rpx; - - &__item { - display: flex; - flex-direction: column; - align-items: flex-start; - flex: 1 0 0; - - &--desc { - color: rgba(0, 0, 0, 0.4); - font-size: 24rpx; - line-height: 40rpx; - } - - &--count { - font-size: 48rpx; - font-weight: 600; - line-height: 64rpx; - } - } - } -} - -.first { - .card-content { - &__item { - &:first-child { - .card-content__item--count { - color: #0052d9; - } - } - } - } -} - -.second, -.third, -.forth { - gap: 24rpx; - padding: 32rpx; - margin: 32rpx 32rpx 0; - width: calc(100% - 64rpx); - border-radius: 9px; - - .card-header__title { - font-size: 28rpx; - line-height: 44rpx; - } -} - -.second { - .card-content__item--desc { - font-size: 20rpx; - line-height: 32rpx; - } - - .card-content__item--count { - margin-top: 8rpx; - font-size: 40rpx; - line-height: 56rpx; - } - - .unit { - margin-left: 4rpx; - color: rgba(0, 0, 0, 0.6); - font-size: 20rpx; - font-weight: 400; - line-height: 32rpx; - } -} - -.third { - .card-content { - display: flex; - flex-direction: column; - gap: 16rpx; - } - - .card-content__item { - width: 100%; - display: flex; - flex-direction: row; - align-items: flex-start; - gap: 16rpx; - align-self: stretch; - } - - .progress__content { - flex: 1 0 0; - } -} - -.forth { - .card-content { - display: flex; - justify-content: center; - } - - margin-bottom: 16rpx; -} diff --git a/pages/dataCenter/index.wxml b/pages/dataCenter/index.wxml deleted file mode 100644 index a67971d..0000000 --- a/pages/dataCenter/index.wxml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - 整体情况 - 截止12:00累计数值 - - - - {{item.name}} - {{item.number}} - - - - - - - 互动情况 - - - - {{item.name}} - - {{item.number}} - - - - - - - - - 完播率 - - - - {{item.time}} - - - - - - - - - - 按区域统计 - - - - - - diff --git a/pages/forGetPassword/index.js b/pages/forGetPassword/index.js new file mode 100644 index 0000000..8c68f2b --- /dev/null +++ b/pages/forGetPassword/index.js @@ -0,0 +1,66 @@ +// pages/forGetPassword/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/forGetPassword/index.json b/pages/forGetPassword/index.json new file mode 100644 index 0000000..23a275d --- /dev/null +++ b/pages/forGetPassword/index.json @@ -0,0 +1,12 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "t-navbar": "tdesign-miniprogram/navbar/navbar", + "t-input": "tdesign-miniprogram/input/input", + "t-icon": "tdesign-miniprogram/icon/icon", + "t-link": "tdesign-miniprogram/link/link", + "t-button": "tdesign-miniprogram/button/button", + "t-radio-group": "tdesign-miniprogram/radio-group/radio-group", + "t-radio": "tdesign-miniprogram/radio/radio" + } +} \ No newline at end of file diff --git a/pages/forGetPassword/index.less b/pages/forGetPassword/index.less new file mode 100644 index 0000000..b1a3e1a --- /dev/null +++ b/pages/forGetPassword/index.less @@ -0,0 +1,95 @@ +/* pages/forGetPassword/index.wxss */ +.login { + &__title { + color: rgba(0, 0, 0, 0.9); + font-size: 56rpx; + font-weight: 600; + line-height: 72rpx; + padding: 16rpx 32rpx 40rpx; + } + + &__input { + .input-label { + display: flex; + padding-right: 32rpx; + box-sizing: border-box; + border-right: 1rpx solid #e7e7e7; + } + + .input-icon { + margin-left: 8rpx; + } + } + + &__tips { + color: rgba(0, 0, 0, 0.4); + font-size: 24rpx; + font-style: normal; + font-weight: 400; + line-height: 40rpx; + margin: 24rpx 32rpx 32rpx; + } + + &__button { + margin: 0 32rpx; + } + + &__password--forget { + display: flex; + font-size: 24rpx; + align-items: center; + margin: 32rpx; + line-height: 40rpx; + } + + &__others { + margin: 64rpx 32rpx auto 32rpx; + display: flex; + align-items: center; + justify-content: space-between; + + &-label { + min-width: 96rpx; + color: rgba(0, 0, 0, 0.6); + font-size: 24rpx; + line-height: 40rpx; + } + + &-buttons { + flex: 1; + margin-left: 32rpx; + display: flex; + align-items: center; + justify-content: flex-end; + + .button { + margin: 0 !important; + + &:not(:last-child) { + margin-right: 32rpx !important; + } + } + } + } + + // 覆盖组件样式 + .radio-class { + --td-radio-icon-size: 32rpx; + --td-radio-label-line-height: 40rpx; + + align-items: center; + } + + .radio-class-icon { + margin-top: 0 !important; + } + + .radio-class-label { + margin-left: 8rpx !important; + font-size: 24rpx !important; + line-height: 40rpx !important; + } + .login__button{ + margin-top: 40rpx; + } +} diff --git a/pages/forGetPassword/index.wxml b/pages/forGetPassword/index.wxml new file mode 100644 index 0000000..4a9091b --- /dev/null +++ b/pages/forGetPassword/index.wxml @@ -0,0 +1,51 @@ + + + \ No newline at end of file diff --git a/pages/login/login.js b/pages/login/login.js index ad303c4..44b0277 100644 --- a/pages/login/login.js +++ b/pages/login/login.js @@ -6,12 +6,13 @@ Page({ isPhoneNumber: false, isCheck: false, isSubmit: false, - isPasswordLogin: false, + isPasswordLogin: true, passwordInfo: { account: '', password: '', }, radioValue: '', + code: '' }, /* 自定义功能函数 */ @@ -66,7 +67,7 @@ Page({ async login() { if (this.data.isPasswordLogin) { - const res = await request('/login/postPasswordLogin', 'post', { data: this.data.passwordInfo }); + const res = await request('patient/password_login', 'post', { mobile: this.data.passwordInfo.account, password: this.data.passwordInfo.password }); if (res.success) { await wx.setStorageSync('access_token', res.data.token); wx.switchTab({ @@ -74,12 +75,24 @@ Page({ }); } } else { - const res = await request('/login/getSendMessage', 'get'); - if (res.success) { - wx.navigateTo({ - url: `/pages/loginCode/loginCode?phoneNumber=${this.data.phoneNumber}`, - }); - } + const res = await request('/patient/code_login', 'post', {code: this.data.code, mobile: this.data.phoneNumber}); + // if (res.success) { + // wx.navigateTo({ + // url: `/pages/loginCode/loginCode?phoneNumber=${this.data.phoneNumber}`, + // }); + // } } }, + // 获取验证码 + + async getCode() { + const res = await request('patient/send_code', 'post', { mobile: this.data.phoneNumber, type: 1 }); + }, + uploadPass() { + console.log('1222') + wx.navigateTo({ + url: `/pages/forGetPassword/index`, + }) + } }); + diff --git a/pages/login/login.wxml b/pages/login/login.wxml index aea60ad..a25c748 100644 --- a/pages/login/login.wxml +++ b/pages/login/login.wxml @@ -4,40 +4,41 @@ - + \ No newline at end of file diff --git a/pages/message/index.wxml b/pages/message/index.wxml index 20624c6..e094391 100644 --- a/pages/message/index.wxml +++ b/pages/message/index.wxml @@ -8,7 +8,7 @@ refresher-triggered="{{ loading }}" bindrefresherrefresh="getMessageList" > - - + --> diff --git a/pages/my/index.js b/pages/my/index.js index 200c60e..7419520 100644 --- a/pages/my/index.js +++ b/pages/my/index.js @@ -7,7 +7,9 @@ Page({ data: { isLoad: false, service: [], - personalInfo: {}, + personalInfo: { + name: '邹方成' + }, gridList: [ { name: '全部发布', @@ -36,12 +38,9 @@ Page({ ], settingList: [ - { label: '姓名', text: '张三', icon: 'service', type: 'text' }, - { label: '性别', text: '男', icon: 'setting', type: 'text' }, - { label: '出生日期', text: '1990-01-01', icon: 'setting', type: 'text' }, - { label: '身份证号', text: '13800138000', icon: 'setting', type: 'text' }, - { label: '手机号', text: '421033201810101601', icon: 'setting', type: 'text' }, - { label: '胆道闭锁手术时间', text: '2025-01-01', icon: 'setting', type: 'text' }, + { label: '用药方案', text: '', icon: 'service', type: 'text' }, + { label: '健康教育', text: '', icon: 'setting', type: 'text' }, + ], }, diff --git a/pages/my/index.less b/pages/my/index.less index b4903f9..e78462c 100644 --- a/pages/my/index.less +++ b/pages/my/index.less @@ -99,4 +99,24 @@ font-weight: 600; } } + .my-cell{ + margin-top: 30rpx; + } + .my-info__person{ + position: relative; + text{ + font-size: 24rpx; + } + .edit{ + position: absolute; + right: 0; + top: 0; + } + } + .time{ + font-size: 26rpx; + } + .peld{ + color: red; + } } diff --git a/pages/my/index.wxml b/pages/my/index.wxml index 6a2f58a..50cd118 100644 --- a/pages/my/index.wxml +++ b/pages/my/index.wxml @@ -8,68 +8,36 @@ - {{personalInfo.name}} + {{personalInfo.name}} + 男 1岁5个月 + + + 胆道闭锁手术时间:2024年12月15日 + PELD评分:12 + 高危 + - + - + - - + + + + - - - + + + - - - + + + \ No newline at end of file diff --git a/pages/release/index.js b/pages/release/index.js deleted file mode 100644 index 3bb72f1..0000000 --- a/pages/release/index.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/release/index.js - -Page({ - /** - * 页面的初始数据 - */ - data: { - originFiles: [ - { - url: '/static/image1.png', - name: 'uploaded1.png', - type: 'image', - }, - { - url: '/static/image2.png', - name: 'uploaded2.png', - type: 'image', - }, - ], - gridConfig: { - column: 4, - width: 160, - height: 160, - }, - config: { - count: 1, - }, - tags: ['AI绘画', '版权素材', '原创', '风格灵动'], - }, - handleSuccess(e) { - const { files } = e.detail; - this.setData({ - originFiles: files, - }); - }, - handleRemove(e) { - const { index } = e.detail; - const { originFiles } = this.data; - originFiles.splice(index, 1); - this.setData({ - originFiles, - }); - }, - gotoMap() { - wx.showToast({ - title: '获取当前位置...', - icon: 'none', - image: '', - duration: 1500, - mask: false, - success: () => {}, - fail: () => {}, - complete: () => {}, - }); - }, - saveDraft() { - wx.reLaunch({ - url: `/pages/home/index?oper=save`, - }); - }, - release() { - wx.reLaunch({ - url: `/pages/home/index?oper=release`, - }); - }, -}); diff --git a/pages/release/index.json b/pages/release/index.json deleted file mode 100644 index bf7bf73..0000000 --- a/pages/release/index.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "navigationStyle": "custom", - "usingComponents": { - "t-navbar": "tdesign-miniprogram/navbar/navbar", - "t-upload": "tdesign-miniprogram/upload/upload", - "t-textarea": "tdesign-miniprogram/textarea/textarea", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-check-tag": "tdesign-miniprogram/check-tag/check-tag", - "t-button": "tdesign-miniprogram/button/button" - } -} diff --git a/pages/release/index.less b/pages/release/index.less deleted file mode 100644 index 136ef85..0000000 --- a/pages/release/index.less +++ /dev/null @@ -1,60 +0,0 @@ -/* pages/release/index.wxss */ -.release-container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-between; - padding: 0; - box-sizing: border-box; - - .box { - width: 100%; - } - .upload { - height: 112rpx * 2; - position: relative; - &-class { - width: 344rpx * 2; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - } - .desc { - height: 132rpx * 2; - display: flex; - padding: 32rpx; - align-items: flex-start; - justify-content: space-between; - box-sizing: border-box; - .desc-class { - width: 246rpx * 2; - height: 100%; - padding: 0; - } - } - .taggroup { - .cell-title-class { - width: 81rpx * 2; - } - .cell-note-class { - overflow-x: auto; - justify-content: start; - } - .tag-class { - margin-left: 24rpx; - } - } - .btngroup { - display: flex; - justify-content: space-evenly; - padding: 32rpx; - position: fixed; - bottom: 64rpx; - .btn-class { - width: 163.5rpx * 2; - margin: 0; - } - } -} diff --git a/pages/release/index.wxml b/pages/release/index.wxml deleted file mode 100644 index 9d61c77..0000000 --- a/pages/release/index.wxml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - 添加描述 - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pages/search/index.js b/pages/search/index.js deleted file mode 100644 index 4f23bd1..0000000 --- a/pages/search/index.js +++ /dev/null @@ -1,181 +0,0 @@ -import request from '~/api/request'; - -Page({ - data: { - historyWords: [], - popularWords: [], - searchValue: '', - dialog: { - title: '确认删除当前历史记录', - showCancelButton: true, - message: '', - }, - dialogShow: false, - }, - - deleteType: 0, - deleteIndex: '', - - onShow() { - this.queryHistory(); - this.queryPopular(); - }, - - /** - * 查询历史记录 - * @returns {Promise} - */ - async queryHistory() { - request('/api/searchHistory').then((res) => { - const { code, data } = res; - - if (code === 200) { - const { historyWords = [] } = data; - this.setData({ - historyWords, - }); - } - }); - }, - - /** - * 查询热门搜索 - * @returns {Promise} - */ - async queryPopular() { - request('/api/searchPopular').then((res) => { - const { code, data } = res; - - if (code === 200) { - const { popularWords = [] } = data; - this.setData({ - popularWords, - }); - } - }); - }, - - setHistoryWords(searchValue) { - if (!searchValue) return; - - const { historyWords } = this.data; - const index = historyWords.indexOf(searchValue); - - if (index !== -1) { - historyWords.splice(index, 1); - } - historyWords.unshift(searchValue); - - this.setData({ - searchValue, - historyWords, - }); - // if (searchValue) { - // wx.navigateTo({ - // url: `/pages/goods/result/index?searchValue=${searchValue}`, - // }); - // } - }, - - /** - * 清空历史记录的再次确认框 - * 后期可能需要增加一个向后端请求的接口 - * @returns {Promise} - */ - confirm() { - const { historyWords } = this.data; - const { deleteType, deleteIndex } = this; - - if (deleteType === 0) { - historyWords.splice(deleteIndex, 1); - this.setData({ - historyWords, - dialogShow: false, - }); - } else { - this.setData({ historyWords: [], dialogShow: false }); - } - }, - - /** - * 取消清空历史记录 - * @returns {Promise} - */ - close() { - this.setData({ dialogShow: false }); - }, - - /** - * 点击清空历史记录 - * @returns {Promise} - */ - handleClearHistory() { - const { dialog } = this.data; - this.deleteType = 1; - this.setData({ - dialog: { - ...dialog, - message: '确认删除所有历史记录', - }, - dialogShow: true, - }); - }, - - deleteCurr(e) { - const { index } = e.currentTarget.dataset; - const { dialog } = this.data; - this.deleteIndex = index; - this.deleteType = 0; - this.setData({ - dialog: { - ...dialog, - message: '确认删除当前历史记录', - }, - dialogShow: true, - }); - }, - - /** - * 点击关键词跳转搜索 - * 后期需要增加跳转和后端请求接口 - * @returns {Promise} - */ - handleHistoryTap(e) { - const { historyWords } = this.data; - const { index } = e.currentTarget.dataset; - const searchValue = historyWords[index || 0] || ''; - - this.setHistoryWords(searchValue); - }, - - handlePopularTap(e) { - const { popularWords } = this.data; - const { index } = e.currentTarget.dataset; - const searchValue = popularWords[index || 0] || ''; - - this.setHistoryWords(searchValue); - }, - - /** - * 提交搜索框内容 - * 后期需要增加跳转和后端请求接口 - * @returns {Promise} - */ - handleSubmit(e) { - const { value } = e.detail; - if (value.length === 0) return; - - this.setHistoryWords(value); - }, - - /** - * 点击取消回到主页 - * @returns {Promise} - */ - actionHandle() { - this.setData({ - searchValue: '', - }); - wx.switchTab({ url: '/pages/home/index' }); - }, -}); diff --git a/pages/search/index.json b/pages/search/index.json deleted file mode 100644 index 3b52564..0000000 --- a/pages/search/index.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "navigationStyle": "custom", - "usingComponents": { - "t-navbar": "tdesign-miniprogram/navbar/navbar", - "t-search": "/miniprogram_npm/tdesign-miniprogram/search/search", - "t-icon": "/miniprogram_npm/tdesign-miniprogram/icon/icon", - "t-dialog": "/miniprogram_npm/tdesign-miniprogram/dialog/dialog", - "t-tag": "/miniprogram_npm/tdesign-miniprogram/tag/tag", - "t-check-tag": "/miniprogram_npm/tdesign-miniprogram/check-tag/check-tag" - } -} diff --git a/pages/search/index.wxml b/pages/search/index.wxml deleted file mode 100644 index b52924a..0000000 --- a/pages/search/index.wxml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - 历史记录 - - - - - {{item}} - - - - - - 搜索发现 - - - - {{item}} - - - - - - diff --git a/pages/search/index.wxss b/pages/search/index.wxss deleted file mode 100644 index eeda706..0000000 --- a/pages/search/index.wxss +++ /dev/null @@ -1,94 +0,0 @@ -.search-input { - padding: 16rpx 0; -} - -.search-page { - box-sizing: border-box; - width: 100vw; - height: 100vh; - padding: 0 30rpx; -} - -.search-page .t-class__input-container { - border-radius: 999rpx !important; -} - -.search-page .t-search__input { - font-size: 28rpx !important; - color: #333 !important; -} - -.search-page .search-wrap { - margin-top: 24rpx; -} - -.search-page .history-wrap { - margin-bottom: 20px; -} - -.search-page .search-header { - display: flex; - flex-flow: row nowrap; - justify-content: space-between; - align-items: center; -} - -.search-page .search-title { - font-size: 30rpx; - font-family: - PingFangSC-Semibold, - PingFang SC; - font-weight: 600; - color: rgba(51, 51, 51, 1); - line-height: 42rpx; -} - -.search-page .search-clear { - font-size: 30rpx; - font-family: PingFang SC; - line-height: 32rpx; - color: #999999; - font-weight: bold; -} - -.search-page .search-content { - overflow: hidden; - display: flex; - flex-flow: row wrap; - justify-content: flex-start; - align-items: flex-start; - margin-top: 24rpx; -} - -.search-page .search-item { - color: #333333; - font-size: 24rpx; - line-height: 32rpx; - font-weight: 400; - margin-right: 24rpx; - margin-bottom: 24rpx; - border-radius: 3rpx; -} - -.search-page .hover-history-item { - position: relative; - top: 3rpx; - left: 3rpx; - box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1) inset; -} - -.add-notes__confirm { - color: #fa4126 !important; -} - -.popular-wrap { - margin-top: 32rpx; -} - -.search-page .search-item .popular-item { - background: #f3f3f3; -} - -.search-page .search-item .history-item { - background: #e7e7e7; -} diff --git a/pages/setting/index.js b/pages/setting/index.js deleted file mode 100644 index 2055f03..0000000 --- a/pages/setting/index.js +++ /dev/null @@ -1,56 +0,0 @@ -import useToastBehavior from '~/behaviors/useToast'; - -Page({ - behaviors: [useToastBehavior], - data: { - menuData: [ - [ - { - title: '通用设置', - url: '', - icon: 'app', - }, - { - title: '通知设置', - url: '', - icon: 'notification', - }, - ], - [ - { - title: '深色模式', - url: '', - icon: 'image', - }, - { - title: '字体大小', - url: '', - icon: 'chart', - }, - { - title: '播放设置', - url: '', - icon: 'sound', - }, - ], - [ - { - title: '账号安全', - url: '', - icon: 'secured', - }, - { - title: '隐私', - url: '', - icon: 'info-circle', - }, - ], - ], - }, - - onEleClick(e) { - const { title, url } = e.currentTarget.dataset.data; - if (url) return; - this.onShowToast('#t-toast', title); - }, -}); diff --git a/pages/setting/index.json b/pages/setting/index.json deleted file mode 100644 index 74a6b76..0000000 --- a/pages/setting/index.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "navigationStyle": "custom", - "usingComponents": { - "t-navbar": "tdesign-miniprogram/navbar/navbar", - "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", - "t-cell": "tdesign-miniprogram/cell/cell", - "t-icon": "tdesign-miniprogram/icon/icon" - } -} diff --git a/pages/setting/index.less b/pages/setting/index.less deleted file mode 100644 index 50179ed..0000000 --- a/pages/setting/index.less +++ /dev/null @@ -1,3 +0,0 @@ -.cell-group-class { - margin: 32rpx !important; -} diff --git a/pages/setting/index.wxml b/pages/setting/index.wxml deleted file mode 100644 index 84d2a67..0000000 --- a/pages/setting/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/project.private.config.json b/project.private.config.json index 34a5699..709341e 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -67,7 +67,8 @@ "projectname": "patient-mini", "setting": { "compileHotReLoad": true, - "bigPackageSizeSupport": true + "bigPackageSizeSupport": true, + "urlCheck": false }, "libVersion": "3.7.12" } \ No newline at end of file