|
@@ -4,7 +4,7 @@
|
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
- <title>Document</title>
|
|
|
+ <title>无限潜能</title>
|
|
|
<link rel="stylesheet" href="../css/question.css">
|
|
|
<script src="../utils/size.js"></script>
|
|
|
</head>
|
|
@@ -50,10 +50,9 @@
|
|
|
<canvas id="myCanvas" width="750px" height="1334px">
|
|
|
您的浏览器不支持canvas标签。
|
|
|
</canvas>
|
|
|
- <img class="bg" src="" alt="" crossorigin="anonymous">
|
|
|
+ <img class="bg" src="../image/question/2.jpg" alt="" crossorigin="anonymous">
|
|
|
<div class="baocun">长按保存,并分享至朋友圈</div>
|
|
|
<div class="code">
|
|
|
- <!--测试二维码 上线需要改-->
|
|
|
<img src="../image/question/code.jpg" alt="">
|
|
|
<div class="text">
|
|
|
<span>长按识别二维码</span>
|
|
@@ -69,8 +68,16 @@
|
|
|
</body>
|
|
|
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
|
|
<script>
|
|
|
+//console.log(localStorage.getItem('userData') == 'undefined')
|
|
|
+window.onload=function(){
|
|
|
+ if(localStorage.getItem('userData') == 'undefined') {
|
|
|
+ alert('请重新扫码登陆')
|
|
|
+ window.location.href = '../index.html'
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
var user = JSON.parse(localStorage.getItem('userData'));
|
|
|
- var uid = user.uid ? user.id : '7';
|
|
|
+ var uid = user.uid;
|
|
|
var avatar = user.avatar ? user.avatar : '';
|
|
|
var name = user.wechatName ? user.wechatName : '小朋友';
|
|
|
//获取Canvas对象(画布)
|
|
@@ -83,7 +90,7 @@
|
|
|
}
|
|
|
var ind = 0;
|
|
|
function recursion() {
|
|
|
- ajaxData("https://readertest.lingjiao.cn/activity/activity/xq", 7, data, function(result){
|
|
|
+ ajaxData("https://readertest.lingjiao.cn/activity/activity/xq", uid, data, function(result){
|
|
|
var length = result.data.questionNum;
|
|
|
if( ind >= length && result.data.isEnd === 0) {
|
|
|
$('#audio').attr('src', "")
|
|
@@ -209,9 +216,9 @@
|
|
|
play = function(){
|
|
|
audio.load();
|
|
|
audio.play();
|
|
|
- window.removeEventListener("touchstart",play, false);
|
|
|
};
|
|
|
- window.addEventListener("touchstart",play, false);
|
|
|
+ $('.audiobtn').on("click",play);
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
</html>
|