diff --git a/src/components/Popup.vue b/src/components/Popup.vue
index 5eda46b..0df305b 100644
--- a/src/components/Popup.vue
+++ b/src/components/Popup.vue
@@ -2,15 +2,13 @@
import {ref} from 'vue';
import Taro from '@tarojs/taro';
-const show = ref(false);
-
-const overlay = ref();
+const isShow = ref(false);
defineExpose({
- show,
+ isShow,
});
-defineProps({
+const props = defineProps({
src: {
required: true,
type: String,
@@ -18,29 +16,36 @@ defineProps({
},
type: Number,
cb: {
- required: true,
- type: Function,
- default: () => {},
+ type: Function || null,
+ default: null,
},
});
-Taro.useLoad(async () => {
- if (Taro.getStorageSync('token')) show.value = true;
- // const res = await getSignRecord()
- // console.log(res)
+const clickFn = type => {
+ if (props.cb) props.cb(type);
+ else isShow.value = false;
+};
+
+Taro.useLoad(() => {
+ if (Taro.getStorageSync('token')) isShow.value = true;
});
-
-
+
+
-
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 5182fb1..218713e 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -48,15 +48,16 @@
hover-class="none">
+