添加接口
This commit is contained in:
parent
c29e61e0d6
commit
5c3525daa3
@ -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
|
||||||
}
|
}
|
||||||
@ -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 },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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>
|
||||||
|
|
||||||
|
|||||||
@ -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>
|
||||||
|
|
||||||
|
|||||||
@ -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">
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user