diff --git a/miniprogram/app.json b/miniprogram/app.json index 59131d5..30058d3 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -1,12 +1,16 @@ { "pages": [ "pages/index/index", - "pages/logs/logs" + "pages/logs/logs", + "pages/home/home", + "pages/chat/chat", + "pages/user/user", + "pages/user-login/user-login" ], "window": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "Weixin", - "navigationBarBackgroundColor": "#ffffff" + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#f5f7fa" }, "componentFramework": "glass-easel", "lazyCodeLoading": "requiredComponents" diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss index 06c6fc9..25b5dff 100644 --- a/miniprogram/app.wxss +++ b/miniprogram/app.wxss @@ -1,10 +1,5 @@ -/**app.wxss**/ -.container { - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-between; - padding: 200rpx 0; - box-sizing: border-box; -} +@import "./theme.wxss"; +page { + height: 100vh; + background-color: #f5f7fa; /* 与容器背景保持一致 */ +} diff --git a/miniprogram/pages/chat/chat.json b/miniprogram/pages/chat/chat.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/pages/chat/chat.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/pages/chat/chat.ts b/miniprogram/pages/chat/chat.ts new file mode 100644 index 0000000..56987ac --- /dev/null +++ b/miniprogram/pages/chat/chat.ts @@ -0,0 +1,8 @@ +Component({ + data: { + + }, + methods: { + + }, +}) diff --git a/miniprogram/pages/chat/chat.wxml b/miniprogram/pages/chat/chat.wxml new file mode 100644 index 0000000..027dff1 --- /dev/null +++ b/miniprogram/pages/chat/chat.wxml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + 王小明 + 10:23 + + + 我们明天上午9点在公司楼下集合吧 + + + + + + + + + + + + 产品研发群 + 昨天 + + + 李设计:新的UI稿已经上传到群文件了 + + + + + + + + + 3 + + + + 系统通知 + 周一 + + + 您有3条新的系统通知待查看 + + + + + + + + + + + + 张小红 + 09-12 + + + 上次你说的那个电影资源能发我一下吗? + + + + + + + + + + + + 生活服务号 + 09-10 + + + 您订阅的服务已更新,点击查看详情 + + + + + + \ No newline at end of file diff --git a/miniprogram/pages/chat/chat.wxss b/miniprogram/pages/chat/chat.wxss new file mode 100644 index 0000000..623ec5c --- /dev/null +++ b/miniprogram/pages/chat/chat.wxss @@ -0,0 +1,149 @@ +/* 消息列表容器 */ +.message-container { + background-color: #f5f5f7; + min-height: 100vh; +} + +/* 搜索栏样式 */ +.search-bar { + padding: 16rpx 24rpx; + background-color: #f5f5f7; +} + +.search-input { + display: flex; + align-items: center; + background-color: #eaeaea; + border-radius: 30rpx; + padding: 14rpx 24rpx; +} + +.search-input input { + margin-left: 12rpx; + font-size: 28rpx; + flex: 1; + color: #333; + height: 40rpx; + line-height: 40rpx; +} + +.placeholder-style { + color: #999; +} + +/* 消息列表滚动区域 */ +.message-list { + height: calc(100vh - 96rpx); /* 减去搜索栏高度 */ + width: 100%; +} + +/* 消息项样式 - 已调整高度 */ +.message-item { + display: flex; + padding: 16rpx 24rpx; /* 减少内边距 */ + background-color: #fff; + border-bottom: 1rpx solid #f1f1f1; + align-items: center; + transition: background-color 0.2s; + height: 120rpx; /* 固定消息项高度 */ +} + +.message-item:active { + background-color: #f5f5f5; +} + +/* 头像容器 */ +.avatar-container { + position: relative; + margin-right: 20rpx; +} + +/* 头像样式 - 缩小尺寸 */ +.avatar { + width: 80rpx; + height: 80rpx; + border-radius: 16rpx; +} + +/* 未读提示 */ +.unread-dot { + position: absolute; + right: 0; + top: 0; + width: 24rpx; + height: 24rpx; + background-color: #ff4d4f; + border-radius: 50%; + border: 4rpx solid #fff; +} + +/* 未读数量 */ +.unread-count { + position: absolute; + right: 0; + top: 0; + min-width: 28rpx; + height: 28rpx; + line-height: 28rpx; + background-color: #ff4d4f; + border-radius: 14rpx; + border: 4rpx solid #fff; + color: #fff; + font-size: 20rpx; + text-align: center; + padding: 0 8rpx; +} + +/* 消息内容区域 */ +.message-content { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; +} + +/* 内容顶部(用户名和时间) */ +.content-top { + display: flex; + justify-content: space-between; + margin-bottom: 6rpx; /* 减少间距 */ +} + +.username { + font-size: 30rpx; + color: #333; + font-weight: 500; + max-width: 400rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.time { + font-size: 24rpx; + color: #999; +} + +/* 内容底部(最后一条消息) */ +.content-bottom { + display: flex; + justify-content: space-between; + align-items: center; +} + +.last-message { + font-size: 26rpx; /* 缩小字体 */ + color: #666; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; + flex: 1; +} + +/* 群聊消息中的发送者 */ +.sender { + color: #677fff; + margin-right: 4rpx; +} diff --git a/miniprogram/pages/home/home.json b/miniprogram/pages/home/home.json new file mode 100644 index 0000000..e0535a1 --- /dev/null +++ b/miniprogram/pages/home/home.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "t-divider": "tdesign-miniprogram/divider/divider", + "t-search": "tdesign-miniprogram/search/search" + } +} \ No newline at end of file diff --git a/miniprogram/pages/home/home.ts b/miniprogram/pages/home/home.ts new file mode 100644 index 0000000..56987ac --- /dev/null +++ b/miniprogram/pages/home/home.ts @@ -0,0 +1,8 @@ +Component({ + data: { + + }, + methods: { + + }, +}) diff --git a/miniprogram/pages/home/home.wxml b/miniprogram/pages/home/home.wxml new file mode 100644 index 0000000..f155a51 --- /dev/null +++ b/miniprogram/pages/home/home.wxml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + 进行中 + + + + + + 午餐该选哪个?好纠结啊! + 大家帮我投个票吧,选择困难症又犯了... + + + + + + + + + + + + 麻辣烫 + 鲜香麻辣,越吃越开胃 + + + 42% + + + + + + + + + + + + + + + + + + 汉堡套餐 + 快捷方便,配冰可乐 + + + 28% + + + + + + + + + + + + + + + + + + 沙拉轻食 + 健康低卡,适合减脂 + + + 30% + + + + + + + + + + + + + 已有 126 人参与投票 + 剩余 23 小时结束 + + + + + + + + + \ No newline at end of file diff --git a/miniprogram/pages/home/home.wxss b/miniprogram/pages/home/home.wxss new file mode 100644 index 0000000..3d7adcf --- /dev/null +++ b/miniprogram/pages/home/home.wxss @@ -0,0 +1,291 @@ +/* 引入通用样式 */ +.container { + display: flex; + justify-content: center; + align-items: center; + min-height: 100vh; + background-color: #f5f7fa; + padding: 20rpx; +} + +.search-bar { + padding: 16rpx 24rpx; + background-color: #f5f5f7; +} + +.search-input { + display: flex; + align-items: center; + background-color: #eaeaea; + border-radius: 30rpx; + padding: 14rpx 24rpx; +} + +.search-input input { + margin-left: 12rpx; + font-size: 28rpx; + flex: 1; + color: #333; + height: 40rpx; + line-height: 40rpx; +} + +/* 投票卡片卡片样式 */ +.voting-card { + width: 90%; + + background-color: #ffffff; + border-radius: 24rpx; + box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05); + overflow: hidden; +} + +/* 卡片头部样式 */ +.card-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 30rpx; +} + +.user-info { + display: flex; + align-items: center; +} + +.avatar { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + margin-right: 20rpx; +} + +.username { + display: block; + font-size: 32rpx; + font-weight: 600; + color: #333333; + margin-bottom: 4rpx; +} + +.user-status { + display: block; + font-size: 24rpx; + color: #888888; +} + +.vote-status { + background-color: rgba(79, 70, 229, 0.1); + color: #4F46E5; + font-size: 24rpx; + padding: 8rpx 16rpx; + border-radius: 20rpx; +} + +.divider { + height: 2rpx; + background-color: #f5f5f5; +} + +/* 投票标题区域 */ +.vote-title-section { + padding: 0 30rpx 30rpx; +} + +.vote-title { + display: block; + font-size: 36rpx; + font-weight: 700; + color: #333333; + margin-bottom: 16rpx; +} + +.vote-desc { + font-size: 26rpx; + color: #888888; +} + +/* 选项区域样式 */ +.options-container { + padding: 0 30rpx 20rpx; +} + +.option-item { + position: relative; + padding: 24rpx; + border: 2rpx solid #f0f0f0; + border-radius: 16rpx; + margin-bottom: 20rpx; + transition: all 0.3s; +} + +.option-item.selected { + border-color: #4F46E5; + background-color: rgba(79, 70, 229, 0.05); +} + +.option-item:hover { + border-color: rgba(79, 70, 229, 0.3); + background-color: rgba(79, 70, 229, 0.03); +} + +.option-info { + display: flex; + align-items: center; + margin-bottom: 16rpx; +} + +.option-icon { + width: 64rpx; + height: 64rpx; + border-radius: 12rpx; + display: flex; + justify-content: center; + align-items: center; + margin-right: 20rpx; +} + +.bg-red { + background-color: rgba(248, 113, 113, 0.1); + color: #ef4444; +} + +.bg-yellow { + background-color: rgba(251, 191, 36, 0.1); + color: #f59e0b; +} + +.bg-green { + background-color: rgba(34, 197, 94, 0.1); + color: #10b981; +} + +.option-details { + flex: 1; +} + +.option-name { + display: block; + font-size: 30rpx; + font-weight: 600; + color: #333333; + margin-bottom: 4rpx; +} + +.option-desc { + font-size: 24rpx; + color: #888888; +} + +.option-percent { + font-size: 28rpx; + font-weight: 600; + color: #333333; +} + +/* 进度条样式 */ +.progress-bar { + height: 12rpx; + background-color: #f0f0f0; + border-radius: 6rpx; + overflow: hidden; +} + +.progress-value { + height: 100%; + background-color: #4F46E5; + border-radius: 6rpx; + transition: width 0.5s ease-out; +} + +/* 选中指示器 */ +.vote-indicator { + position: absolute; + top: 24rpx; + right: 24rpx; + color: #4F46E5; + font-size: 36rpx; + display: none; +} + +.vote-indicator.show { + display: block; +} + +/* 投票统计信息 */ +.vote-stats { + display: flex; + justify-content: space-between; + padding: 0 30rpx 20rpx; +} + +.stats-text { + font-size: 24rpx; + color: #888888; +} + +/* 投票按钮 */ +.vote-btn { + width: calc(100% - 60rpx); + margin: 0 30rpx 30rpx; + padding: 24rpx 0; + background-color: #4F46E5; + color: #ffffff; + border-radius: 16rpx; + font-size: 30rpx; + font-weight: 600; + display: flex; + justify-content: center; + align-items: center; + transition: all 0.3s; +} + +.vote-btn .iconfont { + margin-right: 12rpx; + font-size: 32rpx; +} + +.vote-btn::after { + border: none; +} + +.vote-btn:hover { + background-color: rgba(79, 70, 229, 0.9); +} + +.vote-btn:active { + transform: scale(0.98); +} + +/* 成功提示 */ +.success-toast { + position: fixed; + top: 50rpx; + left: 50%; + transform: translateX(-50%); + background-color: #10b981; + color: #ffffff; + padding: 16rpx 32rpx; + border-radius: 8rpx; + display: flex; + align-items: center; + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); + z-index: 999; + opacity: 0; + pointer-events: none; + transition: opacity 0.3s; +} + +.success-toast.show { + opacity: 1; + pointer-events: auto; +} + +.success-toast .iconfont { + margin-right: 12rpx; + font-size: 32rpx; +} + +.toast-text { + font-size: 28rpx; +} diff --git a/miniprogram/pages/index/index.json b/miniprogram/pages/index/index.json index da897b1..ab25c5b 100644 --- a/miniprogram/pages/index/index.json +++ b/miniprogram/pages/index/index.json @@ -1,5 +1,10 @@ { "usingComponents": { - "t-button": "tdesign-miniprogram/button/button" + "t-button": "tdesign-miniprogram/button/button", + "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar", + "t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item", + "home-component":"/pages/home/home", + "chat-component":"/pages/chat/chat", + "user-component":"/pages/user/user" } } \ No newline at end of file diff --git a/miniprogram/pages/index/index.ts b/miniprogram/pages/index/index.ts index c7aaf97..f42008c 100644 --- a/miniprogram/pages/index/index.ts +++ b/miniprogram/pages/index/index.ts @@ -1,54 +1,20 @@ // index.ts // 获取应用实例 const app = getApp() -const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0' - Component({ data: { - motto: 'Hello World', - userInfo: { - avatarUrl: defaultAvatarUrl, - nickName: '', - }, - hasUserInfo: false, - canIUseGetUserProfile: wx.canIUse('getUserProfile'), - canIUseNicknameComp: wx.canIUse('input.type.nickname'), + label_value: 'label_1', + list: [ + { label_value: 'label_1', icon: 'home', ariaLabel: '首页' }, + { label_value: 'label_2', icon: 'chat', ariaLabel: '聊天' }, + { label_value: 'label_3', icon: 'user', ariaLabel: '我的' }, + ], }, methods: { - // 事件处理函数 - bindViewTap() { - wx.navigateTo({ - url: '../logs/logs', - }) - }, - onChooseAvatar(e: any) { - const { avatarUrl } = e.detail - const { nickName } = this.data.userInfo + onChange(e: { detail: { value: any; }; }) { this.setData({ - "userInfo.avatarUrl": avatarUrl, - hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl, - }) - }, - onInputChange(e: any) { - const nickName = e.detail.value - const { avatarUrl } = this.data.userInfo - this.setData({ - "userInfo.nickName": nickName, - hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl, - }) - }, - getUserProfile() { - // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗 - wx.getUserProfile({ - desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 - success: (res) => { - console.log(res) - this.setData({ - userInfo: res.userInfo, - hasUserInfo: true - }) - } - }) + label_value: e.detail.value, + }); }, }, }) diff --git a/miniprogram/pages/index/index.wxml b/miniprogram/pages/index/index.wxml index 150dfe4..6c104a4 100644 --- a/miniprogram/pages/index/index.wxml +++ b/miniprogram/pages/index/index.wxml @@ -1,4 +1,16 @@ - 按钮 + + + + + + + diff --git a/miniprogram/pages/user-login/user-login.json b/miniprogram/pages/user-login/user-login.json new file mode 100644 index 0000000..a58a07a --- /dev/null +++ b/miniprogram/pages/user-login/user-login.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "t-button": "tdesign-miniprogram/button/button", + "t-avatar": "tdesign-miniprogram/avatar/avatar", + "t-avatar-group": "tdesign-miniprogram/avatar-group/avatar-group" + } +} \ No newline at end of file diff --git a/miniprogram/pages/user-login/user-login.ts b/miniprogram/pages/user-login/user-login.ts new file mode 100644 index 0000000..0340602 --- /dev/null +++ b/miniprogram/pages/user-login/user-login.ts @@ -0,0 +1,37 @@ +Component({ + data: { + image: 'https://tdesign.gtimg.com/mobile/demos/avatar1.png', + }, + methods: { + wxPhone(e: { detail: any; }){ + console.log("授权回调结果:", e.detail); + if (e.detail.errMsg === "getPhoneNumber:ok") { + const { encryptedData, iv, code } = e.detail; + wx.request({ + url: "http://localhost:9096/user/login", + method: "POST", + data: { + encryptedData, + iv, + code, + }, + success(res) { + if (res.data.success) { + // 登录成功,存储用户信息并跳转首页 + wx.setStorageSync("userInfo", res.data.userInfo); + wx.navigateTo({ url: "/pages/index/index" }); + } else { + wx.showToast({ title: "登录失败", icon: "none" }); + } + }, + fail() { + wx.showToast({ title: "网络错误", icon: "none" }); + } + }); + } else { + // 用户拒绝授权 + wx.showToast({ title: "请允许授权以完成登录", icon: "none" }); + } + } + }, +}) diff --git a/miniprogram/pages/user-login/user-login.wxml b/miniprogram/pages/user-login/user-login.wxml new file mode 100644 index 0000000..1f2da8f --- /dev/null +++ b/miniprogram/pages/user-login/user-login.wxml @@ -0,0 +1,8 @@ + + + + + + 授权手机号登录 + 手机号登录 + \ No newline at end of file diff --git a/miniprogram/pages/user-login/user-login.wxss b/miniprogram/pages/user-login/user-login.wxss new file mode 100644 index 0000000..399c35d --- /dev/null +++ b/miniprogram/pages/user-login/user-login.wxss @@ -0,0 +1,15 @@ +.avatar-box{ + width: 100vw; + height: 30vh; + display: flex; + justify-content: center; + align-items: center; +} + +.button { + margin: 0 32rpx; + display: flex; + flex-direction: column; /* 垂直排列子元素 */ + align-items: center; /* 水平居中子元素 */ + gap: 2vh; +} \ No newline at end of file diff --git a/miniprogram/pages/user/user.json b/miniprogram/pages/user/user.json new file mode 100644 index 0000000..03828e3 --- /dev/null +++ b/miniprogram/pages/user/user.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "t-grid": "tdesign-miniprogram/grid/grid", + "t-grid-item": "tdesign-miniprogram/grid-item/grid-item", + "t-avatar": "tdesign-miniprogram/avatar/avatar", + "t-avatar-group": "tdesign-miniprogram/avatar-group/avatar-group" + } +} \ No newline at end of file diff --git a/miniprogram/pages/user/user.ts b/miniprogram/pages/user/user.ts new file mode 100644 index 0000000..a7e8510 --- /dev/null +++ b/miniprogram/pages/user/user.ts @@ -0,0 +1,13 @@ +Component({ + data: { + img1: 'https://tdesign.gtimg.com/mobile/demos/example1.png', + img2: 'https://tdesign.gtimg.com/mobile/demos/example2.png', + img3: 'https://tdesign.gtimg.com/mobile/demos/example3.png', + image: 'https://tdesign.gtimg.com/mobile/demos/avatar1.png', + }, + methods: { + userlogin(){ + wx.navigateTo({url:'/pages/user-login/user-login'}) + } + }, +}) diff --git a/miniprogram/pages/user/user.wxml b/miniprogram/pages/user/user.wxml new file mode 100644 index 0000000..12ba346 --- /dev/null +++ b/miniprogram/pages/user/user.wxml @@ -0,0 +1,13 @@ + + + + 点击登录/注册 + + + + + + + + + \ No newline at end of file diff --git a/miniprogram/pages/user/user.wxss b/miniprogram/pages/user/user.wxss new file mode 100644 index 0000000..62ba488 --- /dev/null +++ b/miniprogram/pages/user/user.wxss @@ -0,0 +1,20 @@ +.user-avatar{ + margin-left: 40rpx; + width: 100vw; + display: flex; + align-items: center; + font-weight: bold; + +} +.avatar-font{ + margin-left: 30rpx; +} + +.user-contain { + background-color: #f5f7fa; /* 浅灰色背景 */ + height: 100vh; +} +.server1{ + margin-top: 3vh; +} + diff --git a/miniprogram/theme.wxss b/miniprogram/theme.wxss new file mode 100644 index 0000000..32df2de --- /dev/null +++ b/miniprogram/theme.wxss @@ -0,0 +1,265 @@ +@media (prefers-color-scheme: light) { + page, .page { + --td-brand-color-1: #e8faf7; + --td-brand-color-2: #c9ece8; + --td-brand-color-3: #9cd6d1; + --td-brand-color-4: #51bdb6; + --td-brand-color-5: #44a19b; + --td-brand-color-6: #008781; + --td-brand-color-7: #006b66; + --td-brand-color-8: #00514d; + --td-brand-color-9: #003b37; + --td-brand-color-10: #002724; + --td-brand-color-light: var(--td-brand-color-1); + --td-brand-color-focus: var(--td-brand-color-2); + --td-brand-color-disabled: var(--td-brand-color-3); + --td-brand-color: var(--td-brand-color-4); + --td-brand-color-active: var(--td-brand-color-5); + --td-warning-color-1: #fef3e6; + --td-warning-color-2: #f9e0c7; + --td-warning-color-3: #f7c797; + --td-warning-color-4: #f2995f; + --td-warning-color-5: #ed7b2f; + --td-warning-color-6: #d35a21; + --td-warning-color-7: #ba431b; + --td-warning-color-8: #9e3610; + --td-warning-color-9: #842b0b; + --td-warning-color-10: #5a1907; + --td-warning-color: var(--td-warning-color-5); + --td-warning-color-focus: var(--td-warning-color-2); + --td-warning-color-active: var(--td-warning-color-6); + --td-warning-color-disabled: var(--td-warning-color-3); + --td-warning-color-light: var(--td-warning-color-1); + --td-error-color-1: #fdecee; + --td-error-color-2: #f9d7d9; + --td-error-color-3: #f8b9be; + --td-error-color-4: #f78d94; + --td-error-color-5: #f36d78; + --td-error-color-6: #e34d59; + --td-error-color-7: #c9353f; + --td-error-color-8: #b11f26; + --td-error-color-9: #951114; + --td-error-color-10: #680506; + --td-error-color: var(--td-error-color-6); + --td-error-color-focus: var(--td-error-color-2); + --td-error-color-active: var(--td-error-color-7); + --td-error-color-disabled: var(--td-error-color-3); + --td-error-color-light: var(--td-error-color-1); + --td-success-color-1: #e8f8f2; + --td-success-color-2: #bcebdc; + --td-success-color-3: #85dbbe; + --td-success-color-4: #48c79c; + --td-success-color-5: #00a870; + --td-success-color-6: #078d5c; + --td-success-color-7: #067945; + --td-success-color-8: #056334; + --td-success-color-9: #044f2a; + --td-success-color-10: #033017; + --td-success-color: var(--td-success-color-5); + --td-success-color-focus: var(--td-success-color-2); + --td-success-color-active: var(--td-success-color-6); + --td-success-color-disabled: var(--td-success-color-3); + --td-success-color-light: var(--td-success-color-1); + --td-gray-color-1: #f3f3f3; + --td-gray-color-2: #eee; + --td-gray-color-3: #e7e7e7; + --td-gray-color-4: #dcdcdc; + --td-gray-color-5: #c5c5c5; + --td-gray-color-6: #a6a6a6; + --td-gray-color-7: #8b8b8b; + --td-gray-color-8: #777; + --td-gray-color-9: #5e5e5e; + --td-gray-color-10: #4b4b4b; + --td-gray-color-11: #383838; + --td-gray-color-12: #2c2c2c; + --td-gray-color-13: #242424; + --td-gray-color-14: #181818; + --td-bg-color-container: #fff; + --td-bg-color-page: var(--td-gray-color-2); + --td-bg-color-container-active: var(--td-gray-color-3); + --td-bg-color-secondarycontainer: var(--td-gray-color-1); + --td-bg-color-secondarycontainer-active: var(--td-gray-color-4); + --td-bg-color-component: var(--td-gray-color-3); + --td-bg-color-component-active: var(--td-gray-color-6); + --td-bg-color-component-disabled: var(--td-gray-color-2); + --td-component-stroke: var(--td-gray-color-3); + --td-component-border: var(--td-gray-color-4); + --td-font-white-1: #ffffff; + --td-font-white-2: rgba(255, 255, 255, 0.55); + --td-font-white-3: rgba(255, 255, 255, 0.35); + --td-font-white-4: rgba(255, 255, 255, 0.22); + --td-font-gray-1: rgba(0, 0, 0, 0.9); + --td-font-gray-2: rgba(0, 0, 0, 0.6); + --td-font-gray-3: rgba(0, 0, 0, 0.4); + --td-font-gray-4: rgba(0, 0, 0, 0.26); + --td-text-color-primary: var(--td-font-gray-1); + --td-text-color-secondary: var(--td-font-gray-2); + --td-text-color-placeholder: var(--td-font-gray-3); + --td-text-color-disabled: var(--td-font-gray-4); + --td-text-color-anti: #fff; + --td-text-color-brand: var(--td-brand-color); + --td-text-color-link: var(--td-brand-color); + --td-bg-color-secondarycomponent: var(--td-gray-color-4); + --td-bg-color-secondarycomponent-active: var(--td-gray-color-6); + --td-table-shadow-color: rgba(0, 0, 0, 8%); + --td-scrollbar-color: rgba(0, 0, 0, 10%); + --td-scrollbar-hover-color: rgba(0, 0, 0, 30%); + --td-scroll-track-color: #fff; + --td-bg-color-specialcomponent: #fff; + --td-border-level-1-color: var(--td-gray-color-3); + --td-border-level-2-color: var(--td-gray-color-4); + --td-shadow-1: 0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%); + --td-shadow-2: 0 3px 14px 2px rgba(0, 0, 0, 5%), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%); + --td-shadow-3: 0 6px 30px 5px rgba(0, 0, 0, 5%), 0 16px 24px 2px rgba(0, 0, 0, 4%), 0 8px 10px -5px rgba(0, 0, 0, 8%); + --td-shadow-inset-top: inset 0 0.5px 0 #dcdcdc; + --td-shadow-inset-right: inset 0.5px 0 0 #dcdcdc; + --td-shadow-inset-bottom: inset 0 -0.5px 0 #dcdcdc; + --td-shadow-inset-left: inset -0.5px 0 0 #dcdcdc; + --td-mask-active: rgba(0, 0, 0, 0.6); + --td-mask-disabled: rgba(255, 255, 255, 0.6); + } +} + +@media (prefers-color-scheme: dark) { + page, .page { + --td-brand-color-1: #44a19b20; + --td-brand-color-2: #003b37; + --td-brand-color-3: #00514d; + --td-brand-color-4: #006b66; + --td-brand-color-5: #008781; + --td-brand-color-6: #44a19b; + --td-brand-color-7: #51bdb6; + --td-brand-color-8: #9cd6d1; + --td-brand-color-9: #c9ece8; + --td-brand-color-10: #e8faf7; + --td-brand-color-light: var(--td-brand-color-1); + --td-brand-color-focus: var(--td-brand-color-2); + --td-brand-color-disabled: var(--td-brand-color-3); + --td-brand-color: var(--td-brand-color-6); + --td-brand-color-active: var(--td-brand-color-7); + --td-warning-color-1: #4f2a1d; + --td-warning-color-2: #582f21; + --td-warning-color-3: #733c23; + --td-warning-color-4: #a75d2b; + --td-warning-color-5: #cf6e2d; + --td-warning-color-6: #dc7633; + --td-warning-color-7: #e8935c; + --td-warning-color-8: #ecbf91; + --td-warning-color-9: #eed7bf; + --td-warning-color-10: #f3e9dc; + --td-error-color-1: #472324; + --td-error-color-2: #5e2a2d; + --td-error-color-3: #703439; + --td-error-color-4: #83383e; + --td-error-color-5: #a03f46; + --td-error-color-6: #c64751; + --td-error-color-7: #de6670; + --td-error-color-8: #ec888e; + --td-error-color-9: #edb1b6; + --td-error-color-10: #eeced0; + --td-success-color-1: #193a2a; + --td-success-color-2: #1a4230; + --td-success-color-3: #17533d; + --td-success-color-4: #0d7a55; + --td-success-color-5: #059465; + --td-success-color-6: #43af8a; + --td-success-color-7: #46bf96; + --td-success-color-8: #80d2b6; + --td-success-color-9: #b4e1d3; + --td-success-color-10: #deede8; + --td-gray-color-1: #f3f3f3; + --td-gray-color-2: #eee; + --td-gray-color-3: #e7e7e7; + --td-gray-color-4: #dcdcdc; + --td-gray-color-5: #c5c5c5; + --td-gray-color-6: #a6a6a6; + --td-gray-color-7: #8b8b8b; + --td-gray-color-8: #777; + --td-gray-color-9: #5e5e5e; + --td-gray-color-10: #4b4b4b; + --td-gray-color-11: #383838; + --td-gray-color-12: #2c2c2c; + --td-gray-color-13: #242424; + --td-gray-color-14: #181818; + --td-bg-color-page: var(--td-gray-color-14); + --td-bg-color-container: var(--td-gray-color-13); + --td-bg-color-container-active: var(--td-gray-color-10); + --td-bg-color-secondarycontainer: var(--td-gray-color-12); + --td-bg-color-secondarycontainer-active: var(--td-gray-color-9); + --td-bg-color-component: var(--td-gray-color-11); + --td-bg-color-component-active: var(--td-gray-color-9); + --td-bg-color-component-disabled: var(--td-gray-color-12); + --td-component-stroke: var(--td-gray-color-11); + --td-component-border: var(--td-gray-color-9); + --td-font-white-1: rgba(255, 255, 255, 0.9); + --td-font-white-2: rgba(255, 255, 255, 0.55); + --td-font-white-3: rgba(255, 255, 255, 0.35); + --td-font-white-4: rgba(255, 255, 255, 0.22); + --td-font-gray-1: rgba(0, 0, 0, 0.9); + --td-font-gray-2: rgba(0, 0, 0, 0.6); + --td-font-gray-3: rgba(0, 0, 0, 0.4); + --td-font-gray-4: rgba(0, 0, 0, 0.26); + --td-text-color-primary: var(--td-font-white-1); + --td-text-color-secondary: var(--td-font-white-2); + --td-text-color-placeholder: var(--td-font-white-3); + --td-text-color-disabled: var(--td-font-white-4); + --td-text-color-anti: #fff; + --td-text-color-brand: var(--td-brand-color); + --td-text-color-link: var(--td-brand-color); + --td-shadow-1: 0 4px 6px rgba(0, 0, 0, 0.06), 0 1px 10px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.12); + --td-shadow-2: 0 8px 10px rgba(0, 0, 0, 0.12), 0 3px 14px rgba(0, 0, 0, 0.10), 0 5px 5px rgba(0, 0, 0, 0.16); + --td-shadow-3: 0 16px 24px rgba(0, 0, 0, 0.14), 0 6px 30px rgba(0, 0, 0, 0.12), 0 8px 10px rgba(0, 0, 0, 0.20); + --td-shadow-inset-top: inset 0 0.5px 0 #5e5e5e; + --td-shadow-inset-right: inset 0.5px 0 0 #5e5e5e; + --td-shadow-inset-bottom: inset 0 -0.5px 0 #5e5e5e; + --td-shadow-inset-left: inset -0.5px 0 0 #5e5e5e; + --td-table-shadow-color: rgba(0, 0, 0, 55%); + --td-scrollbar-color: rgba(255, 255, 255, 10%); + --td-scrollbar-hover-color: rgba(255, 255, 255, 30%); + --td-scroll-track-color: #333; + --td-bg-color-specialcomponent: transparent; + --td-border-level-1-color: var(--td-gray-color-11); + --td-border-level-2-color: var(--td-gray-color-9); + --td-mask-active: rgba(0, 0, 0, 0.4); + --td-mask-disabled: rgba(0, 0, 0, 0.6); + } +} + +page { + --td-font-family: pingfang sc, microsoft yahei, arial regular; + --td-font-family-medium: pingfang sc, microsoft yahei, arial medium; + --td-font-size-link-small: 12px; + --td-font-size-link-medium: 14px; + --td-font-size-link-large: 16px; + --td-font-size-mark-extra-small: 10px; + --td-font-size-mark-small: 12px; + --td-font-size-mark-medium: 14px; + --td-font-size-mark-large: 16px; + --td-font-size-body-extra-small: 10px; + --td-font-size-body-small: 12px; + --td-font-size-body-medium: 14px; + --td-font-size-body-large: 16px; + --td-font-size-title-small: 14px; + --td-font-size-title-medium: 16px; + --td-font-size-title-large: 18px; + --td-font-size-title-extra-large: 20px; + --td-font-size-headline-small: 24px; + --td-font-size-headline-medium: 28px; + --td-font-size-headline-large: 36px; + --td-font-size-display-medium: 48px; + --td-font-size-display-large: 64px; + --td-font-size: 10px; + --td-font-size-xs: var(--td-font-size-body-extra-small); + --td-font-size-s: var(--td-font-size-body-small); + --td-font-size-base: var(--td-font-size-title-small); + --td-font-size-m: var(--td-font-size-title-medium); + --td-font-size-l: var(--td-font-size-title-large); + --td-font-size-xl: var(--td-font-size-title-extra-large); + --td-font-size-xxl: var(--td-font-size-headline-large); + --td-radius-small: 3px; + --td-radius-default: 6px; + --td-radius-large: 9px; + --td-radius-extraLarge: 12px; + --td-radius-round: 999px; + --td-radius-circle: 50%; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json index 085d50d..2331a53 100644 --- a/project.config.json +++ b/project.config.json @@ -19,7 +19,7 @@ "packNpmRelationList": [ { "packageJsonPath": "./package.json", - "miniprogramNpmDistDir": "./miniprogram_npm/" + "miniprogramNpmDistDir": "./miniprogram/" } ], "ignoreUploadUnusedFiles": true, diff --git a/project.private.config.json b/project.private.config.json index 92fb835..7a3bb3c 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -3,7 +3,7 @@ "projectname": "toutoukan", "setting": { "compileHotReLoad": true, - "urlCheck": true, + "urlCheck": false, "coverView": false, "lazyloadPlaceholderEnable": false, "skylineRenderEnable": true,