This commit is contained in:
@@ -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;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<nut-overlay
|
||||
v-model:visible="show"
|
||||
v-model:visible="isShow"
|
||||
:lock-scroll="true"
|
||||
:close-on-click-overlay="false">
|
||||
<view class="wrapper">
|
||||
<view @click.stop="cb(type)">
|
||||
<image class="image" :src="src" />
|
||||
<view @click.stop="clickFn(type)">
|
||||
<image
|
||||
:style="{
|
||||
width: src.naturalWidth,
|
||||
height: src.naturalHeight < 600 ? src.naturalHeight : '480px',
|
||||
}"
|
||||
:src="src" />
|
||||
</view>
|
||||
<view @click.stop="show = false">
|
||||
<view @click.stop="isShow = false">
|
||||
<image class="icon" src="../static/index/close.png" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -48,15 +48,16 @@
|
||||
hover-class="none">
|
||||
</navigator>
|
||||
<MerList :get-user-location="getUserLocal" />
|
||||
<Popup :src="require('../../static/popTip.png')" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {getHomeList, getStoreList} from '@/api/home';
|
||||
import {getHomeList} from '@/api/home';
|
||||
import MerList from '@/components/MerList.vue';
|
||||
import {showTips} from '@/utils';
|
||||
import Popup from '@/components/Popup.vue';
|
||||
|
||||
const statusBarHeight = Taro.getSystemInfoSync().statusBarHeight;
|
||||
const BarHeight = ref((statusBarHeight as number) + 7);
|
||||
|
||||
BIN
src/static/popTip.png
Normal file
BIN
src/static/popTip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 173 KiB |
Reference in New Issue
Block a user