Commit 89506e63 authored by zhengke's avatar zhengke

优化关注微信公众号

parent 8de5bdd3
...@@ -101,7 +101,8 @@ ...@@ -101,7 +101,8 @@
<!-- 创建设计 --> <!-- 创建设计 -->
<temDesign :addTem="addVisible" @close="addVisible=false"/> <temDesign :addTem="addVisible" @close="addVisible=false"/>
<OrderReview v-if="orderVisible" :show-person="isShowPerson" :default-type="isShowPerson?1:2" @close="()=>orderVisible=false"></OrderReview> <OrderReview v-if="orderVisible" :show-person="isShowPerson" :default-type="isShowPerson?1:2" @close="()=>orderVisible=false"></OrderReview>
<follow v-show="isPublicAccount" :show="isPublicAccount" @close="isPublicAccount=false,getInfo()"></follow> <follow v-show="isPublicAccount" :show="isPublicAccount" @close="isPublicAccount=false"
@success="isPublicAccount=false,getInfo()"></follow>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive } from "vue"; import { ref, reactive } from "vue";
......
...@@ -64,6 +64,7 @@ const params = reactive({ ...@@ -64,6 +64,7 @@ const params = reactive({
}) })
const emit = defineEmits<{ const emit = defineEmits<{
(event: 'close'): void, (event: 'close'): void,
(event: 'success'): void,
}>() }>()
const queryTimer = ref<any>(null) const queryTimer = ref<any>(null)
...@@ -73,6 +74,7 @@ const RefreshLoading = ref(false) ...@@ -73,6 +74,7 @@ const RefreshLoading = ref(false)
const followForm = ref() const followForm = ref()
const close = () => { const close = () => {
stopTimerHandler()
emit('close') emit('close')
} }
if(model.value==0 && ConfigId.value) params.ConfigId = ConfigId.value if(model.value==0 && ConfigId.value) params.ConfigId = ConfigId.value
...@@ -115,7 +117,7 @@ const userLoginHandler = async (type:any)=>{ ...@@ -115,7 +117,7 @@ const userLoginHandler = async (type:any)=>{
if(!type) { if(!type) {
stopTimerHandler() stopTimerHandler()
ElMessage.success({message:'关注成功'}) ElMessage.success({message:'关注成功'})
location.reload() emit('success')
} }
}else if(result.status=='ERROR') { }else if(result.status=='ERROR') {
if(!type) { if(!type) {
...@@ -133,17 +135,17 @@ const goVipIntroduce = () =>{ ...@@ -133,17 +135,17 @@ const goVipIntroduce = () =>{
} }
watch(()=>props.show,(n,o)=>{ watch(()=>props.show,(n,o)=>{
if(!n) stopTimerHandler() if(n) {
if(n) getQrcode() getQrcode()
if(followForm.value)followForm.value.click()
}else document.removeEventListener('click', () => {});
},{ },{
immediate: true immediate: true
}) })
onMounted( () => { onMounted( () => {
document.addEventListener('click', (e) => { document.addEventListener('click', (e) => {
if (props.show&&followForm.value) {
followForm.value.click()
}
}); });
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment