Commit 8b366b1d by felix

Merge branch 'zjx' into test/96

parents 10c67794 6ff2e897
...@@ -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": "删除该用户",
...@@ -200,6 +203,7 @@ ...@@ -200,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": {
} }
...@@ -275,7 +279,8 @@ ...@@ -275,7 +279,8 @@
"title": "绑定方法:", "title": "绑定方法:",
"cont1": "1.受邀用户登录“U智锁”APP", "cont1": "1.受邀用户登录“U智锁”APP",
"cont2": "2.选择“扫描绑定设备”", "cont2": "2.选择“扫描绑定设备”",
"cont3": "3.扫描上方二维码完成绑定" "cont3": "3.扫描上方二维码完成绑定",
"tip": "注: 二维码有效时间为10分钟,过期请重新生成"
}, },
"unlockInfo":{ "unlockInfo":{
"bindUnlockInfo": "已关联的开锁信息", "bindUnlockInfo": "已关联的开锁信息",
...@@ -356,5 +361,20 @@ ...@@ -356,5 +361,20 @@
"contText2-2": "在设置中找到电量与性能,点击受保护的后台应用,找到本app并开启保护。", "contText2-2": "在设置中找到电量与性能,点击受保护的后台应用,找到本app并开启保护。",
"contText3-1": "安卓手机须将应用加入白名单中,否则清理后台杀掉应用进程后,只有手动开启应用才能恢复消息推送。", "contText3-1": "安卓手机须将应用加入白名单中,否则清理后台杀掉应用进程后,只有手动开启应用才能恢复消息推送。",
"contText3-2": "启动本app后打开多任务页面(清理后台应用的页面),将本app加入白名单。" "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":"进入首页"
}
} }
\ No newline at end of file
...@@ -186,9 +186,9 @@ ...@@ -186,9 +186,9 @@
}, },
"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": {
...@@ -277,9 +277,9 @@ ...@@ -277,9 +277,9 @@
"inviteBind":{ "inviteBind":{
"qrcodeExpireTip": "二维码已过期,请重新生成", "qrcodeExpireTip": "二维码已过期,请重新生成",
"title": "绑定方法:", "title": "绑定方法:",
"cont1": "1.受邀用户登录“U智锁”APP", "cont1": "受邀用户登录“U智锁”APP",
"cont2": "2.选择“扫描绑定设备”", "cont2": "选择“扫描绑定设备”",
"cont3": "3.扫描上方二维码完成绑定", "cont3": "扫描上方二维码完成绑定",
"tip": "注: 二维码有效时间为10分钟,过期请重新生成" "tip": "注: 二维码有效时间为10分钟,过期请重新生成"
}, },
"unlockInfo":{ "unlockInfo":{
...@@ -376,5 +376,11 @@ ...@@ -376,5 +376,11 @@
"step3content":"操作步骤:启动本APP后打开多任务页面(清理后台应用的页面),将本APP加入白名单。", "step3content":"操作步骤:启动本APP后打开多任务页面(清理后台应用的页面),将本APP加入白名单。",
"endSetting":"保存设置并开启应用", "endSetting":"保存设置并开启应用",
"toIndex":"进入首页" "toIndex":"进入首页"
},
"newFeature":{
"newVersion":"您有新的版本更新",
"tip": "版本更新",
"update":"更新",
"miss": "暂不更新"
} }
} }
\ No newline at end of file
import androidNotify from '../view/c_android-notify.vue'; 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, '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
/**
* 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>
...@@ -20,6 +20,7 @@ function init() { ...@@ -20,6 +20,7 @@ function init() {
uPublic.closeSlideBack(); uPublic.closeSlideBack();
//通用 图片轮播、跑马灯、开关、按钮、dialog、loading组件 //通用 图片轮播、跑马灯、开关、按钮、dialog、loading组件
uPublic.componentsInit(['u-carousel','u-marquee','u-switch','u-button','u-dialog','u-loading','u-text','u-comm-loading']); uPublic.componentsInit(['u-carousel','u-marquee','u-switch','u-button','u-dialog','u-loading','u-text','u-comm-loading']);
uPublic.componentsExtend(['update-app']);
if(iot.navigator.getExtras().needClose){ if(iot.navigator.getExtras().needClose){
iot.navigator.closeAllBesidesItself(); iot.navigator.closeAllBesidesItself();
} }
......
...@@ -210,9 +210,9 @@ function getDoorlockInfo(self){ ...@@ -210,9 +210,9 @@ function getDoorlockInfo(self){
let data = uPublic.checkResponseData(response.data); let data = uPublic.checkResponseData(response.data);
if(data){ if(data){
self.setTextNickname(data.device_name); self.setTextNickname(data.device_name);
self.setValueDoorbell(data.device_info.options[0]); self.setValueDoorbell(data.device_info.options.ring);
self.setValueAlarm(data.device_info.options[1]); self.setValueAlarm(data.device_info.options.alarm);
self.setValueOpendoor(data.device_info.options[2]); self.setValueOpendoor(data.device_info.options.open);
} }
}, },
error: (error) => { error: (error) => {
......
...@@ -134,7 +134,7 @@ function createQrcode(self, qrKey){ ...@@ -134,7 +134,7 @@ function createQrcode(self, qrKey){
margin: 2 margin: 2
},(error) => { },(error) => {
if (error) { if (error) {
console.log(error) console.log(error);
} else { } else {
console.log('success'); console.log('success');
qr.style.width = "5.333rem"; qr.style.width = "5.333rem";
......
...@@ -4696,13 +4696,13 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" ...@@ -4696,13 +4696,13 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
var Ready = __webpack_require__(1); var Ready = __webpack_require__(1);
var NativeBridge = function (_Ready) { var OSSettingBridge = function (_Ready) {
_inherits(NativeBridge, _Ready); _inherits(OSSettingBridge, _Ready);
function NativeBridge() { function OSSettingBridge() {
_classCallCheck(this, NativeBridge); _classCallCheck(this, OSSettingBridge);
var _this = _possibleConstructorReturn(this, (NativeBridge.__proto__ || Object.getPrototypeOf(NativeBridge)).call(this)); var _this = _possibleConstructorReturn(this, (OSSettingBridge.__proto__ || Object.getPrototypeOf(OSSettingBridge)).call(this));
document.addEventListener("plusready", function () { document.addEventListener("plusready", function () {
_this.onPlusready(); _this.onPlusready();
...@@ -4711,35 +4711,35 @@ var NativeBridge = function (_Ready) { ...@@ -4711,35 +4711,35 @@ var NativeBridge = function (_Ready) {
return _this; return _this;
} }
_createClass(NativeBridge, [{ _createClass(OSSettingBridge, [{
key: 'onPlusready', key: 'onPlusready',
value: function onPlusready() { value: function onPlusready() {
var _NATIVECODE = 'UgenNative', var _NATIVECODE = 'UgenNative',
B = window.plus.bridge, B = window.plus.bridge,
callbackID = void 0; callbackID = void 0;
var UgenNative = { var OSSetting = {
//判断通知是否开启 //判断通知是否开启
isNotifycationOpen: function isNotifycationOpen() { isNotifycationOpen: function isNotifycationOpen() {
return B.execSync(_NATIVECODE, "isNotifycationOpen", []); return B.execSync(_NATIVECODE, "isNotifycationOpen", []);
}, },
//跳转到通知设置界面 //跳转到通知设置界面
toNotifycationSetting: function toNotifycationSetting() { toSetting: function toSetting(type) {
return B.execSync(_NATIVECODE, "toNotifycationSetting", []); return B.execSync(_NATIVECODE, "toSetting", [type]);
} }
}; };
this.UgenNative = UgenNative; this.OSSetting = OSSetting;
} }
}, { }, {
key: 'onReady', key: 'onReady',
value: function onReady() { value: function onReady() {
return this.UgenNative; return this.OSSetting;
} }
}]); }]);
return NativeBridge; return OSSettingBridge;
}(Ready); }(Ready);
module.exports = NativeBridge; module.exports = OSSettingBridge;
/***/ }), /***/ }),
/* 43 */ /* 43 */
...@@ -4811,12 +4811,12 @@ var Bridge = __webpack_require__(42); ...@@ -4811,12 +4811,12 @@ var Bridge = __webpack_require__(42);
/** /**
* @class * @class
* BLE * OSSetting
*/ */
var NativeMethod = function () { var OSSettingMethod = function () {
function NativeMethod() { function OSSettingMethod() {
_classCallCheck(this, NativeMethod); _classCallCheck(this, OSSettingMethod);
this.map = []; this.map = [];
this.bridge = new Bridge(); this.bridge = new Bridge();
...@@ -4828,28 +4828,28 @@ var NativeMethod = function () { ...@@ -4828,28 +4828,28 @@ var NativeMethod = function () {
*/ */
_createClass(NativeMethod, [{ _createClass(OSSettingMethod, [{
key: 'isNotifycationOpen', key: "isNotifycationOpen",
value: function isNotifycationOpen() { value: function isNotifycationOpen() {
return this.bridge.obj.isNotifycationOpen(); return this.bridge.obj.isNotifycationOpen();
} }
/** /**
* 跳转到通知设置界面 * 跳转到通知设置界面
* @example iot.native.toNotifycationSetting * @example iot.native.toSetting
*/ */
}, { }, {
key: 'toNotifycationSetting', key: "toNotifycationSetting",
value: function toNotifycationSetting() { value: function toNotifycationSetting() {
return this.bridge.obj.toNotifycationSetting(); return this.bridge.obj.toSetting("notify");
} }
}]); }]);
return NativeMethod; return OSSettingMethod;
}(); }();
module.exports = NativeMethod; module.exports = OSSettingMethod;
/***/ }), /***/ }),
/* 45 */ /* 45 */
......
...@@ -142,27 +142,42 @@ ...@@ -142,27 +142,42 @@
//邀请绑定 //邀请绑定
.inviteBind{ .inviteBind{
margin: 40px 38px 0; margin: 41px 42px 0;
li{ li{
&:first-child{ color: @INVITEBIND-TEXT-COLOR;
font-size: @INVITEBIND-TEXT-FONTSIZE;
position: relative;
&.qrcode{
width: 200px; width: 200px;
height: 200px; height: 200px;
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;
} }
//二维码已过期,请重新生成 //二维码已过期,请重新生成
p{ p{
...@@ -178,11 +193,18 @@ ...@@ -178,11 +193,18 @@
width: 100%; width: 100%;
} }
} }
} &:not(.qrcode):not(.title):not(.tip):not(.noBorder){
.timeTip{ padding-bottom: 17px;
text-align: center; &:before{
font-size: 12px; content: '';
padding-left: 0; position: absolute;
top: 0;
bottom: 0;
left: 11px;
width: 1px;/*no*/
background-color: #00ffff;
}
}
} }
} }
......
...@@ -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>
......
...@@ -801,29 +801,51 @@ p { ...@@ -801,29 +801,51 @@ p {
} }
.inviteBind { .inviteBind {
margin: 1.067rem 1.013rem 0; margin: 1.093rem 1.12rem 0;
} }
.inviteBind li:first-child { .inviteBind li {
color: #91929a;
font-size: 0.427rem;
position: relative;
}
.inviteBind li.qrcode {
width: 5.333rem; width: 5.333rem;
height: 5.333rem; height: 5.333rem;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
} }
.inviteBind li:not(:first-child) { .inviteBind li.title {
color: #91929a; color: #fff;
font-size: 0.427rem; font-size: 0.48rem;
padding-left: 0.32rem; margin: 0.907rem 0 0.587rem;
text-indent: -0.32rem;
line-height: 0.533rem;
margin-top: 0.48rem;
} }
.inviteBind li:not(:first-child):nth-child(2) { .inviteBind li.tip {
color: inherit; font-size: 0.32rem;
font-size: 0.48rem; text-align: center;
margin-top: 0.853rem; margin-top: 0.907rem;
}
.inviteBind li > span {
display: inline-block;
width: 22px;
height: 22px;
border: 1px solid;
border-radius: 50%;
text-align: center;
font-family: iconfont;
font-size: 0.32rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
line-height: 22px;
background-color: #242635;
outline: 3px solid #242635;
color: #00ffff;
margin-right: 0.373rem;
position: relative;
} }
.inviteBind li p { .inviteBind li p {
...@@ -845,10 +867,18 @@ p { ...@@ -845,10 +867,18 @@ p {
width: 100%; width: 100%;
} }
.inviteBind .timeTip { .inviteBind li:not(.qrcode):not(.title):not(.tip):not(.noBorder) {
text-align: center; padding-bottom: 0.453rem;
font-size: 0.32rem; }
padding-left: 0;
.inviteBind li:not(.qrcode):not(.title):not(.tip):not(.noBorder):before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0.293rem;
width: 1px;
background-color: #00ffff;
} }
.unbindState-dialog { .unbindState-dialog {
......
...@@ -27,17 +27,17 @@ ...@@ -27,17 +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="timeTip">{{ $t('inviteBind.tip') }}</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