diff --git a/src/components/Loading.vue b/src/components/Loading.vue
index 2749d4f..b6b13e9 100644
--- a/src/components/Loading.vue
+++ b/src/components/Loading.vue
@@ -32,7 +32,6 @@ const show = (event) => {
@include pos(100%, 100%, 0px, 0px);
background-color: rgb(223, 15, 60);
overflow: hidden;
- max-width: 100%;
.load-bg {
@include pos(750px, 100%, 0px, 50%);
diff --git a/src/components/Question.vue b/src/components/Question.vue
new file mode 100644
index 0000000..d6e5467
--- /dev/null
+++ b/src/components/Question.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
{{ currentId + 1 }}.{{ questionList[currentId].question }}
+
+
{{ item.aid }}.{{
+ item.text }}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/test.vue b/src/components/test.vue
new file mode 100644
index 0000000..eb46732
--- /dev/null
+++ b/src/components/test.vue
@@ -0,0 +1,64 @@
+
+
+
随机题目与答案统计
+
+
{{ question.question }}
+
+
+
统计结果
+
+
{{ stat.question }} 答案统计
+
+ -
+ {{ answer }}: {{ count }} 次
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/data/data.js b/src/data/data.js
deleted file mode 100644
index 9c9398e..0000000
--- a/src/data/data.js
+++ /dev/null
@@ -1,31 +0,0 @@
-export default {
-
- //manifest 加载到纹理缓存使用的资源
- manifest: [
- {
- name: "test0",
- url: new URL(`@/assets/images/m_0.png`, import.meta.url).href,
- position: { x: 110, y: 210, w: 80, h: 80 },
- zIndex: 4,
- },
- {
- name: "test1",
- url: new URL(`@/assets/images/m_1.png`, import.meta.url).href,
- position: { x: 110, y: 200, w: 100, h: 100 },
- zIndex: 3,
- },
- {
- name: "test2",
- url: new URL(`@/assets/images/m_2.png`, import.meta.url).href,
- position: { x: 110, y: 300, w: 100, h: 100 },
- zIndex: 2,
- },
- {
- name: "test3",
- url: new URL(`@/assets/images/share.jpg`, import.meta.url).href,
- position: { x: 110, y: 400, w: 300, h: 300 },
- zIndex: 1,
- }
- ]
-
-}
\ No newline at end of file
diff --git a/src/data/index.js b/src/data/index.js
new file mode 100644
index 0000000..53cf0c4
--- /dev/null
+++ b/src/data/index.js
@@ -0,0 +1,207 @@
+export default [
+ {
+ id: 1,
+ type: 'mbti',
+ question: '当朋友约你外出,你会?',
+ answer: [
+ {
+ aid: 'A',
+ text: '询问计划具体时间段做什么',
+ secore: 'J',
+ },
+ {
+ aid: 'B',
+ text: '说走就走',
+ secore: 'P',
+ },
+ ],
+ },
+ {
+ id: 2,
+ type: 'mbti',
+ question: '你更喜欢什么样的社交生活?',
+ answer: [
+ {
+ aid: 'A',
+ text: '独处回血爽歪歪',
+ secore: 'I',
+ },
+ {
+ aid: 'B',
+ text: '呼朋唤友快乐多',
+ secore: 'E',
+ },
+ ],
+ },
+ {
+ id: 3,
+ type: 'mbti',
+ question: '当你想要做一个计划时,你会?',
+ answer: [
+ {
+ aid: 'A',
+ text: '收集尽量多的信息',
+ secore: 'S',
+ },
+ {
+ aid: 'B',
+ text: '偏向依靠经验',
+ secore: 'N',
+ },
+ ],
+ },
+ {
+ id: 4,
+ type: 'mbti',
+ question: '得知朋友因心情不好买了很多饼干,你第一想到的是?',
+ answer: [
+ {
+ aid: 'A',
+ text: '买了多少?一个人能吃完吗',
+ secore: 'T',
+ },
+ {
+ aid: 'B',
+ text: '为什么心情不好呢',
+ secore: 'F',
+ },
+ ],
+ },
+ {
+ id: 5,
+ type: 'lc',
+ question: '当你考虑投资一个新的金融产品时,你更倾向于?',
+ answer: [
+ {
+ aid: 'A',
+ text: '与朋友、同事或专业顾问讨论,通过外部交流获得信息和建议',
+ secore: 'E',
+ },
+ {
+ aid: 'B',
+ text: '独立研究,通过阅读、在线课程和个人分析来形成决策',
+ secore: 'I',
+ },
+ ],
+ },
+ {
+ id: 6,
+ type: 'lc',
+ type: 'lc',
+ question: '当评估一项投资机会时,你更倾向于?',
+ answer: [
+ {
+ aid: 'A',
+ text: '依赖详细的市场报告、历史数据和具体分析',
+ secore: 'S',
+ },
+ {
+ aid: 'B',
+ text: '依赖整体市场趋势、未来预测和直觉感受 ',
+ secore: 'N',
+ },
+ ],
+ },
+ {
+ id: 7,
+ type: 'lc',
+ question: '在选择一个投资合伙人时,你更看重?',
+ answer: [
+ {
+ aid: 'A',
+ text: '他们的专业能力、以往的业绩和逻辑决策过程',
+ secore: 'T',
+ },
+ {
+ aid: 'B',
+ text: '他们的个人价值观、信任度和与你的情感共鸣',
+ secore: 'F',
+ },
+ ],
+ },
+ {
+ id: 8,
+ type: 'lc',
+ question: '当面对投资市场的不确定性和变化时,你更倾向于?',
+ answer: [
+ {
+ aid: 'A',
+ text: '坚持你的投资计划和策略,不轻易改变已经制定的计划',
+ secore: 'J',
+ },
+ {
+ aid: 'B',
+ text: 'B.保持灵活性,根据市场的最新变化调整你的投资策略',
+ secore: 'P',
+ },
+ ],
+ },
+ {
+ id: 9,
+ type: 'lc',
+ question: '在做某项决定时,你认为比较重要的是?',
+ answer: [
+ {
+ aid: 'A',
+ text: '根据实际情况衡量考虑',
+ secore: 'J',
+ },
+ {
+ aid: 'B',
+ text: '考虑他人的感受和意见',
+ secore: 'P',
+ },
+ ],
+ },
+ {
+ id: 10,
+ type: 'mbti',
+ question: '你认为别人一般会?',
+ answer: [
+ {
+ aid: 'A',
+ text: '花很长时间才认识你',
+ secore: 'I',
+ },
+ {
+ aid: 'B',
+ text: '很短的时间便了解你',
+ secore: 'E',
+ },
+ ],
+ },
+ {
+ id: 11,
+ type: 'mbti',
+ question: '哪些人会更吸引你?',
+ answer: [
+ {
+ aid: 'A',
+ text: '一个思想敏捷及非常聪颖的人',
+ secore: 'N',
+ },
+ {
+ aid: 'B',
+ text: '实事求是,具有丰富常识的人',
+ secore: 'S',
+ },
+ ],
+ },
+ {
+ id: 12,
+ type: 'mbti',
+ question: '你是否经常让',
+ answer: [
+ {
+ aid: 'A',
+ text: '你的情感支配你的理智',
+ secore: 'F',
+ },
+ {
+ aid: 'B',
+ text: '你的理智主宰你的情感',
+ secore: 'T',
+ },
+ ],
+ },
+]
\ No newline at end of file
diff --git a/src/page/Home/App.vue b/src/page/Home/App.vue
index cbe67b6..effb780 100644
--- a/src/page/Home/App.vue
+++ b/src/page/Home/App.vue
@@ -1,15 +1,17 @@
-
+
+
diff --git a/src/plugins/index.js b/src/plugins/index.js
index 1108a14..a16d963 100644
--- a/src/plugins/index.js
+++ b/src/plugins/index.js
@@ -327,16 +327,48 @@ export function getAstro(month, day) {
return s.substr(month * 2 - (day < arr[month - 1] ? 2 : 0), 2);
}
-// 引入BGM
-export function createBGM() {
- var bgmElement = document.createElement('div');
+// 洗牌算法
+export function FYShuffle(arr) {
+ let len = arr.length;
- // document.querySelector('app').appendChild(bgmElement)
+ while (len > 1) {
+ let rand = Math.floor(Math.random() * len);
+ len--;
+ [arr[len], arr[rand]] = [arr[rand], arr[len]] // 采用的数组的结构赋值
+ }
- //
+ return arr;
+}
+
+
+// 选出数组中出现次数最多的值
+export function mostValue(arr) {
+ // 创建一个空对象用于存储值及其出现的次数
+ let counter = {};
+
+ // 遍历数组中的每个元素
+ for (let i = 0; i < arr.length; i++) {
+ // 如果值已经在counter对象中,增加其计数
+ // 如果值不在counter对象中,设置计数为1
+ if (counter[arr[i]]) {
+ counter[arr[i]]++;
+ } else {
+ counter[arr[i]] = 1;
+ }
+ }
+
+ // 找出出现次数最多的值及其出现的次数
+ let mostFrequentValue = null;
+ let maxCount = 0;
+ for (let key in counter) {
+ if (counter[key] > maxCount) {
+ mostFrequentValue = key;
+ maxCount = counter[key];
+ }
+ }
+
+ // 返回出现次数最多的值和其出现的次数
+ return { value: mostFrequentValue, count: maxCount };
}