XiuYun CHEN 1 year ago
commit
4c8277d76f
  1. 2
      .env.development
  2. 1
      .env.production
  3. 2
      .env.test
  4. 44
      .gitignore
  5. 0
      README.md
  6. 65
      auto-imports.d.ts
  7. 17
      components.d.ts
  8. 13
      index.html
  9. 14
      jsconfig.json
  10. 1766
      package-lock.json
  11. 33
      package.json
  12. 1
      public/vite.svg
  13. 22
      src/App.vue
  14. BIN
      src/assets/department.png
  15. BIN
      src/assets/departmentn.png
  16. BIN
      src/assets/edu.png
  17. BIN
      src/assets/edubg.png
  18. BIN
      src/assets/edun.png
  19. BIN
      src/assets/font/Alibaba_PuHuiTi_2.0_65_Medium_65_Medium.ttf
  20. BIN
      src/assets/font/bSRn72kZakr9.woff
  21. BIN
      src/assets/font/bSRn72kZakr9.woff2
  22. BIN
      src/assets/interact.png
  23. BIN
      src/assets/interactn.png
  24. BIN
      src/assets/my.png
  25. BIN
      src/assets/myn.png
  26. 77
      src/components/tabTools.vue
  27. 15
      src/main.js
  28. 97
      src/router/index.js
  29. 12
      src/style.css
  30. 31
      src/utils/api.js
  31. 124
      src/utils/request.js
  32. 92
      src/utils/wxshare-1.6.0.js
  33. 13
      src/views/department.vue
  34. 60
      src/views/education-centre.vue
  35. 127
      src/views/interact.vue
  36. 126
      src/views/my.vue
  37. 4838
      stats.html
  38. 102
      vite.config.js

2
.env.development

@ -0,0 +1,2 @@
# VITE_BASE_URL="https://twx.igandan.org/"
VITE_BASE_URL="http://47.105.52.114:8083/"

1
.env.production

@ -0,0 +1 @@
VITE_BASE_URL="https://wx.igandan.com/"

2
.env.test

@ -0,0 +1,2 @@
# VITE_BASE_URL="https://twx.igandan.org/"
VITE_BASE_URL="http://47.105.52.114:8083/"

44
.gitignore

@ -0,0 +1,44 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# vercel
.vercel
# typescript
*.tsbuildinfo
# eslint
.eslintcache
# stylelint
.stylelintcache

0
README.md

65
auto-imports.d.ts

@ -0,0 +1,65 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
}

17
components.d.ts

@ -0,0 +1,17 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
declare module 'vue' {
export interface GlobalComponents {
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
LiverDrugs: typeof import('./src/views/liver-drugs.vue')['default']
LiverGuidelines: typeof import('./src/views/liver-guidelines.vue')['default']
LiverTools: typeof import('./src/views/liver-tools.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
}

13
index.html

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title><%- title %></title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

14
jsconfig.json

@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"allowSyntheticDefaultImports": true,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": [
"node_modules"
]
}

1766
package-lock.json

File diff suppressed because it is too large

33
package.json

@ -0,0 +1,33 @@
{
"name": "wxapp-home",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"test": "vite build --mode=test",
"preview": "vite preview"
},
"dependencies": {
"@nutui/nutui": "^4.1.4",
"axios": "^1.5.0",
"reset-css": "^5.0.2",
"tdesign-mobile-vue": "^1.0.3",
"vue": "^3.3.4",
"vue-router": "^4.2.4",
"weixin-js-sdk": "^1.6.0"
},
"devDependencies": {
"@types/node": "^20.4.5",
"@vitejs/plugin-vue": "^4.2.3",
"rollup-plugin-external-globals": "^0.8.0",
"rollup-plugin-visualizer": "^5.9.2",
"terser": "^5.19.1",
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.1",
"vite": "^4.4.5",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0"
}
}

1
public/vite.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

22
src/App.vue

@ -0,0 +1,22 @@
<template>
<body>
<router-view></router-view>
</body>
</template>
<style>
body {
line-height: normal!important;
}
:root {
--font-size: 14px;
--font-size-title: 20px;
}
strong{
font-weight: bold!important;
}
sup{
vertical-align: super!important;
}
</style>

BIN
src/assets/department.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/departmentn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

BIN
src/assets/edu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/assets/edubg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
src/assets/edun.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

