
新上一套MUI框架app界面模板
新上一套MUI框架app界面模板,高性能MUI框架模板,分享给大家
http://www.sucaihuo.com/templates/3694.html

British Type Hose Clamp Made in China
1.Our History
Weifang haihon International Co., Ltd has focused on top quality hose clamps for over 8 years in China. We started as a small operation, but now have become one of the leading suppliers in the fastener industry in China.
Today, Weifang haihon has been one of the top suppliers of quality hose clamps, such as: German type hose clamps, American type hose clamps. British type hose clamp and Heavy duty clamps.
2.Our Factory
We produce various of hose clamps and pipe coupling with different material. The annual production capacity reaches 100 million pieces or sets
3.Our Product
Weifang Haihon Products includes the following:
1, German type hose clamp
2, American type hose clamp
3, British type hose clamp
4, Heavy duty clamp
5, Mini Hose clamp
We supply our hose clamps to many countries, such as Germany, USA, Canada, Italy, Spain, Poland, Russia and so on. They are well received these years.
4.Product Application
Hose clamps are widely used for water, oil, steam and dust in automobile, gasoline engine, diesel engine, machine equipment, boat, mine, petroleum, chemical industry and agriculture. It is an ideal connection fastening.
5.Our Certificate
We always feel that all success of our company is directly related to the quality of the products we offer. We have got certificate of ISO9001, ISO/TS16949, SGS.
6.Production Equipment
We have modernized manufacture facilities, quality control systems and assemble lines.
7.Production Market
Our main export market:
Europe 45%
North America 20%
Asia 20%
South America 10%
8.Our service
We control the product quality critically for every step from material purchasing to production process.Our products are made by excellent steel material with advantages as skillful technique, strict test, strong fastening force and excellent endurance.
We trust your benefit is top important, so we will try to improve quality and control cost to meet your requirements.British Type Hose Clamp Made in China
website:http://www.haihonclamp.com/
website2:http://www.h-hoseclamp.com/
1.Our History
Weifang haihon International Co., Ltd has focused on top quality hose clamps for over 8 years in China. We started as a small operation, but now have become one of the leading suppliers in the fastener industry in China.
Today, Weifang haihon has been one of the top suppliers of quality hose clamps, such as: German type hose clamps, American type hose clamps. British type hose clamp and Heavy duty clamps.
2.Our Factory
We produce various of hose clamps and pipe coupling with different material. The annual production capacity reaches 100 million pieces or sets
3.Our Product
Weifang Haihon Products includes the following:
1, German type hose clamp
2, American type hose clamp
3, British type hose clamp
4, Heavy duty clamp
5, Mini Hose clamp
We supply our hose clamps to many countries, such as Germany, USA, Canada, Italy, Spain, Poland, Russia and so on. They are well received these years.
4.Product Application
Hose clamps are widely used for water, oil, steam and dust in automobile, gasoline engine, diesel engine, machine equipment, boat, mine, petroleum, chemical industry and agriculture. It is an ideal connection fastening.
5.Our Certificate
We always feel that all success of our company is directly related to the quality of the products we offer. We have got certificate of ISO9001, ISO/TS16949, SGS.
6.Production Equipment
We have modernized manufacture facilities, quality control systems and assemble lines.
7.Production Market
Our main export market:
Europe 45%
North America 20%
Asia 20%
South America 10%
8.Our service
We control the product quality critically for every step from material purchasing to production process.Our products are made by excellent steel material with advantages as skillful technique, strict test, strong fastening force and excellent endurance.
We trust your benefit is top important, so we will try to improve quality and control cost to meet your requirements.British Type Hose Clamp Made in China
website:http://www.haihonclamp.com/
website2:http://www.h-hoseclamp.com/

