Skip to content

Commit

Permalink
Add analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangao authored and zhangao committed Aug 28, 2023
1 parent d45a2e0 commit 3acac86
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 42 deletions.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6TG6VE28BR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-6TG6VE28BR');
</script>
<meta charset="UTF-8" />
<title>小白羊云盘</title>
<meta name="data-spm" content="aliyundrive" />
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "xbyyunpan",
"description": "小白羊云盘",
"version": "3.11.19",
"version": "3.11.21",
"license": "MIT",
"main": "dist/electron/main/index.js",
"author": {
Expand All @@ -10,7 +10,7 @@
},
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build && electron-builder -m"
"build": "vue-tsc --noEmit && vite build && electron-builder -wml"
},
"engines": {
"node": ">=16.0.0"
Expand Down
9 changes: 7 additions & 2 deletions src/aliapi/dirfilelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default class AliDirFileList {
}


static async ApiDirFileList(user_id: string, drive_id: string, dirID: string, dirName: string, order: string, type: string = ''): Promise<IAliFileResp> {
static async ApiDirFileList(user_id: string, drive_id: string, dirID: string, dirName: string, order: string, type: string = '', openApi = false): Promise<IAliFileResp> {
const dir: IAliFileResp = {
items: [],
itemsKey: new Set(),
Expand Down Expand Up @@ -196,7 +196,12 @@ export default class AliDirFileList {
dir.itemsTotal = total
})
}
isGet = await AliDirFileList._ApiDirFileListOnePage(orders[0], orders[1], dir, type, pageIndex)
if (openApi) {
isGet = await AliDirFileList._ApiDirFileListOnePageOpenApi(orders[0], orders[1], dir, type, pageIndex)
} else {
isGet = await AliDirFileList._ApiDirFileListOnePage(orders[0], orders[1], dir, type, pageIndex)
}

}

if (!isGet) {
Expand Down
2 changes: 1 addition & 1 deletion src/layout/PageVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const curDirFileList: any[] = []
const childDirFileList: any[] = []
const getDirFileList = async (dir_id: string, hasDir: boolean, category: string = '', filter?: RegExp): Promise<any[]> => {
if (curDirFileList.length === 0 || (hasDir && childDirFileList.length === 0)) {
const dir = await AliDirFileList.ApiDirFileList(pageVideo.user_id, pageVideo.drive_id, dir_id, '', 'name asc', '')
const dir = await AliDirFileList.ApiDirFileList(pageVideo.user_id, pageVideo.drive_id, dir_id, '', 'name asc', '', true)
if (!dir.next_marker) {
for (let item of dir.items) {
const fileInfo = {
Expand Down
1 change: 0 additions & 1 deletion src/resPan/ResPanRight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import { shell } from 'electron'
import axios, { AxiosResponse } from 'axios'
import ServerHttp from '../aliapi/server'
import AliHttp from '../aliapi/alihttp'
import UserDAL from '../user/userdal'
const viewlist = ref()
const inputsearch = ref()
Expand Down
38 changes: 6 additions & 32 deletions src/resource/alist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,19 @@

<script lang="ts">
import { ref, onMounted } from 'vue';
import useSettingStore from '../setting/settingstore'
export default {
setup() {
const iframeRef = ref(null);
const iframeSrc = ref(''); // 初始的 iframe URL
onMounted(() => {
// setTimeout(() => {
// iframeSrc.value = 'http://127.0.0.1:5244/'d
// }, 3000)
const iframe = iframeRef.value
if (iframe) {
const intervalId = setInterval(() => {
iframeSrc.value = ''
iframeSrc.value = 'http://127.0.0.1:5244/'
// @ts-ignore
iframe.addEventListener('load', () => {
// @ts-ignore
const iframeDocument = iframe.contentDocument || iframe.contentWindow.document
const usernameInput = iframeDocument.querySelector('input[name="username"]');
const passwordInput = iframeDocument.querySelector('input[name="password"]');
const loginButton = iframeDocument.querySelector('.login-button');
if (usernameInput && passwordInput && loginButton && useSettingStore().alistPwd != '') {
// @ts-ignore
usernameInput.value = 'admin';
// @ts-ignore
passwordInput.value = useSettingStore().alistPwd
// @ts-ignore
loginButton.click();
clearInterval(intervalId)
}
});
}, 1000)
}
setTimeout(() => {
iframeSrc.value = 'http://127.0.0.1:5244/'
iframeSrc.value = ''
iframeSrc.value = 'http://127.0.0.1:5244/'
console.log("reset url")
}, 10000)
})
return {
Expand Down
7 changes: 6 additions & 1 deletion src/resource/movieIndex.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<div class="fullscroll" style="padding-left: 12px; padding-right: 16px; overflow-x: hidden">
<iframe class="custom-webview" src="https://4kysxz.top/" ref="iframeRef"></iframe>
</div>
</template>
Expand Down Expand Up @@ -64,4 +64,9 @@ export default {
width: 100%;
height: 1000px;
}
.fullscroll {
width: 100%;
height: 100%;
overflow: auto;
}
</style>
7 changes: 6 additions & 1 deletion src/resource/searchIndex.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<div class="fullscroll" style="padding-left: 12px; padding-right: 16px; overflow-x: hidden">
<iframe class="custom-webview" src="https://www.upyunso.com/" ref="iframeRef"></iframe>
</div>
</template>
Expand Down Expand Up @@ -80,4 +80,9 @@ export default {
width: 100%;
height: 1000px;
}
.fullscroll {
width: 100%;
height: 100%;
overflow: auto;
}
</style>
2 changes: 1 addition & 1 deletion src/share/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ appStore.$subscribe(async (mutation) => {
</a-menu-item>
<a-menu-item key="alist">
<template #icon><i class="iconfont iconrvip" /></template>
AList 挂载
AList
</a-menu-item>
</a-menu>
</a-layout-sider>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default class Config {
static appVersion = '3.11.19'
static appVersion = '3.11.21'
static referer = 'https://www.aliyundrive.com/'
static downAgent = 'okhttp/4.2.2'
static downAgent1 = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36'
Expand Down

0 comments on commit 3acac86

Please sign in to comment.