BIN
src/assets/font/Alibaba_PuHuiTi_2.0_65_Medium_65_Medium.ttf

Binary file not shown.

BIN
src/assets/font/bSRn72kZakr9.woff

Binary file not shown.

BIN
src/assets/font/bSRn72kZakr9.woff2

Binary file not shown.

BIN
src/assets/interact.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/assets/interactn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/assets/my.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/assets/myn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

77
src/components/tabTools.vue

@ -0,0 +1,77 @@
<template>
<nut-tabbar class="nuttabbar" @tab-switch="tabSwitch"
bottom active-color="#2BB5ECFF" unactive-color="rgba(0,0,0,0.24)" v-model="activee">
<nut-tabbar-item
v-for="item in list"
:tab-title="item.text"
:to="item.to"
>
<template #icon="props">
<img :src="props.active ? item.active : item.unactive" alt="" :style="{width:'24px',height:'24px'}"/>
</template>
</nut-tabbar-item>
</nut-tabbar>
</template>
<script setup>
import edu from "../assets/edu.png";
import edun from "../assets/edun.png";
import My from "../assets/myn.png";
import SMy from "../assets/my.png";
import department from '@/assets/department.png'
import departmentn from '@/assets/departmentn.png'
import interact from '@/assets/interact.png'
import interactn from '@/assets/interactn.png'
import { ref,onMounted } from 'vue';
import { useRouter,onBeforeRouteUpdate } from 'vue-router'
const router = useRouter();
const cur_path=ref(router.currentRoute.value.path)
// const active = (cur_path.value=='/my-tools')?ref(1):ref(0);
const activee = active();
const list = ref([
{ text: '宣教中心', active:edu,unactive:edun,to:'/education-centre',name:'/education-centre'},
{ text: '科室服务', active:department,unactive: departmentn,to:'/department',name:'/department'},
{ text: '健康互动', active:interact,unactive: interactn,to:'/interact',name:'/interact'},
{ text: '我的', active:SMy,unactive: My,to:'/my',name:'/my'},
]);
const tabSwitch= (item,index)=> {
// console.log(activee);
}
function active()
{
if(cur_path.value=='/education-centre')
{
return ref(0);
}
else if(cur_path.value=='/department')
{
return ref(1);
}
else if(cur_path.value=='/interact')
{
return ref(2);
}
else if(cur_path.value=='/my')
{
return ref(3);
}
else
{
return ref(0);
}
}
onMounted(() => {
document.title = list.value[activee.value].text;
});
</script>
<style>
.nuttabbar{
--nut-tabbar-border-top: #fff;
--nut-tabbar-border-bottom: #ffffff;
--nut-tabbar-item-text-font-size:12px;
--nut-tabbar-box-shadow:0px -4px 16px 0px rgba(0,0,0,0.04);
--nut-tabbar-height:53px;
}
</style>

15
src/main.js

@ -0,0 +1,15 @@
import { createApp } from 'vue'
import 'reset-css'
import './style.css'
import App from './App.vue'
import router from "@/router/index.js"
import NutUI from "@nutui/nutui";
import "@nutui/nutui/dist/style.css";
import TDesign from 'tdesign-mobile-vue';
import 'tdesign-mobile-vue/es/style/index.css';
const app = createApp(App);
app.use(NutUI);
app.use(router);
app.use(TDesign);
app.mount('#app')

97
src/router/index.js

@ -0,0 +1,97 @@
import { createWebHashHistory, createRouter, createWebHistory } from 'vue-router';
import educationCentre from "@/views/education-centre.vue"
import department from "@/views/department.vue"
import interact from "@/views/interact.vue"
import my from "@/views/my.vue"
const routes = [
// {
// path: '/',
// name: 'home',
// component: home,
// children: [{ path: '', component: educationCentre },{ path: '/education-centre', component: educationCentre },{ path: '/my-drugs', namne:'my-drugs',component: myDrugs}
// ]
// },
{
path: '/',
redirect: '/education-centre',
},
{
path: '/education-centre',
name: 'education-centre',
component: educationCentre,
},
{
path: '/department',
name: 'department',
component: department,
},
{
path: '/interact',
name: 'interact',
component: interact,
},
{
path: '/my',
name: 'my',
component: my,
}
];
// const routes = [
// // {
// // path: '/',
// // redirect: '/liver-drugs',
// // },
// {
// path: '/',
// redirect: '/home',
// },
// {
// path: '/home',
// name: 'home',
// component: home,
// child:[{ path: '', component: liverDrugs },
// {
// path: '/liver-drugs',
// // name: 'liver-drugs',
// component: liverDrugs,
// },
// { path: '/my-drugs',
// // name: 'my-drugs',
// component: myDrugs} ]
// },
// {
// path: '/liver-drugs',
// name: 'liver-drugs',
// component: liverDrugs,
// },
// {
// path: '/liver-tools',
// name: 'liver-tools',
// component: liverTools,
// },
// {
// path: '/liver-guidelines',
// name: 'liver-guidelines',
// component: liverGuidelines,
// },
// {
// path: '/my-drugs',
// name: 'my-drugs',
// component: myDrugs}
// ];
const router = createRouter({
// createWebHashHistory URL 带井号
// createWebHistory URL 去井号
history:createWebHashHistory(),
routes: routes,
});
export default router;