Barcod二维码扫描及其结果在webview中的信息的传递
图1为二维码效果图,图二是扫码后返回结果并关闭扫码页面。
直接上代码
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<meta http-equiv="content-security-policy">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link href="../../WEB-INF/plug/mui/css/mui.min.css" rel="stylesheet" />
<script src="../../WEB-INF/plug/mui/js/mui.min.js"></script>
<script type="text/javascript" src="../../WEB-INF/plug/js/security.js"></script>
<script type="text/javascript" src="../../WEB-INF/plug/js/common.js"></script>
<style type="text/css">
#bcid {
width: 100%;
height: 100%;
position: absolute;
background: #000000;
}
html,
body,
div {
height: 100%;
width: 100%;
}
.fbt {
color: #ffffff;
width: 50%;
float: left;
line-height: 44px;
text-align: center;
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav" style="background-color: rgba(221, 221, 221, 0);z-index: 99999;">
<h1 class="mui-title" style="color: #ffffff;">二维码扫描</h1>
<span class="mui-icon mui-icon-spinner-cycle mui-spin mui-pull-right" id="turnTheLight"></span>
</header>
<div id="bcid">
<!--盛放扫描控件的div-->
</div>
<div style="background-color: rgba(221, 221, 221, 0);z-index: 99999" class="mui-bar mui-bar-footer" style="padding: 0px;">
<div class="fbt" onclick="scanPicture();">从相册选择二维码</div>
<div class="fbt mui-action-back">取 消</div>
</div>
<script type="text/javascript">
var height = window.innerHeight + 'px'; //获取页面实际高度
var width = window.innerWidth + 'px';
document.getElementById("bcid").style.height = height;
document.getElementById("bcid").style.width = width;
scan = null; //扫描对象
mui.plusReady(function() { //通过mui初始化扫描
mui.init();
setTimeout("startRecognize()", 300)
});
function startRecognize() { //开启扫描
try {
var filter;
//自定义的扫描控件样式
var styles = {
frameColor: "#29E52C",
scanbarColor: "#29E52C",
background: "rgba(255,255,255,-20)"
}
//扫描控件构造
scan = new plus.barcode.Barcode('bcid', filter, styles);
scan.onmarked = onmarked;
scan.onerror = onerror; //扫描错误
scan.start();
//打开关闭闪光灯处理
var flag = false;
document.getElementById("turnTheLight").addEventListener('tap', function() {
if(flag == false) {
scan.setFlash(true);
flag = true;
} else {
scan.setFlash(false);
flag = false;
}
});
} catch(e) {
mui.toast("出现错误啦:\n" + e)
}
};
function onerror(e) { //错误弹框
alert(e);
};
function onmarked(type, result) { //这个是扫描二维码的回调函数,type是扫描二维码回调的类型
var text = '';
switch(type) { //QR,EAN13,EAN8都是二维码的一种编码格式,result是返回的结果
case plus.barcode.QR:
text = 'QR: ';
break;
case plus.barcode.EAN13:
text = 'EAN13: ';
break;
case plus.barcode.EAN8:
text = 'EAN8: ';
break;
}
smresult(result);
};
// 从相册中选择二维码图片
function scanPicture() { //可以直接识别二维码图片
plus.gallery.pick(function(path) {
plus.barcode.scan(path, onmarked, function(error) {
//plus.nativeUI.alert("无法识别此图片");
mui.toast("无法识别此图片");
});
}, function(err) {
plus.nativeUI.alert("Failed: " + err.message);
});
}
//关闭扫码页面
function closeSm() {
scan.close();
plus.webview.currentWebview().close('none');
}
//结果处理
function smresult(result) {
var bType = getBarcodeType(result);//二维吗类型
var type = localStorage.getItem("type");
if(type == "addfile") {
//添加档案扫码处理
if(bType==TMLX_JDCDA||bType==TMLX_JSZDA) {
var tmnr = result;
tmnr = getUrlp(tmnr);
var params = "{" + "'method':'getTmxx'," + "'tmnr':" + "'" + tmnr + "'" + "}"
var datajson = eval('(' + getData(params) + ')');
var str = '<li><input class="file-num" value="' + datajson.obj.FILE_NUMBER + '" type="text" /><i onclick="remove(this)">╳</i></li>'
var wn = plus.webview.currentWebview(); //获取当前窗口的WebviewObject对象,即B
var wvA = wn.opener(); //获取当前窗口的创建者,即A
wvA.evalJS("addNew('" + str + "')"); //执行父窗口中的方法 A中的addNew方法
plus.webview.currentWebview().close(); //扫码成功,关闭当前webview
} else {
mui.toast("请扫描档案二维码")
scan.start();
}
} else if(type == "getgezi") {
//扫码格子获取格子信息
if(bType==TMLX_JDCDA||bType==TMLX_JSZDA) {
gezism(result);
var wn = plus.webview.currentWebview(); //获取当前窗口的WebviewObject对象,即B
var wvA = wn.opener(); //获取当前窗口的创建者,即A
wvA.evalJS("addGeZi('" + str + "')"); //执行父窗口中的方法 A中的addNew方法
plus.webview.currentWebview().close(); //扫码成功,关闭当前webview
localStorage.setItem("ifFrist", "none"); //设置不是首次调用
}else{
mui.toast("请扫描格子二维码")
scan.start();
}
} else if(type == "sys") {
if(bType == TMLX_GEZI) {
/**条码类型:格子*/
var btnArray = ['取消', '确认'];
mui.confirm("是否进行入库操作?", "提示", btnArray, function(e) {
if(e.index == 1) {
localStorage.setItem("ifFrist", "none"); //设置不是首次调用避免重复扫码
localStorage.setItem("sysSign", "true");
var str =gezism(result);
localStorage.setItem("str", str);
var webview = mui.openWindow({
url: "../rk/rk.html",
id: "rk.html",
waiting: {
autoShow: false //自动显示等待框,默认为true
},
createNew: true
});
setTimeout("plus.webview.currentWebview().close()", 300)//扫码成功,关闭当前webview
} else {
scan.start();
}
});
} else if(bType == TMLX_JDCDA) {
/**条码类型:机动车档案*/
alert("条码类型:机动车档案");
scan.start();
} else if(bType == TMLX_JSZDA) {
/**条码类型:驾驶证档案*/
alert("条码类型:驾驶证档案");
scan.start();
} else if(bType == TMLX_DAG) {
/**条码类型:档案柜*/
alert("条码类型:档案柜");
scan.start();
}
}
}
//格子扫码操作
function gezism(result) {
var tmnr = result;
tmnr = getUrlp(tmnr);
var params = "{" + "'method':'getTmxx'," + "'tmnr':" + "'" + tmnr + "'" + "}"
var datajson = eval('(' + getData(params) + ')');
//获取格子最大序号
var param2 = "{" + "'method':'getDaccxh'," + "'gzcode':" + "'" + datajson.obj.GZCODE + "'" + "}"
var dataxh = eval('(' + getData(param2) + ')');
var str = '<li><i>编码:' + datajson.obj.GZCODE + '</i><i>已存数:' + dataxh.obj.xh + '</i></li>';
str += '<li><i>行:' + datajson.obj.ROS + '</i><i>列:' + datajson.obj.COLS + '</i><i>面:' + datajson.obj.ASPECT + '</i></li>'
localStorage.setItem("gzcode", datajson.obj.GZCODE); //gz保存code
return str;
}
</script>
</body>
</html>
图1为二维码效果图,图二是扫码后返回结果并关闭扫码页面。
直接上代码
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<meta http-equiv="content-security-policy">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link href="../../WEB-INF/plug/mui/css/mui.min.css" rel="stylesheet" />
<script src="../../WEB-INF/plug/mui/js/mui.min.js"></script>
<script type="text/javascript" src="../../WEB-INF/plug/js/security.js"></script>
<script type="text/javascript" src="../../WEB-INF/plug/js/common.js"></script>
<style type="text/css">
#bcid {
width: 100%;
height: 100%;
position: absolute;
background: #000000;
}
html,
body,
div {
height: 100%;
width: 100%;
}
.fbt {
color: #ffffff;
width: 50%;
float: left;
line-height: 44px;
text-align: center;
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav" style="background-color: rgba(221, 221, 221, 0);z-index: 99999;">
<h1 class="mui-title" style="color: #ffffff;">二维码扫描</h1>
<span class="mui-icon mui-icon-spinner-cycle mui-spin mui-pull-right" id="turnTheLight"></span>
</header>
<div id="bcid">
<!--盛放扫描控件的div-->
</div>
<div style="background-color: rgba(221, 221, 221, 0);z-index: 99999" class="mui-bar mui-bar-footer" style="padding: 0px;">
<div class="fbt" onclick="scanPicture();">从相册选择二维码</div>
<div class="fbt mui-action-back">取 消</div>
</div>
<script type="text/javascript">
var height = window.innerHeight + 'px'; //获取页面实际高度
var width = window.innerWidth + 'px';
document.getElementById("bcid").style.height = height;
document.getElementById("bcid").style.width = width;
scan = null; //扫描对象
mui.plusReady(function() { //通过mui初始化扫描
mui.init();
setTimeout("startRecognize()", 300)
});
function startRecognize() { //开启扫描
try {
var filter;
//自定义的扫描控件样式
var styles = {
frameColor: "#29E52C",
scanbarColor: "#29E52C",
background: "rgba(255,255,255,-20)"
}
//扫描控件构造
scan = new plus.barcode.Barcode('bcid', filter, styles);
scan.onmarked = onmarked;
scan.onerror = onerror; //扫描错误
scan.start();
//打开关闭闪光灯处理
var flag = false;
document.getElementById("turnTheLight").addEventListener('tap', function() {
if(flag == false) {
scan.setFlash(true);
flag = true;
} else {
scan.setFlash(false);
flag = false;
}
});
} catch(e) {
mui.toast("出现错误啦:\n" + e)
}
};
function onerror(e) { //错误弹框
alert(e);
};
function onmarked(type, result) { //这个是扫描二维码的回调函数,type是扫描二维码回调的类型
var text = '';
switch(type) { //QR,EAN13,EAN8都是二维码的一种编码格式,result是返回的结果
case plus.barcode.QR:
text = 'QR: ';
break;
case plus.barcode.EAN13:
text = 'EAN13: ';
break;
case plus.barcode.EAN8:
text = 'EAN8: ';
break;
}
smresult(result);
};
// 从相册中选择二维码图片
function scanPicture() { //可以直接识别二维码图片
plus.gallery.pick(function(path) {
plus.barcode.scan(path, onmarked, function(error) {
//plus.nativeUI.alert("无法识别此图片");
mui.toast("无法识别此图片");
});
}, function(err) {
plus.nativeUI.alert("Failed: " + err.message);
});
}
//关闭扫码页面
function closeSm() {
scan.close();
plus.webview.currentWebview().close('none');
}
//结果处理
function smresult(result) {
var bType = getBarcodeType(result);//二维吗类型
var type = localStorage.getItem("type");
if(type == "addfile") {
//添加档案扫码处理
if(bType==TMLX_JDCDA||bType==TMLX_JSZDA) {
var tmnr = result;
tmnr = getUrlp(tmnr);
var params = "{" + "'method':'getTmxx'," + "'tmnr':" + "'" + tmnr + "'" + "}"
var datajson = eval('(' + getData(params) + ')');
var str = '<li><input class="file-num" value="' + datajson.obj.FILE_NUMBER + '" type="text" /><i onclick="remove(this)">╳</i></li>'
var wn = plus.webview.currentWebview(); //获取当前窗口的WebviewObject对象,即B
var wvA = wn.opener(); //获取当前窗口的创建者,即A
wvA.evalJS("addNew('" + str + "')"); //执行父窗口中的方法 A中的addNew方法
plus.webview.currentWebview().close(); //扫码成功,关闭当前webview
} else {
mui.toast("请扫描档案二维码")
scan.start();
}
} else if(type == "getgezi") {
//扫码格子获取格子信息
if(bType==TMLX_JDCDA||bType==TMLX_JSZDA) {
gezism(result);
var wn = plus.webview.currentWebview(); //获取当前窗口的WebviewObject对象,即B
var wvA = wn.opener(); //获取当前窗口的创建者,即A
wvA.evalJS("addGeZi('" + str + "')"); //执行父窗口中的方法 A中的addNew方法
plus.webview.currentWebview().close(); //扫码成功,关闭当前webview
localStorage.setItem("ifFrist", "none"); //设置不是首次调用
}else{
mui.toast("请扫描格子二维码")
scan.start();
}
} else if(type == "sys") {
if(bType == TMLX_GEZI) {
/**条码类型:格子*/
var btnArray = ['取消', '确认'];
mui.confirm("是否进行入库操作?", "提示", btnArray, function(e) {
if(e.index == 1) {
localStorage.setItem("ifFrist", "none"); //设置不是首次调用避免重复扫码
localStorage.setItem("sysSign", "true");
var str =gezism(result);
localStorage.setItem("str", str);
var webview = mui.openWindow({
url: "../rk/rk.html",
id: "rk.html",
waiting: {
autoShow: false //自动显示等待框,默认为true
},
createNew: true
});
setTimeout("plus.webview.currentWebview().close()", 300)//扫码成功,关闭当前webview
} else {
scan.start();
}
});
} else if(bType == TMLX_JDCDA) {
/**条码类型:机动车档案*/
alert("条码类型:机动车档案");
scan.start();
} else if(bType == TMLX_JSZDA) {
/**条码类型:驾驶证档案*/
alert("条码类型:驾驶证档案");
scan.start();
} else if(bType == TMLX_DAG) {
/**条码类型:档案柜*/
alert("条码类型:档案柜");
scan.start();
}
}
}
//格子扫码操作
function gezism(result) {
var tmnr = result;
tmnr = getUrlp(tmnr);
var params = "{" + "'method':'getTmxx'," + "'tmnr':" + "'" + tmnr + "'" + "}"
var datajson = eval('(' + getData(params) + ')');
//获取格子最大序号
var param2 = "{" + "'method':'getDaccxh'," + "'gzcode':" + "'" + datajson.obj.GZCODE + "'" + "}"
var dataxh = eval('(' + getData(param2) + ')');
var str = '<li><i>编码:' + datajson.obj.GZCODE + '</i><i>已存数:' + dataxh.obj.xh + '</i></li>';
str += '<li><i>行:' + datajson.obj.ROS + '</i><i>列:' + datajson.obj.COLS + '</i><i>面:' + datajson.obj.ASPECT + '</i></li>'
localStorage.setItem("gzcode", datajson.obj.GZCODE); //gz保存code
return str;
}
</script>
</body>
</html>
收起阅读 »
友盟统计
1.集成
1) 注册友盟账号获取appkey,因为android和ios不建议使用同一个appkey,所以添加两个应用,一个android一个ios。
2) 设置manifest.json文件。
SDK配置:将两appkey填写到对应的appkey输入框。channel是统计app安装渠道的,可以先暂时随便书一些字符串。
ios一般是appStore,android可以先暂时unknow
模块权限配置:添加统计模块
3)友盟注册自定义事件。设置->事件->添加事件。事件分计数事件和计算事件,具体区别查看友盟
4)app中调用统计的api。
计数事件:plus.statistic.eventTrig()
计算事件:plus.statistic.eventDuration()
5)统计有可能不是实时统计的,所以有可能需要隔天才能看到数据
6)友盟统计分为两种方式,一种是启动时发送,一种是按间隔发送,具体使用哪种按情况而定。我选择的是按间隔发送
7)友盟的集成测试不知道应该如何测试。不知到是否支持,没测试成功
1.集成
1) 注册友盟账号获取appkey,因为android和ios不建议使用同一个appkey,所以添加两个应用,一个android一个ios。
2) 设置manifest.json文件。
SDK配置:将两appkey填写到对应的appkey输入框。channel是统计app安装渠道的,可以先暂时随便书一些字符串。
ios一般是appStore,android可以先暂时unknow
模块权限配置:添加统计模块
3)友盟注册自定义事件。设置->事件->添加事件。事件分计数事件和计算事件,具体区别查看友盟
4)app中调用统计的api。
计数事件:plus.statistic.eventTrig()
计算事件:plus.statistic.eventDuration()
5)统计有可能不是实时统计的,所以有可能需要隔天才能看到数据
6)友盟统计分为两种方式,一种是启动时发送,一种是按间隔发送,具体使用哪种按情况而定。我选择的是按间隔发送
7)友盟的集成测试不知道应该如何测试。不知到是否支持,没测试成功

