6.16
This commit is contained in:
parent
c1309bc9fc
commit
bbc99ec0dd
1
App.vue
1
App.vue
@ -5,6 +5,7 @@
|
||||
});
|
||||
onShow(()=>{
|
||||
console.log('App Show')
|
||||
|
||||
});
|
||||
onHide(()=>{
|
||||
console.log('App Hide')
|
||||
|
||||
10
api/api.js
10
api/api.js
@ -178,8 +178,14 @@ const api = {
|
||||
},
|
||||
givePoint(data){
|
||||
return request('/reward',data,'post',true);
|
||||
}
|
||||
|
||||
},
|
||||
h5Login(data){
|
||||
return request('/login/hcp',data,'post');
|
||||
},
|
||||
readRecord(data){
|
||||
return request('/user/case/read',data,'post',false,'application/json');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<up-icon name="search" size="26" color="#999" @click="search"></up-icon>
|
||||
</view>
|
||||
<up--image
|
||||
:src="headImg"
|
||||
:src="userHeadImg"
|
||||
@click="goMy"
|
||||
mode="widthFix"
|
||||
width="62rpx"
|
||||
@ -34,6 +34,9 @@
|
||||
import { ref, watch} from "vue";
|
||||
import headImg from "@/static/headImg.png";
|
||||
import logoImg from "@/static/logo.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import { onShow,onLoad } from "@dcloudio/uni-app";
|
||||
const userHeadImg = ref('');
|
||||
const keyWord = ref('');
|
||||
const props=defineProps({
|
||||
searchWord:{
|
||||
@ -64,17 +67,17 @@ watch(()=>props.searchWord,(newVal)=>{
|
||||
keyWord.value=newVal
|
||||
})
|
||||
const goMy=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/my/my'
|
||||
})
|
||||
}
|
||||
const search=()=>{
|
||||
if(props.type=='home'){
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/search/search?keyWord=${keyWord.value}`,
|
||||
});
|
||||
}else if(props.type=='caseTalk'){
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/specialList/specialList?keyWord=${keyWord.value}`,
|
||||
});
|
||||
}
|
||||
@ -87,6 +90,16 @@ const search=()=>{
|
||||
|
||||
|
||||
}
|
||||
onLoad(()=>{
|
||||
let userInfo = uni.getStorageSync('userInfo');
|
||||
if(userInfo && userInfo.avatar){
|
||||
userHeadImg.value=userInfo.avatar
|
||||
}else{
|
||||
userHeadImg.value=headImg;
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -37,7 +37,10 @@
|
||||
import { ref, watch,defineEmits} from "vue";
|
||||
import headImg from "@/static/headImg.png";
|
||||
import logoImg from "@/static/logo.png";
|
||||
import { onShow,onLoad } from "@dcloudio/uni-app";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
const keyWord = ref('');
|
||||
const userHeadImg = ref('');
|
||||
const props=defineProps({
|
||||
searchWord:{
|
||||
type:String,
|
||||
@ -69,7 +72,7 @@ watch(()=>props.searchWord,(newVal)=>{
|
||||
})
|
||||
const emit = defineEmits(['changeWord'])
|
||||
const goMy=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/my/my'
|
||||
})
|
||||
}
|
||||
@ -79,6 +82,16 @@ const goBack = () => {
|
||||
delta: 1,
|
||||
});
|
||||
};
|
||||
onLoad(()=>{
|
||||
let userInfo = uni.getStorageSync('userInfo');
|
||||
if(userInfo && userInfo.avatar){
|
||||
userHeadImg.value=userInfo.avatar
|
||||
}else{
|
||||
userHeadImg.value=headImg;
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
const search=()=>{
|
||||
// if (!keyWord.value) {
|
||||
// return uni.showToast({
|
||||
@ -87,7 +100,7 @@ const search=()=>{
|
||||
// });
|
||||
// }
|
||||
emit('changeWord',keyWord.value)
|
||||
// uni.navigateTo({
|
||||
// navTo({
|
||||
// url: `/pages/search/search?keyWord=${keyWord.value}`,
|
||||
// });
|
||||
}
|
||||
|
||||
@ -1,26 +1,29 @@
|
||||
<template>
|
||||
<up-tabbar
|
||||
|
||||
<up-tabbar
|
||||
class="u-page"
|
||||
:value="value"
|
||||
:fixed="true"
|
||||
:zIndex="99"
|
||||
:placeholder="true"
|
||||
:placeholder="false"
|
||||
activeColor="#3CC7C0"
|
||||
:safeAreaInsetBottom="true"
|
||||
:safeAreaInsetBottom="false"
|
||||
>
|
||||
<up-tabbar-item text="临床病例库" @click="handleClick">
|
||||
<image
|
||||
<up-tabbar-item text="临床病例库" @click="handleClick" :activeIcon="ku_on" :inactiveIcon="ku">
|
||||
<!-- <view class="aa" slot="active-icon">222</view> -->
|
||||
<!-- <image
|
||||
class="u-page__item__slot-icon"
|
||||
slot="active-icon"
|
||||
:src="ku_on"
|
||||
></image>
|
||||
<image
|
||||
src="https://www4.bing.com//th?id=OHR.RheaDad_ZH-CN6706868651_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp"
|
||||
></image> -->
|
||||
<!-- <image
|
||||
class="u-page__item__slot-icon"
|
||||
slot="inactive-icon"
|
||||
:src="ku"
|
||||
></image>
|
||||
></image> -->
|
||||
</up-tabbar-item>
|
||||
<up-tabbar-item text="互动病例" @click="handleClick">
|
||||
<image
|
||||
<up-tabbar-item text="互动病例" :activeIcon="group_on" :inactiveIcon="group" @click="handleClick">
|
||||
<!-- <image
|
||||
class="u-page__item__slot-icon"
|
||||
slot="active-icon"
|
||||
:src="group_on"
|
||||
@ -29,10 +32,10 @@
|
||||
class="u-page__item__slot-icon"
|
||||
slot="inactive-icon"
|
||||
:src="group"
|
||||
></image>
|
||||
></image> -->
|
||||
</up-tabbar-item>
|
||||
<up-tabbar-item text="病例交流" @click="handleClick">
|
||||
<image
|
||||
<up-tabbar-item text="病例交流" :activeIcon="talk_on" :inactiveIcon="talk" @click="handleClick">
|
||||
<!-- <image
|
||||
class="u-page__item__slot-icon"
|
||||
slot="active-icon"
|
||||
width="47rpx"
|
||||
@ -42,12 +45,13 @@
|
||||
<image
|
||||
width="47rpx"
|
||||
height="47rpx"
|
||||
class="u-page__item__slot-icon"
|
||||
slot="inactive-icon"
|
||||
class="u-page__item__slot-icon"
|
||||
slot="inactive-icon"
|
||||
:src="talk"
|
||||
></image>
|
||||
></image> -->
|
||||
</up-tabbar-item>
|
||||
</up-tabbar>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@ -57,6 +61,7 @@ import ku_on from "@/static/ku_on.png";
|
||||
import group_on from "@/static/group_on.png";
|
||||
import talk from "@/static/talk.png";
|
||||
import talk_on from "@/static/talk_on.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import { ref } from "vue";
|
||||
const props=defineProps({
|
||||
value: {
|
||||
@ -66,24 +71,36 @@ const props=defineProps({
|
||||
});
|
||||
const handleClick = (e) => {
|
||||
if(e==0){
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
}else if(e==1){
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: "/pages/case/case",
|
||||
});
|
||||
}else if(e==2){
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: "/pages/caseTalk/caseTalk",
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style >
|
||||
.u-page__item__slot-icon{
|
||||
width: 47rpx;
|
||||
height: 47rpx;
|
||||
}
|
||||
.u-tabbar__content__item-wrapper{
|
||||
border-top: 2rpx solid #f3f4f6!important;
|
||||
}
|
||||
/* .page{
|
||||
:deep(.u-tabbar){
|
||||
border-top: 2rpx solid #f3f4f6!important;
|
||||
}
|
||||
:deep(.u-tabbar--fixed){
|
||||
border-top: 2rpx solid #f3f4f6!important;
|
||||
}
|
||||
} */
|
||||
|
||||
</style>
|
||||
43
main.js
43
main.js
@ -1,5 +1,9 @@
|
||||
import App from './App'
|
||||
import navTo from './utils/navTo'
|
||||
// #ifdef h5
|
||||
import api from './api/api'
|
||||
import cookie from './utils/cookie'
|
||||
// #endif
|
||||
import uviewPlus, { setConfig } from 'uview-plus'
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
@ -11,13 +15,44 @@ const app = new Vue({
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
|
||||
// #ifdef VUE3
|
||||
import { createSSRApp } from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
|
||||
app.use(uviewPlus, () => {
|
||||
|
||||
app.use(uviewPlus, async() => {
|
||||
// if(process.env.UNI_PLATFORM =="h5"){
|
||||
|
||||
// let token = '';
|
||||
// if(window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
// token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
|
||||
// }else{
|
||||
// token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
|
||||
// }
|
||||
// if(!token){
|
||||
// let video_token = cookie.readCookie('video_token');
|
||||
// alert(video_token)
|
||||
// const res = await api.h5Login({
|
||||
// token: video_token
|
||||
// });
|
||||
// let result = res.data;
|
||||
// if (window.location.href.indexOf('//casedata.igandan.com')>-1) {
|
||||
// uni.setStorageSync("AUTH_TOKEN_CASEDATA",result.token);
|
||||
// } else {
|
||||
// uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token);
|
||||
// };
|
||||
// uni.setStorageSync("userInfo",{
|
||||
// avatar:result.avatar,
|
||||
// user_id:result.user_id,
|
||||
// status:result.status,
|
||||
// user_name:result.user_name,
|
||||
// doctor_id:result.doctor_id,
|
||||
// });
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
|
||||
return {
|
||||
options: {
|
||||
// 修改$u.config对象的属性
|
||||
@ -28,7 +63,7 @@ export function createApp() {
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(uni.$u.config.v);
|
||||
|
||||
//app.config.globalProperties.$navTo = navTo
|
||||
return {
|
||||
app
|
||||
|
||||
28
pages.json
28
pages.json
@ -16,35 +16,35 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/publish/publish",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/certImg/certImg",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/sickList/sickList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/videoList/videoList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
@ -59,49 +59,49 @@
|
||||
{
|
||||
"path": "pages/caseTalk/caseTalk",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/specialList/specialList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/certList/certList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my/my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/myJoin/myJoin",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/myCollect/myCollect",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/detail/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "详情",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"polyv-player": "plugin://polyv-player/player"
|
||||
@ -112,14 +112,14 @@
|
||||
{
|
||||
"path": "pages/search/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/searchList/searchList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarTitleText": "肝胆相照临床病例库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
||||
@ -13,15 +13,27 @@
|
||||
import tabBar from '@/components/tabBar/tabBar.vue';
|
||||
const src = ref('')
|
||||
onLoad((options)=>{
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
let token='';
|
||||
if(window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
token=uni.getStorageSync("AUTH_TOKEN_CASEDATA");
|
||||
src.value = 'https://caseplatform.igandan.com/web/home?token='+token;
|
||||
}else{
|
||||
token=uni.getStorageSync("DEV_AUTH_TOKEN_CASEDATA");
|
||||
src.value = 'https://dev-caseplatform.igandan.com/web/home?token='+token;
|
||||
}
|
||||
|
||||
}else{
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
let token=''
|
||||
if (envVersion == "release") {
|
||||
token=uni.getStorageSync("AUTH_TOKEN_CASEDATA");
|
||||
} else {
|
||||
token= uni.getStorageSync("DEV_AUTH_TOKEN_CASEDATA");
|
||||
};
|
||||
console.log(token)
|
||||
src.value = 'https://dev-caseplatform.igandan.com/web/home?token='+token;
|
||||
src.value = 'https://dev-caseplatform.igandan.com/web/home?token='+token;
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
<navBar :navName="'肝胆相照病例交流园地'" :type="'caseTalk'"></navBar>
|
||||
<view class="databox">
|
||||
<view class="cell">
|
||||
<view class="num">{{ numInfo.exchange_collect_num}}</view>
|
||||
<view class="num">{{ numInfo.exchange_num}}</view>
|
||||
<view class="name">病例数</view>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<view class="num">{{ numInfo.exchange_num }}</view>
|
||||
<view class="num">{{numInfo.exchange_collect_num}}</view>
|
||||
<view class="name">互动数</view>
|
||||
</view>
|
||||
<view class="cell">
|
||||
@ -36,7 +36,7 @@
|
||||
<view class="record special">
|
||||
<view class="titlebox">
|
||||
<view class="title">最新收录</view>
|
||||
<view class="more" @click="goList('mew')">
|
||||
<view class="more" @click="goList('new')">
|
||||
<view class="morename">查看更多</view>
|
||||
<u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon>
|
||||
</view>
|
||||
@ -46,12 +46,12 @@
|
||||
class="cell"
|
||||
v-for="(item) in new_articles"
|
||||
:key="item.exchange_id"
|
||||
@click="goDetail(item.exchange_id)"
|
||||
|
||||
>
|
||||
<view class="title ellipsis-two-lines">{{
|
||||
<view class="title ellipsis-two-lines" @click="goDetail(item.exchange_id)">{{
|
||||
item.exchange_title
|
||||
}}</view>
|
||||
<view class="doctor">
|
||||
<view class="doctor" @click="goDetail(item.exchange_id)">
|
||||
<up--image
|
||||
:src="item.avatar ? item.avatar : headImg"
|
||||
width="46rpx"
|
||||
@ -62,17 +62,18 @@
|
||||
>{{ item.user_name }}({{ item.hospital_name }})</view
|
||||
>
|
||||
</view>
|
||||
<view class="content"> {{ item.exchange_content }} </view>
|
||||
<view class="content" @click="goDetail(item.exchange_id)"> {{ item.exchange_content }} </view>
|
||||
<view
|
||||
class="imgbox"
|
||||
@click="goDetail(item.exchange_id)"
|
||||
v-if="
|
||||
item.exchange_content_images &&
|
||||
item.exchange_content_images.length > 0
|
||||
item.exchange_content_image &&
|
||||
item.exchange_content_image.length > 0
|
||||
"
|
||||
>
|
||||
<view
|
||||
class="imgcell"
|
||||
v-if="unit in item.exchange_content_images"
|
||||
v-for="unit in item.exchange_content_image"
|
||||
>
|
||||
<up--image
|
||||
:src="unit"
|
||||
@ -102,7 +103,7 @@
|
||||
></video>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tagbox" v-if="item.label && item.label.length > 0">
|
||||
<view class="tagbox" @click="goDetail(item.exchange_id)" v-if="item.label && item.label.length > 0">
|
||||
<view
|
||||
class="tag"
|
||||
v-for="cell in item.label"
|
||||
@ -110,7 +111,7 @@
|
||||
>{{ cell.label_name }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="deal">
|
||||
<view class="deal" @click="goDetail(item.exchange_id)">
|
||||
<view class="left">
|
||||
<view class="eyebox item">
|
||||
<up-icon name="eye" color="#4B5563" size="28rpx"></up-icon>
|
||||
@ -148,9 +149,10 @@
|
||||
import tabBar from "@/components/tabBar/tabBar.vue";
|
||||
import headImg from "@/static/headImg.png";
|
||||
import dayjs from "dayjs";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import api from "@/api/api";
|
||||
import { reactive,ref } from 'vue';
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
const numInfo=reactive({})
|
||||
const most_read_articles=ref([]);
|
||||
const new_articles=ref([]);
|
||||
@ -160,17 +162,17 @@
|
||||
return dayjs(date).format('YYYY-MM-DD')
|
||||
};
|
||||
// const goList = () => {
|
||||
// uni.navigateTo({
|
||||
// navTo({
|
||||
// url: '/pages/specialList/specialList'
|
||||
// })
|
||||
// };
|
||||
const goList=(type)=>{
|
||||
if(type=='read'){
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/specialList/specialList?is_selected=1'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/specialList/specialList'
|
||||
})
|
||||
}
|
||||
@ -183,7 +185,7 @@
|
||||
})
|
||||
}
|
||||
const goDetail = (id) => {
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/detail/detail?id=${id}&type=exchange`,
|
||||
});
|
||||
};
|
||||
@ -226,7 +228,7 @@ const hotList=()=>{
|
||||
}).then(res=>{
|
||||
})
|
||||
}
|
||||
onLoad(()=>{
|
||||
onShow(()=>{
|
||||
getStatic();
|
||||
goodList();
|
||||
searchList();
|
||||
|
||||
@ -58,6 +58,7 @@ import api from "@/api/api";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import certImg from "@/static/cert.png";
|
||||
const paging = ref(null);
|
||||
const isSearch=ref(false);
|
||||
@ -95,7 +96,7 @@ onLoad((options) => {
|
||||
})
|
||||
const goDetail=(url)=>{
|
||||
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/certImg/certImg?src=${url}`
|
||||
})
|
||||
}
|
||||
|
||||
@ -9,7 +9,44 @@
|
||||
>
|
||||
<template #top>
|
||||
<backNav :navName="'肝胆相照临床病例库'"></backNav>
|
||||
<view class="box">
|
||||
|
||||
</template>
|
||||
<template #bottom>
|
||||
<view class="bottom">
|
||||
<view class="iptbox">
|
||||
<up--image
|
||||
:src="chatImg"
|
||||
mode="widthFix"
|
||||
width="46rpx"
|
||||
radius="50%"
|
||||
></up--image>
|
||||
<up-input
|
||||
@focus="open"
|
||||
type="text"
|
||||
placeholderClass="placeholderClass"
|
||||
placeholder="对病例发表您的看法"
|
||||
class="ipt"
|
||||
/>
|
||||
</view>
|
||||
<view class="right">
|
||||
<up--image
|
||||
@click="toggleCollect"
|
||||
:src="info.is_collect ? collectonImg : collectImg"
|
||||
mode="widthFix"
|
||||
width="38rpx"
|
||||
></up--image>
|
||||
<view class="imgboxshang" @click="openGivePop">
|
||||
<up--image
|
||||
:src="shangImg"
|
||||
mode="widthFix"
|
||||
width="169rpx"
|
||||
height="77rpx"
|
||||
></up--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="box">
|
||||
<view class="title" v-if="type == 'video'">{{ info.video_title }}</view>
|
||||
<view class="title" v-else-if="type == 'article'">{{
|
||||
info.article_title
|
||||
@ -59,45 +96,10 @@
|
||||
style="width: 200px; height: 200px; position: fixed; top: -9999px"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
<template #bottom>
|
||||
<view class="bottom">
|
||||
<view class="iptbox">
|
||||
<up--image
|
||||
:src="chatImg"
|
||||
mode="widthFix"
|
||||
width="46rpx"
|
||||
radius="50%"
|
||||
></up--image>
|
||||
<up-input
|
||||
@focus="open"
|
||||
type="text"
|
||||
placeholderClass="placeholderClass"
|
||||
placeholder="对病例发表您的看法"
|
||||
class="ipt"
|
||||
/>
|
||||
</view>
|
||||
<view class="right">
|
||||
<up--image
|
||||
@click="toggleCollect"
|
||||
:src="info.is_collect ? collectonImg : collectImg"
|
||||
mode="widthFix"
|
||||
width="38rpx"
|
||||
></up--image>
|
||||
<view class="imgboxshang" @click="openGivePop">
|
||||
<up--image
|
||||
:src="shangImg"
|
||||
mode="widthFix"
|
||||
width="169rpx"
|
||||
height="77rpx"
|
||||
></up--image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="desc">
|
||||
<view class="videobox" v-if="type == 'video'">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
|
||||
<polyv-player
|
||||
id="{{'playerContext'+info.video_no}}"
|
||||
playerId="{{'playerId'+info.video_no}}"
|
||||
@ -106,6 +108,10 @@
|
||||
autoplay="{{false}}"
|
||||
>
|
||||
</polyv-player>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<div id="player"></div>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="videobox" v-else-if="type == 'article'">
|
||||
<view class="content" v-html="info.article_content"></view>
|
||||
@ -113,12 +119,12 @@
|
||||
<view class="videobox" v-else>
|
||||
<view class="cloumn" v-if="info.exchange_content">
|
||||
<view class="stitle">病例信息</view>
|
||||
<u-parse :content="fromatImg(info.exchange_content)"></u-parse>
|
||||
<up-parse :content="fromatImg(info.exchange_content)"></up-parse>
|
||||
<!-- <view class="con" v-html="fromatImg(info.exchange_content)"></view> -->
|
||||
</view>
|
||||
<view class="cloumn" v-if="info.exchange_summary">
|
||||
<view class="stitle">结果与讨论</view>
|
||||
<u-parse :content="fromatImg(info.exchange_summary)"></u-parse>
|
||||
<up-parse :content="fromatImg(info.exchange_summary)"></up-parse>
|
||||
<!-- <view class="con" v-html="fromatImg(info.exchange_summary)"></view> -->
|
||||
</view>
|
||||
<view class="bar"></view>
|
||||
@ -521,7 +527,6 @@
|
||||
</view>
|
||||
</up-overlay>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
import headImg from "@/static/headImg.png";
|
||||
@ -534,7 +539,6 @@ import backNav from "@/components/backNav/backNav.vue";
|
||||
import commentImg from "@/static/comment_icon.png";
|
||||
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
|
||||
import api from "@/api/api";
|
||||
import uParse from "@/components/u-parse/u-parse.vue";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
const paging = ref(null);
|
||||
@ -566,6 +570,7 @@ const clickIndex = ref(0);
|
||||
const is_top = ref(false);
|
||||
const option_id = ref("");
|
||||
const point=ref(0)
|
||||
const playJs=ref("//player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js");
|
||||
|
||||
const confirmGive = () => {
|
||||
showGive.value = false;
|
||||
@ -691,7 +696,7 @@ onLoad((options) => {
|
||||
} else {
|
||||
getExchangeDetail(options.id);
|
||||
}
|
||||
|
||||
readRecord()
|
||||
});
|
||||
const clearComment = () => {
|
||||
parent_id.value = null;
|
||||
@ -1513,7 +1518,26 @@ const addVote = () => {
|
||||
getExchangeDetail(id.value);
|
||||
});
|
||||
};
|
||||
const readRecord=()=>{
|
||||
let flag=1;
|
||||
if(type.value=='article'){
|
||||
flag=1;
|
||||
}else if(type.value=='video'){
|
||||
flag=1;
|
||||
}else{
|
||||
flag=3;
|
||||
}
|
||||
|
||||
api.readRecord({
|
||||
type:flag,
|
||||
id:id.value
|
||||
}).then((res)=>{
|
||||
// uni.showToast({
|
||||
// icon: "none",
|
||||
// title: "阅读记录已添加!",
|
||||
// });
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
@ -1779,18 +1803,24 @@ const addVote = () => {
|
||||
}
|
||||
}
|
||||
.content {
|
||||
padding: 30rpx;
|
||||
// padding: 30rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.votebox {
|
||||
padding: 30rpx;
|
||||
background: #fff;
|
||||
:deep(.u-radio__label-wrap){
|
||||
flex:1;
|
||||
}
|
||||
:deep(.u-radio){
|
||||
padding: 16rpx;
|
||||
}
|
||||
.group{
|
||||
margin-top: 20rpx;
|
||||
.row{
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid #B8B8B8;
|
||||
padding: 16rpx;
|
||||
|
||||
background: #fff;
|
||||
margin-bottom:24rpx;
|
||||
}
|
||||
|
||||
@ -131,9 +131,10 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted,getCurrentInstance } from "vue";
|
||||
import { onLoad} from "@dcloudio/uni-app";
|
||||
import {onShow} from "@dcloudio/uni-app";
|
||||
import tabBar from "@/components/tabBar/tabBar.vue";
|
||||
import navBar from "@/components/navBar/navBar.vue";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
|
||||
import api from "@/api/api";
|
||||
const paging = ref(null);
|
||||
@ -149,7 +150,7 @@ const recommend_doctor=ref([]);
|
||||
const recommend_hospital=ref([]);
|
||||
const numInfo=reactive({})
|
||||
const goDetail = (id) => {
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/detail/detail?id=${id}&type=article`,
|
||||
});
|
||||
};
|
||||
@ -160,7 +161,7 @@ const goListBy=(id,name,type)=>{
|
||||
}else{
|
||||
url=`/pages/search/search?hospital_id=${id}&hospital_name=${name}`
|
||||
}
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:url,
|
||||
});
|
||||
}
|
||||
@ -183,31 +184,31 @@ const getData = async() => {
|
||||
})
|
||||
}
|
||||
const goList=(type)=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/search/search?order='+type
|
||||
})
|
||||
};
|
||||
const goVideo=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/videoList/videoList'
|
||||
})
|
||||
}
|
||||
const goSick=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/sickList/sickList'
|
||||
})
|
||||
}
|
||||
const searchDoctor=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/searchList/searchList?type=doctor&name=医生&id='
|
||||
})
|
||||
}
|
||||
const goHospital=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/searchList/searchList?type=hospital&name=医院&id='
|
||||
})
|
||||
}
|
||||
onLoad(() => {
|
||||
onShow(() => {
|
||||
getStatic();
|
||||
getData();
|
||||
|
||||
|
||||
@ -218,13 +218,22 @@ const getPhoneNumber = (e) => {
|
||||
})
|
||||
.then((data) => {
|
||||
let result=data.data.data;
|
||||
console.log(data.data)
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
if(window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
uni.setStorageSync("AUTH_TOKEN_CASEDATA",result.token);
|
||||
}else{
|
||||
uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token);
|
||||
}
|
||||
}else{
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if (envVersion == "release") {
|
||||
uni.setStorageSync("AUTH_TOKEN_CASEDATA",result.token);
|
||||
} else {
|
||||
uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
uni.setStorageSync("userInfo",{
|
||||
avatar:result.avatar,
|
||||
user_id:result.user_id,
|
||||
|
||||
@ -89,6 +89,7 @@
|
||||
import dNav from "@/components/backNav/backNav.vue";
|
||||
import headImg from "@/static/headImg.png";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import api from "@/api/api";
|
||||
import { ref,reactive} from "vue";
|
||||
const userInfo=reactive({})
|
||||
@ -124,37 +125,37 @@ onLoad(()=>{
|
||||
getInfo()
|
||||
})
|
||||
const goCert = () => {
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: "/pages/certList/certList?doctor_id="+userInfo.doctor_id,
|
||||
});
|
||||
};
|
||||
const goDoctor=(id,name)=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/searchList/searchList?type=doctor&id='+id+'&name='+name
|
||||
})
|
||||
}
|
||||
const goHospital=(id,name)=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/searchList/searchList?type=hospital&id='+id+'&name='+name
|
||||
})
|
||||
}
|
||||
const mySpecial=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/specialList/specialList?userId='+userInfo.user_id
|
||||
})
|
||||
}
|
||||
const goJoin=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/myJoin/myJoin'
|
||||
})
|
||||
}
|
||||
const goCollect=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/myCollect/myCollect'
|
||||
})
|
||||
}
|
||||
const goPublish=()=>{
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:'/pages/publish/publish'
|
||||
})
|
||||
}
|
||||
|
||||
@ -63,6 +63,7 @@ import api from "@/api/api";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
const paging = ref(null);
|
||||
const uDropdownRef=ref(null);
|
||||
const dataList = ref([]);
|
||||
@ -125,7 +126,7 @@ const goDetail=(id)=>{
|
||||
console.log(11111)
|
||||
console.log(id)
|
||||
let type=isArticle.value?'article':'video'
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/detail/detail?id=${id}&type=${type}`
|
||||
})
|
||||
}
|
||||
|
||||
@ -94,6 +94,7 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
import certImg from "@/static/cert.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
const paging = ref(null);
|
||||
const uDropdownRef = ref(null);
|
||||
const dataList = ref([]);
|
||||
@ -198,7 +199,7 @@ const formatdate = (date) => {
|
||||
};
|
||||
const goDetail = (id) => {
|
||||
let type = isArticle.value ? "article" : "video";
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/detail/detail?id=${id}&type=${type}`,
|
||||
});
|
||||
};
|
||||
|
||||
@ -60,12 +60,6 @@
|
||||
@focus="focusResult"
|
||||
@blur="focusResult"
|
||||
></sv-editor>
|
||||
<!-- <up--textarea
|
||||
maxlength="-1"
|
||||
autoHeight
|
||||
v-model="form.title"
|
||||
placeholder="分享经验和心得,如:诊断与鉴别诊断易错点,治疗过程难点,病例的相关知识总结及讨论等"
|
||||
></up--textarea> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -262,7 +256,7 @@
|
||||
></view>
|
||||
</view>
|
||||
<view class="row" v-else-if="item.exchange_summary">
|
||||
<view class="smalltitle" v-if="item.exchange_summary"
|
||||
<view class="smalltitle"
|
||||
>总结与讨论</view
|
||||
>
|
||||
<view
|
||||
@ -475,6 +469,7 @@ const caseValue1 = ref("");
|
||||
const caseValue2 = ref("");
|
||||
const caseValue3 = ref("");
|
||||
const level = ref(1);
|
||||
const isPublish = ref(false);
|
||||
const labelObj = reactive({
|
||||
list1: [],
|
||||
list2: [],
|
||||
@ -614,11 +609,12 @@ const ready = (e) => {
|
||||
editorCtx.value = e;
|
||||
|
||||
let html =
|
||||
"<br/><p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
|
||||
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
|
||||
editorCtx.value.initHtml(html);
|
||||
};
|
||||
const readyResult = (e) => {
|
||||
editorCtxResult.value = e;
|
||||
//editorCtxResult.value.initHtml("")
|
||||
};
|
||||
const clearMuBan = () => {
|
||||
console.log("清空模板");
|
||||
@ -629,7 +625,9 @@ const focusInfo = () => {
|
||||
isFocusInfo.value = true;
|
||||
};
|
||||
const blurInfo = () => {
|
||||
setTimeout(() => {
|
||||
isFocusInfo.value = false;
|
||||
}, 2000)
|
||||
};
|
||||
const focusResult = () => {
|
||||
isFocusResult.value = true;
|
||||
@ -659,7 +657,7 @@ const openTitle = () => {
|
||||
};
|
||||
const alertTitle = () => {
|
||||
if (isFocusInfo.value) {
|
||||
showTitle.value = true;
|
||||
showTitle.value = true;
|
||||
}
|
||||
};
|
||||
const pFun = (files) => {
|
||||
@ -751,9 +749,12 @@ const delDraft = (id) => {
|
||||
getDraftList();
|
||||
};
|
||||
const alertSave = async () => {
|
||||
const res = await editorCtx.value.getLastContent();
|
||||
if(isPublish.value){
|
||||
goBack()
|
||||
}else{
|
||||
const res = await editorCtx.value.getLastContent();
|
||||
//let html = editorCtx.value.exportHtml(res.html);
|
||||
//const initInfo= "<br/><p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
|
||||
//const initInfo= "<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
|
||||
const resContent = await editorCtxResult.value.getLastContent();
|
||||
//let reshtml = editorCtxResult.value.exportHtml(resContent.html);
|
||||
if (
|
||||
@ -770,10 +771,12 @@ const alertSave = async () => {
|
||||
} else {
|
||||
goBack();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
const publish = async () => {
|
||||
const initInfo =
|
||||
"<br/><p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
|
||||
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
|
||||
if (form.exchange_title == "") {
|
||||
uni.showToast({
|
||||
title: "请输入标题",
|
||||
@ -805,7 +808,7 @@ const publish = async () => {
|
||||
form.exchange_content = html;
|
||||
const resContent = await editorCtxResult.value.getLastContent();
|
||||
let reshtml = editorCtxResult.value.exportHtml(resContent.html);
|
||||
form.exchange_summary = reshtml;
|
||||
form.exchange_summary = reshtml=="<p><br></p>"?'':reshtml;
|
||||
api.addExchange(form).then((res) => {
|
||||
uni.showToast({
|
||||
title: "发布成功",
|
||||
@ -813,6 +816,8 @@ const publish = async () => {
|
||||
duration: 2000,
|
||||
});
|
||||
isFlag.value = false;
|
||||
isPublish.value = true;
|
||||
uni.navigateBack()
|
||||
});
|
||||
};
|
||||
const handleUpload = (file) => {
|
||||
@ -922,7 +927,7 @@ const HandleAddVideo = async (file) => {
|
||||
return new Promise((resolve) => {
|
||||
api
|
||||
.getOss({
|
||||
scene: 1,
|
||||
scene:2,
|
||||
})
|
||||
.then((rep) => {
|
||||
let result = rep.data;
|
||||
@ -1084,7 +1089,7 @@ onLoad(() => {
|
||||
.casepop{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: calc(100vh - 400rpx);
|
||||
max-height: calc(100vh - 750rpx);
|
||||
.continue{
|
||||
color: #2878ff !important;
|
||||
}
|
||||
@ -1313,7 +1318,7 @@ onLoad(() => {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #e5e7eb;
|
||||
background: #e5e7eb78;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,6 +163,7 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
import caseImg from "@/static/caseIcon.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
const paging = ref(null);
|
||||
const uDropdownRef=ref(null);
|
||||
const dataList = ref([]);
|
||||
@ -321,7 +322,7 @@ const goDetail=(id)=>{
|
||||
console.log(11111)
|
||||
console.log(id)
|
||||
let type=isArticle.value?'article':'video'
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/detail/detail?id=${id}&type=${type}`
|
||||
})
|
||||
}
|
||||
|
||||
@ -62,8 +62,8 @@
|
||||
</view>
|
||||
<view class="time">
|
||||
|
||||
<up-icon name="clock" color="#6B7280" size="28rpx"></up-icon>
|
||||
<view class="num">{{formatdate(item.last_push_date) }}</view>
|
||||
<!-- <up-icon name="clock" color="#6B7280" size="28rpx"></up-icon> -->
|
||||
<view class="num">更新时间:{{formatdate(item.last_push_date) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -80,6 +80,7 @@ import api from "@/api/api";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import arrowrightImg from "@/static/arrowright.png";
|
||||
const paging = ref(null);
|
||||
const uDropdownRef=ref(null);
|
||||
@ -128,6 +129,7 @@ const change=(e)=>{
|
||||
paging.value.reload();
|
||||
}
|
||||
const formatdate=(date)=>{
|
||||
if(!date) return dayjs().format('YYYY-MM-DD')
|
||||
return dayjs(date).format('YYYY-MM-DD')
|
||||
}
|
||||
const swicthType=()=>{
|
||||
@ -244,7 +246,7 @@ const goDetail=(id,name)=>{
|
||||
}else{
|
||||
url=`/pages/search/search?hospital_id=${id}&hospital_name=${name}`
|
||||
}
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:url,
|
||||
});
|
||||
}
|
||||
|
||||
@ -86,6 +86,7 @@ import api from "@/api/api";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import arrowrightImg from "@/static/arrowright.png";
|
||||
const paging = ref(null);
|
||||
const uDropdownRef=ref(null);
|
||||
@ -170,7 +171,7 @@ const queryList = (pageNo, pageSize) => {
|
||||
};
|
||||
const goDetail=(id,name)=>{
|
||||
let url=`/pages/search/search?case_id=${id}&case_name=${name}`
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url:url,
|
||||
});
|
||||
}
|
||||
|
||||
@ -50,13 +50,13 @@
|
||||
class="cell"
|
||||
v-for="(item) in dataList"
|
||||
:key="item.exchange_id"
|
||||
@click="goDetail(item.exchange_id)"
|
||||
|
||||
|
||||
>
|
||||
<view class="title ellipsis-two-lines">{{
|
||||
<view @click="goDetail(item.exchange_id)" class="title ellipsis-two-lines">{{
|
||||
item.exchange_title
|
||||
}}</view>
|
||||
<view class="doctor">
|
||||
<view class="doctor" @click="goDetail(item.exchange_id)">
|
||||
<up--image
|
||||
:src="item.avatar ? item.avatar : headImg"
|
||||
width="46rpx"
|
||||
@ -67,17 +67,19 @@
|
||||
>{{ item.user_name }}({{ item.hospital_name }})</view
|
||||
>
|
||||
</view>
|
||||
<view class="content"> {{ item.exchange_content }} </view>
|
||||
<view class="content" @click="goDetail(item.exchange_id)"> {{ item.exchange_content }} </view>
|
||||
<view
|
||||
class="imgbox"
|
||||
@click="goDetail(item.exchange_id)"
|
||||
v-if="
|
||||
item.exchange_content_images &&
|
||||
item.exchange_content_images.length > 0
|
||||
item.exchange_content_image &&
|
||||
item.exchange_content_image.length > 0
|
||||
"
|
||||
>
|
||||
<view
|
||||
|
||||
class="imgcell"
|
||||
v-if="unit in item.exchange_content_images"
|
||||
v-for="unit in item.exchange_content_image"
|
||||
>
|
||||
<up--image
|
||||
:src="unit"
|
||||
@ -107,7 +109,7 @@
|
||||
></video>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tagbox" v-if="item.label && item.label.length > 0">
|
||||
<view class="tagbox" @click="goDetail(item.exchange_id)" v-if="item.label && item.label.length > 0">
|
||||
<view
|
||||
class="tag"
|
||||
v-for="cell in item.label"
|
||||
@ -115,7 +117,7 @@
|
||||
>{{ cell.label_name }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="deal">
|
||||
<view class="deal" @click="goDetail(item.exchange_id)">
|
||||
<view class="left">
|
||||
<view class="eyebox item">
|
||||
<up-icon name="eye" color="#4B5563" size="28rpx"></up-icon>
|
||||
@ -136,7 +138,7 @@
|
||||
</view>
|
||||
<view class="time">
|
||||
<up-icon name="clock" color="#4B5563" size="28rpx"></up-icon>
|
||||
<view class="num">{{ formatdate(item.push_date) }}</view>
|
||||
<view class="num">{{ formatdate(item.push_date)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -156,6 +158,7 @@ import tabBar from "@/components/tabBar/tabBar.vue";
|
||||
import headImg from "@/static/headImg.png";
|
||||
import dayjs from "dayjs";
|
||||
import api from "@/api/api";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
|
||||
const user_id = ref("");
|
||||
@ -207,7 +210,7 @@ const changeWord = (val) => {
|
||||
paging.value.reload();
|
||||
};
|
||||
const goDetail = (id) => {
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/detail/detail?id=${id}&type=exchange`,
|
||||
});
|
||||
};
|
||||
@ -223,8 +226,10 @@ const searchList = async (params) => {
|
||||
let searchForm = {
|
||||
keyword: keyWord.value,
|
||||
user_id: user_id.value,
|
||||
is_selected: Number(is_selected.value)
|
||||
};
|
||||
if(Number(is_selected.value)){
|
||||
searchForm.is_selected=Number(is_selected.value)
|
||||
}
|
||||
if(!order.read_num){
|
||||
delete order.read_num
|
||||
}
|
||||
|
||||
@ -84,6 +84,7 @@ import { ref, reactive } from "vue";
|
||||
import navBarSearch from "@/components/navBarSearch/navBarSearch.vue";
|
||||
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
|
||||
import api from "@/api/api";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
@ -161,7 +162,7 @@ const goDetail=(id)=>{
|
||||
console.log(11111)
|
||||
console.log(id)
|
||||
let type=isArticle.value?'article':'video'
|
||||
uni.navigateTo({
|
||||
navTo({
|
||||
url: `/pages/detail/detail?id=${id}&type=${type}`
|
||||
})
|
||||
}
|
||||
|
||||
33
utils/cookie.js
Normal file
33
utils/cookie.js
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
const cookie = {
|
||||
//写cookies
|
||||
setCookie: function(name, value) {
|
||||
//let days = 0.5;
|
||||
let exp = new Date();
|
||||
exp.setTime(exp.getTime() + 15*60*1000)
|
||||
|
||||
// exp.setTime(exp.getTime() + days*24*60*60*1000)
|
||||
document.cookie = name + '=' + escape (value) + ';expires=' + exp.toGMTString()
|
||||
},
|
||||
//读取cookies
|
||||
readCookie: function (name) {
|
||||
let arr = null
|
||||
let reg = new RegExp('(^| )'+name+'=([^;]*)(;|$)')
|
||||
if (document.cookie && (arr = document.cookie.match(reg))) {
|
||||
return unescape(arr[2])
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
//删除cookies
|
||||
delCookie: function (name) {
|
||||
let cval = this.readCookie(name);
|
||||
var domain = '.igandan.com';
|
||||
if (cval!=null) {
|
||||
document.cookie = name + '=;expires=' + (new Date(0)).toGMTString()+";path=/;domain="+domain
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default cookie
|
||||
|
||||
9
utils/host.js
Normal file
9
utils/host.js
Normal file
@ -0,0 +1,9 @@
|
||||
let host='';
|
||||
let path=window.location.href;
|
||||
if (path.indexOf("//prod-casedata.igandan.com") > 1 ) {
|
||||
host = "https://prod-casedata.igandan.com";
|
||||
} else {
|
||||
host = "https://dev-casedata.igandan.com";
|
||||
|
||||
}
|
||||
export default host;
|
||||
@ -2,10 +2,19 @@ import pageUrl from './pageUrl'
|
||||
|
||||
function navTo(obj) {
|
||||
let token = '';
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
|
||||
} else {
|
||||
token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
if(window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
|
||||
}else{
|
||||
token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
|
||||
}
|
||||
}else{
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if (envVersion == "release") {
|
||||
token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
|
||||
}else{
|
||||
token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
|
||||
}
|
||||
}
|
||||
if (!token) {
|
||||
let page_url = pageUrl();
|
||||
@ -14,19 +23,19 @@ function navTo(obj) {
|
||||
url: '/pages/login/login?redirectUrl=has'
|
||||
});
|
||||
} else {
|
||||
// # ifdef MP-WEIXIN
|
||||
const pages = getCurrentPages();
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
uni.navigateTo(obj)
|
||||
}else{
|
||||
const pages = getCurrentPages();
|
||||
let len = pages.length;
|
||||
if (len < 10) {
|
||||
uni.navigateTo(obj)
|
||||
} else {
|
||||
console.log(len)
|
||||
if (len >=10) {
|
||||
uni.redirectTo(obj)
|
||||
} else {
|
||||
uni.navigateTo(obj)
|
||||
|
||||
}
|
||||
}
|
||||
// # endif
|
||||
|
||||
// # ifdef H5
|
||||
uni.navigateTo(obj)
|
||||
//# endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
175
utils/request.js
175
utils/request.js
@ -11,100 +11,119 @@ import BASE_URL from "./config.js";
|
||||
//import host from "@/utils/host";
|
||||
//import {msg} from "./util.js"
|
||||
import pageUrl from './pageUrl'
|
||||
//alert(BASE_URL)
|
||||
// # ifdef H5
|
||||
import cookie from "./cookie.js";
|
||||
//# endif
|
||||
|
||||
//const BASE_URL=host+"/api"
|
||||
export const request = (url, data = {}, method = 'post',loading = false,contentType='application/x-www-form-urlencoded') => {
|
||||
if(loading){
|
||||
export const request = (url, data = {}, method = 'post', loading = false, contentType = 'application/x-www-form-urlencoded') => {
|
||||
if (loading) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask:true
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
|
||||
|
||||
};
|
||||
let token='';
|
||||
if(process.env.NODE_ENV === 'development'){
|
||||
token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
|
||||
}else{
|
||||
token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
|
||||
}
|
||||
// if(!token){
|
||||
// let freeList=['/login','/code/phone','/login/wx','/index','/user/check'];
|
||||
// if(freeList.indexOf(url) == -1){
|
||||
// let page_url=pageUrl();
|
||||
// if(page_url.indexOf('/login/login')==-1){
|
||||
|
||||
// uni.setStorageSync('redirectUrl',page_url);
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login?redirectUrl=has'
|
||||
// });
|
||||
// return false;
|
||||
// }else{
|
||||
|
||||
|
||||
// uni.setStorageSync('redirectUrl','');
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login'
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
let header = {
|
||||
'content-type':contentType ,
|
||||
'Authorization': 'Bearer ' + token
|
||||
}
|
||||
return new Promise(function(e, n) {
|
||||
let token = '';
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
if(window.location.href.indexOf('//casedata.igandan.com')>-1){
|
||||
token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
|
||||
}else{
|
||||
token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
|
||||
}
|
||||
}else{
|
||||
const { envVersion } = uni.getAccountInfoSync().miniProgram;
|
||||
if (envVersion == "release") {
|
||||
token = uni.getStorageSync('AUTH_TOKEN_CASEDATA');
|
||||
}else{
|
||||
token = uni.getStorageSync('DEV_AUTH_TOKEN_CASEDATA');
|
||||
}
|
||||
}
|
||||
|
||||
// if(!token){
|
||||
// let freeList=['/login','/code/phone','/login/wx','/index','/user/check'];
|
||||
// if(freeList.indexOf(url) == -1){
|
||||
// let page_url=pageUrl();
|
||||
// if(page_url.indexOf('/login/login')==-1){
|
||||
|
||||
// uni.setStorageSync('redirectUrl',page_url);
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login?redirectUrl=has'
|
||||
// });
|
||||
// return false;
|
||||
// }else{
|
||||
|
||||
|
||||
// uni.setStorageSync('redirectUrl','');
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login'
|
||||
// });
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
let header = {
|
||||
'content-type': contentType,
|
||||
'Authorization': 'Bearer ' + token
|
||||
}
|
||||
return new Promise(function (e, n) {
|
||||
let timestamp = Date.now();
|
||||
uni.request({
|
||||
data,
|
||||
url: url.indexOf('http')!=-1?url:encodeURI(BASE_URL+url+"?timestamp="+timestamp),
|
||||
url: url.indexOf('http') != -1 ? url : encodeURI(BASE_URL + url + "?timestamp=" + timestamp),
|
||||
method: method,
|
||||
sslVerify:false,
|
||||
header:url.indexOf('/manager/getSignature4bing')==-1?header:{},
|
||||
timeout:10000,
|
||||
success: function(res) {
|
||||
var Authorization_token = res.header.Authorization;
|
||||
if(Authorization_token){
|
||||
if(process.env.NODE_ENV === 'development'){
|
||||
uni.setStorageSync('DEV_AUTH_TOKEN_CASEDATA', Authorization_token);
|
||||
}else{
|
||||
uni.setStorageSync('AUTH_TOKEN_CASEDATA', Authorization_token);
|
||||
}
|
||||
|
||||
}
|
||||
if(loading){
|
||||
sslVerify: false,
|
||||
header: url.indexOf('/manager/getSignature4bing') == -1 ? header : {},
|
||||
timeout: 10000,
|
||||
success: function (res) {
|
||||
var Authorization_token = res.header.Authorization;
|
||||
if (Authorization_token) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
uni.setStorageSync('DEV_AUTH_TOKEN_CASEDATA', Authorization_token);
|
||||
} else {
|
||||
uni.setStorageSync('AUTH_TOKEN_CASEDATA', Authorization_token);
|
||||
}
|
||||
|
||||
}
|
||||
if (loading) {
|
||||
uni.hideLoading();
|
||||
};
|
||||
if(res.data.code==200){
|
||||
if (res.data.code == 200) {
|
||||
e(res)
|
||||
}else if(res.data.code==401 || res.data.code==403 || res.data.code==405 || res.data.code==406){
|
||||
let freeList=['/login/wechat/mobile','/code/phone','/login/mobile_login','/index','/user/check'];
|
||||
if(freeList.indexOf(url) == -1){
|
||||
let page_url=pageUrl();
|
||||
uni.setStorageSync('redirectUrl',page_url);
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login?redirectUrl=has'
|
||||
});
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
}else if(res.data.code==500){
|
||||
} else if (res.data.code == 401 || res.data.code == 403 || res.data.code == 405 || res.data.code == 406) {
|
||||
if(process.env.UNI_PLATFORM =="h5"){
|
||||
// let H5url = 'https://dev-wx.igandan.com';
|
||||
// if (window.location.href.indexOf('//dev-casedata.igandan.com') == -1) {
|
||||
// H5url = 'https://dev-wx.igandan.com'
|
||||
// }
|
||||
// window.location.href = H5url + "/hcp/Signup2020online_tologin?back_url=" + encodeURIComponent(window.location.href);
|
||||
}else{
|
||||
let freeList = ['/login/wechat/mobile', '/code/phone', '/login/mobile_login', '/index', '/user/check'];
|
||||
if (freeList.indexOf(url) == -1) {
|
||||
let page_url = pageUrl();
|
||||
uni.setStorageSync('redirectUrl', page_url);
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login?redirectUrl=has'
|
||||
});
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
} else if (res.data.code == 500) {
|
||||
n(res)
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
title:res.data.message,
|
||||
icon:'none',
|
||||
|
||||
title: res.data.message,
|
||||
icon: 'none',
|
||||
|
||||
})
|
||||
n(res)
|
||||
}
|
||||
n(res)
|
||||
}
|
||||
},
|
||||
fail: function(err) {
|
||||
fail: function (err) {
|
||||
"request:fail " === err.errMsg && msg("请求数据失败!"), n(err.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user