feat:蓝牙绑定和在线客服
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
:class="`pair-check-list__status--${item.status}`"
|
||||
>
|
||||
<text v-if="item.status === 'done'" class="pair-check-list__check">✓</text>
|
||||
<text v-else-if="item.status === 'failed'" class="pair-check-list__check">×</text>
|
||||
</view>
|
||||
<text class="pair-check-list__label">{{ item.title }}</text>
|
||||
<view
|
||||
@@ -82,6 +83,10 @@ defineProps<{
|
||||
background: #e8eaed;
|
||||
}
|
||||
|
||||
.pair-check-list__status--failed {
|
||||
background: #e54d4d;
|
||||
}
|
||||
|
||||
.pair-check-list__check {
|
||||
font-size: 22rpx;
|
||||
color: #fff;
|
||||
@@ -113,6 +118,10 @@ defineProps<{
|
||||
background: #f5f6f8;
|
||||
}
|
||||
|
||||
.pair-check-list__tag--failed {
|
||||
background: #fff5f5;
|
||||
}
|
||||
|
||||
.pair-check-list__tag-text {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
@@ -129,4 +138,8 @@ defineProps<{
|
||||
.pair-check-list__tag--pending .pair-check-list__tag-text {
|
||||
color: #98a2b3;
|
||||
}
|
||||
|
||||
.pair-check-list__tag--failed .pair-check-list__tag-text {
|
||||
color: #e54d4d;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,24 +5,43 @@
|
||||
<text class="pair-device-summary__name">{{ device.name }}</text>
|
||||
<text class="pair-device-summary__serial">设备编号:{{ device.serialMasked }}</text>
|
||||
</view>
|
||||
<view class="pair-device-summary__status">
|
||||
<view
|
||||
class="pair-device-summary__status"
|
||||
:class="`pair-device-summary__status--${connectStatus}`"
|
||||
>
|
||||
<view class="pair-device-summary__status-dot" />
|
||||
<text class="pair-device-summary__status-text">连接中</text>
|
||||
<text class="pair-device-summary__status-text">{{ statusText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { staticAssets } from '@/utils/static-assets'
|
||||
import type { PairDeviceInfo } from '../../pair.types'
|
||||
import type { PairConnectStatus, PairDeviceInfo } from '../../pair.types'
|
||||
|
||||
withDefaults(
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
device: PairDeviceInfo
|
||||
connectStatus?: PairConnectStatus
|
||||
thumbSrc?: string
|
||||
}>(),
|
||||
{ thumbSrc: staticAssets.logo },
|
||||
{
|
||||
connectStatus: 'connecting',
|
||||
thumbSrc: staticAssets.logo,
|
||||
},
|
||||
)
|
||||
|
||||
const statusText = computed(() => {
|
||||
switch (props.connectStatus) {
|
||||
case 'success':
|
||||
return '已连接'
|
||||
case 'failed':
|
||||
return '未连接'
|
||||
default:
|
||||
return '连接中'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -69,22 +88,55 @@ withDefaults(
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
padding: 10rpx 16rpx;
|
||||
background: #effbf4;
|
||||
border-radius: 999rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--connecting {
|
||||
background: #fff4e8;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--success {
|
||||
background: #effbf4;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--failed {
|
||||
background: #fff5f5;
|
||||
}
|
||||
|
||||
.pair-device-summary__status-dot {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
border: 3rpx solid $color-primary;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--connecting .pair-device-summary__status-dot {
|
||||
border: 3rpx solid #e67a2e;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--success .pair-device-summary__status-dot {
|
||||
background: $color-primary;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--failed .pair-device-summary__status-dot {
|
||||
background: #e54d4d;
|
||||
}
|
||||
|
||||
.pair-device-summary__status-text {
|
||||
font-size: 24rpx;
|
||||
color: $color-primary;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--connecting .pair-device-summary__status-text {
|
||||
color: #e67a2e;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--success .pair-device-summary__status-text {
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
.pair-device-summary__status--failed .pair-device-summary__status-text {
|
||||
color: #e54d4d;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user