Merge branch 'fanpeng' into 'develop'
Fanpeng See merge request StarlockTeam/wx-starlock!35
This commit is contained in:
commit
b3d25fc58a
@ -27,6 +27,7 @@ module.exports = {
|
|||||||
'plugin:prettier/recommended',
|
'plugin:prettier/recommended',
|
||||||
'./.eslintrc-auto-import.json'
|
'./.eslintrc-auto-import.json'
|
||||||
],
|
],
|
||||||
|
ignorePatterns: ['utils/log.js', 'unpackage/**/*'],
|
||||||
/**
|
/**
|
||||||
* "off" 或 0 ==> 关闭规则
|
* "off" 或 0 ==> 关闭规则
|
||||||
* "warn" 或 1 ==> 打开的规则作为警告(不影响代码执行)
|
* "warn" 或 1 ==> 打开的规则作为警告(不影响代码执行)
|
||||||
@ -40,8 +41,17 @@ module.exports = {
|
|||||||
'no-var': 'error', // 要求使用 let 或 const 而不是 var
|
'no-var': 'error', // 要求使用 let 或 const 而不是 var
|
||||||
'no-multiple-empty-lines': ['error', { max: 1 }], // 不允许多个空行
|
'no-multiple-empty-lines': ['error', { max: 1 }], // 不允许多个空行
|
||||||
'prefer-const': 'off', // 使用 let 关键字声明但在初始分配后从未重新分配的变量,要求使用 const
|
'prefer-const': 'off', // 使用 let 关键字声明但在初始分配后从未重新分配的变量,要求使用 const
|
||||||
'no-use-before-define': 'off', // 禁止在 函数/类/变量 定义之前使用它们
|
'no-use-before-define': 'error', // 禁止在 函数/类/变量 定义之前使用它们
|
||||||
'no-irregular-whitespace': 'off', // 禁止不规则的空白\
|
'no-irregular-whitespace': 'off', // 禁止不规则的空白
|
||||||
|
'no-undef': 'error', // 禁止使用未声明的变量
|
||||||
|
'vue/script-setup-uses-vars': 'off', // 关闭此规则,因为它可能会干扰no-undef的检测
|
||||||
|
'vue/no-undef-components': 'off', // 关闭组件未定义的检查
|
||||||
|
'vue/no-undef-properties': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
ignore: ['getDeviceInfo', 'getBluetoothDevices', 'stopGetBluetoothDevices']
|
||||||
|
}
|
||||||
|
], // 忽略特定方法的未定义检查
|
||||||
'import/no-cycle': 0,
|
'import/no-cycle': 0,
|
||||||
'no-nested-ternary': 0,
|
'no-nested-ternary': 0,
|
||||||
'import/prefer-default-export': 0,
|
'import/prefer-default-export': 0,
|
||||||
@ -60,7 +70,6 @@ module.exports = {
|
|||||||
'no-debugger': 0,
|
'no-debugger': 0,
|
||||||
'no-promise-executor-return': 0,
|
'no-promise-executor-return': 0,
|
||||||
// vue (https://eslint.vuejs.org/rules)
|
// vue (https://eslint.vuejs.org/rules)
|
||||||
'vue/script-setup-uses-vars': 'error', // 防止<script setup>使用的变量<template>被标记为未使用,此规则仅在启用该no-unused-vars规则时有效。
|
|
||||||
'vue/v-slot-style': 'error', // 强制执行 v-slot 指令样式
|
'vue/v-slot-style': 'error', // 强制执行 v-slot 指令样式
|
||||||
'vue/no-mutating-props': 'off', // 不允许组件 prop的改变
|
'vue/no-mutating-props': 'off', // 不允许组件 prop的改变
|
||||||
'vue/no-v-html': 'off', // 禁止使用 v-html
|
'vue/no-v-html': 'off', // 禁止使用 v-html
|
||||||
@ -73,7 +82,7 @@ module.exports = {
|
|||||||
'vue/singleline-html-element-content-newline': 'off', // 在单行元素的内容之前和之后需要换行符
|
'vue/singleline-html-element-content-newline': 'off', // 在单行元素的内容之前和之后需要换行符
|
||||||
'vue/attribute-hyphenation': 'off', // 对模板中的自定义组件强制执行属性命名样式
|
'vue/attribute-hyphenation': 'off', // 对模板中的自定义组件强制执行属性命名样式
|
||||||
'vue/require-default-prop': 'off', // 此规则要求为每个 prop 为必填时,必须提供默认值
|
'vue/require-default-prop': 'off', // 此规则要求为每个 prop 为必填时,必须提供默认值
|
||||||
'vue/multi-word-component-names': 'off', // 要求组件名称始终为 “-” 链接的单词
|
'vue/multi-word-component-names': 'off', // 要求组件名称始终为 "-" 链接的单词
|
||||||
'vue.prefer-template': 'off',
|
'vue.prefer-template': 'off',
|
||||||
'vuejs-accessibility/click-events-have-key-events': 'off',
|
'vuejs-accessibility/click-events-have-key-events': 'off',
|
||||||
'no-console': 'off',
|
'no-console': 'off',
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
unpackage
|
unpackage
|
||||||
node_modules
|
node_modules
|
||||||
|
.vscode
|
||||||
|
|||||||
@ -1,9 +1,4 @@
|
|||||||
{
|
{
|
||||||
"src/**/*.{vue,js}": [
|
"src/**/*.{vue,js}": ["npm run prettier", "npm run eslint"],
|
||||||
"npm run prettier",
|
"src/**/*.{vue,scss,css,less}": ["npm run stylelint:out"]
|
||||||
"npm run eslint"
|
|
||||||
],
|
|
||||||
"src/**/*.{vue,scss,css,less}": [
|
|
||||||
"npm run stylelint:out"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,8 +15,5 @@
|
|||||||
"embeddedLanguageFormatting": "auto",
|
"embeddedLanguageFormatting": "auto",
|
||||||
"vueIndentScriptAndStyle": true,
|
"vueIndentScriptAndStyle": true,
|
||||||
"singleAttributePerLine": false,
|
"singleAttributePerLine": false,
|
||||||
"htmlWhitespaceSensitivity": "css",
|
"htmlWhitespaceSensitivity": "css"
|
||||||
"requirePragma": false,
|
|
||||||
"insertPragma": false,
|
|
||||||
"proseWrap": "preserve"
|
|
||||||
}
|
}
|
||||||
|
|||||||
56
.stylelintrc.json
Normal file
56
.stylelintrc.json
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
"stylelint-config-standard",
|
||||||
|
"stylelint-config-recommended-scss",
|
||||||
|
"stylelint-config-recess-order",
|
||||||
|
"stylelint-config-html/vue"
|
||||||
|
],
|
||||||
|
"ignoreFiles": ["**/*.js", "**/*.ts", "unpackage/**/*"],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ["**/*.vue"],
|
||||||
|
"customSyntax": "postcss-html",
|
||||||
|
"rules": {
|
||||||
|
"at-rule-no-unknown": null,
|
||||||
|
"no-unknown-custom-properties": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["**/*.vue/*.scss"],
|
||||||
|
"customSyntax": "postcss-scss"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": ["**/*.(scss|css|html)"],
|
||||||
|
"customSyntax": "postcss-scss"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"no-descending-specificity": null,
|
||||||
|
"selector-class-pattern": null,
|
||||||
|
"keyframes-name-pattern": null,
|
||||||
|
"unit-no-unknown": null,
|
||||||
|
"import-notation": null,
|
||||||
|
"selector-type-no-unknown": [
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
"ignoreTypes": ["page"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color-hex-length": null,
|
||||||
|
"declaration-property-value-no-unknown": null,
|
||||||
|
"shorthand-property-no-redundant-values": null,
|
||||||
|
"alpha-value-notation": null,
|
||||||
|
"color-function-notation": null,
|
||||||
|
"at-rule-no-unknown": null,
|
||||||
|
"property-no-unknown": null,
|
||||||
|
"no-unknown-custom-properties": null,
|
||||||
|
"value-keyword-case": null,
|
||||||
|
"custom-property-pattern": null,
|
||||||
|
"selector-pseudo-class-no-unknown": [
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
"ignorePseudoClasses": ["deep", "global"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
12
api/p2p.js
Normal file
12
api/p2p.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import request from '../utils/request'
|
||||||
|
|
||||||
|
// p2p 模块
|
||||||
|
|
||||||
|
// 获取p2pInfo
|
||||||
|
export function getP2pInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/v1/tencentYun/getDeviceDetail',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -91,13 +91,13 @@
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.name {
|
.name {
|
||||||
height: 100rpx;
|
|
||||||
width: 750rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
width: 750rpx;
|
||||||
font-weight: bold;
|
height: 100rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.name-text {
|
.name-text {
|
||||||
width: 168rpx;
|
width: 168rpx;
|
||||||
@ -106,11 +106,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.picker {
|
.picker {
|
||||||
margin-right: 32rpx;
|
|
||||||
text-align: right;
|
|
||||||
width: 518rpx;
|
width: 518rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
margin-right: 32rpx;
|
||||||
line-height: 100rpx;
|
line-height: 100rpx;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
:style="{ width: size * 0.75 - 2 + 'rpx', height: size * 0.75 - 2 + 'rpx' }"
|
:style="{ width: size * 0.75 - 2 + 'rpx', height: size * 0.75 - 2 + 'rpx' }"
|
||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
src="/static/images/icon_lock_transparent.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_lock_transparent.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
:style="{ width: size * 0.35 + 'rpx', height: size * 0.35 + 'rpx' }"
|
:style="{ width: size * 0.35 + 'rpx', height: size * 0.35 + 'rpx' }"
|
||||||
></image>
|
></image>
|
||||||
@ -53,53 +53,52 @@
|
|||||||
from {
|
from {
|
||||||
transform: rotate(0);
|
transform: rotate(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
transform: rotate(359deg);
|
transform: rotate(359deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner-box {
|
.spinner-box {
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
background-color: transparent;
|
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.circle-border {
|
.circle-border {
|
||||||
padding: 3upx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: rgb(99, 184, 175);
|
|
||||||
background: linear-gradient(0deg, rgba(99, 184, 175, 0.1) 33%, rgba(99, 184, 175, 1) 100%);
|
|
||||||
animation: spin 0.8s linear 0s infinite;
|
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 3upx;
|
||||||
|
background: rgb(99, 184, 175);
|
||||||
|
background: linear-gradient(0deg, rgba(99, 184, 175, 0.1) 33%, rgba(99, 184, 175, 1) 100%);
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 0.8s linear 0s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.circle-border-stop {
|
.circle-border-stop {
|
||||||
padding: 3upx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: rgb(99, 184, 175);
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 3upx;
|
||||||
|
background: rgb(99, 184, 175);
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.circle-core {
|
.circle-core {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -38,5 +38,13 @@ const SKY = {
|
|||||||
buildNumber
|
buildNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GE = {
|
||||||
|
name: 'ge',
|
||||||
|
baseUrl: 'http://lock.ge.star-lock.cn/api',
|
||||||
|
webviewBaseUrl: 'http://lock.ge.star-lock.cn',
|
||||||
|
version,
|
||||||
|
buildNumber
|
||||||
|
}
|
||||||
|
|
||||||
// 更换环境的时候 切换导出就行
|
// 更换环境的时候 切换导出就行
|
||||||
export default { DEV, PRE, XHJ, SKY }
|
export default { DEV, PRE, XHJ, SKY, GE }
|
||||||
|
|||||||
@ -1,30 +1,30 @@
|
|||||||
export const keysType = {
|
export const keysType = {
|
||||||
1: {
|
1: {
|
||||||
name: '电子钥匙',
|
name: '电子钥匙',
|
||||||
icon: '/static/images/icon_user.png'
|
icon: 'https://oss-lock.xhjcn.ltd/mp/icon_user.png'
|
||||||
},
|
},
|
||||||
2: {
|
2: {
|
||||||
name: '密码',
|
name: '密码',
|
||||||
icon: '/static/images/icon_password.png'
|
icon: 'https://oss-lock.xhjcn.ltd/mp/icon_password.png'
|
||||||
},
|
},
|
||||||
3: {
|
3: {
|
||||||
name: '指纹',
|
name: '指纹',
|
||||||
icon: '/static/images/icon_fingerprint_white.png'
|
icon: 'https://oss-lock.xhjcn.ltd/mp/icon_fingerprint_white.png'
|
||||||
},
|
},
|
||||||
4: {
|
4: {
|
||||||
name: '卡',
|
name: '卡',
|
||||||
icon: '/static/images/icon_card_white.png'
|
icon: 'https://oss-lock.xhjcn.ltd/mp/icon_card_white.png'
|
||||||
},
|
},
|
||||||
5: {
|
5: {
|
||||||
name: '人脸',
|
name: '人脸',
|
||||||
icon: '/static/images/icon_face_white.png'
|
icon: 'https://oss-lock.xhjcn.ltd/mp/icon_face_white.png'
|
||||||
},
|
},
|
||||||
6: {
|
6: {
|
||||||
name: '掌静脉',
|
name: '掌静脉',
|
||||||
icon: '/static/images/icon_palm_vein_white.png'
|
icon: 'https://oss-lock.xhjcn.ltd/mp/icon_palm_vein_white.png'
|
||||||
},
|
},
|
||||||
7: {
|
7: {
|
||||||
name: '遥控',
|
name: '遥控',
|
||||||
icon: '/static/images/icon_remote_white.png'
|
icon: 'https://oss-lock.xhjcn.ltd/mp/icon_remote_white.png'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
exportForPlayerPlugin.js
Normal file
3
exportForPlayerPlugin.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
wx
|
||||||
|
}
|
||||||
22
exportForXp2pPlugin.js
Normal file
22
exportForXp2pPlugin.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
const appParams = {
|
||||||
|
appid: 123,
|
||||||
|
appOauthId: 'xxx',
|
||||||
|
appKey: 'xxx',
|
||||||
|
appSecretKey: 'xxx',
|
||||||
|
appPackage: 'ios.test.com'
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
wx,
|
||||||
|
getXp2pAppParams() {
|
||||||
|
return appParams
|
||||||
|
},
|
||||||
|
getXp2pConfig() {
|
||||||
|
return {
|
||||||
|
enableCrypto: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getPlayerPlugin() {
|
||||||
|
return requirePlugin('wechat-p2p-player')
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,28 +1,45 @@
|
|||||||
{
|
{
|
||||||
"name" : "wx-starlock",
|
"name": "wx-starlock",
|
||||||
"appid" : "__UNI__933D519",
|
"appid": "__UNI__933D519",
|
||||||
"description" : "",
|
"description": "",
|
||||||
"versionName" : "1.2.0",
|
"versionName": "1.2.0",
|
||||||
"versionCode" : "35",
|
"versionCode": "35",
|
||||||
"transformPx" : false,
|
"mp-weixin": {
|
||||||
/* 小程序特有相关 */
|
"appid": "wx9829a39e65550757",
|
||||||
"mp-weixin" : {
|
"setting": {
|
||||||
"appid" : "wx9829a39e65550757",
|
"urlCheck": true,
|
||||||
"setting" : {
|
"minified": true
|
||||||
"urlCheck" : true,
|
|
||||||
"minified" : true
|
|
||||||
},
|
|
||||||
"permission" : {
|
|
||||||
"scope.bluetooth" : {
|
|
||||||
"desc" : "蓝牙将用于控制和管理您的智能门锁"
|
|
||||||
},
|
|
||||||
"scope.userLocation" : {
|
|
||||||
"desc" : "获取您的位置信息将用于智能门锁的位置服务"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"requiredPrivateInfos" : [ "getLocation" ],
|
|
||||||
"usingComponents" : true,
|
|
||||||
"lazyCodeLoading" : "requiredComponents"
|
|
||||||
},
|
},
|
||||||
"vueVersion" : "3"
|
"permission": {
|
||||||
|
"scope.bluetooth": {
|
||||||
|
"desc": "蓝牙将用于控制和管理您的智能门锁"
|
||||||
|
},
|
||||||
|
"scope.userLocation": {
|
||||||
|
"desc": "获取您的位置信息将用于智能门锁的位置服务"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requiredPrivateInfos": ["getLocation"],
|
||||||
|
"usingComponents": true,
|
||||||
|
"lazyCodeLoading": "requiredComponents",
|
||||||
|
"optimization": {
|
||||||
|
"subPackages": true
|
||||||
|
},
|
||||||
|
"plugins": {
|
||||||
|
"xp2p": {
|
||||||
|
"version": "latest",
|
||||||
|
"provider": "wx1319af22356934bf",
|
||||||
|
"export": "exportForXp2pPlugin.js"
|
||||||
|
},
|
||||||
|
"wechat-p2p-player": {
|
||||||
|
"version": "latest",
|
||||||
|
"provider": "wx9e8fbc98ceac2628",
|
||||||
|
"export": "exportForPlayerPlugin.js"
|
||||||
|
},
|
||||||
|
"wmpf-voip": {
|
||||||
|
"version": "latest",
|
||||||
|
"provider": "wxf830863afde621eb"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vueVersion": "3"
|
||||||
}
|
}
|
||||||
|
|||||||
4837
package-lock.json
generated
4837
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@ -1,16 +1,14 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"crc": "^4.3.2",
|
|
||||||
"js-md5": "^0.8.3",
|
|
||||||
"pinia": "^2.2.0",
|
"pinia": "^2.2.0",
|
||||||
"pinia-plugin-unistorage": "^0.1.2",
|
"pinia-plugin-unistorage": "^0.1.2",
|
||||||
"sm-crypto": "^0.3.13",
|
|
||||||
"uview-plus": "^3.3.12"
|
"uview-plus": "^3.3.12"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^19.7.1",
|
"@commitlint/cli": "^19.7.1",
|
||||||
"@commitlint/config-conventional": "^19.7.1",
|
"@commitlint/config-conventional": "^19.7.1",
|
||||||
"commitizen": "^4.3.1",
|
"commitizen": "^4.3.1",
|
||||||
|
"crc": "^4.3.2",
|
||||||
"cz-git": "^1.11.0",
|
"cz-git": "^1.11.0",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-airbnb-base": "^15.0.0",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
@ -19,14 +17,25 @@
|
|||||||
"eslint-plugin-prettier": "^5.2.3",
|
"eslint-plugin-prettier": "^5.2.3",
|
||||||
"eslint-plugin-vue": "^9.32.0",
|
"eslint-plugin-vue": "^9.32.0",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
|
"js-md5": "^0.8.3",
|
||||||
"lint-staged": "^15.4.3",
|
"lint-staged": "^15.4.3",
|
||||||
|
"postcss-scss": "^4.0.9",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
|
"sm-crypto": "^0.3.13",
|
||||||
"stylelint": "^16.14.1",
|
"stylelint": "^16.14.1",
|
||||||
|
"stylelint-config-html": "^1.1.0",
|
||||||
"stylelint-config-recess-order": "^6.0.0",
|
"stylelint-config-recess-order": "^6.0.0",
|
||||||
"stylelint-config-recommended-scss": "^14.1.0",
|
"stylelint-config-recommended-scss": "^14.1.0",
|
||||||
"stylelint-config-standard": "^37.0.0",
|
"stylelint-config-standard": "^37.0.0",
|
||||||
"unocss": "^65.4.3",
|
"unocss": "^65.4.3",
|
||||||
"unocss-preset-weapp": "^65.4.1",
|
"unocss-preset-weapp": "^65.4.1",
|
||||||
"vite-plugin-eslint": "^1.8.1"
|
"vite-plugin-eslint": "^1.8.1"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,vue,json,css,scss}\"",
|
||||||
|
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,vue,json,css,scss}\"",
|
||||||
|
"lint": "eslint --fix \"**/*.{js,jsx,ts,tsx,vue}\"",
|
||||||
|
"lint:style": "stylelint --fix \"**/*.{css,scss,vue}\"",
|
||||||
|
"lint:all": "npm run format && npm run lint && npm run lint:style"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1067
pages.json
1067
pages.json
File diff suppressed because it is too large
Load Diff
91
pages/addDevice/addLockGuid.vue
Normal file
91
pages/addDevice/addLockGuid.vue
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="title">摸亮触摸屏</view>
|
||||||
|
<image
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_lock_touch_screen.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
class="icon"
|
||||||
|
></image>
|
||||||
|
<view class="tips">摸亮触摸屏,锁进入可添加状态,点击下一步</view>
|
||||||
|
<view @click="toSearchDevice" class="button">下一步</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { useBluetoothStore } from '@/stores/bluetooth'
|
||||||
|
import { useBasicStore } from '@/stores/basic'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
const bluetoothStore = useBluetoothStore()
|
||||||
|
const basicStore = useBasicStore()
|
||||||
|
|
||||||
|
const type = ref('bluetooth')
|
||||||
|
|
||||||
|
onLoad(options => {
|
||||||
|
if (options.type) {
|
||||||
|
type.value = options.type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const toSearchDevice = async () => {
|
||||||
|
if (bluetoothStore.bluetoothStatus !== 0) {
|
||||||
|
bluetoothStore.getBluetoothStatus()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let result = true
|
||||||
|
if (!bluetoothStore.isInitBluetooth) {
|
||||||
|
result = await bluetoothStore.initAndListenBluetooth()
|
||||||
|
}
|
||||||
|
if (result) {
|
||||||
|
if (type.value === 'bluetooth') {
|
||||||
|
basicStore.routeJump({
|
||||||
|
type: 'redirectTo',
|
||||||
|
name: 'searchDevice'
|
||||||
|
})
|
||||||
|
} else if (type.value === 'wifi') {
|
||||||
|
basicStore.routeJump({
|
||||||
|
type: 'redirectTo',
|
||||||
|
name: 'distributionNetwork'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bluetoothStore.checkSetting()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
margin-top: 200rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 300rpx;
|
||||||
|
height: 300rpx;
|
||||||
|
margin: 150rpx 225rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
margin-bottom: 100rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #999;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
width: 600rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-size: 36rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #63b8af;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -144,7 +144,7 @@
|
|||||||
this.getLockList(this.lockSearch)
|
this.getLockList(this.lockSearch)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.backAndToast('添加成功')
|
this.backAndToast('添加成功', 2)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
@ -166,21 +166,21 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.text {
|
.text {
|
||||||
color: #2b2a28;
|
|
||||||
padding: 100rpx 0;
|
padding: 100rpx 0;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
|
color: #2b2a28;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
border-radius: 16rpx;
|
|
||||||
background: #ffffff;
|
|
||||||
margin-left: 35rpx;
|
|
||||||
margin-top: 24rpx;
|
|
||||||
height: 108rpx;
|
|
||||||
width: 616rpx;
|
width: 616rpx;
|
||||||
padding-left: 32rpx;
|
height: 108rpx;
|
||||||
padding-right: 32rpx;
|
padding-right: 32rpx;
|
||||||
|
padding-left: 32rpx;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
margin-left: 35rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-placeholder {
|
.input-placeholder {
|
||||||
@ -191,15 +191,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
margin-top: 160rpx;
|
|
||||||
margin-left: 35rpx;
|
|
||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
|
margin-top: 160rpx;
|
||||||
|
margin-left: 35rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 96rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
background: #63b8af;
|
background: #63b8af;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
line-height: 96rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
304
pages/addDevice/distributionNetwork.vue
Normal file
304
pages/addDevice/distributionNetwork.vue
Normal file
@ -0,0 +1,304 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="mt-4">
|
||||||
|
<up-steps :current="current" activeColor="#63b8af" class="custom-steps">
|
||||||
|
<up-steps-item title="设置WiFi" :itemStyle="{ fontSize: '48rpx' }"> </up-steps-item>
|
||||||
|
<up-steps-item title="连接设备蓝牙" :itemStyle="{ fontSize: '48rpx' }"></up-steps-item>
|
||||||
|
<up-steps-item title="开始配网" :itemStyle="{ fontSize: '48rpx' }"></up-steps-item>
|
||||||
|
</up-steps>
|
||||||
|
<view class="mt-8 mx-8 flex flex-col h-[calc(100vh-300rpx)]">
|
||||||
|
<view v-if="current === 0">
|
||||||
|
<view class="text-lg font-bold mb-4">请选择WiFi并输入密码</view>
|
||||||
|
<view class="pt-2 pb-3 border-b-2 border-b-solid border-gray-200">
|
||||||
|
<picker
|
||||||
|
mode="selector"
|
||||||
|
:range="wifiList"
|
||||||
|
:value="wifiIndex"
|
||||||
|
@change="changeWifi"
|
||||||
|
range-key="SSID"
|
||||||
|
>
|
||||||
|
<view class="flex items-center">
|
||||||
|
<view class="mr-4">WiFi</view>
|
||||||
|
<view>{{ wifiList[wifiIndex]?.SSID ?? '加载中...' }}</view>
|
||||||
|
<view class="ml-a">
|
||||||
|
<up-icon name="arrow-right" size="24rpx"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="py-2 border-b-2 border-b-solid border-gray-200 flex items-center">
|
||||||
|
<view>密码</view>
|
||||||
|
<view class="flex-1">
|
||||||
|
<!-- <up-input
|
||||||
|
:customStyle="{
|
||||||
|
padding: '0 28rpx',
|
||||||
|
outline: 'none',
|
||||||
|
height: '80rpx',
|
||||||
|
backgroundColor: '#FFFFFF',
|
||||||
|
border: 0
|
||||||
|
}"
|
||||||
|
placeholder-class="!text-base !line-height-[80rpx]"
|
||||||
|
v-model="password"
|
||||||
|
placeholder="请输入密码"
|
||||||
|
:type="showPassword ? 'text' : 'password'"
|
||||||
|
>
|
||||||
|
<template #suffix>
|
||||||
|
<up-icon
|
||||||
|
:name="showPassword ? 'eye-fill' : 'eye-off'"
|
||||||
|
size="42rpx"
|
||||||
|
@click="togglePassword"
|
||||||
|
></up-icon>
|
||||||
|
</template>
|
||||||
|
</up-input> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="current === 1" class="flex flex-col h-[calc(100vh-230rpx)]">
|
||||||
|
<view class="text-lg font-bold mb-2">请连接设备蓝牙</view>
|
||||||
|
<view class="text-[#999999]">已发现设备如下</view>
|
||||||
|
<scroll-view scroll-y class="flex-1 mt-4 overflow-hidden">
|
||||||
|
<view
|
||||||
|
v-for="item in deviceList"
|
||||||
|
:key="item.deviceId"
|
||||||
|
@click="connectDevice(item)"
|
||||||
|
class="bg-[#efedf1] rounded-xl py-4 px-3 mt-2 flex justify-between"
|
||||||
|
>
|
||||||
|
<view>{{ item.name }}</view>
|
||||||
|
<view class="text-[#63b8af]">连接</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<view class="flex justify-center items-center mt-2">
|
||||||
|
<up-loading-icon
|
||||||
|
size="70rpx"
|
||||||
|
text="搜索中"
|
||||||
|
:vertical="true"
|
||||||
|
textSize="28rpx"
|
||||||
|
></up-loading-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="current === 2">
|
||||||
|
<view class="flex justify-center mt-10">
|
||||||
|
<image
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/cloud_server.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
class="w-200rpx h-200rpx p-4"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in stepList"
|
||||||
|
:key="item"
|
||||||
|
class="flex items-center mt-4 justify-center w-full"
|
||||||
|
>
|
||||||
|
<view class="flex items-center justify-start w-400rpx">
|
||||||
|
<up-loading-icon mode="circle" v-if="step < index + 1" size="36rpx"></up-loading-icon>
|
||||||
|
<up-icon name="checkbox-mark" color="#63b8af" size="36rpx" v-else></up-icon>
|
||||||
|
<view class="ml-3">{{ item }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="current === 0"
|
||||||
|
class="fixed bottom-[calc(env(safe-area-inset-bottom)+32rpx)] w-686rpx mx-4 h-88rpx text-center text-white bg-[#63b8af] leading-[88rpx] rounded-44rpx font-bold"
|
||||||
|
@click="handleNext"
|
||||||
|
>下一步</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, ref } from 'vue'
|
||||||
|
import { useBasicStore } from '@/stores/basic'
|
||||||
|
|
||||||
|
const $basic = useBasicStore()
|
||||||
|
|
||||||
|
const current = ref(0)
|
||||||
|
const wifiList = ref([])
|
||||||
|
const wifiIndex = ref()
|
||||||
|
const password = ref('')
|
||||||
|
|
||||||
|
const step = ref(1)
|
||||||
|
|
||||||
|
const deviceList = ref([])
|
||||||
|
|
||||||
|
const showPassword = ref(false)
|
||||||
|
|
||||||
|
const stepList = ref([
|
||||||
|
'手机与设备连接成功',
|
||||||
|
'向设备发送信息成功',
|
||||||
|
'设备连接云端成功',
|
||||||
|
'初始化成功'
|
||||||
|
])
|
||||||
|
|
||||||
|
const wifiInfo = ref({
|
||||||
|
SSID: '',
|
||||||
|
password: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
const deviceInfo = $basic.deviceInfo
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (deviceInfo.platform !== 'android' && deviceInfo.platform !== 'ios') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '当前设备不支持WiFi功能',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.authorize({
|
||||||
|
scope: 'scope.userLocation',
|
||||||
|
success: () => {
|
||||||
|
const getWifiListFn = () => {
|
||||||
|
uni.getWifiList({
|
||||||
|
success: () => {
|
||||||
|
uni.onGetWifiList(res => {
|
||||||
|
const uniqueWifiList = res.wifiList
|
||||||
|
.filter(wifi => wifi.SSID && wifi.SSID.trim() !== '')
|
||||||
|
.reduce((acc, current) => {
|
||||||
|
const exists = acc.find(item => item.SSID === current.SSID)
|
||||||
|
if (!exists) {
|
||||||
|
acc.push(current)
|
||||||
|
}
|
||||||
|
return acc
|
||||||
|
}, [])
|
||||||
|
wifiList.value = uniqueWifiList
|
||||||
|
wifiIndex.value = 0
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
console.error('获取WiFi列表失败:', err)
|
||||||
|
uni.showToast({
|
||||||
|
title: '获取WiFi列表失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (deviceInfo.platform === 'android') {
|
||||||
|
uni.startWifi({
|
||||||
|
success: () => {
|
||||||
|
getWifiListFn()
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
console.error('初始化WiFi失败:', err)
|
||||||
|
uni.showToast({
|
||||||
|
title: '初始化WiFi失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
getWifiListFn()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '需要获取位置权限才能使用WiFi功能',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.openSetting()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const togglePassword = () => {
|
||||||
|
showPassword.value = !showPassword.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeWifi = e => {
|
||||||
|
wifiIndex.value = e.detail.value
|
||||||
|
}
|
||||||
|
|
||||||
|
function bleComboConfigure() {}
|
||||||
|
|
||||||
|
const connectDevice = async device => {
|
||||||
|
// try {
|
||||||
|
// const deviceAdapter = await bluetoothAdapter.connectDevice(device)
|
||||||
|
// console.log(1111, deviceAdapter)
|
||||||
|
// bleComboConfigure({
|
||||||
|
// token: '1234567890',
|
||||||
|
// wifiInfo: wifiInfo.value,
|
||||||
|
// familyId: 'default',
|
||||||
|
// roomId: 'default',
|
||||||
|
// deviceAdapter
|
||||||
|
// })
|
||||||
|
// current.value++
|
||||||
|
// } catch (err) {
|
||||||
|
// console.error('连接设备出错', err)
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
const searchDevice = async () => {
|
||||||
|
// try {
|
||||||
|
// await bluetoothAdapter.startSearch({
|
||||||
|
// onError: error => {
|
||||||
|
// console.log('搜索设备出错', error)
|
||||||
|
// bluetoothAdapter.stopSearch()
|
||||||
|
// },
|
||||||
|
// onSearch: devices => {
|
||||||
|
// if (devices.length > 0) {
|
||||||
|
// console.log('搜索到设备', devices)
|
||||||
|
// deviceList.value = devices
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// timeout: 1.4 * 15 * 1000
|
||||||
|
// })
|
||||||
|
// } catch (error) {
|
||||||
|
// console.log('搜索设备出错1', error)
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleNext = () => {
|
||||||
|
current.value++
|
||||||
|
searchDevice()
|
||||||
|
if (wifiIndex.value === undefined) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择WiFi',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (password.value === '') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请输入密码',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (password.value.length < 8) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '密码长度不能小于8位',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
wifiInfo.value = {
|
||||||
|
SSID: wifiList.value[wifiIndex.value].SSID,
|
||||||
|
password: password.value
|
||||||
|
}
|
||||||
|
|
||||||
|
uni.offGetWifiList()
|
||||||
|
if (deviceInfo.platform === 'android') {
|
||||||
|
uni.stopWifi()
|
||||||
|
}
|
||||||
|
current.value++
|
||||||
|
|
||||||
|
searchDevice()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.custom-steps {
|
||||||
|
:deep(.u-text__value) {
|
||||||
|
font-size: 28rpx !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -14,10 +14,13 @@
|
|||||||
@click="connect(device)"
|
@click="connect(device)"
|
||||||
>
|
>
|
||||||
<view class="device" style="justify-content: flex-start">
|
<view class="device" style="justify-content: flex-start">
|
||||||
<image class="device-lock" src="/static/images/icon_door_lock.png"></image>
|
<image
|
||||||
|
class="device-lock"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_door_lock.png"
|
||||||
|
></image>
|
||||||
<view class="device-name">{{ device.name }}</view>
|
<view class="device-name">{{ device.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="device-add" src="/static/images/icon_add.png"></image>
|
<image class="device-add" src="https://oss-lock.xhjcn.ltd/mp/icon_add.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@ -172,16 +175,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.device {
|
.device {
|
||||||
background: #ffffff;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
|
||||||
.device-lock {
|
.device-lock {
|
||||||
margin-left: 24rpx;
|
|
||||||
width: 72rpx;
|
width: 72rpx;
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
|
margin-left: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-name {
|
.device-name {
|
||||||
@ -120,7 +120,7 @@
|
|||||||
id: 1,
|
id: 1,
|
||||||
latitude: res.latitude,
|
latitude: res.latitude,
|
||||||
longitude: res.longitude,
|
longitude: res.longitude,
|
||||||
iconPath: '/static/images/icon_address.png',
|
iconPath: 'https://oss-lock.xhjcn.ltd/mp/icon_address.png',
|
||||||
width: '48rpx',
|
width: '48rpx',
|
||||||
height: '48rpx'
|
height: '48rpx'
|
||||||
}
|
}
|
||||||
@ -1,84 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
<view class="title">摸亮触摸屏</view>
|
|
||||||
<image src="/static/images/icon_lock_touch_screen.png" mode="aspectFill" class="icon"></image>
|
|
||||||
<view class="tips">摸亮触摸屏,锁进入可添加状态,点击下一步</view>
|
|
||||||
<view @click="toSearchDevice" class="button">下一步</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapActions, mapState } from 'pinia'
|
|
||||||
import { useBluetoothStore } from '@/stores/bluetooth'
|
|
||||||
import { useBasicStore } from '@/stores/basic'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(useBluetoothStore, ['bluetoothStatus', 'isInitBluetooth'])
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
...mapActions(useBluetoothStore, [
|
|
||||||
'getBluetoothStatus',
|
|
||||||
'initAndListenBluetooth',
|
|
||||||
'checkSetting'
|
|
||||||
]),
|
|
||||||
...mapActions(useBasicStore, ['routeJump']),
|
|
||||||
async toSearchDevice() {
|
|
||||||
if (this.bluetoothStatus !== 0) {
|
|
||||||
this.getBluetoothStatus()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let result = true
|
|
||||||
if (!this.isInitBluetooth) {
|
|
||||||
result = await this.initAndListenBluetooth()
|
|
||||||
}
|
|
||||||
if (result) {
|
|
||||||
this.routeJump({
|
|
||||||
type: 'redirectTo',
|
|
||||||
name: 'searchDevice'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.checkSetting()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.title {
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 200rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
width: 300rpx;
|
|
||||||
height: 300rpx;
|
|
||||||
margin: 150rpx 225rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tips {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #999;
|
|
||||||
margin-bottom: 100rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
|
||||||
width: 600rpx;
|
|
||||||
height: 100rpx;
|
|
||||||
line-height: 100rpx;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #63b8af;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-size: 36rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -47,7 +47,11 @@
|
|||||||
<view class="item" @click="toDetail(item)">
|
<view class="item" @click="toDetail(item)">
|
||||||
<image
|
<image
|
||||||
class="item-left rounded-50%"
|
class="item-left rounded-50%"
|
||||||
:src="item.headUrl === '' ? '/static/images/icon_user.png' : item.headUrl"
|
:src="
|
||||||
|
item.headUrl === ''
|
||||||
|
? 'https://oss-lock.xhjcn.ltd/mp/icon_user.png'
|
||||||
|
: item.headUrl
|
||||||
|
"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
@ -314,25 +318,25 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
padding: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 32rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,29 +344,29 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.item-left {
|
.item-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.item-right-top {
|
.item-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right-bottom {
|
.item-right-bottom {
|
||||||
@ -386,9 +390,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="flex justify-center flex-col pt-20">
|
<view class="flex justify-center flex-col pt-20">
|
||||||
<image
|
<image
|
||||||
src="/static/images/icon_add_card.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_add_card.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
class="mx-[200rpx] w-350 h-350"
|
class="mx-[200rpx] w-350 h-350"
|
||||||
></image>
|
></image>
|
||||||
@ -3,13 +3,13 @@
|
|||||||
<view class="flex justify-center flex-col pt-10 text-align-center text-base">
|
<view class="flex justify-center flex-col pt-10 text-align-center text-base">
|
||||||
<image
|
<image
|
||||||
v-if="showProcess"
|
v-if="showProcess"
|
||||||
src="/static/images/icon_add_face_1.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_add_face_1.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="mx-[100rpx] w-550 mt-5 rounded-2xl"
|
class="mx-[100rpx] w-550 mt-5 rounded-2xl"
|
||||||
></image>
|
></image>
|
||||||
<image
|
<image
|
||||||
v-else
|
v-else
|
||||||
src="/static/images/icon_add_face_2.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_add_face_2.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="mx-[100rpx] w-550 mt-5 rounded-2xl"
|
class="mx-[100rpx] w-550 mt-5 rounded-2xl"
|
||||||
></image>
|
></image>
|
||||||
@ -6,7 +6,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="showProcess" class="mt-5 font-bold">({{ process }}/{{ maxProcess }})</view>
|
<view v-if="showProcess" class="mt-5 font-bold">({{ process }}/{{ maxProcess }})</view>
|
||||||
<image
|
<image
|
||||||
:src="`/static/images/icon_fingerprint_${process}.png`"
|
:src="`https://oss-lock.xhjcn.ltd/mp/icon_fingerprint_${process}.png`"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="mx-[250rpx] w-250 mt-5"
|
class="mx-[250rpx] w-250 mt-5"
|
||||||
></image>
|
></image>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="flex justify-center flex-col pt-20">
|
<view class="flex justify-center flex-col pt-20">
|
||||||
<image
|
<image
|
||||||
src="/static/images/icon_add_palm_vein.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_add_palm_vein.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
class="mx-[125rpx] w-500 h-500"
|
class="mx-[125rpx] w-500 h-500"
|
||||||
></image>
|
></image>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="flex justify-center flex-col pt-20">
|
<view class="flex justify-center flex-col pt-20">
|
||||||
<image
|
<image
|
||||||
src="/static/images/icon_add_remote.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_add_remote.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
class="mx-[200rpx] w-350 h-350"
|
class="mx-[200rpx] w-350 h-350"
|
||||||
></image>
|
></image>
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<view class="item" @click="toDetail(item)">
|
<view class="item" @click="toDetail(item)">
|
||||||
<image
|
<image
|
||||||
class="item-left"
|
class="item-left"
|
||||||
src="/static/images/icon_card_white.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_card_white.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
@ -373,36 +373,36 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
padding: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -410,29 +410,29 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.item-left {
|
.item-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.item-right-top {
|
.item-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right-bottom {
|
.item-right-bottom {
|
||||||
@ -456,9 +456,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<view class="item" @click="toDetail(item)">
|
<view class="item" @click="toDetail(item)">
|
||||||
<image
|
<image
|
||||||
class="item-left"
|
class="item-left"
|
||||||
src="/static/images/icon_face_white.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_face_white.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
@ -374,36 +374,36 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
padding: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -411,29 +411,29 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.item-left {
|
.item-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.item-right-top {
|
.item-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right-bottom {
|
.item-right-bottom {
|
||||||
@ -457,9 +457,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<view class="item" @click="toDetail(item)">
|
<view class="item" @click="toDetail(item)">
|
||||||
<image
|
<image
|
||||||
class="item-left"
|
class="item-left"
|
||||||
src="/static/images/icon_fingerprint_white.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_fingerprint_white.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
@ -373,36 +373,36 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
padding: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -410,29 +410,29 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.item-left {
|
.item-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.item-right-top {
|
.item-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right-bottom {
|
.item-right-bottom {
|
||||||
@ -456,9 +456,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="keyList.length === 0 && requestFinished">
|
<view v-if="keyList.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -47,7 +47,9 @@
|
|||||||
<view class="key" @click="toKeyDetail(key)">
|
<view class="key" @click="toKeyDetail(key)">
|
||||||
<image
|
<image
|
||||||
class="key-left"
|
class="key-left"
|
||||||
:src="key.headUrl === '' ? '/static/images/icon_user.png' : key.headUrl"
|
:src="
|
||||||
|
key.headUrl === '' ? 'https://oss-lock.xhjcn.ltd/mp/icon_user.png' : key.headUrl
|
||||||
|
"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="key-right">
|
<view class="key-right">
|
||||||
@ -57,13 +59,13 @@
|
|||||||
class="key-admin"
|
class="key-admin"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
v-if="key.remoteEnable === 1"
|
v-if="key.remoteEnable === 1"
|
||||||
src="/static/images/icon_remote_unlock.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_remote_unlock.png"
|
||||||
></image>
|
></image>
|
||||||
<image
|
<image
|
||||||
class="key-admin"
|
class="key-admin"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
v-if="key.keyRight === 1"
|
v-if="key.keyRight === 1"
|
||||||
src="/static/images/icon_admin.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_admin.png"
|
||||||
></image>
|
></image>
|
||||||
<view
|
<view
|
||||||
class="key-status"
|
class="key-status"
|
||||||
@ -364,37 +366,37 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
margin-top: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
margin-top: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 48rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 48rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -402,37 +404,37 @@
|
|||||||
.key {
|
.key {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.key-left {
|
.key-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.key-right {
|
.key-right {
|
||||||
margin-left: 32rpx;
|
|
||||||
margin-right: 32rpx;
|
|
||||||
width: 574rpx;
|
width: 574rpx;
|
||||||
|
margin-right: 32rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
|
|
||||||
.key-right-top {
|
.key-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.key-admin {
|
.key-admin {
|
||||||
margin-top: 8rpx;
|
|
||||||
margin-left: 10rpx;
|
|
||||||
width: 25rpx;
|
width: 25rpx;
|
||||||
height: 25rpx;
|
height: 25rpx;
|
||||||
|
margin-top: 8rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.key-right-bottom {
|
.key-right-bottom {
|
||||||
@ -463,8 +465,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<view class="item-left rounded-50% bg-#2863f6 flex items-center justify-center">
|
<view class="item-left rounded-50% bg-#2863f6 flex items-center justify-center">
|
||||||
<image
|
<image
|
||||||
class="w-50 h-50"
|
class="w-50 h-50"
|
||||||
src="/static/images/icon_palm_vein_white.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_palm_vein_white.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
@ -378,36 +378,36 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
padding: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -415,29 +415,29 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.item-left {
|
.item-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.item-right-top {
|
.item-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right-bottom {
|
.item-right-bottom {
|
||||||
@ -461,9 +461,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="passwordList.length === 0 && requestFinished">
|
<view v-if="passwordList.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<view class="password" @click="toPasswordDetail(password)">
|
<view class="password" @click="toPasswordDetail(password)">
|
||||||
<image
|
<image
|
||||||
class="password-left"
|
class="password-left"
|
||||||
src="/static/images/icon_password.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_password.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="password-right">
|
<view class="password-right">
|
||||||
@ -341,37 +341,37 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
margin-top: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
margin-top: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 48rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 48rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -379,29 +379,29 @@
|
|||||||
.password {
|
.password {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.password-left {
|
.password-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.password-right {
|
.password-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.password-right-top {
|
.password-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.password-right-bottom {
|
.password-right-bottom {
|
||||||
@ -425,9 +425,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.key-status {
|
.key-status {
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<view class="item-left rounded-50% bg-#2863f6 flex items-center justify-center">
|
<view class="item-left rounded-50% bg-#2863f6 flex items-center justify-center">
|
||||||
<image
|
<image
|
||||||
class="w-80 h-80"
|
class="w-80 h-80"
|
||||||
src="/static/images/icon_remote_white.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_remote_white.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
@ -376,36 +376,36 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
padding: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -413,29 +413,29 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.item-left {
|
.item-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.item-right-top {
|
.item-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right-bottom {
|
.item-right-bottom {
|
||||||
@ -459,9 +459,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<image
|
<image
|
||||||
class="w-48 h-48 m-a mt-2.5"
|
class="w-48 h-48 m-a mt-2.5"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
src="/static/images/icon_sync.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_sync.png"
|
||||||
></image>
|
></image>
|
||||||
<view>同步记录</view>
|
<view>同步记录</view>
|
||||||
</view>
|
</view>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view v-if="!penging">
|
<view v-if="!pending">
|
||||||
<view v-if="isLogin">
|
<view v-if="isLogin">
|
||||||
<scroll-view
|
<scroll-view
|
||||||
v-if="deviceInfo"
|
v-if="deviceInfo"
|
||||||
@ -17,11 +17,11 @@
|
|||||||
v-if="!(lockList.length === 0 && lockSearch.searchStr === '' && !focus)"
|
v-if="!(lockList.length === 0 && lockSearch.searchStr === '' && !focus)"
|
||||||
>
|
>
|
||||||
<up-search
|
<up-search
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
@focus="getFocus"
|
@focus="getFocus"
|
||||||
@blur="getBlur"
|
@blur="getBlur"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -31,10 +31,10 @@
|
|||||||
maxlength="50"
|
maxlength="50"
|
||||||
></up-search>
|
></up-search>
|
||||||
</view>
|
</view>
|
||||||
<view class="lock-list" v-if="!penging">
|
<view class="lock-list" v-if="!pending">
|
||||||
<view v-if="lockList.length === 0 && lockSearch.searchStr === '' && !focus">
|
<view v-if="lockList.length === 0 && lockSearch.searchStr === '' && !focus">
|
||||||
<image
|
<image
|
||||||
src="/static/images/icon_add_round.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_add_round.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
class="button-add-big"
|
class="button-add-big"
|
||||||
@click="toSearchDevice"
|
@click="toSearchDevice"
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<view class="text">添加锁时,手机必须在锁旁边</view>
|
<view class="text">添加锁时,手机必须在锁旁边</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="group" v-for="(group, grounIndex) in lockList" :key="group.groupId">
|
<view class="group" v-for="(group, groupIndex) in lockList" :key="group.groupId">
|
||||||
<view class="group-name">
|
<view class="group-name">
|
||||||
<view class="group-name-text">{{ group.groupName }}</view>
|
<view class="group-name-text">{{ group.groupName }}</view>
|
||||||
<view class="group-name-line"></view>
|
<view class="group-name-line"></view>
|
||||||
@ -50,16 +50,19 @@
|
|||||||
<up-swipe-action>
|
<up-swipe-action>
|
||||||
<up-swipe-action-item
|
<up-swipe-action-item
|
||||||
class="lock"
|
class="lock"
|
||||||
:ref="'swipeItem' + grounIndex"
|
:ref="'swipeItem' + groupIndex"
|
||||||
:options="options"
|
:options="options"
|
||||||
v-for="(lock, lockIndex) in group.lockList"
|
v-for="(lock, lockIndex) in group.lockList"
|
||||||
:key="lock.lockId"
|
:key="lock.lockId"
|
||||||
:threshold="50"
|
:threshold="50"
|
||||||
@click="deleteLock(lock, grounIndex, lockIndex)"
|
@click="deleteLock(lock, groupIndex, lockIndex)"
|
||||||
>
|
>
|
||||||
<view class="lock" @click="toLockDeatil(lock)">
|
<view class="lock" @click="toLockDetail(lock)">
|
||||||
<view class="lock-top">
|
<view class="lock-top">
|
||||||
<image class="lock-image-lock" src="/static/images/icon_lock.png"></image>
|
<image
|
||||||
|
class="lock-image-lock"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_lock.png"
|
||||||
|
></image>
|
||||||
<view class="lock-top-right">
|
<view class="lock-top-right">
|
||||||
<view class="lock-top-right-power">
|
<view class="lock-top-right-power">
|
||||||
<image
|
<image
|
||||||
@ -131,7 +134,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
<image
|
<image
|
||||||
v-if="lockList.length !== 0"
|
v-if="lockList.length !== 0"
|
||||||
src="/static/images/icon_add_round.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_add_round.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
class="button-add"
|
class="button-add"
|
||||||
@click="toSearchDevice"
|
@click="toSearchDevice"
|
||||||
@ -171,21 +174,21 @@
|
|||||||
<script>
|
<script>
|
||||||
import { timeFormat } from 'uview-plus'
|
import { timeFormat } from 'uview-plus'
|
||||||
import { mapState, mapActions } from 'pinia'
|
import { mapState, mapActions } from 'pinia'
|
||||||
import { getUserInfoRequest, loginRequest } from '@/api/user'
|
import { loginRequest } from '@/api/user'
|
||||||
import { useUserStore } from '@/stores/user'
|
import { useUserStore } from '@/stores/user'
|
||||||
import { useLockStore } from '@/stores/lock'
|
import { useLockStore } from '@/stores/lock'
|
||||||
import { useBluetoothStore } from '@/stores/bluetooth'
|
import { useBluetoothStore } from '@/stores/bluetooth'
|
||||||
import { useBasicStore } from '@/stores/basic'
|
import { useBasicStore } from '@/stores/basic'
|
||||||
import { deleteKeyRequest } from '@/api/key'
|
import { deleteKeyRequest } from '@/api/key'
|
||||||
import { deleteLockRequest } from '@/api/lock'
|
import { deleteLockRequest } from '@/api/lock'
|
||||||
import { setStorage, getStorage } from '../../utils/storage'
|
import { setStorage, getStorage } from '@/utils/storage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
refresherTriggered: false,
|
refresherTriggered: false,
|
||||||
focus: false,
|
focus: false,
|
||||||
penging: true,
|
pending: true,
|
||||||
deviceInfo: null,
|
deviceInfo: null,
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
@ -222,7 +225,7 @@
|
|||||||
const token = getStorage('token')
|
const token = getStorage('token')
|
||||||
if (token) {
|
if (token) {
|
||||||
await Promise.all([this.getLockList(this.lockSearch), this.getUserInfo()]).then(res => {
|
await Promise.all([this.getLockList(this.lockSearch), this.getUserInfo()]).then(res => {
|
||||||
this.penging = false
|
this.pending = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
const list = getStorage('lockList')
|
const list = getStorage('lockList')
|
||||||
const userInfo = getStorage('userInfo')
|
const userInfo = getStorage('userInfo')
|
||||||
@ -238,7 +241,7 @@
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
await this.homeLogin()
|
await this.homeLogin()
|
||||||
this.penging = false
|
this.pending = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
const _data = JSON.parse(JSON.stringify(data))
|
const _data = JSON.parse(JSON.stringify(data))
|
||||||
@ -478,11 +481,11 @@
|
|||||||
},
|
},
|
||||||
async nextPage() {
|
async nextPage() {
|
||||||
if (this.lockList.length < this.lockTotal) {
|
if (this.lockList.length < this.lockTotal) {
|
||||||
const sreach = {
|
const search = {
|
||||||
...this.lockSearch,
|
...this.lockSearch,
|
||||||
pageNo: this.lockSearch.pageNo + 1
|
pageNo: this.lockSearch.pageNo + 1
|
||||||
}
|
}
|
||||||
const { code } = await this.getLockList(search)
|
const { code, message } = await this.getLockList(search)
|
||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: message,
|
title: message,
|
||||||
@ -531,7 +534,7 @@
|
|||||||
name: 'addLockGuid'
|
name: 'addLockGuid'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async toLockDeatil(lock) {
|
async toLockDetail(lock) {
|
||||||
if (!(this.bluetoothStatus === 0 || this.bluetoothStatus === -1)) {
|
if (!(this.bluetoothStatus === 0 || this.bluetoothStatus === -1)) {
|
||||||
this.getBluetoothStatus()
|
this.getBluetoothStatus()
|
||||||
return
|
return
|
||||||
@ -589,20 +592,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.u-swipe-action {
|
.u-swipe-action {
|
||||||
overflow: inherit !important;
|
|
||||||
padding-bottom: 32rpx;
|
|
||||||
width: 672rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
width: 672rpx;
|
||||||
|
padding-bottom: 32rpx;
|
||||||
|
overflow: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-swipe-action-item {
|
.u-swipe-action-item {
|
||||||
|
width: 320rpx;
|
||||||
|
height: 300rpx;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
overflow: inherit !important;
|
overflow: inherit !important;
|
||||||
border-radius: 32rpx !important;
|
border-radius: 32rpx !important;
|
||||||
width: 320rpx;
|
|
||||||
height: 300rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-swipe-action-item__right {
|
.u-swipe-action-item__right {
|
||||||
@ -620,61 +623,60 @@
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.search {
|
.search {
|
||||||
margin-top: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
margin-top: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-login {
|
.button-login {
|
||||||
border-radius: 46rpx;
|
|
||||||
width: 650rpx;
|
width: 650rpx;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
line-height: 120rpx;
|
|
||||||
text-align: center;
|
|
||||||
margin-left: 50rpx;
|
margin-left: 50rpx;
|
||||||
background: #63b8af;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 48rpx;
|
font-size: 48rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
line-height: 120rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
background: #63b8af;
|
||||||
|
border-radius: 46rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-add {
|
.button-add {
|
||||||
width: 120rpx;
|
|
||||||
height: 120rpx;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 50rpx;
|
right: 50rpx;
|
||||||
bottom: 50rpx;
|
bottom: 50rpx;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lock-list {
|
.lock-list {
|
||||||
padding-bottom: 32rpx;
|
|
||||||
width: 672rpx;
|
|
||||||
margin-left: 39rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
width: 672rpx;
|
||||||
|
padding-bottom: 32rpx;
|
||||||
|
margin-left: 39rpx;
|
||||||
|
|
||||||
.lock {
|
.lock {
|
||||||
width: 320rpx;
|
width: 320rpx;
|
||||||
height: 300rpx;
|
height: 300rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0 8rpx 36rpx 0 rgba(0, 0, 0, 0.12);
|
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
|
box-shadow: 0 8rpx 36rpx 0 rgba(0, 0, 0, 0.12);
|
||||||
|
|
||||||
.lock-name {
|
.lock-name {
|
||||||
padding: 0 24rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
word-break: break-all;
|
|
||||||
line-height: 38rpx;
|
|
||||||
|
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
padding: 0 24rpx;
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 38rpx;
|
||||||
|
word-break: break-all;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lock-time {
|
.lock-time {
|
||||||
@ -709,16 +711,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.group {
|
.group {
|
||||||
width: 672rpx;
|
|
||||||
margin-top: 32rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
width: 672rpx;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
|
||||||
.group-name {
|
.group-name {
|
||||||
width: 672rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
width: 672rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -745,31 +747,31 @@
|
|||||||
|
|
||||||
.text {
|
.text {
|
||||||
width: 672rpx;
|
width: 672rpx;
|
||||||
|
margin-top: 32rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
margin-top: 40vh;
|
|
||||||
padding: 32rpx 0;
|
padding: 32rpx 0;
|
||||||
text-align: center;
|
margin-top: 40vh;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lock-status {
|
.lock-status {
|
||||||
margin-top: 5rpx;
|
|
||||||
margin-left: 24rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 4rpx 8rpx;
|
padding: 4rpx 8rpx;
|
||||||
background-color: #ecab1f;
|
margin-top: 5rpx;
|
||||||
|
margin-left: 24rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ffffff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
background-color: #ecab1f;
|
||||||
|
border-radius: 8rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<image
|
<image
|
||||||
class="top-background"
|
class="top-background"
|
||||||
src="/static/images/background_main.jpg"
|
src="https://oss-lock.xhjcn.ltd/mp/background_main.jpg"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view style="width: 100%; height: 50rpx">
|
<view style="width: 100%; height: 50rpx">
|
||||||
@ -26,7 +26,11 @@
|
|||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="power-text">{{ $bluetooth.currentLockInfo.electricQuantity }}%</view>
|
<view class="power-text">{{ $bluetooth.currentLockInfo.electricQuantity }}%</view>
|
||||||
<image class="power-tips" src="/static/images/icon_tips.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="power-tips"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_tips.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="switch" @click="openDoorOperate('open')" @longpress="openDoorOperate('close')">
|
<view class="switch" @click="openDoorOperate('open')" @longpress="openDoorOperate('close')">
|
||||||
@ -35,7 +39,11 @@
|
|||||||
<view class="switch-text">点击开锁,长按闭锁</view>
|
<view class="switch-text">点击开锁,长按闭锁</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="bottom-side">
|
<view class="bottom-side">
|
||||||
<image class="bottom-icon" src="/static/images/icon_role.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="bottom-icon"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_role.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
<view>{{
|
<view>{{
|
||||||
$lock.getRole(
|
$lock.getRole(
|
||||||
$bluetooth.currentLockInfo.userType,
|
$bluetooth.currentLockInfo.userType,
|
||||||
@ -48,8 +56,8 @@
|
|||||||
class="bottom-icon"
|
class="bottom-icon"
|
||||||
:src="
|
:src="
|
||||||
$bluetooth.currentLockInfo.appUnlockOnline
|
$bluetooth.currentLockInfo.appUnlockOnline
|
||||||
? '/static/images/icon_cloud_active.png'
|
? 'https://oss-lock.xhjcn.ltd/mp/icon_cloud_active.png'
|
||||||
: '/static/images/icon_cloud.png'
|
: 'https://oss-lock.xhjcn.ltd/mp/icon_cloud.png'
|
||||||
"
|
"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
style="width: 40rpx; height: 40rpx"
|
style="width: 40rpx; height: 40rpx"
|
||||||
@ -65,7 +73,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="menu">
|
<view class="menu">
|
||||||
<view class="menu-title">
|
<view class="menu-title">
|
||||||
<image class="menu-image" src="/static/images/icon_menu.png"></image>
|
<image class="menu-image" src="https://oss-lock.xhjcn.ltd/mp/icon_menu.png"></image>
|
||||||
<view>功能</view>
|
<view>功能</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-main">
|
<view class="menu-main">
|
||||||
@ -76,7 +84,7 @@
|
|||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
class="menu-main-image transform-scale-90"
|
class="menu-main-image transform-scale-90"
|
||||||
src="/static/images/icon_key.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_key.png"
|
||||||
></image>
|
></image>
|
||||||
<view>电子钥匙</view>
|
<view>电子钥匙</view>
|
||||||
</view>
|
</view>
|
||||||
@ -88,7 +96,10 @@
|
|||||||
class="menu-main-view"
|
class="menu-main-view"
|
||||||
@click="$basic.routeJump({ name: 'passwordList' })"
|
@click="$basic.routeJump({ name: 'passwordList' })"
|
||||||
>
|
>
|
||||||
<image class="menu-main-image" src="/static/images/icon_password_green.png"></image>
|
<image
|
||||||
|
class="menu-main-image"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_password_green.png"
|
||||||
|
></image>
|
||||||
<view>密码</view>
|
<view>密码</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@ -101,7 +112,7 @@
|
|||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
class="menu-main-image transform-scale-110"
|
class="menu-main-image transform-scale-110"
|
||||||
src="/static/images/icon_card.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_card.png"
|
||||||
></image>
|
></image>
|
||||||
<view>卡</view>
|
<view>卡</view>
|
||||||
</view>
|
</view>
|
||||||
@ -113,7 +124,10 @@
|
|||||||
class="menu-main-view"
|
class="menu-main-view"
|
||||||
@click="$basic.routeJump({ name: 'fingerprintList' })"
|
@click="$basic.routeJump({ name: 'fingerprintList' })"
|
||||||
>
|
>
|
||||||
<image class="menu-main-image" src="/static/images/icon_fingerprint.png"></image>
|
<image
|
||||||
|
class="menu-main-image"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_fingerprint.png"
|
||||||
|
></image>
|
||||||
<view>指纹</view>
|
<view>指纹</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@ -124,7 +138,10 @@
|
|||||||
class="menu-main-view transform-scale-110"
|
class="menu-main-view transform-scale-110"
|
||||||
@click="$basic.routeJump({ name: 'remoteList' })"
|
@click="$basic.routeJump({ name: 'remoteList' })"
|
||||||
>
|
>
|
||||||
<image class="menu-main-image" src="/static/images/icon_remote.png"></image>
|
<image
|
||||||
|
class="menu-main-image"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_remote.png"
|
||||||
|
></image>
|
||||||
<view>遥控</view>
|
<view>遥控</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@ -135,7 +152,10 @@
|
|||||||
class="menu-main-view"
|
class="menu-main-view"
|
||||||
@click="$basic.routeJump({ name: 'faceList' })"
|
@click="$basic.routeJump({ name: 'faceList' })"
|
||||||
>
|
>
|
||||||
<image class="menu-main-image" src="/static/images/icon_face.png"></image>
|
<image
|
||||||
|
class="menu-main-image"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_face.png"
|
||||||
|
></image>
|
||||||
<view>人脸</view>
|
<view>人脸</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@ -146,9 +166,19 @@
|
|||||||
class="menu-main-view"
|
class="menu-main-view"
|
||||||
@click="$basic.routeJump({ name: 'palmVeinList' })"
|
@click="$basic.routeJump({ name: 'palmVeinList' })"
|
||||||
>
|
>
|
||||||
<image class="menu-main-image" src="/static/images/icon_palm_vein.png"></image>
|
<image
|
||||||
|
class="menu-main-image"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_palm_vein.png"
|
||||||
|
></image>
|
||||||
<view>掌静脉</view>
|
<view>掌静脉</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="menu-main-view" @click="$basic.routeJump({ name: 'p2pPlayer' })">
|
||||||
|
<image
|
||||||
|
class="menu-main-image transform-scale-140"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_control.png"
|
||||||
|
></image>
|
||||||
|
<view>监控</view>
|
||||||
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="$bluetooth.currentLockInfo.userType === 110301"
|
v-if="$bluetooth.currentLockInfo.userType === 110301"
|
||||||
class="menu-main-view"
|
class="menu-main-view"
|
||||||
@ -156,7 +186,7 @@
|
|||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
class="menu-main-image transform-scale-140"
|
class="menu-main-image transform-scale-140"
|
||||||
src="/static/images/icon_admin_black.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_admin_black.png"
|
||||||
></image>
|
></image>
|
||||||
<view>授权管理员</view>
|
<view>授权管理员</view>
|
||||||
</view>
|
</view>
|
||||||
@ -164,9 +194,22 @@
|
|||||||
class="menu-main-view transform-scale-105"
|
class="menu-main-view transform-scale-105"
|
||||||
@click="$basic.routeJump({ name: 'recordList' })"
|
@click="$basic.routeJump({ name: 'recordList' })"
|
||||||
>
|
>
|
||||||
<image class="menu-main-image" src="/static/images/icon_record.png"></image>
|
<image
|
||||||
|
class="menu-main-image"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_record.png"
|
||||||
|
></image>
|
||||||
<view>操作记录</view>
|
<view>操作记录</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
|
class="menu-main-view transform-scale-105"
|
||||||
|
@click="$basic.routeJump({ name: 'p2pPlayer' })"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
class="menu-main-image"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_record.png"
|
||||||
|
></image>
|
||||||
|
<view>视频日志</view>
|
||||||
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="$bluetooth.currentLockInfo.keyRight === 1"
|
v-if="$bluetooth.currentLockInfo.keyRight === 1"
|
||||||
class="menu-main-view"
|
class="menu-main-view"
|
||||||
@ -174,16 +217,20 @@
|
|||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
class="menu-main-image transform-scale-110"
|
class="menu-main-image transform-scale-110"
|
||||||
src="/static/images/icon_remind.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_remind.png"
|
||||||
></image>
|
></image>
|
||||||
<view>消息提醒</view>
|
<view>消息提醒</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="setting" @click="$basic.routeJump({ name: 'setting' })">
|
<view class="setting" @click="$basic.routeJump({ name: 'setting' })">
|
||||||
<image class="setting-image" src="/static/images/icon_setting.png"></image>
|
<image class="setting-image" src="https://oss-lock.xhjcn.ltd/mp/icon_setting.png"></image>
|
||||||
<view class="setting-text">设置</view>
|
<view class="setting-text">设置</view>
|
||||||
<image class="setting-arrow" mode="aspectFill" src="/static/images/icon_arrow.png"></image>
|
<image
|
||||||
|
class="setting-arrow"
|
||||||
|
mode="aspectFill"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<up-popup
|
<up-popup
|
||||||
@ -198,8 +245,8 @@
|
|||||||
class="popup-background"
|
class="popup-background"
|
||||||
:src="
|
:src="
|
||||||
typeValue === 'close'
|
typeValue === 'close'
|
||||||
? '/static/images/background_close_door.png'
|
? 'https://oss-lock.xhjcn.ltd/mp/background_close_door.png'
|
||||||
: '/static/images/background_open_door.png'
|
: 'https://oss-lock.xhjcn.ltd/mp/background_open_door.png'
|
||||||
"
|
"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
/>
|
/>
|
||||||
@ -413,86 +460,85 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.popup {
|
.popup {
|
||||||
display: flex;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
width: 400rpx;
|
width: 400rpx;
|
||||||
height: 389rpx;
|
height: 389rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.popup-background {
|
.popup-background {
|
||||||
|
position: absolute;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
width: 400rpx;
|
width: 400rpx;
|
||||||
height: 389rpx;
|
height: 389rpx;
|
||||||
position: absolute;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-name {
|
.popup-name {
|
||||||
margin-left: 30rpx;
|
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
margin-top: 180rpx;
|
display: -webkit-box;
|
||||||
color: #676b6d;
|
|
||||||
width: 340rpx;
|
width: 340rpx;
|
||||||
max-height: 80rpx;
|
max-height: 80rpx;
|
||||||
line-height: 40rpx;
|
margin-top: 180rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
word-break: break-all;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
line-height: 40rpx;
|
||||||
|
color: #676b6d;
|
||||||
|
word-break: break-all;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-time {
|
.popup-time {
|
||||||
margin-top: 10rpx;
|
|
||||||
width: 400rpx;
|
width: 400rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.days {
|
.days {
|
||||||
line-height: 60rpx;
|
|
||||||
background: #faecc9;
|
|
||||||
color: #bc9839;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
color: #bc9839;
|
||||||
|
text-align: center;
|
||||||
|
background: #faecc9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lock-name {
|
.lock-name {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
padding: 32rpx 32rpx 0 32rpx;
|
padding: 32rpx 32rpx 0 32rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
margin-top: 32rpx;
|
position: relative;
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 464rpx;
|
height: 464rpx;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.top-background {
|
.top-background {
|
||||||
z-index: -1;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
height: 464rpx;
|
height: 464rpx;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch {
|
.switch {
|
||||||
margin-top: 20rpx;
|
|
||||||
margin-left: 218rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
width: 250rpx;
|
width: 250rpx;
|
||||||
height: 250rpx;
|
height: 250rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
margin-left: 218rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
box-shadow: 0 8rpx 36rpx 0 rgba(0, 0, 0, 0.12);
|
box-shadow: 0 8rpx 36rpx 0 rgba(0, 0, 0, 0.12);
|
||||||
@ -500,30 +546,30 @@
|
|||||||
|
|
||||||
.power {
|
.power {
|
||||||
float: right;
|
float: right;
|
||||||
padding-top: 18rpx;
|
|
||||||
//width: 100%;
|
//width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 50rpx;
|
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
height: 50rpx;
|
||||||
|
padding-top: 18rpx;
|
||||||
|
|
||||||
.power-icon {
|
.power-icon {
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
margin-right: 10rpx;
|
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.power-text {
|
.power-text {
|
||||||
|
margin-right: 10rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-right: 10rpx;
|
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.power-tips {
|
.power-tips {
|
||||||
margin-right: 32rpx;
|
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
|
margin-right: 32rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,18 +580,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
width: 686rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: rgba(0, 0, 0, 0.1);
|
|
||||||
height: 48rpx;
|
|
||||||
line-height: 48rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #63b8af;
|
|
||||||
border-radius: 0 0 32rpx 32rpx;
|
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
width: 686rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 48rpx;
|
||||||
|
color: #63b8af;
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 0 0 32rpx 32rpx;
|
||||||
|
|
||||||
.bottom-side {
|
.bottom-side {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -560,75 +606,75 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
|
width: 686rpx;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 686rpx;
|
font-size: 40rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
box-shadow: 0 8rpx 36rpx 0 rgba(0, 0, 0, 0.12);
|
box-shadow: 0 8rpx 36rpx 0 rgba(0, 0, 0, 0.12);
|
||||||
font-size: 40rpx;
|
|
||||||
|
|
||||||
.menu-title {
|
.menu-title {
|
||||||
padding: 24rpx 32rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 24rpx 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-image {
|
.menu-image {
|
||||||
margin-right: 40rpx;
|
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
|
margin-right: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-main {
|
.menu-main {
|
||||||
padding-top: 32rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
font-size: 28rpx;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
text-align: center;
|
align-items: center;
|
||||||
|
padding-top: 32rpx;
|
||||||
margin-left: 43rpx;
|
margin-left: 43rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
.menu-main-view {
|
.menu-main-view {
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
margin-bottom: 48rpx;
|
margin-bottom: 48rpx;
|
||||||
|
|
||||||
.menu-main-image {
|
.menu-main-image {
|
||||||
margin-bottom: 10rpx;
|
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting {
|
.setting {
|
||||||
padding: 24rpx 0;
|
|
||||||
margin-top: 32rpx;
|
|
||||||
margin-left: 32rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
|
padding: 24rpx 0;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
|
font-size: 40rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
box-shadow: 0 8rpx 36rpx 0 rgba(0, 0, 0, 0.12);
|
box-shadow: 0 8rpx 36rpx 0 rgba(0, 0, 0, 0.12);
|
||||||
font-size: 40rpx;
|
|
||||||
|
|
||||||
.setting-text {
|
.setting-text {
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-arrow {
|
.setting-arrow {
|
||||||
margin-right: 32rpx;
|
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
|
margin-right: 32rpx;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-image {
|
.setting-image {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -4,29 +4,49 @@
|
|||||||
<view class="view">
|
<view class="view">
|
||||||
<view class="view-button" @click="toUsereInfo">
|
<view class="view-button" @click="toUsereInfo">
|
||||||
<view>个人信息</view>
|
<view>个人信息</view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-line"></view>
|
<view class="view-line"></view>
|
||||||
<label for="contact">
|
<label for="contact">
|
||||||
<view class="view-button">
|
<view class="view-button">
|
||||||
<view>客服</view>
|
<view>客服</view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</label>
|
</label>
|
||||||
<view class="view-line"></view>
|
<view class="view-line"></view>
|
||||||
<view class="view-button" @click="toWebview()">
|
<view class="view-button" @click="toWebview()">
|
||||||
<view>公司介绍</view>
|
<view>公司介绍</view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-line"></view>
|
<view class="view-line"></view>
|
||||||
<view class="view-button" @click="toWebview('userAgreement')">
|
<view class="view-button" @click="toWebview('userAgreement')">
|
||||||
<view>用户协议</view>
|
<view>用户协议</view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-line"></view>
|
<view class="view-line"></view>
|
||||||
<view class="view-button" @click="toWebview('privacy')">
|
<view class="view-button" @click="toWebview('privacy')">
|
||||||
<view>隐私政策</view>
|
<view>隐私政策</view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="env" v-if="env">
|
<view class="env" v-if="env">
|
||||||
@ -136,7 +156,7 @@
|
|||||||
removeStorage('userInfo')
|
removeStorage('userInfo')
|
||||||
removeStorage('lockList')
|
removeStorage('lockList')
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/home/home'
|
url: '/pages/main/home'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async changePhone(res) {
|
async changePhone(res) {
|
||||||
@ -253,30 +273,30 @@
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.background-image {
|
.background-image {
|
||||||
margin-top: 32rpx;
|
|
||||||
margin-left: 20rpx;
|
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
height: 156rpx;
|
height: 156rpx;
|
||||||
|
margin-top: 32rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view {
|
.view {
|
||||||
margin-top: 32rpx;
|
|
||||||
border-radius: 32rpx;
|
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
|
margin-top: 32rpx;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
|
border-radius: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-button {
|
.view-button {
|
||||||
padding: 0 20rpx 0 40rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #292826;
|
justify-content: space-between;
|
||||||
|
padding: 0 20rpx 0 40rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
|
color: #292826;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-arrow {
|
.icon-arrow {
|
||||||
@ -292,60 +312,60 @@
|
|||||||
|
|
||||||
.switch-account {
|
.switch-account {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border-radius: 46rpx;
|
|
||||||
bottom: 60rpx;
|
bottom: 60rpx;
|
||||||
width: 600rpx;
|
width: 600rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
|
||||||
text-align: center;
|
|
||||||
margin-left: 75rpx;
|
margin-left: 75rpx;
|
||||||
background: #63b8af;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
line-height: 80rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
background: #63b8af;
|
||||||
|
border-radius: 46rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.env {
|
.env {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 180rpx;
|
bottom: 180rpx;
|
||||||
width: 600rpx;
|
width: 600rpx;
|
||||||
|
margin-left: 75rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-left: 75rpx;
|
|
||||||
|
|
||||||
.env-text {
|
.env-text {
|
||||||
|
font-size: 30rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
font-size: 30rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.env-button {
|
.env-button {
|
||||||
background: inherit;
|
|
||||||
color: #022b7c;
|
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
|
color: #022b7c;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
background: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-login {
|
.button-login {
|
||||||
border-radius: 46rpx;
|
|
||||||
width: 650rpx;
|
width: 650rpx;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
line-height: 120rpx;
|
|
||||||
text-align: center;
|
|
||||||
margin-left: 50rpx;
|
margin-left: 50rpx;
|
||||||
background: #63b8af;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 48rpx;
|
font-size: 48rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
line-height: 120rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
background: #63b8af;
|
||||||
|
border-radius: 46rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
margin-top: 25vh;
|
|
||||||
padding: 32rpx 0;
|
padding: 32rpx 0;
|
||||||
text-align: center;
|
margin-top: 25vh;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<view v-if="notificationList.length === 0">
|
<view v-if="notificationList.length === 0">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<view v-if="notification.readAt === 0">
|
<view v-if="notification.readAt === 0">
|
||||||
<image
|
<image
|
||||||
class="icon"
|
class="icon"
|
||||||
src="/static/images/icon_notification_unread.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_notification_unread.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="point"></view>
|
<view class="point"></view>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<image
|
<image
|
||||||
v-else
|
v-else
|
||||||
class="icon"
|
class="icon"
|
||||||
src="/static/images/icon_notification_read.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_notification_read.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view>
|
<view>
|
||||||
@ -76,7 +76,11 @@
|
|||||||
@click="deleteAllNotification"
|
@click="deleteAllNotification"
|
||||||
v-if="isLogin && requestFinished && notificationList.length !== 0"
|
v-if="isLogin && requestFinished && notificationList.length !== 0"
|
||||||
>
|
>
|
||||||
<image class="delete-image" src="/static/images/icon_delete.png" mode="aspectFill" />
|
<image
|
||||||
|
class="delete-image"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_delete.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<button
|
<button
|
||||||
open-type="getPhoneNumber"
|
open-type="getPhoneNumber"
|
||||||
192
pages/p2p/p2pPlayer.vue
Normal file
192
pages/p2p/p2pPlayer.vue
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<iot-p2p-player-with-mjpg
|
||||||
|
id="playerRef"
|
||||||
|
:deviceInfo="deviceInfo"
|
||||||
|
:xp2pInfo="xp2pInfo"
|
||||||
|
:rotate="90"
|
||||||
|
:muted="isMute"
|
||||||
|
streamQuality="high"
|
||||||
|
:minCache="0.2"
|
||||||
|
:maxCache="0.8"
|
||||||
|
:fill="true"
|
||||||
|
orientation="horizontal"
|
||||||
|
@statechange="handleStateChange"
|
||||||
|
>
|
||||||
|
</iot-p2p-player-with-mjpg>
|
||||||
|
<iot-p2p-voice
|
||||||
|
id="voiceComponent"
|
||||||
|
:deviceInfo="deviceInfo"
|
||||||
|
:xp2pInfo="xp2pInfo"
|
||||||
|
voiceType="Pusher"
|
||||||
|
>
|
||||||
|
</iot-p2p-voice>
|
||||||
|
|
||||||
|
<view
|
||||||
|
class="fixed bottom-[calc(32rpx+env(safe-area-inset-bottom))] bg-[rgba(0,0,0,0.3)] rounded-xl p-4 shadow-lg mx-4 w-622"
|
||||||
|
>
|
||||||
|
<view class="flex items-center justify-around mx-10">
|
||||||
|
<image
|
||||||
|
@click="isMute = !isMute"
|
||||||
|
:src="
|
||||||
|
isMute
|
||||||
|
? 'https://oss-lock.xhjcn.ltd/mp/icon_mute.png'
|
||||||
|
: 'https://oss-lock.xhjcn.ltd/mp/icon_not_mute.png'
|
||||||
|
"
|
||||||
|
class="w-48 h-48 p-2"
|
||||||
|
></image>
|
||||||
|
<image
|
||||||
|
@click="handleScreenshot"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_screenshot.png"
|
||||||
|
class="w-48 h-48 p-2"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
<view class="flex items-center justify-around text-white mt-2">
|
||||||
|
<view class="flex flex-col items-center" @longpress="startVoice" @touchend="stopVoice">
|
||||||
|
<view class="bg-white w-80 h-80 rounded-full flex items-center justify-center">
|
||||||
|
<image
|
||||||
|
:src="
|
||||||
|
isVoice
|
||||||
|
? 'https://oss-lock.xhjcn.ltd/mp/icon_microphone.png'
|
||||||
|
: 'https://oss-lock.xhjcn.ltd/mp/icon_no_microphone.png'
|
||||||
|
"
|
||||||
|
class="w-55 h-55"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
<view class="mt-2">长按说话</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex flex-col items-center" @click="handleHangUp">
|
||||||
|
<view class="bg-[#eb292b] w-80 h-80 rounded-full flex items-center justify-center">
|
||||||
|
<image src="https://oss-lock.xhjcn.ltd/mp/icon_hang_up.png" class="w-60 h-60"></image>
|
||||||
|
</view>
|
||||||
|
<view class="mt-2">挂断</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex flex-col items-center" @click="handleLock">
|
||||||
|
<view class="bg-[#63b8af] w-80 h-80 rounded-full flex items-center justify-center">
|
||||||
|
<image
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_lock_white.png"
|
||||||
|
class="w-60 h-60"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
<view class="mt-2">开锁</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getXp2pManager } from './xp2pManager'
|
||||||
|
import { useBluetoothStore } from '@/stores/bluetooth'
|
||||||
|
import { useBasicStore } from '@/stores/basic'
|
||||||
|
import { onMounted, ref } from 'vue'
|
||||||
|
import { onUnload } from '@dcloudio/uni-app'
|
||||||
|
import { getP2pInfo } from '@/api/p2p'
|
||||||
|
|
||||||
|
const $bluetooth = useBluetoothStore()
|
||||||
|
const $basic = useBasicStore()
|
||||||
|
|
||||||
|
let xp2pManager = null
|
||||||
|
|
||||||
|
const deviceInfo = ref()
|
||||||
|
const xp2pInfo = ref()
|
||||||
|
|
||||||
|
const isVoice = ref(false)
|
||||||
|
|
||||||
|
const isMute = ref(false)
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
if (!xp2pManager) {
|
||||||
|
xp2pManager = getXp2pManager()
|
||||||
|
}
|
||||||
|
|
||||||
|
const { code, data, message } = await getP2pInfo({
|
||||||
|
lockId: $bluetooth.currentLockInfo.lockId
|
||||||
|
})
|
||||||
|
|
||||||
|
if (code === 0) {
|
||||||
|
deviceInfo.value = {
|
||||||
|
deviceId: `${data.productId}/${data.deviceId}`,
|
||||||
|
productId: data.productId,
|
||||||
|
deviceName: data.deviceName
|
||||||
|
}
|
||||||
|
xp2pInfo.value = data.xp2pInfo
|
||||||
|
await xp2pManager.startP2PService({
|
||||||
|
deviceInfo: deviceInfo.value,
|
||||||
|
xp2pInfo: xp2pInfo.value,
|
||||||
|
caller: 1
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
$basic.backAndToast(message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnload(() => {
|
||||||
|
const page = getCurrentPages().pop()
|
||||||
|
const player = page.selectComponent('#playerRef')
|
||||||
|
if (player.stopAll) {
|
||||||
|
player.stopAll()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleScreenshot = () => {
|
||||||
|
const page = getCurrentPages().pop()
|
||||||
|
const player = page.selectComponent('#playerRef')
|
||||||
|
|
||||||
|
player.snapshot().then(res => {
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: res.tempImagePath,
|
||||||
|
success: () => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '截图已保存到相册',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleHangUp = () => {
|
||||||
|
const page = getCurrentPages().pop()
|
||||||
|
const player = page.selectComponent('#playerRef')
|
||||||
|
if (player.stopAll) {
|
||||||
|
player.stopAll()
|
||||||
|
}
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleLock = () => {
|
||||||
|
console.log('handleLock')
|
||||||
|
}
|
||||||
|
|
||||||
|
const startVoice = () => {
|
||||||
|
uni.vibrateLong()
|
||||||
|
isVoice.value = true
|
||||||
|
const page = getCurrentPages().pop()
|
||||||
|
const voice = page.selectComponent('#voiceComponent')
|
||||||
|
voice.startVoice()
|
||||||
|
}
|
||||||
|
|
||||||
|
const stopVoice = () => {
|
||||||
|
isVoice.value = false
|
||||||
|
const page = getCurrentPages().pop()
|
||||||
|
const voice = page.selectComponent('#voiceComponent')
|
||||||
|
voice.stopVoice()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleStateChange = state => {
|
||||||
|
console.log(11111111, state)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.mjpg-player--iot-player) {
|
||||||
|
height: 100vh !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
29
pages/p2p/utils.js
Normal file
29
pages/p2p/utils.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
export const getUserId = () => {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
export function compareVersion(ver1, ver2) {
|
||||||
|
const v1 = ver1.split('.')
|
||||||
|
const v2 = ver2.split('.')
|
||||||
|
const len = Math.max(v1.length, v2.length)
|
||||||
|
|
||||||
|
while (v1.length < len) {
|
||||||
|
v1.push('0')
|
||||||
|
}
|
||||||
|
while (v2.length < len) {
|
||||||
|
v2.push('0')
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
const num1 = parseInt(v1[i])
|
||||||
|
const num2 = parseInt(v2[i])
|
||||||
|
|
||||||
|
if (num1 > num2) {
|
||||||
|
return 1
|
||||||
|
} else if (num1 < num2) {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
118
pages/p2p/xp2pManager.js
Normal file
118
pages/p2p/xp2pManager.js
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
import { getUserId, compareVersion } from './utils'
|
||||||
|
|
||||||
|
let xp2pManager = null
|
||||||
|
export const getXp2pManager = () => {
|
||||||
|
if (!xp2pManager) {
|
||||||
|
let xp2pPlugin = requirePlugin('xp2p')
|
||||||
|
|
||||||
|
console.log(11111, xp2pPlugin)
|
||||||
|
|
||||||
|
const iotExports = xp2pPlugin.iot
|
||||||
|
const app = getApp()
|
||||||
|
|
||||||
|
// 用户id,微信用户在此小程序中的唯一标识
|
||||||
|
iotExports?.setUserId?.(getUserId() || 'demo')
|
||||||
|
|
||||||
|
// 开发版才打插件log
|
||||||
|
if (app.pluginLogger && uni.getAccountInfoSync().miniProgram.envVersion === 'develop') {
|
||||||
|
iotExports?.setPluginLogger?.(app.pluginLogger)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置优先使用的打洞协议
|
||||||
|
if (
|
||||||
|
compareVersion(uni.getSystemInfoSync().SDKVersion, '3.4.1') >= 0 &&
|
||||||
|
xp2pPlugin.p2p.setTcpFirst
|
||||||
|
) {
|
||||||
|
const tcpFirstKey = 'tcpFirst'
|
||||||
|
const tcpFirstTime = parseInt(uni.getStorageSync(tcpFirstKey), 10)
|
||||||
|
const tcpFirst = !!(tcpFirstTime && Date.now() - tcpFirstTime < 3600000 * 24) // 24小时内有效
|
||||||
|
console.log('tcpFirst', tcpFirst)
|
||||||
|
xp2pPlugin.p2p.setTcpFirst(tcpFirst)
|
||||||
|
|
||||||
|
// 给index页用,方便测试时调整tcpFirst
|
||||||
|
app.tcpFirst = tcpFirst
|
||||||
|
app.toggleTcpFirst = async () => {
|
||||||
|
const modalRes = await uni.showModal({
|
||||||
|
title: '确定切换 tcpFirst 吗?',
|
||||||
|
content: '切换后需要重新进入小程序'
|
||||||
|
})
|
||||||
|
if (!modalRes || !modalRes.confirm) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.setStorageSync(tcpFirstKey, tcpFirst ? '' : Date.now())
|
||||||
|
app.restart()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置是否连接对端stun
|
||||||
|
if (xp2pPlugin.p2p.setCrossStunTurn) {
|
||||||
|
const crossStunTurnKey = 'crossStunTurn'
|
||||||
|
const crossStunTurnTime = parseInt(uni.getStorageSync(crossStunTurnKey), 10)
|
||||||
|
const crossStunTurn = !!(crossStunTurnTime && Date.now() - crossStunTurnTime < 3600000 * 24) // 24小时内有效
|
||||||
|
xp2pPlugin.p2p.setCrossStunTurn(crossStunTurn)
|
||||||
|
// 给index页用,方便测试时调整crossStunTurn
|
||||||
|
app.crossStunTurn = crossStunTurn
|
||||||
|
app.toggleCrossStunTurn = async () => {
|
||||||
|
const modalRes = await uni.showModal({
|
||||||
|
title: '确定切换 crossStunTurn 吗?',
|
||||||
|
content: '切换后需要重新进入小程序'
|
||||||
|
})
|
||||||
|
if (!modalRes || !modalRes.confirm) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.setStorageSync(crossStunTurnKey, crossStunTurn ? '' : Date.now())
|
||||||
|
app.restart()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置切换端口
|
||||||
|
if (xp2pPlugin.p2p.updateStunPort) {
|
||||||
|
const portKey = 'STUN_PORT'
|
||||||
|
const stunPort = uni.getStorageSync(portKey) || 20002
|
||||||
|
xp2pPlugin.p2p.updateStunPort(stunPort)
|
||||||
|
app.stunPort = stunPort
|
||||||
|
app.togglePort = async port => {
|
||||||
|
const modalRes = await uni.showModal({
|
||||||
|
title: '确定切换 stunPort 吗?',
|
||||||
|
content: '切换后需要重新进入小程序'
|
||||||
|
})
|
||||||
|
if (!modalRes || !modalRes.confirm) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.setStorageSync(portKey, port)
|
||||||
|
app.restart()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置切换配置跟随
|
||||||
|
if (xp2pPlugin.p2p.setUseDeliveryConfig) {
|
||||||
|
const useDeliveryConfigKey = 'useDeliveryConfig'
|
||||||
|
const useDeliveryConfigTime = parseInt(uni.getStorageSync(useDeliveryConfigKey), 10)
|
||||||
|
const useDeliveryConfig = !!(
|
||||||
|
useDeliveryConfigTime && Date.now() - useDeliveryConfigTime < 3600000 * 24
|
||||||
|
) // 24小时内有效
|
||||||
|
xp2pPlugin.p2p.setUseDeliveryConfig(useDeliveryConfig)
|
||||||
|
app.useDeliveryConfig = useDeliveryConfig
|
||||||
|
app.toggleUseDeliveryConfig = async () => {
|
||||||
|
const modalRes = await uni.showModal({
|
||||||
|
title: '确定切换 使用设备跟随 吗?',
|
||||||
|
content: '切换后需要重新进入小程序'
|
||||||
|
})
|
||||||
|
if (!modalRes || !modalRes.confirm) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.setStorageSync(useDeliveryConfigKey, useDeliveryConfig ? '' : Date.now())
|
||||||
|
app.restart()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xp2pManager = iotExports.getXp2pManager()
|
||||||
|
app.logger?.log('xp2pManager', {
|
||||||
|
P2PPlayerVersion: xp2pManager.P2PPlayerVersion,
|
||||||
|
XP2PVersion: xp2pManager.XP2PVersion,
|
||||||
|
// uuid,插件随机生成的id,存储在小程序本地,删除小程序后会重新生成
|
||||||
|
uuid: xp2pManager.uuid
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return xp2pManager
|
||||||
|
}
|
||||||
@ -13,9 +13,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -52,9 +52,13 @@
|
|||||||
<image
|
<image
|
||||||
class="w-40 h-40"
|
class="w-40 h-40"
|
||||||
v-if="info?.id === item.id && info?.openLockType === item.openLockType"
|
v-if="info?.id === item.id && info?.openLockType === item.openLockType"
|
||||||
src="/static/images/icon_select.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_select.png"
|
||||||
|
></image>
|
||||||
|
<image
|
||||||
|
v-else
|
||||||
|
class="w-40 h-40"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_not_select.png"
|
||||||
></image>
|
></image>
|
||||||
<image v-else class="w-40 h-40" src="/static/images/icon_not_select.png"></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
@ -233,36 +237,36 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
padding: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -270,29 +274,29 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.item-left {
|
.item-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.item-right-top {
|
.item-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right-bottom {
|
.item-right-bottom {
|
||||||
@ -316,9 +320,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<view v-if="list.length === 0">
|
<view v-if="list.length === 0">
|
||||||
<image
|
<image
|
||||||
class="w-150 h-150 transform-translate-x-[-50%] mt-300rpx mr-a mb-20rpx ml-50%"
|
class="w-150 h-150 transform-translate-x-[-50%] mt-300rpx mr-a mb-20rpx ml-50%"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="text-center text-base text-#999999">暂无数据</view>
|
<view class="text-center text-base text-#999999">暂无数据</view>
|
||||||
@ -9,9 +9,9 @@
|
|||||||
<view class="search">
|
<view class="search">
|
||||||
<up-search
|
<up-search
|
||||||
shape="square"
|
shape="square"
|
||||||
:searchIconSize="48"
|
searchIconSize="48rpx"
|
||||||
:inputStyle="{ fontSize: '32rpx' }"
|
:inputStyle="{ fontSize: '32rpx' }"
|
||||||
:height="80"
|
height="80rpx"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
:clearabled="false"
|
:clearabled="false"
|
||||||
@change="changeSearch"
|
@change="changeSearch"
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<view v-if="list.length === 0 && requestFinished">
|
<view v-if="list.length === 0 && requestFinished">
|
||||||
<image
|
<image
|
||||||
class="empty-list"
|
class="empty-list"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="empty-list-text">暂无数据</view>
|
<view class="empty-list-text">暂无数据</view>
|
||||||
@ -48,9 +48,13 @@
|
|||||||
<image
|
<image
|
||||||
class="w-40 h-40"
|
class="w-40 h-40"
|
||||||
v-if="info?.id === item.id && info?.openLockType === item.openLockType"
|
v-if="info?.id === item.id && info?.openLockType === item.openLockType"
|
||||||
src="/static/images/icon_select.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_select.png"
|
||||||
|
></image>
|
||||||
|
<image
|
||||||
|
v-else
|
||||||
|
class="w-40 h-40"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_not_select.png"
|
||||||
></image>
|
></image>
|
||||||
<image v-else class="w-40 h-40" src="/static/images/icon_not_select.png"></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
@ -297,36 +301,36 @@
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
padding: 32rpx;
|
|
||||||
width: 686rpx !important;
|
width: 686rpx !important;
|
||||||
|
padding: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 20rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
.button-reset {
|
.button-reset {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #df282d;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #df282d;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-create {
|
.button-create {
|
||||||
margin-left: 50rpx;
|
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
background-color: #63b8af;
|
margin-left: 50rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 88rpx;
|
background-color: #63b8af;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -334,29 +338,29 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
|
||||||
height: 120rpx;
|
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
|
||||||
.item-left {
|
.item-left {
|
||||||
margin-left: 32rpx;
|
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right {
|
.item-right {
|
||||||
|
width: 574rpx;
|
||||||
margin-right: 32rpx;
|
margin-right: 32rpx;
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
width: 574rpx;
|
|
||||||
|
|
||||||
.item-right-top {
|
.item-right-top {
|
||||||
max-width: 400rpx;
|
max-width: 400rpx;
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6rpx;
|
padding-bottom: 6rpx;
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-right-bottom {
|
.item-right-bottom {
|
||||||
@ -380,9 +384,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-list-text {
|
.empty-list-text {
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
@ -54,7 +54,7 @@
|
|||||||
import { updateLockSettingRequest } from '@/api/setting'
|
import { updateLockSettingRequest } from '@/api/setting'
|
||||||
import { useBluetoothStore } from '@/stores/bluetooth'
|
import { useBluetoothStore } from '@/stores/bluetooth'
|
||||||
import { useUserStore } from '@/stores/user'
|
import { useUserStore } from '@/stores/user'
|
||||||
import { useBasicStore } from '../../stores/basic'
|
import { useBasicStore } from '@/stores/basic'
|
||||||
|
|
||||||
const $basic = useBasicStore()
|
const $basic = useBasicStore()
|
||||||
const $bluetooth = useBluetoothStore()
|
const $bluetooth = useBluetoothStore()
|
||||||
@ -2,19 +2,23 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="mx-4 pt-5 text-base">
|
<view class="mx-4 pt-5 text-base">
|
||||||
<view class="font-bold">请谨慎选择您家的开门方向(如果选择错误,将无法正常开关门):</view>
|
<view class="font-bold">请谨慎选择您家的开门方向(如果选择错误,将无法正常开关门):</view>
|
||||||
<image src="/static/images/icon_open_direction.png" mode="widthFix" class="w-full"></image>
|
<image
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_open_direction.png"
|
||||||
|
mode="widthFix"
|
||||||
|
class="w-full"
|
||||||
|
></image>
|
||||||
<view class="flex items-center justify-between mx-10 mt-8">
|
<view class="flex items-center justify-between mx-10 mt-8">
|
||||||
<view @click="updateValue(1)" class="flex items-center">
|
<view @click="updateValue(1)" class="flex items-center">
|
||||||
<image
|
<image
|
||||||
class="w-40 h-40"
|
class="w-40 h-40"
|
||||||
v-if="value === 1"
|
v-if="value === 1"
|
||||||
src="/static/images/icon_select.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_select.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<image
|
<image
|
||||||
class="w-40 h-40"
|
class="w-40 h-40"
|
||||||
v-else
|
v-else
|
||||||
src="/static/images/icon_not_select.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_not_select.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="ml-2">左开</view>
|
<view class="ml-2">左开</view>
|
||||||
@ -23,13 +27,13 @@
|
|||||||
<image
|
<image
|
||||||
v-if="value === 2"
|
v-if="value === 2"
|
||||||
class="w-40 h-40"
|
class="w-40 h-40"
|
||||||
src="/static/images/icon_select.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_select.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<image
|
<image
|
||||||
class="w-40 h-40"
|
class="w-40 h-40"
|
||||||
v-else
|
v-else
|
||||||
src="/static/images/icon_not_select.png"
|
src="https://oss-lock.xhjcn.ltd/mp/icon_not_select.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="ml-2">右开</view>
|
<view class="ml-2">右开</view>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<view v-if="list.length === 0">
|
<view v-if="list.length === 0">
|
||||||
<image
|
<image
|
||||||
class="w-150 h-150 transform-translate-x-[-50%] mt-300rpx mr-a mb-20rpx ml-50%"
|
class="w-150 h-150 transform-translate-x-[-50%] mt-300rpx mr-a mb-20rpx ml-50%"
|
||||||
src="/static/images/background_empty_list.png"
|
src="https://oss-lock.xhjcn.ltd/mp/background_empty_list.png"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<view class="text-center text-base text-#999999">暂无数据</view>
|
<view class="text-center text-base text-#999999">暂无数据</view>
|
||||||
@ -37,8 +37,16 @@
|
|||||||
<view class="ml-a">
|
<view class="ml-a">
|
||||||
<view class="flex items-center" @click="isAllDay = isAllDay === 1 ? 0 : 1">
|
<view class="flex items-center" @click="isAllDay = isAllDay === 1 ? 0 : 1">
|
||||||
<view class="mr-2">全天</view>
|
<view class="mr-2">全天</view>
|
||||||
<image class="w-40 h-40" v-if="isAllDay" src="/static/images/icon_select.png"></image>
|
<image
|
||||||
<image v-else class="w-40 h-40" src="/static/images/icon_not_select.png"></image>
|
class="w-40 h-40"
|
||||||
|
v-if="isAllDay"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_select.png"
|
||||||
|
></image>
|
||||||
|
<image
|
||||||
|
v-else
|
||||||
|
class="w-40 h-40"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_not_select.png"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -6,7 +6,11 @@
|
|||||||
<view>头像</view>
|
<view>头像</view>
|
||||||
<view class="view-button" style="padding: 0">
|
<view class="view-button" style="padding: 0">
|
||||||
<image class="avatar" :src="userInfo.headUrl" mode="aspectFill"></image>
|
<image class="avatar" :src="userInfo.headUrl" mode="aspectFill"></image>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</label>
|
</label>
|
||||||
@ -15,7 +19,11 @@
|
|||||||
<view>昵称</view>
|
<view>昵称</view>
|
||||||
<view class="view-button" style="padding: 20rpx 0">
|
<view class="view-button" style="padding: 20rpx 0">
|
||||||
<view class="name-info">{{ userInfo.nickname }}</view>
|
<view class="name-info">{{ userInfo.nickname }}</view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-line"></view>
|
<view class="view-line"></view>
|
||||||
@ -25,7 +33,11 @@
|
|||||||
<view class="view-button" style="padding: 0">
|
<view class="view-button" style="padding: 0">
|
||||||
<view v-if="userInfo.mobile !== ''" class="info">{{ userInfo.mobile }}</view>
|
<view v-if="userInfo.mobile !== ''" class="info">{{ userInfo.mobile }}</view>
|
||||||
<view v-else class="red-dot"></view>
|
<view v-else class="red-dot"></view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</label>
|
</label>
|
||||||
@ -35,13 +47,21 @@
|
|||||||
<view class="view-button" style="padding: 0">
|
<view class="view-button" style="padding: 0">
|
||||||
<view v-if="userInfo.email !== ''" class="info">{{ userInfo.email }}</view>
|
<view v-if="userInfo.email !== ''" class="info">{{ userInfo.email }}</view>
|
||||||
<view v-else class="red-dot"></view>
|
<view v-else class="red-dot"></view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-line"></view>
|
<view class="view-line"></view>
|
||||||
<view class="view-button" @click="toUpdatePassword">
|
<view class="view-button" @click="toUpdatePassword">
|
||||||
<view>重置密码</view>
|
<view>重置密码</view>
|
||||||
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
|
<image
|
||||||
|
class="icon-arrow"
|
||||||
|
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-line"></view>
|
<view class="view-line"></view>
|
||||||
<view class="view-button">
|
<view class="view-button">
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 527 B |
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user