Compare commits

...

3 Commits

Author SHA1 Message Date
zoujiandong
8c73c39292 Merge branch 'dev' 2025-03-17 17:41:22 +08:00
zoujiandong
ebb261f604 111 2025-03-17 15:36:38 +08:00
zoujiandong
5c3525daa3 添加接口 2025-03-17 15:13:19 +08:00
6 changed files with 54 additions and 15 deletions

View File

@ -6,6 +6,9 @@ const login = (data) => {
const getProjectList = (data) => {
return http.get("/project/page", data);
};
const getProjectDetail = (id) => {
return http.get("/project/"+id);
};
const getCaseList = (data) => {
return http.get("/case/page", data);
};
@ -56,6 +59,6 @@ export default {
getScore,
getConfig,
completeCase,
behaviorRecord
behaviorRecord,
getProjectDetail
}

View File

@ -52,6 +52,17 @@ const route = useRoute();
let origin=route.query.source?route.query.source:'';
const source=ref(origin);
const freshkey = ref(0);
const props=defineProps({
project_id:{
type:String,
default:''
}
})
const envVersion=computed(()=>{
if(source.value==3){
return 'release'
}
})
const goHome = () => {
if(source.value==3){
// try {
@ -72,7 +83,8 @@ const goHome = () => {
});
}else{
router.push({
path: "/home",
path: "/caseList",
query: { project_id: props.project_id },
});
}

View File

@ -21,7 +21,7 @@
<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>
<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></back>
<back :project_id="caseObj.project_id"></back>
</template>
<script setup>
@ -51,6 +51,13 @@ const is_welfare = ref(0);
let origin=route.query.source?route.query.source:''
const source = ref(origin);
const case_id = ref(route.query.case_id);
const getProjectDetail=async(name,project_id)=>{
const {code,data}=await api.getProjectDetail(project_id);
if(code==200){
let link=host+'/web/caseIntro?case_id='+case_id.value;
WXSHARE(name,data.project_name,link,'');
}
}
const getDetail = async () => {
const { code, data } = await api.getCaseDetail(case_id.value);
proxy.$loading.hide();
@ -87,8 +94,8 @@ const getDetail = async () => {
for (let i = 1; i < data.case_item.length; i++) {
pageList.value.push(data.case_item[i]);
}
let link=host+'/web/caseIntro?case_id='+case_id.value;
WXSHARE(data.case_name,'“佳动例”等你来挑战,精彩福利享不停',link,'');
getProjectDetail(data.case_name,data.project_id)
}
}

View File

@ -29,14 +29,23 @@ import { ref} from "vue";
import { useRoute } from 'vue-router';
import { WXSHARE } from "../utils/wxshare-1.6.0";
import host from "../utils/host"
import api from '../api/user.js';
const route = useRoute();
//0: 1: 2:
const activeName = ref(2);
const img_url=ref(route.query.img_url)
const case_num=ref(route.query.case_num)
const img_url=ref('')
const case_num=ref('');
const getDetail=async()=>{
const {code,data}=await api.getProjectDetail(route.query.project_id);
if(code==200){
img_url.value=data.project_image;
case_num.value=data.case_count;
let link=host+'/web/caseList?project_id='+route.query.project_id;
WXSHARE(data.project_name,"肝胆相照-肝胆病在线公共服务平台",link,'');
}
}
onMounted(() => {
let link=host+'/web/home';
WXSHARE('“佳动例”等你来挑战,精彩福利享不停',"肝胆相照-肝胆病在线公共服务平台",link,'');
getDetail();
})
</script>

View File

@ -36,7 +36,7 @@ const finished = ref(false);
const goCase = (id,img,num) => {
router.push({
path: 'caseList',
query: { project_id: id,img_url:img,case_num: num}
query: { project_id: id}
})
}
const getList = async () => {
@ -66,7 +66,7 @@ const onLoad = () => {
};
onMounted(() => {
let link=host+'/web/home';
WXSHARE('“佳动例”等你来挑战,精彩福利享不停',"肝胆相照-肝胆病在线公共服务平台",link,'');
WXSHARE('肝胆相照互动病例等你来挑战,福利享不停',"肝胆相照-肝胆病在线公共服务平台",link,'');
})
</script>

View File

@ -11,7 +11,7 @@
<pageunit v-for="(item, index) in pageList" :pageIndex="index" :pageItem="item" :imgList="imgList" @changeImg="changeImg"></pageunit>
</div>
<totop></totop>
<back></back>
<back :project_id="project_id"></back>
</div>
<!-- < ref="ImagePreview" v-model:show="showImg" closeable :images="imgList" @change="onChange">
@ -35,12 +35,20 @@ const imgList = ref([]);
let origin=route.query.source?route.query.source:''
const source = ref(origin);
const getProjectDetail=async(name,project_id)=>{
const {code,data}=await api.getProjectDetail(project_id);
if(code==200){
let link=host+'/web/caseIntro?case_id='+case_id.value;
WXSHARE(name,data.project_name,link,'');
}
}
const getDetail = async () => {
const { code, data } = await api.getCaseDetail(case_id.value)
if (code == 200) {
document.title = data.case_name;
let link=host+'/web/caseIntro?case_id='+case_id.value;
WXSHARE(data.case_name,'“佳动例”等你来挑战,精彩福利享不停',link,'');
getProjectDetail(data.case_name,data.project_id);
// let link=host+'/web/caseIntro?case_id='+case_id.value;
// WXSHARE(data.case_name,'',link,'');
// Object.assign(caseObj, data)
// casePage.value = data.case_item;
pageList.value = [];