Merge branch 'dev'

This commit is contained in:
zoujiandong 2025-03-17 17:41:22 +08:00
commit 8c73c39292
6 changed files with 54 additions and 15 deletions

View File

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

View File

@ -52,6 +52,17 @@ const route = useRoute();
let origin=route.query.source?route.query.source:''; let origin=route.query.source?route.query.source:'';
const source=ref(origin); const source=ref(origin);
const freshkey = ref(0); const freshkey = ref(0);
const props=defineProps({
project_id:{
type:String,
default:''
}
})
const envVersion=computed(()=>{
if(source.value==3){
return 'release'
}
})
const goHome = () => { const goHome = () => {
if(source.value==3){ if(source.value==3){
// try { // try {
@ -72,7 +83,8 @@ const goHome = () => {
}); });
}else{ }else{
router.push({ 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> <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> <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> <totop></totop>
<back></back> <back :project_id="caseObj.project_id"></back>
</template> </template>
<script setup> <script setup>
@ -51,6 +51,13 @@ const is_welfare = ref(0);
let origin=route.query.source?route.query.source:'' let origin=route.query.source?route.query.source:''
const source = ref(origin); const source = ref(origin);
const case_id = ref(route.query.case_id); 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 getDetail = async () => {
const { code, data } = await api.getCaseDetail(case_id.value); const { code, data } = await api.getCaseDetail(case_id.value);
proxy.$loading.hide(); proxy.$loading.hide();
@ -87,8 +94,8 @@ const getDetail = async () => {
for (let i = 1; i < data.case_item.length; i++) { for (let i = 1; i < data.case_item.length; i++) {
pageList.value.push(data.case_item[i]); pageList.value.push(data.case_item[i]);
} }
let link=host+'/web/caseIntro?case_id='+case_id.value; getProjectDetail(data.case_name,data.project_id)
WXSHARE(data.case_name,'“佳动例”等你来挑战,精彩福利享不停',link,'');
} }
} }

View File

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

View File

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

View File

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