Compare commits

...

18 Commits

Author SHA1 Message Date
zoujiandong
d8364e9fe1 Merge branch 'dev' 2025-03-25 15:02:34 +08:00
zoujiandong
92b3abd215 适配 2025-03-25 14:22:36 +08:00
zoujiandong
46251fda16 333 2025-03-25 14:04:02 +08:00
zoujiandong
2caf0690fc 2222 2025-03-25 14:00:46 +08:00
zoujiandong
478fa93d89 适配 2025-03-25 11:51:09 +08:00
zoujiandong
c3a07768ee 适配 2025-03-25 11:47:05 +08:00
zoujiandong
42576b9285 适配 2025-03-25 10:20:12 +08:00
zoujiandong
35b7a99c45 222 2025-03-25 09:56:24 +08:00
zoujiandong
b2d144839f pagebox 2025-03-25 09:44:17 +08:00
zoujiandong
e7e4cf95f0 22 2025-03-25 09:26:54 +08:00
zoujiandong
4291de9230 111 2025-03-25 09:09:58 +08:00
zoujiandong
9da614aaef 测试 2025-03-25 09:06:08 +08:00
zoujiandong
348c8e3ee5 1111 2025-03-24 14:37:10 +08:00
zoujiandong
6f2b066053 111 2025-03-24 14:22:03 +08:00
zoujiandong
728b72b2ca 添加height:0px. 2025-03-24 14:07:42 +08:00
zoujiandong
78ed17572a 1111 2025-03-21 16:02:17 +08:00
zoujiandong
125545ebda 111 2025-03-21 15:59:15 +08:00
zoujiandong
cce8c503e6 111 2025-03-21 15:58:12 +08:00
5 changed files with 61 additions and 33 deletions

View File

