|
@@ -1,5 +1,6 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="page pg-bg pgplant">
|
|
3
|
+ <Rule />
|
3
|
4
|
<GoBack class="goback abs" @click.stop="router.go(-1)" />
|
4
|
5
|
<div class="content">
|
5
|
6
|
<div class="content-item" v-for="(item, inx) in list" :key="inx">
|
|
@@ -27,7 +28,13 @@
|
27
|
28
|
</div>
|
28
|
29
|
</div>
|
29
|
30
|
</div>
|
30
|
|
-
|
|
31
|
+ <Share
|
|
32
|
+ v-if="planted"
|
|
33
|
+ class="share"
|
|
34
|
+ @share="onShare"
|
|
35
|
+ @badge="badgeShow = true"
|
|
36
|
+ />
|
|
37
|
+ <Badge :show="badgeShow" @cancel="badgeShow = false" />
|
31
|
38
|
<div class="footer txt">目前总种植数量:{{ user?.num }}</div>
|
32
|
39
|
</div>
|
33
|
40
|
</template>
|
|
@@ -37,23 +44,18 @@ import { onMounted, ref, watch } from "vue";
|
37
|
44
|
import GoBack from "@/components/GoBack.vue";
|
38
|
45
|
import { useRouter } from "vue-router";
|
39
|
46
|
import { useModel } from "@zjxpcyc/vue-tiny-store";
|
40
|
|
-// import animate from "@/utils/animate"
|
|
47
|
+import Share from "./Share.vue";
|
|
48
|
+import Badge from "./Badge.vue";
|
|
49
|
+import Rule from "./Rule.vue";
|
41
|
50
|
|
42
|
51
|
const { user, contries, updateContries } = useModel("user");
|
43
|
52
|
|
44
|
53
|
const router = useRouter();
|
45
|
54
|
const choise = ref([]);
|
46
|
|
-const countryRef = ref();
|
47
|
|
-const flowerShow = ref();
|
48
|
|
-const planted = ref(false);
|
|
55
|
+const planted = ref(true);
|
49
|
56
|
const badgeShow = ref(false);
|
50
|
57
|
|
51
|
|
-let timer = "timer";
|
52
|
|
-
|
53
|
58
|
const animate = (plus, e) => {
|
54
|
|
- // var _this = this;
|
55
|
|
- console.log(e, "==");
|
56
|
|
-
|
57
|
59
|
var n = 1;
|
58
|
60
|
var $i = $("<b/>").text("+" + n);
|
59
|
61
|
var x = e.pageX,
|
|
@@ -88,7 +90,14 @@ const isChoise = (name) => {
|
88
|
90
|
// console.log(name, "==--");
|
89
|
91
|
return choise.value?.filter((x) => x === name)?.length > 0;
|
90
|
92
|
};
|
|
93
|
+const onPlanted = () => {
|
|
94
|
+ planted.value = true;
|
|
95
|
+ flowerShow.value = false;
|
|
96
|
+};
|
91
|
97
|
|
|
98
|
+const onShare = () => {
|
|
99
|
+ router.push("/share");
|
|
100
|
+};
|
92
|
101
|
const click = (item, e) => {
|
93
|
102
|
const arr = choise.value;
|
94
|
103
|
updateContries(item.name);
|