小程序
小游戏
企业微信
微信支付
扫描小程序码分享
安卓5.1版本能否支持转盘抽奖?目前发现安卓5.1版本点击没有反应。
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
?不是,你这是啥环境?web-view?
function roll(){
$("#roll").attr("onclick", "null");
$('#turntable').css('-webkit-transition','-webkit-transform 0s');
$('#turntable').css('transition','transform 0s');
$('#turntable').css('-webkit-transform','rotate(0deg)');
$('#turntable').css('transform','rotate(0deg)');
setTimeout(function(){
$('#turntable').css('-webkit-transition','-webkit-transform 4s');
$('#turntable').css('transition','transform 4s');
ratating();
},100);
}
//转盘开始转
function ratating() {
mui.ajax(contextRootPath+'/weixin/roll.do', {
data : {
"user_code":user_code,
"id": id
},
dataType : 'json',// 服务器返回json格式数据
type : 'POST',// HTTP请求类型
timeout : 10000,// 超时时间设置为10秒;
success : function(respData) {
retcode = respData.responsehead.retcode;
totalTimes = respData.responsebody.remain_times;
if (respData.responsehead.retcode == "0000") {
var data = respData.responsebody.ruleGiftInfos;
var rule_code = data[0].rule_code;
if(map[rule_code]){
var luck_area = map[rule_code];
ruleGiftInfos = data;
var html = "";
for (var i = 0; i < data.length; i ++) {
var ruleGiftInfo = data[i];
var giftCouponInfos = ruleGiftInfo.giftCouponInfos;
html += '<li class="mui-table-view-cell" id="' + i + '">'+
'<div style="height: 30px;line-height: 30px;color: #FD8800;">' + ruleGiftInfo.licenseNo + '</div>';
for (var j = 0; j < giftCouponInfos.length; j ++) {
var giftCouponInfo = giftCouponInfos[j];
var backCouponDOs = giftCouponInfo.backCouponDOs;
var coupons = "";
for (var k = 0; k < backCouponDOs.length; k ++) {
var backCouponDO = backCouponDOs[k];
if (k == 0) {
coupons = backCouponDO.coupon_name + "x" + backCouponDO.total_num;
} else {
coupons += "," + backCouponDO.coupon_name + "x" + backCouponDO.total_num;
html += '<div class="mui-input-row mui-radio mui-left">'+
'<label style="text-align: left;">' + giftCouponInfo.gift_name + '</label>'+
'<input name="radio' + i + '" type="radio" value="' + j + '">'+
'</div>'+
'<div style="text-align: left;font-size: 11px;color: #999999;line-height: 15px;padding: 3px 0 5px 20px;">包含' + coupons + '</div>';
html += '</li>';
$("#couponSelect").html(html);
reg = true;
var timer = null;
var rdm = 360 * 3 + (8-parseFloat(luck_area)) * 45 + (Math.random() * 45);
clearInterval(timer);
timer = setInterval(function() {
$('#turntable').css('-webkit-transform','rotate(' + rdm + 'deg)');
$('#turntable').css('transform','rotate(' + rdm + 'deg)');
setTimeout(function() {
$('#mui-backdrop1').show();
}, 4000);
}, 30);
} else if (respData.responsehead.retcode == "0004"){
mui.toast(respData.responsehead.retmessage);
}else {
var rdm = 360 * 3 + (8-parseFloat(8)) * 45 + (Math.random() * 45);
var backdrop5 = $('#mui-backdrop5');
backdrop5.find('#remainTime').text(totalTimes);
backdrop5.show();
error : function(xhr, type, errorThrown) {
$("#roll").attr("onclick", "roll()");
});
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
?不是,你这是啥环境?web-view?
function roll(){
$("#roll").attr("onclick", "null");
$('#turntable').css('-webkit-transition','-webkit-transform 0s');
$('#turntable').css('transition','transform 0s');
$('#turntable').css('-webkit-transform','rotate(0deg)');
$('#turntable').css('transform','rotate(0deg)');
setTimeout(function(){
$('#turntable').css('-webkit-transition','-webkit-transform 4s');
$('#turntable').css('transition','transform 4s');
ratating();
},100);
}
//转盘开始转
function ratating() {
mui.ajax(contextRootPath+'/weixin/roll.do', {
data : {
"user_code":user_code,
"id": id
},
dataType : 'json',// 服务器返回json格式数据
type : 'POST',// HTTP请求类型
timeout : 10000,// 超时时间设置为10秒;
success : function(respData) {
retcode = respData.responsehead.retcode;
totalTimes = respData.responsebody.remain_times;
if (respData.responsehead.retcode == "0000") {
var data = respData.responsebody.ruleGiftInfos;
var rule_code = data[0].rule_code;
if(map[rule_code]){
var luck_area = map[rule_code];
}
ruleGiftInfos = data;
var html = "";
for (var i = 0; i < data.length; i ++) {
var ruleGiftInfo = data[i];
var giftCouponInfos = ruleGiftInfo.giftCouponInfos;
html += '<li class="mui-table-view-cell" id="' + i + '">'+
'<div style="height: 30px;line-height: 30px;color: #FD8800;">' + ruleGiftInfo.licenseNo + '</div>';
for (var j = 0; j < giftCouponInfos.length; j ++) {
var giftCouponInfo = giftCouponInfos[j];
var backCouponDOs = giftCouponInfo.backCouponDOs;
var coupons = "";
for (var k = 0; k < backCouponDOs.length; k ++) {
var backCouponDO = backCouponDOs[k];
if (k == 0) {
coupons = backCouponDO.coupon_name + "x" + backCouponDO.total_num;
} else {
coupons += "," + backCouponDO.coupon_name + "x" + backCouponDO.total_num;
}
}
html += '<div class="mui-input-row mui-radio mui-left">'+
'<label style="text-align: left;">' + giftCouponInfo.gift_name + '</label>'+
'<input name="radio' + i + '" type="radio" value="' + j + '">'+
'</div>'+
'<div style="text-align: left;font-size: 11px;color: #999999;line-height: 15px;padding: 3px 0 5px 20px;">包含' + coupons + '</div>';
}
html += '</li>';
}
$("#couponSelect").html(html);
reg = true;
var timer = null;
var rdm = 360 * 3 + (8-parseFloat(luck_area)) * 45 + (Math.random() * 45);
clearInterval(timer);
timer = setInterval(function() {
$('#turntable').css('-webkit-transform','rotate(' + rdm + 'deg)');
$('#turntable').css('transform','rotate(' + rdm + 'deg)');
clearInterval(timer);
setTimeout(function() {
$('#mui-backdrop1').show();
}, 4000);
}, 30);
} else if (respData.responsehead.retcode == "0004"){
mui.toast(respData.responsehead.retmessage);
}else {
reg = true;
var timer = null;
var rdm = 360 * 3 + (8-parseFloat(8)) * 45 + (Math.random() * 45);
clearInterval(timer);
timer = setInterval(function() {
$('#turntable').css('-webkit-transform','rotate(' + rdm + 'deg)');
$('#turntable').css('transform','rotate(' + rdm + 'deg)');
clearInterval(timer);
setTimeout(function() {
var backdrop5 = $('#mui-backdrop5');
backdrop5.find('#remainTime').text(totalTimes);
backdrop5.show();
}, 4000);
}, 30);
}
},
error : function(xhr, type, errorThrown) {
$("#roll").attr("onclick", "roll()");
}
});
}