feat: backup code
@ -54,5 +54,6 @@ module.exports = {
|
||||
'scss/comment-no-empty': null,
|
||||
'selector-class-pattern': null,
|
||||
'font-family-no-missing-generic-family-keyword': null,
|
||||
'declaration-property-value-no-unknown': null,
|
||||
},
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<p align="center">
|
||||
<a href="https://github.com/feige996/unibest">
|
||||
<img width="160" src="./src/static/logo.svg">
|
||||
<img width="160" src="./src/static/logo.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
4
env/.env
vendored
@ -1,9 +1,9 @@
|
||||
VITE_APP_TITLE = 'unibest'
|
||||
VITE_APP_TITLE = 'aixiaomo'
|
||||
VITE_APP_PORT = 9000
|
||||
|
||||
VITE_UNI_APPID = 'H57F2ACE4'
|
||||
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
||||
VITE_DEV_TOKEN= "79b5c732d96d2b27a48a99dfd4a5566c43aaa5796242e854ebe3ffc198d6876b9628e7b764d9af65ab5dbb2d517ced88170491b74b048c0ba827c0d3741462cb89dc59ed46653a449af837a8262941ca1430937103230a1e32a1715f569f3efdbe6f8cb8b7b8642bd679668081b9b08f693d1b5be6002d936ec51e1e3e0c4927de9e32ac99a109b326e5d2bda27ec87624bb416ec70d2a95a2e190feeba9f0d6bae8571b3dfe89c824712344759a8f2bff9d70747c52525cf6a5614f9c770bca461a9b9c247b6dca97bcf83bbaf99bb726752c4fe1e9a4aa7de5c4cf3e88a3e480801280d45cdc124f9d8221105d852945dc6ce10bc1647e4f09dff4d52ffdfc5ce974441a21f37c4a81e3853b862975bd76099c6e2158cb3681ca6497d2c159c3b954852ace961bc334cdd547d0b2b441fbf51f2ef339bb58c27181206e20b1eb4cf26398e43bba65eba121ad88f20b"
|
||||
VITE_DEV_TOKEN= ""
|
||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||
VITE_APP_PUBLIC_BASE=/
|
||||
|
||||
|
2
env/.env.development
vendored
@ -1,5 +1,5 @@
|
||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
||||
NODE_ENV = 'development'
|
||||
NODE_ENV = 'dev'
|
||||
# 是否去除console 和 debugger
|
||||
VITE_DELETE_CONSOLE = false
|
||||
# 是否开启sourcemap
|
||||
|
6
env/.env.production
vendored
@ -1,6 +1,10 @@
|
||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
||||
NODE_ENV = 'development'
|
||||
NODE_ENV = 'prod'
|
||||
# 是否去除console 和 debugger
|
||||
VITE_DELETE_CONSOLE = true
|
||||
# 是否开启sourcemap
|
||||
VITE_SHOW_SOURCEMAP = false
|
||||
|
||||
VITE_SERVER_BASEURL = 'http://114.218.158.24:9020'
|
||||
|
||||
|
||||
|
3
env/.env.test
vendored
@ -1,4 +1,5 @@
|
||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
||||
NODE_ENV = 'development'
|
||||
NODE_ENV = 'test'
|
||||
# 是否去除console 和 debugger
|
||||
VITE_DELETE_CONSOLE = false
|
||||
VITE_SERVER_BASEURL = 'http://114.218.158.24:9020'
|
||||
|
3647
pnpm-lock.yaml
15
src/App.vue
@ -1,6 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
|
||||
const { statusBarHeight } = useStatus()
|
||||
import { useStatus } from '@/store/status'
|
||||
|
||||
onLaunch(() => {
|
||||
console.log('App Launch')
|
||||
@ -18,7 +20,18 @@ onHide(() => {
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/*解决阅览图片关闭按钮会显示在状态栏区域的问题*/
|
||||
#u-a-p > div > div {
|
||||
margin-top: var(--statusBarHeight);
|
||||
}
|
||||
/*不显示滚动条的类*/
|
||||
.no-scroll {
|
||||
-ms-overflow-style: none; /* IE 和 Edge */
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
.no-scroll::-webkit-scrollbar {
|
||||
display: none; /* Webkit 浏览器 */
|
||||
}
|
||||
swiper,
|
||||
scroll-view {
|
||||
flex: 1;
|
||||
|
@ -9,6 +9,8 @@ import 'element-plus/dist/index.css'
|
||||
import App from './App.vue'
|
||||
import { prototypeInterceptor, requestInterceptor, routeInterceptor } from './interceptors'
|
||||
import store from './store'
|
||||
// import VConsole from 'vconsole'
|
||||
// new VConsole()
|
||||
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "unibest",
|
||||
"name": "aixiaomo",
|
||||
"appid": "H57F2ACE4",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
|
@ -24,7 +24,6 @@
|
||||
"spacing": "3px",
|
||||
"list": []
|
||||
},
|
||||
"__esModule": true,
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
@ -41,6 +40,14 @@
|
||||
"navigationBarTitleText": "关于"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index copy",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationBarHidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index1",
|
||||
"type": "page",
|
||||
|
1510
src/pages/index/index copy.vue
Normal file
1005
src/pages/index/index-来源于韩庆伟分支.vue
Normal file
@ -1,22 +1,53 @@
|
||||
<template>
|
||||
<view class="image-gallery grid grid-cols-4 gap-1 p-4" v-if="imageList.length > 0">
|
||||
<view class="flex flex-col h-90% bg-#ffffff">
|
||||
<view
|
||||
v-for="(image, index) in imageList"
|
||||
:key="index"
|
||||
class="aspect-square overflow-hidden group"
|
||||
class="flex-none flex items-center justify-between px-5 py-3 bg-white shadow-md h-20 pt-10 z-999 fixed top-0 w-full box-border"
|
||||
>
|
||||
<image
|
||||
:src="image.url"
|
||||
mode="aspectFill"
|
||||
class="w-full h-full"
|
||||
@click="handleImageClick(index)"
|
||||
/>
|
||||
<image src="/static/aichat/black.png" class="w-3 h-4 mt-1" @click="goBack" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="image-gallery grid grid-cols-4 gap-1 p-4 mt-20" v-if="imageList.length > 0">
|
||||
<view
|
||||
v-for="(image, index) in imageList"
|
||||
:key="index"
|
||||
class="aspect-square overflow-hidden group"
|
||||
>
|
||||
<image
|
||||
:src="image.url"
|
||||
mode="aspectFill"
|
||||
class="w-full h-full"
|
||||
@click="handleImageClick(index)"
|
||||
/>
|
||||
|
||||
<view v-if="videoList.length > 0" class="flex items-center justify-center">
|
||||
<view v-for="(video, index) in videoList" :key="index" class="w-full h-50">
|
||||
<video :src="video" class="w-full h-full" controls :poster="video.url"></video>
|
||||
<!-- <wd-img :width="100" :height="100" :src="image.url" :enable-preview="true" /> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 自定义预览弹窗 -->
|
||||
<view
|
||||
v-if="showPreview"
|
||||
class="fixed inset-0 bg-black bg-opacity-90 z-999 flex justify-center items-start pt-10"
|
||||
@click="closePreview"
|
||||
>
|
||||
<view class="relative w-full max-w-full mt-8 p-5 box-border">
|
||||
<image
|
||||
class="w-full max-h-[calc(100vh-90px)] object-contain"
|
||||
:src="previewUrl"
|
||||
mode="widthFix"
|
||||
@click.stop
|
||||
/>
|
||||
<view
|
||||
class="absolute top--8 right-5 text-white text-3xl z-1000 w-10 h-10 text-center leading-10"
|
||||
@click.stop="closePreview"
|
||||
>
|
||||
×
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="videoList.length > 0" class="flex items-center justify-center mt-30">
|
||||
<view v-for="(video, index) in videoList" :key="index" class="w-full h-50">
|
||||
<video :src="video" class="w-full h-full" controls :poster="video.url"></video>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -30,8 +61,12 @@ const imageList = ref([])
|
||||
const videoList = ref([])
|
||||
|
||||
// 图片点击处理
|
||||
const handleImageClick = (index) => {
|
||||
uni.previewImage({ urls: [imageList.value[index].url] })
|
||||
// const handleImageClick = (index) => {
|
||||
// uni.previewImage({ urls: [imageList.value[index].url] })
|
||||
// }
|
||||
// 返回上一个页面
|
||||
const goBack = () => {
|
||||
uni.navigateBack({ delta: 1 })
|
||||
}
|
||||
|
||||
// 生命周期钩子
|
||||
@ -49,6 +84,18 @@ onMounted(() => {
|
||||
videoList.value = previewVideos
|
||||
}
|
||||
})
|
||||
|
||||
const showPreview = ref(false)
|
||||
const previewUrl = ref('')
|
||||
const previewTop = ref(30) // 距离顶部30px
|
||||
const handleImageClick = (index) => {
|
||||
previewUrl.value = imageList.value[index].url
|
||||
showPreview.value = true
|
||||
}
|
||||
|
||||
const closePreview = () => {
|
||||
showPreview.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<web-view :src="link"></web-view>
|
||||
<web-view :src="link" :webview-styles="webviewStyles"></web-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -7,6 +7,12 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
link: '',
|
||||
webviewStyles: {
|
||||
width: '100%',
|
||||
progress: {
|
||||
color: '#999',
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@ -14,6 +20,39 @@ export default {
|
||||
this.link = options.link
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 只有 Webview 环境才有 plus
|
||||
// if (window.plus) {
|
||||
// const wv = plus.webview.currentWebview()
|
||||
// // 页面加载完后再注入 padding
|
||||
// wv.addEventListener('loaded', () => {
|
||||
// wv.evalJS(`
|
||||
// document.documentElement.style.padding = '30px';
|
||||
// document.body.style.margin = '0';
|
||||
// `)
|
||||
// })
|
||||
// }
|
||||
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
// 获取状态栏高度和窗口高度
|
||||
const statusBarHeight = res.statusBarHeight
|
||||
const windowHeight = res.windowHeight
|
||||
|
||||
// 计算WebView高度(窗口高度减去状态栏高度)
|
||||
this.webviewStyles.height = windowHeight - statusBarHeight
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取系统信息失败:', err)
|
||||
// 默认使用窗口高度
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
this.webviewStyles.height = res.windowHeight
|
||||
},
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -27,6 +27,7 @@ export interface IGptRequestBody {
|
||||
max_tokens: number
|
||||
temperature: number
|
||||
top_p: number
|
||||
listUuid: string
|
||||
presence_penalty: number
|
||||
frequency_penalty: number
|
||||
messages: IMessage[]
|
||||
|
BIN
src/static/aichat/Knowledge-close.png
Normal file
After Width: | Height: | Size: 776 B |
BIN
src/static/aichat/Knowledge-open.png
Normal file
After Width: | Height: | Size: 827 B |
BIN
src/static/aichat/black.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
src/static/logo.png
Normal file
After Width: | Height: | Size: 10 KiB |
15
src/store/status/index.js
Normal file
@ -0,0 +1,15 @@
|
||||
import {ref} from 'vue'
|
||||
import {createGlobalState, useStorage} from "@vueuse/core";
|
||||
import {uniStorage} from "@/utils/uniStorage";
|
||||
export const useStatus =createGlobalState(()=>{
|
||||
const currentNavbar=ref({title:'',url:''})
|
||||
const applyTabbarIndex=ref(0)
|
||||
const statusBarHeight = ref(window?.plus?.navigator?.getStatusbarHeight() ?? 0)
|
||||
const tabBarIndex = useStorage('tabBarIndex', 0, uniStorage)
|
||||
return {
|
||||
statusBarHeight,
|
||||
applyTabbarIndex,
|
||||
currentNavbar,
|
||||
tabBarIndex
|
||||
}
|
||||
})
|
1
src/types/uni-pages.d.ts
vendored
@ -6,6 +6,7 @@
|
||||
interface NavigateToOptions {
|
||||
url: "/pages/index/index" |
|
||||
"/pages/about/about" |
|
||||
"/pages/index/index copy" |
|
||||
"/pages/index/index1" |
|
||||
"/pages/preview/index" |
|
||||
"/pages/webview/index";
|
||||
|
11
src/utils/uniStorage.js
Normal file
@ -0,0 +1,11 @@
|
||||
export const uniStorage = {
|
||||
getItem(key) {
|
||||
return uni.getStorageSync(key) || null
|
||||
},
|
||||
setItem(key, value) {
|
||||
return uni.setStorageSync(key, value)
|
||||
},
|
||||
removeItem(key) {
|
||||
return uni.removeStorageSync(key)
|
||||
},
|
||||
}
|
BIN
static/app/icons/1024x1024.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
static/app/icons/120x120.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
static/app/icons/144x144.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
static/app/icons/152x152.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
static/app/icons/167x167.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
static/app/icons/180x180.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
static/app/icons/192x192.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
static/app/icons/20x20.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
static/app/icons/29x29.png
Normal file
After Width: | Height: | Size: 780 B |
BIN
static/app/icons/40x40.png
Normal file
After Width: | Height: | Size: 985 B |
BIN
static/app/icons/58x58.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
static/app/icons/60x60.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
static/app/icons/72x72.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
static/app/icons/76x76.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
static/app/icons/80x80.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
static/app/icons/87x87.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
static/app/icons/96x96.png
Normal file
After Width: | Height: | Size: 2.3 KiB |