248 lines
9.2 KiB
HTML
248 lines
9.2 KiB
HTML
|
|
<!doctype html>
|
|||
|
|
<html>
|
|||
|
|
|
|||
|
|
<head>
|
|||
|
|
<meta charset="utf-8">
|
|||
|
|
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
|
|||
|
|
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
|
|||
|
|
<title>入群</title>
|
|||
|
|
<link rel="stylesheet" type="text/css" href="/css/api.css" />
|
|||
|
|
<link rel="stylesheet" type="text/css" href="/css/content.css" />
|
|||
|
|
<script type="text/javascript" src="/scripts/jquery-2.0.2.min.js"></script>
|
|||
|
|
<script type="text/javascript" src="/scripts/jquery.cookie.min.js"></script>
|
|||
|
|
<!--<script type="text/javascript" src="/scripts/iscroll.js"></script>-->
|
|||
|
|
<script type="text/javascript" src="/script/main.js?t=0"></script>
|
|||
|
|
<script type="text/javascript" src="/layer/layer.js"></script>
|
|||
|
|
<script type="text/javascript" src="/Scripts/long.js"></script>
|
|||
|
|
<script type="text/javascript" src="/script/moment.js"></script>
|
|||
|
|
<script type="text/javascript" src="/script/api.js"></script>
|
|||
|
|
<script type="text/javascript" src="/scripts/clipboard.min.js"></script>
|
|||
|
|
<style type="text/css">
|
|||
|
|
html, body {
|
|||
|
|
overflow: hidden;
|
|||
|
|
background-color: #051E54;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#wrapper {
|
|||
|
|
flex: 1;
|
|||
|
|
overflow-y: auto;
|
|||
|
|
-webkit-overflow-scrolling: touch;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.pullDown {
|
|||
|
|
position: absolute;
|
|||
|
|
top: -1.25rem;
|
|||
|
|
left: 0;
|
|||
|
|
width: 100%;
|
|||
|
|
z-index: 100;
|
|||
|
|
text-align: center;
|
|||
|
|
display: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.pullUp {
|
|||
|
|
position: absolute;
|
|||
|
|
bottom: -1.25rem;
|
|||
|
|
left: 0;
|
|||
|
|
width: 100%;
|
|||
|
|
z-index: 100;
|
|||
|
|
text-align: center;
|
|||
|
|
display: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.pullDown.loading, .pullUp.loading, .pullDown.refresh, .pullUp.refresh {
|
|||
|
|
display: block;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#JCHG_Box {
|
|||
|
|
background-color: #33333F;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var userId = null;
|
|||
|
|
var LoginId = null;
|
|||
|
|
var CartId = null;
|
|||
|
|
var opentimes = null;
|
|||
|
|
var t = 2;
|
|||
|
|
var myScroll = null;
|
|||
|
|
var pullDown = 1; // 下拉刷新避免多次执行
|
|||
|
|
var pullUp = 1; // 上拉加载避免多次执行
|
|||
|
|
var downHeight = 0;
|
|||
|
|
var upHeight = 0;
|
|||
|
|
var isload = true;//设置是否终止滚动加载
|
|||
|
|
var curScrollHeight = 0;//当前滚动位置
|
|||
|
|
var curCount = 1;//计数器,防止滚动时重复执行加载下一页
|
|||
|
|
$(document).ready(function () {
|
|||
|
|
userId = getlocalStorage("userId");
|
|||
|
|
LoginId = getlocalStorage("LoginId");
|
|||
|
|
CartId = getlocalStorage("CartId");
|
|||
|
|
|
|||
|
|
rdata(1);
|
|||
|
|
|
|||
|
|
var clipboard = new Clipboard('#copybtn');
|
|||
|
|
|
|||
|
|
clipboard.on('success', function (e) {
|
|||
|
|
tishi3("复制成功");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
clipboard.on('error', function (e) {
|
|||
|
|
tishi3("复制失败");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
function rdata(ag) {
|
|||
|
|
userId = getlocalStorage("userId");
|
|||
|
|
LoginId = getlocalStorage("LoginId");
|
|||
|
|
|
|||
|
|
$(".ajaxLoader").removeClass("uhide");
|
|||
|
|
$.ajax({
|
|||
|
|
type: 'GET',
|
|||
|
|
url: "/apiajax.ashx",
|
|||
|
|
data: "&action=getrqlist&ifweb=1&userId=" + (userId != null ? userId : "") + "&LoginId=" + (LoginId != null ? LoginId : ""),
|
|||
|
|
dataType: "JSON",
|
|||
|
|
error: function (xhr, type) {
|
|||
|
|
tishi3("发生错误:" + JSON.stringify(xhr));
|
|||
|
|
},
|
|||
|
|
success: function (data) {
|
|||
|
|
if (data) {
|
|||
|
|
if (data.status == 1) {
|
|||
|
|
if (data.data.length > 0) {
|
|||
|
|
var html = "";
|
|||
|
|
for (i = 0; i < data.data.length; i++) {
|
|||
|
|
html += "<li id='rqbox_"+i+"'>";
|
|||
|
|
html += "<div class='left'>";
|
|||
|
|
html += "<span class='title'>" + data.data[i].title + "</span>";
|
|||
|
|
html += "<span class='name'>" + data.data[i].name + ":" + data.data[i].hm + "</span>";
|
|||
|
|
html += "<span class='copyhm' onclick='copyhm(\"" + data.data[i].hm + "\")'>复制" + data.data[i].name + "</span>";
|
|||
|
|
html += "</div>";
|
|||
|
|
html += "<div class='right'>";
|
|||
|
|
if (data.data[i].image != "") {
|
|||
|
|
html += "<div class='img'><img src='" + data.data[i].image + "' /></div><div class='download' onclick='ondownload(\"" + data.data[i].image + "\","+i+")'>下载</div>";
|
|||
|
|
}
|
|||
|
|
html += "</div>";
|
|||
|
|
html += "</li>";
|
|||
|
|
}
|
|||
|
|
$("#sysnew").html(html);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
$(".ajaxLoader").addClass("uhide");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
function copyhm(font) {
|
|||
|
|
$("#copyinput").val(font);
|
|||
|
|
$("#copybtn").click();
|
|||
|
|
}
|
|||
|
|
function ondetail(id) {
|
|||
|
|
onlink("news_details.html?id=" + id);
|
|||
|
|
}
|
|||
|
|
var ewmName = "fs://";//下载地址
|
|||
|
|
function ondownload(img, id) {
|
|||
|
|
ewmName = "fs://image/ewm" + id + ".png";
|
|||
|
|
var ifb = true;
|
|||
|
|
var ifb0 = true;
|
|||
|
|
try {
|
|||
|
|
var permission = 'storage';
|
|||
|
|
var resultList = api.hasPermission({
|
|||
|
|
list: [permission]
|
|||
|
|
});
|
|||
|
|
var granted = resultList[0].granted;
|
|||
|
|
if (!granted) {
|
|||
|
|
ifb = false;
|
|||
|
|
layer.confirm('应用需要您的授权才能访问存储,是否要授权?', {
|
|||
|
|
btn: ['是', '否'] //按钮
|
|||
|
|
}, function () {
|
|||
|
|
api.requestPermission({
|
|||
|
|
list: [permission],
|
|||
|
|
}, function (res) {
|
|||
|
|
if (res.list[0].granted) {
|
|||
|
|
// 已授权,可以继续下一步操作
|
|||
|
|
tishi3('已授权');
|
|||
|
|
} else {
|
|||
|
|
ifb = false;
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}, function () {
|
|||
|
|
ifb = false;
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
} catch (err) {
|
|||
|
|
ifb0 = false;
|
|||
|
|
ifb = true;
|
|||
|
|
}
|
|||
|
|
if (ifb) {
|
|||
|
|
if (ifb0) {
|
|||
|
|
$("#rqbox_" + id + " .download").html("下载中...");
|
|||
|
|
api.download({
|
|||
|
|
url: encodeURI(img),
|
|||
|
|
savePath: ewmName,
|
|||
|
|
encode: false,
|
|||
|
|
report: false,
|
|||
|
|
cache: false,
|
|||
|
|
allowResume: false
|
|||
|
|
}, function (ret, err) {
|
|||
|
|
if (ret.state == 1) {
|
|||
|
|
api.saveMediaToAlbum({
|
|||
|
|
path: ewmName
|
|||
|
|
}, function (ret0, err0) {
|
|||
|
|
$("#rqbox_" + id + " .download").html("下载");
|
|||
|
|
if (ret0 && ret0.status) {
|
|||
|
|
tishi3("下载成功,可以去分享了");
|
|||
|
|
} else {
|
|||
|
|
tishi3('下载失败2');
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
$("#rqbox_" + id + " .download").html("下载");
|
|||
|
|
tishi3(JSON.stringify(ret));
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
tishi3('下载APP才能保存');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
</head>
|
|||
|
|
|
|||
|
|
<body class="wrap">
|
|||
|
|
<header class="renwuheader">
|
|||
|
|
<div class="ub">
|
|||
|
|
<div class="nav-btn" id="nav-left" style=" margin:0; padding:0; padding-top:0.2em; min-width:3em" onclick="closeWin()">
|
|||
|
|
|
|||
|
|
<img src="../image/faifei.png" style="margin-left:0; margin-top:0em; height:1.2em;width:1.2em;" />
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<h1 class="ub-f1">
|
|||
|
|
入群
|
|||
|
|
</h1>
|
|||
|
|
<div class="nav-btn blue" id="nav-right" style=" margin:0; padding:0; min-width:3em; ">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</header>
|
|||
|
|
<section class="ub-f1" id="wrapper">
|
|||
|
|
|
|||
|
|
<div class="rq_box">
|
|||
|
|
<ul id="sysnew"></ul>
|
|||
|
|
</div>
|
|||
|
|
<div style="width:0;height:0;overflow:hidden;"><input type="text" id="copyinput" style="color:#fff" value="" /><input type="button" id="copybtn" style="color:#fff" value="复制" data-clipboard-action="copy" data-clipboard-target="#copyinput" /></div>
|
|||
|
|
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<div class="ajaxLoader ub ub-ac uhide" onclick="reload()">
|
|||
|
|
<div class="ub ub-ac ub-ver"><img src="image/load.gif" /><br>正在加载...</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</body>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
</html>
|