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