12
src/style.css

@ -0,0 +1,12 @@
body{
background:#fff;
}
/* @font-face {
font-family: "阿里巴巴普惠体 2.0 65 Medium";font-weight: 500;src: url("//at.alicdn.com/wf/webfont/sgTFboRMJU3n/JxNJC26HiA0D.woff2") format("woff2"),
url("//at.alicdn.com/wf/webfont/sgTFboRMJU3n/T8cUklUUIqA1.woff") format("woff");
font-display: swap;
} */
@font-face {
font-family: "阿里巴巴普惠体 2.0 65 Medium";font-weight: 500;src: url("Alibaba_PuHuiTi_2.0_65_Medium_65_Medium.ttf") format("ttf"),
}

31
src/utils/api.js

@ -0,0 +1,31 @@
import service from './request';
export function getDrugList(id,name) {
return service({
url:'/book/drughand/getDrugList',
method: 'get',
params:{
type_id:id,
name:name
}
})
}
export function getDrugTypeList() {
return service({
url:'/book/drughand/getDrugTypeList',
method: 'get'
})
}
export function addCorrection(id,catalog_id,content) {
return service({
url:'/book/drughand/addCorrection',
method: 'post',
params:{
id:id,
catalog_id:catalog_id,
content:content
}
})
}

124
src/utils/request.js

@ -0,0 +1,124 @@
import axios from 'axios';
// create an axios instance
const service = axios.create({
baseURL:import.meta.env.VITE_BASE_URL,
timeout: 8000,
// withCredentials: true,
headers:{
'Content-Type':'application/json',
'Authorization':''
}
});
// request interceptor
service.interceptors.request.use(
(config) => {
// Store 必须在拦截器内部导入,在外部导入会显示 Pinia 未初始化
// 设置请求头部 Authorization
// console.log("333333");
// console.log(config);
return config;
},
(error) => {
console.error(error);
return Promise.reject(error);
}
);
// response interceptor
service.interceptors.response.use(
(response) => {
// console.log(response)
//var Authorization_token = response.headers.Authorization;
// if (Authorization_token) {
// sessionStorage.setItem('token', Authorization_token); //当token快过期时,服务器会返回新token,本地刷新
// }
const { code, message } = response.data;
// console.log("code",code);
if(code == 60003)
{
let back_url = window.location.href;
window.location.href="https://wx.igandan.com/hcp/toLogin?back_url="+back_url;
// window.location.href="https://twx.igandan.org/hcp/toLogin?back_url="+back_url;
}
else if (code == 401 || code==403 || code==405 || code==406) {
//Message.clear();
// Message.error({
// content: message,
// duration: 3000
// });
// 重定向路由到登陆页面
}else if(code === 400){
// Message.error({
// content: '缺少参数',
// duration: 3000
// });
}else if(code == 402){
// Message.error({
// content: '请求无权限',
// duration: 3000
// });
}else if(code == 201){
// Message.error({
// content: '账户状态异常',
// duration: 3000
// });
}else if(code==-1){
// Message.error({
// content: message,
// duration: 3000
// });
}
return response.data;
},
(error) => {
console.log("------------------");
console.log(error);
const { code, message } = error.response.data;
// 如果过期则退出登录
if(code == 60003)
{
let back_url = window.location.href;
window.location.href="https://wx.igandan.com/hcp/toLogin?back_url="+back_url;
}
else if (code === 401 || code==403 || code==405 || code==406) {
// Message.error({
// content: message,
// duration: 3000
// });
// // 重定向路由到登陆页面
// store.clearInfo();
// window.location.href="/login";
}else if(code === 400){
// Message.error({
// content: '缺少参数',
// duration: 3000
// });
}else if(code === 402){
// Message.error({
// content: '请求无权限',
// duration: 3000
// });
}else if(code === 201){
// Message.error({
// content: '账户状态异常',
// duration: 3000
// });
}else {
// Message.error({
// content: error.message,
// duration: 3000
// })
}
return Promise.reject(message);
}
);
// export const imgurl='http://47.105.52.114:8085/app/';
export const fromwexin='&from=wx';
export const frommywexin='?from=wx';
export const imgurl='https://doc.igandan.com/app/';
export default service;

