Commit 9069c103 by wjd

Merge branch 'zjx' into 'debug'

Zjx

See merge request iot-project-js/doorlock!15
parents 27b41355 08fc04d6
...@@ -24,5 +24,14 @@ ...@@ -24,5 +24,14 @@
<arguments>1.0-name-matches-false-false-node_modules</arguments> <arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher> </matcher>
</filter> </filter>
<filter>
<id>1514974720847</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher>
</filter>
</filteredResources> </filteredResources>
</projectDescription> </projectDescription>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"iscroll": "5.2.0", "iscroll": "5.2.0",
"moment": "^2.18.1", "moment": "^2.18.1",
"qrcode": "^0.9.0", "qrcode": "^0.9.0",
"ugen-components": "^0.2.4", "ugen-components": "^0.3.1",
"underscore": "1.8.3", "underscore": "1.8.3",
"vue": "2.2.6", "vue": "2.2.6",
"vue-i18n": "5.0.3", "vue-i18n": "5.0.3",
......
{ {
"loading": "loading...", "loading": "loading...",
"scroll": { "scroll": {
"clickToLoadMore": "点击加载更多", "clickToLoadMore": "上拉加载更多",
"loading": "loading..." "loading": "loading"
}, },
"btn": { "btn": {
"confirm": "确定", "confirm": "确定",
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
"connect": "连接", "connect": "连接",
"bindUser": "绑定姓名", "bindUser": "绑定姓名",
"bind": "我要绑定", "bind": "我要绑定",
"reBound": "请重新绑定", "startNow": "立即体验",
"ignore": "暂不开启",
"openNotify": "开启推送通知",
"reBound": "重新绑定",
"saveQRcode": "保存二维码到相册", "saveQRcode": "保存二维码到相册",
"unbind": "解绑", "unbind": "解绑",
"deleteUser": "删除该用户", "deleteUser": "删除该用户",
...@@ -25,7 +28,8 @@ ...@@ -25,7 +28,8 @@
"add": "添加", "add": "添加",
"next": "下一步", "next": "下一步",
"iSee": "我知道了", "iSee": "我知道了",
"unbindDoorlock": "解绑门锁" "unbindDoorlock": "解绑门锁",
"finish": "完成"
}, },
"dialog":{ "dialog":{
"confirm": "确认", "confirm": "确认",
...@@ -111,7 +115,8 @@ ...@@ -111,7 +115,8 @@
"doorLockRinging": "门铃响了", "doorLockRinging": "门铃响了",
"defaultNewMsg": "您尚未绑定门锁", "defaultNewMsg": "您尚未绑定门锁",
"noNewMsg": "门锁休息中", "noNewMsg": "门锁休息中",
"bindDoorlock": "绑定门锁" "bindDoorlock": "绑定门锁",
"use": "使用"
}, },
"opendoorRecord":{ "opendoorRecord":{
"noRecordTip": "暂无记录", "noRecordTip": "暂无记录",
...@@ -149,12 +154,11 @@ ...@@ -149,12 +154,11 @@
"logoutDialogTip": "确定要退出系统吗?", "logoutDialogTip": "确定要退出系统吗?",
"defaultNickname": "门锁", "defaultNickname": "门锁",
"isClearRecord": "清除所有信息", "isClearRecord": "清除所有信息",
"unbindSuccess": "解绑成功",
"doorbellMsgPush": "门铃消息推送", "doorbellMsgPush": "门铃消息推送",
"alarmMsgPush": "报警消息推送", "alarmMsgPush": "报警消息推送",
"opendoorMsgPush": "开门消息推送", "opendoorMsgPush": "开门消息推送",
"unbindDialogTip": "确认解除绑定", "unbindDialogTip": "确认解除绑定",
"unbindSuccess": "解绑成功", "unbindSuccess": "<span></span>解绑成功",
"unbindFailue": "解绑失败" "unbindFailue": "解绑失败"
}, },
"editName":{ "editName":{
...@@ -180,18 +184,18 @@ ...@@ -180,18 +184,18 @@
"bindFailure": "绑定失败", "bindFailure": "绑定失败",
"reBindDevice": "请重新绑定" "reBindDevice": "请重新绑定"
}, },
"wifiAddHelp": { "wifiAddHelp": {
"helpTitle": "配置WIFI说明:", "helpTitle": "配置WIFI说明:",
"helpCont1": "1.确认设备端进入配网模式(详情操作请见产品说明书)", "helpCont1": "确认设备端进入配网模式(详情操作请见产品说明书)",
"helpCont2": "2.点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面", "helpCont2": "点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面",
"helpCont3": "3.输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。", "helpCont3": "输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。",
"helpCont4": "(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)" "helpCont4": "(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)"
}, },
"wifiAdd": { "wifiAdd": {
"unbindWifiTip": "当前无Wi-Fi", "unbindWifiTip": "当前无Wi-Fi",
"wifiBinding": "配网中", "wifiBinding": "配网中",
"wifiBindSuccess": "配网成功,请激活设备", "wifiBindSuccess": "Wi-Fi连接成功,正在激活设备",
"deviceActivating": "设备激活中", "deviceActivating": "Wi-Fi连接成功,正在激活设备",
"deviceActivateSuccess":"激活成功", "deviceActivateSuccess":"激活成功",
"deviceActivateFailure":"激活失败", "deviceActivateFailure":"激活失败",
"bindTimeout":"连接超时", "bindTimeout":"连接超时",
...@@ -199,6 +203,7 @@ ...@@ -199,6 +203,7 @@
"remindTitle": "配置Wi-Fi提醒:", "remindTitle": "配置Wi-Fi提醒:",
"remindCont1": "1. 请确保Wi-Fi信号良好", "remindCont1": "1. 请确保Wi-Fi信号良好",
"remindCont2": "2. 本产品暂不支持5GHz无线网络", "remindCont2": "2. 本产品暂不支持5GHz无线网络",
"noticeTip": "检测到您还未开启通知,将无法及时<br>接收安全推送",
"error": { "error": {
} }
...@@ -271,10 +276,11 @@ ...@@ -271,10 +276,11 @@
}, },
"inviteBind":{ "inviteBind":{
"qrcodeExpireTip": "二维码已过期,请重新生成", "qrcodeExpireTip": "二维码已过期,请重新生成",
"title": "注意事项:", "title": "绑定方法:",
"cont1": "1.被邀请的用户选择添加设备页面中的扫二维码方式进行添加门锁", "cont1": "受邀用户登录“U智锁”APP",
"cont2": "2.长按二维码保存为图片,发送给被邀请用户,用户通过长按识别二维码", "cont2": "选择“扫描绑定设备”",
"cont3": "3.有效时间10分钟,失效后请点击“重新生成二维码" "cont3": "扫描上方二维码完成绑定",
"tip": "注: 二维码有效时间为10分钟,过期请重新生成"
}, },
"unlockInfo":{ "unlockInfo":{
"bindUnlockInfo": "已关联的开锁信息", "bindUnlockInfo": "已关联的开锁信息",
...@@ -337,5 +343,44 @@ ...@@ -337,5 +343,44 @@
"deviceList":{ "deviceList":{
"model": "型号:", "model": "型号:",
"noDeviceTip": "暂无产品型号" "noDeviceTip": "暂无产品型号"
} },
"notice":{
"tip": "您还未开启通知,将无法及时接受安全推送!",
"button": "去开启"
},
"help": {
"title": "如何解决安卓手机收不到消息提醒?",
"contTip": "因部分安卓系统会在锁屏时自动清理后台运行的应用导致无法及时通知,需根据引导进行以下设置后即可随时随地收到消息推送。",
"contTitle": "如何设置:",
"contSubtitle1": "1.设置自启动",
"contText1-1": "安卓5.0以上系统需要设置应用自启动,未加入自启动的应用在杀进程或重新开机后无法推送通知。",
"contText1-2": "在软件授权管理或启动管理中(通常在手机管家或设置菜单中)找到本app并开启自启动。",
"step": "操作步骤:",
"contSubtitle2": "2.设置后台保活",
"contText2-1": "安卓7.0以上系统需要设置受保护的后台应用,未设置的应用在设备进入睡眠后会自动杀掉,只有手动开启应用才能恢复消息推送。",
"contText2-2": "在设置中找到电量与性能,点击受保护的后台应用,找到本app并开启保护。",
"contText3-1": "安卓手机须将应用加入白名单中,否则清理后台杀掉应用进程后,只有手动开启应用才能恢复消息推送。",
"contText3-2": "启动本app后打开多任务页面(清理后台应用的页面),将本app加入白名单。"
},
"androidNotify":{
"toSettingTitle":"开启系统通知",
"toSettingsub":"去开启",
"checkSetting":"检查Android系统设置",
"IKonw":"我已阅读",
"checkSettingsubTitle":"部分安卓系统的手机在开启通知后仍无法收到推送信息,您可以依次检查以下几项设置",
"step1Title":"1. 应用是否设置为自启动状态",
"step1content":"操作步骤:在软件授权管理或启动管理中(通常在手机管家或设置菜单中)找到本APP并开启自启动。",
"step2Title":"2. 应用是否已开启后台保护",
"step2content":"操作步骤:在设置中找到电量与性能,点击受保护的后台应用,找到本APP并开启保护。",
"step3Title":"3. 是否已将应用加入系统白名单",
"step3content":"操作步骤:启动本APP后打开多任务页面(清理后台应用的页面),将本APP加入白名单。",
"endSetting":"保存设置并开启应用",
"toIndex":"进入首页"
},
"newFeature":{
"newVersion":"您有新的版本更新",
"tip": "版本更新",
"update":"更新",
"miss": "暂不更新"
}
} }
\ No newline at end of file
{ {
"loading": "loading...", "loading": "loading...",
"scroll": { "scroll": {
"clickToLoadMore": "点击加载更多", "clickToLoadMore": "上拉加载更多",
"loading": "loading..." "loading": "loading"
}, },
"btn": { "btn": {
"confirm": "确定", "confirm": "确定",
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
"connect": "连接", "connect": "连接",
"bindUser": "绑定姓名", "bindUser": "绑定姓名",
"bind": "我要绑定", "bind": "我要绑定",
"reBound": "请重新绑定", "startNow": "立即体验",
"ignore": "暂不开启",
"openNotify": "开启推送通知",
"reBound": "重新绑定",
"saveQRcode": "保存二维码到相册", "saveQRcode": "保存二维码到相册",
"unbind": "解绑", "unbind": "解绑",
"deleteUser": "删除该用户", "deleteUser": "删除该用户",
...@@ -25,7 +28,8 @@ ...@@ -25,7 +28,8 @@
"add": "添加", "add": "添加",
"next": "下一步", "next": "下一步",
"iSee": "我知道了", "iSee": "我知道了",
"unbindDoorlock": "解绑门锁" "unbindDoorlock": "解绑门锁",
"finish": "完成"
}, },
"dialog":{ "dialog":{
"confirm": "确认", "confirm": "确认",
...@@ -111,7 +115,8 @@ ...@@ -111,7 +115,8 @@
"doorLockRinging": "门铃响了", "doorLockRinging": "门铃响了",
"defaultNewMsg": "您尚未绑定门锁", "defaultNewMsg": "您尚未绑定门锁",
"noNewMsg": "门锁休息中", "noNewMsg": "门锁休息中",
"bindDoorlock": "绑定门锁" "bindDoorlock": "绑定门锁",
"use": "使用"
}, },
"opendoorRecord":{ "opendoorRecord":{
"noRecordTip": "暂无记录", "noRecordTip": "暂无记录",
...@@ -149,12 +154,11 @@ ...@@ -149,12 +154,11 @@
"logoutDialogTip": "确定要退出系统吗?", "logoutDialogTip": "确定要退出系统吗?",
"defaultNickname": "门锁", "defaultNickname": "门锁",
"isClearRecord": "清除所有信息", "isClearRecord": "清除所有信息",
"unbindSuccess": "解绑成功",
"doorbellMsgPush": "门铃消息推送", "doorbellMsgPush": "门铃消息推送",
"alarmMsgPush": "报警消息推送", "alarmMsgPush": "报警消息推送",
"opendoorMsgPush": "开门消息推送", "opendoorMsgPush": "开门消息推送",
"unbindDialogTip": "确认解除绑定", "unbindDialogTip": "确认解除绑定",
"unbindSuccess": "解绑成功", "unbindSuccess": "<span></span>解绑成功",
"unbindFailue": "解绑失败" "unbindFailue": "解绑失败"
}, },
"editName":{ "editName":{
...@@ -180,18 +184,18 @@ ...@@ -180,18 +184,18 @@
"bindFailure": "绑定失败", "bindFailure": "绑定失败",
"reBindDevice": "请重新绑定" "reBindDevice": "请重新绑定"
}, },
"wifiAddHelp": { "wifiAddHelp": {
"helpTitle": "配置WIFI说明:", "helpTitle": "配置WIFI说明:",
"helpCont1": "1.确认设备端进入配网模式(详情操作请见产品说明书)", "helpCont1": "确认设备端进入配网模式(详情操作请见产品说明书)",
"helpCont2": "2.点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面", "helpCont2": "点击页面下方“开始配置Wi-Fi”按钮,进入WiFi配网页面",
"helpCont3": "3.输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。", "helpCont3": "输入Wi-Fi密码,点击“连接”,等待锁端响应,至配网成功。",
"helpCont4": "(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)" "helpCont4": "(提示:如果指纹锁已经绑定过用户,重新绑定成功后会清除之前所有绑定信息)"
}, },
"wifiAdd": { "wifiAdd": {
"unbindWifiTip": "当前无Wi-Fi", "unbindWifiTip": "当前无Wi-Fi",
"wifiBinding": "配网中", "wifiBinding": "配网中",
"wifiBindSuccess": "配网成功,请激活设备", "wifiBindSuccess": "Wi-Fi连接成功,正在激活设备",
"deviceActivating": "设备激活中", "deviceActivating": "Wi-Fi连接成功,正在激活设备",
"deviceActivateSuccess":"激活成功", "deviceActivateSuccess":"激活成功",
"deviceActivateFailure":"激活失败", "deviceActivateFailure":"激活失败",
"bindTimeout":"连接超时", "bindTimeout":"连接超时",
...@@ -199,6 +203,7 @@ ...@@ -199,6 +203,7 @@
"remindTitle": "配置Wi-Fi提醒:", "remindTitle": "配置Wi-Fi提醒:",
"remindCont1": "1. 请确保Wi-Fi信号良好", "remindCont1": "1. 请确保Wi-Fi信号良好",
"remindCont2": "2. 本产品暂不支持5GHz无线网络", "remindCont2": "2. 本产品暂不支持5GHz无线网络",
"noticeTip": "检测到您还未开启通知,将无法及时<br>接收安全推送",
"error": { "error": {
} }
...@@ -271,10 +276,11 @@ ...@@ -271,10 +276,11 @@
}, },
"inviteBind":{ "inviteBind":{
"qrcodeExpireTip": "二维码已过期,请重新生成", "qrcodeExpireTip": "二维码已过期,请重新生成",
"title": "注意事项:", "title": "绑定方法:",
"cont1": "1.被邀请的用户选择添加设备页面中的扫二维码方式进行添加门锁", "cont1": "受邀用户登录“U智锁”APP",
"cont2": "2.长按二维码保存为图片,发送给被邀请用户,用户通过长按识别二维码", "cont2": "选择“扫描绑定设备”",
"cont3": "3.有效时间10分钟,失效后请点击“重新生成二维码" "cont3": "扫描上方二维码完成绑定",
"tip": "注: 二维码有效时间为10分钟,过期请重新生成"
}, },
"unlockInfo":{ "unlockInfo":{
"bindUnlockInfo": "已关联的开锁信息", "bindUnlockInfo": "已关联的开锁信息",
...@@ -337,5 +343,44 @@ ...@@ -337,5 +343,44 @@
"deviceList":{ "deviceList":{
"model": "型号:", "model": "型号:",
"noDeviceTip": "暂无产品型号" "noDeviceTip": "暂无产品型号"
} },
"notice":{
"tip": "您还未开启通知,将无法及时接受安全推送!",
"button": "去开启"
},
"help": {
"title": "如何解决安卓手机收不到消息提醒?",
"contTip": "因部分安卓系统会在锁屏时自动清理后台运行的应用导致无法及时通知,需根据引导进行以下设置后即可随时随地收到消息推送。",
"contTitle": "如何设置:",
"contSubtitle1": "1.设置自启动",
"contText1-1": "安卓5.0以上系统需要设置应用自启动,未加入自启动的应用在杀进程或重新开机后无法推送通知。",
"contText1-2": "在软件授权管理或启动管理中(通常在手机管家或设置菜单中)找到本app并开启自启动。",
"step": "操作步骤:",
"contSubtitle2": "2.设置后台保活",
"contText2-1": "安卓7.0以上系统需要设置受保护的后台应用,未设置的应用在设备进入睡眠后会自动杀掉,只有手动开启应用才能恢复消息推送。",
"contText2-2": "在设置中找到电量与性能,点击受保护的后台应用,找到本app并开启保护。",
"contText3-1": "安卓手机须将应用加入白名单中,否则清理后台杀掉应用进程后,只有手动开启应用才能恢复消息推送。",
"contText3-2": "启动本app后打开多任务页面(清理后台应用的页面),将本app加入白名单。"
},
"androidNotify":{
"toSettingTitle":"开启系统通知",
"toSettingsub":"去开启",
"checkSetting":"检查Android系统设置",
"IKonw":"我已阅读",
"checkSettingsubTitle":"部分安卓系统的手机在开启通知后仍无法收到推送信息,您可以依次检查以下几项设置",
"step1Title":"1. 应用是否设置为自启动状态",
"step1content":"操作步骤:在软件授权管理或启动管理中(通常在手机管家或设置菜单中)找到本APP并开启自启动。",
"step2Title":"2. 应用是否已开启后台保护",
"step2content":"操作步骤:在设置中找到电量与性能,点击受保护的后台应用,找到本APP并开启保护。",
"step3Title":"3. 是否已将应用加入系统白名单",
"step3content":"操作步骤:启动本APP后打开多任务页面(清理后台应用的页面),将本APP加入白名单。",
"endSetting":"保存设置并开启应用",
"toIndex":"进入首页"
},
"newFeature":{
"newVersion":"您有新的版本更新",
"tip": "版本更新",
"update":"更新",
"miss": "暂不更新"
}
} }
\ No newline at end of file
...@@ -26,17 +26,17 @@ export default { ...@@ -26,17 +26,17 @@ export default {
}, },
"model": "USMARTLOCK_SECURITY_SMARTDOOR_SMART_LOCK", "model": "USMARTLOCK_SECURITY_SMARTDOOR_SMART_LOCK",
"GET_MSG_INTERVAL": 5000, "GET_MSG_INTERVAL": 5000,
"wifi_add_timeout": 300000, "wifi_add_timeout": 150000,
//门铃晃动间隔时间 //门铃晃动间隔时间
"await_time": 5000, "await_time": 3000,
//门铃晃动次数 //门铃晃动次数
"shake_times": 5, "shake_times": 3,
//门锁晃动总时间 //门锁晃动总时间
"ring_time": 30000, "ring_time": 12000,
"remote_opendoor_timeout": 30000, "remote_opendoor_timeout": 30000,
//二维码失效时间 //二维码失效时间
"qrcode_timeout": 600000, "qrcode_timeout": 600000,
"remote_timeout": 300, "remote_timeout": 120,
"input":{ "input":{
"maxlength": 16 "maxlength": 16
}, },
......
export default { export default {
"url": "https://cloud.iot.u-gen.net/test-openapi/", "url": "http://192.168.2.96:20000",
"model": "UGEN_SECURITY_SMARTDOOR_YJ2017" "model": "USMARTLOCK_SECURITY_SMARTDOOR_SMART_LOCK"
} }
\ No newline at end of file
import androidNotify from '../view/c_android-notify.vue';
import gridList from '../view/c_grid-list.vue'; import gridList from '../view/c_grid-list.vue';
import timeline from '../view/c_timeline.vue'; import timeline from '../view/c_timeline.vue';
import updateApp from '../view/c_update-app.vue';
var components = { var components = {
'android-notify': androidNotify,
'grid-list': gridList, 'grid-list': gridList,
'timeline': timeline 'timeline': timeline,
'update-app': updateApp
}; };
export default components; export default components;
\ No newline at end of file
import config from './config.js'; import config from './config.js';
import VueI18n from 'vue-i18n'; import VueI18n from 'vue-i18n';
import defaultConfig from './defaultConfig.js'; import defaultConfig from './defaultConfig';
var VueTouch = require('vue-touch'); var VueTouch = require('vue-touch');
Vue.use(VueTouch); Vue.use(VueTouch);
...@@ -20,11 +20,11 @@ const iot = new UIOT({ ...@@ -20,11 +20,11 @@ const iot = new UIOT({
cloud: { cloud: {
// url: 'http://wx.iotface.com' // url: 'http://wx.iotface.com'
//96环境 //96环境
// url: 'http://192.168.2.96:20000' url: defaultConfig.url
//96外网 //96外网
// url: 'http://jycinema.u-gen.net' // url: 'http://jycinema.u-gen.net'
//正式 //正式
url: defaultConfig.url // url: 'https://cloud.iot.u-gen.net/'
//正式测试 //正式测试
// url: 'https://cloud.iot.u-gen.net/test-openapi/' // url: 'https://cloud.iot.u-gen.net/test-openapi/'
}, },
...@@ -46,7 +46,7 @@ uPublic.recalc = function () { ...@@ -46,7 +46,7 @@ uPublic.recalc = function () {
recalc = function () { recalc = function () {
var clientWidth = docEl.clientWidth; var clientWidth = docEl.clientWidth;
if (!clientWidth) return; if (!clientWidth) return;
docEl.style.fontSize = clientWidth / 10 + 'px'; docEl.style.fontSize = parseInt(clientWidth / 10, 10) + 'px';
}; };
window.addEventListener(resizeEvt, recalc, false); window.addEventListener(resizeEvt, recalc, false);
recalc(); recalc();
...@@ -148,6 +148,42 @@ uPublic.logout = function(opts){ ...@@ -148,6 +148,42 @@ uPublic.logout = function(opts){
}); });
} }
// 更新缓存中history存储的isReadFlag 和 time
uPublic.upDateRead = async function(key, time){
let oldHistory = {
alarm: {
time: null,
isReadFlag: true
},
notify: {
time: null,
isReadFlag: true
},
open: {
time: null,
isReadFlag: true
}
};
try{
let history = await iot.storage.getMap('history');
oldHistory = history ? history : oldHistory;
console.log(oldHistory);
}
catch (error){
console.log(error);
}
let newHistory = oldHistory;
newHistory[key].isReadFlag = true;
newHistory[key].time = time;
let flag = await iot.storage.setMap('history', newHistory);
if(flag){
return false;
}
}
iot.ready(() => { iot.ready(() => {
uPublic.recalc(); uPublic.recalc();
}); });
...@@ -276,163 +312,4 @@ iot.navigator.getCurrentWebView = function (){ ...@@ -276,163 +312,4 @@ iot.navigator.getCurrentWebView = function (){
return plus.webview.currentWebview(); return plus.webview.currentWebview();
} }
//function requestsend(url, opts, i){
// let data = [0,0,0,0,0,0,0,1,0,0,0];
// opts.success(data[i]);
//}
//
//function clearTime(interval, timeout){
// window.clearInterval(interval);
// window.clearTimeout(timeout);
//}
//
//function sendRequest(url, params, canSend){
// var opts = {
// type: 'post',
// data: params.data,
// success: params.success,
// error: params.error,
// complete: params.complete
// };
// canSend = false;
// requestsend(url, {
// type: 'post',
// data: {
// params.data
// },
// success: (response) => {
// intervalcb.success(response);
// if(stopcondition(response)){
// params.success(response);
// clearTime(handle, time);
// canSend = false;
// }else{
// canSend = true;
// }
// },
// error: (error) => {
// intervalcb.error(error);
// //在intervalcb.error(error)中返回的如果是true则继续执行,否则结束轮询
// if(intervalcb.error(error)){
// canSend = true;
// }else{
// params.error(error);
// clearTime(handle, time);
// }
// },
// complete: {}
// }, true, false);
// return canSend;
//}
//
//uComponents.loop = function(request, timeout, interval, fincb, stopcondition){
// var handle = null;
// var time = null;
// var url = request.url;
// var opts = request.opts;
// var intervalTime = interval.delay;
// var intervalcb = interval.opts;
// var flag = true;
// var canSend = true;
// var canDo = true;
// var i = 0;
// time = setTimeout(function(){
// clearTime(handle, time);
// fincb.error('timeout');
// },timeout);
// var watcher = setInterval(function(){
// if(canSend && canDo){
// var send = sendRequest(url, opts, canSend, canDo);
// }
// },1000);
// //一开始执行一次,发送一次请求
// requestsend(url, {
// data: {},
// success: (response) => {
// intervalcb.success(response);
// if(stopcondition(response)){
// //首次请求结果符合条件的话,结束整个方法
// fincb.success(response);
// clearTime(handle, time);
// }else{
// //首次请求结果不符合条件的话,每隔intervalTime时间发送请求
// handle = setInterval(() => {
// i++;
// console.log(i);
// if(flag){
// flag = false;
// requestsend(url, {
// data: {},
// success: (response) => {
// intervalcb.success(response);
// if(stopcondition(response)){
// fincb.success(response);
// clearTime(handle, time);
// }
// flag = true;
// },
// error: (error) => {
// if(intervalcb.error(error)){
// flag = false;
// }else{
// fincb.error(error);
// clearTime(handle, time);
// }
// },
// complete: {}
// }, i);
// }
// },intervalTime);
// }
// },
// error: (error) => {
// intervalcb.error(error);
// fincb.error(error);
// clearTime(handle, time);
// },
// complete: {}
// }, 0);
//
//}
//
////传递的参数依次是:
////1.request: 请求参数(数据类型: map,包括:url、header等);
////2.timeout: 整个方法的超时时间;
////3.interval: 发送请求的间隔时间、callback;
////4.fincb: 整个方法的callback;
////5.stopcondition: 请求停止所要符合的条件
//uComponents.loop({url:'getLockInfo',opts: {
// success: (response) => {
// console.log(response);
// },
// error: (error) => {
// console.log(error);
// }
//}}, 8000, {
// delay: 1000,
// opts: {
// success: (response) => {
// console.log('intervalcbSuccess:'+response);
// },
// error: (error) => {
// console.log('intervalcbSuccess:'+error);
// }
// }
//}, {
// success: (response) => {
// console.log('fincbSuccess:'+response);
// },
// error: (error) => {
// console.log('fincbError'+error);
// }
//}, (response) => {
// if(response == 1){
// return true;
// }else{
// return false;
// }
//});
export {iot, uPublic, uComponents} export {iot, uPublic, uComponents}
\ No newline at end of file
/**
* @class
* loop
*/
//轮询通用方法:http://116.62.143.3:10080/iot-project-js/doorlock/issues/1
class Loop{
constructor(params) {
this.handle = null;
this.watcher = null;
this.time = null;
this.loopContent = params.loopContent;
this.times = params.times || 10;
this.fincb = params.fincb;
this.intervalTime = params.interval.delay;
this.intervalcb = params.interval.cb;
this.stopcondition = params.stopcondition;
this.canSend = true;
this.canDo = true;
this.i = 0;
}
clearTime(){
clearInterval(this.handle);
clearInterval(this.watcher);
clearTimeout(this.time);
}
async sendRequest(){
this.canSend = false;
try{
var response = null;
response = await this.loopContent();
console.log(response);
if(await this.stopcondition(response)){
if(this.fincb!= null){
this.fincb.success(response);
this.fincb.complete();
}
this.clearTime();
this.canSend = false;
}else{
if(this.intervalcb!= null){
this.intervalcb.success(response);
}
this.canSend = true;
}
}
catch (error){
if(this.intervalcb!= null){
if(this.intervalcb.error(error)){
this.canSend = true;
}else{
if(this.fincb!= null){
this.fincb.error(error);
this.fincb.complete();
this.clearTime();
}
}
}
}
}
start(){
console.log("开始");
console.log("第"+this.i+"次发送了请求");
console.log("发送时间"+new Date().getTime());
this.i++;
this.sendRequest();
this.watcher = setInterval(() => {
if(this.canSend && this.canDo){
this.canDo = false;
console.log("第"+this.i+"次发送了请求");
console.log("发送时间"+new Date().getTime());
this.i++;
this.sendRequest();
}
},1000);
let times = 1;
this.handle = setInterval(() => {
times++;
console.log('times'+times);
if(times > this.times){
this.clearTime();
this.canDo = false;
this.fincb.error('timeout');
this.fincb.complete();
this.intervalcb = null;
this.fincb = null;
}else{
this.canDo = true;
}
},this.intervalTime);
}
}
export default Loop;
...@@ -2,100 +2,101 @@ ...@@ -2,100 +2,101 @@
* @class * @class
* unotify * unotify
*/ */
import uloop from './uloop';
//获取cid: http://116.62.143.3:10080/iot-project-js/doorlock/issues/4
class unotify{ class unotify{
//在一个周期内获取cid //在一个周期内获取cid
static async getCid(successCallback, errorCallback){ static getCid(successCallback, errorCallback){
var cid = null; this.UpdateCid((response) => {
try{ successCallback(response);
//利用promise,直到执行完代码再获取cid }, (error) => {
cid = await this.getCidPeriotic(3); errorCallback(error);
//获取后,在缓存中存储cid });
if(typeof successCallback == 'function'){
iot.storage.setMap('clientId', cid, (res) => {
console.log("已成功保存cid"+cid);
successCallback(cid);
}, () => {
});
}
}
catch (err){
console.log(err);
if(typeof errorCallback == 'function'){
errorCallback(a);
}
}
} }
//周期性获取cid,周期可调整 //周期性获取cid,周期可调整
static getCidPeriotic(times){ static getCidPeriotic(times){
var self = this; var self = this;
return new Promise(function(resolve, reject){ return new Promise(function(resolve, reject){
var i = 0; new uloop({
var cid = null; loopContent: () => {
var handle = null; return self.getCidOnce();
i++; },
cid = self.getCidOnce(i); times: times,
console.log("第"+i+"次"+"获取的cid为"+cid); interval:{
if(cid != null && cid != 'null' || i >= times){ delay: 1000,
window.clearInterval(handle); cb: {
resolve(cid); success: (response) => {
}else{ console.log('intervalcbSuccess:'+JSON.stringify(response));
handle = setInterval(function(){ },
i++; error: (error) => {
cid = self.getCidOnce(i); console.log('intervalcbError:'+JSON.stringify(error));
console.log("第"+i+"次"+"获取的cid为"+cid); }
if(cid != null && cid != 'null' || i >= times){
window.clearInterval(handle);
resolve(cid);
} }
},1000); },
} fincb: {
success: (response) => {
console.log('fincbSuccess:'+JSON.stringify(response));
resolve(response);
},
error: (error) => {
console.log('fincbSuccess:'+JSON.stringify(error));
if(error == 'timeout'){
resolve(null);
}
},
complete: () => {}
},
stopcondition: async (response) => {
if(response != null && response != 'null' ){
return true;
}
}
}).start();
}); });
} }
//单次获取cid //单次获取cid
static getCidOnce(i){ static getCidOnce(){
var clientInfo = plus.push.getClientInfo(); var clientInfo = plus.push.getClientInfo();
if(clientInfo && clientInfo.hasOwnProperty('clientid') && clientInfo.clientid){ if(clientInfo && clientInfo.hasOwnProperty('clientid') && clientInfo.clientid){
// if(i == 6){ return(clientInfo.clientid);
return(clientInfo.clientid);
// }else{
// return(null);
// }
}else{ }else{
return(null); return(null);
} }
} }
//长期不断循环获取cid,并更新cid //长期不断循环获取cid,并更新cid
// static async getCid(successCallback, errorCallback){ static async UpdateCid(successCallback, errorCallback){
// var cid = null; var cid = null;
// var oldCid = null; var oldCid = null;
// try{ try{
// cid = await this.getCidPeriotic(9); cid = await this.getCidPeriotic(9);
// if(cid != null && cid != oldCid){ if(cid != null && cid != oldCid){
// successCallback('cid updateSuccess'); iot.business.api.send('user/updateCid',{
// iot.business.api.send('user/updateCid',{ data: {
// data: { clienId: cid
// clienId: cid },
// }, success: (response) => {
// success: (response) => { console.log(response);
// if(typeof successCallback == 'function'){ if(typeof successCallback == 'function'){
// uccessCallback('cid updateSuccess'); successCallback('cid updateSuccess');
// } }
// }, },
// error: (error) => { error: (error) => {
// console.log(error); console.log(error);
// errorCallback(error); errorCallback(error);
// } }
// }, true, false); }, true, false);
// }else{ }else{
// successCallback('cid not updated'); successCallback('cid not updated');
// } }
// } }
// catch (err){ catch (err){
// console.log(err); console.log(err);
// if(typeof errorCallback == 'function'){ if(typeof errorCallback == 'function'){
// errorCallback(err); errorCallback(err);
// } }
// } }
// } }
} }
export default unotify; export default unotify;
\ No newline at end of file
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading']); uPublic.componentsInit(['u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
...@@ -61,18 +61,11 @@ function backTap(){ ...@@ -61,18 +61,11 @@ function backTap(){
//tap 扫描绑定设备 //tap 扫描绑定设备
function scanAddTap(){ function scanAddTap(){
// iot.navigator.openWindow({ iot.navigator.openWindow({
// url: './scanCodeAdd.html',
// id: 'scanCodeAdd'
// });
mui.openWindow({
url: './scanCodeAdd.html', url: './scanCodeAdd.html',
id: 'scanCodeAdd', id: 'scanCodeAdd',
show: { show: {
aniShow: "none" aniShow: "none"
},
waiting: {
autoShow: false
} }
}); });
} }
......
...@@ -13,13 +13,14 @@ iot.ready(init); ...@@ -13,13 +13,14 @@ iot.ready(init);
function init() { function init() {
console.log("init" + new Date().getTime()); console.log("init" + new Date().getTime());
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading']); uPublic.componentsInit(['u-dialog','u-loading','u-process']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
componentsConfig: initComponentsConfig(), componentsConfig: initComponentsConfig(),
barcode: null barcode: null,
noticeTipShowFlag: false
}, },
mounted(){ mounted(){
let self = this; let self = this;
...@@ -34,6 +35,10 @@ function init() { ...@@ -34,6 +35,10 @@ function init() {
}else{ }else{
openScanCode(self); openScanCode(self);
} }
window.addEventListener('returnPage',() => {
self.noticeTipShowFlag = !iot.native.isNotifycationOpen();
scanCodeSuccess(self);
});
}, },
methods:{ methods:{
//tap < //tap <
...@@ -56,7 +61,13 @@ function initComponentsConfig() { ...@@ -56,7 +61,13 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} },
processLoading: {
initParam: {
class: 'custom-process',
status: 0
}
}
} }
} }
...@@ -82,39 +93,45 @@ function openScanCode(self){ ...@@ -82,39 +93,45 @@ function openScanCode(self){
console.log(response); console.log(response);
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data){ if(data){
console.log(data.result.indexOf('qrKey'));
//扫描成功 //扫描成功
let result = JSON.parse(data.result); if(data.result.indexOf('qrKey') != -1){
let qrKey = result.qrKey; uComponents.showProcess(self, 0, Vue.t('addDevice.loading'));
let lockId = result.lockId; let result = JSON.parse(data.result);
let relId = result.relId; console.log(result);
//绑定设备 console.log(result.hasOwnProperty('qrKey'));
iot.business.sds.scanqr({
data: { let qrKey = result.qrKey;
qrKey: qrKey let lockId = result.lockId;
}, let relId = result.relId;
success: (response) => { //绑定设备
console.log(response); iot.business.sds.scanqr({
let data = uPublic.checkResponseData(response.data); data: {
if(data){ qrKey: qrKey
//云端绑定 },
deviceBind(self, lockId, relId); success: (response) => {
}else{} console.log(response);
}, let data = uPublic.checkResponseData(response.data);
error: (error) => { if(data){
//绑定失败 //云端绑定
console.log(error); deviceBind(self, lockId, relId);
// if(window.iotDebug){ }else{}
// iotDebug.push('end: 绑定失败'+JSON.stringify(error)); },
// } error: (error) => {
// if (window.iotDebug) { //绑定失败
// iotDebug.upload(iot,'绑定失败'); console.log(error);
// } // if(window.iotDebug){
uComponents.openAlert(self, Vue.t('addDevice.bindFailure'), { // iotDebug.push('end: 绑定失败'+JSON.stringify(error));
text: Vue.t('dialog.confirm'), callback: function () { // }
} // if (window.iotDebug) {
}); // iotDebug.upload(iot,'绑定失败');
} // }
}); scanCodeFailue(self);
}
});
}else{
scanCodeFailue(self);
}
}else{} }else{}
}, },
error: (error) => { error: (error) => {
...@@ -126,7 +143,7 @@ function openScanCode(self){ ...@@ -126,7 +143,7 @@ function openScanCode(self){
// if (window.iotDebug) { // if (window.iotDebug) {
// iotDebug.upload(iot,'扫描失败'); // iotDebug.upload(iot,'扫描失败');
// } // }
uPublic.openRequestErrorAlert(self); scanCodeFailue(self);
} }
}); });
} }
...@@ -143,15 +160,18 @@ function deviceBind(self, lockId, relId){ ...@@ -143,15 +160,18 @@ function deviceBind(self, lockId, relId){
console.log(response); console.log(response);
let data = response.data; let data = response.data;
if(data.success){ if(data.success){
uComponents.openAlert(self, Vue.t('addDevice.bindSuccess'), { scanCodeSuccess(self);
text: Vue.t('dialog.confirm'), callback: function () { // uComponents.openAlert(self, Vue.t('addDevice.bindSuccess'), {
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{}); // text: Vue.t('dialog.confirm'), callback: function () {
iot.navigator.openWindow({ // iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
url: '../device/index.html', // needClose: true
id: 'device' // });
}); // iot.navigator.openWindow({
} // url: '../device/index.html',
}); // id: 'device'
// });
// }
// });
} }
}, },
error: (error) => { error: (error) => {
...@@ -170,3 +190,64 @@ function deviceBind(self, lockId, relId){ ...@@ -170,3 +190,64 @@ function deviceBind(self, lockId, relId){
complete: () => {} complete: () => {}
}); });
} }
function scanCodeSuccess(self){
self.noticeTipShowFlag = !iot.native.isNotifycationOpen();
if(self.noticeTipShowFlag){
uComponents.showProcess(self, 1, Vue.t('addDevice.bindSuccess'), [{
"class": 'custom-process-button', 'text': Vue.t('btn.openNotify'), 'callback': () => {
//开启推送通知
if(plus.os.name == 'Android'){
// alert("打开通知页面");
iot.navigator.openWindow({
url: '../device/notify.html',
id: 'notify',
styles: {
popGesture: 'none'
}
});
}else{
iot.native.toNotifycationSetting();
}
}
},{
"class": 'custom-process-button custom-process-cancelButton', 'text': Vue.t('btn.ignore'), 'callback': () => {
//暂不开启
uComponents.hideProcess(self);
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true
});
iot.navigator.openWindow({
url: '../device/index.html',
id: 'device'
});
}
}]);
}else{
console.log("通知开启了");
uComponents.showProcess(self, 1, Vue.t('addDevice.bindSuccess'), [{
"class": 'custom-process-button', 'text': Vue.t('btn.startNow'), 'callback': () => {
//立即体验
uComponents.hideProcess(self);
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true
});
iot.navigator.openWindow({
url: '../device/index.html',
id: 'device'
});
}
}]);
}
}
function scanCodeFailue(self){
uComponents.showProcess(self, 2, Vue.t('addDevice.bindFailure'), [{
"class": 'custom-process-button', 'text': Vue.t('addDevice.reBindDevice'), 'callback': () => {
//激活失败
uComponents.hideProcess(self);
uComponents.showProcess(self, 0, Vue.t('addDevice.loading'));
openScanCode(self);
}
}]);
}
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 按钮、dialog、loading组件 //通用 按钮、dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']); uPublic.componentsInit(['u-button','u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
...@@ -79,15 +79,4 @@ function wifiAddButtonTap(){ ...@@ -79,15 +79,4 @@ function wifiAddButtonTap(){
url: './wifiAdd.html', url: './wifiAdd.html',
id: 'wifiAdd' id: 'wifiAdd'
}); });
console.log("in");
// iot.business.sds.wifiDeviceConfig({
// success: function (response) {
// console.log('wifiDeviceConfig success');
// console.log(response);
// },
// error: function (error) {
// console.log('wifiDeviceConfig error');
// console.log(error);
// }
// });
} }
\ No newline at end of file
/**
* newnotify-dialog.vue
* Version: 0.1
* User: wujie
* Date: 2017-12-26
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* newnotify-dialog
*
******************************************************************************
* 依赖
通知栏插件 isNotifycationOpen toNotifycationSetting
多语言 需要配置多语言
* 支持环境
App
*
*/
<template>
<div id="app" v-cloak>
<div class="header">
<p>开启通知</p>
</div>
<div class="content">
<ul class="u-android-notify">
<li class="u-android-notify-row" v-bind:class = "setp1Active">
<span class="u-android-notify-icon">&#xe6c1;</span>
<span class="u-android-notify-finish-icon" v-show="isStep1Finish"></span>
<div class="u-android-notify-title">
{{toSettingTitle}}
<v-touch tag="div" class="u-android-notify-button" v-show="isToSetting" v-on:tap="onOpenNotify">{{toSettingsub}}
<span></span></v-touch>
</div>
</li>
<li class="u-android-notify-row" v-bind:class = "setp2Active">
<span class="u-android-notify-icon">&#xe6c0;</span>
<span class="u-android-notify-finish-icon" v-show="isStep2Finish"></span>
<div class="u-android-notify-title">
{{checkSetting}}
<v-touch tag="div" class="u-android-notify-button" v-show="isKnow" v-on:tap="onIKnow">{{IKonw}}</v-touch>
</div>
<div class="u-android-notify-tip">{{checkSettingsubTitle}}</div>
<div class="u-android-notify-subtitle">{{step1Title}}</div>
<div class="u-android-notify-subcontent">{{step1content}}</div>
<div class="u-android-notify-subtitle">{{step2Title}}</div>
<div class="u-android-notify-subcontent">{{step2content}}</div>
<div class="u-android-notify-subtitle">{{step3Title}}</div>
<div class="u-android-notify-subcontent">{{step3content}}</div>
</li>
<li class="u-android-notify-row" v-bind:class = "setp3Active">
<span class="u-android-notify-icon">&#xe6c2;</span>
<span class="u-android-notify-finish-icon" v-show="isStep3Finish"></span>
<div class="u-android-notify-title">
{{endSetting}}
<v-touch tag="div" class="u-android-notify-button" v-show="isToIndex" v-on:tap="onToIndex">{{toAppIndex}}
<span></span></v-touch>
</div>
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
props: ['initParam','toIndex'],
data () {
return {
toSettingTitle:Vue.t('androidNotify.toSettingTitle'),
toSettingsub:Vue.t('androidNotify.toSettingsub'),
checkSetting:Vue.t('androidNotify.checkSetting'),
IKonw:Vue.t('androidNotify.IKonw'),
checkSettingsubTitle:Vue.t('androidNotify.checkSettingsubTitle'),
step1Title:Vue.t('androidNotify.step1Title'),
step1content:Vue.t('androidNotify.step1content'),
step2Title:Vue.t('androidNotify.step2Title'),
step2content:Vue.t('androidNotify.step2content'),
step3Title:Vue.t('androidNotify.step3Title'),
step3content:Vue.t('androidNotify.step3content'),
endSetting:Vue.t('androidNotify.endSetting'),
toAppIndex:Vue.t('androidNotify.toIndex'),
//notifyState:false, // 当前是否开启了通知
//gotoIndex:this.toIndex,// 处理点击到index按钮事件
//isKnow:iot.native.isNotifycationOpen(),//是否需要显示 我已阅读
//isToIndex:false,// 是否需要显示去首页按钮
isStep1Finish:iot.native.isNotifycationOpen(),//是否需要显示步骤1的勾
isStep2Finish:false,//是否需要显示步骤2的勾
isStep3Finish:false,//是否需要显示步骤3的勾
isToSetting:!iot.native.isNotifycationOpen(),//是否需要显示去设置按钮
setp1Active:null,
setp2Active:null,// 默认为灰色 不显示active
setp3Active:null,
notifyState:false, // 当前是否开启了通知
gotoIndex:this.toIndex,// 处理点击到index按钮事件
isKnow:iot.native.isNotifycationOpen(),//是否需要显示 我已阅读
isToIndex:false,// 是否需要显示去首页按钮
}
},
mounted: function () {
this.setp1Active=this.isStep1Finish?"active changeBorder":null;
this.setp2Active=this.isStep1Finish?"active changeBorder":null;
console.log("notifyState:"+iot.native.isNotifycationOpen());
onTest(this);
// 监听程序恢复前台
document.addEventListener("resume", ()=>{
onAppReume(this);
}, false);
},
watch: {
},
methods: {
// 点击按钮关闭弹出框
onOpenNotify(){
openNotify(this);
},
onIKnow(){
IKonw(this);
},
onToIndex(){
toIndex(this);
}
}
};
function onTest(self){
console.log(self.isStep1Finish);
console.log(self.setp2Active);
}
function openNotify(self) {
console.log("去开启");
iot.native.toNotifycationSetting("notify");
self.setp1Active = 'active changeBorder';
}
function IKonw(self){
console.log("点击了我已阅读");
self.isStep2Finish = true; // 点击阅读后显示步骤2的勾
// self.setp2Active = "active changeBorder";// 点击阅读后显示步骤2的字体亮度调高
self.setp3Active = "active";// 同时步骤3的字体亮度也调高
self.isStep3Finish = true; // 步骤3的勾勾选
self.isToIndex = true;//显示去首页按钮
self.isKnow = false; // 点击我已阅读隐藏我已阅读按钮
}
function toIndex(self){
console.log("gotoIndex...");
self.gotoIndex();
}
function onAppReume(self){
let notifyState = iot.native.isNotifycationOpen();
console.log("notifyState:"+notifyState);
if (notifyState) {
self.setp2Active = "active changeBorder";
}else{// 恢复默认
self.setp2Active = null;
self.setp3Active = null;
self.isStep2Finish = false;
self.isStep3Finish = false;
self.isToIndex = false;
}
self.isStep1Finish = iot.native.isNotifycationOpen();// 再次判断当前通知是否开启
self.isToSetting = !iot.native.isNotifycationOpen(); // 再次判断是否需要显示去设置按钮
self.isKnow = iot.native.isNotifycationOpen(),// 再次判断是否需要显示 我已阅读
self.$nextTick(function () {
console.log("重新渲染");
});
}
</script>
/**
* app-update.vue
* Version: 0.1
* User: wujie
* Date: 2018-01-08
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* app-update
*
******************************************************************************
* 依赖
* 支持环境
App
*
*/
<template>
<div>
</div>
</template>
<script>
/**
* @vue
* @name notify-dialog 通知栏弹出框组件
* @author wj
* @version 0.1
* @copyright 2018. U-GEN Tech.Co,Ltd. All Rights Reserved.
* @property {String} url -请求应用版本信息的接口地址
* @property {String} showFlag -是否检查版本更新
* @example <u-app-update :show-flag="true"> </u-app-update>
*/
export default {
props: ['showFlag'],
data () {
return {
reqUrl:"device/getVersion",
isNeedShow:this.showFlag?this.showFlag:true
}
},
mounted: function () {
console.log(this.showFlag);
this.onCheckVersion();
},
watch: {
},
methods: {
onCheckVersion(){
checkVersion(this);
}
}
};
function checkVersion(self){
console.log(self.reqUrl);
console.log("是否需要进行版本更新检查:"+self.isNeedShow);
if (!self.showFlag) return;
console.log("检查版本...");
let type = null;
if (plus.os.name == "iOS") {
type = "ios";
}else{
type = "android";
}
iot.business.api.send(self.reqUrl,
{
data: {
"type":type
},
success: (response) => {
console.log(response);
if (response.code == 0) {
dealWithVersion(self,response,type);
}
},
error: (error) => {
console.log(error);
},
complete: () => {}
},false);
}
function dealWithVersion(self,response,type){
var v = plus.runtime.version;
var curVersion = transformVersion(v);
let newVersion = response.data[type].version;// 新版本 无论是安卓还是iOS都用此变量存储
newVersion = transformVersion(newVersion);
let downloadUrl = response.data[type].url;// 下载地址 无论是安卓还是iOS都用此变量存储
console.log("curVersion:"+curVersion);
console.log("newVersion:"+newVersion)
console.log(curVersion);
console.log(newVersion);
if(Number(newVersion) > Number(curVersion)){
console.log("有新版本更新");
plus.nativeUI.confirm( Vue.t('newFeature.newVersion'), (e)=>{
console.log("Close confirm: "+e.index);
if (e.index == 0) {// 点击了确定按钮
plus.runtime.openURL(downloadUrl);
}else if (e.index == 1) {// 点击了取消按钮
}
},Vue.t('newFeature.tip'), [Vue.t('newFeature.update'),Vue.t('newFeature.miss')] );
}else{
console.log("不需要更新版本");
}
}
// 将系统版本转换为可读写版本
function transformVersion(v){
var array = v.split(".");
var floatVersion = "";
console.log("下面是获取系统版本");
console.log(array);
if(array.length>2){
for (var i = 0; i < array.length; i++) {
if(i == 1){
floatVersion = floatVersion + ".";
}
floatVersion = floatVersion + array[i];
}
}else{
floatVersion = v;
}
if(isNaN(floatVersion)){
return null;
}
return floatVersion;
}
</script>
...@@ -23,10 +23,16 @@ function init() { ...@@ -23,10 +23,16 @@ function init() {
list:[], list:[],
startId: 0, startId: 0,
deviceId: null, deviceId: null,
flag: true flag: true,
noticeTipShowFlag: false
}, },
mounted(){ mounted(){
uComponents.showLoading(this);
this.noticeTipShowFlag = !iot.native.isNotifycationOpen();
resolve(this); resolve(this);
window.addEventListener('returnPage',() => {
this.noticeTipShowFlag = !iot.native.isNotifycationOpen();
});
}, },
methods:{ methods:{
getList(){ getList(){
...@@ -47,8 +53,15 @@ function init() { ...@@ -47,8 +53,15 @@ function init() {
setDeviceId(id){ setDeviceId(id){
this.deviceId = id; this.deviceId = id;
}, },
onListLoadTap(){ //tap 点击加载更多
listLoadTap(this); onListLoad(){
listLoad(this);
},
onRefreshFresh(){
refreshFresh(this);
},
onNotifycationSetting(){
notifycationSetting();
}, },
//tap < //tap <
onBackTap(){ onBackTap(){
...@@ -66,7 +79,8 @@ function initComponentsConfig() { ...@@ -66,7 +79,8 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('alarmInfo.noInfoTip'), tip: Vue.t('alarmInfo.noInfoTip'),
pagesize: PAGE_SIZE pagesize: PAGE_SIZE,
pullup: true
} }
}, },
dialog: { dialog: {
...@@ -78,77 +92,70 @@ function initComponentsConfig() { ...@@ -78,77 +92,70 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} }
} }
} }
function resolve(self) { // 获取历史记录
self.setDeviceId(iot.navigator.getExtras().deviceId); function resolve(self) {
uComponents.showLoading(self); self.setDeviceId(iot.navigator.getExtras().deviceId);
iot.business.api.sendCustom('lock/getHistoryRecord', // uComponents.showLoading(self);
{ iot.business.api.sendCustom('lock/getHistoryRecord',
data: { {
device_id: self.getDeviceId(), data: {
action: 2, device_id: self.getDeviceId(),
start_id: self.getStartId(), action: 2,
page_size: PAGE_SIZE start_id: self.getStartId(),
}, page_size: PAGE_SIZE,
success: (response) => { pullUpLoading: true
console.log(response); },
if(self.flag){ success: async (response) => {
let data = uPublic.checkResponseData(response.data); console.log(response);
if(data && data.record.length > 0){ if(self.flag){
let record = data.record;
iot.storage.setMap('notifyTime', moment(record[0].time).toISOString(), (res) => {
console.log(res);
self.flag = false;
}, () => {
});
}
}
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data){ if(data && data.record.length > 0){
let list = [];
let record = data.record; let record = data.record;
for(let i=0; i<record.length; i++){ self.flag = await uPublic.upDateRead('notify', moment(record[0].time).unix());
list[i] = {
value: record[i].openId,
leftImage: '../../resources/image/green_alarmInfo'+record[i].mode+'_icon.png',
subtitle: Vue.t('alarmInfo.'+config.alarmMode[record[i].mode]+''),
rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss")
};
}
self.setList(self.getList().concat(list));
if(record.length > 0){
self.setStartId(record[record.length-1].id);
}
//更新列表数据
uComponents.changeList(self, self.getList());
}else{
} }
uComponents.hideLoading(self);
},
error: (error) => {
console.log(error);
// if(window.iotDebug){
// iotDebug.push('end: 获取报警信息失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'获取报警信息失败');
// }
uPublic.openRequestErrorAlert(self);
},
complete: () => {
uComponents.hideLoading(self);
} }
}); let data = uPublic.checkResponseData(response.data);
} if(data){
let list = [];
let record = data.record;
for(let i=0; i<record.length; i++){
list[i] = {
value: record[i].openId,
leftImage: '../../resources/image/green_alarmInfo'+record[i].mode+'_icon.png',
subtitle: Vue.t('alarmInfo.'+config.alarmMode[record[i].mode]+''),
rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss")
};
}
self.setList(self.getList().concat(list));
if(record.length > 0){
self.setStartId(record[record.length-1].id);
}
//更新列表数据
uComponents.changeList(self, self.getList());
}else{
}
uComponents.hideLoading(self);
},
error: (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
},
complete: () => {
uComponents.hideLoading(self);
}
});
}
//tap < //tap <
function backTap(){ function backTap(){
iot.navigator.aback(); iot.navigator.aback();
} }
//重写mui.back
mui.back = function(){ mui.back = function(){
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{}); iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
console.log("fire"); console.log("fire");
...@@ -156,6 +163,23 @@ mui.back = function(){ ...@@ -156,6 +163,23 @@ mui.back = function(){
} }
//tap 点击加载更多 //tap 点击加载更多
function listLoadTap(self) { function listLoad(self) {
resolve(self); resolve(self);
} }
\ No newline at end of file
//ios跳转到系统设置页面
//android跳转到通知页面
function notifycationSetting(){
if(plus.os.name == 'Android'){
// alert("打开通知页面");
iot.navigator.openWindow({
url: './notify.html',
id: 'notify',
styles: {
popGesture: 'none'
}
});
}else{
iot.native.toNotifycationSetting();
}
}
...@@ -25,10 +25,16 @@ function init() { ...@@ -25,10 +25,16 @@ function init() {
startId: 0, startId: 0,
deviceId: null, deviceId: null,
userInfo: [], userInfo: [],
flag: true flag: true,
noticeTipShowFlag: false
}, },
mounted(){ mounted(){
uComponents.showLoading(this);
this.noticeTipShowFlag = !iot.native.isNotifycationOpen();
resolve(this); resolve(this);
window.addEventListener('returnPage',() => {
this.noticeTipShowFlag = !iot.native.isNotifycationOpen();
});
}, },
methods:{ methods:{
getList(){ getList(){
...@@ -55,8 +61,14 @@ function init() { ...@@ -55,8 +61,14 @@ function init() {
setUserInfo(info){ setUserInfo(info){
this.userInfo = info; this.userInfo = info;
}, },
onListLoadTap(){ onListLoad(){
listLoadTap(this); listLoad(this);
},
onRefreshFresh(){
refreshFresh(this);
},
onNotifycationSetting(){
notifycationSetting();
}, },
//tap < //tap <
onBackTap(){ onBackTap(){
...@@ -74,7 +86,8 @@ function initComponentsConfig() { ...@@ -74,7 +86,8 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('hijackRecord.noRecordTip'), tip: Vue.t('hijackRecord.noRecordTip'),
pagesize: PAGE_SIZE pagesize: PAGE_SIZE,
pullup: true
} }
}, },
dialog: { dialog: {
...@@ -86,13 +99,13 @@ function initComponentsConfig() { ...@@ -86,13 +99,13 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} }
} }
} }
function resolve(self) { function resolve(self) {
self.setDeviceId(iot.navigator.getExtras().deviceId); self.setDeviceId(iot.navigator.getExtras().deviceId);
uComponents.showLoading(self); //
iot.business.api.sendCustom('lock/getHistoryRecord', iot.business.api.sendCustom('lock/getHistoryRecord',
{ {
data: { data: {
...@@ -101,16 +114,12 @@ function initComponentsConfig() { ...@@ -101,16 +114,12 @@ function initComponentsConfig() {
start_id: self.getStartId(), start_id: self.getStartId(),
page_size: PAGE_SIZE page_size: PAGE_SIZE
}, },
success: (response) => { success: async (response) => {
if(self.flag){ if(self.flag){
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data && data.record.length > 0){ if(data && data.record.length > 0){
let record = data.record; let record = data.record;
iot.storage.setMap('alarmTime', moment(record[0].time).toISOString(), (res) => { self.flag = await uPublic.upDateRead('alarm', moment(record[0].time).unix());
console.log(res);
self.flag = false;
}, () => {
});
} }
} }
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
...@@ -151,12 +160,6 @@ function initComponentsConfig() { ...@@ -151,12 +160,6 @@ function initComponentsConfig() {
}, },
error: (error) => { error: (error) => {
console.log(error); console.log(error);
// if(window.iotDebug){
// iotDebug.push('end: 获取劫持报警信息'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'获取劫持报警信息');
// }
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
}, },
complete: () => { complete: () => {
...@@ -170,6 +173,7 @@ function backTap(){ ...@@ -170,6 +173,7 @@ function backTap(){
iot.navigator.aback(); iot.navigator.aback();
} }
//重写mui.back
mui.back = function(){ mui.back = function(){
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{}); iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
console.log("fire"); console.log("fire");
...@@ -177,6 +181,27 @@ mui.back = function(){ ...@@ -177,6 +181,27 @@ mui.back = function(){
} }
//tap 点击加载更多 //tap 点击加载更多
function listLoadTap(self) { function listLoad(self) {
resolve(self);
}
function refreshFresh(self){
resolve(self); resolve(self);
} }
\ No newline at end of file
//ios跳转到系统设置页面
//android跳转到通知页面
function notifycationSetting(){
if(plus.os.name == 'Android'){
// alert("打开通知页面");
iot.navigator.openWindow({
url: './notify.html',
id: 'notify',
styles: {
popGesture: 'none'
}
});
}else{
iot.native.toNotifycationSetting();
}
}
import {iot, uPublic, uComponents} from '../../public/public.js';
import config from '../../public/public.js';
iot.ready(init);
function init() {
uPublic.componentsExtend(['android-notify']);
var form = new Vue({
el: '#content',
data:{
initButtonText: "测试按钮",
componentsConfig: initComponentsConfig(),//初始化数据
dialogFlag:true,
showFlags:false,
onNotifyToIndex:notifyToIndex //改方法传入
},
mounted:function(){
},
methods: {
onTapButton(){
tapButton(this);
},
onAddDeviceButtonTap(){
console.log("onAddDeviceButtonTap......");
},
onToSetting(){
console.log("点击了toSetting");
}
}
});
function notifyToIndex(){
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true
});
iot.navigator.openWindow({
url: './index.html',
id: 'device',
styles: {
popGesture: 'none'
},
extras: {
needClose: true
}
});
}
function tapButton(self){
console.log("tapButton.......");
}
//初始化组件参数
function initComponentsConfig() {
return {
// 设置通知弹出框参数
notifyDialog: {
// 默认参数
initParam: {
// appName:"js.通用门锁",
// time:"js.刚刚",
// title:'js.开启通知',
// content1:'js.开启通知后您将可以及时获取门锁报警',
// content2:'js.提醒、门锁开门消息通知',
// accept:'js.我知道了!',
// buttonTitle:'js.前往开启通知设置'
}
},
addDeviceButton:{
// 默认参数
initParam: {
class: 'edit-name-button',
text: "这是测试button"
}
}
};
}
}
//重写mui.back
mui.back = function(){
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
console.log("fire");
iot.navigator.back();
}
...@@ -24,10 +24,16 @@ function init() { ...@@ -24,10 +24,16 @@ function init() {
startId: 0, startId: 0,
deviceId: null, deviceId: null,
userInfo: [], userInfo: [],
flag: true flag: true,
noticeTipShowFlag: false
}, },
mounted(){ mounted(){
uComponents.showLoading(this);
this.noticeTipShowFlag = !iot.native.isNotifycationOpen();
resolve(this); resolve(this);
window.addEventListener('returnPage',() => {
this.noticeTipShowFlag = !iot.native.isNotifycationOpen();
});
}, },
methods:{ methods:{
getList(){ getList(){
...@@ -54,8 +60,14 @@ function init() { ...@@ -54,8 +60,14 @@ function init() {
setDeviceId(id){ setDeviceId(id){
this.deviceId = id; this.deviceId = id;
}, },
onListLoadTap(){ onListLoad(){
listLoadTap(this); listLoad(this);
},
onRefreshFresh(){
refreshFresh(this);
},
onNotifycationSetting(){
notifycationSetting();
}, },
//tap < //tap <
onBackTap(){ onBackTap(){
...@@ -73,7 +85,8 @@ function initComponentsConfig() { ...@@ -73,7 +85,8 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('opendoorRecord.noRecordTip'), tip: Vue.t('opendoorRecord.noRecordTip'),
pagesize: PAGE_SIZE pagesize: PAGE_SIZE,
pullup: true
} }
}, },
dialog: { dialog: {
...@@ -85,14 +98,14 @@ function initComponentsConfig() { ...@@ -85,14 +98,14 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} }
} }
} }
//调用接口获取开门记录 //调用接口获取开门记录
function resolve(self) { function resolve(self) {
console.log("in"); console.log("in");
uComponents.showLoading(self); // uComponents.showLoading(self);
self.setDeviceId(iot.navigator.getExtras().deviceId); self.setDeviceId(iot.navigator.getExtras().deviceId);
console.log(iot.navigator.getExtras()); console.log(iot.navigator.getExtras());
if(iot.navigator.getExtras().relId){ if(iot.navigator.getExtras().relId){
...@@ -107,6 +120,7 @@ function backTap(){ ...@@ -107,6 +120,7 @@ function backTap(){
iot.navigator.aback(); iot.navigator.aback();
} }
//重写mui.back
mui.back = function(){ mui.back = function(){
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{}); iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
console.log("fire"); console.log("fire");
...@@ -114,10 +128,11 @@ mui.back = function(){ ...@@ -114,10 +128,11 @@ mui.back = function(){
} }
//tap 点击加载更多 //tap 点击加载更多
function listLoadTap(self) { function listLoad(self) {
resolve(self); resolve(self);
} }
//获取历史记录(整个设备)
function getHistoryRecord(self){ function getHistoryRecord(self){
iot.business.api.sendCustom('lock/getHistoryRecord', iot.business.api.sendCustom('lock/getHistoryRecord',
{ {
...@@ -127,28 +142,18 @@ function getHistoryRecord(self){ ...@@ -127,28 +142,18 @@ function getHistoryRecord(self){
start_id: self.getStartId(), start_id: self.getStartId(),
page_size: PAGE_SIZE page_size: PAGE_SIZE
}, },
success: (response) => { success: async (response) => {
setListData(self, response); setListData(self, response);
if(self.flag){ if(self.flag){
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data && data.record.length > 0){ if(data && data.record.length > 0){
let record = data.record; let record = data.record;
iot.storage.setMap('openTime', moment(record[0].time).toISOString(), (res) => { self.flag = await uPublic.upDateRead('open', moment(record[0].time).unix());
console.log(res);
self.flag = false;
}, () => {
});
} }
} }
}, },
error: (error) => { error: (error) => {
console.log(error); console.log(error);
// if(window.iotDebug){
// iotDebug.push('end: 获取开门记录失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'获取开门记录失败');
// }
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
}, },
complete: () => { complete: () => {
...@@ -157,6 +162,7 @@ function getHistoryRecord(self){ ...@@ -157,6 +162,7 @@ function getHistoryRecord(self){
}); });
} }
//获取个人历史记录
function getPersonalHistory(self, id){ function getPersonalHistory(self, id){
iot.business.api.sendCustom('lock/getPersonalHistory', iot.business.api.sendCustom('lock/getPersonalHistory',
{ {
...@@ -172,13 +178,7 @@ function getPersonalHistory(self, id){ ...@@ -172,13 +178,7 @@ function getPersonalHistory(self, id){
}, },
error: (error) => { error: (error) => {
console.log(error); console.log(error);
// if(window.iotDebug){ uPublic.openRequestErrorAlert(self);
// iotDebug.push('end: 获取个人开门历史记录'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'获取个人开门历史记录');
// }
uPublic.openRequestErrorAlert(self);
}, },
complete: () => { complete: () => {
uComponents.hideLoading(self); uComponents.hideLoading(self);
...@@ -186,6 +186,7 @@ function getPersonalHistory(self, id){ ...@@ -186,6 +186,7 @@ function getPersonalHistory(self, id){
}); });
} }
//设置历史记录渲染列表
function setListData(self, response){ function setListData(self, response){
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data){ if(data){
...@@ -198,7 +199,7 @@ function setListData(self, response){ ...@@ -198,7 +199,7 @@ function setListData(self, response){
for(let i=0; i<record.length; i++){ for(let i=0; i<record.length; i++){
list[i] = { list[i] = {
value: record[i].openId, value: record[i].openId,
title: "ID:"+record[i].openId, title: ((record[i].mode == 30 ) || (record[i].mode == 5 )) ? '':"ID:"+record[i].openId,
leftImage: '../../resources/image/green_opendoor'+record[i].mode+'_icon.png', leftImage: '../../resources/image/green_opendoor'+record[i].mode+'_icon.png',
subtitle: Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''), subtitle: Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''),
rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss") rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss")
...@@ -221,3 +222,19 @@ function setListData(self, response){ ...@@ -221,3 +222,19 @@ function setListData(self, response){
}else{ }else{
} }
} }
//ios跳转到系统设置页面
//android跳转到通知页面
function notifycationSetting(){
if(plus.os.name == 'Android'){
iot.navigator.openWindow({
url: './notify.html',
id: 'notify',
styles: {
popGesture: 'none'
}
});
}else{
iot.native.toNotifycationSetting();
}
}
...@@ -82,10 +82,6 @@ function initComponentsConfig() { ...@@ -82,10 +82,6 @@ function initComponentsConfig() {
} }
} }
function alert(){
alert('aaa');
}
function nameChange(self,text){ function nameChange(self,text){
self.setTextName(text); self.setTextName(text);
self.setTextErrorTip(''); self.setTextErrorTip('');
...@@ -97,6 +93,13 @@ function backTap(){ ...@@ -97,6 +93,13 @@ function backTap(){
iot.navigator.back(); iot.navigator.back();
} }
////重写mui.back
//mui.back = function(){
// iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
// console.log("fire");
// iot.navigator.back();
//}
//tap 保存 //tap 保存
function saveTap(self){ function saveTap(self){
if(self.getTextName() == null || self.getTextName().trim() == ''){ if(self.getTextName() == null || self.getTextName().trim() == ''){
...@@ -112,10 +115,10 @@ function saveTap(self){ ...@@ -112,10 +115,10 @@ function saveTap(self){
console.log(response); console.log(response);
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data){ if(data){
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
console.log('returnPage');
uComponents.openAlert(self, Vue.t('editName.editNameSuccess'), { uComponents.openAlert(self, Vue.t('editName.editNameSuccess'), {
text: Vue.t('btn.confirm'), callback: function () { text: Vue.t('btn.confirm'), callback: function () {
iot.navigator.fire(plus.webview.currentWebview().opener(),'returnPage',{});
console.log('returnPage');
iot.navigator.back(); iot.navigator.back();
} }
}); });
...@@ -123,12 +126,6 @@ function saveTap(self){ ...@@ -123,12 +126,6 @@ function saveTap(self){
}, },
error: (error) => { error: (error) => {
console.log(error); console.log(error);
// if(window.iotDebug){
// iotDebug.push('end: 修改设备名称失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'修改设备名称失败');
// }
uComponents.openAlert(self, Vue.t('editName.editNameFailue'), { uComponents.openAlert(self, Vue.t('editName.editNameFailue'), {
text: Vue.t('btn.confirm'), callback: function () { text: Vue.t('btn.confirm'), callback: function () {
let opener = plus.webview.currentWebview().opener(); let opener = plus.webview.currentWebview().opener();
......
...@@ -30,6 +30,8 @@ function init() { ...@@ -30,6 +30,8 @@ function init() {
userListData: [], userListData: [],
startId: 0, startId: 0,
role: null, role: null,
//当前用户id
currentId: null
}, },
mounted(){ mounted(){
this.extras = iot.navigator.getExtras(); this.extras = iot.navigator.getExtras();
...@@ -77,14 +79,6 @@ function init() { ...@@ -77,14 +79,6 @@ function init() {
setRole(role){ setRole(role){
this.role = role; this.role = role;
}, },
//
// onSwipeLeftRow(index){
// swipeLeftRow(this, index);
// },
// onSwipeRightRow(){
// swipeRightRow(this);
// },
//
onTapLoad(){ onTapLoad(){
// tapLoad(); // tapLoad();
}, },
...@@ -132,12 +126,6 @@ function getUserList(self){ ...@@ -132,12 +126,6 @@ function getUserList(self){
}, },
error: (error) => { error: (error) => {
console.log(error); console.log(error);
// if(window.iotDebug){
// iotDebug.push('end: 获取用户列表失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'获取用户列表失败');
// }
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
}, },
complete: () => { complete: () => {
...@@ -146,7 +134,6 @@ function getUserList(self){ ...@@ -146,7 +134,6 @@ function getUserList(self){
}); });
} }
//
function sortRule(a,b){ function sortRule(a,b){
return a.role - b.role; return a.role - b.role;
} }
...@@ -166,9 +153,8 @@ function getUserInfoMap() { ...@@ -166,9 +153,8 @@ function getUserInfoMap() {
} }
async function sortUsers(self, data){ async function sortUsers(self, data){
let id = [];
try { try {
id = await getUserInfoMap(); self.currentId = await getUserInfoMap();
} }
catch (err) { catch (err) {
console.log(err); console.log(err);
...@@ -176,7 +162,7 @@ async function sortUsers(self, data){ ...@@ -176,7 +162,7 @@ async function sortUsers(self, data){
let users = []; let users = [];
let manage = []; let manage = [];
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
if(data[i].user_id == null ||data[i].role && data[i].user_id != id){ if(data[i].user_id == null ||data[i].role && data[i].user_id != self.currentId){
users.push(data[i]); users.push(data[i]);
}else{ }else{
manage.push(data[i]); manage.push(data[i]);
...@@ -228,16 +214,7 @@ function addUserTap(self){ ...@@ -228,16 +214,7 @@ function addUserTap(self){
} }
}); });
} }
//
//// 向左滑动用户列表,修改用户列表下标
//function swipeLeftRow(self, index) {
// self.userListIndex = index;
//}
//// 向右滑动用户列表,修改用户列表下标
//function swipeRightRow(self) {
// self.userListIndex = null;
//}
//
// 点击组件列表 通知事件和当前点击列表下标 // 点击组件列表 通知事件和当前点击列表下标
function onTapUserList(self, listIndex) { function onTapUserList(self, listIndex) {
iot.navigator.openWindow({ iot.navigator.openWindow({
...@@ -291,12 +268,6 @@ function deleteUser(self, index){ ...@@ -291,12 +268,6 @@ function deleteUser(self, index){
}, },
error: (error) => { error: (error) => {
console.log(error); console.log(error);
// if(window.iotDebug){
// iotDebug.push('end: 删除用户失败'+JSON.stringify(error));
// }
// if (window.iotDebug) {
// iotDebug.upload(iot,'删除用户失败');
// }
uComponents.openAlert(self, Vue.t('doorlockUser.deleteFailure'), { uComponents.openAlert(self, Vue.t('doorlockUser.deleteFailure'), {
text: Vue.t('btn.confirm'), callback: function () { text: Vue.t('btn.confirm'), callback: function () {
} }
......
...@@ -98,30 +98,7 @@ function qrcodeButtonTap(self){ ...@@ -98,30 +98,7 @@ function qrcodeButtonTap(self){
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data){ if(data){
let qrKey = response.data.qrKey; let qrKey = response.data.qrKey;
let data = { createQrcode(self, qrKey);
qrKey: qrKey,
lockId: self.extras.lockId,
relId: self.extras.id
}
data = JSON.stringify(data);
let qr = self.$refs.qrcode;
QRCode.toCanvas(qr, data, {
scale: 5,
margin: 2
},(error) => {
if (error) {
console.log(error)
} else {
console.log('success');
uComponents.hideLoading(self);
qr.style.width = "5.333rem";
qr.style.height = "5.333rem";
console.log(qr.style);
setTimeout(() => {
self.setQrCodeDisabled(true);
},qrcode_timeout);
}
});
}else{} }else{}
}, },
error: (error) => { error: (error) => {
...@@ -134,9 +111,38 @@ function qrcodeButtonTap(self){ ...@@ -134,9 +111,38 @@ function qrcodeButtonTap(self){
} }
//请求失败 //请求失败
uPublic.openRequestErrorAlert(self); uPublic.openRequestErrorAlert(self);
} },
complete: () => {
uComponents.hideLoading(self);
}
}); });
setTimeout(() => { setTimeout(() => {
self.setQrCodeDisabled(true); self.setQrCodeDisabled(true);
},config.qrcode_timeout) },config.qrcode_timeout)
} }
\ No newline at end of file
function createQrcode(self, qrKey){
let data = {
qrKey: qrKey,
lockId: self.extras.lockId,
relId: self.extras.id
}
data = JSON.stringify(data);
let qr = self.$refs.qrcode;
QRCode.toCanvas(qr, data, {
scale: 5,
margin: 2
},(error) => {
if (error) {
console.log(error);
} else {
console.log('success');
qr.style.width = "5.333rem";
qr.style.height = "5.333rem";
console.log(qr.style);
setTimeout(() => {
self.setQrCodeDisabled(true);
},qrcode_timeout);
}
});
}
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
*/ */
import {iot, uPublic, uComponents} from '../../public/public.js'; import {iot, uPublic, uComponents} from '../../public/public.js';
import unotify from '../../public/unotify.js';
iot.ready(init); iot.ready(init);
function init() { function init() {
...@@ -30,24 +29,13 @@ function init() { ...@@ -30,24 +29,13 @@ function init() {
if(window.iotDebug){ if(window.iotDebug){
iotDebug.push('start: Debug'); iotDebug.push('start: Debug');
} }
var self = this; resolve(this);
unotify.getCid(function(ret){
console.log(ret); document.addEventListener("resume", () => {
self.setClientId(ret); if(!this.showLoginButtonFlag){
if (plus.os.name == 'Android') { resolve(this);
iot.permission.checkPermission(['READ_EXTERNAL_STORAGE'], function (res) { }
console.log('success', res); }, false);
loginButtonTap(self);
}, function (err) {
console.log('error', err);
});
}else{
loginButtonTap(self);
}
},function(err){
console.log(err);
})
console.log('innnnnnn');
}, },
methods:{ methods:{
getShowLoginButtonFlag(){ getShowLoginButtonFlag(){
...@@ -93,23 +81,21 @@ function initComponentsConfig() { ...@@ -93,23 +81,21 @@ function initComponentsConfig() {
} }
} }
function resolve(self){
if (plus.os.name == 'Android') {
iot.permission.checkPermission(['READ_EXTERNAL_STORAGE'], function (res) {
console.log('success', res);
loginButtonTap(self);
}, function (err) {
console.log('error', err);
});
}else{
loginButtonTap(self);
}
}
//sds登陆
function loginButtonTap(self){ function loginButtonTap(self){
// if(window.iotDebug){
// iotDebug.push('start: initSDSLogin');
// }
// window.SDSPlugin.login({},(res)=>{
// console.log(res);
//// alert(res);
// var data = uPublic.checkResponseData(res.data);
// if(data){
//// alert("sds登陆成功");
// cloudsLogin(self, data.UserID);
// }
// },(err)=>{
// alert(error);
// console.log(err);
// })
console.log("loginButton");
iot.business.sds.checkSDSInit({ iot.business.sds.checkSDSInit({
data: {}, data: {},
success: (response) => { success: (response) => {
...@@ -127,7 +113,6 @@ console.log("loginButton"); ...@@ -127,7 +113,6 @@ console.log("loginButton");
var data = uPublic.checkResponseData(response.data); var data = uPublic.checkResponseData(response.data);
if(data){ if(data){
if(data.hasOwnProperty('UserID')){ if(data.hasOwnProperty('UserID')){
console.log("sds登陆成功了");
cloudsLogin(self, data.UserID); cloudsLogin(self, data.UserID);
} }
}else{ }else{
...@@ -168,9 +153,9 @@ console.log("loginButton"); ...@@ -168,9 +153,9 @@ console.log("loginButton");
}, },
complete: () => {} complete: () => {}
}); });
} }
//云端登陆
function cloudsLogin(self, id){ function cloudsLogin(self, id){
uComponents.showLoading(self); uComponents.showLoading(self);
if(window.iotDebug){ if(window.iotDebug){
...@@ -179,7 +164,8 @@ function cloudsLogin(self, id){ ...@@ -179,7 +164,8 @@ function cloudsLogin(self, id){
iot.business.api.send('user/sds_login',{ iot.business.api.send('user/sds_login',{
data: { data: {
username: id, username: id,
clienId: self.getClientId() // clienId: self.getClientId()
clienId: null
}, },
success: (response) => { success: (response) => {
if(window.iotDebug){ if(window.iotDebug){
...@@ -198,6 +184,9 @@ function cloudsLogin(self, id){ ...@@ -198,6 +184,9 @@ function cloudsLogin(self, id){
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/index.html', url: '../device/index.html',
id: 'device', id: 'device',
styles: {
popGesture: 'none'
},
extras: { extras: {
needClose: true needClose: true
} }
...@@ -211,7 +200,7 @@ function cloudsLogin(self, id){ ...@@ -211,7 +200,7 @@ function cloudsLogin(self, id){
error: (error) => { error: (error) => {
console.log(error); console.log(error);
if(window.iotDebug){ if(window.iotDebug){
iotDebug.push('end: 云端登陆失败'+JSON.stringify(error)); iotDebug.push('end: 云端 登陆失败'+JSON.stringify(error));
} }
if (window.iotDebug) { if (window.iotDebug) {
iotDebug.upload(iot,'云端登陆失败'); iotDebug.upload(iot,'云端登陆失败');
......
/**
* v_help.js
* Version: 0.1
* User: wy
* Date: 2017-12-27
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 帮助页面
*/
import config from '../../public/config.js';
import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init);
function init() {
//通用 组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']);
const app = new Vue({
data:{
//配置组件
componentsConfig: initComponentsConfig()
},
mounted(){
},
methods:{
//tap 完成
onFinishButtonTap(){
finishButtonTap();
}
}
}).$mount('#app');
}
//配置组件参数
function initComponentsConfig() {
return {
finishButton: {
initParam: {
class: 'custom-button',
text: Vue.t('btn.finish')
}
},
dialog: {
initParam: {
class: 'custom-dialog'
}
},
loading: {
initParam: {
class: 'custom-loading'
}
}
}
}
//tap 完成
function finishButtonTap(){
}
\ No newline at end of file
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']); uPublic.componentsInit(['u-button','u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
...@@ -119,32 +119,15 @@ function logoutButtonTap(self){ ...@@ -119,32 +119,15 @@ function logoutButtonTap(self){
uComponents.openConfirm(self, Vue.t('myInfo.logoutDialogTip'), uComponents.openConfirm(self, Vue.t('myInfo.logoutDialogTip'),
{text: Vue.t('dialog.cancel'), callback: function () {}}, {text: Vue.t('dialog.cancel'), callback: function () {}},
{text: Vue.t('dialog.confirm'), callback: function () { {text: Vue.t('dialog.confirm'), callback: function () {
// uPublic.logout({
// data: {
// sds: true
// },
// success: (response) => {
// console.log(response);
// iot.navigator.openWindow({
// url: '../login/index.html',
// id: 'login',
// extras: {
// needClose: true
// }
// });
// },
// error: (error) => {
// console.log(error);
// },
// complete: () => {}
// });
iot.business.user.logout({ iot.business.user.logout({
data: {}, data: {
// sds: false
},
success: (response) => { success: (response) => {
console.log("sdsLogout:"+response); console.log("sdsLogout:"+response);
let sdsResponse = response; let sdsResponse = response;
iot.business.websql.delMaps(['utoken', 'userinfo'], (response) => { iot.business.websql.delMaps(['utoken', 'userinfo'], (response) => {
iot.storage.delMaps(['notifyTime','alarmTime','openTime'], (response) => { iot.storage.delMaps(['historyId','history'], (response) => {
console.log("clearMap"+response); console.log("clearMap"+response);
//打开首页 //打开首页
iot.navigator.openWindow({ iot.navigator.openWindow({
......
/**
* v_index.js
* Version: 0.1
* User: zjx
* Date: 2017-09-26
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
import {iot, uPublic, uComponents} from '../../public/public.js';
import unotify from '../../public/unotify.js';
import uloop from '../../public/uloop.js';
iot.ready(init);
function init() {
const app = new Vue({
data:{
},
mounted(){
unotify.getCid((response) => {
console.log(response);
},(error) => {
console.log(error);
});
mui("#refreshContainer").pullRefresh({
up:{
contentrefresh : "正在加載...",//可選,正在加載狀態時,上拉加載控件上顯示的標題內容
contentnomore:'沒 有 更 多 數 據 了',//可選,請求完畢若沒有更多數據時顯示的提醒內容;
callback: beginLoopTap()
},
down : {
height:50,//可選,默認50.觸發下拉刷新拖動距離,
auto: true,//可選,默認false.首次加載自動下拉刷新一次
contentdown : "下拉可以刷新",//可選,在下拉可刷新狀態時,下拉刷新控件上顯示的標題內容
contentover : "釋放立即刷新",//可選,在釋放可刷新狀態時,下拉刷新控件上顯示的標題內容
contentrefresh : "正在刷新...",//可選,正在刷新狀態時,下拉刷新控件上顯示的標題內容
callback : beginLoopTap()
}
});
},
methods:{
// onBeginLoopTap(){
// beginLoopTap();
// }
}
}).$mount('#app');
}
function beginLoopTap(){
console.log("innnnn");
mui('#refreshContainer').pullRefresh().endPullupToRefresh(true);
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -183,14 +183,88 @@ ...@@ -183,14 +183,88 @@
.mediaPosition(); .mediaPosition();
.u-comm-loading(); //.u-comm-loading();
.u-process();
.custom-comm-loading(); //.custom-comm-loading();
//
.scanContent { .scanContent {
position: fixed; position: fixed;
top: 1.173rem; top: 1.173rem;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
} }
\ No newline at end of file
.noticeContent{
color: #c8225b;
line-height: 1.5;
text-align: center;
width: 100%;
display: inline-block;
position: absolute;
bottom: -200px;
font-size: 12px ;
span{
&:first-child{
.iconfont(20px);
}
}
}
.custom-process-button{
position: absolute;
bottom: inherit;
left: 0;
right: 0;
width: 7.333rem;
border-radius: 0.133rem;
background-color: transparent;
border: 1px solid;
color: #00ffff;
font-size: 0.427rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
}
.custom-process-cancelButton{
bottom: 0;
width: 100px;
color: #00ffff;
font-size: 12px;
background-color: transparent;
padding: 18px 0 5px;
border: none;
&:after{
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;/*no*/
.blue_gradient_border();
}
.tap_row(transparent);
&.disabled{
background-color: transparent;
}
}
.u-process.u-process-status-1{
.u-process-content{
top: 200px;
}
}
.u-process.u-process-status-2{
.u-process-content{
top: 200px;
}
}
...@@ -468,4 +468,112 @@ ...@@ -468,4 +468,112 @@
.remoteOpendoorPage{ .remoteOpendoorPage{
.mask(1051,@BODY-BG-COLOR); .mask(1051,@BODY-BG-COLOR);
}
//
.custom-marquee .u-marquee-text {
display: block;
line-height: 0.96rem;
}
.active .u-marquee-text {
-webkit-animation: none;
animation: none;
}
.u-notification{
.mask(1051,@CUSTOM-BACKDROP-BG);
.u-notification-box{
width: 335px;
height: 300px;
.transform_center();
background-color: #242635;
color: #00ffff;
border: 1px solid;/*no*/
border-radius: 5px;
.u-notification-title{
position: relative;
padding-top: 10px;
font-size: 16px;
text-align: center;
}
.u-notification-close{
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 100%;
padding-top: 10px;
.iconfont(25px);
}
.u-notification-content{
.bgImgSize(100%,147px,"noticeContBg.png",center,auto 100%);
padding-top: 61px;
}
.u-notification-switch{
width: 150px;
margin: 15px auto;
padding: 10px 0;
text-align: center;
font-size: 12px;
.u-notification-switch-handle{
display: inline-block;
vertical-align: middle;
position: relative;
margin-right: 10px;
width: 17px;
height: 17px;
&:before{
position: absolute;
top: 0;
left: 0;
.iconfont(17px);
}
}
&.u-notification-switch-on .u-notification-switch-handle:before{
content: '\e6aa';
}
&.u-notification-switch-off .u-notification-switch-handle:before{
content: '\e6a9';
}
}
.u-notification-button{
li{
.button(235px);
line-height: 1;
margin: 0 auto;
text-align: center;
padding: 10px 0;
}
}
.clearfix{
overflow: hidden;
padding: 0 54px;
}
.leftCont{
float: left;
}
.rightCont{
float: right;
}
.logo{
.bgImgSize(15px,15px,"logo1.png",center,cover);
display: inline-block;
vertical-align: middle;
margin: 0 -8px 0 8px;
}
.smallFont{
color: #00b2b2;
font-size: 16px;
.transform(scale(0.5));
display: inline-block;
vertical-align: middle;
}
.tip{
text-align: center;
font-size: 12px;
margin-top: 9px;
line-height: 16px;
}
}
} }
\ No newline at end of file
@import "../public/public.less";
@import "../public/header.less";
.u-android-notify{
margin: 53px 40px 0;
.u-android-notify-row{
color: rgba(204,204,204,.5);
padding-left: 34px;
position: relative;
.u-android-notify-title{
font-size: 16px;
position: relative;
}
.u-android-notify-tip{
font-size: 12px;
line-height: 15px;
padding: 3px 5px 1px;
margin: 6px -4px -7px;
border-radius: 5px;
position: relative;
border: 1px dashed transparent;/*no*/
&:before{
content: '';
position: absolute;
top: -6px;
left: 90px;
.bgImgSize(10px,6px,"blue_arrow_icon.png",center,cover);
display: none;
}
}
.u-android-notify-subtitle{
margin-top: 15px;
}
.u-android-notify-subcontent{
font-size: 12px;
line-height: 15px;
padding-left: 21px;
margin-top: 6px;
}
//1、2、3
.u-android-notify-icon{
position: absolute;
left: 0;
display: inline-block;
// width: 22px;
// height: 22px;
border: 1px solid;/*no*/
border-radius: 50%;
text-align: center;
.iconfont(12px);
padding: 4px;
background-color: #242635;
outline: 3px solid #242635;/*no*/
}
// √
.u-android-notify-finish-icon{
position: absolute;
top: 10px;
left: 12px;
&:before{
content:'\e730';
color: #00ffff;
.defaultIconfont(16px);
background-color: #242635;
border-radius: 50%;
.transform(scale(0.6));
display: block;
}
}
.u-android-notify-button{
.transformV_center(right,0);
color: #00ffff;
font-size: 12px;
line-height: 1;
border-bottom: 1px solid;/*no*/
padding-bottom: 1px;/*no*/
// >>
span{
margin-left: 6px;
&:before{
content:'\e6c4';
.iconfont(12px);
}
}
}
&:not(:last-child){
padding-bottom: 55px;
}
&:before{
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 11px;
width: 1px;/*no*/
background-color: #595b63;
}
}
.active{
color: #fff;
.u-android-notify-tip{
color: #91929a;
border-color: #91929a;
&:before{
display: block;
}
}
.u-android-notify-subcontent{
color: #91929a;
}
.u-android-notify-icon{
color: #00ffff;
}
}
.changeBorder:before{
background-color: #00ffff;
}
}
\ No newline at end of file
...@@ -33,8 +33,74 @@ ...@@ -33,8 +33,74 @@
} }
.u-list-load{ .u-list-load{
.listLoad(); .listLoad();
.u-list-load-animation{
width: 24px;
height: 24px;
display: inline-block;
.bgImg("loading.png");
-webkit-animation: refresh 1s steps(8, end) infinite;
animation: refresh 1s steps(8, end) infinite;
background-size: cover;
vertical-align: middle;
}
} }
.u-list-tip{ .u-list-tip{
.listNoCont(); .listNoCont();
} }
}
@-webkit-keyframes refresh {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
@keyframes refresh {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
.notice{
height: 62px;
line-height: 62px;
border-bottom: 2px solid #50515D;/*no*/
text-align: center;
color: #00ffff;
font-size: 12px;
> span{
color: #fc2168;
.iconfont(20px);
vertical-align: middle;
margin-right: 9px;
}
p{
display: inline-block;
color: #00ffff;
font-size: 12px;
line-height: 1;
border-bottom: 1px solid;/*no*/
padding-bottom: 1px;/*no*/
margin-left: 24px;
// >>
span{
margin-left: 6px;
&:before{
content:'\e6c4';
.iconfont(12px);
}
}
}
~ .custom-list{
top: 106px;
}
} }
\ No newline at end of file
...@@ -220,6 +220,11 @@ ...@@ -220,6 +220,11 @@
} }
} }
//
.nameDisabled:before{
display: none;
}
.custom-isClearSwitch-switch { .custom-isClearSwitch-switch {
width: 5.333rem; width: 5.333rem;
height: auto; height: auto;
...@@ -283,3 +288,12 @@ ...@@ -283,3 +288,12 @@
.unbindState-dialog(); .unbindState-dialog();
.custom-dialog{
.u-dialog-box{
.u-dialog-content{
span{
.bgImgSize(51px,51px,"green_unbindSuccess_icon.png",center,cover);
}
}
}
}
...@@ -142,27 +142,43 @@ ...@@ -142,27 +142,43 @@
//邀请绑定 //邀请绑定
.inviteBind{ .inviteBind{
margin: 40px 38px 0; margin: 41px 42px 0;
li{ li{
&:first-child{ color: @INVITEBIND-TEXT-COLOR;
width: 200px; font-size: @INVITEBIND-TEXT-FONTSIZE;
height: 200px; position: relative;
&.qrcode{
width: 160px;
height: 160px;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
} }
&:not(:first-child){ &.title{
color: @INVITEBIND-TEXT-COLOR; color: #fff;
font-size: @INVITEBIND-TEXT-FONTSIZE; font-size: 18px;
padding-left: 12px; margin: 34px 0 22px;
text-indent: -12px; }
line-height: 20px; &.tip{
margin-top: 18px; font-size: 12px;
//注意事项 text-align: center;
&:nth-child(2){ margin-top: 34px;
color: inherit; }
font-size: @INVITEBIND-TITLE-FONTSIZE; //1、2、3
margin-top: 32px; > span{
} display: inline-block;
// width: 22px;/*no*/
// height: 22px;/*no*/
border: 1px solid;/*no*/
border-radius: 50%;
text-align: center;
.iconfont(12px,1);
// line-height: 22px;/*no*/
background-color: #242635;
outline: 3px solid #242635;/*no*/
color: #00ffff;
margin-right: 14px;
position: relative;
padding: 4px;
} }
//二维码已过期,请重新生成 //二维码已过期,请重新生成
p{ p{
...@@ -178,6 +194,18 @@ ...@@ -178,6 +194,18 @@
width: 100%; width: 100%;
} }
} }
&:not(.qrcode):not(.title):not(.tip):not(.noBorder){
padding-bottom: 17px;
&:before{
content: '';
position: absolute;
top: 2px;
bottom: 0;
left: 11px;
width: 1px;/*no*/
background-color: #00ffff;
}
}
} }
} }
...@@ -328,4 +356,9 @@ ...@@ -328,4 +356,9 @@
} }
} }
.mediaPosition(true); .mediaPosition(true);
\ No newline at end of file
//
.userInfo-title-disabled:after {
display: none;
}
\ No newline at end of file
...@@ -142,7 +142,11 @@ ...@@ -142,7 +142,11 @@
.u-select(); .u-select();
.custom-select{ .custom-select{
height: 170px; position: absolute;
top: 266px;
bottom: 211px;
left: 0;
height: auto;
.u-select-scroll{ .u-select-scroll{
.u-select-row{ .u-select-row{
display: block; display: block;
...@@ -180,10 +184,16 @@ ...@@ -180,10 +184,16 @@
} }
} }
.position{
position: absolute;
bottom: 122px;
left: 0;
width: 100%;
}
.tip{ .tip{
text-align: center; text-align: center;
color: #A0A0A7; color: #A0A0A7;
margin-top: 3px;
} }
.u-switch(); .u-switch();
...@@ -224,14 +234,14 @@ ...@@ -224,14 +234,14 @@
&.u-switch-on .u-switch-handle{ &.u-switch-on .u-switch-handle{
background-color: transparent; background-color: transparent;
&:before{ &:before{
content: '\e6a9'; content: '\e6aa';
left: 0; left: 0;
} }
} }
&.u-switch-off .u-switch-handle{ &.u-switch-off .u-switch-handle{
background-color: transparent; background-color: transparent;
&:before{ &:before{
content: '\e6aa'; content: '\e6a9';
left: 0; left: 0;
} }
} }
...@@ -248,7 +258,7 @@ ...@@ -248,7 +258,7 @@
.mask(1051,@CUSTOM-BACKDROP-BG); .mask(1051,@CUSTOM-BACKDROP-BG);
.guideStep1{ .guideStep1{
position: absolute; position: absolute;
top: 44px; top: 46px;
left: 0; left: 0;
width: 100%; width: 100%;
.modeSelect:after{ .modeSelect:after{
...@@ -353,7 +363,7 @@ ...@@ -353,7 +363,7 @@
} }
.guideStep5{ .guideStep5{
position: absolute; position: absolute;
top: 248px; bottom: 116px;
left: 0; left: 0;
width: 100%; width: 100%;
.guideStep5Tip{ .guideStep5Tip{
......
...@@ -133,4 +133,8 @@ ...@@ -133,4 +133,8 @@
.buttonPosition(); .buttonPosition();
} }
.mediaPosition(); .mediaPosition();
\ No newline at end of file
.currentUser{
color: @CUSTOM-SWIPELIST-COMPONENT-TITLE-COLOR;
}
@import "../public/public.less";
@import "../public/header.less";
.title{
span{
.iconfont(16px);
margin-right: 12px;
}
font-size: 16px;
text-align: center;
padding-top: 28px;
}
.helpCont{
margin: 28px 35px 0;
li{
margin-bottom: 17px;
color: #91929a;
font-size: 12px;
line-height: 15px;
text-align: justify;
.contSubtitle{
font-size: 14px;
}
p{
margin-bottom: 8px;
}
}
.white{
color: #fff;
}
.contTitle{
font-size: 16px;
margin-top: 28px;
margin-bottom: 20px;
}
}
.u-button();
.custom-button{
.button();
.buttonPosition();
}
.mediaPosition();
\ No newline at end of file
...@@ -200,17 +200,24 @@ p{ ...@@ -200,17 +200,24 @@ p{
&when(@guideStepBool){ &when(@guideStepBool){
.guide-dialog{ .guide-dialog{
.guideStep5{ .guideStep5{
top: 228px; bottom: 96px;
.guideStep5Cont p{ // .guideStep5Cont p{
padding: 12px 0; // padding: 12px 0;
} // }
} }
} }
} }
&when(@switchBool){ &when(@switchBool){
.custom-select{
bottom: 178px;
}
.position{
bottom: 102px;
}
.custom-setHijack-switch{ .custom-setHijack-switch{
margin-top: 0; margin-top: 14px;
} }
} }
...@@ -368,6 +375,34 @@ p{ ...@@ -368,6 +375,34 @@ p{
} }
} }
.custom-process(){
.custom-process{
background-color: @CUSTOM-BACKDROP-BG;
.u-process-button{
bottom: 134px;
width: 100px;
color: #00ffff;
font-size: 12px;
background-color: transparent;
padding: 18px 0 5px;
&:after{
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;/*no*/
.blue_gradient_border();
}
.tap_row(transparent);
&.disabled{
background-color: transparent;
}
}
}
}
//自定义弹出框组件 //自定义弹出框组件
.custom-dialog(){ .custom-dialog(){
.custom-dialog{ .custom-dialog{
......
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
} }
} }
@media (max-height: 400px/*no*/){ @media (max-height: 450px/*no*/){
#app{ #app{
height: 647px; height: 647px;
position: relative; position: relative;
...@@ -894,6 +894,146 @@ ...@@ -894,6 +894,146 @@
}); });
} }
.u-process(){
.u-process{
.mask(1050);
.u-process-content{
.transformV_center(left,0);
width: 100%;
.loader{
font-size: 16px;
width: 3.750em;
height: 3.750em;
margin: 0 auto;
position: relative;
&:before{
content: '';
.margin_center(0.500em,0.500em);
border-radius: 50%;
.transform(translateZ(0) scale(0.55));
}
}
.icon{
font-size: 16px;
width: 3.750em;
height: 3.750em;
margin: 0 auto;
position: relative;
&:before{
.transform_center();
.iconfont(4.125em);
}
}
.u-process-text{
margin-top: 20px;
text-align: center;
}
}
.u-process-button{
position: absolute;
bottom: 65px;
left: 0;
width: 100%;
display: table;
table-layout: fixed;
border-collapse: separate;
border-spacing: 25px 0;
li{
// display: table-cell;
// color: @BUTTON-COMPONENT-COLOR;
// font-size: inherit;
// background-color: @BUTTON-COMPONENT-BG;
// border-radius: 5px;
// text-align: center;
// line-height: 1;
// padding: 10px 0;
// .transition(all 0.2s linear);
// background-clip: padding-box;
// //按钮 active
// .tap_row(@BUTTON-COMPONENT-ACTIVE-BG);
// //按钮 不可控
// &.disabled{
// background-color: @BUTTON-COMPONENT-DISABLED-BG;
// }
}
}
//loading
&.u-process-status-0{
.u-process-content{
color: #00ffff;
.loader{
display: block;
&:before{
.animation(commLoading 1.3s linear infinite);
}
}
.icon{
display: none;
}
}
}
//成功 state
&.u-process-status-1{
.u-process-content{
color: #00ffff;
.loader{
display: none;
}
.icon{
display: block;
&:before{
content: '\e800';
}
}
}
}
//失败 state
&.u-process-status-2{
.u-process-content{
color: #fff;
.loader{
display: none;
}
.icon{
display: block;
&:before{
content: '\e646';
}
}
}
}
}
.keyframes(commLoading,{
0%,
100% {
.box-shadow(0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0);
}
12.5% {
.box-shadow(0 -3em 0 0, 2em -2em 0 0.2em, 3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em);
}
25% {
.box-shadow(0 -3em 0 -0.5em, 2em -2em 0 0, 3em 0 0 0.2em, 2em 2em 0 0, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 -1em);
}
37.5% {
.box-shadow(0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em, -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em);
}
50% {
.box-shadow(0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em, -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em);
}
62.5% {
.box-shadow(0 -3em 0 -1em, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0, -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em);
}
75% {
.box-shadow(0em -3em 0 -1em, 2em -2em 0 -1em, 3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0.2em, -2em -2em 0 0);
}
87.5% {
.box-shadow(0em -3em 0 0, 2em -2em 0 -1em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em);
}
});
}
.edit-name(){ .edit-name(){
.edit-name-text{ .edit-name-text{
width: 100%; width: 100%;
......
...@@ -254,6 +254,7 @@ ...@@ -254,6 +254,7 @@
@CUSTOM-SWIPELIST-COMPONENT-BUTTON-COLOR: @C_BLUE_4; @CUSTOM-SWIPELIST-COMPONENT-BUTTON-COLOR: @C_BLUE_4;
@CUSTOM-SWIPELIST-COMPONENT-BUTTON-ICON-FONTSIZE: @F_SIZE_16; @CUSTOM-SWIPELIST-COMPONENT-BUTTON-ICON-FONTSIZE: @F_SIZE_16;
@CUSTOM-SWIPELIST-COMPONENT-DELETEBUTTON-BG: @BODY-BG-COLOR; @CUSTOM-SWIPELIST-COMPONENT-DELETEBUTTON-BG: @BODY-BG-COLOR;
@CUSTOM-SWIPELIST-COMPONENT-TITLE-COLOR: @C_BLUE_4;
//门锁用户列表 //门锁用户列表
@USERLIST-ROW-BG: @BODY-BG-COLOR; @USERLIST-ROW-BG: @BODY-BG-COLOR;
......
...@@ -806,7 +806,7 @@ p { ...@@ -806,7 +806,7 @@ p {
background: #bbb; background: #bbb;
} }
@media (max-height: 400px /*no*/) { @media (max-height: 450px /*no*/) {
#app { #app {
height: 17.253rem; height: 17.253rem;
position: relative; position: relative;
...@@ -911,7 +911,7 @@ p { ...@@ -911,7 +911,7 @@ p {
} }
} }
.u-comm-loading { .u-process {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
...@@ -921,24 +921,24 @@ p { ...@@ -921,24 +921,24 @@ p {
background-color: rgba(0, 0, 0, 0.8); background-color: rgba(0, 0, 0, 0.8);
} }
.u-comm-loading .u-comm-loading-content { .u-process .u-process-content {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 0; left: 0;
-webkit-transform: translateY(-50%); -webkit-transform: translateY(-50%);
transform: translateY(-50%); transform: translateY(-50%);
right: 0; width: 100%;
} }
.u-comm-loading .u-comm-loading-content .loader { .u-process .u-process-content .loader {
font-size: 0.427rem; font-size: 0.427rem;
margin: 0 auto;
width: 3.750em; width: 3.750em;
height: 3.750em; height: 3.750em;
margin: 0 auto;
position: relative; position: relative;
} }
.u-comm-loading .u-comm-loading-content .loader:before { .u-process .u-process-content .loader:before {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -953,15 +953,15 @@ p { ...@@ -953,15 +953,15 @@ p {
transform: translateZ(0) scale(0.55); transform: translateZ(0) scale(0.55);
} }
.u-comm-loading .u-comm-loading-content .icon { .u-process .u-process-content .icon {
font-size: 0.427rem; font-size: 0.427rem;
margin: 0 auto;
width: 3.750em; width: 3.750em;
height: 3.750em; height: 3.750em;
margin: 0 auto;
position: relative; position: relative;
} }
.u-comm-loading .u-comm-loading-content .icon:before { .u-process .u-process-content .icon:before {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
...@@ -973,100 +973,71 @@ p { ...@@ -973,100 +973,71 @@ p {
line-height: 1; line-height: 1;
} }
.u-comm-loading .u-comm-loading-content .u-comm-loading-text { .u-process .u-process-content .u-process-text {
font-size: 0.427rem;
margin-top: 0.533rem; margin-top: 0.533rem;
text-align: center; text-align: center;
} }
.u-comm-loading .u-comm-loading-button { .u-process .u-process-button {
position: absolute; position: absolute;
bottom: 1.733rem; bottom: 1.733rem;
left: 0; left: 0;
right: 0; width: 100%;
width: 6.4rem; display: table;
color: #fff; table-layout: fixed;
font-size: inherit; border-collapse: separate;
background-color: #007aff; border-spacing: 0.667rem 0;
border-radius: 0.533rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
}
.u-comm-loading .u-comm-loading-button:active {
background-color: #0065ff;
}
.u-comm-loading .u-comm-loading-button.disabled {
background-color: #bbb;
} }
.u-comm-loading.u-comm-loading-status-0 .u-comm-loading-content { .u-process.u-process-status-0 .u-process-content {
color: #00ffff; color: #00ffff;
} }
.u-comm-loading.u-comm-loading-status-0 .u-comm-loading-content .loader { .u-process.u-process-status-0 .u-process-content .loader {
display: block; display: block;
} }
.u-comm-loading.u-comm-loading-status-0 .u-comm-loading-content .loader:before { .u-process.u-process-status-0 .u-process-content .loader:before {
-webkit-animation: commLoading 1.3s infinite linear; -webkit-animation: commLoading 1.3s linear infinite;
animation: commLoading 1.3s infinite linear; animation: commLoading 1.3s linear infinite;
} }
.u-comm-loading.u-comm-loading-status-0 .u-comm-loading-content .icon { .u-process.u-process-status-0 .u-process-content .icon {
display: none; display: none;
} }
.u-comm-loading.u-comm-loading-status-0 .u-comm-loading-button { .u-process.u-process-status-1 .u-process-content {
display: none;
}
.u-comm-loading.u-comm-loading-status-1 .u-comm-loading-content {
color: #00ffff; color: #00ffff;
} }
.u-comm-loading.u-comm-loading-status-1 .u-comm-loading-content .loader { .u-process.u-process-status-1 .u-process-content .loader {
display: none; display: none;
} }
.u-comm-loading.u-comm-loading-status-1 .u-comm-loading-content .icon { .u-process.u-process-status-1 .u-process-content .icon {
display: block; display: block;
} }
.u-comm-loading.u-comm-loading-status-1 .u-comm-loading-content .icon:before { .u-process.u-process-status-1 .u-process-content .icon:before {
content: '\e800'; content: '\e800';
} }
.u-comm-loading.u-comm-loading-status-1 .u-comm-loading-button { .u-process.u-process-status-2 .u-process-content {
display: block;
}
.u-comm-loading.u-comm-loading-status-2 .u-comm-loading-content {
color: #fff; color: #fff;
} }
.u-comm-loading.u-comm-loading-status-2 .u-comm-loading-content .loader { .u-process.u-process-status-2 .u-process-content .loader {
display: none; display: none;
} }
.u-comm-loading.u-comm-loading-status-2 .u-comm-loading-content .icon { .u-process.u-process-status-2 .u-process-content .icon {
display: block; display: block;
} }
.u-comm-loading.u-comm-loading-status-2 .u-comm-loading-content .icon:before { .u-process.u-process-status-2 .u-process-content .icon:before {
content: '\e646'; content: '\e646';
} }
.u-comm-loading.u-comm-loading-status-2 .u-comm-loading-button {
display: block;
}
@-webkit-keyframes commLoading { @-webkit-keyframes commLoading {
0%, 100% { 0%, 100% {
-webkit-box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0; -webkit-box-shadow: 0 -3em 0 0.2em, 2em -2em 0 0em, 3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, -2em 2em 0 -1em, -3em 0 0 -1em, -2em -2em 0 0;
...@@ -1151,20 +1122,63 @@ p { ...@@ -1151,20 +1122,63 @@ p {
} }
} }
.custom-comm-loading { .scanContent {
background-color: rgba(36, 38, 53, 0.9); position: fixed;
top: 1.173rem;
bottom: 0;
left: 0;
width: 100%;
}
.noticeContent {
color: #c8225b;
line-height: 1.5;
text-align: center;
width: 100%;
display: inline-block;
position: absolute;
bottom: -5.333rem;
font-size: 0.32rem;
}
.noticeContent span:first-child {
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.custom-process-button {
position: absolute;
bottom: inherit;
left: 0;
right: 0;
width: 7.333rem;
border-radius: 0.133rem;
background-color: transparent;
border: 0.027rem solid;
color: #00ffff;
font-size: 0.427rem;
text-align: center;
line-height: 1;
margin: 0 auto;
padding: 0.267rem 0;
-webkit-transition: all 0.2s linear;
transition: all 0.2s linear;
background-clip: padding-box;
} }
.custom-comm-loading .u-comm-loading-button { .custom-process-cancelButton {
bottom: 3.573rem; bottom: 0;
width: 2.667rem; width: 2.667rem;
color: #00ffff; color: #00ffff;
font-size: 0.32rem; font-size: 0.32rem;
background-color: transparent; background-color: transparent;
padding: 0.48rem 0 0.133rem; padding: 0.48rem 0 0.133rem;
border: none;
} }
.custom-comm-loading .u-comm-loading-button:after { .custom-process-cancelButton:after {
content: ''; content: '';
position: absolute; position: absolute;
bottom: 0; bottom: 0;
...@@ -1175,18 +1189,18 @@ p { ...@@ -1175,18 +1189,18 @@ p {
background: linear-gradient(to right, #242635, #00ffff, #242635); background: linear-gradient(to right, #242635, #00ffff, #242635);
} }
.custom-comm-loading .u-comm-loading-button:active { .custom-process-cancelButton:active {
background-color: transparent; background-color: transparent;
} }
.custom-comm-loading .u-comm-loading-button.disabled { .custom-process-cancelButton.disabled {
background-color: transparent; background-color: transparent;
} }
.scanContent { .u-process.u-process-status-1 .u-process-content {
position: fixed; top: 5.333rem;
top: 1.173rem; }
bottom: 0;
left: 0; .u-process.u-process-status-2 .u-process-content {
width: 100%; top: 5.333rem;
} }
\ No newline at end of file
...@@ -27,6 +27,14 @@ ...@@ -27,6 +27,14 @@
</div> </div>
<div class="scanContent" id="bcid" > <div class="scanContent" id="bcid" >
</div> </div>
<u-process ref="uprocess" :init-param="componentsConfig.processLoading.initParam">
<p class="loader"></p>
<p class="icon"></p>
<p class="noticeContent" v-show = "noticeTipShowFlag">
<span>&#xe637;</span>
<span v-html="$t('wifiAdd.noticeTip')"></span>
</p>
</u-process>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -43,10 +43,18 @@ ...@@ -43,10 +43,18 @@
</ul> </ul>
<u-button :init-param="componentsConfig.connectButton.initParam" v-on:u-button-tap="onConnectButtonTap"></u-button> <u-button :init-param="componentsConfig.connectButton.initParam" v-on:u-button-tap="onConnectButtonTap"></u-button>
</div> </div>
<u-comm-loading ref="ucommloading" :init-param="componentsConfig.ucommloading.initParam" v-on:u-comm-loading-tap="onCommLoadingButtonTap()"> <!--<u-comm-loading ref="ucommloading" :init-param="componentsConfig.ucommloading.initParam" v-on:u-comm-loading-tap="onCommLoadingButtonTap()">
<p class="loader"></p> <p class="loader"></p>
<p class="icon"></p> <p class="icon"></p>
</u-comm-loading> </u-comm-loading> -->
<u-process ref="uprocess" :init-param="componentsConfig.processLoading.initParam">
<p class="loader"></p>
<p class="icon"></p>
<p class="noticeContent" v-show = "noticeTipShowFlag">
<span>&#xe637;</span>
<span v-html="$t('wifiAdd.noticeTip')"></span>
</p>
</u-process>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -643,7 +643,7 @@ p { ...@@ -643,7 +643,7 @@ p {
background: #bbb; background: #bbb;
} }
@media (max-height: 400px /*no*/) { @media (max-height: 450px /*no*/) {
#app { #app {
height: 17.253rem; height: 17.253rem;
position: relative; position: relative;
......
...@@ -25,7 +25,15 @@ ...@@ -25,7 +25,15 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.alarmInfo') }}</p> <p>{{ $t('title.alarmInfo') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.alarmInfoList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <div class="content">
<div class="notice" v-if="noticeTipShowFlag">
<span>&#xe637;</span>
{{ $t('notice.tip') }}
<v-touch tag="p" v-on:tap="onNotifycationSetting()">{{ $t('notice.button') }}
<span></span></v-touch>
</div>
<u-list ref="ulist" :init-param="componentsConfig.alarmInfoList.initParam" v-on:u-list-load="onListLoad()"></u-list>
</div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -537,7 +537,7 @@ p { ...@@ -537,7 +537,7 @@ p {
background: #bbb; background: #bbb;
} }
@media (max-height: 400px /*no*/) { @media (max-height: 450px /*no*/) {
#app { #app {
height: 17.253rem; height: 17.253rem;
position: relative; position: relative;
...@@ -1199,7 +1199,7 @@ p { ...@@ -1199,7 +1199,7 @@ p {
} }
.u-marquee .u-marquee-text { .u-marquee .u-marquee-text {
/*display: inline-block;*/ display: inline-block;
line-height: 0.667rem; line-height: 0.667rem;
} }
...@@ -1212,6 +1212,7 @@ p { ...@@ -1212,6 +1212,7 @@ p {
.custom-marquee .u-marquee-text { .custom-marquee .u-marquee-text {
line-height: 0.96rem; line-height: 0.96rem;
display: block;
} }
.custom-marquee:before { .custom-marquee:before {
...@@ -1248,7 +1249,7 @@ p { ...@@ -1248,7 +1249,7 @@ p {
color: #91929a; color: #91929a;
} }
/*.active .u-marquee-text { .active .u-marquee-text {
-webkit-animation: marquee 5s linear infinite; -webkit-animation: marquee 5s linear infinite;
animation: marquee 5s linear infinite; animation: marquee 5s linear infinite;
} }
...@@ -1263,9 +1264,9 @@ p { ...@@ -1263,9 +1264,9 @@ p {
-webkit-transform: translate(0,-100%); -webkit-transform: translate(0,-100%);
transform: translate(0,-100%); transform: translate(0,-100%);
} }
}*/ }
/*@keyframes marquee { @keyframes marquee {
from { from {
-webkit-transform: translate(0,0.533rem); -webkit-transform: translate(0,0.533rem);
transform: translate(0,0.533rem); transform: translate(0,0.533rem);
...@@ -1275,7 +1276,7 @@ p { ...@@ -1275,7 +1276,7 @@ p {
-webkit-transform: translate(0,-100%); -webkit-transform: translate(0,-100%);
transform: translate(0,-100%); transform: translate(0,-100%);
} }
}*/ }
.deviceHandle { .deviceHandle {
position: absolute; position: absolute;
...@@ -1620,4 +1621,164 @@ p { ...@@ -1620,4 +1621,164 @@ p {
height: 100%; height: 100%;
z-index: 1051; z-index: 1051;
background-color: #242635; background-color: #242635;
}
.custom-marquee .u-marquee-text {
display: block;
line-height: 0.96rem;
}
.active .u-marquee-text {
-webkit-animation: none;
animation: none;
}
.u-notification {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1051;
background-color: rgba(36, 38, 53, 0.9);
}
.u-notification .u-notification-box {
width: 8.933rem;
height: 8rem;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background-color: #242635;
color: #00ffff;
border: 1px solid;
border-radius: 0.133rem;
}
.u-notification .u-notification-box .u-notification-title {
position: relative;
padding-top: 0.267rem;
font-size: 0.427rem;
text-align: center;
}
.u-notification .u-notification-box .u-notification-close {
position: absolute;
top: 0;
right: 0;
width: 1.067rem;
height: 100%;
padding-top: 0.267rem;
font-family: iconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.u-notification .u-notification-box .u-notification-content {
width: 100%;
height: 3.92rem;
background: url("../../resources/image/noticeContBg.png") no-repeat center;
-webkit-background-size: auto 100%;
background-size: auto 100%;
padding-top: 1.627rem;
}
.u-notification .u-notification-box .u-notification-switch {
width: 4rem;
margin: 0.4rem auto;
padding: 0.267rem 0;
text-align: center;
font-size: 0.32rem;
}
.u-notification .u-notification-box .u-notification-switch .u-notification-switch-handle {
display: inline-block;
vertical-align: middle;
position: relative;
margin-right: 0.267rem;
width: 0.453rem;
height: 0.453rem;
}
.u-notification .u-notification-box .u-notification-switch .u-notification-switch-handle:before {
position: absolute;
top: 0;
left: 0;
font-family: iconfont;
font-size: 0.453rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.u-notification .u-notification-box .u-notification-switch.u-notification-switch-on .u-notification-switch-handle:before {
content: '\e6aa';
}
.u-notification .u-notification-box .u-notification-switch.u-notification-switch-off .u-notification-switch-handle:before {
content: '\e6a9';
}
.u-notification .u-notification-box .u-notification-button li {
width: 6.267rem;
border-radius: 0.133rem;
background-color: transparent;
border: 1px solid;
color: #00ffff;
font-size: 0.427rem;
line-height: 1;
margin: 0 auto;
text-align: center;
padding: 0.267rem 0;
}
.u-notification .u-notification-box .u-notification-button li:active {
background-color: #153D4C;
}
.u-notification .u-notification-box .u-notification-button li.disabled {
background-color: transparent;
color: #999;
}
.u-notification .u-notification-box .clearfix {
overflow: hidden;
padding: 0 1.44rem;
}
.u-notification .u-notification-box .leftCont {
float: left;
}
.u-notification .u-notification-box .rightCont {
float: right;
}
.u-notification .u-notification-box .logo {
width: 0.4rem;
height: 0.4rem;
background: url("../../resources/image/logo1.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
display: inline-block;
vertical-align: middle;
margin: 0 -0.213rem 0 0.213rem;
}
.u-notification .u-notification-box .smallFont {
color: #00b2b2;
font-size: 0.427rem;
-webkit-transform: scale(0.5);
transform: scale(0.5);
display: inline-block;
vertical-align: middle;
}
.u-notification .u-notification-box .tip {
text-align: center;
font-size: 0.32rem;
margin-top: 0.24rem;
line-height: 0.427rem;
} }
\ No newline at end of file
...@@ -25,8 +25,16 @@ ...@@ -25,8 +25,16 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.hijackRecord') }}</p> <p>{{ $t('title.hijackRecord') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.hijackRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <div class="content">
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <div class="notice" v-if="noticeTipShowFlag">
<span>&#xe637;</span>
{{ $t('notice.tip') }}
<v-touch tag="p" v-on:tap="onNotifycationSetting()">{{ $t('notice.button') }}
<span></span></v-touch>
</div>
<u-list ref="ulist" :init-param="componentsConfig.hijackRecordList.initParam" v-on:u-list-load="onListLoad()"></u-list>
</div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="header"> <div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap">&#xe69b;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap">&#xe6bf;</v-touch>
<p>{{ $t('title.device') }}</p> <p>{{ $t('title.device') }}</p>
</div> </div>
<div class="content"> <div class="content">
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
</u-comm-loading> </u-comm-loading>
</div> </div>
</transition> </transition>
<update-app :show-flag="true"></update-app>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../../lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./notify.css">
<style type="text/css">
[v-cloak]{
display: none;
}
</style>
<script type="text/javascript" src="../../lib/js/start.js"></script>
<script type="text/javascript" src="../../lib/js/p.js"></script>
<script type="text/javascript" src="../../lib/js/UIOT.js"></script>
</head>
<body>
<div id="content" v-cloak>
<android-notify :to-index="onNotifyToIndex"> </android-notify>
</div>
<script type="text/javascript" src="notify.js"></script>
</body>
</html>
\ No newline at end of file
...@@ -25,7 +25,15 @@ ...@@ -25,7 +25,15 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.opendoorRecord') }}</p> <p>{{ $t('title.opendoorRecord') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.opendoorRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <div class="content">
<div class="notice" v-if="noticeTipShowFlag">
<span>&#xe637;</span>
{{ $t('notice.tip') }}
<v-touch tag="p" v-on:tap="onNotifycationSetting()">{{ $t('notice.button') }}
<span></span></v-touch>
</div>
<u-list ref="ulist" :init-param="componentsConfig.opendoorRecordList.initParam" v-on:u-list-load="onListLoad()"></u-list>
</div>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -577,6 +577,17 @@ p { ...@@ -577,6 +577,17 @@ p {
line-height: 0.933rem; line-height: 0.933rem;
} }
.custom-list .u-list-load .u-list-load-animation {
width: 0.64rem;
height: 0.64rem;
display: inline-block;
background-image: url("../../resources/image/loading.png");
-webkit-animation: refresh 1s steps(8, end) infinite;
animation: refresh 1s steps(8, end) infinite;
background-size: cover;
vertical-align: middle;
}
.custom-list .u-list-tip { .custom-list .u-list-tip {
background-image: url("../../resources/image/noCont.png"); background-image: url("../../resources/image/noCont.png");
background-position: top center; background-position: top center;
...@@ -586,4 +597,73 @@ p { ...@@ -586,4 +597,73 @@ p {
color: #91929a; color: #91929a;
font-size: 0.427rem; font-size: 0.427rem;
padding-top: 2.347rem; padding-top: 2.347rem;
}
@-webkit-keyframes refresh {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
@keyframes refresh {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
.notice {
height: 1.653rem;
line-height: 1.653rem;
border-bottom: 2px solid #50515D;
text-align: center;
color: #00ffff;
font-size: 0.32rem;
}
.notice > span {
color: #fc2168;
font-family: iconfont;
font-size: 0.533rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
vertical-align: middle;
margin-right: 0.24rem;
}
.notice p {
display: inline-block;
color: #00ffff;
font-size: 0.32rem;
line-height: 1;
border-bottom: 1px solid;
padding-bottom: 1px;
margin-left: 0.64rem;
}
.notice p span {
margin-left: 0.16rem;
}
.notice p span:before {
content: '\e6c4';
font-family: iconfont;
font-size: 0.32rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.notice ~ .custom-list {
top: 2.827rem;
} }
\ No newline at end of file
...@@ -379,6 +379,14 @@ p { ...@@ -379,6 +379,14 @@ p {
display: none; display: none;
} }
.u-dialog-box .u-dialog-content span {
width: 1.36rem;
height: 1.36rem;
background: url("../../resources/image/green_unbindSuccess_icon.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
}
.header { .header {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -751,7 +759,7 @@ p { ...@@ -751,7 +759,7 @@ p {
background: #bbb; background: #bbb;
} }
@media (max-height: 400px /*no*/) { @media (max-height: 450px /*no*/) {
#app { #app {
height: 17.253rem; height: 17.253rem;
position: relative; position: relative;
...@@ -849,10 +857,6 @@ p { ...@@ -849,10 +857,6 @@ p {
line-height: 1; line-height: 1;
} }
.nameDisabled:before{
display: none;
}
.doorlockManage li:after { .doorlockManage li:after {
content: ''; content: '';
position: absolute; position: absolute;
...@@ -958,47 +962,8 @@ p { ...@@ -958,47 +962,8 @@ p {
left: 0; left: 0;
} }
.unbindState-dialog { .nameDisabled:before {
position: fixed; display: none;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1051;
background-color: rgba(36, 38, 53, 0.9);
}
.unbindState-dialog div {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: 8.933rem;
height: 5.68rem;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
color: #00ffff;
font-size: 0.427rem;
border: 1px solid;
border-radius: 0.133rem;
}
.unbindState-dialog div img {
display: block;
width: 1.733rem;
height: 1.733rem;
margin-bottom: 0.373rem;
} }
.custom-isClearSwitch-switch { .custom-isClearSwitch-switch {
...@@ -1049,7 +1014,7 @@ p { ...@@ -1049,7 +1014,7 @@ p {
} }
.custom-isClearSwitch-switch.u-switch-on .u-switch-handle:before { .custom-isClearSwitch-switch.u-switch-on .u-switch-handle:before {
content: '\e6aa'; content: '\e6aa';
left: 0; left: 0;
} }
...@@ -1060,4 +1025,55 @@ p { ...@@ -1060,4 +1025,55 @@ p {
.custom-isClearSwitch-switch.u-switch-off .u-switch-handle:before { .custom-isClearSwitch-switch.u-switch-off .u-switch-handle:before {
content: '\e6a9'; content: '\e6a9';
left: 0; left: 0;
}
.unbindState-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1051;
background-color: rgba(36, 38, 53, 0.9);
}
.unbindState-dialog div {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: 8.933rem;
height: 5.68rem;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
color: #00ffff;
font-size: 0.427rem;
border: 1px solid;
border-radius: 0.133rem;
}
.unbindState-dialog div img {
display: block;
width: 1.733rem;
height: 1.733rem;
margin-bottom: 0.373rem;
}
.custom-dialog .u-dialog-box .u-dialog-content span {
width: 1.36rem;
height: 1.36rem;
background: url("../../resources/image/green_unbindSuccess_icon.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
} }
\ No newline at end of file
...@@ -37,9 +37,11 @@ ...@@ -37,9 +37,11 @@
<p class="title">{{ $t('addUnlockInfo.opendoorRecord') }}</p> <p class="title">{{ $t('addUnlockInfo.opendoorRecord') }}</p>
<u-select ref="uselect" :value="recordSelectIndex" :init-param="componentsConfig.recordSelect.initParam" <u-select ref="uselect" :value="recordSelectIndex" :init-param="componentsConfig.recordSelect.initParam"
v-on:u-select-change="onRecordSelectChange(arguments[0])"></u-select> v-on:u-select-change="onRecordSelectChange(arguments[0])"></u-select>
<p class="tip">{{ $t('addUnlockInfo.tip') }}</p> <div class="position">
<u-switch :value="valueSetHijack" v-show="recordSelectList.length && selectedMode == 2" <p class="tip">{{ $t('addUnlockInfo.tip') }}</p>
:init-param="componentsConfig.setHijackSwitch.initParam" v-on:u-switch-tap="onSetHijackTap(arguments[0])"></u-switch> <u-switch :value="valueSetHijack" v-show="recordSelectList.length && selectedMode == 2"
:init-param="componentsConfig.setHijackSwitch.initParam" v-on:u-switch-tap="onSetHijackTap(arguments[0])"></u-switch>
</div>
</div> </div>
<u-button :init-param="componentsConfig.addButton.initParam" :disabled="!recordSelectList.length" v-on:u-button-tap="onAddButtonTap"></u-button> <u-button :init-param="componentsConfig.addButton.initParam" :disabled="!recordSelectList.length" v-on:u-button-tap="onAddButtonTap"></u-button>
</div> </div>
......
...@@ -531,7 +531,7 @@ p { ...@@ -531,7 +531,7 @@ p {
background: #bbb; background: #bbb;
} }
@media (max-height: 400px /*no*/) { @media (max-height: 450px /*no*/) {
#app { #app {
height: 17.253rem; height: 17.253rem;
position: relative; position: relative;
...@@ -723,10 +723,6 @@ p { ...@@ -723,10 +723,6 @@ p {
line-height: 1; line-height: 1;
} }
.userInfo-title-disabled:after {
display: none;
}
.userInfoLink li.userInfo .userInfo-subtitle { .userInfoLink li.userInfo .userInfo-subtitle {
position: relative; position: relative;
} }
...@@ -805,29 +801,49 @@ p { ...@@ -805,29 +801,49 @@ p {
} }
.inviteBind { .inviteBind {
margin: 1.067rem 1.013rem 0; margin: 1.093rem 1.12rem 0;
} }
.inviteBind li:first-child { .inviteBind li {
width: 5.333rem; color: #91929a;
height: 5.333rem; font-size: 0.427rem;
margin: 0 auto;
position: relative; position: relative;
} }
.inviteBind li:not(:first-child) { .inviteBind li.qrcode {
color: #91929a; width: 4.267rem;
font-size: 0.427rem; height: 4.267rem;
padding-left: 0.32rem; margin: 0 auto;
text-indent: -0.32rem; position: relative;
line-height: 0.533rem;
margin-top: 0.48rem;
} }
.inviteBind li:not(:first-child):nth-child(2) { .inviteBind li.title {
color: inherit; color: #fff;
font-size: 0.48rem; font-size: 0.48rem;
margin-top: 0.853rem; margin: 0.907rem 0 0.587rem;
}
.inviteBind li.tip {
font-size: 0.32rem;
text-align: center;
margin-top: 0.907rem;
}
.inviteBind li > span {
display: inline-block;
border: 1px solid;
border-radius: 50%;
text-align: center;
font-family: iconfont;
font-size: 0.32rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
background-color: #242635;
outline: 3px solid #242635;
color: #00ffff;
margin-right: 0.373rem;
position: relative;
padding: 0.107rem;
} }
.inviteBind li p { .inviteBind li p {
...@@ -849,6 +865,20 @@ p { ...@@ -849,6 +865,20 @@ p {
width: 100%; width: 100%;
} }
.inviteBind li:not(.qrcode):not(.title):not(.tip):not(.noBorder) {
padding-bottom: 0.453rem;
}
.inviteBind li:not(.qrcode):not(.title):not(.tip):not(.noBorder):before {
content: '';
position: absolute;
top: 0.053rem;
bottom: 0;
left: 0.293rem;
width: 1px;
background-color: #00ffff;
}
.unbindState-dialog { .unbindState-dialog {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -1098,4 +1128,8 @@ p { ...@@ -1098,4 +1128,8 @@ p {
.guide-dialog .guideStep6 { .guide-dialog .guideStep6 {
bottom: 1.2rem; bottom: 1.2rem;
} }
}
.userInfo-title-disabled:after {
display: none;
} }
\ No newline at end of file
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
</div> </div>
<div class="user-list"> <div class="user-list">
<ul class="user-list-scroll" v-show="userList.length"> <ul class="user-list-scroll" v-show="userList.length">
<v-touch tag="li" class="user-list-row" v-for="(item, index) in userList" :key="index" > <v-touch tag="li" class="user-list-row" v-for="(item, index) in userList" :key="index" >
<v-touch tag="div" class="user-list-handle" <v-touch tag="div" class="user-list-handle"
v-on:tap="onTapUserList(index)"> v-on:tap="onTapUserList(index)">
<img class="user-list-image" v-if="item.image && item.role == 0" v-bind:src="item.image"> <img class="user-list-image" v-if="item.image && item.role == 0" v-bind:src="item.image">
<div> <div>
<p class="user-list-title">{{ item.title == (null || '')? $t('userList.defaultName'):item.title}}</p> <p class="user-list-title" v-bind:class="{'currentUser': userListData[index].user_id == currentId }" >{{ item.title == (null || '')? $t('userList.defaultName'):item.title}}</p>
<p class="user-list-subtitle"> <p class="user-list-subtitle">
<img class="user-list-subimage" v-if="item.image && item.role != 0" v-bind:src="item.image"> <img class="user-list-subimage" v-if="item.image && item.role != 0" v-bind:src="item.image">
<span v-if="item.subtitle">{{ item.subtitle }}</span> <span v-if="item.subtitle">{{ item.subtitle }}</span>
......
...@@ -27,16 +27,17 @@ ...@@ -27,16 +27,17 @@
</div> </div>
<div class="content"> <div class="content">
<ul class="inviteBind"> <ul class="inviteBind">
<li> <li class="qrcode">
<canvas ref="qrcode"></canvas> <canvas ref="qrcode"></canvas>
<p v-show="qrCodeDisabled"> <p v-show="qrCodeDisabled">
<span>{{ $t('inviteBind.qrcodeExpireTip') }}</span> <span>{{ $t('inviteBind.qrcodeExpireTip') }}</span>
</p> </p>
</li> </li>
<li>{{ $t('inviteBind.title') }}</li> <li class="title">{{ $t('inviteBind.title') }}</li>
<li>{{ $t('inviteBind.cont1') }}</li> <li><span>&#xe6c1;</span>{{ $t('inviteBind.cont1') }}</li>
<li>{{ $t('inviteBind.cont2') }}</li> <li><span>&#xe6c0;</span>{{ $t('inviteBind.cont2') }}</li>
<li>{{ $t('inviteBind.cont3') }}</li> <li class="noBorder"><span>&#xe6c2;</span>{{ $t('inviteBind.cont3') }}</li>
<li class="tip">{{ $t('inviteBind.tip') }}</li>
</ul> </ul>
<u-button :init-param="componentsConfig.qrcodeButton.initParam" v-on:u-button-tap="onQRcodeButtonTap"></u-button> <u-button :init-param="componentsConfig.qrcodeButton.initParam" v-on:u-button-tap="onQRcodeButtonTap"></u-button>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment