This commit is contained in:
2022-02-08 14:24:23 +08:00
12 changed files with 125 additions and 42 deletions

BIN
.DS_Store vendored

Binary file not shown.

33
lib/emoji.js Normal file
View File

@@ -0,0 +1,33 @@
export default [
"😀", "😁", "😃", "😄", "😅", "😆", "😉", "😊", "😋", "😎", "😍",
"😘", "😗", "😙", "😚", "☺", "😇", "😐", "😑", "😶", "😏", "😣", "😥", "😮", "😯", "😪",
"😫", "😴", "😌", "😛", "😜", "😝", "😒", "😓", "😔", "😕", "😲", "😷", "😖", "😞", "😟",
"😤", "😢", "😭", "😦", "😧", "😨", "😬", "😰", "😱", "😳", "😵", "😡", "😠",
"👦", "👧", "👨", "👩", "👴", "👵", "👶", "👱", "👮", "👲", "👳", "👷", "👸", "💂", "🎅", "👰", "👼",
"💆", "💇", "🙍", "🙎", "🙅", "🙆", "💁", "🙋", "🙇", "🙌", "🙏", "👤", "👥", "🚶", "🏃", "👯",
"💃", "👫", "👬", "👭", "💏", "💑", "👪", "💪", "👈", "👉", "☝", "👆", "👇", "✌", "✋", "👌",
"👍", "👎", "✊", "👊", "👋", "👏", "👐", "✍", "👣", "👀", "👂", "👃", "👅", "👄", "💋", "👓",
"👔", "👙", "👛", "👜", "👝", "🎒", "💼", "👞", "👟", "👠", "👡", "👢", "👑",
"👒", "🎩", "🎓", "💄", "💅", "💍", "🌂", "📶", "📳", "📴", "♻", "🏧","🚮", "🚰", "♿", "🚹", "🚺",
"🚻", "🚼", "🚾", "⚠", "🚸", "⛔", "🚫", "🚳", "🚭", "🚯", "🚱", "🚷", "🔞", "💈",
"🙈", "🐒", "🐶", "🐕", "🐩", "🐺", "🐱","🐈", "🐯", "🐅", "🐆", "🐴", "🐎", "🐮", "🐂",
"🐃","🐄","🐷","🐖","🐗","🐽","🐏","🐑","🐐","🐪","🐫","🐘","🐭",
"🐁","🐀","🐹","🐰","🐇","🐻","🐨","🐼","🐾","🐔","🐓","🐣","🐤","🐥",
"🐦", "🐧", "🐸", "🐊","🐢", "🐍", "🐲", "🐉", "🐳", "🐋", "🐬", "🐟", "🐠", "🐡",
"🐙", "🐚", "🐌", "🐛", "🐜", "🐝", "🐞", "🦋", "💐", "🌸", "💮", "🌹", "🌺",
"🌻", "🌼", "🌷", "🌱", "🌲", "🌳", "🌴", "🌵", "🌾", "🌿", "🍀", "🍁", "🍂", "🍃",
"🌍","🌎","🌏","🌐","🌑","🌒","🌓","🌔","🌕","🌖","🌗","🌘","🌙","🌚",
"🌛","🌜","☀","🌝","🌞","⭐","🌟","🌠","☁","⛅","☔","⚡","❄","🔥","💧","🌊",
"🏀", "🏈", "🏉", "🎾", "🎱", "🎳", "⛳", "🎣", "🎽", "🎿",
"😈", "👿", "👹", "👺", "💀", "☠", "👻", "👽", "👾", "💣",
"🌋", "🗻", "🏠", "🏡", "🏢", "🏣", "🏤", "🏥", "🏦", "🏨",
"⛲", "🌁", "🌃", "🌆", "🌇", "🎠", "🎡", "🎢", "🚂",
"🚌", "🚍", "🚎", "🚏", "🚐", "🚑", "🚒", "🚓", "🚔", "🚕", "🚖", "🚗", "🚘",
"💌", "💎", "🔪", "💈", "🚪", "🚽", "🚿", "🛁", "⌛", "⏳", "⌚", "⏰", "🎈", "🎉",
"💤", "💢", "💬", "💭", "♨", "🌀", "🔔", "🔕", "✡", "✝", "🔯", "📛", "🔰", "🔱", "⭕", "✅",
"☑", "✔", "✖", "❌", "❎", "", "", "➗", "➰", "➿", "〽", "✳", "✴", "❇", "‼", "⁉", "❓", "❔", "❕", "❗",
"🕛", "🕧", "🕐", "🕜", "🕑", "🕝", "🕒", "🕞", "🕓", "🕟", "🕔", "🕠", "🕕", "🕡",
"🕖", "🕢", "🕗", "🕣", "🕘", "🕤", "🕙", "🕥", "🕚", "🕦", "⏱", "⏲", "🕰",
"💘", "❤", "💓", "💔", "💕", "💖", "💗", "💙", "💚", "💛", "💜", "💝", "💞", "💟❣",
"🍇", "🍈", "🍉", "🍊", "🍋", "🍌", "🍍", "🍎", "🍏", "🍐", "🍑", "🍒", "🍓",
]

