diff --git a/app.json b/app.json index 24318eb..994eae8 100644 --- a/app.json +++ b/app.json @@ -1,16 +1,46 @@ { - "pages": [ - "pages/home/index", - "pages/message/index", - "pages/my/index", - "pages/search/index", - "pages/my/info-edit/index", - "pages/chat/index", - "pages/login/login", - "pages/loginCode/loginCode", - "pages/dataCenter/index", - "pages/setup/index", - "pages/release/index" + "pages": ["pages/home/index", "pages/message/index", "pages/my/index"], + "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", + "pages": ["login"] + }, + { + "root": "pages/loginCode", + "name": "loginCode", + "pages": ["loginCode"] + }, + { + "root": "pages/dataCenter", + "name": "dataCenter", + "pages": ["index"] + }, + { + "root": "pages/setting", + "name": "setting", + "pages": ["index"] + }, + { + "root": "pages/release", + "name": "release", + "pages": ["index"] + } ], "window": { "backgroundTextStyle": "light", diff --git a/app.less b/app.less index 9b982a1..77cdbf6 100644 --- a/app.less +++ b/app.less @@ -7,4 +7,13 @@ justify-content: space-between; padding: 200rpx 0; box-sizing: border-box; -} \ No newline at end of file +} + +page { + background-color: #f3f3f3; +} + +.page { + height: 100vh; + background-color: #fff; +} diff --git a/components/nav/index.js b/components/nav/index.js index 124e63c..752b686 100644 --- a/components/nav/index.js +++ b/components/nav/index.js @@ -1,102 +1,105 @@ Component({ options: { - styleIsolation: 'shared' + styleIsolation: 'shared', }, properties: { navType: { - type: "string", - value: "" + type: 'string', + value: '', }, titleText: { - type: "string", - value: "" - } + type: 'string', + value: '', + }, }, data: { visible: false, - sidebar: [{ + sidebar: [ + { title: '首页', - url: "pages/home/index", - isSidebar: true - }, { + url: 'pages/home/index', + isSidebar: true, + }, + { title: '搜索页', - url: "pages/search/index", - isSidebar: false - }, { + url: 'pages/search/index', + isSidebar: false, + }, + { title: '发布页', - url: "pages/release/index", - isSidebar: false + url: 'pages/release/index', + isSidebar: false, }, { title: '消息列表页', - url: "pages/message/index", - isSidebar: true + url: 'pages/message/index', + isSidebar: true, }, { title: '对话页', - url: "pages/chat/index", - isSidebar: false + url: 'pages/chat/index', + isSidebar: false, }, { title: '个人中心页', - url: "pages/my/index", - isSidebar: true + url: 'pages/my/index', + isSidebar: true, }, { title: '个人信息表单页', - url: "pages/my/info-edit/index", - isSidebar: false + url: 'pages/my/info-edit/index', + isSidebar: false, }, { title: '设置页', - url: "pages/setup/index", - isSidebar: false + url: 'pages/setting/index', + isSidebar: false, }, { title: '数据图表页', - url: "pages/dataCenter/index", - isSidebar: false + url: 'pages/dataCenter/index', + isSidebar: false, }, { title: '登录注册页', - url: "pages/login/login", - isSidebar: false + url: 'pages/login/login', + isSidebar: false, }, - ] + ], }, methods: { openDrawer() { this.setData({ - visible: true - }) + visible: true, + }); }, itemClick(e) { const that = this; - const { isSidebar , url } = e.detail.item; - if(isSidebar){ + const { isSidebar, url } = e.detail.item; + if (isSidebar) { wx.switchTab({ url: `/${url}`, }).then(() => { // 防止点回tab时,sidebar依旧是展开模式 that.setData({ - visible: false - }) - }) + visible: false, + }); + }); } else { wx.navigateTo({ url: `/${url}`, }).then(() => { that.setData({ - visible: false - }) - }) + visible: false, + }); + }); } }, searchTurn() { wx.navigateTo({ url: `/pages/search/index`, - }) - } - } -}) \ No newline at end of file + }); + }, + }, +}); diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml index 47a6d82..8ad8ac3 100644 --- a/custom-tab-bar/index.wxml +++ b/custom-tab-bar/index.wxml @@ -1,5 +1,5 @@ 首页 - 消息 + 消息 我的 \ No newline at end of file diff --git a/mock/index.js b/mock/index.js index a0700a0..8ad3cef 100644 --- a/mock/index.js +++ b/mock/index.js @@ -1,17 +1,14 @@ -import Mock from './WxMock' +import Mock from './WxMock'; // 导入包含path和data的对象 -import loginMock from './login/index' -import homeMock from './home/index' -import dataCenter from './dataCenter/index' +import loginMock from './login/index'; +import homeMock from './home/index'; +import dataCenter from './dataCenter/index'; +import my from './my/index'; export default () => { // 在这里添加新的mock数据 - const mockData = [ - ...loginMock, - ...homeMock, - ...dataCenter - ] - mockData.forEach(item => { - Mock.mock(item.path, { code: 200, success: true, data: item.data }) - }) -} \ No newline at end of file + const mockData = [...loginMock, ...homeMock, ...dataCenter, ...my]; + mockData.forEach((item) => { + Mock.mock(item.path, { code: 200, success: true, data: item.data }); + }); +}; diff --git a/mock/my/getPersonalInfo.js b/mock/my/getPersonalInfo.js new file mode 100644 index 0000000..b7e5c5c --- /dev/null +++ b/mock/my/getPersonalInfo.js @@ -0,0 +1,29 @@ +export default { + path: '/api/genPersonalInfo', + data: { + code: 200, + message: 'success', + data: { + image: '/../../images/avatar1.png', + name: '小小轩', + star: '天枰座', + city: '深圳', + gender: '男', + birth: '1994-9-27', + address: ['440000', '440300'], + brief: '这是一条个人简介', + photos: [ + { + url: 'https://tdesign.gtimg.com/mobile/demos/example4.png', + name: 'uploaded1.png', + type: 'image', + }, + { + url: 'https://tdesign.gtimg.com/mobile/demos/example6.png', + name: 'uploaded2.png', + type: 'image', + }, + ], + }, + }, +}; diff --git a/mock/my/getServiceList.js b/mock/my/getServiceList.js new file mode 100644 index 0000000..1f386cb --- /dev/null +++ b/mock/my/getServiceList.js @@ -0,0 +1,19 @@ +export default { + path: '/api/getServiceList', + data: { + code: 200, + message: 'success', + data: { + service: [ + { image: '/../images/image.png', name: '微信', type: 'weixin', url: '' }, + { image: '/../images/image(1).png', name: 'QQ', type: 'QQ', url: '' }, + { image: '/../images/image(2).png', name: '腾讯文档', type: 'document', url: '' }, + { image: '/../images/image(3).png', name: '腾讯地图', type: 'map', url: '' }, + { image: '/../images/image(4).png', name: '数据中心', type: 'data', url: '/pages/dataCenter/index' }, + { image: '/../images/image(4).png', name: '数据中心', type: 'data', url: '/pages/dataCenter/index' }, + { image: '/../images/image(4).png', name: '数据中心', type: 'data', url: '/pages/dataCenter/index' }, + { image: '/../images/image(4).png', name: '数据中心', type: 'data', url: '/pages/dataCenter/index' }, + ], + }, + }, +}; diff --git a/mock/my/index.js b/mock/my/index.js new file mode 100644 index 0000000..841a2f6 --- /dev/null +++ b/mock/my/index.js @@ -0,0 +1,4 @@ +import getServiceList from './getServiceList'; +import getPersonalInfo from './getPersonalInfo'; + +export default [getServiceList, getPersonalInfo]; diff --git a/mock/personinfo.js b/mock/personinfo.js deleted file mode 100644 index 6556677..0000000 --- a/mock/personinfo.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - 'api/login':{ - code:200, - message:'success', - data:{ - image:'/../../images/avatar1.png', - name:'小小轩', - star:'天枰座', - city:'深圳', - } - } -} \ No newline at end of file diff --git a/mock/service.js b/mock/service.js deleted file mode 100644 index 8b69d5a..0000000 --- a/mock/service.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - 'api/service':{ - code:200, - message:'success', - data:{ - service:[ - {image:'/../images/image.png',name:'微信',type:'weixin', url: ''}, - {image:'/../images/image(1).png',name:'QQ',type:'QQ', url: ''}, - {image:'/../images/image(2).png',name:'腾讯文档',type:'document', url: ''}, - {image:'/../images/image(3).png',name:'腾讯地图',type:'map', url: ''}, - {image:'/../images/image(4).png',name:'数据中心',type:'data', url: '/pages/dataCenter/index'}, - {image:'/../images/image(4).png',name:'数据中心',type:'data', url: '/pages/dataCenter/index'}, - {image:'/../images/image(4).png',name:'数据中心',type:'data', url: '/pages/dataCenter/index'}, - {image:'/../images/image(4).png',name:'数据中心',type:'data', url: '/pages/dataCenter/index'}, - ], - } - } -} \ No newline at end of file diff --git a/model/genPersonInfo.js b/model/genPersonInfo.js deleted file mode 100644 index b340b83..0000000 --- a/model/genPersonInfo.js +++ /dev/null @@ -1,22 +0,0 @@ -export default function genPersonInfo() { - return { - userName: 'test', - gender: '0', - birth: '1994-9-27', - address: ["440000", "440300"], - brief: '', - photos: [ - { - url: 'https://tdesign.gtimg.com/miniprogram/images/example4.png', - name: 'uploaded1.png', - type: 'image', - }, - { - url: 'https://tdesign.gtimg.com/miniprogram/images/example4.png', - name: 'uploaded2.png', - type: 'image', - }, - ] - } -} - diff --git a/model/search.js b/model/search.js index a2d89cf..f7087ef 100644 --- a/model/search.js +++ b/model/search.js @@ -18,7 +18,7 @@ export function getSearchHistoryMock() { '版权素材', '星空', 'illustration', - 'AI绘画', + '原创', ], }; } diff --git a/package-lock.json b/package-lock.json index f6735c4..2bcdc62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.2", "license": "MIT", "dependencies": { - "tdesign-miniprogram": "^1.2.2" + "tdesign-miniprogram": "^1.8.6" }, "devDependencies": { "eslint": "^8.49.0", @@ -2853,11 +2853,13 @@ } }, "node_modules/tdesign-miniprogram": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tdesign-miniprogram/-/tdesign-miniprogram-1.2.2.tgz", - "integrity": "sha512-VLosGP2ACmf9ckPImp8FFzzZUTnxD6kWoTiHjAzuuQJqz66WHcnuBJHNq0yuXRDybehEcbkH4Naln1sPP27j6w==", + "version": "1.8.6", + "resolved": "https://mirrors.tencent.com/npm/tdesign-miniprogram/-/tdesign-miniprogram-1.8.6.tgz", + "integrity": "sha512-FbV6/1Evfc5qoy7NQPuLwsrnAGytAAbKkPN/eaA02Qe5YxBgsJlYM7oXI5rSiinjjOC6T/wbGTFurEH/ASd+dQ==", + "license": "MIT", "dependencies": { - "dayjs": "^1.10.7" + "dayjs": "^1.10.7", + "tinycolor2": "^1.4.2" } }, "node_modules/text-table": { @@ -2865,6 +2867,11 @@ "dev": true, "license": "MIT" }, + "node_modules/tinycolor2": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", + "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==" + }, "node_modules/titleize": { "version": "3.0.0", "dev": true, @@ -4802,17 +4809,23 @@ } }, "tdesign-miniprogram": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tdesign-miniprogram/-/tdesign-miniprogram-1.2.2.tgz", - "integrity": "sha512-VLosGP2ACmf9ckPImp8FFzzZUTnxD6kWoTiHjAzuuQJqz66WHcnuBJHNq0yuXRDybehEcbkH4Naln1sPP27j6w==", + "version": "1.8.6", + "resolved": "https://mirrors.tencent.com/npm/tdesign-miniprogram/-/tdesign-miniprogram-1.8.6.tgz", + "integrity": "sha512-FbV6/1Evfc5qoy7NQPuLwsrnAGytAAbKkPN/eaA02Qe5YxBgsJlYM7oXI5rSiinjjOC6T/wbGTFurEH/ASd+dQ==", "requires": { - "dayjs": "^1.10.7" + "dayjs": "^1.10.7", + "tinycolor2": "^1.4.2" } }, "text-table": { "version": "0.2.0", "dev": true }, + "tinycolor2": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", + "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==" + }, "titleize": { "version": "3.0.0", "dev": true diff --git a/package.json b/package.json index 9b231c0..522385f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "license": "MIT", "description": "a start-kit for wechat miniprogram powerby TDesign miniprogram", "dependencies": { - "tdesign-miniprogram": "^1.2.2" + "tdesign-miniprogram": "^1.8.6" }, "devDependencies": { "eslint": "^8.49.0", diff --git a/pages/dataCenter/index.js b/pages/dataCenter/index.js index f0b0844..f0cb0f8 100644 --- a/pages/dataCenter/index.js +++ b/pages/dataCenter/index.js @@ -1,8 +1,6 @@ -// pages/dataCenter.js -import request from '../../api/request' +import request from '../../api/request'; Page({ - /** * 页面的初始数据 */ @@ -14,135 +12,93 @@ Page({ interactionSituationDataList: null, interaction_situation_keyList: null, areaDataList: null, - areaDataKeysList : null, + areaDataKeysList: null, memberitemWidth: null, - smallitemWidth: null + smallitemWidth: null, + }, + + onLoad() { + this.init(); + }, + + init() { + this.getMemberData(); + this.getInteractionData(); + this.getCompleteRateData(); + this.getAreaData(); }, /** - * 生命周期函数--监听页面加载 + * 获取 “整体情况” 数据 */ - onLoad(options) { - const that = this; - /** - * 整体情况 - */ - request('/dataCenter/member').then(res => { + getMemberData() { + request('/dataCenter/member').then((res) => { const totalSituationData = res.data.template.succ.data.list; - that.setData({ + this.setData({ totalSituationDataList: totalSituationData, - totalSituationKeysList: Object.keys(totalSituationData[0]) }); // 计算每个.item元素的宽度 const itemWidth = `${(750 - 32 * (totalSituationData.length - 1)) / totalSituationData.length}rpx`; // 更新.item元素的样式 - that.setData({ - memberitemWidth: itemWidth + this.setData({ + memberitemWidth: itemWidth, }); - }) - - - /** - * 互动情况 - */ + }); + }, - request('/dataCenter/interaction').then(res => { + /** + * 获取 “互动情况” 数据 + */ + getInteractionData() { + request('/dataCenter/interaction').then((res) => { const interactionSituationData = res.data.template.succ.data.list; - that.setData({ + this.setData({ interactionSituationDataList: interactionSituationData, - interactionSituationKeysList: Object.keys( interactionSituationData[0]) + interactionSituationKeysList: Object.keys(interactionSituationData[0]), }); // 计算每个.item元素的宽度 const itemWidth = `${(750 - 32 * (interactionSituationData.length - 1)) / interactionSituationData.length}rpx`; // 更新.item元素的样式 - that.setData({ - smallitemWidth: itemWidth + this.setData({ + smallitemWidth: itemWidth, }); + }); + }, - }) - /** - * 完播率 - */ - - request('/dataCenter/complete-rate').then(res => { + /** + * 完播率 + */ + getCompleteRateData() { + request('/dataCenter/complete-rate').then((res) => { const completeRateData = res.data.template.succ.data.list; - that.setData({ + this.setData({ completeRateDataList: completeRateData, - completeRateKeysList: Object.keys(completeRateData[0]) + completeRateKeysList: Object.keys(completeRateData[0]), }); // 计算每个.item元素的宽度 - const itemHeight = `${(380) / completeRateData.length}rpx`; + const itemHeight = `${380 / completeRateData.length}rpx`; // 更新.item元素的样式 - that.setData({ - itemHeight: itemHeight + this.setData({ + itemHeight: itemHeight, }); - }) - - /** - * 按区域统计 - */ - - request("/dataCenter/area").then(res => { - const areaData = res.data.template.succ.data.list; - that.setData({ - areaDataList: areaData, - areaDataKeysList: Object.keys(areaData[0]) - }) - }) - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - + }); }, /** - * 生命周期函数--监听页面卸载 + * 按区域统计 */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - + getAreaData() { + request('/dataCenter/area').then((res) => { + const areaData = res.data.template.succ.data.list; + this.setData({ + areaDataList: areaData, + areaDataKeysList: Object.keys(areaData[0]), + }); + }); }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file +}); diff --git a/pages/dataCenter/index.json b/pages/dataCenter/index.json index fd46f74..a22981a 100644 --- a/pages/dataCenter/index.json +++ b/pages/dataCenter/index.json @@ -1,7 +1,7 @@ { "navigationBarTitleText": "数据中心", "usingComponents": { - "t-cell": "tdesign-miniprogram/cell/cell", - "t-progress": "tdesign-miniprogram/progress/progress" + "t-progress": "tdesign-miniprogram/progress/progress", + "t-empty": "tdesign-miniprogram/empty/empty" } -} \ No newline at end of file +} diff --git a/pages/dataCenter/index.less b/pages/dataCenter/index.less index 456f146..50ea3a2 100644 --- a/pages/dataCenter/index.less +++ b/pages/dataCenter/index.less @@ -1,284 +1,133 @@ -.page { - background-color: rgba(243, 243, 243, 1); - display: flex; +.card { + display: inline-flex; flex-direction: column; - justify-content: space-between; -} -@margin-left-size:32rpx; -@margin-top-size:32rpx; + align-items: flex-start; + gap: 32rpx; + width: 100%; + padding: 24rpx 32rpx 32rpx 32rpx; + box-sizing: border-box; + background-color: #fff; -.first { - position: relative; /* 添加相对定位 */ - width: 750rpx; - height: 240rpx; - opacity: 1; - background: #ffffff; -} -.second{ - position: relative; /* 添加相对定位 */ - margin-top: @margin-top-size; - margin-left: @margin-left-size; - margin-right: 32rpx; - width: auto; - height: 228rpx; + .card-header { + width: 100%; + display: flex; + justify-content: space-between; - border-radius: 9px; - opacity: 1; - background: #ffffff; -} + &__title { + color: rgba(0, 0, 0, 0.9); + font-size: 32rpx; + font-weight: 600; + line-height: 48rpx; + } -.third{ - margin-top: @margin-top-size; - margin-left: @margin-left-size; - margin-right: 32rpx; + &__desc { + color: rgba(0, 0, 0, 0.4); + font-size: 24rpx; + line-height: 40rpx; + } + } - width: auto; - height: 476rpx; - border-radius: 9px; - background: #ffffff; -} -.forth{ - margin-bottom: @margin-top-size; - margin-top: @margin-top-size; - margin-left: @margin-left-size; - margin-right: @margin-left-size; - width: auto; + .card-content { + display: flex; + width: 100%; + align-items: flex-start; + gap: 32rpx; - height: 1000rpx; - border-radius: 9px; - opacity: 1; - background: #ffffff; -} -.total-situation { - position: absolute; /* 添加绝对定位 */ - top: 24rpx; - right: 268rpx; - left: @margin-left-size; /* 距离 first 左侧 32rpx */ - transform: translateY(-50%); /* 垂直居中对齐 */ - width: 450rpx; - height: 48rpx; + &__item { + display: flex; + flex-direction: column; + align-items: flex-start; + flex: 1 0 0; - opacity: 1; - color: #000000e6; - font-size: 16px; - font-weight: 600; - font-family: "PingFang SC"; - text-align: left; - line-height: 24px; -} + &--desc { + color: rgba(0, 0, 0, 0.4); + font-size: 24rpx; + line-height: 40rpx; + } -.accumulated-value { - position: absolute; /* 添加绝对定位 */ - top: 28rpx; - right: 32rpx; - bottom: 172rpx; - transform: translateY(-50%); /* 垂直居中对齐 */ - width: 260rpx; - height: 40rpx; - opacity: 1; - color: #00000066; - font-size: 12px; - font-weight: 400; - font-family: "PingFang SC"; - text-align: left; /* 修改为左对齐 */ - line-height: 20px; -} -.interaction-situation { - position: absolute; /* 添加绝对定位 */ - top: @margin-top-size; - left: @margin-left-size; - width: 56px; - height: 22px; - opacity: 1; - color: rgba(0, 0, 0, 0.9); - font-size: 14px; - font-weight: 600; - font-family: "PingFang SC"; - text-align: left; - line-height: 22px; - } - .per-hour{ - width: 100%; - font-size: 30rpx; - font-family: "PingFang SC"; - text-align: left; - flex-grow: 1; - } - .per-hour-rate{ - width: 100%; - font-size: 30rpx; - font-family: "PingFang SC"; - text-align: left; - flex-grow: 1; - } -.progress{ - margin-top: 24rpx; - margin-left: @margin-left-size; - margin-right: @margin-left-size; - width: auto; - height: 380rpx; - display: flex; + &--count { + font-size: 48rpx; + font-weight: 600; + line-height: 64rpx; + } + } + } } - .total-situation-container { - display: flex; - align-items: center; - width: 684rpx; - height: 100rpx; - opacity: 1; - background: rgb(255, 255, 255); -} -.interaction-situation-container{ - justify-content: space-between; - display: flex; - align-items: flex-start; /* 垂直顶部对齐 */ - width: auto; - height: 48px; - opacity: 1; - background-color: rgb(255, 255, 255); -} -.progress-container{ - margin-left: 16rpx; - margin-right: 32rpx; - width: auto; - height: 380rpx; - flex: 5; -} -.hour-container{ - margin-left: 16rpx; - width: auto; - height: 380rpx; - flex: 1; -} -.num-container { - display: flex; - align-items: center; -} -.scroll-container { - overflow-x: scroll; - white-space: nowrap; - width: 100%; -} -.big-item { - margin-left: @margin-left-size; - margin-top: 200rpx; - justify-content: flex-start; /* 将 item 元素靠左对齐 */ - flex-direction: column; - display: flex; - flex-grow: 1; /* 允许 item 拉伸填充剩余空间 */ +.first { + .card-content { + &__item { + &:first-child { + .card-content__item--count { + color: #0052d9; + } + } + } + } } -.small-item { - display: flex; - margin-top: 100rpx; - margin-left: @margin-left-size; - justify-content: flex-start; /* 将 item 元素靠左对齐 */ - flex-direction: column; - flex-grow: 1; /* 允许 item 拉伸填充剩余空间 */ -} -.num-name { - width: auto; - height: 40rpx; - opacity: 1; - color: #00000066; - font-size: 12px; - font-weight: 400; - font-family: "PingFang SC"; - text-align: left; - line-height: 20px; - } - .complete-rate{ - padding-top: 32rpx; - margin-left: @margin-left-size; - width: auto; - height: 44rpx; +.second, +.third, +.forth { + gap: 24rpx; + padding: 32rpx; + margin: 32rpx 32rpx 0; + width: calc(100% - 64rpx); + border-radius: 9px; - color: rgba(0, 0, 0, 0.9); - font-size: 14px; - font-weight: 600; - font-family: "PingFang SC"; - text-align: left; - line-height: 22px; - } - .big-num{ - width: 62px; - height: 32px; - opacity: 1; - color: #000000e6; - font-size: 24px; - font-weight: 600; - font-family: "PingFang SC"; - text-align: left; - line-height: 32px; - } - .small-num{ - width: auto; - height: 28px; - opacity: 1; - color: rgba(0, 0, 0, 0.9); - font-size: 20px; - font-weight: 600; - font-family: "PingFang SC"; - text-align: left; - line-height: 28px; - } - .table { - border: 2px solid #e7e7e7; - background: #f3f3f3; - margin-left: @margin-left-size; - margin-right: @margin-left-size; - display: inline-block; - margin-top: 24rpx; - border-radius: 10rpx; - overflow: hidden; + .card-header__title { + font-size: 28rpx; + line-height: 44rpx; + } } -.table-cell { - width: 183.5rpx; - height: 79rpx; -} - .white-row { - background-color: white; - border-radius: 10rpx 0 0 10rpx; - display: flex; - height: 79rpx; - opacity: 1; - border-bottom: 0.5px solid #e7e7e7; - background: #ffffff; -} +.second { + .card-content__item--desc { + font-size: 20rpx; + line-height: 32rpx; + } -.gray-row { - height: 79rpx; - border-bottom: 0.5px solid #e7e7e7; - background: #f3f3f3; - border-radius: 0 10rpx 10rpx 0; - display: flex; -} -.area-num{ - margin-left: @margin-left-size; - margin-right: @margin-left-size; - margin-top: 16rpx; - margin-bottom: 16rpx; + .card-content__item--count { + margin-top: 8rpx; + font-size: 40rpx; + line-height: 56rpx; + } - width: 119.5rpx; - height: 44rpx; - opacity: 1; - color: #000000e6; - font-size: 14px; - font-family: "PingFang SC"; - text-align: left; + .unit { + margin-left: 4rpx; + color: rgba(0, 0, 0, 0.6); + font-size: 20rpx; + font-weight: 400; + line-height: 32rpx; + } } -.small-title{ - margin-left: @margin-left-size; - margin-right: @margin-left-size; - margin-top: 16rpx; - margin-bottom: 16rpx; - color: #00000066; - font-size: 14px; - font-weight: 400; - font-family: "PingFang SC"; - text-align: left; + +.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 index 021f738..0558e71 100644 --- a/pages/dataCenter/index.wxml +++ b/pages/dataCenter/index.wxml @@ -1,65 +1,58 @@ - - - 整体情况 - 截止12:00累计数值 - - - {{item.name}} - {{item.number}} - + + + + 整体情况 + 截止12:00累计数值 - - - 互动情况 - - - {{item.name}} - - {{item.number}} - + + + + {{item.name}} + + + {{item.number}} - - 完播率 - - - {{item.time}} - - - - + + + 互动情况 + + + + + {{item.name}} + + + {{item.number}} + - - 按区域统计 - - - - - - - {{item}} - - - - - - - - {{item[keyItem]}} - + + + 完播率 + + + + {{item.time}} + + - - + + + + 按区域统计 + + + + + diff --git a/pages/dataCenter/mock.config.json b/pages/dataCenter/mock.config.json deleted file mode 100644 index f9707b6..0000000 --- a/pages/dataCenter/mock.config.json +++ /dev/null @@ -1 +0,0 @@ -{"useApiMock":true,"apiMockConfig":{"globalOpen":true,"rules":[{"ruleId":"ec53694d-d7d2-4c91-8213-b97d32c1ac5b","ruleName":"按地区统计","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https:\\/\\/example.com\\/ajax\\?dataType=area","filterId":"ad310f1a-18d6-41c5-af01-bc26ee49f031","matchType":"regExp"}],"returnConfig":{"returnType":"succ","generateType":"template","manual":{"succ":{"resStr":"{\n \"data\": \"\",\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": {\n \"list\" : [\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} ,\n {\"标题\" : \"视频A\", \"全球\": \"4442\", \"华北\": \"456\", \"华东\" : \"456\"} \n \n \n ]\n },\n \"statusCode\": 202,\n \"header\": {\n \"content-type\": \"application/json; charset=utf-8\"\n }\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}},{"ruleId":"5fe52405-2d7b-494a-8288-b9b2207c783d","ruleName":"完播率","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https:\\/\\/example.com\\/ajax\\?dataType=complete_rate","filterId":"0944d95b-da09-45ae-888e-de6f9b60a0c0","matchType":"regExp"}],"returnConfig":{"returnType":"succ","generateType":"template","manual":{"succ":{"resStr":"{\n \"data\": \"\",\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": {\n \"list\" : [\n {\"time\" : \"12:00\", \"percentage\": \"80\"} ,\n {\"time\" : \"14:00\", \"percentage\": \"60\"} ,\n {\"time\" : \"16:00\", \"percentage\": \"85\"} ,\n {\"time\" : \"18:00\", \"percentage\": \"43\"} ,\n {\"time\" : \"20:00\", \"percentage\": \"60\"} ,\n {\"time\" : \"22:00\", \"percentage\": \"95\"} \n \n ]\n },\n \"statusCode\": 202,\n \"header\": {\n \"content-type\": \"application/json; charset=utf-8\"\n }\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}},{"ruleId":"cb2da2a0-f9e0-4d87-bb9d-b9c199c3091c","ruleName":"互动情况","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https:\\/\\/example.com\\/ajax\\?dataType=interaction","filterId":"65b0a8de-35dc-485f-b8dd-7b657e59f915","matchType":"regExp"}],"returnConfig":{"returnType":"succ","generateType":"template","manual":{"succ":{"resStr":"{\n \"data\": \"\",\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": {\n \"list\" : [\n {\"name\" : \"浏览量\", \"number\": \"919\"} ,\n {\"name\" : \"点赞量\", \"number\": \"887\"},\n {\"name\" : \"分享量\", \"number\": \"104\"},\n {\"name\" : \"收藏\", \"number\": \"47\"}\n ]\n },\n \"statusCode\": 201,\n \"header\": {\n \"content-type\": \"application/json; charset=utf-8\"\n }\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}},{"ruleId":"af245036-727b-4dcb-971d-4182f9035fd2","ruleName":"整体情况","apiName":"request","enable":true,"verifyFail":false,"filterList":[{"propName":"url","propRegString":"https:\\/\\/example.com\\/ajax\\?dataType=member","filterId":"1e5310c6-28a0-4696-bcb1-8c01cb53886c","matchType":"regExp"}],"returnConfig":{"returnType":"succ","generateType":"template","manual":{"succ":{"resStr":"{\n \"data\": \"\",\n \"statusCode\": \"\",\n \"header\": \"\"\n}"},"fail":{"resStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}},"template":{"succ":{"templateStr":"{\n \"data\": {\n \"list\" : [\n {\"name\" : \"浏览量\", \"number\": \"202W\"} ,\n {\"name\" : \"PV\", \"number\": \"233W\"},\n {\"name\" : \"UV\", \"number\": \"102W\"}\n ]\n },\n \"statusCode\": 200,\n \"header\": {\n \"content-type\": \"application/json; charset=utf-8\"\n }\n}"},"fail":{"templateStr":"{\n \"errMsg\": \"request:fail 填写错误信息\"\n}"}}}}]}} \ No newline at end of file diff --git a/pages/home/index.js b/pages/home/index.js index fb0e467..f5e7230 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -24,6 +24,7 @@ Page({ this.setData({ cardInfo: cardRes.data, + focusCardInfo: cardRes.data.slice(0,3), swiperList: swiperRes.data }) @@ -35,8 +36,14 @@ Page({ canIUseGetUserProfile: true, }); } - if (option.release && option.release === 'success') { - this.showReleaseMsg(); + if (option.oper) { + let content = ''; + if (option.oper === 'release') { + content = '发布成功' + } else if (option.oper === 'save') { + content = '保存成功' + } + this.showOperMsg(content); } }, onRefresh() { @@ -59,12 +66,12 @@ Page({ }); }, 1500); }, - showReleaseMsg() { + showOperMsg(content) { Message.success({ context: this, offset: [20, 32], duration: 4000, - content: '发布成功', + content, }); }, goRelease() { diff --git a/pages/home/index.wxml b/pages/home/index.wxml index fefb07c..ddc90e3 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -11,13 +11,17 @@ - + + + - 发布 + + 发布 + diff --git a/pages/login/login.js b/pages/login/login.js index 07d6d28..ffb18d1 100644 --- a/pages/login/login.js +++ b/pages/login/login.js @@ -1,10 +1,6 @@ import request from '../../api/request'; -// pages/login/login.js Page({ - /** - * 页面的初始数据 - */ data: { phoneNumber: '', isPhoneNumber: false, @@ -15,11 +11,8 @@ Page({ account: '', password: '', }, + radioValue: '', }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) {}, /* 自定义功能函数 */ changeSubmit() { @@ -35,6 +28,7 @@ Page({ this.setData({ isSubmit: false }); } }, + // 手机号变更 onPhoneInput(e) { const isPhoneNumber = /^[1][3,4,5,7,8,9][0-9]{9}$/.test(e.detail.value); @@ -44,23 +38,32 @@ Page({ }); this.changeSubmit(); }, + // 用户协议选择变更 - onCheckChange() { - this.setData({ isCheck: !this.data.isCheck }); + onCheckChange(e) { + const { value } = e.detail; + this.setData({ + radioValue: value, + isCheck: value === 'agree', + }); this.changeSubmit(); }, + onAccountChange(e) { this.setData({ passwordInfo: { ...this.data.passwordInfo, account: e.detail.value } }); this.changeSubmit(); }, + onPasswordChange(e) { this.setData({ passwordInfo: { ...this.data.passwordInfo, password: e.detail.value } }); this.changeSubmit(); }, + // 切换登录方式 changeLogin() { this.setData({ isPasswordLogin: !this.data.isPasswordLogin, isSubmit: false }); }, + async login() { if (this.data.isPasswordLogin) { const res = await request('/login/postPasswordLogin', 'post', { data: this.data.passwordInfo }); diff --git a/pages/login/login.json b/pages/login/login.json index 5edc950..8177694 100644 --- a/pages/login/login.json +++ b/pages/login/login.json @@ -4,6 +4,8 @@ "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-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/login/login.less b/pages/login/login.less index 1b67d98..34a2082 100644 --- a/pages/login/login.less +++ b/pages/login/login.less @@ -1,147 +1,91 @@ -/* pages/login/login.wxss */ -@import '/variable.less'; - -.headline { - color: @gy1; - font-size: @headline-medium; - font-weight: 600; - line-height: 36px; - font-family: "PingFang SC"; - opacity: 1; - text-align: left; -} - -.body-large { - color: @gy1; - font-size: @body-large; - font-weight: 400; - font-family: "PingFang SC"; - text-align: left; - line-height: 24px; -} - -.welcome { - .headline(); - width: 231px; - height: 36px; - margin: 8px auto 16px 20px; -} - -.phone { - display: flex; - align-items: center; - height: 56px; - width: 100%; - margin-top: 8px; - margin-left: 16px; - border-bottom: 0.5px solid @gray3; - - .area-code { - display: inline-block; - width: 65px; - height: 56px; - opacity: 1; - - .code { - .body-large(); - width: 65px; - height: 24px; - opacity: 1; - margin: 16px 0; - border-right: 0.5px solid @gray3; +.login { + &__title { + color: rgba(0, 0, 0, 0.9); + font-size: 56rpx; + font-weight: 600; + line-height: 72rpx; + padding: 16rpx 32rpx 40rpx; + } - .t-icon { - display: inline-block; - } + &__input { + .input-label { + display: flex; + padding-right: 32rpx; + box-sizing: border-box; + border-right: 1rpx solid #e7e7e7; } - .caret-down-small { - position: absolute; + .input-icon { + margin-left: 8rpx; } } - .phone-input { - display: inline-block; - margin-left: 1px; + &__tips { + color: rgba(0, 0, 0, 0.4); + font-size: 24rpx; + font-style: normal; + font-weight: 400; + line-height: 40rpx; + margin: 24rpx 32rpx 32rpx; + } - .t-input { - background-color: transparent; + &__button { + margin: 0 32rpx; + } - &--border::after { - height: 0; - } - } + &__password--forget { + display: flex; + font-size: 24rpx; + align-items: center; + margin: 32rpx; + line-height: 40rpx; } -} -.login-tip { - width: 204px; - height: 20px; - opacity: 1; - color: @gy3; - font-size: @body-small; - font-weight: 400; - font-family: "PingFang SC"; - text-align: left; - line-height: 20px; - margin-left: 16px; - margin-top: 12px; -} + &__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; + } -.user-agreement { - margin-top: 32px; - margin-left: 17px; - height: 20px; - width: 117px; - display: flex; + &-buttons { + flex: 1; + margin-left: 32rpx; + display: flex; + align-items: center; + justify-content: flex-end; - .agreement-check { - color: @brand7-normal; - } + .button { + margin: 0 !important; - .agreement-text { - color: @gy1; - font-size: @body-small; - font-weight: 400; - height: 100%; - margin-left: 5px; + &:not(:last-child) { + margin-right: 32rpx !important; + } + } + } } -} - -.login-button { - margin: 16px; -} -.others { - position: relative; - left: 50%; - transform: translateX(-50%); - height: 40px; - margin: 32px 16px auto 16px; - display: flex; - align-items: center; + // 覆盖组件样式 + .radio-class { + --td-radio-icon-size: 32rpx; + --td-radio-label-line-height: 40rpx; - &-text { - color: @gy2; - font-size: @body-small; + align-items: center; } - &-login { - margin: 8px; - - .t-button { - width: 111px; - } + .radio-class-icon { + margin-top: 0 !important; } - &-icon { - margin: 8px; + .radio-class-label { + margin-left: 8rpx !important; + font-size: 24rpx !important; + line-height: 40rpx !important; } } - -.forget-password { - display: flex; - font-size: @body-small; - align-items: center; - margin-left: 16px; -} \ No newline at end of file diff --git a/pages/login/login.wxml b/pages/login/login.wxml index 319b18c..ddb70d2 100644 --- a/pages/login/login.wxml +++ b/pages/login/login.wxml @@ -1,36 +1,49 @@ - -欢迎登录 TDsign - - - - +86 - + \ No newline at end of file diff --git a/pages/my/index.js b/pages/my/index.js index a9f03c7..4da5f23 100644 --- a/pages/my/index.js +++ b/pages/my/index.js @@ -1,41 +1,51 @@ -const ServiceMockData = require('../../mock/service.js') -const LoginMockData = require('../../mock/personinfo.js') +import request from '../../api/request'; Page({ data: { - logs: [], - image: '', - isLoad:false, - name:'', - star:'', - city:'', - service:[], - settingdata:[ - {name:'联系客服',icon:'service',type:'service'}, - {name:'设置',icon:'setting',type:'setting'}, - ] + isLoad: false, + service: [], + personalInfo: {}, + settingdata: [ + { name: '联系客服', icon: 'service', type: 'service' }, + { name: '设置', icon: 'setting', type: 'setting' }, + ], }, + onLoad() { - this.setData({service:ServiceMockData['api/service'].data.service}) + this.getServiceList(); }, - onShow(){ + + async onShow() { const Token = wx.getStorageSync('access_token'); - const {image,name,star,city} = LoginMockData['api/login'].data - if(Token) + const personalInfo = await this.getPersonalInfo(); + + if (Token) { this.setData({ - isLoad:true, - image:image, - name:name, - star:star, - city:city, - }) + isLoad: true, + personalInfo, + }); + } + }, + + getServiceList() { + request('/api/getServiceList').then((res) => { + const { service } = res.data.data; + this.setData({ service }); + }); }, - Login(e){ + + async getPersonalInfo() { + const info = await request('/api/genPersonalInfo').then((res) => res.data.data); + return info; + }, + + onLogin(e) { wx.navigateTo({ url: '/pages/login/login', - }) + }); }, - GotoEdit(){ + + onNavigateTo() { wx.navigateTo({ url: `/pages/my/info-edit/index` }); }, -}) +}); diff --git a/pages/my/index.json b/pages/my/index.json index 0ea6597..ffb2079 100644 --- a/pages/my/index.json +++ b/pages/my/index.json @@ -1,4 +1,5 @@ { + "navigationStyle": "custom", "usingComponents": { "t-cell": "tdesign-miniprogram/cell/cell", "t-cell-group": "tdesign-miniprogram/cell-group/cell-group", @@ -9,7 +10,7 @@ "t-navbar": "tdesign-miniprogram/navbar/navbar", "t-grid": "tdesign-miniprogram/grid/grid", "t-grid-item": "tdesign-miniprogram/grid-item/grid-item", + "t-tag": "tdesign-miniprogram/tag/tag", "nav": "/components/nav" - }, - "navigationStyle": "custom" -} \ No newline at end of file + } +} diff --git a/pages/my/index.less b/pages/my/index.less index e0ccc18..6bd0025 100644 --- a/pages/my/index.less +++ b/pages/my/index.less @@ -1,202 +1,93 @@ -@import '/variable.less'; +.my { + height: calc(100vh - 56px); + overflow-y: auto; -page{ - height: 100%; -} -.container{ - - height: calc(100% - @tab-bar-height); - opacity: 1; - background: @bg-color; - padding: 0rpx 0rpx !important; - justify-content: start !important; - overflow: auto; -} -.nav-bar { - border-bottom: 1rpx solid #e7e7e7; -} -.info{ - border-radius: 12px; - background: @bg-color-white; - margin: 0rpx 32rpx 0rpx 32rpx; -} -.person-info{ - width: 686rpx; - opacity: 1; - margin-top: 32rpx; - margin-bottom: 42rpx; -} -.avatar { - border-radius: 999rpx; - opacity: 1; - margin:0rpx 32rpx 0rpx 32rpx !important; -} -.icon{ - width: 128rpx !important; - height: 128rpx !important; - border-radius: 999rpx; - opacity: 1; - margin:32rpx 32rpx !important; - background: #D9E1FF; - color: #0052d9; -} -.icon .t-icon{ - margin: 32rpx; - height: 64rpx; - padding-top: 6rpx; -} -.icon .t-icon-base{ - margin: 32rpx !important; -} -.cell-group .t-cell{ - height: 128rpx; - padding: 0rpx 0rpx !important; -} -.t-cell__left{ - margin-right: 0rpx !important; -} -.my_cell_box .t-cell__title-text{ - font-weight: 600 !important; -} -.t-cell__title-text{ - color: #000000e6 !important; - font-size: 32rpx !important; - font-weight: 400; - font-family: "PingFang SC"; - text-align: left; - line-height: 48rpx; - } -.t-class-icon-edit{ - margin: 44rpx 32rpx !important; -} -.my_cell .t-cell__right{ - margin-left: 0rpx !important; -} -.t-icon-edit{ - margin: 0rpx; - opacity: 1; - font-size: 40rpx; - color: #000000e6; -} -.person-name{ - width: 390rpx; - height: 104rpx; - opacity: 1; - color: #000000e6; - font-size: 32rpx; - font-weight: 600; - font-family: "PingFang SC"; -} -.name{ - width: 390rpx; - height: 48rpx; -} -.person-tag{ - display: flex; - margin-top: 8px; -} -.star{ - border-radius: 3rpx; - opacity: 1; - background: #f3f3f3; - display: flex; - margin-right: 16rpx; -} -.city{ - border-radius: 3rpx; - opacity: 1; - background: #f3f3f3; - display: flex; - margin-right: 16rpx; -} -.icon-star{ - display: inline-block !important; - padding: 8rpx 4rpx 8rpx 12rpx; - font-size: 24rpx; -} -.name-star{ - display: inline-block !important; - opacity: 1; - color: #000000e6; - font-size: 20rpx; - font-weight: 400; - font-family: "PingFang SC"; - text-align: center; - line-height: 32rpx; - padding: 4rpx 12rpx 4rpx 0rpx; -} -.all{ - border-right: 1px solid #e7e7e7; -} -.block-box { - display: block; - margin-bottom: 32rpx; - margin-top: 38rpx; -} -.grid-item__image { - --td-button-medium-icon-font-size: 48rpx; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - background: #f3f3f3; - border-radius: 12rpx; -} -.item .t-grid-item__content{ - padding: 0px !important; -} -.service{ - border-radius: 24rpx; - opacity: 1; - background: @bg-color-white; - margin: 32rpx 32rpx 0rpx 32rpx; -} -.service-item .t-grid-item__content{ - padding-bottom: 16rpx !important; -} -.t-grid-item__text{ - height: 40rpx !important; -} -.block{ - margin-bottom: 4px; -} -.tip{ - width: auto; - height: 44rpx; - margin-top: 32rpx; - opacity: 1; - color: #000000e6; - font-size: 28rpx; - font-weight: 600; - font-family: "PingFang SC"; - text-align: left; - line-height: 44rpx; - padding-left: 40rpx; -} -.setting{ - height: auto; - border-radius: 24rpx !important; - opacity: 1; - margin: 36rpx 32rpx 0rpx 32rpx; - background: @bg-color-white; -} -.set-group{ - width:686rpx; - border-radius: 24rpx; - margin: 0rpx !important; -} -.set-group .t-cell__left{ - margin-right: 24rpx !important; + --td-navbar-bg-color: #f5f6f7; + + &-info, + &-service, + &-setting { + background-color: #fff; + } + + &-info { + border-radius: 24rpx; + margin: 0rpx 32rpx 0rpx 32rpx; + padding-bottom: 32rpx; + overflow: hidden; + + .cell-class-title { + font-weight: 600 !important; + } + + .cell-class-center { + display: flex; + align-items: center !important; + } + + .divider-class { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .grid-class { + margin-top: 40rpx; + } + + .grid-item .t-grid-item__content { + padding: 0px !important; + } + + .split-line { + border-right: 2rpx solid #e7e7e7; + } + + &__person { + width: 390rpx; + height: 104rpx; + opacity: 1; + color: #000000e6; + font-size: 32rpx; + font-weight: 600; + + .name { + line-height: 48rpx; + } + + .tags { + display: flex; + margin-top: 16px; + } + + .tag:not(:last-child) { + margin-right: 16rpx; + } + } + } + + &-service { + border-radius: 24rpx; + margin: 32rpx; + padding-bottom: 8rpx; + overflow: hidden; + + &__list-item { + .t-grid-item__content { + padding-bottom: 16rpx !important; + } + .t-grid-item__text { + height: 40rpx !important; + } + } + + &--tips { + height: 44rpx; + line-height: 44rpx; + padding-left: 40rpx; + margin-top: 32rpx; + color: #000000e6; + font-size: 28rpx; + font-weight: 600; + } + } } -.cell-note{ - width: 470rpx; - height: 48rpx; - opacity: 1; - color: #000000e6; - font-size: 32rpx; - font-weight: 400; - font-family: "PingFang SC"; - text-align: left; - line-height: 48rpx; -} \ No newline at end of file diff --git a/pages/my/index.wxml b/pages/my/index.wxml index 73fb5fd..486a62b 100644 --- a/pages/my/index.wxml +++ b/pages/my/index.wxml @@ -1,60 +1,56 @@ - - -