92
src/utils/wxshare-1.6.0.js

@ -0,0 +1,92 @@
import wx from 'weixin-js-sdk'
import axios from 'axios'
let share = {
title: "",
desc: "",
link: "",
imgUrl: "",
init: function () {
var path = location.href.split('#')[0];
var url = "";
var appid = "";
if (path.indexOf(".igandan.org") > 1) {
url = "https://tapp.igandan.org/app/manager/getSignature4bing";
appid = "wx68affaa9d23528f8";
} else {
url = "https://app.igandan.com/app/manager/getSignature4bing";
appid = "wxa4132ef4701ac5e4";
}
axios.get(url, {
params: {
path: encodeURIComponent(window.location.href.split('#')[0]),
appid: appid
}
}).then(json => {
wx.config({
debug: false,
appId: appid,
timestamp: json.data.timestamp,
nonceStr: json.data.nonceStr,
signature: json.data.signature,
jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareTimeline', 'onMenuShareAppMessage']
});
}).catch((e) => {
console.log('获取数据失败');
});
wx.checkJsApi({
jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareTimeline', 'onMenuShareAppMessage'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
success: function (res) {
console.log(res)
}
});
wx.ready(function () {
wx.updateAppMessageShareData({
title: share.title,
desc: share.desc,
link: share.link,
imgUrl: share.imgUrl,
success: function () {}
})
wx.updateTimelineShareData({
title: share.title,
desc: share.desc,
link: share.link,
imgUrl: share.imgUrl,
success: function () {}
})
wx.onMenuShareTimeline({
title: share.title,
desc: share.desc,
link: share.link,
imgUrl: share.imgUrl,
success: function () {}
})
wx.onMenuShareAppMessage({
title: share.title,
desc: share.desc,
link: share.link,
imgUrl: share.imgUrl,
success: function () {}
})
});
}
}
function WXSHARE(title, desc, link, imgUrl) {
share.title = title;
share.desc = desc;
share.link = link;
if (imgUrl == undefined || imgUrl == "") {
imgUrl = "https://doc.igandan.com/app/html/img/2016/20160714132557.png";
}
share.imgUrl = imgUrl;
share.init();
};
export {
WXSHARE
}

13
src/views/department.vue

@ -0,0 +1,13 @@
<template >
<TabTools></TabTools>
</template>
<script setup >
import { IconFont } from '@nutui/icons-vue';
import { useRouter } from 'vue-router';
import {WXSHARE} from '../utils/wxshare-1.6.0';
const state = reactive([]);
</script>
<style scoped>
</style>

60
src/views/education-centre.vue

