Quellcode durchsuchen

feat(patient): 新增消息按钮及相关样式,功能正在开发中

mcbaiyun vor 4 Wochen
Ursprung
Commit
90c0f8eb21
2 geänderte Dateien mit 25 neuen und 0 gelöschten Zeilen
  1. 24 0
      src/pages/patient/index/index.vue
  2. 1 0
      src/static/icons/remixicon/message-3-line.svg

+ 24 - 0
src/pages/patient/index/index.vue

@@ -13,6 +13,9 @@
             <text class="username">{{ user.nickname || '未登录' }}</text>
             <text class="user-age" v-if="user.age">年龄: {{ user.age }}</text>
           </view>
+          <view class="message-button" @click="onMessageClick">
+            <image src="/static/icons/remixicon/message-3-line.svg" class="message-icon" />
+          </view>
           <view class="qr-button" @click="onQrClick">
             <image src="/static/icons/remixicon/qr-code-line.svg" class="qr-icon" />
           </view>
@@ -455,6 +458,10 @@ function onItemClick(type: string) {
   }
 }
 
+function onMessageClick() {
+  uni.showToast({ title: '功能正在开发中', icon: 'none' })
+}
+
 function onQrClick() {
   uni.navigateTo({ url: '/pages/public/profile/qr/index' })
 }
@@ -560,6 +567,23 @@ const onNewsClick = (news: News) => {
   height: 60rpx;
 }
 
+.message-button {
+  width: 100rpx;
+  height: 100rpx;
+  border-radius: 50%;
+  background-color: rgba(255, 255, 255, 0.5);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-left: 20rpx;
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
+}
+
+.message-icon {
+  width: 60rpx;
+  height: 60rpx;
+}
+
 .function-container {
   padding-inline: 20rpx;
 }

+ 1 - 0
src/static/icons/remixicon/message-3-line.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgba(114,114,114,1)"><path d="M2 8.99374C2 5.68349 4.67654 3 8.00066 3H15.9993C19.3134 3 22 5.69478 22 8.99374V21H8.00066C4.68659 21 2 18.3052 2 15.0063V8.99374ZM20 19V8.99374C20 6.79539 18.2049 5 15.9993 5H8.00066C5.78458 5 4 6.78458 4 8.99374V15.0063C4 17.2046 5.79512 19 8.00066 19H20ZM14 11H16V13H14V11ZM8 11H10V13H8V11Z"></path></svg>