View File

@@ -268,7 +268,7 @@
"path": "pages/sign/index", "path": "pages/sign/index",
"name": "signIndex", "name": "signIndex",
"style": { "style": {
"navigationBarTitleText": "每日签到", "navigationBarTitleText": "每日打卡",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
}, },

BIN
pages/.DS_Store vendored

Binary file not shown.

View File

@@ -1,6 +1,15 @@
<template> <template>
<view class="sent--text"> <view class="sent--text">
<input class="input" type="text" @focus="focus" @blur="blur" v-model="inputTxt" confirm-type="send" @confirm="sent" cursor-spacing="10" /> <input
class="input"
type="text"
@focus="focus"
@blur="blur"
v-model="inputTxt"
confirm-type="send"
@confirm="sent"
cursor-spacing="10"
/>
<!-- <button class="button" size="mini" :disabled="disabled" @click="sent">发送</button> --> <!-- <button class="button" size="mini" :disabled="disabled" @click="sent">发送</button> -->
</view> </view>
</template> </template>
@@ -71,7 +80,7 @@
.input { .input {
background: #F3F6FB; background: #F3F6FB;
height: 70rpx; height: 70rpx;
width: 460rpx; width: 500rpx;
border-radius: 10rpx; border-radius: 10rpx;
margin-right: 15rpx; margin-right: 15rpx;
padding: 0 20rpx; padding: 0 20rpx;

View File

@@ -102,7 +102,7 @@
line-height: 70rpx; line-height: 70rpx;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 460rpx; width: 500rpx;
border-radius: 10rpx; border-radius: 10rpx;
margin-right: 15rpx; margin-right: 15rpx;

View File

@@ -7,11 +7,11 @@
<view class="tabs"> <view class="tabs">
<view class="item show"> <view class="item show">
私聊 私聊
<u-badge absolute max="99" shape="horn" :offset="[-7, -7]" :value="5" /> <u-badge absolute max="99" shape="horn" :offset="[-7, -7]" :value="privateUnread" />
</view> </view>
<view class="item" @click="onNav('', {})"> <view class="item" @click="onNav('', {})">
群聊 群聊
<u-badge absolute max="99" shape="horn" :offset="[-7, -7]" :value="10" /> <u-badge absolute max="99" shape="horn" :offset="[-7, -7]" :value="groupUnread" />
</view> </view>
</view> </view>
@@ -95,6 +95,8 @@
/* 弹窗定位样式 */ /* 弹窗定位样式 */
popStyle: "", popStyle: "",
pickedItem: {}, pickedItem: {},
privateUnread: 0,
groupUnread: 0,
hasNewFriends: true hasNewFriends: true
} }
}, },
@@ -120,6 +122,12 @@
uni.$on('onReceiveMessage', (msg) => { uni.$on('onReceiveMessage', (msg) => {
console.log('收到消息,刷新列表'); console.log('收到消息,刷新列表');
this.getConversationList() this.getConversationList()
// todo ,不知道这个获取未读数量的,有没有办法能获取私聊的,还有群组的
// RongIMLib.getTotalUnreadCount(({
// count
// }) => {
// this.privateUnread = count
// })
}) })
this.isShown = true this.isShown = true
}, },
@@ -203,7 +211,6 @@
const timestamp = 0 const timestamp = 0
RongIMLib.getConversationList([RongIMLib.ConversationType.PRIVATE], count, timestamp, (res) => { RongIMLib.getConversationList([RongIMLib.ConversationType.PRIVATE], count, timestamp, (res) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.conversations);
this.conversations = res.conversations this.conversations = res.conversations
} }
}) })
@@ -273,6 +280,7 @@
line-height: 60rpx; line-height: 60rpx;
.tabs { .tabs {
.item { .item {
position: relative; position: relative;
margin-left: $margin; margin-left: $margin;

View File

@@ -36,13 +36,12 @@
@success="getMessageList" /> @success="getMessageList" />
<sent-text v-if="chatType === 1" :conversationType="conversationType" :targetId="targetId" <sent-text v-if="chatType === 1" :conversationType="conversationType" :targetId="targetId"
@success="getMessageList" /> @success="getMessageList" />
<view class="msg-type" @click="showPopups = !showPopups"> <view class="msg-type msg-popups" @click="scrollBottom('msgPopups')">
<image class="icon" src="@/static/icon/popups-icon.png"></image> <image class="icon" src="@/static/icon/popups-icon.png"></image>
</view> </view>
</view> </view>
<!-- 弹出层 --> <!-- 弹出层 -->
<sent-popups :show="showPopups" :conversationType="conversationType" :targetId="targetId" <sent-popups :show="showPopups" :conversationType="conversationType" :targetId="targetId" @success="() => {showPopups = false, getMessageList()}"></sent-popups>
@success="() => {showPopups = false, getMessageList()}"></sent-popups>
</view> </view>
</template> </template>
@@ -148,10 +147,14 @@
}) })
}, },
// 滚动到底部 // 滚动到底部
scrollBottom() { scrollBottom(type) {
if(type === 'msgPopups'){
this.showPopups = !this.showPopups
}
setTimeout(() => { setTimeout(() => {
let el = this.$refs.chatBottom let el = this.$refs.chatBottom
ChatList.scrollToElement(el, { ChatList.scrollToElement(el, {
offset: 0,
animated: false animated: false
}) })
}, 50) }, 50)
@@ -165,19 +168,14 @@
.chat { .chat {
background: $window-color; background: $window-color;
flex: 1; flex: 1;
.body { .body {
flex: 1; flex: 1;
.cell { .cell {
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
.time { .time {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding-bottom: 20rpx; padding-bottom: 20rpx;
.text { .text {
background: #fff; background: #fff;
font-size: 24rpx; font-size: 24rpx;
@@ -239,11 +237,9 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: row; flex-direction: row;
.msg-type { .msg-type {
width: 70rpx; width: 70rpx;
height: 70rpx; height: 70rpx;
.icon { .icon {
margin: 5rpx; margin: 5rpx;
width: 60rpx; width: 60rpx;

View File

@@ -4,7 +4,15 @@
<view class="status-main"> <view class="status-main">
<view class="helloe">欢迎使用ZH-HEALTH健康</view> <view class="helloe">欢迎使用ZH-HEALTH健康</view>
<view class="btns"> <view class="btns">
<view class="btns-item" @click="onBtn('signIndex')"><image src="@/static/icon/sign-icon.gif" mode="widthFix"></image></view> <!-- 打卡图标gif -->
<!-- <view class="btns-item" @click="$Router.push({name: 'signIndex'})"><image src="@/static/icon/sign-icon.gif" mode="widthFix"></image></view> -->
<view class="btns-clock" @click="$Router.push({name: 'signIndex'})">
<image src="@/static/icon/clock_icon.png" mode="widthFix"></image>
<view class="btns-clock-text">
打卡
</view>
</view>
<view class="btns-item show" @click="onBtn('noticeIndex')"><uni-icons custom-prefix="iconfont" type="icon-pinglun" size="25"></uni-icons></view> <view class="btns-item show" @click="onBtn('noticeIndex')"><uni-icons custom-prefix="iconfont" type="icon-pinglun" size="25"></uni-icons></view>
</view> </view>
</view> </view>
@@ -101,12 +109,29 @@
align-items: center; align-items: center;
.helloe { .helloe {
line-height: 100rpx; line-height: 100rpx;
font-size: $title-size + 10; font-size: $title-size + 4;
font-weight: bold; font-weight: bold;
} }
.btns { .btns {
margin-left: $margin; margin-left: $margin;
display: flex; display: flex;
.btns-clock {
color: #885100;
height: 50rpx;
font-size: $title-size-sm - 2;
border-radius: 40rpx;
display: flex;
background-image: linear-gradient(to right, #fce938, #ffce36);
image {
width: 48rpx;
display: inline-block;
}
.btns-clock-text {
line-height: 50rpx;
font-weight: 600;
padding: 0 20rpx 0 8rpx;
}
}
.btns-item { .btns-item {
position: relative; position: relative;
text-align: right; text-align: right;

View File

@@ -9,7 +9,7 @@
<view class="number"> <view class="number">
<text>{{ dateData.total }}</text> <text>{{ dateData.total }}</text>
</view> </view>
本月签到 本月打卡
</view> </view>
</view> </view>
<view class="label"> <view class="label">
@@ -18,7 +18,7 @@
<view class="number"> <view class="number">
<text>{{ dateData.continue }}</text> <text>{{ dateData.continue }}</text>
</view> </view>
累计签到 累计打卡
</view> </view>
</view> </view>
</view> </view>
@@ -50,20 +50,23 @@
</view> </view>
</view> </view>
<view class="day" v-for="(item, index) in dateArr"> <view class="day" v-for="(item, index) in dateArr" :key="index">
<view class="day-label" v-for="(items, index) in item"> <view class="day-label" v-for="(items, index) in item" :key="index">
<view class="label-block" :class="{active : items.isSign}" v-if="!items.isHidden">{{ items.isSign ? '' : items.date }}</view> <view class="label-block" :class="{active : items.isSign}" v-if="!items.isHidden">
<uni-icons v-if="items.isSign" class="search-icon" custom-prefix="iconfont" type="icon-dui" color="#ffffff" size="18"></uni-icons>
<block v-else>{{ items.date }}</block>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="signBtn"> <view class="signBtn">
<view class="btn" @click="signClick" :class="{active : dateData.isSign}"> <view class="btn" @click="signClick" :class="{active : dateData.isSign}">
{{ dateData.isSign ? '日已' : '立即签到'}} {{ dateData.isSign ? '日已打卡' : '今日打卡'}}
</view> </view>
</view> </view>
</view> </view>
<view class="tipsText"> <view class="tipsText">
ZH大健康用户签到 ZH大健康用户打卡
</view> </view>
</view> </view>
</view> </view>
@@ -174,7 +177,9 @@
} }
} }
.signDate { .signDate {
padding: $padding; padding: $padding;
border-radius: $radius-m;
background-color: white;
.date { .date {
text-align: center; text-align: center;
font-size: $title-size + 6; font-size: $title-size + 6;
@@ -209,6 +214,12 @@
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
text-align: center; text-align: center;
position: relative;
.label-icon {
position: absolute;
left: 10rpx;
top: 0;
}
&.active { &.active {
background-color: $main-color; background-color: $main-color;
color: white; color: white;
@@ -232,7 +243,8 @@
color: $text-gray; color: $text-gray;
} }
} }
} }
}
.tipsText { .tipsText {
text-align: center; text-align: center;

BIN
static/.DS_Store vendored

Binary file not shown.

BIN
static/icon/clock_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB