Commit e5801c67 authored by Mac's avatar Mac

ios禁止拖动

parent 121fb76c
......@@ -12,7 +12,7 @@
<link rel="stylesheet" href="css/Amhome.css">
</head>
<body>
<div class="Box">
<div class="Box" style="position: fixed;left: 0;top:0">
<!-- 头部嘉宾-->
<div class="top">
<img src="../../images/aM/jiabing@2x.png" alt="">
......@@ -131,19 +131,24 @@
<script>
//ios禁止被拖动
document.body.addEventListener('touchmove', function (e) {
e.preventDefault();
}, {passive: false});
// var href = window.location.href;
var href='AnnuaLmeetingHome.html?EmployeeId=1951&EmName=张建国&imgUrl=http://192.168.2.214:8130/Upload/Temporary/20191223022557036.jpg&GiftCode=201912231427008436';
var href='AnnuaLmeetingHome.html?EmployeeId=1790&EmName=唐杰&imgUrl=http://192.168.2.214:8130/Upload/Temporary/20200103060438316.jpg&GiftCode=202001031805026355&e=2018-04-04T00:00:00';
var param = href.split('?')[1].split("&");
var EmployeeId = param[0].split('=')[1];
var EmName = decodeURI(param[1].split('=')[1]);
var imgUrl = param[2].split('=')[1];
var GiftCode = param[3].split('=')[1];
var e = param[4].split('=')[1];
var activity ={
EmployeeId:EmployeeId,
EmName:EmName,
imgUrl:imgUrl,
e:e
}
localStorage.activity = JSON.stringify(activity)
......@@ -153,7 +158,7 @@
window.scroll(0,0);//失焦后强制让页面归位
});
var conn = $.hubConnection("http://192.168.2.65:7838/signalr", {
qs: `i=${EmployeeId}&n=${EmName}&p=${encodeURIComponent(imgUrl)}`
qs: `i=${EmployeeId}&n=${EmName}&p=${encodeURIComponent(imgUrl)}&e=${e}`
});
var proxy = conn.createHubProxy("annualLeaveHub");
conn.start().done(data => {
......
......@@ -150,7 +150,10 @@
<script>
$(function () {
//ios禁止被拖动
document.body.addEventListener('touchmove', function (e) {
e.preventDefault();
}, {passive: false});
var activity = JSON.parse(localStorage.activity);
var clipboard = new Clipboard('.all_Receive');
var EmployeeId = activity.EmployeeId + '_Mouse';
......@@ -159,7 +162,7 @@
var conn = $.hubConnection("http://192.168.2.65:7838/signalr", {
qs: `i=${EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}`
qs: `i=${EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}&e=${activity.e}`
});
var proxy = conn.createHubProxy("annualLeaveHub");
conn.start().done(data => {
......
......@@ -91,6 +91,10 @@
<script src="../../js/moveJs/jquery.signalR.min.js"></script>
<script src="js/clipboard.min.js"></script>
<script>
//ios禁止被拖动
document.body.addEventListener('touchmove', function (e) {
e.preventDefault();
}, {passive: false});
let conn;
let proxy;
let status=0;
......@@ -151,7 +155,7 @@
var EmployeeId = activity.EmployeeId + '_Money';
function initConnection(){
var conn = $.hubConnection("http://192.168.2.65:7838/signalr", {
qs: `i=${EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}`
qs: `i=${EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}&e=${activity.e}`
});
proxy = conn.createHubProxy("annualLeaveHub");
conn.start().done(data => {
......
......@@ -170,16 +170,16 @@
<div class="box_top">
<div class="top_center">
<div class="runnerUp" id="dier" style="margin-top: 0.1rem">
<span>《凉凉》独唱</span>
<span>成都印象销售部</span>
<span></span>
<span></span>
</div>
<div class="runnerUp" id="diyi" style="margin-top: 0.05rem">
<span>《凉凉》独唱</span>
<span>成都印象销售部</span>
<span></span>
<span></span>
</div>
<div class="runnerUp" id="disan" style="margin-top: 0.16rem">
<span>《凉凉》独唱</span>
<span>成都印象销售部</span>
<span></span>
<span></span>
</div>
</div>
</div>
......@@ -208,7 +208,7 @@
var activity = JSON.parse(localStorage.activity);
var conn = $.hubConnection("http://192.168.2.65:7838/signalr", {
qs: `i=${activity.EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}`
qs: `i=${activity.EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}&e=${activity.e}`
});
var proxy = conn.createHubProxy("annualLeaveHub");
conn.start().done(data => {
......@@ -217,6 +217,7 @@
getMsg()
function sendMsg() {
proxy.invoke("SendVoteProgarm",'1',activity.EmployeeId).done(data => {
console.log(data)
RankingList(data)
})
}
......
......@@ -49,7 +49,7 @@
var activity = JSON.parse(localStorage.activity);
var conn = $.hubConnection("http://192.168.2.65:7838/signalr", {
qs: `i=${activity.EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}`
qs: `i=${activity.EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}&e=${activity.e}`
});
var proxy = conn.createHubProxy("annualLeaveHub");
conn.start().done(data => {
......@@ -60,16 +60,19 @@
var list;
var giveUp = false; //是否放弃投票
var CastOver = false; //是否投票过
function sendMsg() {
proxy.invoke("GetProgarm",).done(data => {
console.log(data)
if(data!=''){
list = JSON.parse(data)
// {"Id":5,"Title":"《舞动青春》","Performer":"印象之旅","BranchName":"","StartTime":"2020-01-17 17:30:00","ParentId":1,"Type":1,"MusicUrl":"","BackgroundUrl":"","VoteState":0}
$('.programName').html(list.Title+'节目投票');
$('.department').html(list.BranchName);
$('.personnel').html('参与人员:'+list.Performer);
$('.vote_s').css('display','flex')
if(list.VoteState == 1){
$('.vote_s').css('display','flex')
}
}else {
$('.programName').html('暂无节目投票');
$('.vote_s').css('display','none')
......@@ -78,42 +81,55 @@
})
}
function getMsg() {
// proxy.on('GetProgarm', function (data) {
// console.log(data)
// });
proxy.on('progarmVote', function (data) {
console.log(data)
if(data!=''){
list = JSON.parse(data)
$('.programName').html(list.Title+'节目投票');
$('.department').html(list.BranchName);
$('.personnel').html('参与人员:'+list.Performer);
if(list.VoteState == 1){
$('.vote_s').css('display','flex')
}else {
$('.vote_s').css('display','none')
}
}else {
$('.programName').html('暂无节目投票');
$('.vote_s').css('display','none')
}
});
}
function vote(type) {
if(type==1){ // 1位放弃投票 2 为确定投票
giveUp=true;
$('.popup').css('display','block')
$('.popup_bg img').attr('src','../../images/aM/fangqi.png')
$('.popup_bg span').html('放弃投票成功')
}else {
if(giveUp ==false){
if(type==1){ // 1位放弃投票 2 为确定投票
giveUp=true;
$('.popup').css('display','block')
$('.popup_bg img').attr('src','../../images/aM/fangqi.png')
$('.popup_bg span').html('放弃投票成功')
}else {
proxy.invoke("UserVoteProgarm",activity.EmployeeId).done(data => {
console.log(data)
$('.popup').css('display','block')
$('.popup_bg img').attr('src','../../images/aM/toupiao.png')
$('.popup_bg span').html('恭喜你!投票成功')
})
}else {
layer.msg('您已放弃投票');
}
}
}
$('.close').click(function () {
$('.popup').css('display','none')
$('.vote_s').css('display','none')
})
$('.return').click(function () {
//返回首页
......
......@@ -266,6 +266,10 @@
<script type="text/javascript" src="../js/mian.js"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script>
<script>
//ios禁止被拖动
document.body.addEventListener('touchmove', function (e) {
e.preventDefault();
}, {passive: false});
// if(document.referrer.indexOf('billPage') == -1){ //判断是不是从 billPage.html的页面跳转过来的
//
// localStorage.removeItem("billPage")
......@@ -343,9 +347,12 @@
})
$('.red_img').click(function () {
console.log(settlement)
if(isChecke == true){
if(settlement == false){
getData();
}else {
layer.msg('请稍后再试!')
}
}else {
......@@ -356,6 +363,7 @@
function getData(){
settlement = true
let msg = {
customerId:billPage.customerId
}
......@@ -376,7 +384,7 @@
}
},
error: function(res) {
layer.msg('请稍后再试!')
}
})
};
......
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