Merge branch 'master' of http://gitea.bugtc.com/zhouyanli/property-manager-side
This commit is contained in:
@@ -1,15 +1,32 @@
|
|||||||
<script>
|
<script setup>
|
||||||
export default {
|
import { onLaunch } from '@dcloudio/uni-app'
|
||||||
onLaunch: function () {
|
|
||||||
console.log('App Launch')
|
// 应用启动时执行
|
||||||
},
|
onLaunch(() => {
|
||||||
onShow: function () {
|
console.log('App 启动')
|
||||||
console.log('App Show')
|
|
||||||
},
|
// #ifdef APP-PLUS
|
||||||
onHide: function () {
|
// 只有 App 平台才获取 CID
|
||||||
console.log('App Hide')
|
getPushCID()
|
||||||
|
// #endif
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取 uniPush 2.0 CID
|
||||||
|
function getPushCID() {
|
||||||
|
uni.getPushClientId({
|
||||||
|
success: (res) => {
|
||||||
|
console.log('推送初始化成功')
|
||||||
|
console.log('CID =', res.cid)
|
||||||
|
|
||||||
|
// 存起来备用
|
||||||
|
uni.setStorageSync('push_cid', res.cid)
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('获取推送 CID 失败', err)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
"versionName": "1.0.0",
|
"versionName": "1.0.0",
|
||||||
"versionCode": "100",
|
"versionCode": "100",
|
||||||
"transformPx": false,
|
"transformPx": false,
|
||||||
/* 5+App特有相关 */
|
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"usingComponents": true,
|
"usingComponents": true,
|
||||||
"nvueStyleCompiler": "uni-app",
|
"nvueStyleCompiler": "uni-app",
|
||||||
@@ -14,17 +13,15 @@
|
|||||||
"alwaysShowBeforeRender": true,
|
"alwaysShowBeforeRender": true,
|
||||||
"waiting": true,
|
"waiting": true,
|
||||||
"autoclose": true,
|
"autoclose": true,
|
||||||
"delay": 0
|
"delay": 0,
|
||||||
|
"useOriginalMsgbox": true
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
|
||||||
"modules": {
|
"modules": {
|
||||||
"Geolocation": {},
|
"Geolocation": {},
|
||||||
"Camera": {},
|
"Camera": {},
|
||||||
"Push": {}
|
"Push": {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
|
||||||
"distribute": {
|
"distribute": {
|
||||||
/* android打包配置 */
|
|
||||||
"android": {
|
"android": {
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
@@ -44,11 +41,19 @@
|
|||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
|
||||||
"ios": {
|
"ios": {
|
||||||
"dSYMs": false
|
"dSYMs": false,
|
||||||
|
"privacyDescription": {
|
||||||
|
"NSPhotoLibraryUsageDescription": "需要访问相册选择图片",
|
||||||
|
"NSPhotoLibraryAddUsageDescription": "需要保存图片到相册",
|
||||||
|
"NSCameraUsageDescription": "需要使用摄像头进行扫码/拍照",
|
||||||
|
"NSLocationWhenInUseUsageDescription": "需要获取位置信息",
|
||||||
|
"NSLocationAlwaysAndWhenInUseUsageDescription": "需要获取位置信息"
|
||||||
|
},
|
||||||
|
"urltypes": [{
|
||||||
|
"urlschemes": ["unionpaycashier"]
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
|
||||||
"sdkConfigs": {
|
"sdkConfigs": {
|
||||||
"push": {
|
"push": {
|
||||||
"unipush": {
|
"unipush": {
|
||||||
@@ -68,15 +73,10 @@
|
|||||||
"__platform__": ["ios", "android"]
|
"__platform__": ["ios", "android"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"splashscreen": {
|
|
||||||
"useOriginalMsgbox": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
|
||||||
"quickapp": {},
|
"quickapp": {},
|
||||||
/* 小程序特有相关 */
|
|
||||||
"mp-weixin": {
|
"mp-weixin": {
|
||||||
"appid": "wx40625124315d2de1",
|
"appid": "wx40625124315d2de1",
|
||||||
"usingComponents": true,
|
"usingComponents": true,
|
||||||
@@ -98,5 +98,3 @@
|
|||||||
"locale": "zh-Hans",
|
"locale": "zh-Hans",
|
||||||
"fallbackLocale": "zh-Hans"
|
"fallbackLocale": "zh-Hans"
|
||||||
}
|
}
|
||||||
/* ios打包配置 */
|
|
||||||
/* SDK配置 */
|
|
||||||
|
|||||||
@@ -208,10 +208,12 @@ const handleLogin = () => {
|
|||||||
title: '登录中...',
|
title: '登录中...',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
|
const push_cid = uni.getStorageSync('push_cid')
|
||||||
let params = {
|
let params = {
|
||||||
phone: phoneNumber.value,
|
phone: phoneNumber.value,
|
||||||
smsCode: verifyCode.value,
|
smsCode: verifyCode.value,
|
||||||
scene: 'butler_login'
|
scene: 'butler_login',
|
||||||
|
cid:push_cid
|
||||||
}
|
}
|
||||||
getLoginBySms(params)
|
getLoginBySms(params)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 记住密码 -->
|
<!-- 记住密码 -->
|
||||||
<view class="remember-wrap">
|
<view class="remember-wrap" style="display: none;">
|
||||||
<view class="remember-item" @click="toggleRemember">
|
<view class="remember-item" @click="toggleRemember">
|
||||||
<uni-icons type="checkbox-filled" size="18" color="#4D5DFA" v-if="rememberPwd"></uni-icons>
|
<uni-icons type="checkbox-filled" size="18" color="#4D5DFA" v-if="rememberPwd"></uni-icons>
|
||||||
<uni-icons type="checkbox" size="18" color="#999" v-else></uni-icons>
|
<uni-icons type="checkbox" size="18" color="#999" v-else></uni-icons>
|
||||||
@@ -150,9 +150,12 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uni.showLoading({ title: '登录中...', mask: true });
|
uni.showLoading({ title: '登录中...', mask: true });
|
||||||
|
const push_cid = uni.getStorageSync('push_cid')
|
||||||
|
// console.log('cid',push_cid)
|
||||||
let params = {
|
let params = {
|
||||||
username:phoneNumber.value,
|
username:phoneNumber.value,
|
||||||
password:password.value
|
password:password.value,
|
||||||
|
cid:push_cid
|
||||||
}
|
}
|
||||||
getLoginPassword(params).then(res =>{
|
getLoginPassword(params).then(res =>{
|
||||||
// console.log('33333',res)
|
// console.log('33333',res)
|
||||||
|
|||||||
@@ -219,12 +219,14 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
transition: all 0.25s ease;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.community-item.active {
|
.community-item.active {
|
||||||
background-color: #F5FAFF;
|
background-color: #F5FAFF;
|
||||||
border: 1px solid #2F77FD;
|
border: 1px solid #2F77FD;
|
||||||
transform: translateY(2rpx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.community-item-left {
|
.community-item-left {
|
||||||
|
|||||||
@@ -107,7 +107,15 @@ const openDoor = () => {
|
|||||||
const device = doorList.value[selectedDoor.value]
|
const device = doorList.value[selectedDoor.value]
|
||||||
if (!device) return
|
if (!device) return
|
||||||
|
|
||||||
uni.showLoading({ title: '开门中...' })
|
uni.showToast({
|
||||||
|
title: '正在对接硬件中...',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
function getSwitchOpen(){
|
||||||
|
uni.showLoading({ title: '开门中...',mask:true })
|
||||||
switchOpenDoor({ deviceId: device.id }).then(res => {
|
switchOpenDoor({ deviceId: device.id }).then(res => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@@ -119,6 +127,7 @@ const openDoor = () => {
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({ title: err.msg || '开门失败', icon: 'none' })
|
uni.showToast({ title: err.msg || '开门失败', icon: 'none' })
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -305,6 +305,7 @@ const slelctHomeData = data => {
|
|||||||
}
|
}
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getbannarData()
|
getbannarData()
|
||||||
|
getInspectionData()
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user