MUI中获取Json节点内容
1.将json数据转化为字符串:用json.stringify函数,如:
responsex = JSON.stringify(response);
responseEl.innerHTML = responsex;
2.要获取其他节点:直接如下:
someitemEl.innerHTML = response["result"];
1.将json数据转化为字符串:用json.stringify函数,如:
responsex = JSON.stringify(response);
responseEl.innerHTML = responsex;
2.要获取其他节点:直接如下:
someitemEl.innerHTML = response["result"];
收起阅读 »

Hbuilder护眼主题分享
Sublime还有Webstorm有很多主题,但是Hbuilder就相对较少,或者直接说基本没什么主题,在网上搜索了很久也很少有Hbuilder的主题分享,于是就自己取色调了一个仿的护眼主题来分享一下,希望能帮助到和我一样想换主题的朋友~
哇新手不会在这插入图片啊,这是效果图啊!
https://imgsa.baidu.com/forum/w%3D580/sign=94d273a0ec1190ef01fb92d7fe1a9df7/ddf279dda3cc7cd99cf797943201213fb90e9106.jpg
使用方法:
方法一:把下面一大堆代码复制一下,保存在后缀为 .tmTheme 的文件中,名字随便取,重要的是后缀。然后再Hbuilder中视觉主题设置中选择“高级”选项,导入 .tmTheme 的文件就可以了。
方法二:如果你懒得复制粘贴,那就直接下载 .tmTheme 文件就好了,然后再导入。下载地址:http://pan.baidu.com/s/1hseoAcG
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>eyecare</string>
<key>uuid</key>
<string>a6e4607a-4f30-32a2-8df4-b2e341afa72e</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f2</string>
<key>background</key>
<string>#282c34</string>
<key>caret</key>
<string>#5ba4cf</string>
<key>lineHighlight</key>
<string>#49483eff</string>
<key>selection</key>
<string>#808080ff</string>
<key>invisibles</key>
<string>#404040</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>invisibles</string>
<key>scope</key>
<string>invisibles</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#49483eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>-Common-</string>
<key>scope</key>
<string>dont.match</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>--Console--</string>
<key>scope</key>
<string>dont.match</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.error</string>
<key>scope</key>
<string>console.error</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ca0000ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.input</string>
<key>scope</key>
<string>console.input</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#d5cc6dff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.prompt</string>
<key>scope</key>
<string>console.prompt</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#c59163ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.warning</string>
<key>scope</key>
<string>console.warning</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cccc33ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.debug</string>
<key>scope</key>
<string>console.debug</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#80b96eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>hyperlink</string>
<key>scope</key>
<string>hyperlink</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#db6a73ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>--Misc.--</string>
<key>scope</key>
<string>dont.match</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Unstaged files</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f8ff</string>
<key>background</key>
<string>#420e09ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Staged files</string>
<key>scope</key>
<string>markup.inserted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f8ff</string>
<key>background</key>
<string>#253b22ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.changed</string>
<key>scope</key>
<string>markup.changed</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f8ff</string>
<key>background</key>
<string>#4a410dff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.underline</string>
<key>scope</key>
<string>markup.underline</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f2ff</string>
<key>fontStyle</key>
<string>underline</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.bold</string>
<key>scope</key>
<string>markup.bold</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
<key>fontStyle</key>
<string>bold</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.italic</string>
<key>scope</key>
<string>markup.italic</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.diff, meta.diff.header</string>
<key>scope</key>
<string>meta.diff, meta.diff.header</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f8ff</string>
<key>background</key>
<string>#006fa4ff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.separator.diff</string>
<key>scope</key>
<string>meta.separator.diff</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffffffff</string>
<key>background</key>
<string>#3467d1ff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.separator</string>
<key>scope</key>
<string>meta.separator</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffffffff</string>
<key>background</key>
<string>#3467d1ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>property</string>
<key>scope</key>
<string>property</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#879ab5ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>-Theme Specific-</string>
<key>scope</key>
<string>dont.match</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Comment</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#75715eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String</string>
<key>scope</key>
<string>string</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#80b96eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Number</string>
<key>scope</key>
<string>constant.numeric</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#c59163ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Built-in constant</string>
<key>scope</key>
<string>constant.language</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ae81ffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>User-defined constant</string>
<key>scope</key>
<string>constant.character, constant.other</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ae81ffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Variable</string>
<key>scope</key>
<string>variable</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Keyword</string>
<key>scope</key>
<string>keyword</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#55b5bcff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Storage</string>
<key>scope</key>
<string>storage</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#db6a73ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Storage type</string>
<key>scope</key>
<string>storage.type</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#b76bbaff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Class name</string>
<key>scope</key>
<string>entity.name.class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cb9856ff</string>
<key>fontStyle</key>
<string>underline</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Inherited class</string>
<key>scope</key>
<string>entity.other.inherited-class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cb9856ff</string>
<key>fontStyle</key>
<string>italic,underline</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function name</string>
<key>scope</key>
<string>entity.name.function</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cb9856ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function argument</string>
<key>scope</key>
<string>variable.parameter</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#fd971fff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag name</string>
<key>scope</key>
<string>entity.name.tag</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#db6a73ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag attribute</string>
<key>scope</key>
<string>entity.other.attribute-name</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cb9856ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library function</string>
<key>scope</key>
<string>support.function</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#b76bbaff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library constant</string>
<key>scope</key>
<string>support.constant</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#80b96eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library class/type</string>
<key>scope</key>
<string>support.type, support.class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library variable</string>
<key>scope</key>
<string>support.other.variable</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Invalid</string>
<key>scope</key>
<string>invalid</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f0ff</string>
<key>background</key>
<string>#f92672ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Invalid deprecated</string>
<key>scope</key>
<string>invalid.deprecated</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f0ff</string>
<key>background</key>
<string>#ae81ffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffe0e0ff</string>
<key>background</key>
<string>#9a0b0bff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.inserted</string>
<key>scope</key>
<string>markup.inserted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#d4ffd4ff</string>
<key>background</key>
<string>#3ca83cff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>punctuation.section</string>
<key>scope</key>
<string>punctuation.section</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffa727ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Annotation Override - searchResultIndication</string>
<key>scope</key>
<string>override.searchResultIndication</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Annotation Override - xmlTagPairOccurrenceIndication</string>
<key>scope</key>
<string>override.xmlTagPairOccurrenceIndication</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Annotation Override - htmlTagPairOccurrenceIndication</string>
<key>scope</key>
<string>override.htmlTagPairOccurrenceIndication</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Annotation Override - rubyBlockPairOccurrenceIndication</string>
<key>scope</key>
<string>override.rubyBlockPairOccurrenceIndication</string>
<key>settings</key>
<dict>
</dict>
</dict>
</array>
</dict>
</plist>
Sublime还有Webstorm有很多主题,但是Hbuilder就相对较少,或者直接说基本没什么主题,在网上搜索了很久也很少有Hbuilder的主题分享,于是就自己取色调了一个仿的护眼主题来分享一下,希望能帮助到和我一样想换主题的朋友~
哇新手不会在这插入图片啊,这是效果图啊!
https://imgsa.baidu.com/forum/w%3D580/sign=94d273a0ec1190ef01fb92d7fe1a9df7/ddf279dda3cc7cd99cf797943201213fb90e9106.jpg
使用方法:
方法一:把下面一大堆代码复制一下,保存在后缀为 .tmTheme 的文件中,名字随便取,重要的是后缀。然后再Hbuilder中视觉主题设置中选择“高级”选项,导入 .tmTheme 的文件就可以了。
方法二:如果你懒得复制粘贴,那就直接下载 .tmTheme 文件就好了,然后再导入。下载地址:http://pan.baidu.com/s/1hseoAcG
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>eyecare</string>
<key>uuid</key>
<string>a6e4607a-4f30-32a2-8df4-b2e341afa72e</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f2</string>
<key>background</key>
<string>#282c34</string>
<key>caret</key>
<string>#5ba4cf</string>
<key>lineHighlight</key>
<string>#49483eff</string>
<key>selection</key>
<string>#808080ff</string>
<key>invisibles</key>
<string>#404040</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>invisibles</string>
<key>scope</key>
<string>invisibles</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#49483eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>-Common-</string>
<key>scope</key>
<string>dont.match</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>--Console--</string>
<key>scope</key>
<string>dont.match</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.error</string>
<key>scope</key>
<string>console.error</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ca0000ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.input</string>
<key>scope</key>
<string>console.input</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#d5cc6dff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.prompt</string>
<key>scope</key>
<string>console.prompt</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#c59163ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.warning</string>
<key>scope</key>
<string>console.warning</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cccc33ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>console.debug</string>
<key>scope</key>
<string>console.debug</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#80b96eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>hyperlink</string>
<key>scope</key>
<string>hyperlink</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#db6a73ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>--Misc.--</string>
<key>scope</key>
<string>dont.match</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Unstaged files</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f8ff</string>
<key>background</key>
<string>#420e09ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Staged files</string>
<key>scope</key>
<string>markup.inserted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f8ff</string>
<key>background</key>
<string>#253b22ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.changed</string>
<key>scope</key>
<string>markup.changed</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f8ff</string>
<key>background</key>
<string>#4a410dff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.underline</string>
<key>scope</key>
<string>markup.underline</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f2ff</string>
<key>fontStyle</key>
<string>underline</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.bold</string>
<key>scope</key>
<string>markup.bold</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
<key>fontStyle</key>
<string>bold</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.italic</string>
<key>scope</key>
<string>markup.italic</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.diff, meta.diff.header</string>
<key>scope</key>
<string>meta.diff, meta.diff.header</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f8ff</string>
<key>background</key>
<string>#006fa4ff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.separator.diff</string>
<key>scope</key>
<string>meta.separator.diff</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffffffff</string>
<key>background</key>
<string>#3467d1ff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.separator</string>
<key>scope</key>
<string>meta.separator</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffffffff</string>
<key>background</key>
<string>#3467d1ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>property</string>
<key>scope</key>
<string>property</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#879ab5ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>-Theme Specific-</string>
<key>scope</key>
<string>dont.match</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Comment</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#75715eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String</string>
<key>scope</key>
<string>string</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#80b96eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Number</string>
<key>scope</key>
<string>constant.numeric</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#c59163ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Built-in constant</string>
<key>scope</key>
<string>constant.language</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ae81ffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>User-defined constant</string>
<key>scope</key>
<string>constant.character, constant.other</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ae81ffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Variable</string>
<key>scope</key>
<string>variable</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Keyword</string>
<key>scope</key>
<string>keyword</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#55b5bcff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Storage</string>
<key>scope</key>
<string>storage</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#db6a73ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Storage type</string>
<key>scope</key>
<string>storage.type</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#b76bbaff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Class name</string>
<key>scope</key>
<string>entity.name.class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cb9856ff</string>
<key>fontStyle</key>
<string>underline</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Inherited class</string>
<key>scope</key>
<string>entity.other.inherited-class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cb9856ff</string>
<key>fontStyle</key>
<string>italic,underline</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function name</string>
<key>scope</key>
<string>entity.name.function</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cb9856ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function argument</string>
<key>scope</key>
<string>variable.parameter</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#fd971fff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag name</string>
<key>scope</key>
<string>entity.name.tag</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#db6a73ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag attribute</string>
<key>scope</key>
<string>entity.other.attribute-name</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#cb9856ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library function</string>
<key>scope</key>
<string>support.function</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#b76bbaff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library constant</string>
<key>scope</key>
<string>support.constant</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#80b96eff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library class/type</string>
<key>scope</key>
<string>support.type, support.class</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
<key>fontStyle</key>
<string>italic</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Library variable</string>
<key>scope</key>
<string>support.other.variable</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#5ba4cfff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Invalid</string>
<key>scope</key>
<string>invalid</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f0ff</string>
<key>background</key>
<string>#f92672ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Invalid deprecated</string>
<key>scope</key>
<string>invalid.deprecated</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f8f8f0ff</string>
<key>background</key>
<string>#ae81ffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffe0e0ff</string>
<key>background</key>
<string>#9a0b0bff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>markup.inserted</string>
<key>scope</key>
<string>markup.inserted</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#d4ffd4ff</string>
<key>background</key>
<string>#3ca83cff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>punctuation.section</string>
<key>scope</key>
<string>punctuation.section</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffa727ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Annotation Override - searchResultIndication</string>
<key>scope</key>
<string>override.searchResultIndication</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Annotation Override - xmlTagPairOccurrenceIndication</string>
<key>scope</key>
<string>override.xmlTagPairOccurrenceIndication</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Annotation Override - htmlTagPairOccurrenceIndication</string>
<key>scope</key>
<string>override.htmlTagPairOccurrenceIndication</string>
<key>settings</key>
<dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>Annotation Override - rubyBlockPairOccurrenceIndication</string>
<key>scope</key>
<string>override.rubyBlockPairOccurrenceIndication</string>
<key>settings</key>
<dict>
</dict>
</dict>
</array>
</dict>
</plist>

