feat: 电子药箱小程序 - 4Tab药品管理

- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡
- 药品百科: 搜索 + 分类筛选 + 20种药品静态数据
- 惠教中心: 4条药品使用指南课程
- 我的: 家庭成员信息管理
- 自定义TabBar + navigation-bar组件
- SVG药品分类插图
This commit is contained in:
陈誉午
2026-07-29 11:20:52 +08:00
commit 994b267f5c
683 changed files with 43849 additions and 0 deletions
@@ -0,0 +1,54 @@
<svg width="43" height="42" viewBox="0 0 43 42" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.928558" y="0.428711" width="41.1429" height="41.1429" rx="20.5714" fill="url(#paint0_linear_2570_76858)" fill-opacity="0.6"/>
<g clip-path="url(#clip0_2570_76858)">
<g filter="url(#filter0_d_2570_76858)">
<path d="M31.0118 28.2805C31.2626 28.5319 31.4034 28.8724 31.4034 29.2275C31.4034 29.5825 31.2626 29.9231 31.0118 30.1744L30.0648 31.1215C29.365 31.8212 28.4446 32.2475 27.3289 32.3886C27.0523 32.4232 26.7737 32.4403 26.4949 32.4398C25.6829 32.4398 24.8069 32.3027 23.8796 32.03C21.3626 31.2902 18.7153 29.6218 16.4276 27.3335C14.14 25.0451 12.4709 22.3987 11.7311 19.8815C11.3628 18.6274 11.2416 17.4669 11.3725 16.4329C11.5136 15.3172 11.9399 14.3968 12.6396 13.697L13.5867 12.75C13.838 12.4992 14.1786 12.3584 14.5336 12.3584C14.8887 12.3584 15.2292 12.4992 15.4806 12.75L19.6476 16.9168C19.8984 17.1682 20.0392 17.5088 20.0392 17.8639C20.0392 18.219 19.8984 18.5595 19.6476 18.8109L18.7006 19.7573C18.1649 20.293 18.6981 22.0277 20.2158 23.5453C21.7336 25.0629 23.4674 25.5969 24.0038 25.0605L24.9509 24.1135C25.2022 23.8627 25.5428 23.7219 25.8979 23.7219C26.253 23.7219 26.5936 23.8627 26.8449 24.1135L31.0118 28.2805Z" fill="white"/>
</g>
<g filter="url(#filter1_d_2570_76858)">
<path d="M27.9286 17.2904H23.6428C22.7589 17.2904 22.0357 16.7118 22.0357 16.0047V12.1475C22.0357 11.4404 22.7589 10.8618 23.6428 10.8618H27.9286C28.8125 10.8618 29.5357 11.4404 29.5357 12.1475V16.0047C29.5357 16.7118 28.8125 17.2904 27.9286 17.2904Z" fill="white"/>
</g>
<g filter="url(#filter2_d_2570_76858)">
<path d="M31.1451 16.2183C31.4385 16.2183 31.6786 16.043 31.6786 15.8287V12.3222C31.6786 12.1079 31.4385 11.9326 31.1451 11.9326C31.065 11.9326 30.985 11.9521 30.9139 11.9716V11.9651L30.1848 12.2378C29.8025 12.4131 29.5357 12.7508 29.5357 13.1534V14.9846C29.5357 15.3872 29.7847 15.7183 30.1848 15.9066L30.8605 16.1599H30.8783C30.9672 16.1989 31.0473 16.2183 31.1451 16.2183V16.2183Z" fill="white"/>
</g>
</g>
<defs>
<filter id="filter0_d_2570_76858" x="6.17858" y="8.92983" width="30.3677" height="30.3673" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="1.71429"/>
<feGaussianBlur stdDeviation="2.57143"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.10625 0 0 0 0 0.5 0 0 0 0 0.477647 0 0 0 0.5 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2570_76858"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2570_76858" result="shape"/>
</filter>
<filter id="filter1_d_2570_76858" x="16.8928" y="7.43324" width="17.7857" height="16.7144" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="1.71429"/>
<feGaussianBlur stdDeviation="2.57143"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.10625 0 0 0 0 0.5 0 0 0 0 0.477647 0 0 0 0.5 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2570_76858"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2570_76858" result="shape"/>
</filter>
<filter id="filter2_d_2570_76858" x="24.3928" y="8.50405" width="12.4286" height="14.5714" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="1.71429"/>
<feGaussianBlur stdDeviation="2.57143"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.10625 0 0 0 0 0.5 0 0 0 0 0.477647 0 0 0 0.5 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2570_76858"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2570_76858" result="shape"/>
</filter>
<linearGradient id="paint0_linear_2570_76858" x1="0.928558" y1="21.0001" x2="42.0714" y2="21.0001" gradientUnits="userSpaceOnUse">
<stop stop-color="#4FFE80"/>
<stop offset="1" stop-color="#00D0FE"/>
</linearGradient>
<clipPath id="clip0_2570_76858">
<rect width="27.4286" height="27.4286" fill="white" transform="translate(7.78571 7.28613)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

@@ -0,0 +1,5 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.1399 4.80012H18.0007L17.6455 3.83052C17.4391 3.25932 16.8967 2.88012 16.2871 2.88012H8.71274C8.10314 2.88012 7.56074 3.25932 7.35434 3.83052L6.99914 4.80012H3.85994C2.80394 4.80012 1.93994 5.66412 1.93994 6.72012V19.2001C1.93994 20.2561 2.80394 21.1201 3.85994 21.1201H21.1399C22.1959 21.1201 23.0599 20.2561 23.0599 19.2001V6.72012C23.0599 5.66412 22.1959 4.80012 21.1399 4.80012ZM7.7432 13.424C7.748 13.448 7.8008 13.76 7.8008 13.76C8.2424 15.9488 10.1816 17.6 12.5 17.6C13.7183 17.6 14.8322 17.1452 15.6807 16.3933C15.8748 16.2213 15.8757 15.9257 15.7023 15.7329L15.1038 15.0676C14.9001 14.8412 14.5438 14.8515 14.3065 15.0425C13.8127 15.4401 13.1846 15.68 12.5 15.68C11.2088 15.68 10.124 14.8256 9.7592 13.6544C9.6728 13.3808 9.62 13.0976 9.62 12.8H10.3709C10.5441 12.8 10.6354 12.5949 10.5196 12.4662L9.03165 10.8129C8.83303 10.5922 8.48697 10.5922 8.28835 10.8129L6.80041 12.4662C6.68458 12.5949 6.77592 12.8 6.94907 12.8H7.7C7.7 13.0112 7.7432 13.424 7.7432 13.424ZM15.2406 11.9457C14.8758 10.7745 13.791 9.92008 12.4998 9.92008C11.8136 9.92008 11.1841 10.1611 10.6876 10.5603C10.451 10.7506 10.0961 10.7601 9.89296 10.5344L9.2927 9.86716C9.11928 9.6744 9.12025 9.37875 9.31431 9.20679C10.1628 8.45488 11.2767 8.00008 12.495 8.00008C14.8134 8.00008 16.7526 9.65128 17.1942 11.8401C17.1942 11.8401 17.2278 12.0129 17.2422 12.0993C17.247 12.1281 17.2998 12.5889 17.2998 12.8001H18.0507C18.2239 12.8001 18.3152 13.0052 18.1994 13.1339L16.7115 14.7871C16.5128 15.0078 16.1668 15.0078 15.9682 14.7871L14.4802 13.1339C14.3644 13.0052 14.4557 12.8001 14.6289 12.8001H15.3798C15.3798 12.5025 15.327 12.2193 15.2406 11.9457Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1,4 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="1.77429" y="1.27393" width="21.4515" height="21.4515" rx="5.61039" fill="#E63F3F"/>
<path d="M9.6959 13.901C9.96119 13.7296 10.0325 13.4556 10.097 13.2141C10.1623 12.9663 10.2186 12.4268 10.4511 12.318C11.6849 11.8038 13.2719 11.7468 14.5053 12.2685C14.7423 12.3801 14.8016 12.9203 14.8695 13.1693C14.935 13.4106 15.0101 13.6842 15.2753 13.8589C15.5139 14.0156 16.7166 14.1598 17.0878 14.1568C17.3329 14.155 17.5262 14.0955 17.6668 13.9765C18.1758 13.5095 18.0696 12.3134 18.0095 12.0621C17.9168 11.4905 17.4735 11.0498 16.6954 10.7561C14.6725 9.90024 10.2931 9.93507 8.24279 10.7744C7.85149 10.9163 7.54516 11.0976 7.32616 11.3166C7.11185 11.5309 6.98083 11.7816 6.93543 12.0642C6.88297 12.2592 6.77722 13.5091 7.29608 13.9924C7.43454 14.1094 7.629 14.1703 7.87273 14.1739C8.24439 14.18 9.45848 14.056 9.6959 13.901Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -0,0 +1,4 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.84294 4.53446V5.34766C3.84294 6.33615 4.65464 7.13811 5.65605 7.13811H5.80176C5.99656 7.13811 6.18419 7.10776 6.36007 7.0516L3.84294 4.53446ZM6.99277 7.6843C6.6146 7.87975 6.18469 7.99036 5.72912 7.99036C4.22116 7.99036 2.99452 6.77906 2.99452 5.29035C2.99452 5.06993 2.81369 4.89176 2.59089 4.89176C2.36808 4.89176 2.18726 5.06993 2.18726 5.29035C2.18726 7.08358 3.56203 8.56433 5.32549 8.76322V9.56557C5.32549 9.78559 5.50592 9.96416 5.72912 9.96416C5.95193 9.96416 6.13276 9.78559 6.13276 9.56557V8.76322C6.65781 8.70399 7.14842 8.53107 7.57854 8.27007L6.99277 7.6843ZM8.76087 7.09538L8.17062 6.50512C8.3578 6.13977 8.46333 5.72699 8.46333 5.29035C8.46333 5.06993 8.64415 4.89176 8.86696 4.89176C9.08976 4.89176 9.27059 5.06993 9.27059 5.29035C9.27059 5.9505 9.08428 6.56829 8.76087 7.09538ZM7.53652 5.87103L4.12588 2.46039C4.44772 1.96165 5.01274 1.63086 5.65605 1.63086H5.80176C6.80317 1.63086 7.61528 2.43241 7.61528 3.4213V5.34766C7.61528 5.52973 7.58773 5.70546 7.53652 5.87103Z" fill="#E63F3F"/>
<path d="M2.13472 2.82588C1.972 2.66316 1.972 2.39934 2.13472 2.23662C2.29743 2.0739 2.56125 2.0739 2.72397 2.23662L8.81295 8.3256C8.97566 8.48832 8.97566 8.75213 8.81295 8.91485C8.65023 9.07757 8.38641 9.07757 8.22369 8.91485L2.13472 2.82588Z" fill="#E63F3F"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1,4 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.0312 9.82617C19.4964 9.82617 19.0624 10.2538 19.0624 10.7828C19.0624 14.3557 16.1185 17.2628 12.5004 17.2628C8.88124 17.2628 5.93731 14.3557 5.93731 10.7828C5.93731 10.2538 5.50333 9.82617 4.96859 9.82617C4.43386 9.82617 3.99988 10.2538 3.99988 10.7828C3.99988 15.0865 7.29933 18.6403 11.5316 19.1177V21.0433C11.5316 21.5714 11.9647 21.9999 12.5004 21.9999C13.0351 21.9999 13.4691 21.5714 13.4691 21.0433V19.1177C17.7004 18.6403 20.9999 15.0865 20.9999 10.7828C20.9999 10.2538 20.5659 9.82617 20.0312 9.82617Z" fill="white"/>
<path d="M12.3253 15.2174H12.6751C15.0784 15.2174 17.0275 13.2927 17.0275 10.9203V6.29706C17.0275 3.92373 15.0784 2 12.6751 2H12.3253C9.92196 2 7.97388 3.92373 7.97388 6.29706V10.9203C7.97388 13.2927 9.92196 15.2174 12.3253 15.2174Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 891 B

@@ -0,0 +1,4 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.99973 5.07475C2.91899 5.79625 2.2644 7.02269 2.2644 8.52895V15.5754C2.2644 18.0259 3.9968 19.7357 6.4781 19.7357H12.4119C14.2344 19.7357 15.6528 18.8133 16.2776 17.3526L3.99973 5.07475ZM21.9961 17.2759L18.2338 13.5135V9.06366C18.2338 8.42713 18.5821 7.85509 19.1435 7.57219L20.6618 6.80566C21.1115 6.57684 21.6392 6.60076 22.0684 6.87118C22.4977 7.14056 22.7538 7.60859 22.7538 8.12031V15.9843C22.7538 16.4971 22.4977 16.9641 22.0684 17.2334C22.0446 17.2483 22.0205 17.2625 21.9961 17.2759ZM16.6256 11.9053L9.08892 4.36865H12.4119C14.8932 4.36865 16.6256 6.07853 16.6256 8.52895V11.9053Z" fill="#E63F3F"/>
<path d="M2.25981 3.33574C1.85973 2.93566 1.85973 2.287 2.25981 1.88692C2.65989 1.48684 3.30855 1.48684 3.70864 1.88692L21.5023 19.6806C21.9024 20.0807 21.9024 20.7294 21.5023 21.1294C21.1022 21.5295 20.4536 21.5295 20.0535 21.1294L2.25981 3.33574Z" fill="#E63F3F"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1,4 @@
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.5295 6.56441C22.0791 6.28068 21.5255 6.25558 21.0536 6.49566L19.4606 7.29992C18.8716 7.59674 18.5061 8.19693 18.5061 8.86478V15.1351C18.5061 15.8019 18.8716 16.4021 19.4606 16.7011L21.0525 17.5043C21.2686 17.6145 21.4997 17.669 21.7308 17.669C22.0081 17.669 22.2833 17.5905 22.5295 17.4366C22.9798 17.154 23.2486 16.664 23.2486 16.126V7.87501C23.2486 7.33811 22.9798 6.84704 22.5295 6.56441Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.1724 3.93848H12.3982C15.0016 3.93848 16.8193 5.7325 16.8193 8.30351V15.6968C16.8193 18.2678 15.0016 20.0618 12.3982 20.0618H6.1724C3.569 20.0618 1.75134 18.2678 1.75134 15.6968V8.30351C1.75134 5.7325 3.569 3.93848 6.1724 3.93848ZM6.51122 10.1573C7.27448 10.1573 7.89322 9.53853 7.89322 8.77528C7.89322 8.01202 7.27448 7.39328 6.51122 7.39328C5.74796 7.39328 5.12922 8.01202 5.12922 8.77528C5.12922 9.53853 5.74796 10.1573 6.51122 10.1573Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"GridLayout":"./gridLayout/gridLayout","Drawer":"../../pubComponents/drawer/drawer"}}
@@ -0,0 +1,63 @@
<!-- volc-mini-sdk/components/connect/connect.wxml -->
<wxs src="./connect.wxs" module="CONNECT" />
<view>
<!-- 宫格布局 -->
<GridLayout id='connect-layout' wx:if="{{connectStatus == CONNECT.ConnectStatus.Connecting}}" renderList="{{renderList}}" hasAudio="{{hasAudio}}" hasVideo="{{hasVideo}}" bind:showPanel="showPanel" isPortrait="{{isPortrait}}" connectLivePlayerAttrs="{{connectLivePlayerAttrs}}" />
<!-- 连麦申请按钮 -->
<view wx:if="{{connectStatus != CONNECT.ConnectStatus.Connecting}}" class="applyBt" bindtap="showPanel">
<image src="https://p1-live.byteimg.com/tos-cn-i-gjr78lqtd0/f5313aaf92d0496b8e53d7596fb95d69~tplv-gjr78lqtd0-resize:88:0.webp"></image>
<view class='tag' wx:if="{{connectStatus == CONNECT.ConnectStatus.Init}}">
<view>申请连麦</view>
</view>
<view class='tag' wx:if="{{connectStatus == CONNECT.ConnectStatus.Applying}}">
<view>申请中...</view>
</view>
</view>
<!-- 底部弹出框 -->
<Drawer id='volc-connect-drawer' needCancel="{{connectStatus != CONNECT.ConnectStatus.Applying}}">
<!-- 申请面板 -->
<view class="applyPanel" wx:if="{{connectStatus == CONNECT.ConnectStatus.Init}}">
<view class="item" data-type="video" bindtap="applyConnect" hover-class="buttonHover">
<image src="./assets/video.svg"></image>
视频连麦
</view>
<view class="item" data-type="audio" bindtap="applyConnect" hover-class="buttonHover">
<image src="./assets/unmute.svg"></image>
语音连麦
</view>
</view>
<!-- 申请中,取消申请面板 -->
<view class="cancelPanel" wx:if="{{connectStatus == CONNECT.ConnectStatus.Applying}}">
<image src="./assets/apply2.svg"></image>
<view class="tips">连麦申请已发送,请稍等...</view>
<view class="cancelBt" bindtap="cancelApply" hover-class="buttonHover">取消申请</view>
</view>
<!-- 连麦设置面板 -->
<view class="settingPanel" wx:if="{{connectStatus == CONNECT.ConnectStatus.Connecting}}">
<view class="btBox" bindtap="switchCamera">
<view class="icon">
<image src="./assets/camera.svg"></image>
</view>
<view>翻转摄像头</view>
</view>
<view class="btBox" bindtap="changeAudioStatus">
<view class="icon">
<image src="{{hasAudio ? './assets/unmute.svg' : './assets/mute.svg'}}"></image>
</view>
<view>{{hasAudio? '静音' : '取消静音'}}</view>
</view>
<view class="btBox" bindtap="changeVideoStatus">
<view class="icon">
<image src="{{hasVideo ? './assets/video.svg' : './assets/unvideo.svg'}}"></image>
</view>
<view>{{hasVideo? '关闭摄像头' : '打开摄像头'}}</view>
</view>
<view class="btBox" bindtap="hangUpConnect">
<view class="icon">
<image src="./assets/hangup.svg"></image>
</view>
<view>断开连麦</view>
</view>
</view>
</Drawer>
</view>
@@ -0,0 +1,7 @@
module.exports = {
ConnectStatus:{
Init: 0, // 初始状态
Applying: 1, // 申请中
Connecting: 2, // 连麦中
}
};
@@ -0,0 +1 @@
.applyBt{position:fixed;width:50px;height:50px;bottom:55px;bottom:calc(env(safe-area-inset-bottom) + 55px);right:17px;z-index:1000}.applyBt image{width:100%;height:100%;background:rgba(0,0,0,.2);border-radius:7px}.applyBt .tag{width:50px;height:calc(14px + .5 * (1rem - 16px));background:rgba(0,0,0,.6);border-radius:20px;font-size:calc(9px + .5 * (1rem - 16px));display:flex;align-items:center;justify-content:center;position:absolute;bottom:0}.applyBt .tag view{background-clip:text;background:linear-gradient(90deg,#8bffac 0,#41ddff 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.applyPanel{display:flex;flex-direction:column;width:100%}.applyPanel .item{width:100%;height:calc(56px + .5 * (1rem - 16px));display:flex;align-items:center;justify-content:center;font-size:calc(16px + .5 * (1rem - 16px))}.applyPanel .item image{width:20px;height:20px;margin-right:15rpx}.cancelPanel{display:flex;flex-direction:column;align-items:center;font-size:calc(16px + .5 * (1rem - 16px))}.cancelPanel image{width:48px;height:48px;margin-bottom:8px}.cancelPanel .tips{background:linear-gradient(90deg,#8bffac 0,#41ddff 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.cancelPanel .cancelBt{color:#eb635e;height:56px;width:100%;display:flex;align-items:center;justify-content:center}.settingPanel{display:flex;background-color:#000;color:#fff;justify-content:space-between;padding:0 15px 8px 15px}.settingPanel .btBox{display:flex;flex-direction:column;font-size:calc(12px + .5 * (1rem - 16px));align-items:center}.settingPanel .btBox .icon{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.1);margin-bottom:8px}.settingPanel .btBox .icon image{width:24px;height:24px}.buttonHover{background-color:#1f1f1f}
@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserVersion=exports.StreamType=exports.RoomStatus=exports.MediaType=exports.LinkStatus=exports.LeaveStatus=exports.LayoutMode=exports.Identity=exports.ControlStatus=exports.ConnectStatus=exports.AudioMuteMap=exports.ApplyStatus=void 0;var ConnectStatus={Init:0,Applying:1,Connecting:2};exports.ConnectStatus=ConnectStatus;var ApplyStatus={Apply:1,Cancel:2};exports.ApplyStatus=ApplyStatus;var LinkStatus={NOSTART:0,APPLYING:1,ALLOWING:2,CONNECTING:3};exports.LinkStatus=LinkStatus;var UserVersion={OLD:0,NEW:1};exports.UserVersion=UserVersion;var StreamType={VIDEO:0,SCREEN:1};exports.StreamType=StreamType;var RoomStatus={ENTER:1,LEAVE:2};exports.RoomStatus=RoomStatus;var Identity={Host:1,Guest:2,Audience:3};exports.Identity=Identity;var LeaveStatus={INITIATIVE:1,KICKED:2};exports.LeaveStatus=LeaveStatus;var ControlStatus={OPEN:1,CLOSE:2};exports.ControlStatus=ControlStatus;var MediaType={AUDIO:1,VIDEO:2,ALL:3};exports.MediaType=MediaType;var AudioMuteMap={noMute:1,Mute:2};exports.AudioMuteMap=AudioMuteMap;var LayoutMode={FullScreen:1,Gird:2,Speaker:3,CloseUp:4};exports.LayoutMode=LayoutMode;
@@ -0,0 +1 @@
"use strict";Component({properties:{renderList:{type:Array,value:[]},connectLivePlayerAttrs:{type:Object,value:{}},hasVideo:{type:Boolean,value:!1},hasAudio:{type:Boolean,value:!1},isPortrait:{type:Boolean,value:!0}},data:{},methods:{showPanel:function(){this.triggerEvent("showPanel")}}});
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"v-player":"../v-player/v-player","v-pusher":"../v-pusher/v-pusher"}}
@@ -0,0 +1,34 @@
<view class="layout-contianer" style="top: {{isPortrait ? '90px': '0px'}}">
<block wx:for="{{renderList}}" wx:key="id">
<!-- player -->
<view wx:if="{{!item.isMe}}" class="player-block {{item.isShow ? '' : 'hide'}}" style="left: {{item.styles.left}};top:{{item.styles.top}};width: {{item.styles.width}};height:{{item.styles.height}};z-index:{{item.styles.zIndex}};">
<v-player url="{{item.url || ''}}" uid="{{item.userId}}" screen="{{item.isScreen ? '1' : '0'}}" state='init' connectLivePlayerAttrs="{{connectLivePlayerAttrs}}" />
<view wx:if="{{!item.hasVideo}}" class="back" style="background: url({{item.styles.image}});background-size: cover;"></view>
<view class="position" wx:if="{{item.isShow && item.isShowLabel}}">
<view class="tag" wx:if="{{item.isHost}}">主持人</view>
<view class="tag" wx:if="{{item.isPresenter && !item.isHost}}">主讲</view>
<view wx:if="{{!item.hasAudio}}" class="mute">
<image src="../assets/mute.svg" />
</view>
<view class="name">{{item.nickname || '主持人'}}</view>
<view wx:if="{{item.isAudience}}">(观众)</view>
<span wx:if="{{item.isScreen}}">正在共享屏幕</span>
</view>
</view>
<!-- pusher -->
<view wx:if="{{item.isMe}}" class="player-block {{item.isShow ?'' : 'outer'}}" style="left: {{item.styles.left}};top:{{item.styles.top}};width: {{item.styles.width}};height:{{item.styles.height}};z-index:{{item.styles.zIndex}};" bindtap="showPanel">
<v-pusher id="v-pusher" url="{{item.url || ''}}" enableCamera="{{hasVideo}}" enableMic="{{hasAudio}}" beauty="0" state="init" />
<view wx:if="{{!hasVideo}}" class="back" style="background: url({{item.styles.image}}); background-size: cover;"></view>
<view class="position">
<view wx:if="{{!hasAudio}}" class="mute">
<image src="../assets/mute.svg" />
</view>
<view class="name">{{item.nickname}}</view>
<view wx:if="{{item.isAudience && item.isShow}}">(观众)</view>
</view>
<view class="moreBt">
<image src="../assets/more.png" />
</view>
</view>
</block>
</view>
@@ -0,0 +1 @@
.layout-contianer{display:flex;width:100vw;height:56.25vw;flex-wrap:wrap;justify-content:center;align-items:center;background-color:rgba(0,0,0,.6);position:absolute;z-index:1000}.layout-contianer .player-block{display:block;position:absolute}.layout-contianer .player-block .back{width:100%;height:100%;z-index:9;position:absolute;left:0;bottom:0;background-size:cover}.layout-contianer .player-block .position{position:absolute;left:2px;bottom:2px;color:#fff;font-size:calc(10px + .5 * (1rem - 16px));background:rgba(0,0,0,.6);border-radius:2px;z-index:10;display:flex;align-items:center;padding:0 8rpx;white-space:nowrap;flex-wrap:nowrap;max-width:90%}.layout-contianer .player-block .position .tag{background:#d4d4d2;font-size:calc(8px + .5 * (1rem - 16px));border-radius:1.25px;color:#151716;margin-right:5rpx;padding:0 8rpx}.layout-contianer .player-block .position .mute{display:flex;align-items:center;justify-content:center;margin-right:5rpx}.layout-contianer .player-block .position .mute image{width:10px;height:10px}.layout-contianer .player-block .position .name{display:inline;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.layout-contianer .player-block v-player{width:100%;height:100%}.layout-contianer .player-block v-pusher{width:100%;height:100%}.layout-contianer .player-block .moreBt{position:absolute;top:0;right:5px;width:24px;height:24px;z-index:10}.layout-contianer .player-block .moreBt image{width:100%;height:38%}.layout-contianer .outer{position:fixed;right:20rpx;bottom:150rpx;width:96px!important;height:96px!important;display:block;border-radius:6px!important;overflow:hidden}.layout-contianer .outer live-pusher{border-radius:6px!important}.layout-contianer .outer .back{background-repeat:no-repeat;background-position:center center!important;border-radius:6px!important}.layout-contianer .outer .position{font-size:calc(11px + .5 * (1rem - 16px))!important}.layout-contianer .outer .mute image{width:14px!important;height:14px!important}.layout-contianer .hide{display:none}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
"use strict";Component({properties:{url:{type:String,value:""},connectLivePlayerAttrs:{type:Object,value:{}},uid:{type:String,value:""},screen:{type:String,value:"0"},state:{type:String,value:"init"}},data:{},lifetimes:{ready:function(){this.livePlayerContext||(this.livePlayerContext=wx.createLivePlayerContext("v-player-".concat(this.data.uid,"-").concat(this.data.screen),this))},detached:function(){this.livePlayerContext&&this.livePlayerContext.stop()}},methods:{bindstatechange:function(t){this.triggerEvent("playerstatechange",{uid:this.data.uid,e:t}),2004===t.detail.code?"init"===this.data.state&&this.setData({state:"ok"}):-2301===t.detail.code&&this.setData({state:"error"})},bindnetstatuschange:function(t){this.triggerEvent("playernetstatuschange",{uid:this.data.uid,e:t})}}});
@@ -0,0 +1 @@
{"component":true,"usingComponents":{}}
@@ -0,0 +1,22 @@
<!--volc-mini-sdk/components/connect/v-player/v-player.wxml-->
<view class="player-view">
<!--
mode: RTC 实时通话
其他配置请参考小程序文档: https://developers.weixin.qq.com/miniprogram/dev/component/live-player.html
-->
<!-- @build:exclude-in-video-only -->
<live-player
src="{{url}}"
id="v-player-{{uid}}-{{screen}}"
data-uid="{{uid}}"
class="player"
mode="RTC"
autoplay="true"
object-fit="{{connectLivePlayerAttrs['object-fit']}}"
picture-in-picture-mode="{{connectLivePlayerAttrs['picture-in-picture-mode']}}"
background-mute="true"
bindstatechange="bindstatechange"
bindnetstatus="bindnetstatuschange"
/>
<!-- @build:end-exclude-in-video-only -->
</view>
@@ -0,0 +1 @@
.player-view{width:100%;height:100%}.player-view .player{width:100%;height:100%;border-radius:2px}
@@ -0,0 +1 @@
"use strict";Component({properties:{url:{type:String,value:""},enableCamera:{type:Boolean,value:!0},enableMic:{type:Boolean,value:!0},beauty:{type:Number,value:0},state:{type:String,value:"init"}},data:{},lifetimes:{ready:function(){this.livePusherContext||(this.livePusherContext=wx.createLivePusherContext(this))},detached:function(){console.log("detached")}},methods:{stop:function(){this.livePusherContext&&this.livePusherContext.stop()},switchCamera:function(){this.livePusherContext&&this.livePusherContext.switchCamera()},bindstatechange:function(t){console.log("bindstatechange",t),this.triggerEvent("pusherstatechange",t),-1307===t.detail.code&&this.setData({state:"error"}),1008===t.detail.code&&"init"===this.data.state&&this.setData({state:"ok"})},bindnetstatus:function(t){this.triggerEvent("pushernetstatuschange",t)}}});
@@ -0,0 +1 @@
{"component":true,"usingComponents":{}}
@@ -0,0 +1,23 @@
<!--volc-mini-sdk/components/connect/v-pusher/v-pusher.wxml-->
<view class="pusher-view">
<!--
mode: RTC 实时通话
background-mute: true 进入后台静音(兼容旧版本)
其他配置请参考小程序文档: https://developers.weixin.qq.com/miniprogram/dev/component/live-pusher.html
-->
<live-pusher
class="pusher"
url="{{url}}"
mode="RTC"
autopush="true"
max-bitrate="500"
min-bitrate="200"
beauty="{{beauty}}"
background-mute="true"
bindstatechange="bindstatechange"
bindnetstatus="bindnetstatus"
enable-camera="{{enableCamera}}"
enable-mic="{{enableMic}}"
aspect="3:4"
/>
</view>
@@ -0,0 +1 @@
.pusher-view{width:100%;height:100%}.pusher-view .pusher{width:100%;height:100%;border-radius:2px}