@ -0,0 +1,60 @@
<template >
<div class="edu-head">
<nut-image :src=edubg alt="图片描述" class="myDivd">
</nut-image>
<div class="department">
<nut-image class="dicon" width="20" height="20" :src=edu alt="图片描述" round/>
<div class="dtitle">首都医科大学附属友谊医院
(西城院区) 肝病中心</div>
</div>
</div>
<TabTools></TabTools>
</template>
<script setup >
import edu from "../assets/edu.png";
import edubg from "../assets/edubg.png";
import TabTools from '@/components/tabTools.vue';
import { IconFont } from '@nutui/icons-vue';
import { useRouter } from 'vue-router';
import {WXSHARE} from '../utils/wxshare-1.6.0';
onMounted(() => {
});
</script>
<style scoped>
.edu-head{
display: flex;
}
.myDivd{
position: absolute;
top: 0px;
pointer-events: none;
}
.department{
margin-top: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.dicon{
margin-left: 16px;
}
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
.dtitle{
margin-left: 8px;
width: 160px;
font-size: var(--font-size);
font-family:'阿里巴巴普惠体 2.0 65 Medium';
color: #233C4C;
line-height: 20px;
}
</style>

127
src/views/interact.vue

@ -0,0 +1,127 @@
<template >
<TabTools></TabTools>
</template>
<script setup >
import { IconFont } from '@nutui/icons-vue';
import { useRouter } from 'vue-router';
import {WXSHARE} from '../utils/wxshare-1.6.0';
const state = reactive([]);
onMounted(() => {
})
</script>
<style scoped>
.headnav {
--td-navbar-title-font-size:var(--font-size-title);
--td-navbar-bg-color: transparent;
--td-navbar-color: #FFFFFF;
--td-navbar-height: 86px;
}
.divhead {
background:linear-gradient(352deg, #87DBFF 0%, #57A1FF 33%, #2C68FF 100%);
}
.divsearch {
display: flex;
width: 90%;
height: 40px;
background: rgba(255, 255, 255, 0.24);
border-radius: 16px;
margin: auto;
backdrop-filter: blur(25px);
}
.nut-elevator {
--nut-elevator-list-item-font-size: var(--font-size);
--nut-elevator-list-item-code-font-size: var(--font-size);
--nut-elevator-list-item-name-height: 42px;
--nut-elevator-list-item-code-height: 42px;
--nut-elevator-list-item-bars-inner-item-font-size: 12px;
--nut-elevator-list-item-bars-background-color: #F4F5F5;
--nut-elevator-list-item-bars-inner-item-active-color: #2C68FF;
}
input {
width: 70%;
margin-left: 5px;
font-size: var(--font-size);
background: transparent;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
outline: none;
color: white;
}
input:focus {
font-size: var(--font-size);
width: 70%;
margin-left: 5px;
border: none;
box-shadow: none;
}
::-webkit-input-placeholder {
/* WebKit browsers */
color: white;
}
:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
color: white;
}
::-moz-placeholder {
/* Mozilla Firefox 19+ */
color: white;
}
:-ms-input-placeholder {
/* Internet Explorer 10+ */
color: white;
}
.divselect:before{
display: flex;
justify-content: center;
align-items: center;
content:"";
background:url('../assets/sel.png');
background-size: cover;
margin-top: 14px;
width:20px;
height:20px;
}
.divselect {
margin-top: 20px;
padding-left: 16px;
width: cal(100%-20);
height: 50px;
/* font-size: var(--font-size); */
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 600;
display: flex;
background: white;
border-radius: 20px 20px 0px 0px;
--nut-menu-bar-box-shadow:0 0px 0px rgba(89, 89, 89, 0.12);
--nut-menu-item-active-text-color:#2C68FF;
--nut-menu-item-content-max-height:100%;
--nut-menu-item-font-size:18px;
/* --nut-menu-item-text-color:#2C68FF; */
}
.t-list{
/* padding-bottom: 120px; */
height:70vh;
}
</style>

126
src/views/my.vue

@ -0,0 +1,126 @@
<template >
<TabTools></TabTools>
</template>
<script setup >
import { IconFont } from '@nutui/icons-vue';
import { useRouter } from 'vue-router';
import {WXSHARE} from '../utils/wxshare-1.6.0';
const state = reactive([]);
onMounted(() => {
})
</script>
<style scoped>
.headnav {
--td-navbar-title-font-size:var(--font-size-title);
--td-navbar-bg-color: transparent;
--td-navbar-color: #FFFFFF;
--td-navbar-height: 86px;
}
.divhead {
background:linear-gradient(352deg, #87DBFF 0%, #57A1FF 33%, #2C68FF 100%);
}
.divsearch {
display: flex;
width: 90%;
height: 40px;
background: rgba(255, 255, 255, 0.24);
border-radius: 16px;
margin: auto;
backdrop-filter: blur(25px);
}
.nut-elevator {
--nut-elevator-list-item-font-size: var(--font-size);
--nut-elevator-list-item-code-font-size: var(--font-size);
--nut-elevator-list-item-name-height: 42px;
--nut-elevator-list-item-code-height: 42px;
--nut-elevator-list-item-bars-inner-item-font-size: 12px;
--nut-elevator-list-item-bars-background-color: #F4F5F5;
--nut-elevator-list-item-bars-inner-item-active-color: #2C68FF;
}
input {
width: 70%;
margin-left: 5px;
font-size: var(--font-size);
background: transparent;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
outline: none;
color: white;
}
input:focus {
font-size: var(--font-size);
width: 70%;
margin-left: 5px;
border: none;
box-shadow: none;
}
::-webkit-input-placeholder {
/* WebKit browsers */
color: white;
}
:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
color: white;
}
::-moz-placeholder {
/* Mozilla Firefox 19+ */
color: white;
}
:-ms-input-placeholder {
/* Internet Explorer 10+ */
color: white;
}
.divselect:before{
display: flex;
justify-content: center;
align-items: center;
content:"";
background:url('../assets/sel.png');
background-size: cover;
margin-top: 14px;
width:20px;
height:20px;
}
.divselect {
margin-top: 20px;
padding-left: 16px;
width: cal(100%-20);
height: 50px;
/* font-size: var(--font-size); */
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 600;
display: flex;
background: white;
border-radius: 20px 20px 0px 0px;
--nut-menu-bar-box-shadow:0 0px 0px rgba(89, 89, 89, 0.12);
--nut-menu-item-active-text-color:#2C68FF;
--nut-menu-item-content-max-height:100%;
--nut-menu-item-font-size:18px;
/* --nut-menu-item-text-color:#2C68FF; */
}
.t-list{
/* padding-bottom: 120px; */
height:70vh;
}
</style>

4838
stats.html

File diff suppressed because one or more lines are too long

102
vite.config.js

@ -0,0 +1,102 @@
import {
join
} from 'path'
import {
defineConfig
} from 'vite';
import vue from '@vitejs/plugin-vue';
import {
VuetifyResolver
} from 'unplugin-vue-components/resolvers';
import Components from 'unplugin-vue-components/vite';
import AutoImport from 'unplugin-auto-import/vite';
import viteCompression from 'vite-plugin-compression'
import { visualizer } from 'rollup-plugin-visualizer' //查看项目的依赖
import { createHtmlPlugin } from 'vite-plugin-html'
export default defineConfig(({ command }) => {
return {
base: command === 'build' ? '/modernHepatology/' : './',
plugins: [
vue(),
AutoImport({
// 自动导入 Vue 相关函数,如:ref, reactive, toRef 等
imports: ['vue']
}),
visualizer({
open: false
}),
// 将下面的添加到plugin下
createHtmlPlugin({
minify: true,
inject: {
data: {
title: '健康宣教',
}
}
}),
Components({
resolvers: [VuetifyResolver()],
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
dirs: ['src/components', 'src/views'],
}),
],
build: {
assetsInlineLimit: 4096, // 图片转 base64 编码的阈值
minify: 'terser',
plugins: [
viteCompression({
threshold: 1024000 // 对大于 1mb 的文件进行压缩
}),
],
// rollup 配置
rollupOptions: {
output: {
chunkFileNames: 'static/js/[name]-[hash].js', // 引入文件名的名称
entryFileNames: 'static/js/[name]-[hash].js', // 包的入口文件名称
assetFileNames: 'static/[ext]/[name]-[hash].[ext]', // 资源文件像 字体,图片等
manualChunks(id) {
// 如果不同模块使用的插件基本相同那就尽可能打包在同一个文件中,减少http请求,如果不同模块使用不同插件明显,那就分成不同模块打包。这是一个矛盾体。
// 这里使用的是最小化拆分包。如果是前者可以直接选择返回'vendor'。
if (id.includes('node_modules')) {
return id.toString().split('node_modules/')[1].split('/')[0].toString(); //让打开那个页面,加载那个页面的js ,让之间的关联足够小
// return 'vendor' 如果不同模块使用的插件基本相同那就尽可能打包在同一个文件中,减少http请求;
}
}
}
},
terserOptions: {
compress: {
//生产环境时移除console
drop_console: true,
drop_debugger: true,
},
},
},
resolve: {
alias: {
'@': join(__dirname, 'src'),
}
},
server: {
host: true,
port: 1798,
//secure: false,
proxy: {
// '/api': {
//   target: 'https://vue3.go-admin.dev',
//   changeOrigin: true,             //开启跨域
//   rewrite: (path) => path.replace(/^\/api/, '')
// },
'/book': {
target: 'https://twx.igandan.org',
changeOrigin: true, //开启跨域
rewrite: (path) => path.replace(/^\/book/, '')
}
}
},
publicDir: '/public'
}
});
Loading…
Cancel
Save