diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml
new file mode 100644
index 0000000..6981a71
--- /dev/null
+++ b/src/main/resources/application-local.yml
@@ -0,0 +1,60 @@
+#spring:
+# datasource:
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+# username: root
+# password: 123456
+
+#服务配置
+server:
+ port: 8081
+##mybatis 日志
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+spring:
+ datasource:
+ dynamic:
+ primary: first #设置默认的数据源或者数据源组,默认值即为master
+ strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
+ datasource:
+ first: #Asia/Shanghai
+ url: jdbc:mysql://127.0.0.1:3306/testweb?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: root
+ password: 123456
+ driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
+ second:
+ url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: root
+ password: 123456
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ three:
+ url: jdbc:mysql://127.0.0.1:3306/bq_spring?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: root
+ password: 123456
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ four:
+ url: jdbc:mysql://47.118.35.61:3306/bq_spring_festival?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+ username: root
+ password: zp511020
+ driver-class-name: com.mysql.cj.jdbc.Driver
+
+#spring:
+# datasource:
+# dynamic:
+# primary: first #设置默认的数据源或者数据源组,默认值即为master
+# strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
+# datasource:
+# first:
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: jdbc:mysql://127.0.0.1:3306/testweb?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+# username: root
+# password: 123456
+# second:
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+# username: root
+# password: 12345
+
+
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
new file mode 100644
index 0000000..724c4dd
--- /dev/null
+++ b/src/main/resources/application.yml
@@ -0,0 +1,24 @@
+#spring相关配置
+spring:
+ profiles:
+ active: local
+
+
+
+
+#spring:
+# datasource:
+# dynamic:
+# primary: first #设置默认的数据源或者数据源组,默认值即为master
+# strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
+# datasource:
+# first:
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: jdbc:mysql://127.0.0.1:3306/testweb?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+# username: root
+# password: 123456
+# second:
+# driver-class-name: com.mysql.cj.jdbc.Driver
+# url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+# username: root
+# password: 12345
diff --git a/src/main/resources/mapper/first/WageMapper.xml b/src/main/resources/mapper/first/WageMapper.xml
new file mode 100644
index 0000000..b042245
--- /dev/null
+++ b/src/main/resources/mapper/first/WageMapper.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/main/resources/mapper/second/AddressMapper.xml b/src/main/resources/mapper/second/AddressMapper.xml
new file mode 100644
index 0000000..a83cf18
--- /dev/null
+++ b/src/main/resources/mapper/second/AddressMapper.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/main/resources/mapper/three/BagMapper.xml b/src/main/resources/mapper/three/BagMapper.xml
new file mode 100644
index 0000000..37ed533
--- /dev/null
+++ b/src/main/resources/mapper/three/BagMapper.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ update bag set integrity=integrity-1,work=work-1, develop=develop-1, innovation=innovation-1,
+ country=country-1, industry=industry-1, more_better=more_better+1
+ where employee_id=#{employeeId}
+
+
+
+ update bag
+
+
+ integrity=integrity-1,
+
+
+ work=work-1,
+
+
+ develop=develop-1,
+
+
+ industry=industry-1,
+
+
+ innovation=innovation-1,
+
+
+ country=country-1,
+
+
+ universal=universal-1,
+
+ more_better=more_better+1
+
+ where employee_id=#{employeeId}
+
+
diff --git a/src/main/resources/static/img/banner0.jpg b/src/main/resources/static/img/banner0.jpg
new file mode 100644
index 0000000..d94bf01
Binary files /dev/null and b/src/main/resources/static/img/banner0.jpg differ
diff --git a/src/main/resources/static/jigsaw1.js b/src/main/resources/static/jigsaw1.js
new file mode 100644
index 0000000..ef088a5
--- /dev/null
+++ b/src/main/resources/static/jigsaw1.js
@@ -0,0 +1,361 @@
+$(function() {
+ var dragging = {}
+ var completed = []
+ var rdm = rdm(1,21)
+ var lost = $('#lost')[0]
+ var win = $('#win')[0]
+ var timeOut
+ var timer
+ var win = document.getElementById("win");
+ var lost = document.getElementById("lost");
+ var step = document.getElementById("step");
+ var seconds = document.getElementById("seconds");
+ seconds.volume=1;
+ // console.log(rdm)
+ // return
+ var names = ['阿尔法S', 'X7S', 'BJ40', 'EU7', 'BJ80', '现代途胜L', '福田银河', '昌河电动车', '奔驰C', '阿尔法T']
+ $('#start').click(function() {
+ startGame()
+ })
+ function rdm(n, m){
+ var random = Math.floor(Math.random()*(m-n+1)+n);
+ return random;
+
+ }
+ startGame()
+ function startGame() {
+ // $('.games').show()
+ timeOut = 50
+ $('.timeout').text(timeOut + 'S' )
+
+ initGame()
+ }
+ $('.begin-game').click(function() {
+ $('.before-start').hide()
+ seconds.load();
+ step.load();
+ win.load();
+ lost.load();
+ startGameFun();
+
+ })
+
+ function startGameFun() {
+
+ timeOut = 50
+ $('.timeout').text(timeOut + 'S' )
+ timer = setInterval(function() {
+ timeOut -= 1
+ $('.timeout').text(timeOut + 'S' )
+ if(timeOut <= 0) {
+ showLost()
+ }
+ if(timeOut<11){
+ seconds.play();
+ }
+ if(timeOut<=0){
+ seconds.pause();
+ }
+ }, 1000)
+ }
+ function initGame() { // 初始化游戏
+ var sections = [1, 2, 3 ,4, 5, 6, 7, 8, 9, 10, 11, 12]
+ $('.result-win .car').attr('src', '/images/jigsaw/' + rdm + '/car.jpg?t='+new Date())
+ $('#bg').attr('src', '/images/jigsaw/' + rdm + '/car.jpg?t='+new Date())
+ sections = shuffle(sections)
+ var sourceUl = $('.source ul')
+ sourceUl.html('')
+ $('.target ul li').find('img').remove()
+ for(var i = 0; i< sections.length; i++) {
+ (function(num) {
+ var li = $('
')
+ var img = $('
')
+ var cur = sections[num]
+ img.attr('class', 'target-item')
+ img.attr('data-order', cur)
+ //img.attr('src', '/images/jigsaw/' + rdm + '/images/car_' + cur + '.png')
+ img.attr('src', '/images/jigsaw/' + rdm + '/images/car_' + cur + '.png?t='+new Date());
+ li.append(img)
+ sourceUl.append(li)
+ })(i)
+ }
+ // showWin()
+ }
+ function shuffle(arr) { // 打乱图片排序
+ for (var i = arr.length - 1; i >= 0; i--) {
+ var randomIndex = Math.floor(Math.random() * (i + 1));
+ var itemAtIndex = arr[randomIndex];
+ arr[randomIndex] = arr[i];
+ arr[i] = itemAtIndex;
+ }
+ return arr;
+ }
+ $(document).on('touchstart', '.target-item', function(e) {
+ dragstart(e);
+ seconds.load();
+ step.load();
+ win.load();
+ lost.load();
+ })
+
+ function dragstart(e) {
+ // console.log(e.target)
+ // 不处理多个手指同时触摸事件
+ if (e.originalEvent.touches.length !== 1) {
+ return
+ }
+ e = e.originalEvent.touches[0];
+ var sorece = e.target
+ var pageX = e.pageX
+ var pageY = e.pageY
+ dragging.isReady = true
+ dragging.sorece = sorece
+ dragging.touchX = e.clientX;
+ dragging.touchY = e.clientY;
+ // console.log(e)
+ dragging.pieceX = $(sorece).offset().left;
+ dragging.pieceY = $(sorece).offset().top;
+ dragging.MRX = pageX - dragging.pieceX
+ dragging.MRY = pageY - dragging.pieceY
+ }
+
+
+ // 手指在屏幕移动事件
+ $(".games").on("touchmove", function (e) {
+ e.preventDefault();
+ if(!dragging.isReady) return
+ e = e.originalEvent.changedTouches[0];
+ var movedX = e.clientX - dragging.touchX;
+ var movedY = e.clientY - dragging.touchY;
+ $(dragging.sorece).offset({"left": dragging.pieceX + movedX, "top": dragging.pieceY + movedY});
+
+ });
+ $(".games").on("touchend", function (e) {
+ dragging.isReady = false
+ // $(dragging.sorece).offset({"left": dragging.pieceX, "top": dragging.pieceY});
+ let targets = $('.targetitem')
+ var hasInTarget = false
+ for(var i= 0; i < targets.length; i++ ) {
+ // 目标盒子碰撞检测
+ if (isOverlap($(dragging.sorece), $(targets[i]))) {
+ let toDom = $(targets[i])
+ // console.log(completed)
+ if(completed.indexOf(i) != -1) {
+ hasInTarget = false
+ break
+ }
+
+ let img = $('
')
+ var draggingsorece = $(dragging.sorece)
+ img.attr('src', draggingsorece.attr('src'))
+
+ toDom.append(img)
+ hasInTarget = true
+ var order = draggingsorece.data('order') -1
+
+ if(i != order) {
+ showLost()
+ } else {
+ completed.push(i)
+ step.play();
+ if (completed.length == 12) {
+ showWin()
+ }
+ }
+ //
+ break;
+ }
+
+ }
+ if(hasInTarget) {
+ $(dragging.sorece).remove()
+
+ } else {
+
+ $(dragging.sorece).offset({"left": dragging.pieceX, "top": dragging.pieceY});
+ }
+ });
+ // showLost()
+ $('.game-result .close').click(function() {
+ $('.result').hide()
+ $('.game-result').hide()
+ $('.game-result .main').removeClass('slideInDown')
+ $('.game-result .mainThree').removeClass('slideInDown')
+ location.reload();
+ })
+
+ $('.result-win .close').click(function() {
+ $('.result-win').hide()
+ $('.result-winThree').hide()
+ location.reload();
+ // $('.result').hide()
+ // $('.game-result').hide()
+ // $('.game-result .main').removeClass('slideInDown')
+ // startGame()
+ })
+
+ // 点击不计弹框中的× 关闭当前弹框,重新加载页面
+ $('.result-winThree .close').click(function() {
+ $('.result-winThree').hide()
+ location.reload();
+ })
+
+ // showLost()
+ // showWin() 游戏成功
+ function showWin() {
+ $('.timeout').text('游戏结束')
+ var employeeId = stg("get","employeeId");
+ console.log("员工"+employeeId)
+ win.play()
+ clearInterval(timer)
+ // hideCommonDome(
+ // $('.games .target').addClass('bounceOutLeft')
+ // $('.games .source').addClass('bounceOutRight')
+ let i = countPuzzle();
+ console.log("i:"+i);
+ if(i>=3){
+ console.log("弹出不计分的框");
+ $('.result-winThree .mainThree').addClass('slideInDown')
+ // $('.top-icon .lost').show()
+ $('.result-winThree').show()
+ }else{
+ $('.result-win .main').addClass('slideInDown')
+ $('.result-win').show()
+ }
+
+ setTimeout(function() {
+ // // $('.games').hide()
+ // $('.result-win .name').text(names[rdm - 1])
+ // $('.result-win').show()
+
+ // $('.car-img').addClass('bounceInDown')
+ // $('.yanhua').addClass('fadeIn')
+ // $('.go-button').addClass('fadeIn')
+ }, 1000)
+ console.log("简单游戏成功执行结算的方法")
+ let time = 50-timeOut;
+ let lev = 1;
+ let act = "拼越野之型"
+ let score= 10
+ let actResult=1
+ settlementGame(employeeId,time,lev,act,score,actResult);
+ }
+ // 游戏失败
+ function showLost() {
+ $('.timeout').text('游戏结束')
+ var employeeId = stg("get","employeeId");
+ console.log("当前登录员工号:"+employeeId);
+ console.log("游戏剩余时间:"+timeOut);
+ clearInterval(timer)
+ lost.play()
+ completed = []
+ hideCommonDome()
+
+ $('.game-result .main').addClass('slideInDown')
+ // $('.top-icon .lost').show()
+ $('.main .lost').show()
+
+
+
+ console.log("简单游戏失败执行结算的方法")
+ let time = 50-timeOut;
+ let lev = 1;
+ let act = "拼越野之型"
+ let score= 0
+ let actResult=0
+ settlementGame(employeeId,time,lev,act,score,actResult);
+
+ }
+ function playAudio() {
+ // var audio = $('#step')[0].play()
+ var audio = doucment.getElementById('step')
+ if (setting.autoplay) {
+ if (window.WeixinJSBridge) {
+ WeixinJSBridge.invoke('getNetworkType', {}, function (e) {
+ audio.play();
+ }, false);
+ } else {
+ document.addEventListener("WeixinJSBridgeReady", function () {
+ WeixinJSBridge.invoke('getNetworkType', {}, function (e) {
+ audio.play();
+ });
+ }, false);
+ }
+ audio.play();
+ } else {
+ audio.pause();
+ }
+ return false;
+ }
+ // showLost()
+
+ function hideCommonDome() {
+ $('.result').hide()
+ $('.game-result').show()
+ }
+ function isOverlap(objOne, objTwo) {
+ var offsetOne = objOne.offset();
+ var offsetTwo = objTwo.offset();
+ var x1 = offsetOne.left;
+ var y1 = offsetOne.top;
+ var x2 = x1 + objOne.width();
+ var y2 = y1 + objOne.height();
+
+ var x3 = offsetTwo.left;
+ var y3 = offsetTwo.top;
+ var x4 = x3 + objTwo.width();
+ var y4 = y3 + objTwo.height();
+
+ var jx = x1 + dragging.MRX
+ var jy = y1 + dragging.MRY
+
+ return ((jx > x3 && jx < x4) && (jy > y3 && jy < y4))
+ }
+
+ // 游戏完成(失败或成功) 进行结算的方法
+ function settlementGame(employeeId,time,lev,act,score,actResult){
+ $.ajax({
+ type: "Get",
+ dataType: "json",
+ url: "/record/score",
+ data: {
+ employeeId:employeeId,
+ time:time,
+ act:act,
+ lev:lev,
+ score:score,
+ actResult:actResult
+ },
+ success: function (res) {
+ console.log(res.code)
+ },
+
+ });
+ }
+
+ // 查询当前用户当天玩拼图游戏的次数
+ function countPuzzle(){
+ var employeeId = stg("get","employeeId");
+ console.log("员工"+employeeId)
+ console.log("执行计算次数的方法");
+ var count = 0;
+ $.ajax({
+ type: "Get",
+ dataType: "json",
+ url: "/record/countAnswerRecord",
+ data: {
+ employeeId:employeeId,
+ act:"拼越野之型",
+ },
+ async : false,
+ success: function (res) {
+ count = res.data
+ },
+ });
+ return count
+ }
+
+
+
+
+})
\ No newline at end of file
diff --git a/src/main/resources/static/yunque.js b/src/main/resources/static/yunque.js
new file mode 100644
index 0000000..ba1c4a4
--- /dev/null
+++ b/src/main/resources/static/yunque.js
@@ -0,0 +1,462 @@
+var questions = [{
+ title: '请选择云雀正式成立日期。',
+ options: [
+ 'A.2020年2月1日',
+ 'B.2020年2月2日',
+ 'C.2020年1月20日',
+ ],
+ answer: 1
+ },
+ {
+ title: '请选择不属于云雀的工作地点。',
+ options: [
+ 'A.大连',
+ 'B.北京',
+ 'c.海南-澄迈县',
+ ],
+ answer: 0
+ },
+ {
+ title: '请选择云雀的使命。',
+ options: [
+ 'A.让内容创造美好',
+ 'B.让内容更美好',
+ ],
+ answer: 1
+ },
+ {
+ title: '请选择云雀的愿景。',
+ options: [
+ 'A.内容管理行业标杆,最值得信赖的伙伴。',
+ 'B.用户为本,科技向善用户为本',
+ ],
+ answer: 0
+ },
+ {
+ title: '请选择云雀的价值观?',
+ options: [
+ 'A.正直诚信、专业为本、坚韧实干、开放协作、持续成长',
+ 'B.正直诚信、专业为本、协作进取、客户第一、追求卓越 ',
+ ],
+ answer: 0
+ },
+ {
+ title: '哪年哪月云雀在职人数突破1000人?',
+ options: [
+ 'A.2021年3月',
+ 'B.2021年4月',
+ 'C.2021年5月',
+
+ ],
+ answer: 2
+ },
+ {
+ title: '云雀目前在职员工有多少?',
+ options: [
+ 'A.不到3000人',
+ 'B.超过3000人',
+ ],
+ answer: 1
+ },
+ {
+ title: '云雀第一次大班会在哪年哪月召开?',
+ options: [
+ 'A.2021年5月',
+ 'B.2021年6月',
+ 'C.2021年7月',
+ ],
+ answer: 0
+ },
+ {
+ title: '云雀第一次大班会主会场在哪里?',
+ options: [
+ 'A.天津',
+ 'B.武汉 ',
+ 'C.青岛',
+ ],
+ answer: 0
+ },
+ {
+ title: '云雀LOGO由什么组成?',
+ options: [
+ 'A.鸟和鸟',
+ 'B.鸟和文本',
+ ],
+ answer: 1
+ },
+ {
+ title: '请选出哪个不属于天津小吃。',
+ options: [
+ 'A.烩面',
+ 'B.麻花',
+ 'C.煎饼果子',
+
+ ],
+ answer: 0
+ },
+ {
+ title: '请选出哪个不属于青岛特色。',
+ options: [
+ 'A.啤酒',
+ 'B.麻辣小龙虾',
+ 'C.鲅鱼水饺',
+
+ ],
+ answer: 1
+ },
+ {
+ title: '请选出哪个不属于武汉小吃。',
+ options: [
+ 'A.热干面',
+ 'B.麻辣小龙虾',
+ 'C.卤煮',
+
+ ],
+ answer: 2
+ },
+ {
+ title: '2022年冬奥会在中国哪个城市举办?',
+ options: [
+ 'A.北京和张家口 ',
+ 'B.北京和黑龙江',
+ 'C.张家口和黑龙江 ',
+
+ ],
+ answer: 0
+ },
+ {
+ title: '上一届奥运会在哪个国家/城市举办?',
+ options: [
+ 'A.日本东京 ',
+ 'B.加拿大温哥华',
+ 'C.韩国首尔 ',
+ ],
+ answer: 0
+ },
+ {
+ title: '员工行为规范中违纪行为分为哪几类?',
+ options: [
+ 'A.一般违纪、中度违纪、严重违纪',
+ 'B.轻度违纪、较重违纪、严重违纪',
+ ],
+ answer: 1
+ },
+ {
+ title: '员工行为规范中规定弄虚作假、收受贿赂、泄露机密属于哪一种违纪行为?',
+ options: [
+ 'A.轻度违纪',
+ 'B.较重违纪',
+ 'C.严重违纪',
+
+ ],
+ answer: 2
+ },
+ {
+ title: '员工考勤管理制度中规定连续休假几天及以上定义为连休?',
+ options: [
+ 'A.3天(含3天)以上',
+ 'B.5天(含5天)以上',
+ ],
+ answer: 0
+ },
+ {
+ title: '请休事假的最低申请时长是多少?',
+ options: [
+ 'A.4小时',
+ 'B.2小时',
+ ],
+ answer: 0
+ },
+ {
+ title: '入职公司满一年,不满三年,年假有多少天?',
+ options: [
+ 'A.5天',
+ 'B.7天',
+ ],
+ answer: 1
+ },
+ {
+ title: '活水到新岗位考核期多久?',
+ options: [
+ 'A.1个月-3个月',
+ 'B.3个月-6个月',
+
+ ],
+ answer: 0
+ },
+ {
+ title: '成功推荐候选人入职,伯乐奖金如何发放?',
+ options: [
+ 'A.一次性发放',
+ 'B. 入职后发放50%,转正后发放50%',
+
+ ],
+ answer: 1
+ },
+ {
+ title: '《云雀事故定级和处罚规定》中规定,事故分为几级?',
+ options: [
+ 'A.3级',
+ 'B.5级',
+ ],
+ answer: 1
+ },
+ {
+ title: '云雀各项人事制度从哪里可以查询?',
+ options: [
+ 'A.https://iwiki.woa.com/space/YQHR',
+ 'B.https://yunque.woa.com',
+
+ ],
+ answer: 0
+ },
+ {
+ title: '报销流程应该在哪个系统里操作?',
+ options: [
+ 'A.https://iwiki.woa.com/space/YQHR',
+ 'B.https://yunque.woa.com',
+ ],
+ answer: 1
+ },
+ {
+ title: '云雀投诉邮箱是哪一个?',
+ options: [
+ 'A.yangguangyunque@tencen.com',
+ 'B.yunquetousu@tencent.com',
+
+ ],
+ answer: 0
+ },
+ {
+ title: '请休病假需要提供什么资料?',
+ options: [
+ 'A.什么都不需要,口头告知组长即可',
+ 'B.病历、门诊收据、医生开具的休假单',
+ ],
+ answer: 1
+ },
+ {
+ title: '一年有365天,最早把一年定位365天的是哪国人?',
+ options: [
+ 'A.中国人',
+ 'B.埃及人',
+ 'C.印度人',
+ ],
+ answer: 1
+ },
+ {
+ title: '百家姓“赵钱孙李,周吴郑王”中,为什么“赵”放在第一位?',
+ options: [
+ 'A.当时的皇帝姓赵',
+ 'B.当时姓赵的人最多',
+ 'C.编撰的人姓赵',
+ ],
+ answer: 0
+ },
+ {
+ title: '“头悬梁,锥刺股”的典故中,“股”是指身体的哪个位置?',
+ options: [
+ 'A.臀部',
+ 'B.大腿',
+ 'C.肩膀',
+ ],
+ answer: 1
+ },
+ {
+ title: '110米栏比赛中,有几个栏?',
+ options: [
+ 'A.9个',
+ 'B.10个',
+ 'C.11个',
+ ],
+ answer: 1
+ },
+ {
+ title: '发烧时应多食用?',
+ options: [
+ 'A.鸡蛋',
+ 'B.牛奶',
+ 'C.水',
+ ],
+ answer: 2
+ },
+ {
+ title: '蔬菜中含有的哪种元素能够促进肠胃蠕动,有利于食物消化?',
+ options: [
+ 'A.维生素',
+ 'B.纤维素',
+ 'C.微量元素',
+ ],
+ answer: 1
+ },
+ {
+ title: '世界上最大的宫殿是?',
+ options: [
+ 'A.克里姆林宫',
+ 'B.白宫',
+ 'C.故宫',
+ ],
+ answer: 2
+ },
+ {
+ title: '奥运五环旗为五色,其中黄色代表?',
+ options: [
+ 'A.亚洲',
+ 'B.欧洲',
+ 'C.非洲',
+ ],
+ answer: 0
+ },
+ {
+ title: '鱼有心脏吗?',
+ options: [
+ 'A.有',
+ 'B.没有',
+ ],
+ answer: 0
+ },
+ {
+ title: '世界上最深的海沟是?',
+ options: [
+ 'A.日本海沟',
+ 'B.马绍尔海沟',
+ 'C.马里亚纳海沟',
+ ],
+ answer: 2
+ },
+ {
+ title: '下列哪个不属于我国民间四大传说?',
+ options: [
+ 'A.嫦娥奔月',
+ 'B.梁山伯与祝英台',
+ 'C.孟姜女寻夫',
+ ],
+ answer: 0
+ },
+ {
+ title: '世界音乐之都是?',
+ options: [
+ 'A.巴黎',
+ 'B.维也纳',
+ 'C.巴塞罗那',
+ ],
+ answer: 1
+ },
+ {
+ title: '人体最大块的肌肉是?',
+ options: [
+ 'A.臀肌',
+ 'B.腹肌',
+ 'C.胸肌',
+ ],
+ answer: 0
+ },
+ {
+ title: '月上柳梢头,人约黄昏后”描写的是哪个传统节日?',
+ options: [
+ 'A.元宵节',
+ 'B.春节',
+ 'C.七夕',
+ ],
+ answer: 0
+ },
+ {
+ title: '我国被称为“万园之园”的是',
+ options: [
+ 'A.拙政园',
+ 'B.颐和园',
+ 'C.清晖园',
+ 'D.圆明园',
+ ],
+ answer: 3
+ },
+ {
+ title: '人全身共有几块骨头',
+ options: [
+ 'A.205块',
+ 'B.206块',
+ 'C.207块',
+ 'D.208块',
+ ],
+ answer: 1
+ },
+ {
+ title: '《还珠格格》中的皇帝是',
+ options: [
+ 'A.乾隆',
+ 'B.康熙',
+ 'C.雍正',
+ ],
+ answer: 0
+ },
+ {
+ title: '牛奶中含有人体所需要的所有维生素吗?',
+ options: [
+ 'A.是',
+ 'B.否',
+ ],
+ answer: 0
+ },
+ {
+ title: '竹子一生只开一次花?',
+ options: [
+ 'A.是',
+ 'B.否',
+ ],
+ answer: 0
+ },
+ {
+ title: '鲍鱼是鱼吗',
+ options: [
+ 'A.是',
+ 'B.否',
+ ],
+ answer: 1
+ },
+ {
+ title: '直升机是飞机吗',
+ options: [
+ 'A.是',
+ 'B.否',
+ ],
+ answer: 1
+ },
+ {
+ title: '从哪里可以快速获取行政流程、制度、福利的相关内容?',
+ options: [
+ 'A.企业微信-云雀行政公众号',
+ 'B.iwiki',
+ ],
+ answer: 0
+ },
+
+
+]
+
+
+function infthree() {
+ var arr = [];
+ for (var i = 0; i < 10; i++) {
+ var arrNum = parseInt(Math.random() * questions.length);
+ var flag = true;
+ for (var j = 0; j <= arr.length; j++) {
+ if (arrNum == arr[j]) {
+ flag = false;
+ break;
+ }
+ }
+ if (flag) {
+ arr.push(arrNum);
+ } else {
+ i--;
+ }
+ }
+ var res = []
+ for(var i = 0; i< arr.length; i++) {
+ var curIndex = arr[i]
+ res.push(questions[curIndex])
+ }
+ console.log(arr)
+ return res
+}
+