Compare commits
@@ -0,0 +1,31 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# 环境变量文件(含敏感配置,禁止提交)
|
||||
# .env
|
||||
# .env.*
|
||||
.mcp.json
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.claude
|
||||
.turbo
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ClaudeCodeTabState">
|
||||
<option name="tabCount" value="4" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,2 @@
|
||||
export { checkOpenIdLogin, getUserInfoByIdCard, updateUser } from './user'
|
||||
export type { UserInfo, LoginResult } from './user'
|
||||
@@ -0,0 +1,53 @@
|
||||
import { get, post, put } from '../utils/request/index'
|
||||
|
||||
export interface UserInfo {
|
||||
id: string
|
||||
userId: string
|
||||
parentUserId: string | null
|
||||
scaleDeviceId: string
|
||||
deviceId: string | null
|
||||
deviceType: string
|
||||
dataType: number
|
||||
userType: string | null
|
||||
idCard: string
|
||||
height: number
|
||||
weight: number
|
||||
birthday: string
|
||||
sex: number
|
||||
avatar: string | null
|
||||
phone: string | null
|
||||
thirdId: string
|
||||
realname: string
|
||||
bmi: number
|
||||
createBy: string
|
||||
createTime: string
|
||||
updateBy: string | null
|
||||
updateTime: string | null
|
||||
delFlag: number
|
||||
sn: string | null
|
||||
workNo: string | null
|
||||
secondDepart: string | null
|
||||
thirdDepart: string | null
|
||||
remark: string | null
|
||||
relationType: string | null
|
||||
sex_dictText: string
|
||||
connectDeviceInfo: string
|
||||
flag?: number | null
|
||||
}
|
||||
|
||||
export interface LoginResult {
|
||||
user: UserInfo | null
|
||||
token: string
|
||||
}
|
||||
|
||||
/** OpenID 登录 */
|
||||
export const checkOpenIdLogin = (code: string) =>
|
||||
post<LoginResult>('weighingScale/v2/checkOpenIdLogin', { code })
|
||||
|
||||
/** 根据身份证号查询用户信息 */
|
||||
export const getUserInfoByIdCard = (params: { sn?: string; idCard: string; realname: string }) =>
|
||||
get<UserInfo | null>('weighingScale/v6/getUserInfoByIdcard', params, { loading: true, loadingTitle: '正在查询用户信息' })
|
||||
|
||||
/** 更新当前登录微信用户信息 */
|
||||
export const updateUser = (data: Record<string, any>) =>
|
||||
put<UserInfo>('weighingScale/v6/update/user', data)
|
||||
@@ -1,62 +1,80 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/login/login",
|
||||
"pages/searchDevice/searchDevice",
|
||||
"pages/connectedDevice/connectedDevice",
|
||||
"pages/connectedWifi/connectedWifi",
|
||||
"pages/supplementPersonal/supplementPersonal",
|
||||
"pages/home/home",
|
||||
"pages/equipment/equipment",
|
||||
"pages/data/data",
|
||||
"pages/my/my"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "智能体重秤"
|
||||
},
|
||||
"style": "v2",
|
||||
"rendererOptions": {
|
||||
"skyline": {
|
||||
"defaultDisplayBlock": true,
|
||||
"disableABTest": true,
|
||||
"sdkVersionBegin": "3.0.0",
|
||||
"sdkVersionEnd": "15.255.255"
|
||||
}
|
||||
},
|
||||
"componentFramework": "glass-easel",
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"lazyCodeLoading": "requiredComponents",
|
||||
"tabBar": {
|
||||
"color": "#999999",
|
||||
"selectedColor": "#000000",
|
||||
"backgroundColor": "#ffffff",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/home/home",
|
||||
"text": "首页",
|
||||
"iconPath": "images/tabBar/home_default.png",
|
||||
"selectedIconPath": "images/tabBar/home.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/equipment/equipment",
|
||||
"text": "设备",
|
||||
"iconPath": "images/tabBar/equipment_default.png",
|
||||
"selectedIconPath": "images/tabBar/equipment.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/data/data",
|
||||
"text": "数据",
|
||||
"iconPath": "images/tabBar/data_default.png",
|
||||
"selectedIconPath": "images/tabBar/data.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/my/my",
|
||||
"text": "我的",
|
||||
"iconPath": "images/tabBar/my_default.png",
|
||||
"selectedIconPath": "images/tabBar/my.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
"pages": [
|
||||
"pages/login/login",
|
||||
"pages/supplementPersonal/supplementPersonal",
|
||||
"pages/connectedDevice/connectedDevice",
|
||||
"pages/connectedWifi/connectedWifi",
|
||||
"pages/home/home",
|
||||
"pages/detailedReport/detailedReport",
|
||||
"pages/equipment/equipment",
|
||||
"pages/userManagement/userManagement",
|
||||
"pages/addUser/addUser",
|
||||
"pages/data/data",
|
||||
"pages/my/my",
|
||||
"pages/personalInformation/personalInformation",
|
||||
"pages/helpCenter/helpCenter",
|
||||
"pages/questionDetails/questionDetails"
|
||||
],
|
||||
"usingComponents": {
|
||||
"empty-data": "/components/emptyData/emptyData"
|
||||
},
|
||||
"window": {},
|
||||
"tabBar": {
|
||||
"color": "#808080",
|
||||
"selectedColor": "#1385FA",
|
||||
"backgroundColor": "#ffffff",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/home/home",
|
||||
"text": "首页",
|
||||
"iconPath": "images/tabBar/home_default.png",
|
||||
"selectedIconPath": "images/tabBar/home.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/equipment/equipment",
|
||||
"text": "设备",
|
||||
"iconPath": "images/tabBar/equipment_default.png",
|
||||
"selectedIconPath": "images/tabBar/equipment.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/data/data",
|
||||
"text": "数据",
|
||||
"iconPath": "images/tabBar/data_default.png",
|
||||
"selectedIconPath": "images/tabBar/data.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/my/my",
|
||||
"text": "我的",
|
||||
"iconPath": "images/tabBar/my_default.png",
|
||||
"selectedIconPath": "images/tabBar/my.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"style": "v2",
|
||||
"rendererOptions": {
|
||||
"skyline": {
|
||||
"defaultDisplayBlock": true,
|
||||
"disableABTest": true,
|
||||
"sdkVersionBegin": "3.0.0",
|
||||
"sdkVersionEnd": "15.255.255"
|
||||
}
|
||||
},
|
||||
"componentFramework": "glass-easel",
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"lazyCodeLoading": "requiredComponents",
|
||||
"plugins": {
|
||||
"ppScale-plugin": {
|
||||
"version": "0.0.32",
|
||||
"provider": "wx0826af4e4908f524"
|
||||
}
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "您的位置信息将用于发现附近的蓝牙设备,以便连接蓝牙秤。"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": [
|
||||
"getLocation"
|
||||
]
|
||||
}
|
||||
@@ -1,22 +1,48 @@
|
||||
/**app.wxss**/
|
||||
@import "./styles/index.less";
|
||||
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
background: var(--color-bg);
|
||||
/* 左右边距不加全局,避免全屏元素被挤 */
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
/* 需要页面标准边距的业务容器,在 WXML 根节点使用 */
|
||||
.page-container {
|
||||
padding-left: var(--page-padding-x);
|
||||
padding-right: var(--page-padding-x);
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 全局 scroll-view 通用样式:同时兼容两种结构
|
||||
* - page 内直接放 scroll-view:靠 height: 100% 撑满
|
||||
* - page 内为 flex 列布局(header + scrollView + footer):靠 flex: 1 撑满剩余空间
|
||||
*/
|
||||
.scrollView {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
content: "";
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-left: 4rpx solid #b6b6b6;
|
||||
border-top: 4rpx solid #b6b6b6;
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,54 @@
|
||||
// app.ts
|
||||
App<IAppOption>({
|
||||
globalData: {},
|
||||
onLaunch() {
|
||||
// 展示本地存储能力
|
||||
const logs = wx.getStorageSync('logs') || []
|
||||
logs.unshift(Date.now())
|
||||
wx.setStorageSync('logs', logs)
|
||||
import { leFuService } from './lefu/index'
|
||||
|
||||
// 登录
|
||||
wx.login({
|
||||
success: res => {
|
||||
console.log(res.code)
|
||||
// 发送 res.code 到后台换取 openId, sessionKey, unionId
|
||||
},
|
||||
})
|
||||
},
|
||||
})
|
||||
App<IAppOption>({
|
||||
globalData: {
|
||||
operationsEngineer: false,
|
||||
wasConnected: false
|
||||
},
|
||||
|
||||
onLaunch() {
|
||||
// 已登录则跳过登录页
|
||||
const token = wx.getStorageSync('token') || null;
|
||||
const userInfo = wx.getStorageSync('userInfo') || null;
|
||||
// const userInfo = true;
|
||||
if (token && userInfo) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onHide() {
|
||||
// 切后台:记录连接状态,挂起(断开但保留缓存设备,回前台可重连)
|
||||
const wasConnected = leFuService.isConnected
|
||||
this.globalData.wasConnected = wasConnected
|
||||
if (wasConnected) {
|
||||
leFuService.suspend()
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 回前台:如果之前连接过,自动重连
|
||||
if (this.globalData.wasConnected) {
|
||||
this.globalData.wasConnected = false
|
||||
leFuService.autoConnect()
|
||||
}
|
||||
},
|
||||
|
||||
getWxLoginCode(): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.login({
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
resolve(res.code)
|
||||
} else {
|
||||
reject(new Error('获取登录凭证失败'))
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(new Error(err.errMsg || '获取登录凭证失败'))
|
||||
},
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 80rpx;
|
||||
|
||||
.empty-icon {
|
||||
width: 193rpx;
|
||||
height: 138rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
color: #808080;
|
||||
font-size: 28rpx;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// emptyData.ts
|
||||
Component({
|
||||
properties: {
|
||||
text: {
|
||||
type: String,
|
||||
value: '暂无数据'
|
||||
},
|
||||
iconSrc: {
|
||||
type: String,
|
||||
value: '/images/emptyData.png'
|
||||
},
|
||||
containerStyle: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
textStyle: {
|
||||
type: String,
|
||||
value: ''
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
<view class="empty" style="{{containerStyle}}">
|
||||
<view class="empty-icon">
|
||||
<image src="{{iconSrc}}" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="empty-text" style="{{textStyle}}">{{text}}</view>
|
||||
</view>
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
.equipment-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(37, 37, 53, 0.6);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.equipment-panel {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 560rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
z-index: 101;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 64rpx 40rpx 56rpx;
|
||||
|
||||
.equipment-spinner {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border: 8rpx solid rgba(19, 133, 250, 0.2);
|
||||
border-top-color: #1385FA;
|
||||
border-radius: 50%;
|
||||
animation: equipment-spin 1s linear infinite;
|
||||
}
|
||||
|
||||
.equipment-title {
|
||||
color: #252535;
|
||||
height: 32rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 32rpx;
|
||||
text-align: center;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.equipment-content {
|
||||
color: #808080;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
text-align: center;
|
||||
margin-top: 24rpx;
|
||||
white-space: pre-line;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes equipment-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
Component({
|
||||
properties: {
|
||||
/** 是否显示弹框 */
|
||||
show: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
/** 标题 */
|
||||
title: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
/** 副标题(支持 \n 换行) */
|
||||
content: {
|
||||
type: String,
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 点击遮罩关闭 */
|
||||
onTapMask() {
|
||||
this.triggerEvent('close')
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
<block wx:if="{{ show }}">
|
||||
<view class="equipment-mask" bind:tap="onTapMask"></view>
|
||||
<view class="equipment-panel">
|
||||
<view class="equipment-spinner"></view>
|
||||
<view class="equipment-title">{{ title }}</view>
|
||||
<view class="equipment-content">{{ content }}</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {},
|
||||
"multipleSlots": true
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
.nav-spacer {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-wrap {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nav-left {
|
||||
height: 100%;
|
||||
flex-shrink: 0;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
width: 60rpx;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.back-arrow {
|
||||
width: 18rpx;
|
||||
height: 18rpx;
|
||||
border-left: 4rpx solid #252535;
|
||||
border-bottom: 4rpx solid #252535;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.nav-center {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
color: #252535;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { getNavBarLayout } from '../../utils/navBar/index';
|
||||
|
||||
Component({
|
||||
options: {
|
||||
multipleSlots: true,
|
||||
},
|
||||
|
||||
properties: {
|
||||
title: { type: String, value: '' },
|
||||
back: { type: String, value: 'auto' },
|
||||
fixed: { type: Boolean, value: false },
|
||||
zIndex: { type: Number, value: 100 },
|
||||
bgColor: { type: String, value: 'transparent' },
|
||||
color: { type: String, value: '#252535' },
|
||||
arrowColor: { type: String, value: '#252535' },
|
||||
},
|
||||
|
||||
data: {
|
||||
statusBarHeight: 0,
|
||||
navBarHeight: 44,
|
||||
totalNavHeight: 0,
|
||||
navPaddingRight: 0,
|
||||
_showBack: false,
|
||||
_spacerHeight: 'auto',
|
||||
_navStyle: '',
|
||||
},
|
||||
|
||||
lifetimes: {
|
||||
attached() {
|
||||
const layout = getApp<IAppOption>().globalData.navBarLayout || getNavBarLayout();
|
||||
this._applyLayout(layout);
|
||||
},
|
||||
},
|
||||
|
||||
observers: {
|
||||
'fixed, back, zIndex'(_fixed: boolean, _back: string, _zIndex: number) {
|
||||
const layout = getApp<IAppOption>().globalData.navBarLayout || getNavBarLayout();
|
||||
this._applyLayout(layout);
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
_applyLayout(layout: ReturnType<typeof getNavBarLayout>) {
|
||||
const { fixed, back, zIndex } = this.properties;
|
||||
const _showBack = back === 'show' || (back === 'auto' && getCurrentPages().length > 1);
|
||||
|
||||
this.setData({
|
||||
...layout,
|
||||
_showBack,
|
||||
_spacerHeight: fixed ? layout.totalNavHeight + 'px' : 'auto',
|
||||
_navStyle: fixed
|
||||
? `position: fixed; top: 0; left: 0; right: 0; z-index: ${zIndex};`
|
||||
: '',
|
||||
});
|
||||
},
|
||||
|
||||
onBack() {
|
||||
wx.navigateBack({ delta: 1 });
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
<view class="nav-spacer" style="height: {{_spacerHeight}}; {{_navStyle}}">
|
||||
<view class="nav-wrap" style="background-color: {{bgColor}};">
|
||||
<view style="height: {{statusBarHeight}}px;"></view>
|
||||
<view class="nav-content" style="height: {{navBarHeight}}px; padding-right: {{navPaddingRight}}px;">
|
||||
<view class="nav-left">
|
||||
<block wx:if="{{_showBack}}">
|
||||
<view class="back-btn" bind:tap="onBack">
|
||||
<view class="back-arrow" style="border-left-color: {{arrowColor}}; border-bottom-color: {{arrowColor}};"></view>
|
||||
</view>
|
||||
</block>
|
||||
<slot name="left" />
|
||||
</view>
|
||||
<view class="nav-center">
|
||||
<text class="nav-title" style="color: {{color}};">{{title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"styleIsolation": "apply-shared",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
.weui-navigation-bar {
|
||||
--weui-FG-0:rgba(0,0,0,.9);
|
||||
--height: 44px;
|
||||
--left: 16px;
|
||||
}
|
||||
.weui-navigation-bar .android {
|
||||
--height: 48px;
|
||||
}
|
||||
|
||||
.weui-navigation-bar {
|
||||
overflow: hidden;
|
||||
color: var(--weui-FG-0);
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.weui-navigation-bar__inner {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: calc(var(--height) + env(safe-area-inset-top));
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-top: env(safe-area-inset-top);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.weui-navigation-bar__left {
|
||||
position: relative;
|
||||
padding-left: var(--left);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.weui-navigation-bar__btn_goback_wrapper {
|
||||
padding: 11px 18px 11px 16px;
|
||||
margin: -11px -18px -11px -16px;
|
||||
}
|
||||
|
||||
.weui-navigation-bar__btn_goback_wrapper.weui-active {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.weui-navigation-bar__btn_goback {
|
||||
font-size: 12px;
|
||||
width: 12px;
|
||||
height: 24px;
|
||||
-webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
||||
mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E") no-repeat 50% 50%;
|
||||
-webkit-mask-size: cover;
|
||||
mask-size: cover;
|
||||
background-color: var(--weui-FG-0);
|
||||
}
|
||||
|
||||
.weui-navigation-bar__center {
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.weui-navigation-bar__loading {
|
||||
margin-right: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.weui-loading {
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
background: transparent url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23606060' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23606060' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23606060' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23606060' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A") no-repeat;
|
||||
background-size: 100%;
|
||||
margin-left: 0;
|
||||
animation: loading linear infinite 1s;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
from {
|
||||
transform: rotate(0);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
Component({
|
||||
options: {
|
||||
multipleSlots: true // 在组件定义时的选项中启用多slot支持
|
||||
},
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
extClass: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
background: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
back: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
homeButton: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
animated: {
|
||||
// 显示隐藏的时候opacity动画效果
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
show: {
|
||||
// 显示隐藏导航,隐藏的时候navigation-bar的高度占位还在
|
||||
type: Boolean,
|
||||
value: true,
|
||||
observer: '_showChange'
|
||||
},
|
||||
// back为true的时候,返回的页面深度
|
||||
delta: {
|
||||
type: Number,
|
||||
value: 1
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
displayStyle: ''
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
const rect = wx.getMenuButtonBoundingClientRect()
|
||||
wx.getSystemInfo({
|
||||
success: (res) => {
|
||||
const isAndroid = res.platform === 'android'
|
||||
const isDevtools = res.platform === 'devtools'
|
||||
this.setData({
|
||||
ios: !isAndroid,
|
||||
innerPaddingRight: `padding-right: ${res.windowWidth - rect.left}px`,
|
||||
leftWidth: `width: ${res.windowWidth - rect.left }px`,
|
||||
safeAreaTop: isDevtools || isAndroid ? `height: calc(var(--height) + ${res.safeArea.top}px); padding-top: ${res.safeArea.top}px` : ``
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
_showChange(show: boolean) {
|
||||
const animated = this.data.animated
|
||||
let displayStyle = ''
|
||||
if (animated) {
|
||||
displayStyle = `opacity: ${
|
||||
show ? '1' : '0'
|
||||
};transition:opacity 0.5s;`
|
||||
} else {
|
||||
displayStyle = `display: ${show ? '' : 'none'}`
|
||||
}
|
||||
this.setData({
|
||||
displayStyle
|
||||
})
|
||||
},
|
||||
back() {
|
||||
const data = this.data
|
||||
if (data.delta) {
|
||||
wx.navigateBack({
|
||||
delta: data.delta
|
||||
})
|
||||
}
|
||||
this.triggerEvent('back', { delta: data.delta }, {})
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -1,64 +0,0 @@
|
||||
<view class="weui-navigation-bar {{extClass}}">
|
||||
<view class="weui-navigation-bar__inner {{ios ? 'ios' : 'android'}}" style="color: {{color}}; background: {{background}}; {{displayStyle}}; {{innerPaddingRight}}; {{safeAreaTop}};">
|
||||
|
||||
<!-- 左侧按钮 -->
|
||||
<view class='weui-navigation-bar__left' style="{{leftWidth}};">
|
||||
<block wx:if="{{back || homeButton}}">
|
||||
<!-- 返回上一页 -->
|
||||
<block wx:if="{{back}}">
|
||||
<view class="weui-navigation-bar__buttons weui-navigation-bar__buttons_goback">
|
||||
<view
|
||||
bindtap="back"
|
||||
class="weui-navigation-bar__btn_goback_wrapper"
|
||||
hover-class="weui-active"
|
||||
hover-stay-time="100"
|
||||
aria-role="button"
|
||||
aria-label="返回"
|
||||
>
|
||||
<view class="weui-navigation-bar__button weui-navigation-bar__btn_goback"></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 返回首页 -->
|
||||
<block wx:if="{{homeButton}}">
|
||||
<view class="weui-navigation-bar__buttons weui-navigation-bar__buttons_home">
|
||||
<view
|
||||
bindtap="home"
|
||||
class="weui-navigation-bar__btn_home_wrapper"
|
||||
hover-class="weui-active"
|
||||
aria-role="button"
|
||||
aria-label="首页"
|
||||
>
|
||||
<view class="weui-navigation-bar__button weui-navigation-bar__btn_home"></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<slot name="left"></slot>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 标题 -->
|
||||
<view class='weui-navigation-bar__center'>
|
||||
<view wx:if="{{loading}}" class="weui-navigation-bar__loading" aria-role="alert">
|
||||
<view
|
||||
class="weui-loading"
|
||||
aria-role="img"
|
||||
aria-label="加载中"
|
||||
></view>
|
||||
</view>
|
||||
<block wx:if="{{title}}">
|
||||
<text>{{title}}</text>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<slot name="center"></slot>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 右侧留空 -->
|
||||
<view class='weui-navigation-bar__right'>
|
||||
<slot name="right"></slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
/* 遮罩层 */
|
||||
.drawer-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(37, 37, 53, 0.6);
|
||||
z-index: 100;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
|
||||
&--visible {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 抽屉面板 */
|
||||
.drawer-panel {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 85vh;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
z-index: 101;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.3s ease;
|
||||
|
||||
&--visible {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 拖拽把手 */
|
||||
.drawer-handle {
|
||||
width: 72rpx;
|
||||
height: 6rpx;
|
||||
background-color: #77849E;
|
||||
border-radius: 3rpx;
|
||||
margin: 32rpx auto 0;
|
||||
}
|
||||
|
||||
/* 标题栏 */
|
||||
.drawer-header {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2rpx solid #EAEDF1;
|
||||
|
||||
.drawer-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.drawer-title {
|
||||
color: #252535;
|
||||
height: 40rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bolder;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
/* 关闭按钮 */
|
||||
.drawer-close {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.drawer-close-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
position: relative;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
height: 3rpx;
|
||||
background-color: #252535;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
|
||||
&::before {
|
||||
transform: translate(-50%, -50%) rotate(45deg);
|
||||
}
|
||||
|
||||
&::after {
|
||||
transform: translate(-50%, -50%) rotate(-45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 用户滚动列表 */
|
||||
.drawer-user-list {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.scrollViewContent {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
/* 用户行 */
|
||||
.member-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 2rpx solid #EAEDF1;
|
||||
|
||||
/* 纯色占位头像 */
|
||||
.member-avatar-placeholder {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
|
||||
/* 姓名 + 副标题 */
|
||||
.member-info {
|
||||
flex: 1;
|
||||
height: 78rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: 23rpx;
|
||||
|
||||
.member-name {
|
||||
color: #333333;
|
||||
height: 32rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.member-sub {
|
||||
color: #77849E;
|
||||
height: 34rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 34rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.member-type {
|
||||
height: 40rpx;
|
||||
flex-shrink: 0;
|
||||
|
||||
.member-type-tag {
|
||||
height: 40rpx;
|
||||
padding: 0 14rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.member-type-tag--self {
|
||||
color: #1385FA;
|
||||
background-color: rgba(19, 133, 250, 0.12);
|
||||
}
|
||||
|
||||
.member-type-tag--employee {
|
||||
color: #10B981;
|
||||
background-color: rgba(16, 185, 129, 0.12);
|
||||
}
|
||||
|
||||
.member-type-tag--family {
|
||||
color: #F59E0B;
|
||||
background-color: rgba(245, 158, 11, 0.12);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
import { get } from '../../utils/request/index'
|
||||
import { leFuService } from '../../lefu/index'
|
||||
import { calcAge } from '../../utils/idCard/index'
|
||||
|
||||
/** GET /weighingScale/v5/select/addMembers/user 返回的单条结构 */
|
||||
interface AddMemberApiItem {
|
||||
id: string
|
||||
realname: string
|
||||
sex_dictText: '男' | '女'
|
||||
birthday: string
|
||||
height: number
|
||||
weight: number
|
||||
idCard: string | null
|
||||
avatar: string | null
|
||||
dataType?: number
|
||||
relationType?: number | string | null
|
||||
}
|
||||
|
||||
/** GET /weighingScale/v3/select/history/user 返回的单条结构 */
|
||||
interface HistoryApiItem {
|
||||
id: string
|
||||
userId: string
|
||||
realname: string
|
||||
sex: number
|
||||
height: number
|
||||
birthday: string
|
||||
avatar: string | null
|
||||
relationType: number | string | null
|
||||
dataType?: number
|
||||
}
|
||||
|
||||
/** 抽屉内部用户项(含回填所需全量字段) */
|
||||
interface ExistingMember {
|
||||
id: string
|
||||
name: string
|
||||
gender: '男' | '女'
|
||||
age: number
|
||||
height: number
|
||||
weight: number
|
||||
idCard: string
|
||||
avatar?: string
|
||||
selected?: boolean
|
||||
/** history 模式额外携带,供页面构建 userInfo */
|
||||
userId?: string
|
||||
sex?: number
|
||||
birthday?: string
|
||||
relationType?: number | string | null
|
||||
/** 0=员工 1=家庭成员 */
|
||||
dataType?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择已有用户抽屉组件
|
||||
* Properties: show(控制显示)、source(数据来源:addMember/history)、excludeUserId(排除用户)
|
||||
* Events: close(关闭), select(选中用户,携带 ExistingMember)
|
||||
*/
|
||||
Component({
|
||||
properties: {
|
||||
/** 是否显示抽屉 */
|
||||
show: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
/** 数据来源模式:addMember=新增用户选择 / history=历史数据切换用户 */
|
||||
source: {
|
||||
type: String,
|
||||
value: 'addMember'
|
||||
},
|
||||
/** 需要排除的用户 ID(history 模式下排除当前查看的用户) */
|
||||
excludeUserId: {
|
||||
type: String,
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
|
||||
data: {
|
||||
/** 控制 wx:if,DOM 是否存在 */
|
||||
innerShow: false,
|
||||
/** 控制 --visible 类,触发 CSS transition */
|
||||
animVisible: false,
|
||||
/** 用户列表(组件内部拉取) */
|
||||
members: [] as ExistingMember[]
|
||||
},
|
||||
|
||||
observers: {
|
||||
/**
|
||||
* 监听外部 show 变化:
|
||||
* 打开时先拉数据再展示抽屉;关闭时移除动画类后移除 DOM
|
||||
*/
|
||||
show(val: boolean) {
|
||||
if (val) {
|
||||
this._fetchMembers()
|
||||
this.setData({ innerShow: true })
|
||||
setTimeout(() => {
|
||||
this.setData({ animVisible: true })
|
||||
}, 20)
|
||||
} else {
|
||||
this.setData({ animVisible: false })
|
||||
setTimeout(() => {
|
||||
this.setData({ innerShow: false })
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 调接口获取可选用户列表,根据 source 调不同接口 */
|
||||
_fetchMembers() {
|
||||
const userInfo = wx.getStorageSync('userInfo') as { userId?: string } | null
|
||||
const userId = userInfo?.userId ?? ''
|
||||
|
||||
wx.showLoading({ title: '加载中...', mask: true })
|
||||
|
||||
if (this.properties.source === 'history') {
|
||||
const params: Record<string, string> = { userId }
|
||||
if (this.properties.excludeUserId) {
|
||||
params.userIdExclude = this.properties.excludeUserId
|
||||
}
|
||||
get<HistoryApiItem[]>('weighingScale/v3/select/history/user', params, { loading: false })
|
||||
.then((res: any) => {
|
||||
const members: ExistingMember[] = (res.result ?? []).map((item: HistoryApiItem) => ({
|
||||
id: item.id,
|
||||
name: item.realname,
|
||||
gender: item.sex === 1 ? '男' : '女',
|
||||
age: calcAge(item.birthday),
|
||||
height: item.height,
|
||||
weight: 0,
|
||||
idCard: '',
|
||||
avatar: item.avatar ?? '',
|
||||
userId: item.userId,
|
||||
sex: item.sex,
|
||||
birthday: item.birthday,
|
||||
relationType: item.relationType,
|
||||
dataType: item.dataType,
|
||||
}))
|
||||
this.setData({ members })
|
||||
})
|
||||
.catch((err: any) => {
|
||||
console.error('[selectMemberDrawer] 加载成员失败:', err)
|
||||
wx.showToast({ title: err?.msg || err?.message || '加载失败', icon: 'none' })
|
||||
})
|
||||
.finally(() => {
|
||||
wx.hideLoading()
|
||||
})
|
||||
} else {
|
||||
const sn = leFuService.deviceInfo?.serialNumber ?? ''
|
||||
get<AddMemberApiItem[]>('weighingScale/v5/select/addMembers/user', { userId, sn }, { loading: false })
|
||||
.then((res: any) => {
|
||||
const members: ExistingMember[] = (res.result ?? []).map((item: AddMemberApiItem) => ({
|
||||
id: item.id,
|
||||
name: item.realname,
|
||||
gender: item.sex_dictText,
|
||||
age: calcAge(item.birthday),
|
||||
height: item.height,
|
||||
weight: item.weight,
|
||||
idCard: item.idCard ?? '',
|
||||
avatar: item.avatar ?? '',
|
||||
relationType: item.relationType,
|
||||
dataType: item.dataType,
|
||||
}))
|
||||
this.setData({ members })
|
||||
})
|
||||
.catch((err: any) => {
|
||||
console.error('[selectMemberDrawer] 加载成员失败:', err)
|
||||
wx.showToast({ title: err?.msg || err?.message || '加载失败', icon: 'none' })
|
||||
})
|
||||
.finally(() => {
|
||||
wx.hideLoading()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/** 点击遮罩关闭 */
|
||||
onTapMask() {
|
||||
this.triggerEvent('close')
|
||||
},
|
||||
|
||||
/** 点击关闭按钮 */
|
||||
onTapClose() {
|
||||
this.triggerEvent('close')
|
||||
},
|
||||
|
||||
/** 点击用户行,触发 select 事件 */
|
||||
onTapMember(e: WechatMiniprogram.TouchEvent) {
|
||||
const member = e.currentTarget.dataset.member as ExistingMember
|
||||
this.triggerEvent('select', member)
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,61 @@
|
||||
<!-- 选择已有用户抽屉 -->
|
||||
<block wx:if="{{ innerShow }}">
|
||||
<!-- 遮罩 -->
|
||||
<view class="drawer-mask {{ animVisible ? 'drawer-mask--visible' : '' }}" bind:tap="onTapMask"></view>
|
||||
|
||||
<!-- 抽屉面板 -->
|
||||
<view class="drawer-panel {{ animVisible ? 'drawer-panel--visible' : '' }}">
|
||||
<!-- 顶部拖拽把手 -->
|
||||
<view class="drawer-handle"></view>
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<view class="drawer-header">
|
||||
<view class="drawer-icon"></view>
|
||||
<view class="drawer-title">选择本人添加的用户</view>
|
||||
<view class="drawer-close" bind:tap="onTapClose">
|
||||
<view class="drawer-close-icon"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 用户列表 -->
|
||||
<view class="drawer-user-list">
|
||||
<block wx:if="{{ members.length }}">
|
||||
<scroll-view class="~scrollView" scroll-y>
|
||||
<view class="scrollViewContent">
|
||||
<block wx:for="{{ members }}" wx:key="id">
|
||||
<view class="member-item" bind:tap="onTapMember" data-member="{{ item }}">
|
||||
<!-- 头像 -->
|
||||
<view class="member-avatar-placeholder">
|
||||
<image src="{{ item.gender === '女' ? '/images/woman.png' : '/images/man.png' }}" mode="aspectFit" />
|
||||
</view>
|
||||
|
||||
<!-- 姓名 + 性别·年龄 -->
|
||||
<view class="member-info">
|
||||
<view class="member-name">{{ item.name }}</view>
|
||||
<view class="member-sub">{{ item.gender }}·{{ item.age }}岁 丨 {{ item.height }}cm</view>
|
||||
</view>
|
||||
|
||||
<view class="member-type">
|
||||
<block wx:if="{{ item.relationType == 1 }}">
|
||||
<view class="member-type-tag member-type-tag--self">本人</view>
|
||||
</block>
|
||||
<block wx:elif="{{ item.dataType === 0 }}">
|
||||
<view class="member-type-tag member-type-tag--employee">员工</view>
|
||||
</block>
|
||||
<block wx:elif="{{ item.dataType === 1 }}">
|
||||
<view class="member-type-tag member-type-tag--family">家庭用户</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</block>
|
||||
|
||||
<!-- 无用户:占位 -->
|
||||
<block wx:else>
|
||||
<empty-data text="暂无用户" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
.confirm-modal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.modal-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
|
||||
&.anim-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
position: relative;
|
||||
width: 660rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 24rpx;
|
||||
overflow: hidden;
|
||||
transform: scale(0.9);
|
||||
opacity: 0;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&.anim-visible {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding-top: 50rpx;
|
||||
width: 100%;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.modal-title {
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
font-weight: bolder;
|
||||
font-size: 36rpx;
|
||||
color: #252535;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.modal-sub-title {
|
||||
width: 100%;
|
||||
height: 32rpx;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #1385FA;
|
||||
line-height: 32rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.modal-body-box {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16rpx;
|
||||
background-color: #F6F6F6;
|
||||
|
||||
.info-row {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
padding: 10rpx 0;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #EAECF1;
|
||||
|
||||
.info-label {
|
||||
color: #77849E;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
color: #252535;
|
||||
height: 80rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
width: 100%;
|
||||
height: 110rpx;
|
||||
display: flex;
|
||||
border-top: 1rpx solid #EAECF1;
|
||||
|
||||
.modal-btn {
|
||||
flex: 1;
|
||||
height: 110rpx;
|
||||
line-height: 110rpx;
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.modal-btn-cancel {
|
||||
color: #77849E;
|
||||
border-right: 1rpx solid #EAECF1;
|
||||
}
|
||||
|
||||
.modal-btn-confirm {
|
||||
color: #1385FA;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* 用户信息确认弹框组件
|
||||
* Properties: show(控制显示), userInfo(用户信息)
|
||||
* Events: confirm(确认), cancel(取消)
|
||||
*/
|
||||
Component({
|
||||
properties: {
|
||||
/** 是否显示弹框 */
|
||||
show: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
/** 用户信息数据 */
|
||||
userInfo: {
|
||||
type: Object,
|
||||
value: {}
|
||||
}
|
||||
},
|
||||
|
||||
data: {
|
||||
/** 控制 wx:if,DOM 是否存在 */
|
||||
innerShow: false,
|
||||
/** 控制 --visible 类,触发 CSS transition */
|
||||
animVisible: false
|
||||
},
|
||||
|
||||
observers: {
|
||||
/**
|
||||
* 监听外部 show 变化:
|
||||
* 打开时先展示弹框再执行动画;关闭时移除动画类后移除 DOM
|
||||
*/
|
||||
show(val: boolean) {
|
||||
if (val) {
|
||||
this.setData({ innerShow: true })
|
||||
setTimeout(() => {
|
||||
this.setData({ animVisible: true })
|
||||
}, 20)
|
||||
} else {
|
||||
this.setData({ animVisible: false })
|
||||
setTimeout(() => {
|
||||
this.setData({ innerShow: false })
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 点击遮罩关闭 */
|
||||
onTapMask() {
|
||||
this.triggerEvent('cancel')
|
||||
},
|
||||
|
||||
/** 点击取消按钮 */
|
||||
onTapCancel() {
|
||||
this.triggerEvent('cancel')
|
||||
},
|
||||
|
||||
/** 点击确认按钮 */
|
||||
onTapConfirm() {
|
||||
this.triggerEvent('confirm')
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,42 @@
|
||||
<view class="confirm-modal" wx:if="{{ innerShow }}">
|
||||
<view class="modal-mask {{ animVisible ? 'anim-visible' : '' }}" bind:tap="onTapMask"></view>
|
||||
|
||||
<view class="modal-content {{ animVisible ? 'anim-visible' : '' }}">
|
||||
<view class="modal-header">
|
||||
<view class="modal-title">当前身份证号已存在</view>
|
||||
<view class="modal-sub-title">是否直接复用信息?</view>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{ userInfo }}">
|
||||
<view class="modal-body">
|
||||
<view class="modal-body-box">
|
||||
<view class="info-row">
|
||||
<view class="info-label">姓名:</view>
|
||||
<view class="info-value">{{ userInfo.realname }}</view>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<view class="info-label">身份证号:</view>
|
||||
<view class="info-value">{{ userInfo.idCard }}</view>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<view class="info-label">性别:</view>
|
||||
<view class="info-value">{{ userInfo.sex_dictText }}</view>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<view class="info-label">身高:</view>
|
||||
<view class="info-value">{{ userInfo.height }}cm</view>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<view class="info-label">体重:</view>
|
||||
<view class="info-value">{{ userInfo.weight }}kg</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="modal-footer">
|
||||
<view class="modal-btn modal-btn-cancel" bind:tap="onTapCancel">取消</view>
|
||||
<view class="modal-btn modal-btn-confirm" bind:tap="onTapConfirm">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
.userManagementAddUser-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(37, 37, 53, 0.5);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.userManagementAddUser-panel {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 660rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 48rpx 40rpx 56rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
z-index: 101;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.userManagementAddUser-title {
|
||||
color: #252535;
|
||||
height: 36rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: bolder;
|
||||
line-height: 36rpx;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
|
||||
.userManagementAddUser-btn {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border-radius: 48rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
&--primary {
|
||||
color: #FFFFFF;
|
||||
line-height: 96rpx;
|
||||
background-color: #1385FA;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
&--outline {
|
||||
color: #1385FA;
|
||||
line-height: 92rpx;
|
||||
border: 2rpx solid #1385FA;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
Component({
|
||||
properties: {
|
||||
/** 是否显示弹框 */
|
||||
show: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 点击遮罩关闭 */
|
||||
onClose() {
|
||||
this.triggerEvent('close')
|
||||
},
|
||||
|
||||
/** 一键添加本人 */
|
||||
onAddSelf() {
|
||||
this.triggerEvent('addself')
|
||||
},
|
||||
|
||||
/** 添加其他用户 */
|
||||
onAddOther() {
|
||||
this.triggerEvent('addother')
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
<block wx:if="{{ show }}">
|
||||
<view class="userManagementAddUser-mask" bind:tap="onClose"></view>
|
||||
<view class="userManagementAddUser-panel">
|
||||
<view class="userManagementAddUser-title">添加用户</view>
|
||||
<view class="userManagementAddUser-btn userManagementAddUser-btn--primary" bind:tap="onAddSelf">一键添加本人</view>
|
||||
<view class="userManagementAddUser-btn userManagementAddUser-btn--outline" bind:tap="onAddOther">添加其他用户</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
.sync-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(37, 37, 53, 0.6);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.sync-panel {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 560rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
z-index: 101;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 64rpx 48rpx;
|
||||
|
||||
.sync-spinner {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border: 8rpx solid rgba(19, 133, 250, 0.1);
|
||||
border-top-color: #1385FA;
|
||||
border-radius: 50%;
|
||||
animation: sync-spin 1s linear infinite;
|
||||
}
|
||||
|
||||
.sync-tick {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border: 8rpx solid #1385FA;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #1385FA;
|
||||
font-size: 56rpx;
|
||||
font-weight: bolder;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
|
||||
.sync-title {
|
||||
color: #252535;
|
||||
height: 32rpx;
|
||||
font-size: 32rpx;
|
||||
line-height: 32rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.sync-status {
|
||||
color: #808080;
|
||||
height: 24rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.sync-percent {
|
||||
color: #77849E;
|
||||
height: 24rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
margin-top: 48rpx;
|
||||
}
|
||||
|
||||
.sync-progress {
|
||||
width: 464rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 6rpx;
|
||||
background-color: #D9D9D9;
|
||||
margin-top: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.sync-progress-inner {
|
||||
height: 10rpx;
|
||||
border-radius: 6rpx;
|
||||
background-color: #1385FA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sync-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
Component({
|
||||
properties: {
|
||||
/** 是否显示弹框 */
|
||||
show: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
/** 同步进度百分比 */
|
||||
percent: {
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
/** 同步状态文案 */
|
||||
status: {
|
||||
type: String,
|
||||
value: ''
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,17 @@
|
||||
<block wx:if="{{ show }}">
|
||||
<view class="sync-mask"></view>
|
||||
<view class="sync-panel">
|
||||
<block wx:if="{{ percent === 100 }}">
|
||||
<view class="sync-tick">✓</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="sync-spinner"></view>
|
||||
</block>
|
||||
<view class="sync-title">同步成员至设备</view>
|
||||
<view class="sync-status">{{ status }}</view>
|
||||
<view class="sync-percent">{{ percent }}%</view>
|
||||
<view class="sync-progress">
|
||||
<view class="sync-progress-inner" style="width: {{ percent }}%;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
After Width: | Height: | Size: 738 B |
|
After Width: | Height: | Size: 999 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 976 B |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 709 B |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 641 B |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 732 B |
|
After Width: | Height: | Size: 327 B |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 510 B |
|
After Width: | Height: | Size: 775 B |
|
After Width: | Height: | Size: 542 B |
|
After Width: | Height: | Size: 750 B |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 165 KiB |
|
After Width: | Height: | Size: 708 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 187 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 471 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 291 KiB |
|
Before Width: | Height: | Size: 248 KiB |
@@ -0,0 +1,25 @@
|
||||
import type { LeFuConfig } from './types'
|
||||
import { ENV, type EnvType } from '../utils/env/index'
|
||||
|
||||
/** 各环境配网网关地址:develop / trial 走测试网关,release 走正式网关 */
|
||||
const DOMAINS: Record<EnvType, { domain1: string; domain2: string }> = {
|
||||
develop: {
|
||||
domain1: 'http://10.10.10.10:8889',
|
||||
domain2: 'http://10.10.10.10:8889/weight',
|
||||
},
|
||||
trial: {
|
||||
domain1: 'http://device.shuziweidao.com:80/gateway',
|
||||
domain2: 'http://device.shuziweidao.com:80/weight',
|
||||
},
|
||||
release: {
|
||||
domain1: 'http://device.shuziweidao.com:80/gateway',
|
||||
domain2: 'http://device.shuziweidao.com:80/weight',
|
||||
},
|
||||
}
|
||||
|
||||
/** 乐福 SDK 配置 */
|
||||
export const LEFU_CONFIG: LeFuConfig = {
|
||||
key: 'lefudc91611833e18d94',
|
||||
secret: 'eQ50JYimMp0X7uhNLj6D3lTEk4TUUvEG7dvaqKM9t1U=',
|
||||
...DOMAINS[ENV],
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import type { DeviceSetting } from './types'
|
||||
|
||||
/** 支持的设备型号配置列表(5款) */
|
||||
export const DEVICE_SETTINGS: DeviceSetting[] = [
|
||||
{
|
||||
advLength: 999, calorieStatus: 0, createBy: null,
|
||||
deviceAccuracyType: 2, deviceCalcuteType: 3, deviceConnectType: 2,
|
||||
deviceFuncType: 223, deviceName: 'CF568_G', devicePowerType: 3,
|
||||
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,11',
|
||||
id: 65, imgUrl: null, macAddressStart: 6, remark: null,
|
||||
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
|
||||
},
|
||||
{
|
||||
advLength: 999, calorieStatus: 0, createBy: null,
|
||||
deviceAccuracyType: 2, deviceCalcuteType: 3, deviceConnectType: 2,
|
||||
deviceFuncType: 223, deviceName: 'YX-B4-568-BW', devicePowerType: 3,
|
||||
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,11',
|
||||
id: 65, imgUrl: null, macAddressStart: 6, remark: null,
|
||||
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
|
||||
},
|
||||
{
|
||||
advLength: 999, calorieStatus: 0, createBy: null,
|
||||
deviceAccuracyType: 2, deviceCalcuteType: 4, deviceConnectType: 2,
|
||||
deviceFuncType: 65759, deviceName: 'CF636_G', devicePowerType: 3,
|
||||
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,2',
|
||||
id: 216, imgUrl: null, macAddressStart: 6, remark: null,
|
||||
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
|
||||
},
|
||||
{
|
||||
advLength: 999, calorieStatus: 0, createBy: null,
|
||||
deviceAccuracyType: 2, deviceCalcuteType: 4, deviceConnectType: 2,
|
||||
deviceFuncType: 65759, deviceName: 'YX-B8-636-BW', devicePowerType: 3,
|
||||
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,2',
|
||||
id: 216, imgUrl: null, macAddressStart: 6, remark: null,
|
||||
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
|
||||
},
|
||||
{
|
||||
advLength: 999, calorieStatus: 0, createBy: null,
|
||||
deviceAccuracyType: 2, deviceCalcuteType: 4, deviceConnectType: 2,
|
||||
deviceFuncType: 223, deviceName: 'CF577', devicePowerType: 3,
|
||||
deviceProtocolType: 3, deviceType: 1, deviceUnitType: '0,1,11',
|
||||
id: 51, imgUrl: null, macAddressStart: 6, remark: null,
|
||||
sign: 'FF', status: 0, uhStatus: 1, updateBy: null,
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,11 @@
|
||||
export { leFuService } from './service'
|
||||
export type {
|
||||
ScannedDevice,
|
||||
LeFuWifiItem,
|
||||
ProgressData,
|
||||
LockData,
|
||||
LeFuConfig,
|
||||
DeviceSetting,
|
||||
DeviceInfo,
|
||||
SyncUserData,
|
||||
} from './types'
|
||||