关于选择地图导航心得以及解决方案(仅供参考,也许哪位大神会有更好的解决方案)
//调用第三方导航
document.getElementById('ios_navigation').addEventListener('tap', ios_navigation);
function ios_navigation() {
plus.geolocation.getCurrentPosition(function(p) {
var origin_gps_x = p.coords.longitude;
var origin_gps_y = p.coords.latitude;
//百度转火星
var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
var x = analysis_cps_x - 0.0065;
var y = analysis_cps_y - 0.006;
var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
var gg_lng = z * Math.cos(theta).toFixed(8);
var gg_lat = z * Math.sin(theta).toFixed(8);
// 设置目标位置坐标点和起始位置坐标点
var dst = new plus.maps.Point(gg_lng, gg_lat); // 导航目的地坐标
var src = new plus.maps.Point(origin_gps_x, origin_gps_y); // 导航起始地
plus.maps.openSysMap(dst, mpMc, src);
}, function(e) {
var origin_gps_x = null;
var origin_gps_y = null;
if (origin_gps_x == null && origin_gps_y == null) {
mui.toast("由于没有授权gps定位,当前位置无法获取");
}
});
// 调用系统地图显示
}
function androidMarket(pname) {
plus.runtime.openURL("market://details?id=" + pname);
}
function iosAppstore(url) {
plus.runtime.openURL("itms-apps://" + url);
}
document.getElementById('baidu_navigation').addEventListener('tap', function() {
//plus.runtime.openURL('baidumap://map/direction?destination='+analysis_cps_y+','+analysis_cps_x+'&mode=driving&coord_type=bd09&src=webapp.marker.yourCompanyName.yourAppName');
var url = null,
id = null,
f = null;
switch (plus.os.name) {
case "Android":
// 规范参考官方网站:http://developer.baidu.com/map/index.php?title=uri/api/android
url = 'baidumap://map/marker?location=' + analysis_cps_y + ',' + analysis_cps_x + '&title=' + mpMc + '&content=' + mp_dz + '&src=wenvip';
f = androidMarket;
id = "com.baidu.BaiduMap";
break;
case "iOS":
// 规范参考官方网站:http://developer.baidu.com/map/index.php?title=uri/api/ios
url = 'baidumap://map/navi?location=' + analysis_cps_y + ',' + analysis_cps_x + '&src=push&type=BLK&src=webapp.line.yourCompanyName.yourAppName';
f = iosAppstore;
id = "itunes.apple.com/cn/app/bai-du-de-tu-yu-yin-dao-hang/id452186370?mt=8";
break;
default:
return;
break;
}
plus.runtime.openURL(url, function(e) {
plus.nativeUI.confirm("检查到您未安装\"百度地图\",是否到商城搜索下载?", function(i) {
if (i.index == 0) {
f(id);
}
});
});
});
document.getElementById('gaode_navigation').addEventListener('tap', function() {
//百度转火星
var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
var x = analysis_cps_x - 0.0065;
var y = analysis_cps_y - 0.006;
var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
var gg_lng = z * Math.cos(theta).toFixed(8);
var gg_lat = z * Math.sin(theta).toFixed(8);
var url = null,
id = null,
f = null;
switch (plus.os.name) {
case "Android":
// 规范参考官方网站:http://lbs.amap.com/api/uri-api/android-uri-explain/
url = 'androidamap://navi?sourceApplication=wenvip&poiname=' + mpMc + '&lat=' + gg_lat + '&lon=' + gg_lng + '&dev=0&style=2';
f = androidMarket;
id = "com.autonavi.minimap";
break;
case "iOS":
// 规范参考官方网站:http://lbs.amap.com/api/uri-api/ios-uri-explain/
url = 'iosamap://navi?sourceApplication=wenvip&backScheme=wenvip&lat=' + gg_lat + '&lon=' + gg_lng + '&dev=0&style=2';
f = iosAppstore;
id = "itunes.apple.com/cn/app/gao-tu-zhuan-ye-dao-hang-ban/id461703208?mt=8";
break;
default:
return;
break;
}
//IOS里,dev=0是关键,0代表gcj02坐标系,就是火星坐标, 没这个参数 高德是打不开的
plus.runtime.openURL(url, function(e) {
plus.nativeUI.confirm("检查到您未安装\"高德地图\",是否到商城搜索下载?", function(i) {
if (i.index == 0) {
f(id);
}
});
}, id);
});
翻了翻以前的代码,找到了关于导航选择地图的部分!仅供分享交流!
//调用第三方导航
document.getElementById('ios_navigation').addEventListener('tap', ios_navigation);
function ios_navigation() {
plus.geolocation.getCurrentPosition(function(p) {
var origin_gps_x = p.coords.longitude;
var origin_gps_y = p.coords.latitude;
//百度转火星
var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
var x = analysis_cps_x - 0.0065;
var y = analysis_cps_y - 0.006;
var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
var gg_lng = z * Math.cos(theta).toFixed(8);
var gg_lat = z * Math.sin(theta).toFixed(8);
// 设置目标位置坐标点和起始位置坐标点
var dst = new plus.maps.Point(gg_lng, gg_lat); // 导航目的地坐标
var src = new plus.maps.Point(origin_gps_x, origin_gps_y); // 导航起始地
plus.maps.openSysMap(dst, mpMc, src);
}, function(e) {
var origin_gps_x = null;
var origin_gps_y = null;
if (origin_gps_x == null && origin_gps_y == null) {
mui.toast("由于没有授权gps定位,当前位置无法获取");
}
});
// 调用系统地图显示
}
function androidMarket(pname) {
plus.runtime.openURL("market://details?id=" + pname);
}
function iosAppstore(url) {
plus.runtime.openURL("itms-apps://" + url);
}
document.getElementById('baidu_navigation').addEventListener('tap', function() {
//plus.runtime.openURL('baidumap://map/direction?destination='+analysis_cps_y+','+analysis_cps_x+'&mode=driving&coord_type=bd09&src=webapp.marker.yourCompanyName.yourAppName');
var url = null,
id = null,
f = null;
switch (plus.os.name) {
case "Android":
// 规范参考官方网站:http://developer.baidu.com/map/index.php?title=uri/api/android
url = 'baidumap://map/marker?location=' + analysis_cps_y + ',' + analysis_cps_x + '&title=' + mpMc + '&content=' + mp_dz + '&src=wenvip';
f = androidMarket;
id = "com.baidu.BaiduMap";
break;
case "iOS":
// 规范参考官方网站:http://developer.baidu.com/map/index.php?title=uri/api/ios
url = 'baidumap://map/navi?location=' + analysis_cps_y + ',' + analysis_cps_x + '&src=push&type=BLK&src=webapp.line.yourCompanyName.yourAppName';
f = iosAppstore;
id = "itunes.apple.com/cn/app/bai-du-de-tu-yu-yin-dao-hang/id452186370?mt=8";
break;
default:
return;
break;
}
plus.runtime.openURL(url, function(e) {
plus.nativeUI.confirm("检查到您未安装\"百度地图\",是否到商城搜索下载?", function(i) {
if (i.index == 0) {
f(id);
}
});
});
});
document.getElementById('gaode_navigation').addEventListener('tap', function() {
//百度转火星
var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
var x = analysis_cps_x - 0.0065;
var y = analysis_cps_y - 0.006;
var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
var gg_lng = z * Math.cos(theta).toFixed(8);
var gg_lat = z * Math.sin(theta).toFixed(8);
var url = null,
id = null,
f = null;
switch (plus.os.name) {
case "Android":
// 规范参考官方网站:http://lbs.amap.com/api/uri-api/android-uri-explain/
url = 'androidamap://navi?sourceApplication=wenvip&poiname=' + mpMc + '&lat=' + gg_lat + '&lon=' + gg_lng + '&dev=0&style=2';
f = androidMarket;
id = "com.autonavi.minimap";
break;
case "iOS":
// 规范参考官方网站:http://lbs.amap.com/api/uri-api/ios-uri-explain/
url = 'iosamap://navi?sourceApplication=wenvip&backScheme=wenvip&lat=' + gg_lat + '&lon=' + gg_lng + '&dev=0&style=2';
f = iosAppstore;
id = "itunes.apple.com/cn/app/gao-tu-zhuan-ye-dao-hang-ban/id461703208?mt=8";
break;
default:
return;
break;
}
//IOS里,dev=0是关键,0代表gcj02坐标系,就是火星坐标, 没这个参数 高德是打不开的
plus.runtime.openURL(url, function(e) {
plus.nativeUI.confirm("检查到您未安装\"高德地图\",是否到商城搜索下载?", function(i) {
if (i.index == 0) {
f(id);
}
});
}, id);
});
翻了翻以前的代码,找到了关于导航选择地图的部分!仅供分享交流!
收起阅读 »
h5+ 跨平台 app开发学习路线及对应视频教程
《JavaScript 快速提高视频教程》 js基础快速提高课程 【免费】
http://www.hcoder.net/course/info_229.html
《MUI 视频教程》【免费】
http://www.hcoder.net/course/info_211.html
《h.js 视频教程》【免费】
http://www.hcoder.net/tutorials/info_147.html
《HTML 5 开发教程》【免费】
http://www.hcoder.net/course/info_212.html
《APP开发实例教程 - 窗口切换 》【免费】
http://www.hcoder.net/course/info_218.html
《HBuilder 8.0.1 APP开发 - 新功能全接触》【免费】
http://www.hcoder.net/course/info_227.html
--------- 实战收费教程 ------------------------
MUI、H5 APP 实战教程 - 仿《有道词典》
https://ke.qq.com/course/194834
H5 跨平台APP开发电商项目实战教程 -《仿京东优选商城》
https://ke.qq.com/course/225830
更多课程中心
http://www.hcoder.net/course
《JavaScript 快速提高视频教程》 js基础快速提高课程 【免费】
http://www.hcoder.net/course/info_229.html
《MUI 视频教程》【免费】
http://www.hcoder.net/course/info_211.html
《h.js 视频教程》【免费】
http://www.hcoder.net/tutorials/info_147.html
《HTML 5 开发教程》【免费】
http://www.hcoder.net/course/info_212.html
《APP开发实例教程 - 窗口切换 》【免费】
http://www.hcoder.net/course/info_218.html
《HBuilder 8.0.1 APP开发 - 新功能全接触》【免费】
http://www.hcoder.net/course/info_227.html
--------- 实战收费教程 ------------------------
MUI、H5 APP 实战教程 - 仿《有道词典》
https://ke.qq.com/course/194834
H5 跨平台APP开发电商项目实战教程 -《仿京东优选商城》
https://ke.qq.com/course/225830
更多课程中心
http://www.hcoder.net/course

仿做APP 就几个页面,APP外包
仿做APP 就几个页面,APP外包
能做后端一起的优先
有时间能做的 联系QQ 1120094610
仿做APP 就几个页面,APP外包
能做后端一起的优先
有时间能做的 联系QQ 1120094610

原生底部选项卡示例已经更新啦
鉴于之前有小伙伴提到的此示例存在的问题和实现方案上的欠缺,此示例已经做出更新。
获取最新demo示例:
注:如果有小伙伴存在底部图标飞到顶部的问题,请更新HBuilder和示例代码查看最终效果