- 1921年,中国共产党召开了第一次全国代表大会,宣告中国共产党成立。你知道这次大会是在哪里召开的吗?
+ {{ questionTitle }}
@@ -32,13 +32,24 @@
enter-active-class="fade-in"
leave-to-class="fade-out">
-
-
-
+
+
+
+
-
- 恭喜你,答对了!
-
+
+ 恭喜你,答对了!
+
+
+
+
+
+
+
+
+ 正确答案:{{ correctAnswer }}
+
+
@@ -50,17 +61,47 @@
enter-active-class="fade-in"
leave-to-class="fade-out">
-
-
-
-
-
- 打卡成功,已完成{{'3'}}个红色场馆的打卡, 完成8家红色场馆打卡即可获得荣誉证书
-
-
-
-
-
+
+
+
+
+
+
+
+ 恭喜你,答对了!
+
+
+
+
+
+
+
+
+ 正确答案:{{ correctAnswer }}
+
+
+
+
+
+
+
+ 打卡成功,已完成{{detail.point_answer_total + 1}}个红色场馆的打卡, 完成{{detail.points.length}}家红色场馆打卡即可获得荣誉证书
+
+
+
+
+
+
+
+
+ 打卡成功,已完成所有红色场馆的打卡。
快来生成你的证书吧!
+
+
+
+
+
+
+
@@ -71,21 +112,51 @@
export default {
data() {
return {
+ isTotalEnd: false, //是否完成所有打卡
+ detail: {},
now: 0,
nowAnswer: {},
- answers: [{},{},{}],
+ answers: [],
+ myAnswers: [],//回答答案数组
+ isCorrect: false,
progress: 1,//1答题中2答案3结束
flag: -1,//显示active index
};
},
methods: {
+ async getDetail () {
+ const res = await this.$u.api.getPoints()
+ this.isTotalEnd = res.points.length == res.point_answer_total
+ this.detail = res
+ },
+ async getQuestions () {
+ const res = await this.$u.api.getQuestions({
+ point_id: this.vuex_point_id
+ })
+
+ this.answers = res.questions
+ },
+
answer (item, index) {
this.flag = index
+ this.myAnswers.push({
+ question_id: this.answers[this.now].id,
+ answer_ids: item.id
+ })
+ this.isCorrect = !!item.is_correct
setTimeout(() => {
this.progress = this.now === (this.answers.length - 1) ? 3 : 2
+
+ if (this.progress === 3) {
+ this.isTotalEnd = this.detail.points.length == ( Number(this.detail.point_answer_total) + 1)
+ this.$u.api.saveQuiz({
+ point_id: this.vuex_point_id,
+ answers: this.myAnswers
+ })
+ }
},500)
},
@@ -93,21 +164,42 @@ export default {
this.now ++
this.flag = -1
this.progress = 1
+ },
+
+ toMap () {
+ uni.navigateTo({ url:'/pages/map/map' })
+ },
+
+ toCertificate () {
+ uni.navigateTo({ url:'/pages/certificate/certificate'})
}
},
computed: {
+ correctAnswer () {
+ let correct = this.answers[this.now]?.options?.find(i => i.is_correct)
+ return `${this.num(correct?.myindex)}、${correct?.title}`
+ },
+ questionTitle () {
+ return this.answers[this.now]?.title
+ },
+ questionAnswers () {
+ return this.answers[this.now]?.options?.sort((a, b) => {
+ return a.myindex - b.myindex
+ })
+ },
+
num () {
return function (index) {
let map = new Map([
- [0,'A'],
- [1,'B'],
- [2,'C'],
- [3,'D'],
- [4,'E'],
- [5,'F'],
- [6,'G'],
- [7,'H'],
- [8,'I'],
+ [1,'A'],
+ [2,'B'],
+ [3,'C'],
+ [4,'D'],
+ [5,'E'],
+ [6,'F'],
+ [7,'G'],
+ [8,'H'],
+ [9,'I'],
])
return map.get(index)
}
@@ -153,6 +245,10 @@ export default {
return `第${chineseNumber}题`;
}
}
+ },
+ onShow() {
+ this.getQuestions();
+ this.getDetail();
}
}
@@ -272,7 +368,8 @@ export default {
font-size: 32rpx;
font-weight: 500;
color: #666666;
- line-height: 135rpx;
+ padding-top: 52rpx;
+ //line-height: 135rpx;
& > span {
font-size: 34rpx;
@@ -286,6 +383,7 @@ export default {
line-height: 36rpx;
padding: 0 calc(127rpx - 51rpx);
+ padding-top: 38rpx;
}
}
}
diff --git a/pages/certificate/certificate.vue b/pages/certificate/certificate.vue
index e0cb0dd..7c5a9fe 100644
--- a/pages/certificate/certificate.vue
+++ b/pages/certificate/certificate.vue
@@ -1,9 +1,34 @@
+
+
+
+
mode=
+
+
-
+
+
+
+
+
+ 王晓明同学,
+
+
+ 你已完成2023年“我是党史记录人——红色少年行”未成年人研学线上打卡。
+
+
+ 学党史悟精神聚力量,你是第2023位完成者,快邀请你的同学一起完成线上打卡吧!
+
+
+
+
+
+
@@ -18,9 +43,85 @@ export default {
diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue
index 1614240..4743975 100644
--- a/pages/detail/detail.vue
+++ b/pages/detail/detail.vue
@@ -7,7 +7,9 @@
diff --git a/pages/map/map.vue b/pages/map/map.vue
index a923ee7..e3c5479 100644
--- a/pages/map/map.vue
+++ b/pages/map/map.vue
@@ -13,13 +13,14 @@
v-for="(item, index) in pointers"
:key="index"
:style="{ 'transform': `translate(calc(${area.w * item.x / 100}px - 50%),calc(${area.h * item.y / 100}px - 50%))` }"
- @click="$u.throttle(() => toDetail(index))">
-
-
![]()
+ @click="$u.throttle(() => toDetail(item))">
+
+
@@ -38,7 +39,7 @@
-
+
@@ -48,7 +49,7 @@
完成
- {{pointers.length}}
+ {{pointers.length - done}}
家红色场馆打卡
即可获得
荣誉证书
@@ -70,6 +71,7 @@
export default {
data() {
return {
+ done: 0,
isShowProgress: true,
area: {
w: 100,
@@ -100,9 +102,10 @@ export default {
};
},
methods: {
- toDetail (id) {
+ toDetail (item) {
+ this.$u.vuex('vuex_point_id', item.id)
uni.navigateTo({
- url: `/pages/detail/detail?id=${id}`
+ url: `/pages/detail/detail`
})
},
@@ -122,17 +125,12 @@ export default {
}
}
this.pointers = []
- const res = await this.$u.api.baseFormIndex({
- table_name: 'map_points',
- with_relations: ['image']
- })
- this.pointers = res.data.map((i, index) => {
+ const res = await this.$u.api.getPoints()
+ this.done = res.point_answer_total || 0
+ this.pointers = res.points?.map((i, index) => {
return {
- name: i.name,
- x: typeof i.x === 'string' ? Number(i.x) : 0,
- y: typeof i.y === 'string' ? Number(i.y) : 0,
- d: convertToEquivalentAngle(30 * index + 1),
- image: i.image
+ d: convertToEquivalentAngle(60 * index + 1),
+ ...i
}
})
}
@@ -157,7 +155,7 @@ export default {
mounted() {
},
- onShow() {
+ onLoad() {
this.getPoints()
}
}
@@ -214,6 +212,11 @@ export default {
padding: 12rpx 10rpx;
position: absolute;
+
+ &--active {
+ background: #b93736;
+ color: #fff;
+ }
}
& .box {
width: 116rpx;
@@ -227,26 +230,14 @@ export default {
filter: drop-shadow(2rpx 4rpx 2rpx #90D2CF);
transform-origin: 50% calc(100% + 26rpx + 5rpx);
+ // overflow: hidden;
position: absolute;
top: calc(-116rpx - 26rpx);
left: -50rpx;
-
- //&__text {
- // background: #F5D8AD;
- // border-radius: 6rpx;
- // word-break: keep-all;
- // filter: drop-shadow(2rpx 4rpx 2rpx #90D2CF);
- // color: #C52A34;
- // font-size: 20rpx;
- // text-align: center;
- //
- //
- // transform: translate(-50%, -100%);
- // position: absolute;
- // top: 0;
- // left: 50%;
- //}
+ &--active {
+ border-color: #b93736;
+ }
& > img {
width: 106rpx;
height: 106rpx;
@@ -265,6 +256,24 @@ export default {
bottom: 0;
left: 50%;
}
+ &--active::before {
+ content: '已打卡';
+ font-size: 20rpx;
+ color: #fff;
+ background: #b93736;
+ border-radius: 30rpx;
+ zoom: .8;
+ clip-path: circle(84rpx at 84% 178%);
+
+ padding: 6rpx 14rpx 5rpx 122rpx;
+ z-index: 2;
+ position: absolute;
+ top: -1rpx;
+ left: -96rpx;
+ }
+ &--active::after {
+ background: #b93736;
+ }
}
}
diff --git a/static/city.png b/static/city.png
new file mode 100644
index 0000000..82519bc
Binary files /dev/null and b/static/city.png differ
diff --git a/static/container-bkg.png b/static/container-bkg.png
new file mode 100644
index 0000000..9c8c876
Binary files /dev/null and b/static/container-bkg.png differ
diff --git a/static/error.png b/static/error.png
new file mode 100644
index 0000000..9d5e154
Binary files /dev/null and b/static/error.png differ
diff --git a/static/html/explanation.html b/static/html/explanation.html
index a102272..03e39fb 100644
--- a/static/html/explanation.html
+++ b/static/html/explanation.html
@@ -31,30 +31,7 @@
@@ -72,24 +49,6 @@
@@ -98,36 +57,7 @@
@@ -140,11 +70,9 @@
-
+
-
苏州革命博物馆建成于1993年,占地10000多平方米,展区分两层,面积4000平方米,共有两项基本陈列和两个临时展厅。整体建筑具有鲜明的革命纪念主题特色和浓厚的历史文化气息。
-
基本陈列“光辉的历程一中国共产党在苏州”,借助历史照片、文字和革命文物等,系统讲述了在中国共产党在苏州的百年光辉历程。大型多媒体半景画演示项目《阳澄烽火》,借助声、光、电等多种演示手段与1000平方米的巨型油画、500平方米的场景模型完美结合,细致还原了发生在抗日战争时期阳澄湖地区的“洋沟港战斗”目前,苏州革命博物馆荣获省爱国主义教育基地、省党史教育基地、省社会科学普及示范基地、省国防教育基地、省青少年科技教育示范基地及省级党员教育实境课堂示范点等称号
查看更多
@@ -175,49 +103,8 @@