代码拉取完成,页面将自动刷新
同步操作将从 曹进杰/HiGo-Campus 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="css/fonts/font-awesome.min.css">
<link rel="stylesheet" href="css/ui-box.css">
<link rel="stylesheet" href="css/ui-base.css">
<link rel="stylesheet" href="css/ui-color.css">
<link rel="stylesheet" href="css/appcan.icon.css">
<link rel="stylesheet" href="css/appcan.control.css">
<link rel="stylesheet" href="css/rotate.css">
</head>
<body class="um-vp " ontouchstart>
<div id="page_0" class="up ub ub-ver bc-bg" tabindex="0">
<!--header开始-->
<div id="header" class="uh bc-text-head ub bc-head">
<div class="nav-btn" id="nav-left">
<div class="ub-img icon-back umw2 umh3 "></div>
</div>
<h1 class="ut ub-f1 ulev-3 ut-s tx-c" tabindex="0">店铺信息</h1>
<div class="nav-btn nav-bt" id="nav-right"></div>
</div>
<!--header结束--><!--content开始-->
<div id="content" class="ub-f1 ub ub-ver" style="overflow-y: scroll">
<div style="margin-top:70%" class="ub ub-ac ub-ver ub-pc" id="loadbg" ontouchstart = "zy_touch()"></div>
<div id="shopinfo" class="ub ub-ver" style="width:100%">
</div>
</div>
<!--content结束-->
</div>
<script src="js/appcan.js"></script>
<script src="js/appcan.control.js"></script>
<script src="js/main.js"></script>
<script src="js/sha.js"></script>
<script src="js/forum.js"></script>
</body>
<script>
appcan.ready(function() {
loading("店铺信息加载中...");
getData();
});
appcan.button(".nav-btn", "btn-act", function() {
appcan.window.close(-1);
})
function getUrl(){
var serverUrl = "http://api.dianping.com/";
var apiPath = "v1/business/get_single_business";
var appkey = "971799358";
var secret = "5592f1e435654c5db00018780ee0c319";
var param = {};
param["platform"] = 2;
param["business_id"]=getStorage("business_id");
var array = new Array();
for(var key in param)
{
array.push(key);
}
array.sort();
var paramArray = new Array();
paramArray.push(appkey);
for(var index in array)
{
var key = array[index];
paramArray.push(key + param[key]);
}
paramArray.push(secret);
var shaSource = paramArray.join("");
var sign = new String(CryptoJS.SHA1(shaSource)).toUpperCase();
var queryArray = new Array();
queryArray.push("appkey=" + appkey);
queryArray.push("sign=" + sign);
for(var key in param)
{
queryArray.push(key + "=" + param[key]);
}
var queryString = queryArray.join("&");
var url = serverUrl + apiPath + "?" + queryString;
return encodeURI(url);
}
function getData(){
appcan.request.getJSON(getUrl(),function(data){
var reasult = data.businesses;
str1='<div class="ub uinn " style="border-bottom:2px solid #EEEEEE;">'+
'<img onclick="picdetail("'+reasult[0].s_photo_url+'")" src="'+reasult[0].s_photo_url+'" class="ub ub-img uc-a" style="height:7em;width:9em;"/>'+
'<div class="ub ub-f1 ub-ver uinn">'+
'<div class="ub ub-f1 ulev1 ub-ac sc-text-tab">'+reasult[0].name+'</div>'+
'<div class="ub ub-f1 ub-ac ub-pc">'+
'<div class="ulev-1 ub-ac sc-text-tab">评分:</div>'+
'<img class="ub ub-img" src="'+reasult[0].rating_s_img_url+'" style="height:80%;width:40%"/>'+
'<div class="ub ub-f1 ub-ac ulev-1 sc-text-tab ub-pc">人均:'+reasult[0].avg_price+'¥</div>'+
'</div>'+
'<div class="ub ub-f1 ulev-1 ub-ac sc-text-tab">口味:'+reasult[0].product_score+' 环境:'+reasult[0].decoration_score+' 服务:'+reasult[0].service_score+'</div>'+
'</div>'+
'</div>'+
'<div onclick="openMap("'+reasult[0].latitude+'","'+reasult[0].longitude+'")" class="ub uinn " style="border-bottom:2px solid #EEEEEE;">'+
'<img style="height:1.5em;width:1em" class="ub ub-img umar-a" src="css/image/location.png"/>'+
'<div class="ub ub-ac ub-f1" style="margin-left:1.5em">'+reasult[0].address+' </div>'+
'<img style="height:1.5em;width:1em" class="ub ub-img umar-a" src="css/image/next.png"/>'+
'</div>'+
'<div onclick="uexCall.dial("'+reasult[0].telephone+'")" class="ub uinn " style="border-bottom:2px solid #EEEEEE;">'+
'<img style="height:1.5em;width:1em" class="ub ub-img umar-a" src="css/image/call.png"/>'+
'<div class="ub ub-ac ub-f1" style="margin-left:1.5em">'+reasult[0].telephone+' </div>'+
'<img style="height:1.5em;width:1em" class="ub ub-img umar-a" src="css/image/next.png"/>'+
'</div>'+
'<div class="ub umar-t uinn ub-ver">';
if(reasult[0].has_online_reservation==1){
str2='<div style="height:2.5em;" class="ub ub-ac ub-pc sc-bg-alert uc-a bc-text-head">在线预约</div>';
}else{
str2='';
}
if(reasult[0].has_deal==1){
str3='<div class="ub ub-ver umar-t"><div style="height:2.5em;" class="ub ub-ac ub-pc bc-head uc-t1 bc-text-head">店铺全部团购</div>'+
'<div class="ub ub-ver ubb ubr ubl" style="border:1px solid #EB6996">';
for(var i=0;i<reasult[0].deals.length;i++){
str3+='<div class="ub uinn ub-ver " style="border-bottom: 1px solid #EEEEEE">'+
'<div class="ub uinn">'+reasult[0].deals[i].description+'</div>'+
'<div onclick="openTuan("'+reasult[0].deals[i].url+'")" class="ub ub-pc ub-f1">'+
'<div style="height:2em;width:40%" class="ub sc-btn uc-a ulev-1 ub-pc ub-ac bc-text-head">>>查看该团购信息<<</div>'+
'</div>'+
'</div>';
}
}else{
str3='<div class="ub ub-ac ub-pc sc-text-warn">该店铺暂无团购信息!</div>';
}
str4='</div></div></div>';
str5='<div class="ub" id="dzicon" ><div class="ub-f1 t-gra tx-c ulev-1" style="margin:0.5em 0 1em 0">数据支持<img src="css/image/dz2.png">大众点评 </div></div>';
$$('loadbg').className= 'uhide';
$$('shopinfo').innerHTML=str1+str2+str3+str4+str5;
})
}
function openTuan(x){
setStorage("deal_id",x);
uexWindow.open("dianp", '0', "dianp.html", 2, '', '',0,280);
}
function openMap(lat,lon){
setStorage("shoplat",lat);
setStorage("shoplon",lon);
uexWindow.open("map", '0', "map.html", 2, '', '',0,280);
}
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。