@ -56,7 +56,7 @@ onMounted(() => {
right:0px;
bottom:135px;
cursor: pointer;
z-index:999;
z-index:2;
overflow: hidden;
border-radius: 15px 0 0 15px;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);

View File

@ -1,12 +1,12 @@
<template>
<div class="main casemain" :class="{on: step == pageIndex }" :id="'pagemain'+pageIndex" v-show="step == pageIndex" >
<div class="main casemain" :class="{on: step == pageIndex }" :id="'pagemain'+pageIndex" :style="{height:step == pageIndex?'100%':'0px'}" >
<img src="../assets/bg.png" alt="" class="bg" />
<div class="dealbox" style="position: relative;z-index:1;background:transparent;">
<div class="prev" @click="switchPage(pageIndex - 1)">上一步</div>
</div>
<div class="content">
<div class="pagebox">
<div class="page">
<div class="content" >
<div class="pagebox" >
<div class="page" v-if="step == pageIndex" >
<!-- <div class="card" v-html="pageItem.content"></div> -->
<div
class="card"
@ -47,7 +47,7 @@
></question>
</div>
</div>
<div class="dealbox">
<div class="dealbox" >
<div class="next" @click="switchPage(pageIndex - 1)">上一步</div>
<div class="prev" @click="goNext(pageIndex + 1)">下一步</div>
</div>
@ -57,10 +57,11 @@
ref="cdialog"
:showCancel="false"
></c-dialog>
</div>
<van-image-preview ref="ImagePreview" v-model:show="showImg" closeable :images="imgList" @change="onChange">
<van-image-preview teleport="body" :overlay-style="{zIndex:10}" ref="ImagePreview" v-model:show="showImg" closeable :images="imgList" @change="onChange">
</van-image-preview>
</div>
</van-image-preview>
</template>
<script setup>
@ -105,6 +106,23 @@ const unitAnswer = {
};
const cdialog = ref(null);
const dialog_message = ref("");
watch(() => props.step, async(newVal) => {
let imgArr = [];
await nextTick(() => {
const nodeList = document.querySelectorAll("#pagemain"+props.pageIndex+" .namebox img");
console.log(nodeList);
nodeList.forEach(function (node) {
imgArr.push(node.src);
node.removeEventListener("click",(e)=>{
handleClick(e)
});
node.addEventListener("click", (e)=>{
handleClick(e)
});
});
imgList.value = [...new Set(imgArr)];
});
})
watch(
() => props.pageItem,
@ -283,21 +301,7 @@ const handleClick = (e) => {
};
onMounted(async () => {
let imgArr = [];
await nextTick(() => {
const nodeList = document.querySelectorAll("#pagemain"+props.pageIndex+" .namebox img");
console.log(nodeList);
nodeList.forEach(function (node) {
imgArr.push(node.src);
node.removeEventListener("click",(e)=>{
handleClick(e)
});
node.addEventListener("click", (e)=>{
handleClick(e)
});
});
imgList.value = [...new Set(imgArr)];
});
});
const onChange=(newIndex)=>{
position.value = newIndex || 0
@ -307,10 +311,23 @@ const onChange=(newIndex)=>{
<style lang='scss' scoped>
.casemain.on{
opacity: 1;
display: block;
position: relative;
z-index:1;
height:100%;
min-height: 100vh;
}
.casemain{
position: relative;
z-index:-1000;
min-height:0;
height:0px;
display: none;
opacity: 0;
}
.main {
padding-bottom: 15px;
opacity: 0;
margin-bottom: 15px;
width: 100%;
position: relative;
background: #fff;
@ -318,7 +335,9 @@ const onChange=(newIndex)=>{
.dealbox {
background: #fff;
margin: 12px 15px 10px;
position: relative;
z-index:1;
display: flex;
justify-content: space-between;
}

View File

@ -18,7 +18,8 @@
<div class="button" @click="handleStart" >马上开始</div>
</div>
</div>
<caseDetail v-for="(item, index) in pageList" :pageIndex="index" :step="step" @switchPage="switchPage" :pageItem="item" :pageNum="pageList.length" @getAllAnswer="getAllAnswer" :start_time="start_time" :case_id="case_id"></caseDetail>
<caseDetail v-for="(item, index) in pageList" :pageIndex="index" :step="step" @switchPage="switchPage" :pageItem="item" :pageNum="pageList.length" @getAllAnswer="getAllAnswer" :start_time="start_time" :case_id="case_id" :key="item.case_item_id" v-show="step == index"></caseDetail>
<comment v-show="!showIntro && step==pageList.length" ref="commentRef" :countTime="countTime" @initPage="initPage" :start_time="entry_time" :allAnswer="allAnswer" :is_welfare="is_welfare"></comment>
<totop></totop>
<back :project_id="caseObj.project_id"></back>
@ -120,13 +121,18 @@ const getAllAnswer=(data)=>{
const switchPage = (index) => {
if(index<0){
showIntro.value=true;
step.value=-1;
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
setTimeout(()=>{
step.value=-1;
},300)
}else{
step.value=index;
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
setTimeout(()=>{
step.value=index;
},300)
}
if(index==pageList.value.length){
//alert(caseObj.project_id);
@ -157,13 +163,16 @@ const handleCount = () => {
const initPage=()=>{
// step.value =-1;
// showIntro.value=true;
step.value = 0;
showIntro.value = false;
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
if(caseObj.case_item.length<=1) {
commentRef.value.init(caseObj.case_id,caseObj.project_id)
}
setTimeout(()=>{
step.value = 0;
showIntro.value = false;
},300)
}
const handleStart = () => {
step.value = 0;

View File

@ -353,6 +353,7 @@ defineExpose({init,formatAnswer})
.main {
width: 100%;
position: relative;
z-index:1;
overflow: hidden;
.add {

View File

@ -50,7 +50,6 @@ const getList = async () => {
list.value = list.value.concat(data.data);
if (data.data.length <10) {
finished.value = true;
}
}