build: v1.2.1+36
This commit is contained in:
parent
0cc4dc3ec5
commit
6ddfae9bdd
@ -7,7 +7,7 @@
|
|||||||
v-if="tip"
|
v-if="tip"
|
||||||
name="question-circle-fill"
|
name="question-circle-fill"
|
||||||
color="#555555"
|
color="#555555"
|
||||||
size="38"
|
size="38rpx"
|
||||||
@click="tipDialog"
|
@click="tipDialog"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
"name": "wx-starlock",
|
"name": "wx-starlock",
|
||||||
"appid": "__UNI__933D519",
|
"appid": "__UNI__933D519",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName": "1.2.0",
|
"versionName": "1.3.0",
|
||||||
"versionCode": "35",
|
"versionCode": "37",
|
||||||
"mp-weixin": {
|
"mp-weixin": {
|
||||||
"appid": "wx9829a39e65550757",
|
"appid": "wx9829a39e65550757",
|
||||||
"setting": {
|
"setting": {
|
||||||
@ -13,12 +13,11 @@
|
|||||||
"permission": {
|
"permission": {
|
||||||
"scope.bluetooth": {
|
"scope.bluetooth": {
|
||||||
"desc": "蓝牙将用于控制和管理您的智能门锁"
|
"desc": "蓝牙将用于控制和管理您的智能门锁"
|
||||||
},
|
|
||||||
"scope.userLocation": {
|
|
||||||
"desc": "获取您的位置信息将用于智能门锁的位置服务"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"requiredPrivateInfos": ["getLocation"],
|
"requiredPrivateInfos": [
|
||||||
|
"getLocation"
|
||||||
|
],
|
||||||
"usingComponents": true,
|
"usingComponents": true,
|
||||||
"lazyCodeLoading": "requiredComponents",
|
"lazyCodeLoading": "requiredComponents",
|
||||||
"optimization": {
|
"optimization": {
|
||||||
@ -42,4 +41,4 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vueVersion": "3"
|
"vueVersion": "3"
|
||||||
}
|
}
|
||||||
24
pages.json
24
pages.json
@ -82,13 +82,6 @@
|
|||||||
"navigationBarTitleText": "附近设备"
|
"navigationBarTitleText": "附近设备"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "selectAddress",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "锁地址",
|
|
||||||
"disableScroll": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "distributionNetwork",
|
"path": "distributionNetwork",
|
||||||
"style": {
|
"style": {
|
||||||
@ -611,13 +604,22 @@
|
|||||||
],
|
],
|
||||||
"preloadRule": {
|
"preloadRule": {
|
||||||
"pages/main/home": {
|
"pages/main/home": {
|
||||||
"packages": ["pages/others", "pages/addDevice", "pages/p2p"]
|
"packages": [
|
||||||
|
"pages/others",
|
||||||
|
"pages/addDevice",
|
||||||
|
"pages/p2p"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"pages/main/lockDetail": {
|
"pages/main/lockDetail": {
|
||||||
"packages": ["pages/feature", "pages/setting"]
|
"packages": [
|
||||||
|
"pages/feature",
|
||||||
|
"pages/setting"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"pages/main/mine": {
|
"pages/main/mine": {
|
||||||
"packages": ["pages/user"]
|
"packages": [
|
||||||
|
"pages/user"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
@ -654,4 +656,4 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@
|
|||||||
if (data.status === 0) {
|
if (data.status === 0) {
|
||||||
$basic.routeJump({
|
$basic.routeJump({
|
||||||
type: 'redirectTo',
|
type: 'redirectTo',
|
||||||
name: 'selectAddress'
|
name: 'bindLock'
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@ -143,7 +143,7 @@
|
|||||||
name:
|
name:
|
||||||
this.currentLockInfo.lockConfig.model === model.TENCENT_YUN_LOCK
|
this.currentLockInfo.lockConfig.model === model.TENCENT_YUN_LOCK
|
||||||
? 'distributionNetwork'
|
? 'distributionNetwork'
|
||||||
: 'selectAddress'
|
: 'bindLock'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
|||||||
@ -1,283 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
<view class="title">地理位置</view>
|
|
||||||
<view v-if="show">
|
|
||||||
<map
|
|
||||||
class="map"
|
|
||||||
:longitude="longitude"
|
|
||||||
:latitude="latitude"
|
|
||||||
:scale="16"
|
|
||||||
:markers="markers"
|
|
||||||
:enable-zoom="true"
|
|
||||||
:enable-scroll="true"
|
|
||||||
></map>
|
|
||||||
</view>
|
|
||||||
<view v-else class="map"></view>
|
|
||||||
<view class="explain">检查以确保以下地址是正确的</view>
|
|
||||||
<view
|
|
||||||
class="view-address"
|
|
||||||
:style="{ height: calculateStringTotalWidth(address) > 44 ? '120rpx' : '80rpx' }"
|
|
||||||
>
|
|
||||||
<view class="address">{{ address }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="bottom">
|
|
||||||
<view class="skip" @click="skipAddress">跳过</view>
|
|
||||||
<view class="confirm" @click="toBindLock">下一步</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapState, mapActions } from 'pinia'
|
|
||||||
import { useBasicStore } from '@/stores/basic'
|
|
||||||
import { getGeocodeAddress } from '@/api/geocode'
|
|
||||||
import { useBluetoothStore } from '@/stores/bluetooth'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
latitude: null,
|
|
||||||
longitude: null,
|
|
||||||
show: false,
|
|
||||||
markers: [],
|
|
||||||
address: '',
|
|
||||||
first: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(useBluetoothStore, ['currentLockInfo'])
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
this.getLocation()
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
if (this.first) {
|
|
||||||
this.first = false
|
|
||||||
} else if (!this.show) {
|
|
||||||
this.getLocation()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
...mapActions(useBasicStore, ['routeJump', 'calculateStringTotalWidth']),
|
|
||||||
...mapActions(useBluetoothStore, ['updateCurrentLockInfo']),
|
|
||||||
toBindLock() {
|
|
||||||
const that = this
|
|
||||||
if (this.address === '') {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '暂未获取到地理位置信息,请重试',
|
|
||||||
confirmText: '重试',
|
|
||||||
success: res => {
|
|
||||||
if (res.confirm) {
|
|
||||||
that.getLocation()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.routeJump({
|
|
||||||
type: 'redirectTo',
|
|
||||||
name: 'bindLock'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
skipAddress() {
|
|
||||||
const that = this
|
|
||||||
if (this.address !== '') {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '已获取当前地理位置,确定跳过吗',
|
|
||||||
confirmText: '跳过',
|
|
||||||
cancelText: '取消',
|
|
||||||
success: res => {
|
|
||||||
if (res.confirm) {
|
|
||||||
const lockInfo = that.currentLockInfo
|
|
||||||
delete lockInfo.position
|
|
||||||
that.updateCurrentLockInfo(lockInfo)
|
|
||||||
this.routeJump({
|
|
||||||
type: 'redirectTo',
|
|
||||||
name: 'bindLock'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.routeJump({
|
|
||||||
type: 'redirectTo',
|
|
||||||
name: 'bindLock'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async getLocation() {
|
|
||||||
const that = this
|
|
||||||
uni.getLocation({
|
|
||||||
isHighAccuracy: true,
|
|
||||||
type: 'gcj02',
|
|
||||||
async success(res) {
|
|
||||||
that.latitude = res.latitude
|
|
||||||
that.longitude = res.longitude
|
|
||||||
that.markers = [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
latitude: res.latitude,
|
|
||||||
longitude: res.longitude,
|
|
||||||
iconPath: 'https://oss-lock.xhjcn.ltd/mp/icon_address.png',
|
|
||||||
width: '48rpx',
|
|
||||||
height: '48rpx'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
that.show = true
|
|
||||||
const { code, data: result } = await getGeocodeAddress({
|
|
||||||
latitude: that.latitude,
|
|
||||||
longitude: that.longitude
|
|
||||||
})
|
|
||||||
if (code === 0) {
|
|
||||||
that.address = result.addr
|
|
||||||
const position = {
|
|
||||||
...result,
|
|
||||||
latitude: that.latitude,
|
|
||||||
longitude: that.longitude
|
|
||||||
}
|
|
||||||
console.log('获取地理位置信息', that.currentLockInfo)
|
|
||||||
that.updateCurrentLockInfo({
|
|
||||||
...that.currentLockInfo,
|
|
||||||
position
|
|
||||||
})
|
|
||||||
console.log('获取地理位置信息', that.currentLockInfo)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail(res) {
|
|
||||||
console.log('获取地理位置信息失败', res)
|
|
||||||
if (res.errMsg === 'getLocation:fail auth deny') {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '拒绝授权将无法使用定位功能',
|
|
||||||
confirmText: '去授权',
|
|
||||||
cancelText: '跳过',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
uni.openSetting()
|
|
||||||
} else {
|
|
||||||
that.routeJump({
|
|
||||||
type: 'redirectTo',
|
|
||||||
name: 'bindLock'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (res.errMsg === 'getLocation:fail system permission denied') {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '定位失败,请打开微信的位置权限',
|
|
||||||
confirmText: '去打开',
|
|
||||||
cancelText: '跳过',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
uni.openAppAuthorizeSetting()
|
|
||||||
} else {
|
|
||||||
that.routeJump({
|
|
||||||
type: 'redirectTo',
|
|
||||||
name: 'bindLock'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '获取地理位置信息失败',
|
|
||||||
confirmText: '重试',
|
|
||||||
cancelText: '跳过',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
that.getLocation()
|
|
||||||
} else {
|
|
||||||
that.routeJump({
|
|
||||||
type: 'redirectTo',
|
|
||||||
name: 'bindLock'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
page {
|
|
||||||
background-color: $uni-bg-color-grey;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.map {
|
|
||||||
width: 750rpx;
|
|
||||||
height: 650rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
padding: 40rpx 30rpx;
|
|
||||||
font-size: 80rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.explain {
|
|
||||||
padding: 20rpx 30rpx 0 30rpx;
|
|
||||||
font-size: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-address {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
width: 690rpx;
|
|
||||||
color: #c4c4c4;
|
|
||||||
font-size: 32rpx;
|
|
||||||
margin: 0 30rpx;
|
|
||||||
border-bottom: #63b8af 3rpx solid;
|
|
||||||
|
|
||||||
.address {
|
|
||||||
width: 690rpx;
|
|
||||||
text-align: left;
|
|
||||||
word-break: break-all;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: normal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom {
|
|
||||||
width: 600rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 0 75rpx;
|
|
||||||
position: fixed;
|
|
||||||
bottom: calc(30rpx + env(safe-area-inset-bottom));
|
|
||||||
|
|
||||||
.skip {
|
|
||||||
width: 225rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 36rpx;
|
|
||||||
border-radius: 64rpx;
|
|
||||||
border: 3rpx solid #63b8af;
|
|
||||||
}
|
|
||||||
|
|
||||||
.confirm {
|
|
||||||
border-radius: 64rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
background-color: #63b8af;
|
|
||||||
width: 225rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 36rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -30,7 +30,7 @@
|
|||||||
v-else
|
v-else
|
||||||
class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center"
|
class="absolute inset-0 bg-black bg-opacity-30 flex items-center justify-center"
|
||||||
>
|
>
|
||||||
<up-icon name="play-right-fill" color="#ffffff" size="40"></up-icon>
|
<up-icon name="play-right-fill" color="#ffffff" size="40rpx"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
</image>
|
</image>
|
||||||
<view class="text-xs">{{ timeFormat(video.operateDate, 'yyyy-mm-dd hh:MM') }}</view>
|
<view class="text-xs">{{ timeFormat(video.operateDate, 'yyyy-mm-dd hh:MM') }}</view>
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
"
|
"
|
||||||
name="checkbox-mark"
|
name="checkbox-mark"
|
||||||
color="#2a85ec"
|
color="#2a85ec"
|
||||||
size="40"
|
size="40rpx"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
@ -70,7 +70,7 @@
|
|||||||
"
|
"
|
||||||
name="checkbox-mark"
|
name="checkbox-mark"
|
||||||
color="#2a85ec"
|
color="#2a85ec"
|
||||||
size="40"
|
size="40rpx"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
@ -122,7 +122,7 @@
|
|||||||
"
|
"
|
||||||
name="checkbox-mark"
|
name="checkbox-mark"
|
||||||
color="#2a85ec"
|
color="#2a85ec"
|
||||||
size="40"
|
size="40rpx"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
@ -174,7 +174,7 @@
|
|||||||
"
|
"
|
||||||
name="checkbox-mark"
|
name="checkbox-mark"
|
||||||
color="#2a85ec"
|
color="#2a85ec"
|
||||||
size="40"
|
size="40rpx"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
@click="toJump(null)"
|
@click="toJump(null)"
|
||||||
class="flex items-center justify-center bg-white shadow-sm rounded-md pos-fixed bottom-[calc(env(safe-area-inset-bottom)+48rpx)] w-686 mx-4 h-100"
|
class="flex items-center justify-center bg-white shadow-sm rounded-md pos-fixed bottom-[calc(env(safe-area-inset-bottom)+48rpx)] w-686 mx-4 h-100"
|
||||||
><view class="flex items-center">
|
><view class="flex items-center">
|
||||||
<up-icon name="plus-circle-fill" color="#002ce5" size="50"></up-icon
|
<up-icon name="plus-circle-fill" color="#002ce5" size="50rpx"></up-icon
|
||||||
><view class="text-lg text-#63b8af ml-2 font-bold">胁迫指纹</view>
|
><view class="text-lg text-#63b8af ml-2 font-bold">胁迫指纹</view>
|
||||||
</view></view
|
</view></view
|
||||||
>
|
>
|
||||||
|
|||||||
@ -105,12 +105,6 @@
|
|||||||
<up-icon name="arrow-right"></up-icon>
|
<up-icon name="arrow-right"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="py-3 px-4 bg-white flex items-center justify-between text-base">
|
|
||||||
<view>位置信息</view>
|
|
||||||
<view class="flex items-center max-w-400">
|
|
||||||
<view>{{ $bluetooth.currentLockSetting.lockBasicInfo.address }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<ModalInput
|
<ModalInput
|
||||||
ref="modalInput"
|
ref="modalInput"
|
||||||
title="请输入名称"
|
title="请输入名称"
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
:class="[value === 1 ? 'bg-#d9e8fd' : 'bg-#ececec']"
|
:class="[value === 1 ? 'bg-#d9e8fd' : 'bg-#ececec']"
|
||||||
>
|
>
|
||||||
<view class="w-80 h-full flex items-center justify-center">
|
<view class="w-80 h-full flex items-center justify-center">
|
||||||
<up-icon name="checkbox-mark" color="#2a85ec" v-if="value === 1" size="40"></up-icon>
|
<up-icon name="checkbox-mark" color="#2a85ec" v-if="value === 1" size="40rpx"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
<view>小功率:</view>
|
<view>小功率:</view>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
:class="[value === 2 ? 'bg-#d9e8fd' : 'bg-#ececec']"
|
:class="[value === 2 ? 'bg-#d9e8fd' : 'bg-#ececec']"
|
||||||
>
|
>
|
||||||
<view class="w-80 h-full flex items-center justify-center">
|
<view class="w-80 h-full flex items-center justify-center">
|
||||||
<up-icon name="checkbox-mark" color="#2a85ec" v-if="value === 2" size="40"></up-icon>
|
<up-icon name="checkbox-mark" color="#2a85ec" v-if="value === 2" size="40rpx"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
<view>中功率:</view>
|
<view>中功率:</view>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
:class="[value === 3 ? 'bg-#d9e8fd' : 'bg-#ececec']"
|
:class="[value === 3 ? 'bg-#d9e8fd' : 'bg-#ececec']"
|
||||||
>
|
>
|
||||||
<view class="w-80 h-full flex items-center justify-center">
|
<view class="w-80 h-full flex items-center justify-center">
|
||||||
<up-icon name="checkbox-mark" color="#2a85ec" v-if="value === 3" size="40"></up-icon>
|
<up-icon name="checkbox-mark" color="#2a85ec" v-if="value === 3" size="40rpx"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
<view>大功率:</view>
|
<view>大功率:</view>
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<up-icon
|
<up-icon
|
||||||
name="plus-circle-fill"
|
name="plus-circle-fill"
|
||||||
color="#002ce5"
|
color="#002ce5"
|
||||||
size="50"
|
size="50rpx"
|
||||||
v-if="emailList.length < 3"
|
v-if="emailList.length < 3"
|
||||||
@click="addItem('email')"
|
@click="addItem('email')"
|
||||||
></up-icon
|
></up-icon
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<up-icon
|
<up-icon
|
||||||
name="close-circle-fill"
|
name="close-circle-fill"
|
||||||
color="#858585"
|
color="#858585"
|
||||||
size="40"
|
size="40rpx"
|
||||||
@click="deleteItem('email', index)"
|
@click="deleteItem('email', index)"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
<view class="ml-3">接收者</view>
|
<view class="ml-3">接收者</view>
|
||||||
@ -51,7 +51,7 @@
|
|||||||
<up-icon
|
<up-icon
|
||||||
name="plus-circle-fill"
|
name="plus-circle-fill"
|
||||||
color="#002ce5"
|
color="#002ce5"
|
||||||
size="50"
|
size="50rpx"
|
||||||
v-if="smsList.length < 3"
|
v-if="smsList.length < 3"
|
||||||
@click="addItem('sms')"
|
@click="addItem('sms')"
|
||||||
></up-icon
|
></up-icon
|
||||||
@ -66,7 +66,7 @@
|
|||||||
<up-icon
|
<up-icon
|
||||||
name="close-circle-fill"
|
name="close-circle-fill"
|
||||||
color="#858585"
|
color="#858585"
|
||||||
size="40"
|
size="40rpx"
|
||||||
@click="deleteItem('sms', index)"
|
@click="deleteItem('sms', index)"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
<view class="ml-3">接收者</view>
|
<view class="ml-3">接收者</view>
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
@click="toJump(null)"
|
@click="toJump(null)"
|
||||||
class="flex items-center justify-center bg-white shadow-sm rounded-md pos-fixed bottom-[calc(env(safe-area-inset-bottom)+48rpx)] w-686 mx-4 h-100"
|
class="flex items-center justify-center bg-white shadow-sm rounded-md pos-fixed bottom-[calc(env(safe-area-inset-bottom)+48rpx)] w-686 mx-4 h-100"
|
||||||
><view class="flex items-center">
|
><view class="flex items-center">
|
||||||
<up-icon name="plus-circle-fill" color="#002ce5" size="50"></up-icon
|
<up-icon name="plus-circle-fill" color="#002ce5" size="50rpx"></up-icon
|
||||||
><view class="text-lg text-#63b8af ml-2 font-bold">添加家人</view>
|
><view class="text-lg text-#63b8af ml-2 font-bold">添加家人</view>
|
||||||
</view></view
|
</view></view
|
||||||
>
|
>
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
"
|
"
|
||||||
name="checkbox-mark"
|
name="checkbox-mark"
|
||||||
color="#2a85ec"
|
color="#2a85ec"
|
||||||
size="40"
|
size="40rpx"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
@ -64,7 +64,7 @@
|
|||||||
"
|
"
|
||||||
name="checkbox-mark"
|
name="checkbox-mark"
|
||||||
color="#2a85ec"
|
color="#2a85ec"
|
||||||
size="40"
|
size="40rpx"
|
||||||
></up-icon>
|
></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
:class="[isAllDay === 1 ? 'bg-#d9e8fd' : 'bg-#ececec']"
|
:class="[isAllDay === 1 ? 'bg-#d9e8fd' : 'bg-#ececec']"
|
||||||
>
|
>
|
||||||
<view class="w-80 h-full flex items-center justify-center">
|
<view class="w-80 h-full flex items-center justify-center">
|
||||||
<up-icon v-if="isAllDay === 1" name="checkbox-mark" color="#2a85ec" size="40"></up-icon>
|
<up-icon v-if="isAllDay === 1" name="checkbox-mark" color="#2a85ec" size="40rpx"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
<view class="text-lg font-bold" :class="[isAllDay === 1 ? 'text-#2a85ec' : 'text-black']"
|
<view class="text-lg font-bold" :class="[isAllDay === 1 ? 'text-#2a85ec' : 'text-black']"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
>
|
>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="w-80 h-full flex items-center justify-center">
|
<view class="w-80 h-full flex items-center justify-center">
|
||||||
<up-icon v-if="isAllDay === 0" name="checkbox-mark" color="#2a85ec" size="40"></up-icon>
|
<up-icon v-if="isAllDay === 0" name="checkbox-mark" color="#2a85ec" size="40rpx"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1">
|
<view class="flex-1">
|
||||||
<view class="text-lg font-bold" :class="[isAllDay === 0 ? 'text-#2a85ec' : 'text-black']">
|
<view class="text-lg font-bold" :class="[isAllDay === 0 ? 'text-#2a85ec' : 'text-black']">
|
||||||
|
|||||||
@ -52,11 +52,6 @@ const pages = [
|
|||||||
path: '/pages/addDevice/searchDevice',
|
path: '/pages/addDevice/searchDevice',
|
||||||
tabBar: false
|
tabBar: false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'selectAddress',
|
|
||||||
path: '/pages/addDevice/selectAddress',
|
|
||||||
tabBar: false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'bindLock',
|
name: 'bindLock',
|
||||||
path: '/pages/addDevice/bindLock',
|
path: '/pages/addDevice/bindLock',
|
||||||
@ -415,7 +410,7 @@ const pages = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const useBasicStore = defineStore('basic', {
|
export const useBasicStore = defineStore('basic', {
|
||||||
state() {
|
state () {
|
||||||
return {
|
return {
|
||||||
// 设备信息
|
// 设备信息
|
||||||
deviceInfo: null,
|
deviceInfo: null,
|
||||||
@ -429,7 +424,7 @@ export const useBasicStore = defineStore('basic', {
|
|||||||
// 路由跳转
|
// 路由跳转
|
||||||
/* data 入参 name string页面名称 type string跳转方式 params object传递参数 delta number返回页面数
|
/* data 入参 name string页面名称 type string跳转方式 params object传递参数 delta number返回页面数
|
||||||
* 具体入参查看文档 https://www.uviewui.com/js/route.html */
|
* 具体入参查看文档 https://www.uviewui.com/js/route.html */
|
||||||
routeJump(data) {
|
routeJump (data) {
|
||||||
const page = pages.find(page => {
|
const page = pages.find(page => {
|
||||||
return page.name === data.name
|
return page.name === data.name
|
||||||
})
|
})
|
||||||
@ -458,10 +453,10 @@ export const useBasicStore = defineStore('basic', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取当前网络状态
|
// 获取当前网络状态
|
||||||
getNetworkType() {
|
getNetworkType () {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
uni.getNetworkType({
|
uni.getNetworkType({
|
||||||
success(res) {
|
success (res) {
|
||||||
if (res.networkType === 'none') {
|
if (res.networkType === 'none') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '网络访问失败,请检查网络是否正常',
|
title: '网络访问失败,请检查网络是否正常',
|
||||||
@ -472,14 +467,14 @@ export const useBasicStore = defineStore('basic', {
|
|||||||
}
|
}
|
||||||
resolve(true)
|
resolve(true)
|
||||||
},
|
},
|
||||||
fail() {
|
fail () {
|
||||||
resolve(false)
|
resolve(false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取设备信息
|
// 获取设备信息
|
||||||
getDeviceInfo() {
|
getDeviceInfo () {
|
||||||
const that = this
|
const that = this
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if (that.deviceInfo?.model) {
|
if (that.deviceInfo?.model) {
|
||||||
@ -487,18 +482,18 @@ export const useBasicStore = defineStore('basic', {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success(res) {
|
success (res) {
|
||||||
that.deviceInfo = res
|
that.deviceInfo = res
|
||||||
resolve(that.deviceInfo)
|
resolve(that.deviceInfo)
|
||||||
},
|
},
|
||||||
fail() {
|
fail () {
|
||||||
resolve({})
|
resolve({})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取胶囊信息
|
// 获取胶囊信息
|
||||||
getButtonInfo() {
|
getButtonInfo () {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
if (this.buttonInfo?.top) {
|
if (this.buttonInfo?.top) {
|
||||||
resolve(this.buttonInfo)
|
resolve(this.buttonInfo)
|
||||||
@ -509,7 +504,7 @@ export const useBasicStore = defineStore('basic', {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 计算字符串长度
|
// 计算字符串长度
|
||||||
calculateStringTotalWidth(str) {
|
calculateStringTotalWidth (str) {
|
||||||
let totalWidth = 0
|
let totalWidth = 0
|
||||||
// 遍历字符串中的每一个字符
|
// 遍历字符串中的每一个字符
|
||||||
for (let i = 0; i < str.length; i++) {
|
for (let i = 0; i < str.length; i++) {
|
||||||
@ -526,10 +521,10 @@ export const useBasicStore = defineStore('basic', {
|
|||||||
return totalWidth
|
return totalWidth
|
||||||
},
|
},
|
||||||
// 回退页面并弹出toast提示
|
// 回退页面并弹出toast提示
|
||||||
backAndToast(message, delta = 1) {
|
backAndToast (message, delta = 1) {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta,
|
delta,
|
||||||
complete() {
|
complete () {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: message,
|
title: message,
|
||||||
@ -540,7 +535,7 @@ export const useBasicStore = defineStore('basic', {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 分享跳转
|
// 分享跳转
|
||||||
shareJump(data = this.shareConfig) {
|
shareJump (data = this.shareConfig) {
|
||||||
if (data.path) {
|
if (data.path) {
|
||||||
const target = data.path.split('/')
|
const target = data.path.split('/')
|
||||||
if (target.length > 1) {
|
if (target.length > 1) {
|
||||||
@ -568,7 +563,7 @@ export const useBasicStore = defineStore('basic', {
|
|||||||
}
|
}
|
||||||
this.shareConfig = data
|
this.shareConfig = data
|
||||||
|
|
||||||
function getParams(params) {
|
function getParams (params) {
|
||||||
let paramStr = ''
|
let paramStr = ''
|
||||||
Object.keys(params).forEach(item => {
|
Object.keys(params).forEach(item => {
|
||||||
if (paramStr === '') {
|
if (paramStr === '') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user