3 Commits

94 changed files with 9656 additions and 4327 deletions

View File

@@ -1,17 +1,17 @@
## PicHome beta3.0 更新说明
## PicHome beta3.2 更新说明
### 1.增加普通目录导入支持,普通目录可限定文件导入,默认使用 “站点设置”=>“导入设置”中的“允许导入文件”中的设置值,可根据需要更改。
### 1.修复windows文件上传至linux服务器由于编码问题导致的库导入没有文件问题
### 2.支持选择或输入指定目录地址作为库库更改为手动添加以便于自由选择eagle库或者普通目录库目录选择中默认屏蔽了一些由系统生成目录可在站点设置=>导入设置中的“禁止导入目录”中更改。
### 2.库设置内容更改,当库状态为断开时,可以重新设置库的路径(即目录位置移动之后,库读取不到,可以设置为新目录所在位置)
### 3.普通目录支持部分图片缩略图、颜色获取和部分音视频文件信息和缩略图获取(注:格式可参考 站点设置”=>“导入设置”中的“允许导入文件”此功能pdf格式需有iamgick支持linux下音视频需ffmpeg支持);该功能可在库的“设置”中选择开启或不开启,需要注意的是开启该功能可能会占用大量服务器资源。
### 3.优化普通目录文件缩略图生成逻辑,以修复瀑布流展示时页面问题(此项对已生成过缩略图的不生效,需重新导入库生成)
### 4.增加新的界面展示模板,可在 “站点设置”=>“界面设置”中切换
### 4.优化导入逻辑,当库在导入状态时,将会自动执行导入文件,直至导入完成为止
### 5.导入逻辑优化优化导入效率修复没有文件时一直在导入状态的bug
### 5.修复eagle库注释显示html标签问题
### 6.优化删除库逻辑,删除更改为异步删除
### 6.修复billfish库导入链接丢失问题
### 7.优化访问效率
### 7.优化删除逻辑
### 8.其他已知bug修复

View File

@@ -33,7 +33,7 @@ ea41001e9a9735db73fd1c33f753a258 *admin/system/dist/css/chunk-vendors.4d5d56a8.c
888e61f04316f10bddfff7bee10c6dd0 *admin/system/dist/fonts/remixicon.888e61f0.ttf
9915fef980fa539085da55b84dfde760 *admin/system/dist/fonts/remixicon.9915fef9.woff2
95138f36e015ad912c37db92164f5844 *admin/system/dist/img/remixicon.95138f36.svg
6ccaad5c6ef97e4ba59c3d8eb8e37d39 *admin/system/dist/index.html
ae1ba44ed8a73c33b0aa0ab4a44cf523 *admin/system/dist/index.html
057184d69924bbec3848613e9d484a61 *admin/system/dist/js/chunk-2b4f90f7.ec4ac270.js
9915050af25ebd2a757ddda815fa2025 *admin/system/dist/js/chunk-2d0a3327.ad2684c9.js
14d1eb5255f59b744a0e86b76e999f8c *admin/system/dist/js/chunk-2d0bdbc6.4ec7bc5e.js
@@ -60,7 +60,7 @@ f1356ba4b41b1c2d0db9158645cfd968 *admin/system/dist/js/chunk-2d0dd46d.bd431129.j
25f102fba0aba57fcad60998d1e1c334 *admin/system/dist/js/chunk-e730cc06.3ce9a994.js
328be3371bb7c2536befbfddcc64e417 *admin/system/dist/js/chunk-vendors.3b95dfe3.js
5247e802fd0efbbe8eb80cd9f6a34540 *admin/system/dist/js/index.b5ff203c.js
aab63af8b9c2d8610ba5ab295de6c96a *admin/system/dist/js/index.be6002c4.js
e6b823145386281984301ad83fcf96fe *admin/system/dist/js/index.d36cff59.js
904b573ab459ffaba51c33b5851d0f5d *admin/system/dist/js/index.d77cc092.js
0d548b27371bb03899d61437a8cdf8fa *admin/system/dist/js/system_temp.c7e32270.js
554e1288867238ccbe21a7dc65fe9487 *admin/system/dzz_app_system.xml
@@ -109,7 +109,7 @@ bfd0cbd4c4120f0bef89fb2898332f2b *core/class/class_bbcode.php
bcfb2e3e9c3ff2018f356176a1cf43a2 *core/class/class_core.php
723a351225f0f7562784e35f8607ce29 *core/class/class_DbException.php
3ce9db683150a76cd033167c7e281391 *core/class/class_Des.php
b950274816c263377559b82772efaa04 *core/class/class_FileDownload.php
212cc7650e4798754337b1fefb291827 *core/class/class_FileDownload.php
b6b0b9dc4773307d80f9215ed5122361 *core/class/class_GifMerge.php
4793dcfc740be53d3fc40ba98562558a *core/class/class_image.php
d301e008d382be1af825d77bc993d423 *core/class/class_ImagePalette.php
@@ -224,18 +224,18 @@ dc169efe36fdf79623277fb5a538c673 *core/class/table/table_pichome_ffmpeg_record.p
15cc26415b076bb08eeed7f76c40c45b *core/class/table/table_pichome_folderresources.php
fb390b2cfce67236a7263549a430868b *core/class/table/table_pichome_folder_relation.php
180233f6f8d234986280df5c3821fe24 *core/class/table/table_pichome_imagickrecord.php
26298713afbbb276e365e2b440454321 *core/class/table/table_pichome_palette.php
6b369ce49f9a03b0e29a062352b99454 *core/class/table/table_pichome_resources.php
8f36fe58bb79975f403ea0fa5e868c85 *core/class/table/table_pichome_resourcestag.php
a2a946f8d3a0180db50b1c7435d9516a *core/class/table/table_pichome_palette.php
ec314812cba390bac62835cce5efdfbf *core/class/table/table_pichome_resources.php
534452d059df927d062dac5bcd7b0de6 *core/class/table/table_pichome_resourcestag.php
c08ce988dad5ccead193db0a7f79b4f2 *core/class/table/table_pichome_resources_attr.php
09db8f5c9d2966f503bee5a4c6d6cc32 *core/class/table/table_pichome_resources_relation.php
4fb898320b47959764b3f09a5489418b *core/class/table/table_pichome_searchrecent.php
757655270a99be70f9e781fbae5f6634 *core/class/table/table_pichome_share.php
fafb2bf10eed9314bc2bf2d6b32d84b9 *core/class/table/table_pichome_tag.php
02ef950574c3af62f7b13fd61a61c2ce *core/class/table/table_pichome_taggroup.php
306a994431aaffaa2faf08f3d5de7d50 *core/class/table/table_pichome_taggroup_relation.php
d36c3e504e4666b6a9301699ebeeeaa5 *core/class/table/table_pichome_taggroup_relation.php
1969387f935173b42f34c33c426e1fb7 *core/class/table/table_pichome_tagrelation.php
59d5d07f70e88fbb93f56f5e4b953c6c *core/class/table/table_pichome_vapp.php
15537ad5c8fac2620c4199d07038a126 *core/class/table/table_pichome_vapp.php
eea6b39fd13b5fdf18052c7733adb369 *core/class/table/table_process.php
ffc8c199da703d941c493fa317785611 *core/class/table/table_session.php
774bda01812449ffa4819b0be241dc4e *core/class/table/table_setting.php
@@ -254,7 +254,7 @@ d5b0e7dc291a731a5c184d97baecf2df *core/class/table/table_user_profile_setting.ph
bc2e189cfaacbdb84ddceb3a0abdcf92 *core/class/table/table_user_verify_info.php
692cda4c6ad17e87e1edefb7251d0116 *core/class/table/table_user_wechat.php
ca64f852f9c9442d65fa30ed279c6d6c *core/coreBase.php
d712c1ad304eafdd40573ea7cc9e1609 *core/core_version.php
25f7c644790916b7121bd38d1301d1ea *core/core_version.php
d90d23b8deb20cef2c43e66725ec2813 *core/cron/cron_cache_cleanup_week.php
540843e90244b66d31a1deb8c882d238 *core/cron/cron_cache_pichome_searchhot.php
09bf107dfc58f0424b0245834d221a42 *core/cron/cron_clean_notification_month.php
@@ -262,7 +262,7 @@ d90d23b8deb20cef2c43e66725ec2813 *core/cron/cron_cache_cleanup_week.php
b9d93753f597cf46343c07234d01a37b *core/cron/cron_pichome_getimagecolor.php
c04ccafee38c3e06208024a7cbe8a656 *core/cron/cron_pichome_getvideoinfo.php
3925c2ef1804631507efcdae43ec1108 *core/cron/cron_pichome_getwideothumb.php
3f04fd27593769aa47af32734d542a12 *core/cron/cron_pichome_updatelibrary_file.php
dc6a0c77112286b82c5742d0b93c6b6d *core/cron/cron_pichome_updatelibrary_file.php
e437812ec0dbb1050daa691303544d1c *core/dzzstart.php
d4c7872572f6965e3173a12153dd758b *core/function/cache/cache_fields_optional.php
98b3024c7107943c8573cf473d624710 *core/function/cache/cache_fields_register.php
@@ -969,7 +969,7 @@ bae84af37dba1b272ef439708d1b8e9f *dzz/images/extimg_small/xml.png
a949e13639231f3ab4192465ff2538ac *dzz/images/logo-blue.png
b92838cc79a788fc78a7685b5aae1f28 *dzz/index/index.php
d615e6446bb74240281aa217d6f5ad01 *dzz/index/login.php
28d0c2d1aacb4500ef061f8eae72200f *dzz/io/getImg.php
9464641e570a5ef040351554605b519d *dzz/io/getImg.php
c922015b4938aea09a73ed7d1d759ee4 *dzz/language/en-US/lang.php
d91b3ccebc18bcd41bc44e9da28d598f *dzz/language/zh-CN/lang.php
e6ff860b694692916c323609ac7697f8 *dzz/pdf/build/pdf.js
@@ -1379,10 +1379,10 @@ badeea57fda90d27e54a9f9488ac4c43 *dzz/pdf/web/viewer.html
f2dddeac144b9bbac3ef849464bdf74b *dzz/pdf/web/viewer.js
9d8f7b8df2cf3dffa23febb3582928d4 *dzz/pdf/web/viewer.js.map
57cbaacb499474a5ca6c14a86d411512 *dzz/pichome/admin.php
7a4feb3626ba6a8e2bfad12b6d2b4ff0 *dzz/pichome/ajax.php
ae17e4be72c28160524e6d0f15a08764 *dzz/pichome/ajax.php
c550e347457729fb118592d6be50d050 *dzz/pichome/checkexport.php
706bd367941708aa5b026376fc56e6a6 *dzz/pichome/class/class_eagleexport.php
395888f8a190db23bfa5e5af2dac3e55 *dzz/pichome/class/class_localexport.php
6433341eb6119db85c0d2001c5155150 *dzz/pichome/class/class_eagleexport.php
d89bf384de0af51c78c3a40a680e1c89 *dzz/pichome/class/class_localexport.php
6293eb9bd5b473c7f178be5d6534341c *dzz/pichome/config/config.php
29640dfed0df1100d9c8e4d819b4c593 *dzz/pichome/css/admin.css
07f01151181178c663d669622ea927f3 *dzz/pichome/css/common.css
@@ -1402,34 +1402,34 @@ beba9d9c0e6f710c90145d9e3cbbab2d *dzz/pichome/css/index.css
f1e227b4a2e8a0345daaf6141e1856dd *dzz/pichome/css/mobile/personal.css
cc6d3bf279ed780dd69d0dcc250bd442 *dzz/pichome/css/mobile/share.css
509deac393472e307756fc9deee67276 *dzz/pichome/css/pc/admin.css
7a9ae0c0a2a7ccfe1b92949ce1efd330 *dzz/pichome/css/pc/common.css
4616cbd4493d6a922221b5225605bf17 *dzz/pichome/css/pc/common.css
e3123a0f6930b3d0a84387d3102c704d *dzz/pichome/css/pc/details.css
478715f3a9570d1be58dda7943ec1a4c *dzz/pichome/css/pc/image.css
1a7589e0fb94c67ded810b23cceb0ea6 *dzz/pichome/css/pc/index.css
0446460c4b1c238c4a17b4119c5c106e *dzz/pichome/css/pc/image.css
4e1559e2dada467206bec5c77b5a23f5 *dzz/pichome/css/pc/index.css
16ceb77eb522e138548921aa5b024a36 *dzz/pichome/css/pc/screen.css
69c8a20f13ee8eb40d35ddd497d35fd3 *dzz/pichome/css/pc/xuanzhuan/iconfont.ttf
b006647cb9c39a657d354fcf0bdf88bf *dzz/pichome/css/pc/xuanzhuan/index.css
48994b9f88c49cdb67a88116380cfb95 *dzz/pichome/css/theme/black/index.css
3d037ab39fd205fc01dcb0644dc73594 *dzz/pichome/css/theme/black/root.css
fe6f435c4534024a6894473daec0845a *dzz/pichome/css/theme/black/root.css
247be4f622b714c5745e69ebb932e197 *dzz/pichome/css/theme/darkgrey/index.css
9a6e6b73f09a721abe91bcadd9d1dbcd *dzz/pichome/css/theme/darkgrey/root.css
9925ea840cd52bf961eb4b1eb7b565b8 *dzz/pichome/css/theme/darkgrey/root.css
732389ded34cb9c52dd88271f1345af9 *dzz/pichome/css/theme/fonts/element-icons.ttf
535877f50039c0cb49a6196a5b7517cd *dzz/pichome/css/theme/fonts/element-icons.woff
dce825b1ca6c3b1c18adc856618b8602 *dzz/pichome/css/theme/lightgrey/index.css
6c11a6e69881f44860b2dd8a9b7dde51 *dzz/pichome/css/theme/lightgrey/root.css
74e133fde11f139ecfeedafb438a13ce *dzz/pichome/css/theme/lightgrey/root.css
106204b58c77af1048a22bfe9cbd1d49 *dzz/pichome/css/theme/navyblue/index.css
2669ef65012ea0cc6ca29e3c5f57bf47 *dzz/pichome/css/theme/navyblue/root.css
17018172c965f899a07fd8f53b789ecf *dzz/pichome/css/theme/navyblue/root.css
6a3812a857dae07ed74b59d26c86d7e1 *dzz/pichome/css/theme/purple/index.css
2566cbfc860d4bc3c12812d9d35011ef *dzz/pichome/css/theme/purple/root.css
c514077b8965f7d3bd473f19d85620e3 *dzz/pichome/css/theme/purple/root.css
4705cbd2d8a842635d69d2ace637212e *dzz/pichome/css/theme/white/index.css
b07e0746971bb7c6dfc1d88ed2bdc4b2 *dzz/pichome/css/theme/white/root.css
24100e5ac1435598339350ec3ccf63bc *dzz/pichome/delete.php
b6aae0d83f9163cf8a6acda2c77f573e *dzz/pichome/css/theme/white/root.css
5c7db30e0823a778d5341db79a4ece27 *dzz/pichome/delete.php
0bc21a1af1a289191cf5a48523f2cf8c *dzz/pichome/details.php
2531bc3851ab49b6c3f95d0c09850382 *dzz/pichome/download.php
220a956534e1384a2c64cfc89ef48617 *dzz/pichome/download.php
e245c8b1f860c8252eade7f3dec51879 *dzz/pichome/dzz_app_pichome.xml
0d5b36f34930c6f3234ba9482fbcb401 *dzz/pichome/exportfile.php
2e03b890f6a73541d58e9fa68ab17624 *dzz/pichome/exportfilecheck.php
ab80472bc466830bbf05847da7026017 *dzz/pichome/filelist.php
1ef6b3e8f2d9664ac3665b62f6c5f39b *dzz/pichome/exportfile.php
dd58cee1073dfc2907838fe3ec26235b *dzz/pichome/exportfilecheck.php
ba8263d806bb02f8c1cd5b3becdfaac0 *dzz/pichome/filelist.php
2d0185de715fe914af40ce715d15afca *dzz/pichome/function/function_common.php
d211a97399d52fea48f94a45a06648d1 *dzz/pichome/image/eaglefile.webp
152ec265e38eb67acb6cb31026448e3d *dzz/pichome/image/img/t1.jpeg
@@ -1440,8 +1440,8 @@ d211a97399d52fea48f94a45a06648d1 *dzz/pichome/image/eaglefile.webp
1f0ee3cd38e82bd18490a34fcec8c690 *dzz/pichome/image/notScreen.png
f308fd14dbe2e06349ef366d6f9aa2c7 *dzz/pichome/image/palette.png
d51db8efca781201f641a41b57420dfe *dzz/pichome/image/phlogo.png
9a21fde6d13f5377bb4c23e1103f65c5 *dzz/pichome/index.php
4d793d9993042e9beda12a40272576c7 *dzz/pichome/initexport.php
438384ffb6dbf09c63f9c0254c57340a *dzz/pichome/index.php
bc4b3499031370aaa3fabf218806f65f *dzz/pichome/initexport.php
c9b191574ccc8ab6c8ff631302f10561 *dzz/pichome/install.php
29b8b6254aaaa263cbb0fe8272f05a59 *dzz/pichome/js/audioPlay.js
a088950fc4bf4348d87cda978e5ded97 *dzz/pichome/js/common.js
@@ -1476,7 +1476,7 @@ b21b8531847604ab5f2f5caaef51ba31 *dzz/pichome/js/vue/vue.js
69764bf35375a54256412f3c748b312d *dzz/pichome/js/waterfall.js
c24f19d7061cdf5bae41e5e9b9f5600c *dzz/pichome/language/en-US/lang.php
8a3e6ab24d873202b96c3acd9c1b0d2b *dzz/pichome/language/zh-CN/lang.php
05d2d04e0cd1f4e16bc46c2d5fe7893e *dzz/pichome/library.php
04a1d42c4c596325364400f866a2c143 *dzz/pichome/library.php
ccef8b340c90fc0061c6dd645fecc8df *dzz/pichome/setting.php
cda7d5feb6b4ed907d8a1eeb7d0ba46d *dzz/pichome/share.php
892a7e59f327bc5f273fc0fe2cd2679b *dzz/pichome/template/mobile/components/classify.htm
@@ -1529,9 +1529,9 @@ e75f2d5563b6d12d345ee4414e2840f9 *dzz/pichome/template/pc/components/index/image
ac1a37ef71ff76f05435a47b8f13a6b8 *dzz/pichome/template/pc/components/index/JsCommon.htm
d88649d33a48388af9e95f4b7b3aeea8 *dzz/pichome/template/pc/components/index/JsHeader1.htm
eb3a364123d4c0982dfc2497683adc29 *dzz/pichome/template/pc/components/index/JsHeader2.htm
4f7c5892b56744064e332bd2a9b64852 *dzz/pichome/template/pc/components/index/Jsimage.htm
5ecc3eabb026b20734c7bec319263ed3 *dzz/pichome/template/pc/components/index/Jsimage.htm
e5f81267932b2e39355c4bff620d11b6 *dzz/pichome/template/pc/components/index/JsLibrary.htm
1f1b56d62e79127ce0b5b78d00dedd9b *dzz/pichome/template/pc/components/index/JsScreen.htm
7a925a4631acb01fc275bbb237250d92 *dzz/pichome/template/pc/components/index/JsScreen.htm
ca1f90529303acc461fb2ce08fb6e7fc *dzz/pichome/template/pc/components/index/screen/btime/js.htm
a2d7aa1c09cf3119740247c2c84dc880 *dzz/pichome/template/pc/components/index/screen/btime/temp.htm
be0730d952f4744e88b2055c32d1f08b *dzz/pichome/template/pc/components/index/screen/classify/js.htm
@@ -1556,10 +1556,10 @@ a91f8cdb2836930e60e76000e14cd109 *dzz/pichome/template/pc/components/index/scree
026964771fde79d520db8fca996705d5 *dzz/pichome/template/pc/components/index/screen/shape/temp.htm
ed778182594282451fdeaf533390504a *dzz/pichome/template/pc/components/index/screen/size/js.htm
6607851de5183d1db762d74a184220b1 *dzz/pichome/template/pc/components/index/screen/size/temp.htm
14b788e3582ec1a59b1df295d645acf6 *dzz/pichome/template/pc/components/index/screen/tag/js.htm
ce8f0dddfb2446e04ed00da108a9d5ff *dzz/pichome/template/pc/components/index/screen/tag/js.htm
12adf53eb950a45a47d2d80e8b246fa6 *dzz/pichome/template/pc/components/index/screen/tag/temp.htm
c2953f2cc75684f3a777148ad8c5fce9 *dzz/pichome/template/pc/components/index/screen.htm
e99ff61dd48256711bfc0f6b7620d4ab *dzz/pichome/template/pc/components/index/template2/JsLeft.htm
78e4336426983a0ec62934217dee535c *dzz/pichome/template/pc/components/index/template2/JsLeft.htm
8f54b82e6d2f9cb4d7ba43d09a39f088 *dzz/pichome/template/pc/frame/footer_simple.htm
ae502b90b2b31175892efe56867bc2e7 *dzz/pichome/template/pc/frame/header_simple_end.htm
08154101159fde8eb21fe522cc937e4c *dzz/pichome/template/pc/frame/header_simple_start.htm
@@ -1570,11 +1570,11 @@ ea578588242396cb021031f41dd4bc69 *dzz/pichome/template/pc/page/adminLeft.htm
0e57e8ab9dbccead521f9b18fe8a2de2 *dzz/pichome/template/pc/page/adminLoginpage.htm
624c95c6ba1998d1f0538493c510fed1 *dzz/pichome/template/pc/page/adminPagesetting.htm
0920466b526ad2b5b6e20c8b2acead53 *dzz/pichome/template/pc/page/adminPersonal.htm
e7d36a2b763f353c1df3bf82d9695673 *dzz/pichome/template/pc/page/details.htm
4adfd28ac9666c2aeb1af34040db7551 *dzz/pichome/template/pc/page/details.htm
8e351bacc90f2855e890cc3cb0ef9fc2 *dzz/pichome/template/pc/page/index.htm
3434b3277fb32f8dd37684b5d898c24b *dzz/pichome/template/pc/page/index1.htm
701ca3999a6f963e5dd8081f4ca73498 *dzz/pichome/template/pc/page/index1.htm
dee08b61a3556659df1cb5daa3845b4e *dzz/pichome/template/pc/page/index2.htm
13a21e3c1168124857f64369e53bc024 *dzz/pichome/template/pc/page/library.htm
ecbf47343950b3ab1498a97c97d88771 *dzz/pichome/template/pc/page/library.htm
d05bbcc9ca122a830c924cfabed697c0 *dzz/pichome/template/pc/page/share.htm
3cd79761b99168c3f9faf607183df134 *dzz/pichome/uninstall.php
b5221437a0c978e0caf63f2278759934 *dzz/pichome/uninstall_real.php
@@ -1607,8 +1607,8 @@ b0bb6c733a343afcddcd03baaeff31b0 *dzz/xgplayer/js/xgplayer.music.js
5cb9422375b907e05eb6b7dc36fcd895 *favicon.ico
8e55bdb192a3aefe82e03292527819ca *htaccess_default.txt
55d39f5cf3916ab6a9336d95c671ab53 *index.php
37beb2f26d52660fed7d76cc77959e26 *install/data/install.sql
4a35501b2e1fca641c5a8d2d5175e72d *install/data/install_data.sql
d47506e140e630a579c83fe4911972ae *install/data/install.sql
53cf9484adc4e5d9a87f88a662df5dc8 *install/data/install_data.sql
feabf4e4c8e20dc73548dfd6ba8400f9 *install/images/error.png
fc25acefcabc066437d4b27550387954 *install/images/logo.png
2ba93e93e0fbdfeb91e22f6d3bf8b6ca *install/images/logo.svg
@@ -1620,9 +1620,8 @@ fc25acefcabc066437d4b27550387954 *install/images/logo.png
a987af86766c27c565794ffa189cf664 *install/include/install_mysql.php
249b244097610688130b93721d1c2bd1 *install/include/install_mysqli.php
effd4ff5bdac95bbc9e360de443f335c *install/include/install_var.php
81c8f56afad64263e7f7be6e8f223338 *install/index.php
4c34d50daace82774e12ef92efb93d18 *install/index.php
672ea3abb501cb04f0708a5c69ac2161 *install/language/zh-cn/lang.php
63947a3a069dd8a3433f1c4a182c96a1 *install/update.php
5aefe69b1ba16fe8a6f79c2156f8f281 *misc/ajax.php
66ee773a4c2e373da92f48f81930cf3f *misc/classes/init.php
f656adb0c1b2699a4d8c613f2b9dacab *misc/pichomeexport.php

View File

@@ -1,103 +1,113 @@
<?php
/** php下载类,支持断点续传
* Date: 2013-06-30
* Author: test
* Ver: 1.0
*
* Func:
* download: 下载文件
* setSpeed: 设置下载速度
* getRange: 获取header中Range
*/
class FileDownload{ // class start
private $_speed = 512; // 下载速度
/** 下载
* @param String $file 要下载的文件路径
* @param String $name 文件名称,为空则与下载的文件名称一样
* @param boolean $reload 是否开启断点续传
*/
public function download($file, $name='',$file_size=0,$dateline=0, $reload=false){
if($name==''){
$name = basename($file);
}
if(!$dateline){
$dataline=TIMESTAMP;
}
if(!$fp = fopen($file, 'rb')){
topshowmessage(lang('file_not_exist1'));
}
$db = DB::object();
$db->close();
@ob_end_clean();
if(getglobal('gzipcompress')) @ob_start('ob_gzhandler');
if(!$file_size) $file_size = filesize($file);
$ranges = $this->getRange($file_size);
header('cache-control:public');
header('Date: '.gmdate('D, d M Y H:i:s', $dateline).' GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $dateline).' GMT');
header('content-type:application/octet-stream');
header('content-disposition:attachment; filename='.$name);
if($reload && $ranges!=null){ // 使用续传
header('HTTP/1.1 206 Partial Content');
header('Accept-Ranges:bytes');
// 剩余长度
header(sprintf('content-length:%u',$ranges['end']-$ranges['start']+1));
// range信息
header(sprintf('content-range:bytes %s-%s/%s', $ranges['start'], $ranges['end'], $file_size));
// fp指针跳到断点位置
fseek($fp, sprintf('%u', $ranges['start']));
}else{
header('HTTP/1.1 200 OK');
header('content-length:'.$file_size);
}
while(!feof($fp)){
echo fread($fp, round($this->_speed*1024,0));
@flush(); @ob_flush();
// usleep(500); // 用于测试,减慢下载速度
}
($fp!=null) && fclose($fp);
}
/** 设置下载速度
* @param int $speed
*/
public function setSpeed($speed){
if(is_numeric($speed) && $speed>16 && $speed<4096){
$this->_speed = $speed;
}
}
/** 获取header range信息
* @param int $file_size 文件大小
* @return Array
*/
private function getRange($file_size){
if(isset($_SERVER['HTTP_RANGE'])){
list($a, $range) = explode("=",$_SERVER['HTTP_RANGE'],2);
list($range) = explode(",",$range,2);
list($start, $range_end) = explode("-", $range);
$start=intval($start);
if(!$range_end) {
$range_end=$file_size-1;
} else {
$range_end=intval($range_end);
}
$range = array('start'=>$start,'end'=>$range_end);
return $range;
}
return null;
}
} // class end
<?php
/** php下载类,支持断点续传
* Date: 2013-06-30
* Author: test
* Ver: 1.0
*
* Func:
* download: 下载文件
* setSpeed: 设置下载速度
* getRange: 获取header中Range
*/
class FileDownload{ // class start
private $_speed = 512; // 下载速度
/** 下载
* @param String $file 要下载的文件路径
* @param String $name 文件名称,为空则与下载的文件名称一样
* @param boolean $reload 是否开启断点续传
*/
public function download($file, $name='',$file_size=0,$dateline=0, $reload=false){
if($name==''){
$name = basename($file);
}
if(!$dateline){
$dataline=TIMESTAMP;
}
if(!$fp = fopen($file, 'rb')){
topshowmessage(lang('file_not_exist1'));
}
$charset = CHARSET;
$db = DB::object();
$db->close();
@ob_end_clean();
if(getglobal('gzipcompress')) @ob_start('ob_gzhandler');
if(!$file_size) $file_size = filesize($file);
$ranges = $this->getRange($file_size);
header('cache-control:public');
header('Date: '.gmdate('D, d M Y H:i:s', $dateline).' GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $dateline).' GMT');
header('content-type:application/octet-stream');
if (preg_match("/Firefox/", $_SERVER["HTTP_USER_AGENT"])) {
$attachment = 'attachment; filename*='.$charset.'\'\'' . $name;
} elseif (!preg_match("/Chrome/", $_SERVER["HTTP_USER_AGENT"]) && preg_match("/Safari/", $_SERVER["HTTP_USER_AGENT"])) {
$filename = rawurlencode($name); // 注意rawurlencode与urlencode的区别
$attachment = 'attachment; filename*='.$charset.'\'\'' . $filename;
} else{
$attachment = 'attachment; filename='.$name;
}
//header('content-disposition:attachment; filename='.$name);
header('content-disposition:'.$attachment);
if($reload && $ranges!=null){ // 使用续传
header('HTTP/1.1 206 Partial Content');
header('Accept-Ranges:bytes');
// 剩余长度
header(sprintf('content-length:%u',$ranges['end']-$ranges['start']+1));
// range信息
header(sprintf('content-range:bytes %s-%s/%s', $ranges['start'], $ranges['end'], $file_size));
// fp指针跳到断点位置
fseek($fp, sprintf('%u', $ranges['start']));
}else{
header('HTTP/1.1 200 OK');
header('content-length:'.$file_size);
}
while(!feof($fp)){
echo fread($fp, round($this->_speed*1024,0));
@flush(); @ob_flush();
// usleep(500); // 用于测试,减慢下载速度
}
($fp!=null) && fclose($fp);
}
/** 设置下载速度
* @param int $speed
*/
public function setSpeed($speed){
if(is_numeric($speed) && $speed>16 && $speed<4096){
$this->_speed = $speed;
}
}
/** 获取header range信息
* @param int $file_size 文件大小
* @return Array
*/
private function getRange($file_size){
if(isset($_SERVER['HTTP_RANGE'])){
list($a, $range) = explode("=",$_SERVER['HTTP_RANGE'],2);
list($range) = explode(",",$range,2);
list($start, $range_end) = explode("-", $range);
$start=intval($start);
if(!$range_end) {
$range_end=$file_size-1;
} else {
$range_end=intval($range_end);
}
$range = array('start'=>$start,'end'=>$range_end);
return $range;
}
return null;
}
} // class end
?>

View File

@@ -245,6 +245,11 @@ class image {
$w = ceil($y_ratio * $this->imginfo['width']);
$h = $this->param['thumbheight'];
}
if($w < 242){
$w = $this->param['thumbwidth'] = 242;
$x_ratio = $this->param['thumbwidth'] / $this->imginfo['width'];
$h = ceil($x_ratio*$this->imginfo['height']);
}
}
return array($x, $y, $w, $h);
}
@@ -356,6 +361,10 @@ class image {
}else{
$width=ceil($height*$or);
if($width < 242){
$width = 242;
$height = ceil($width/$or);
}
}
}else{
@@ -364,6 +373,11 @@ class image {
$width=$owidth;
}else{
$height=ceil($width/$or);
$width = ceil($height*$or);
if($width < 242){
$width = 242;
$height = ceil($width/$or);
}
}
}

View File

@@ -0,0 +1,432 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_pichome_collectlist extends dzz_table
{
public function __construct()
{
$this->_table = 'pichome_collectlist';
$this->_pk = 'id';
$this->_pre_cache_key = 'pichome_collectlist';
$this->_cache_ttl = 3600;
parent::__construct();
}
//添加收藏
public function add_collect($data){
$perm = C::t('pichome_collectuser')->get_perm_by_clid($data['clid']);
if($perm < 2){
return array('error'=>'no_perm');
}
if(empty($data['rid'])) return true;
$existsdata = DB::fetch_all("select rid from %t where rid in(%n) and clid = %d and cid = %d",array($this->_table,$data['rid'],$data['clid'],$data['cid']));
$existsrids = [];
foreach($existsdata as $v){
$existsrids[] = $v['rid'];
}
$totalcount = count($data['rid']);
$data['rid'] = array_diff($data['rid'],$existsrids);
if(empty($data['rid'])) return true;
//记录加入收藏个数
$counti = 0;
$namesarr = [];
foreach(DB::fetch_all("select appid,rid,name from %t where rid in(%n)",array('pichome_resources',$data['rid'])) as $v){
$setarr = [
'rid'=>$v['rid'],
'cid'=>$data['cid'],
'clid'=>$data['clid'],
'uid'=>$data['uid'],
'username'=>$data['username'],
'dateline'=>$data['dateline'],
'appid'=>$v['appid'],
];
$namesarr[] = $v['name'];
if(parent::insert($setarr,1)) $counti += 1;
}
if($counti){
$filenamearr = array_slice($namesarr,0,5);
$filename = implode(',',$filenamearr).'等'.$totalcount.'个文件';
//如果收藏有分类增加该分类下文件数
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$data['clid']));
if($data['cid']){
C::t('pichome_collectcat')->add_filenum_by_cid($data['cid'],$counti);
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$data['cid']));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$position .= '/'.$v['catname'];
}
}
C::t('pichome_collect')->add_filenum_by_clid($data['clid'],$counti);
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'rids'=> $data['rid']];
$enventdata = [
'eventbody' =>'collectfile' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$data['clid'],
'cid' =>($data['cid']) ? $data['cid']:0,
'do' => 'collect_file',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
}
$this->update_collect_thumb($data['clid']);
return true;
}
public function delete($id){
if(!is_array($id)) $id = (array)$id;
if(parent::delete($id)){
//删除对应分享
if(!empty($id))DB::delete('pichome_share','filepath in('.dimplode($id).') and stype = 1');
}
return true;
}
//取消收藏
public function cancle_filecollect($lids,$clid,$cid = 0){
$perm = C::t('pichome_collectuser')->get_perm_by_clid($clid);
if($perm < 2){
return array('error'=>'no_perm');
}
if(!is_array($lids)) $lids = (array)$lids;
if(empty($lids)) return true;
$counti = 0;
$rids = [];
foreach(DB::fetch_all("select rid,id,cid,clid from %t where id in(%n)",array($this->_table,$lids)) as $v){
$rids[] = $v['rid'];
if($this->delete($v['id'])){
$counti += 1;
C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
C::t('pichome_collect')->add_filenum_by_clid($v['clid'],-1);
}
}
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$clid));
if($cid){
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$cid));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$position .= '/'.$v['catname'];
}
}
$namesarr = [];
foreach(DB::fetch_all("select name from %t where rid in(%n) limit 0,5",array('pichome_resources',$rids)) as $v){
$namesarr[] = $v['name'];
}
$filename = implode(',',$namesarr).'等'.$counti.'个文件';
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'rid'=>$rids];
$enventdata = [
'eventbody' =>'canclecollectfile' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$clid,
'cid' =>($cid) ? $cid:0,
'do' => 'cancle_collectfile',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
$this->update_collect_thumb($clid);
return true;
}
//更新收藏夹缩略图
public function update_collect_thumb($clid){
$first = false;
$collectdata = C::t('pichome_collect')->fetch($clid);
if(!C::t('pichome_collectlist')->fetch($collectdata['lid'])){
$first = true;
}else{
$first = false;
}
$setarr = [];
if($first){
//取得第一张图
$firstdata = DB::fetch_first("select * from %t where clid = %d order by id asc",array($this->_table,$clid));
if($firstdata){
$icondatas = C::t('pichome_resources')->geticondata_by_rid($firstdata['rid']);
$setarr['covert'] = $icondatas['icondata'];
$setarr['lid'] = $firstdata['id'];
}else{
$setarr['covert'] = '';
$setarr['lid'] = 0;
}
}
//取得最新两张图
$i = 2;
$coverdata = DB::fetch_all("select rid,id from %t where clid = %d order by id desc limit 0,2",array($this->_table,$clid));
$count = count($coverdata);
if($count == 0){
$setarr['covert1'] = '';
$setarr['covert2'] = '';
$setarr['lid1'] = 0;
$setarr['lid2'] = 0;
}elseif($count ==1) {
foreach ($coverdata as $v) {
$icondatas = C::t('pichome_resources')->geticondata_by_rid($v['rid']);
$setarr['covert' . $i] = $icondatas['icondata'];
$setarr['lid' . $i] = $v['id'];
$i--;
}
$setarr['covert2'] = '';
$setarr['lid2'] = 0;
}else{
foreach($coverdata as $v){
$icondatas = C::t('pichome_resources')->geticondata_by_rid($v['rid']);
$setarr['covert'.$i] = $icondatas['icondata'];
$setarr['lid'.$i] = $v['id'];
$i--;
}
}
C::t('pichome_collect')->update($clid,$setarr);
return true;
}
//删除收藏夹所有文件
public function delete_by_clid($clid){
return DB::delete($this->_table,array('clid'=>$clid));
}
//移动文件到某收藏
public function move_collectfile($lids,$oclid,$ocid=0){
if(!is_array($lids)) $lids = (array)$lids;
if(empty($lids)) return true;
$total = count($lids);
$cids = [];
$clid = 0;
$counti = 0;
$rids=[];
foreach(DB::fetch_all("select * from %t where id in(%n)",array('pichome_collectlist',$lids)) as $v){
$cids[] = $v['cid'];
$clid = $v['clid'];
//如果收藏位置相同则不做任何处理
if($v['clid'] == $oclid && $v['cid'] == $ocid){
/* if(parent::delete($v['id'])){
//收藏夹文件数和分类数减1
if($v['cid']) C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
if($v['clid'])C::t('pichome_collect')->add_filenum_by_clid($v['clid'],-1);
}*/
continue;
}else{
//如果该收藏文件在目标位置已经存在则删除原收藏位置文件
if($id = DB::result_first("select id from %t where rid = %s and clid = %d and cid = %d",
array($this->_table,$v['rird'],$oclid,$ocid))){
$this->delete($id);
C::t('pichome_collect')->add_filenum_by_clid($clid,-1);
if($v['cid'])C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
}else{
$setarr = [
'uid'=>getglobal('uid'),
'username'=>getglobal('username'),
'clid'=>$oclid,
'cid'=>$ocid
];
/* echo $ocid;
print_r($v);die;*/
//更新数据
if(parent::update($v['id'],$setarr)){
//如果移动位置不在一个收藏夹
if($v['clid'] != $oclid){
//增加移入收藏夹文件数
C::t('pichome_collect')->add_filenum_by_clid($oclid,1);
if($v['clid']) C::t('pichome_collect')->add_filenum_by_clid($clid,-1);
}
if($v['cid'])C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
$counti++;
//增加移入分类文件数
if($ocid)C::t('pichome_collectcat')->add_filenum_by_cid($ocid,1);
}
}
}
$rids[] = $v['rid'];
}
//如果移动文件位置cid为多个则不记入动态
$cids = array_unique($cids);
if(count($cids) == 1) $cid = $cids[0];
else $cid = 0;
$namesarr = [];
foreach(DB::fetch_all("select name from %t where rid in(%n) limit 0,5",array('pichome_resources',$rids)) as $v){
$namesarr[] = $v['name'];
}
$filename = implode(',',$namesarr).'等'.$total.'个文件';
$oposition = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$oclid));
if($ocid){
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$ocid));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$oposition .= '/'.$v['catname'];
}
}
//更新移出收藏文件数
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$clid));
if($cid){
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$cid));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$position .= '/'.$v['catname'];
}
}
//移入动态
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'newcolletname'=>$oposition,'rid'=>$rids];
$enventdata = [
'eventbody' =>'movecollectfileto' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$oclid,
'cid' =>($ocid) ? $ocid:0,
'do' => 'move_collectfileto',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
//更新移入文件收藏缩略图
if($oclid != $clid) $this->update_collect_thumb($oclid);
//移出动态
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'newcolletname'=>$oposition,'rid'=>$rids];
$enventdata = [
'eventbody' =>'delcollectfilefrom' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$clid,
'cid' =>($cid) ? $cid:0,
'do' => 'del_collectfilefrom',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
//更新移出文件收藏缩略图
if($clid && $oclid != $clid) $this->update_collect_thumb($oclid);
return true;
}
//收藏已收藏文件到指定收藏
public function collect_by_lid($lids,$clid,$cid=0){
$perm = C::t('pichome_collectuser')->get_perm_by_clid($clid);
if($perm < 2){
return array('error'=>'no_perm');
}
if(!is_array($lids)) $lids = (array)$lids;
if(empty($lids)) return true;
$rids = [];
foreach(DB::fetch_all("select rid,id from %t where id in(%n)",array($this->_table,$lids)) as $v){
$rids[] = $v['rid'];
}
$existsrids = [];
foreach(DB::fetch_all("select rid from %t where rid in(%n) and clid = %d and cid = %d",array($this->_table,$rids,$clid,$cid)) as $v){
$existsrids[] = $v['rid'];
}
$totalcount = count($rids);
$insertrids = array_diff($rids,$existsrids);
//记录加入收藏个数
$counti = 0;
$namesarr = [];
foreach(DB::fetch_all("select appid,rid,name from %t where rid in(%n)",array('pichome_resources',$insertrids)) as $v){
$setarr = [
'rid'=>$v['rid'],
'cid'=>$cid,
'clid'=>$clid,
'uid'=>getglobal('uid'),
'username'=>getglobal('username'),
'dateline'=>TIMESTAMP,
'appid'=>$v['appid'],
];
$namesarr[] = $v['name'];
if(parent::insert($setarr,1)) $counti += 1;
}
if($counti){
$filenamearr = array_slice($namesarr,0,5);
$filename = implode(',',$filenamearr).'等'.$totalcount.'个文件';
//如果收藏有分类增加该分类下文件数
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$clid));
if($cid){
C::t('pichome_collectcat')->add_filenum_by_cid($cid,$counti);
$pathkey = DB::result_first("select pathkey from %t where cid = %d",array('pichome_collectcat',$cid));
$pathkey = str_replace('_','',$pathkey);
$patharr = explode('-',$pathkey);
foreach(DB::fetch_all("select catname from %t where cid in(%n)",array('pichome_collectcat',$patharr)) as $v){
$position .= '/'.$v['catname'];
}
}
C::t('pichome_collect')->add_filenum_by_clid($clid,$counti);
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'rids'=>$rids];
$enventdata = [
'eventbody' =>'collectfile' ,
'uid' => getglobal('uid'),
'username' => getglobal('username'),
'bodydata' => json_encode($enventbodydata),
'clid' =>$clid,
'cid' =>$cid ? $cid:0,
'do' => 'collect_file',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
}
$this->update_collect_thumb($clid);
return true;
}
public function delete_by_rids($rids,$uid,$username){
if(!$rids) $rids = (array)$rids;
if(empty($rids)) return true;
$clids = [];
foreach(DB::fetch_all("select * from %t where rid in(%n)",array($this->_table,$rids)) as $v){
$clids[$v['clid']][] = $v['id'];
}
foreach ($clids as $k=>$val){
$clid = $k;
$counti = 0;
$rids = [];
foreach(DB::fetch_all("select rid,id,cid,clid from %t where id in(%n)",array($this->_table,$val)) as $v){
$rids[] = $v['rid'];
if($this->delete($v['id'])){
$counti += 1;
if($v['cid'])C::t('pichome_collectcat')->add_filenum_by_cid($v['cid'],-1);
if($v['clid'])C::t('pichome_collect')->add_filenum_by_clid($v['clid'],-1);
}
}
$position = DB::result_first("select name from %t where clid = %d",array('pichome_collect',$clid));
$namesarr = [];
foreach(DB::fetch_all("select name from %t where rid in(%n) limit 0,5",array('pichome_resources',$rids)) as $v){
$namesarr[] = $v['name'];
}
$filename = implode(',',$namesarr).'等'.$counti.'个文件';
$enventbodydata = ['username'=>getglobal('username'),'filename'=>$filename,'collectname'=>$position,'rid'=>$rids];
$enventdata = [
'eventbody' =>'canclecollectfile' ,
'uid' => $uid,
'username' => $username,
'bodydata' => json_encode($enventbodydata),
'clid' =>$clid,
'cid' =>0,
'do' => 'cancle_collectfile',
'do_obj' =>$filename,
'dateline'=>TIMESTAMP
];
C::t('pichome_collectevent')->insert($enventdata);
$this->update_collect_thumb($clid);
}
return true;
}
}

View File

@@ -1,109 +1,160 @@
<?php
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_pichome_palette extends dzz_table
{
public function __construct()
{
$this->_table = 'pichome_palette';
$this->_pk = 'id';
$this->_pre_cache_key = 'pichome_palette';
$this->_cache_ttl = 3600;
parent::__construct();
}
//根据appid删除目录
public function delete_by_appid($appid){
$ids = [];
foreach(DB::fetch_all("select id from %t where appid = %s",array($this->_table,$appid)) as $v){
$ids[] = $v['id'];
}
return parent::delete($ids);
}
public function delete_by_rid($rid){
if(!is_array($rid)) $rid = (array) $rid;
$delids = [];
foreach (DB::fetch_all("select id from %t where rid in(%n)",array($this->_table,$rid)) as $v){
$delids[] = $v['id'];
}
return parent::delete($delids);
}
public function fetch_rid_by_color($color,$persion=0,$appid='',$limit=6,$rid=''){
//设定基础相似度为80%,当精度调整时相似度根据精度数值相应增加调整范围为0-100,实际计算用20的差异量进行转换
$similarity = 90+(10/100)*$persion;
//此值为rgb(0,0,0)与rgb(255,255,255)最大色差值,用以计算相似度的被除数
$maxColDist = 764.8339663572415;
//获取颜色的rgb,该操作为十六进制转换为rgb
$rgbcolor = $this->hex2rgb($color);
//色差计算公式为sqrt((2 + $rmean / 256) * (pow($r, 2)) + 4 * (pow($g, 2)) + (2 + (255 - $rmean) / 256) * (pow($b, 2)))
//公式中rgb值为连个rgb的差值$rmean为r值之和的二分之一
if($appid){
$sql = 'select distinct p.rid from %t p left join %t r on p.rid = r.rid';
$wheresql = " r.appid = %s and p.rid != %s
and round((%d-sqrt((((2+(p.r+%d)/2)/256)*(pow((%d-p.r),2))+(4*pow((%d-p.g),2)) + (((2+(255-(p.r+%d)/2))/256))*(pow((%d-p.b), 2)))))/%d,4)*100 >= %d ";
$ordersql = ' order by round((%d-sqrt((((2+(p.r+%d)/2)/256)*(pow((%d-p.r),2))+(4*pow((%d-p.g),2)) + (((2+(255-(p.r+%d)/2))/256))*(pow((%d-p.b), 2)))))/%d,4)*100*weight ';
$params = array($this->_table,'pichome_resources',$appid,$rid,$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity,
$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity);
}else{
$sql = 'select distinct rid from %t ';
$wheresql = " rid != %s
and round((%d-sqrt((((2+(r+%d)/2)/256)*(pow((%d-r),2))+(4*pow((%d-g),2)) + (((2+(255-(r+%d)/2))/256))*(pow((%d-b), 2)))))/%d,4)*100 >= %d ";
$params = array($this->_table,$rid,$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity,
$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity);
}
$riddata = DB::fetch_all("$sql where $wheresql $ordersql desc limit 0,$limit ",$params);
$rids= [];
foreach ($riddata as $v){
$rids[] = $v['rid'];
}
return $rids;
}
//转换十六进制颜色为rgb
public function hex2rgb($hexColor){
$color=str_replace('#','',$hexColor);
if (strlen($color)> 3){
$rgb=array(
'r'=>hexdec(substr($color,0,2)),
'g'=>hexdec(substr($color,2,2)),
'b'=>hexdec(substr($color,4,2))
);
}else{
$r=substr($color,0,1). substr($color,0,1);
$g=substr($color,1,1). substr($color,1,1);
$b=substr($color,2,1). substr($color,2,1);
$rgb=array(
'r'=>hexdec($r),
'g'=>hexdec($g),
'b'=>hexdec($b)
);
}
return $rgb;
}
public function fetch_colordata_by_rid($rid){
$data = [];
foreach(DB::fetch_all("select color,weight from %t where rid = %s",array($this->_table,$rid)) as $v){
$weight = $v['weight']*100;
$data[$weight] = dechex($v['color']);
}
krsort($data);
return $data;
}
/*
*$colors 该参数需带权重,以键为权重值,此处查询优先权重最大的查询近似颜色值
* ***/
public function fetch_rids_by_clolos($colors,$limit=6){
$rids = [];
//此处颜色值按权重顺序,优先寻找权重最大的,如果权重最大的得到足够数据,则不再查找其它颜色相似数据
foreach($colors as $k=>$v){
foreach($this->fetch_rid_by_color($v) as $v){
$rids[] = $v;
}
if(count($rids) >= $limit) break;
}
return $rids;
}
<?php
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_pichome_palette extends dzz_table
{
public function __construct()
{
$this->_table = 'pichome_palette';
$this->_pk = 'id';
$this->_pre_cache_key = 'pichome_palette';
$this->_cache_ttl = 3600;
parent::__construct();
}
//根据appid删除目录
public function delete_by_appid($appid){
$ids = [];
foreach(DB::fetch_all("select id from %t where appid = %s",array($this->_table,$appid)) as $v){
$ids[] = $v['id'];
}
return parent::delete($ids);
}
public function delete_by_rid($rid){
if(!is_array($rid)) $rid = (array) $rid;
$delids = [];
foreach (DB::fetch_all("select id from %t where rid in(%n)",array($this->_table,$rid)) as $v){
$delids[] = $v['id'];
}
return parent::delete($delids);
}
public function fetch_rid_by_color($color,$persion=0,$appid='',$limit=6,$rid=''){
//设定基础相似度为80%,当精度调整时相似度根据精度数值相应增加调整范围为0-100,实际计算用20的差异量进行转换
$similarity = 90+(10/100)*$persion;
//此值为rgb(0,0,0)与rgb(255,255,255)最大色差值,用以计算相似度的被除数
$maxColDist = 764.8339663572415;
//获取颜色的rgb,该操作为十六进制转换为rgb
$rgbcolor = $this->hex2rgb($color);
//色差计算公式为sqrt((2 + $rmean / 256) * (pow($r, 2)) + 4 * (pow($g, 2)) + (2 + (255 - $rmean) / 256) * (pow($b, 2)))
//公式中rgb值为连个rgb的差值$rmean为r值之和的二分之一
if($appid){
$sql = 'select distinct p.rid from %t p left join %t r on p.rid = r.rid';
$wheresql = " r.appid = %s and p.rid != %s
and round((%d-sqrt((((2+(p.r+%d)/2)/256)*(pow((%d-p.r),2))+(4*pow((%d-p.g),2)) + (((2+(255-(p.r+%d)/2))/256))*(pow((%d-p.b), 2)))))/%d,4)*100 >= %d ";
$ordersql = ' order by round((%d-sqrt((((2+(p.r+%d)/2)/256)*(pow((%d-p.r),2))+(4*pow((%d-p.g),2)) + (((2+(255-(p.r+%d)/2))/256))*(pow((%d-p.b), 2)))))/%d,4)*100*weight ';
$params = array($this->_table,'pichome_resources',$appid,$rid,$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity,
$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity);
}else{
$sql = 'select distinct rid from %t ';
$wheresql = " rid != %s
and round((%d-sqrt((((2+(r+%d)/2)/256)*(pow((%d-r),2))+(4*pow((%d-g),2)) + (((2+(255-(r+%d)/2))/256))*(pow((%d-b), 2)))))/%d,4)*100 >= %d ";
$params = array($this->_table,$rid,$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity,
$maxColDist,$rgbcolor['r'],$rgbcolor['r'],$rgbcolor['g'],$rgbcolor['r'],$rgbcolor['b'],$maxColDist,$similarity);
}
$riddata = DB::fetch_all("$sql where $wheresql $ordersql desc limit 0,$limit ",$params);
$rids= [];
foreach ($riddata as $v){
$rids[] = $v['rid'];
}
return $rids;
}
//转换十六进制颜色为rgb
public function hex2rgb($hexColor){
$color=str_replace('#','',$hexColor);
if (strlen($color)> 3){
$rgb=array(
'r'=>hexdec(substr($color,0,2)),
'g'=>hexdec(substr($color,2,2)),
'b'=>hexdec(substr($color,4,2))
);
}else{
$r=substr($color,0,1). substr($color,0,1);
$g=substr($color,1,1). substr($color,1,1);
$b=substr($color,2,1). substr($color,2,1);
$rgb=array(
'r'=>hexdec($r),
'g'=>hexdec($g),
'b'=>hexdec($b)
);
}
return $rgb;
}
function RGBToHex($rgb){
$regexp = "/^rgb\(([0-9]{0,3})\,\s*([0-9]{0,3})\,\s*([0-9]{0,3})\)/";
$re = preg_match($regexp, $rgb, $match);
$re = array_shift($match);
$hexColor = "";
$hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
for ($i = 0; $i < 3; $i++) {
$r = null;
$c = $match[$i];
$hexAr = array();
while ($c > 16) {
$r = $c % 16;
$c = ($c / 16) >> 0;
array_push($hexAr, $hex[$r]);
}
array_push($hexAr, $hex[$c]);
$ret = array_reverse($hexAr);
$item = implode('', $ret);
$item = str_pad($item, 2, '0', STR_PAD_LEFT);
$hexColor .= $item;
}
return $hexColor;
}
public function fetch_colordata_by_rid($rid){
$data = [];
foreach(DB::fetch_all("select r,g,b,weight from %t where rid = %s",array($this->_table,$rid)) as $v){
$rgbdata = 'rgb('.$v['r'].','.$v['g'].','.$v['b'].')';
$weight = $v['weight']*100;
$v['color'] = $this->RGBToHex($rgbdata);
$data[] = ['color'=>$v['color'],'weight'=>$weight];
}
$distance = [];
$colordata = [];
foreach($data as $v){
$distance[] = $v['weight'];
}
array_multisort($distance, SORT_DESC, $data);
foreach($data as $v){
$colordata[] = $v['color'];
}
return $colordata;
}
/*
*$colors 该参数需带权重,以键为权重值,此处查询优先权重最大的查询近似颜色值
* ***/
public function fetch_rids_by_clolos($colors,$limit=6){
$rids = [];
//此处颜色值按权重顺序,优先寻找权重最大的,如果权重最大的得到足够数据,则不再查找其它颜色相似数据
foreach($colors as $k=>$v){
foreach($this->fetch_rid_by_color($v) as $v){
$rids[] = $v;
}
if(count($rids) >= $limit) break;
}
return $rids;
}
}

View File

@@ -29,12 +29,13 @@ class table_pichome_resources extends dzz_table
public function delete_by_appid($appid)
{
$data = C::t('pichome_vapp')->fetch($appid);
//$i = 0;
$rids = [];
foreach (DB::fetch_all("select rid from %t where appid = %s limit 0,1000", array($this->_table, $appid)) as $v) {
foreach (DB::fetch_all("select rid from %t where appid = %s limit 0,100", array($this->_table, $appid)) as $v) {
$rids[] = $v['rid'];
}
if ($rids) $this->delete_by_rid($rids);
if ($rids) $this->delete_by_rid($rids,$data['deluid'],$data['delusername']);
//return $i;
}
@@ -44,7 +45,7 @@ class table_pichome_resources extends dzz_table
return DB::result_first("select * from %t where path = %s", array($this->_table, $path));
}
public function delete_by_rid($rids)
public function delete_by_rid($rids,$uid=0,$username='')
{
if (!is_array($rids)) $rids = (array)$rids;
C::t('pichome_resources_attr')->delete_by_rid($rids);
@@ -55,6 +56,9 @@ class table_pichome_resources extends dzz_table
C::t('pichome_share')->delete_by_rid($rids);
C::t('pichome_ffmpeg_record')->delete($rids);
C::t('pichome_imagickrecord')->delete($rids);
//$deldata = ['rids'=>$rids,'deluid'=>$uid,'delusername'=>$username];
//Hook::listen('pichomedatadeleteafter',$deldata);
return $this->delete($rids);
}
@@ -70,7 +74,7 @@ class table_pichome_resources extends dzz_table
$v['dateline'] = dgmdate(round($v['dateline'] / 1000), 'Y/m/d H:i');
$v['name'] = str_replace(strrchr($v['name'], "."), "", $v['name']);
$v['btime'] = dgmdate(round($v['btime'] / 1000), 'Y/m/d H:i');
$v['dpath'] = dzzencode($v['rid'], '', 0,0);
$v['dpath'] = dzzencode($v['rid'], '', 0, 0);
if (in_array($v['ext'], $Opentype['video'])) {
$v['opentype'] = 'video';
} elseif (in_array($v['ext'], $Opentype['text'])) {
@@ -107,19 +111,54 @@ class table_pichome_resources extends dzz_table
return $datas;
}
//获取数据后端使用
public function fetch_data_by_rid($rid){
public function fetch_data_by_rid($rid)
{
if (!$resourcesdata = parent::fetch($rid)) return array();
if ($resourcesdata['isdelete'] > 0) return array();
$downshare = C::t('pichome_vapp')->fetch_all_sharedownlod();
if($downshare[$resourcesdata['appid']]['isdelete']) return array();
if ($downshare[$resourcesdata['appid']]['isdelete']) return array();
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
$resourcesdata = array_merge($resourcesdata, $attrdata);
$resourcesdata['realpath'] =$downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
$resourcesdata['realpath'] = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
return $resourcesdata;
}
/*public function getdatabyrid($rid){
global $Opentype;
$data = parent::fetch($rid);
$data['fsize'] = formatsize($data['size']);
$data['mtime'] = dgmdate(round($data['mtime'] / 1000), 'Y/m/d H:i');
$data['dateline'] = dgmdate(round($data['dateline'] / 1000), 'Y/m/d H:i');
$data['name'] = str_replace(strrchr($data['name'], "."), "", $data['name']);
$data['btime'] = dgmdate(round($data['btime'] / 1000), 'Y/m/d H:i');
$data['dpath'] = dzzencode($data['rid'], '', 0, 0);
if (in_array($data['ext'], $Opentype['video'])) {
$data['opentype'] = 'video';
} elseif (in_array($data['ext'], $Opentype['text'])) {
$data['opentype'] = 'text';
} elseif (in_array($data['ext'], $Opentype['pdf'])) {
$data['opentype'] = 'pdf';
} elseif (in_array($data['ext'], $Opentype['image'])) {
$data['opentype'] = 'image';
} else {
$data['opentype'] = 'other';
}
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
$data = array_merge($data,$attrdata);
$colordata = C::t('pichome_palette')->fetch_colordata_by_rid($rid);
foreach ($colordata as $cv) {
$colorsarr[] = $cv;
}
$data['color'] = $colorsarr[0];
//array_multisort($datas, 'rid', SORT_ASC, $rids);
foreach (C::t('pichome_resourcestag')->fetch_all_tag_by_rids($rids) as $k => $v) {
$datas[$k]['tags'] = $v;
// $datas[$k]['tags'] = '•'.implode('•',$v);
}
}*/
public function fetch_by_rid($rid)
{
global $Opentype;
@@ -128,6 +167,7 @@ class table_pichome_resources extends dzz_table
//获取所有库分享和下载权限
$downshare = C::t('pichome_vapp')->fetch_all_sharedownlod();
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
if($attrdata['desc']) $attrdata['desc'] = strip_tags($attrdata['desc']);
$resourcesdata = array_merge($resourcesdata, $attrdata);
$resourcesdata['colors'] = C::t('pichome_palette')->fetch_colordata_by_rid($rid);
$resourcesdata['ext'] = strtolower($resourcesdata['ext']);
@@ -145,19 +185,18 @@ class table_pichome_resources extends dzz_table
if ($resourcesdata['hasthumb']) {
//如果是本地文件
if ($resourcesdata['apptype'] == 1) {
$filename = 'pichomethumb'.BS . $resourcesdata['appid'] . BS . md5($resourcesdata['path']) . '.jpg';
$filename = 'pichomethumb' . BS . $resourcesdata['appid'] . BS . md5($resourcesdata['path']) . '.jpg';
$thumbpath = getglobal('setting/attachurl') . $filename;
//echo $thumbpath;die;
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
}
else {
$resourcesdata['path'] = str_replace('\\','/',$resourcesdata['path']);
} elseif ($resourcesdata['apptype'] == 0) {
$resourcesdata['path'] = str_replace('\\', '/', $resourcesdata['path']);
$filepath = dirname($resourcesdata['path']);
$filename = substr($resourcesdata['path'], strrpos($resourcesdata['path'], '/') + 1);
$filename = str_replace(strrchr($filename, "."), "", $filename);
$filepath = str_replace('/',BS,$filepath);
$filepath = str_replace('/', BS, $filepath);
if ($downshare[$resourcesdata['appid']]['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $downshare[$resourcesdata['appid']]['path']);
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
@@ -165,23 +204,34 @@ class table_pichome_resources extends dzz_table
} else {
$tmppath = $downshare[$resourcesdata['appid']]['path'];
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath,'',0,0);
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath, '', 0, 0);
}
//$thumbpath = 'library/' . $filepath . '/' . $filename . '_thumbnail.png';
//$resourcesdata['icondata'] = $thumbpath;
} else {
$hookdata = ['rid' => $resourcesdata['rid'], 'apppath' => $downshare[$resourcesdata['appid']]['path'], 'appid' => $resourcesdata['appid']];
$return = Hook::listen('getpichomethumb', $hookdata);
$thumbpath = str_replace(DZZ_ROOT, '', $return[0]['icon']);
if ($downshare[$resourcesdata['appid']]['iswebsitefile']){
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
}else{
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath, '', 0, 0);
}
}
//}
} else {
if ($resourcesdata['type'] == 'commonimage') {
if ($downshare[$resourcesdata['appid']]['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $downshare[$resourcesdata['appid']]['path']);
$thumbpath = $tmppath . BS . $resourcesdata['path'];
$thumbpath = str_replace(BS,'/',$thumbpath);
$thumbpath = $tmppath . BS . $resourcesdata['path'];
$thumbpath = str_replace(BS, '/', $thumbpath);
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $downshare[$resourcesdata['appid']]['path'];
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath,'',0,0);
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath, '', 0, 0);
}
} else {
@@ -190,25 +240,25 @@ class table_pichome_resources extends dzz_table
}
//echo $resourcesdata['icondata'];die;
$imginfo = @getimagesize($resourcesdata['icondata']);
$resourcesdata['iconwidth'] = $imginfo[0] ? $imginfo[0]:$resourcesdata['width'];
$resourcesdata['iconheight'] = $imginfo[1] ? $imginfo[1]:$resourcesdata['height'];
$resourcesdata['iconwidth'] = $imginfo[0] ? $imginfo[0] : $resourcesdata['width'];
$resourcesdata['iconheight'] = $imginfo[1] ? $imginfo[1] : $resourcesdata['height'];
$resourcesdata['icondata'] = str_replace('+', '%20', $resourcesdata['icondata']);
$resourcesdata['share'] = $downshare[$resourcesdata['appid']]['share'];
$resourcesdata['download'] = $downshare[$resourcesdata['appid']]['download'];
if ($downshare[$resourcesdata['appid']]['iswebsitefile']){
$originalimg= str_replace(DZZ_ROOT,'',$downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path']);
$originalimg = str_replace(BS,'/',$originalimg);
if ($downshare[$resourcesdata['appid']]['iswebsitefile']) {
$originalimg = str_replace(DZZ_ROOT, '', $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path']);
$originalimg = str_replace(BS, '/', $originalimg);
$resourcesdata['originalimg'] = str_replace('+', '%20', urlencode($originalimg));
$resourcesdata['realpath'] =str_replace('+', '%20', urlencode($originalimg));
}else{
$resourcesdata['realpath'] = str_replace('+', '%20', urlencode($originalimg));
} else {
$originalimg = $downshare[$resourcesdata['appid']]['path'] . BS . $resourcesdata['path'];
$resourcesdata['originalimg'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg,'',0,0);
if(in_array($resourcesdata['opentype'],array('text','video','pdf'))){
$resourcesdata['realpath'] = str_replace('+','',urlencode(getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg,'',0,0)));
}else{
$resourcesdata['realpath'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg,'',0,0);
$resourcesdata['originalimg'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg, '', 0, 0);
if (in_array($resourcesdata['opentype'], array('text', 'video', 'pdf'))) {
$resourcesdata['realpath'] = str_replace('+', '', urlencode(getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg, '', 0, 0)));
} else {
$resourcesdata['realpath'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg, '', 0, 0);
}
}
@@ -221,8 +271,8 @@ class table_pichome_resources extends dzz_table
unset($resourcesdata['path']);
$resourcesdata['foldernames'] = C::t('pichome_folderresources')->get_foldername_by_rid($rid);
$resourcesdata['tag'] = C::t('pichome_resourcestag')->fetch_tag_by_rid($rid);
$resourcesdata['dpath'] = dzzencode($rid, '', 0,0);
//print_r($resourcesdata);die;
$resourcesdata['dpath'] = dzzencode($rid, '', 0, 0);
return $resourcesdata;
}
@@ -245,37 +295,48 @@ class table_pichome_resources extends dzz_table
$v['download'] = $downshare[$v['appid']]['download'];
if ($v['hasthumb']) {
//如果是本地文件
if ($v['apptype'] == 1) {
$filename = 'pichomethumb'.BS . $v['appid'] . BS . md5($v['path']) . '.jpg';
if ($downshare[$v['appid']]['type'] == 1) {
$filename = 'pichomethumb' . BS . $v['appid'] . BS . md5($v['path']) . '.jpg';
$thumbpath = getglobal('setting/attachurl') . $filename;
$v['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$v['path'] = str_replace('\\','/',$v['path']);
} elseif ($downshare[$v['appid']]['type'] == 0) {
$v['path'] = str_replace('\\', '/', $v['path']);
$filepath = dirname($v['path']);
$filename = substr($v['path'], strrpos($v['path'], '/') + 1);
$filepath = str_replace('/',BS,$filepath);
$filepath = str_replace('/', BS, $filepath);
$filename = str_replace(strrchr($filename, "."), "", $filename);
$filepath = str_replace('/',BS,$filepath);
$filepath = str_replace('/', BS, $filepath);
if ($downshare[$v['appid']]['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $downshare[$v['appid']]['path']);
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$v['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $downshare[$v['appid']]['path'];
$thumbpath = $tmppath . BS . $filepath .BS . $filename . '_thumbnail.png';
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$v['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath);
}
} else {
$hookdata = ['rid' => $v['rid'], 'apppath' => $downshare[$v['appid']]['path'], 'appid' => $v['appid']];
$return = Hook::listen('getpichomethumb', $hookdata);
$thumbpath = str_replace(DZZ_ROOT, '', $return[0]['icon']);
if ($downshare[$v['appid']]['iswebsitefile']){
$v['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
}else{
$v['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath, '', 0, 0);
}
}
} else {
if ($v['type'] == 'commonimage') {
if ($downshare[$v['appid']]['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $downshare[$v['appid']]['path']);
$v['icondata'] = str_replace('+', '%20', urlencode($tmppath . '/' . $v['path']));
$thumbpath = $tmppath . BS . $v['path'];
$thumbpath = str_replace(BS,'/',$thumbpath);
$v['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $downshare[$v['appid']]['path'] . BS . $v['path'];
$v['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath,'',0,0);
$v['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath, '', 0, 0);
}
} else {
$v['icondata'] = geticonfromext($v['ext'], $v['type']);
@@ -283,60 +344,112 @@ class table_pichome_resources extends dzz_table
$v['height'] = 128;
}
}
$thumbwidth = getglobal('config/pichomethumbwidth') ? getglobal('config/pichomethumbwidth') : 900;
$thumbheight = getglobal('config/pichomethumbheight') ? getglobal('config/pichomethumbheight') : 900;
$thumsizearr = $this->getImageThumbsize($v['width'],$v['height'],$thumbwidth,$thumbheight);
$v['thumbwidth'] = $thumsizearr[0];
$v['thumbheight'] = $thumsizearr[1];
//文件真实地址
if ($downshare[$v['appid']]['iswebsitefile']){
$originalimg= str_replace(DZZ_ROOT,'',$downshare[$v['appid']]['path'] . BS . $v['path']);
$originalimg = str_replace(BS,'/',$originalimg);
$v['realpath'] =str_replace('+', '%20', urlencode($originalimg));
}else{
if ($downshare[$v['appid']]['iswebsitefile']) {
$originalimg = str_replace(DZZ_ROOT, '', $downshare[$v['appid']]['path'] . BS . $v['path']);
$originalimg = str_replace(BS, '/', $originalimg);
$v['realpath'] = str_replace('+', '%20', urlencode($originalimg));
} else {
$originalimg = $downshare[$v['appid']]['path'] . BS . $v['path'];
$v['realpath'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg,'',0,0);
$v['realpath'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($originalimg, '', 0, 0);
}
unset($v['path']);
$returndata[] = $v;
}
return $returndata;
}
public function geticondata_by_rid($rid){
public function getImageThumbsize($owidth,$oheight,$width,$height){
if($owidth>$width || $oheight>$height){
$or=$owidth/$oheight;
$r=$width/$height;
if($r>$or){
if($oheight<$height){
$height=$oheight;
$width=$owidth;
}else{
$width=ceil($height*$or);
if($width < 242){
$width = 242;
$height = ceil($width/$or);
}
}
}else{
if($owidth<$width){
$height=$oheight;
$width=$owidth;
}else{
$height=ceil($width/$or);
$width = ceil($height*$or);
if($width < 242){
$width = 242;
$height = ceil($width/$or);
}
}
}
}else{
$width=$owidth;
$height=$oheight;
}
//Return the results
return array($width,$height);
}
public function geticondata_by_rid($rid)
{
$resourcesdata = DB::fetch_first("select r.rid,r.appid,r.hasthumb,r.ext,r.type,ra.path as fpath,
v.path,r.apptype,v.iswebsitefile from %t r
left join %t ra on r.rid=ra.rid left join %t v on r.appid = v.appid where r.rid = %s and r.isdelete = 0",
array($this->_table,'pichome_resources_attr','pichome_vapp',$rid));
array($this->_table, 'pichome_resources_attr', 'pichome_vapp', $rid));
if ($resourcesdata['hasthumb']) {
//如果是本地文件
if ($resourcesdata['apptype'] == 1) {
$filename = 'pichomethumb'.BS . $resourcesdata['appid'] . BS. md5($resourcesdata['fpath']) . '.jpg';
$filename = 'pichomethumb' . BS . $resourcesdata['appid'] . BS . md5($resourcesdata['fpath']) . '.jpg';
$thumbpath = getglobal('setting/attachurl') . $filename;
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
}
else {
$resourcesdata['fpath'] = str_replace('\\','/',$resourcesdata['fpath']);
} elseif($resourcesdata['apptype'] == 0){
$resourcesdata['fpath'] = str_replace('\\', '/', $resourcesdata['fpath']);
$filepath = dirname($resourcesdata['fpath']);
$filename = substr($resourcesdata['fpath'], strrpos($resourcesdata['fpath'], '/') + 1);
$filename = str_replace(strrchr($filename, "."), "", $filename);
$filepath = str_replace('/',BS,$filepath);
$filepath = str_replace('/', BS, $filepath);
if ($resourcesdata['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $resourcesdata['path']);
$thumbpath = $tmppath . BS . $filepath . BS. $filename . '_thumbnail.png';
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $resourcesdata['path'];
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath,'',0,0);
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath, '', 0, 0);
}
} else {
$hookdata = ['rid' => $resourcesdata['rid'], 'apppath' => $resourcesdata['path'], 'appid' => $resourcesdata['appid']];
$return = Hook::listen('getpichomethumb', $hookdata);
$thumbpath = str_replace(DZZ_ROOT, '', $return[0]['icon']);
if ($resourcesdata['iswebsitefile']){
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
}else{
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath, '', 0, 0);
}
}
} else {
if ($resourcesdata['type'] == 'commonimage') {
if ($resourcesdata['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $resourcesdata['path']);
$thumbpath = $tmppath . BS . $resourcesdata['fpath'];
$thumbpath = str_replace(BS,'/',$thumbpath);
$thumbpath = $tmppath . BS . $resourcesdata['fpath'];
$thumbpath = str_replace(BS, '/', $thumbpath);
$resourcesdata['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $resourcesdata['path'];
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath,'',0,0);
$resourcesdata['icondata'] = getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath, '', 0, 0);
}
} else {
@@ -346,6 +459,7 @@ class table_pichome_resources extends dzz_table
}
return $resourcesdata;
}
public function fetch_like_words($keyword, $limit = 10)
{
$likewords = [];

View File

@@ -55,11 +55,13 @@
{
if(!is_array($rid)) $rid = (array)$rid;
$delids = [];
foreach (DB::fetch_all("select id from %t where rid in(%n)", array($this->_table, $rid)) as $v) {
foreach (DB::fetch_all("select id,tid from %t where rid in(%n)", array($this->_table, $rid)) as $v) {
$delids[] = $v['id'];
C::t('pichome_tag')->delete_by_tid($v['tid']);
}
return parent::delete($delids);
}
public function fetch_rids_by_tids($tids,$appid,$limit=6,$rid=''){
if(!is_array($tids)) $tids = (array) $tids;

View File

@@ -26,4 +26,13 @@
public function fetch_cid_by_gid($gid,$appid){
return DB::result_first("select cid from %t where gid = %d and appid = %s",array($this->_table,$gid,$appid));
}
public function insertdata($setarr){
if($id=DB::result_first("select id from %t where tid = %d and appid = %s",array($this->_table,$setarr['tid'],$setarr['appid']))){
parent::update($id,$setarr);
}else{
parent::insert($setarr);
}
return true;
}
}

View File

@@ -48,12 +48,7 @@
}
public function insert($setarr){
//如果为oaooa库时
if($setarr['type'] == 2){
$setarr['path'] =$setarr['did'].'_'.$setarr['kuid'].'_'.$setarr['fid'];
$path = md5($setarr['path']);
}else{
$path = $setarr['path'];
}
$path = $setarr['path'];
if($appid = DB::result_first("select appid from %t where path = %s and isdelete = 0",array($this->_table,$setarr['path']))){
parent::update($appid,$setarr);
return $appid;
@@ -84,6 +79,7 @@
//删除虚拟应用
public function delete_vapp_by_appid($appid){
$appdata = parent::fetch($appid);
//删除文件表数据
C::t('pichome_resources')->delete_by_appid($appid);
//删除目录表数据
@@ -103,6 +99,9 @@
if(is_dir(getglobal('setting/attachdir').'pichomethumb/'.$appid)){
removedirectory(getglobal('setting/attachdir').'pichomethumb/'.$appid);
}
if($appdata['type'] > 1){
Hook::listen('pichomevappdelete',$appid);
}
return parent::delete($appid);
}

View File

@@ -11,8 +11,8 @@ if(!defined('IN_OAOOA')) {
}
if(!defined('CORE_VERSION')) {
define('CORE_VERSION', 'beta3.0');
define('CORE_VERSION', 'beta3.2');
define('CORE_VERSION_LEVEL', 'Pichome');
define('CORE_RELEASE', '20211208');
define('CORE_FIXBUG' , '03000000');
define('CORE_RELEASE', '20220128');
define('CORE_FIXBUG' , '03200000');
}

View File

@@ -6,9 +6,9 @@
@set_time_limit(0);
$appdata = DB::fetch_all("select * from %t where isdelete = 0 ",array('pichome_vapp'));
foreach($appdata as $v){
if($v['state'] == 1){
if($v['state'] == 2){
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfile&appid='.$v['appid'],0, '', '', false, '', 1);
}elseif($v['state'] == 2){
}elseif($v['state'] == 3){
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfilecheck&appid='.$v['appid'],0, '', '', false, '', 1);
}

View File

@@ -0,0 +1,547 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
@ini_set('max_execution_time', 0);
require_once(DZZ_ROOT . './dzz/class/class_encode.php');
require_once libfile('function/user', '', 'user');
use \core as C;
use \DB as DB;
use \IO as IO;
use \ImagePalette as ImagePalette;
use \Color as Color;
class billfishxport
{
public $palette = array(
0x111111, 0xFFFFFF, 0x9E9E9E, 0xA48057, 0xFC85B3, 0xFF2727, 0xFFA34B, 0xFFD534, 0x47C595, 0x51C4C4, 0x2B76E7, 0x6D50ED
);
private $path = '';//待执行数据path
private $appid = 0;//库id
private $uid = 0;//用户id
private $username = null;//用户名
private $filenum = 0;//总文件数
private $checklimit = 1000;
private $onceexportnum = 100;
private $getinfonum = 0;
private $readtxt = DZZ_ROOT . './data/attachment/cache/';
private $exportstatus = 0;
private $donum = 0;
private $lastid = '';
private $charset = 'UTF-8';
private $allowext = '';
private $notallowext = '';
private $db = null;
public function __construct($data = array())
{
global $Defaultallowext;
//获取导入记录表基本数据
$this->path = $data['path'];
$this->appid = $data['appid'];
$this->uid = $data['uid'];
$this->username = $data['username'];
$this->exportstatus = $data['state'];
$this->donum = $data['donum'];
$this->filenum = $data['filenum'];
$this->lastid = $data['lastid'];
if ($data['charset']) $this->charset = $data['charset'];
//尝试连接数据库
$connect = $this->connect_db();
if (!is_object($connect)) {
return $connect;
} else {
$this->db = $connect;
}
}
public function connect_db()
{
$dsn = 'sqlite:' . $this->path . BS . '.bf' . BS . 'billfish.db';
try {
return new PDO($dsn);
} catch (PDOException $e) {
return array('error' => $e->getMessage());
}
}
public function fetch($sql)
{
$q = $this->db->query($sql);
$rows = $q->fetch(PDO::FETCH_ASSOC);
return $rows;
}
public function fetch_all($sql)
{
$q = $this->db->query($sql);
$rows = $q->fetchAll(PDO::FETCH_ASSOC);
return $rows;
}
public function initExport()
{
//修改导入状态为1
C::t('pichome_vapp')->update($this->appid, array('state' => 1));
//查询res_join_tag是否有文件id索引
$fecthsql = "SELECT * FROM sqlite_master WHERE type = 'index'";
$indexdata = $this->fetch_all($fecthsql);
$indexarr = array_column($indexdata,'name');
//如果标签表iid没有索引创建res_join_tag_iid_idx索引
if(!in_array('res_join_tag_iid',$indexarr)){
$createsql = "CREATE INDEX res_join_tag_iid ON res_join_tag ( iid ASC )";
$this->db->query($createsql);
}
//查询待导入文件数
$sql = "select count(s.id) as num from source s left join res_prop rp on s.id = rp.iid where rp.action =0 ";
$data = $this->fetch($sql);
$this->filenum = $data['num'];
//如果没有数据,视为导入成功
if (!$this->filenum) {
C::t('pichome_vapp')->update($this->appid, array('state' => 4));
} else {
C::t('pichome_vapp')->update($this->appid, array('state' => 2, 'filenum' => $this->filenum));
}
return array('success' => true);
}
//获取文件可访问的真实地址
public function getFileRealFileName($filepath,$filename){
$charsetarr = ['GBK','GB18030'];
$returnname = $filename;
if(!is_file($filepath.BS.$filename)){
foreach ($charsetarr as $v){
$filemetadataname = diconv($filename, CHARSET, $v);
if(is_file($filepath.BS.$filemetadataname)){
$returnname = $filemetadataname;
break;
}
}
}
return $returnname;
}
public function execExport($force = false)
{
//开始页数
if ($this->lastid) {
$start = $this->lastid;
} else $start = 1;
$lastid = $start;
$start = ($start-1)*$this->onceexportnum;
$sql = "select s.*,p.fid,p.score,p.title,p.origin,p.note,p.action from source s
left join res_prop p on p.iid = s.id
where 1 limit $start,$this->onceexportnum";
$datas = $this->fetch_all($sql);
foreach ($datas as $v) {
//查询文件是否在回收站
$id = $v['id'];//文件id
$rid = md5($this->appid . $id);
//如果文件在回收站
if ($v['action'] > 0) {
//如果已经有数据,标记为已删除
if (DB::fetch_first("select count(rid) from %t where rid = %s", array('pichome_resources', $rid))) {
C::t('pichome_resources')->update($rid, array('isdelete' => 1));
}
//文件总数减1
$this->filenum -= 1;
}
else {
//获取文件后缀
$ext = strtolower(substr(strrchr($v['name'], '.'), 1));
//获取文件类型
$type = getTypeByExt($ext);
//出入主表数据
$setarr = [
'rid' => $rid,
'uid'=>$this->uid,
'username'=>$this->username,
'appid' => $this->appid,
'ext' => $ext,
'type' => $type,
'name' => $v['name'],
'mtime' => ($v['born']) ? $v['born'] * 1000 : $v['lastw'] * 1000,
'dateline' => $v['lastw'] * 1000,
'btime' => TIMESTAMP * 1000,
'size' => $v['size'],
'width' => $v['width'],
'height' => $v['height'],
'grade' => $v['score'],
'apptype' => 2,
'hasthumb' => $v['thumb'] ? 1 : 0,
'thumb' => $v['thumb']
];
//数据插入主表
if (C::t('#billfish#billfish_record')->inser_data($v['id'], $setarr)) {
//定义属性表变量
$attrdata = [];
$attrdata['desc'] = $v['note'];
$attrdata['link'] = $v['origin'];
//将名字记入搜索字段
$attrdata['searchval'] = $setarr['name'].$attrdata['desc'].$attrdata['link'];
//处理目录数据
if ($v['fid']) {
$folderdata = $this->getFolderfid($v['fid']);
//处理目录数据
$fid = $folderdata['fid'];
$folderarr = [
'fid' => $fid,
'appid' => $this->appid,
'rid' => $rid
];
C::t('pichome_folderresources')->insert($folderarr);
$attrdata['path'] = $folderdata['dirpath'] . BS . $setarr['name'];
} else {
$attrdata['path'] = $setarr['name'];
}
//目录数据处理完成
$attrdata['path'] = $this->getFileRealFileName($this->path,$attrdata['path']);
//转码路径 记入属性表
//$p = new Encode_Core();
//$this->charset = $p->get_encoding($attrdata['path']);
//if (CHARSET != $this->charset) $attrdata['path'] = diconv($attrdata['path'],CHARSET, $this->charset);;
//标签数据开始
//查询文件标签id
$sql = "select lid from res_join_tag where iid = $id";//耗时最多
$tiddata = $this->fetch_all($sql);
$tids = [];
foreach ($tiddata as $val) {
$tids[] = $val['lid'];
}
if (!empty($tids)) {
$tidstr = dimplode($tids);
//查询标签分类数据
$sql = "select jg.gid,g.name from tag_join_group jg
left join taggrp g on g.id = jg.gid
where jg.lid in($tidstr) group by jg.gid";
$taggroupdata = $this->fetch_all($sql);
$relationgroupdata = [];
//插入标签分类关系表及pichome分类返回原分类id对应pichome标签分类id
foreach ($taggroupdata as $val) {
$tmpreturn = C::t('#billfish#billfish_taggrouprecord')->insert_data($val, $this->appid);
$relationgroupdata[$tmpreturn['bcid']] = $tmpreturn['cid'];
}
//处理标签表数据
//查询标签名称,id 插入标签对照表 返回原标签id对应pichome标签id 将标签加入searchval
$sql = " select t.id,t.name,j.gid from tag t
left join tag_join_group j on j.lid = t.id where t.id in($tidstr)";
$tagdata = $this->fetch_all($sql);
$tagrelativedata = [];
$taggroups =[];
foreach ($tagdata as $val) {
$tagsetarr = ['name' => $val['name'], 'lid' => $val['id']];
$tmptagrelativedata = C::t('#billfish#billfish_tagrecord')->insert_data($tagsetarr, $this->appid);
$tagrelativedata[$tmptagrelativedata['lid']] = $tmptagrelativedata['tid'];
$attrdata['searchval'] .= $val['name'];
if($val['gid']) $taggroups[] = ['gid'=>$val['gid'],'lid'=>$val['id']];
}
//处理标签与分类关系数据 查询原标签分类和标签id 插入pichome标签分类对应标签id
//$sql = "select gid,lid from tag_join_group where lid in($tidstr)";
//$taggroups = $this->fetch_all($sql);
foreach ($taggroups as $val) {
$tagrelarr = [
'tid' => $tagrelativedata[$val['lid']],
'cid' => $relationgroupdata[$val['gid']],
'appid' => $this->appid,
];
C::t('pichome_tagrelation')->insert($tagrelarr);
}
//处理标签文件关系数据
$inserttids = $ftids = array_values($tagrelativedata);
//查询pichome是否有标签数据
$oattrtag = DB::result_first("select tag from %t where rid = %s", array('pichome_resources_attr', $rid));
if ($oattrtag) {
$ottids = explode(',', $oattrtag);
//取得删除的标签
$deltids = array_diff($ftids, $ottids);
if (!empty($deltids)) C::t('pichome_resourcestag')->delete_by_ridtid($rid, $deltids);
//取得插入的标签
$inserttids = $deltids = array_diff($ottids, $ftids);
}
//插入标签关系表
foreach ($inserttids as $val) {
$tagresourcesattr = ['tid' => $val, 'rid' => $rid, 'appid' => $this->appid];
C::t('pichome_resourcestag')->insert($tagresourcesattr);
}
//更新属性表标签数据
$attrdata['tag'] = implode(',', $ftids);
}
//标签数据结束
//开始处理颜色数据
//查询颜色数据
$sql = "select * from colour where iid = $id";
$bcolordata = $this->fetch_all($sql);
//删除原颜色数据
DB::delete('pichome_palette', array('rid' => $rid));
foreach ($bcolordata as $val) {
$colorarr = ['rid' => $rid,
'color' => $val['bf_clr'],
'weight' => $val['precent'],
'r' => $val['r'],
'g' => $val['g'],
'b' => $val['b']
];
C::t('pichome_palette')->insert($colorarr);
}
//颜色数据处理结束
//处理标注数据
$sql = "select * from comment where iid = $id";
$commentdata = $this->fetch_all($sql);
//删除原标注数据
C::t('pichome_comments')->delete_by_rid($rid);
if ($commentdata) {
foreach ($commentdata as $commentval) {
$tcommentval['id'] = random(13) . $this->appid;
$tentval['appid'] = $this->appid;
$tcommentval['rid'] = $rid;
$tcommentval['x'] = number_format($commentval['x'], 2);
$tcommentval['y'] = number_format($commentval['y'], 2);
$tcommentval['width'] = number_format($commentval['cx'], 2);
$tcommentval['height'] = number_format($commentval['cy'], 2);
$tcommentval['annotation'] = $commentval['comment'];
try {
C::t('pichome_comments')->insert($tcommentval);
$setarr['searchval'] .= $tcommentval['annotation'];
} catch (Exception $e) {
}
}
}
//标注数据处理结束
//处理音视频时长数据
//查询音频时长
$sql = "select duration from video where iid = $id";
$videodata = $this->fetch($sql);
if(isset($videodata['duration'])) $attrdata['duration'] = $videodata['duration'];
//查询视频时长
$sql = "select duration from audio where iid = $id";
$audiodata = $this->fetch($sql);
if(isset($audiodata['duration'])) $attrdata['duration'] = $audiodata['duration'];
//时长处理结束
//插入属性表数据
$attrdata['rid'] = $rid;
$attrdata['appid'] = $this->appid;
C::t('pichome_resources_attr')->insert($attrdata);
$this->donum += 1;
}
else{
//文件总数减1
$this->filenum -= 1;
}
}
//导入百分比
$percent = floor(($this->donum / $this->filenum) * 100);
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
$lastid = 0;
}
//记录导入起始位置,以备中断后从此处,更改导入状态
C::t('pichome_vapp')->update($this->appid, array('percent' => $percent, 'donum' => $this->donum, 'state' => $state));
}
$time4= microtime(true);
$lastid = $lastid+1;
C::t('pichome_vapp')->update($this->appid,array('lastid' => $lastid));
return array('success' => true);
}
public function getFolderfid($bfid, $dirpath = '')
{
$parentfolderdata = [];
$sql = "select * from folder where id = $bfid";
$folderdata = $this->fetch($sql);
$dirpath = $folderdata['name'] . ($dirpath ? BS . $dirpath : '');
if ($folderdata['pid']) {
$parentfolderdata = $this->getFolderfid($folderdata['pid'], $dirpath);
}
if($parentfolderdata['dirpath']) $dirpath = $parentfolderdata['dirpath'];
$setarr = [
'pfid' => isset($parentfolderdata['fid']) ? $parentfolderdata['fid'] : '',
'fname' => $folderdata['name'],
'appid' => $this->appid
];
$return = C::t('#billfish#billfish_folderrecord')->insert_data($bfid, $setarr);
$return['dirpath'] = $dirpath;
return $return;
}
//校验文件
public function execCheckFile()
{
if ($this->exportstatus == 3) {
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
//校验文件
$this->check_file($total);
}
return true;
}
public function check_file($total)
{
if ($this->lastid < 1) $this->lastid = 1;
$limitsql = ($this->lastid - 1) * $this->checklimit . ',' . $this->checklimit;
$delrids = [];
$data = DB::fetch_all("select rid,name from %t where appid = %s order by lastdate asc limit $limitsql ", array('pichome_resources', $this->appid));
if (empty($data)) {
//校验完成后更新目录文件数
foreach (DB::fetch_all("select count(rf.id) as num,f.fid from %t f left join %t rf on rf.fid=f.fid where f.appid = %s group by f.fid", array('pichome_folder', 'pichome_folderresources', $this->appid)) as $v) {
C::t('pichome_folder')->update($v['fid'], array('filenum' => $v['num']));
}
//检查不存在的目录删除
$foldertotal = DB::result_first("select count(id) from %t where appid = %s",array('billfish_folderrecord',$this->appid));
$this->check_notexists_folder($foldertotal);
//检查不存在的标签删除
$tagtotal = DB::result_first("select count(id) from %t where appid = %s",array('billfish_tagrecord',$this->appid));
$this->check_notexists_tag($tagtotal);
//删除创建的索引
$sql = 'DROP INDEX res_join_tag_iid';
$this->db->query($sql);
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$this->appid));
$nosubfilenum = $total - $hascatnum;
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 4, 'lastid' => 0, 'donum' => 0,'filenum'=>$total,'nosubfilenum'=>$nosubfilenum));
return true;
}
foreach ($data as $v) {
$rid = $v['rid'];
$iid = DB::result_first("select bid from %t where rid = %s and appid = %s",array('billfish_record',$rid,$this->appid));
//查询billfish中是否有该数据
$sql = "select count(*) as num from source where id = $iid";
$numdata = $this->fetch($sql);
if(!isset($numdata['num']) || !$numdata['num']){
$delrids[] = $rid;
}
}
if (!empty($delrids)) {
$this->filenum = $this->filenum - count($delrids);
//如果有需要删除的,删除后,则重新查询上一页数据
C::t('pichome_resources')->delete_by_rid($delrids);
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 3, 'filenum' => $this->filenum));
} else {
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 3));
}
}
//检查目录数据
public function check_notexists_folder($total){
$tmpkey = 'pichomecheckfolder' . $this->appid;
$folderstart = C::t('cache')->fetch($tmpkey);
if (!$folderstart) {
$folderstart = 0;
}
if($folderstart < $total){
$bfids = [];
//检查不存在的目录删除
foreach(DB::fetch_all("select bfr.bfid as bfid from %t f left join %t bfr on bfr.fid=f.fid where f.appid = %s limit $folderstart,100",array('pichome_folder','billfish_folderrecord',$this->appid)) as $v){
$bfids[] = $v['bfid'];
}
if(empty($bfids)){
C::t('cache')->delete($tmpkey);
return true;
}
$bfidstr = dimplode($bfids);
//查询不存的目录
$sql = "select id from folder where id in($bfidstr)";
$bfolder = $this->fetch_all($sql);
$blfids = [];
foreach ($bfolder as $val){
$blfids[] = $val['id'];
}
$delfids = array_diff($bfids,$blfids);
if(!empty($delfids))C::t('#billfish#billfish_folderrecord')->delete_by_bfid($delfids,$this->appid);
$folderstart += 100;
$setarr = ['cachekey' => $tmpkey, 'cachevalue' => $folderstart, 'dateline' => time()];
C::t('cache')->insert($setarr);
$this->check_notexists_folder($total);
}else{
C::t('cache')->delete($tmpkey);
return true;
}
}
//检查标签对照表数据
public function check_notexists_tag($total){
$tmpkey = 'pichomechecktag'.$this->appid;
$tagstart = C::t('cache')->fetch($tmpkey);
if (!$tagstart) {
$tagstart = 0;
}
if($tagstart < $total){
$lids=[];
foreach(DB::fetch_all("select lid from %t where appid = %s limit $tagstart,100 ",array('billfish_tagrecord',$this->appid)) as $v){
$lids[] = $v['lid'];
}
if(empty($lids)){
C::t('cache')->delete($tmpkey);
return true;
}
$lidstr = dimplode(',',$lids);
$sql = "select id from tag where id in($lidstr)";
$blids =[] ;
foreach($this->fetch_all($sql) as $v){
$blids[] = $v['id'];
}
$deblids = array_diff($lids,$blids);
if(!empty($deblids)) DB::delete('billfish_tagrecord','lid in('.dimplode($deblids).')');
$tagstart += 100;
$setarr = ['cachekey' => $tmpkey, 'cachevalue' => $tagstart, 'dateline' => time()];
C::t('cache')->insert($setarr);
$this->check_notexists_tag($total);
}else{
C::t('cache')->delete($tmpkey);
return true;
}
}
}

View File

@@ -0,0 +1,71 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_billfish_folderrecord extends dzz_table
{
public function __construct() {
$this->_table = 'billfish_folderrecord';
$this->_pk = 'id';
parent::__construct();
}
public function insert_data($bfid,$setarr){
$returndata =[];
if($fid = DB::result_first("select fid from %t where bfid = %d and appid = %s",array($this->_table,$bfid,$setarr['appid']))){
C::t('pichome_folder')->update($fid,$setarr);
$setarr['fid'] = $fid;
return $setarr;
}else{
$fpathkey = '';
if($setarr['pfid']){
$fpathkey =DB::result_first("select pathkey from %t where fid = %s and appid = %s",array('pichome_folder',$setarr['pfid'],$setarr['appid']));
}
$setarr['fid'] = random(13) . $setarr['appid'];
$setarr['pathkey'] = ($fpathkey) ? $fpathkey.$setarr['fid']:$setarr['fid'];
if(C::t('pichome_folder')->insert($setarr)){
$setarr1 = [
'bfid'=>$bfid,
'fid'=>$setarr['fid'],
'appid'=>$setarr['appid']
];
if(parent::insert($setarr1,1)){
return $setarr;
}else{
C::t('pichome_folder')->delete($setarr['fid']);
return $returndata;
}
}
}
}
public function delete_by_bfid($bfids,$appid){
if(!is_array($bfids)) $bfids = (array)$bfids;
$delfid = $delid = [];
foreach(DB::fetch_all("select fid,id from %t where bfid in(%n) and appid = %s",array($this->_table,$bfids,$appid)) as $v){
$delfid[] = $v['fid'];
$delid[] = $v['id'];
}
DB::delete('pichome_folderresources',"fid in (".dimplode($delfid).")");
DB::delete('pichome_folder',"fid in (".dimplode($delfid).")");
parent::delete($delid);
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
}

View File

@@ -0,0 +1,43 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_billfish_record extends dzz_table
{
public function __construct() {
$this->_table = 'billfish_record';
$this->_pk = 'id';
parent::__construct();
}
public function inser_data($bid,$setarr){
$setarr1['thumb'] = $setarr['thumb'];
unset($setarr['thumb']);
if(C::t('pichome_resources')->insert($setarr)){
$setarr1['rid'] = $setarr['rid'];
$setarr1['appid'] = $setarr['appid'];
$setarr1['bid'] = $bid;
$id = DB::result_first("select id from %t where bid = %d and appid = %s",array($this->_table,$bid,$setarr['appid']));
if($id){
parent::update($id,$setarr1);
}else{
parent::insert($setarr1);
}
}
return true;
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
}

View File

@@ -0,0 +1,42 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_billfish_taggrouprecord extends dzz_table
{
public function __construct() {
$this->_table = 'billfish_taggrouprecord';
$this->_pk = 'id';
parent::__construct();
}
public function insert_data($setarr,$appid){
$hasrecord = false;
if($cid = DB::result_first("select cid from %t where bcid=%d and appid = %s",array($this->_table,$setarr['gid'],$appid))){
$data['cid'] = $cid;
$hasrecord = true;
}else{
$data['cid'] = random(13).$appid;
}
$data['catname'] = $setarr['name'];
$data['appid'] = $appid;
$data['dateline'] = TIMESTAMP;
if($cid = C::t('pichome_taggroup')->insert($data)){
if(!$hasrecord) parent::insert(array('cid'=>$cid,'bcid'=>$setarr['gid'],'appid'=>$appid));
return array('bcid'=>$setarr['gid'],'cid'=>$cid);
}
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
}

View File

@@ -0,0 +1,39 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
if(!defined('IN_OAOOA')) {
exit('Access Denied');
}
class table_billfish_tagrecord extends dzz_table
{
public function __construct() {
$this->_table = 'billfish_tagrecord';
$this->_pk = 'id';
parent::__construct();
}
public function insert_data($setarr,$appid){
if($id = DB::result_first("select id from %t where lid=%d and appid = %s",array($this->_table,$setarr['lid'],$appid))){
parent::update($id,array('name'=>$setarr['name']));
}else{
$setarr['appid'] = $appid;
parent::insert($setarr);
}
if($tid= DB::result_first("select tid from %t where tagname = %s",array('pichome_tag',$setarr['name']))){
return array('lid'=>$setarr['lid'],'tid'=>$tid);
}else{
$tid = C::t('pichome_tag')->insert($setarr['name']);
}
return array('tid'=>$tid,'lid'=>$setarr['lid']);
}
public function delete_by_appid($appid){
DB::delete($this->_table,array('appid'=>$appid));
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace dzz\billfish\classes;
use \core as C;
use \DB as DB;
use \fmpeg as fmpeg;
class getpichomethumb
{
public function run(&$data)
{
$thumbid = DB::result_first("select thumb from %t where appid = %s and rid = %s", array('billfish_record', $data['appid'], $data['rid']));
if (strlen($thumbid) < 9) {
$thumbid = str_pad($thumbid,9,0,STR_PAD_LEFT);
}
$pathdir = $data['apppath'].BS.'.bf'.BS.'.preview';
$thumbpatharr = $this->mbStrSplit($thumbid,3);
array_pop($thumbpatharr);
$thumbpath = implode(BS,$thumbpatharr);
return array('icon'=>$pathdir.BS.$thumbpath.BS.$thumbid.'.webp');
}
function mbStrSplit ($string, $len=1) {
$start = 0;
$strlen = mb_strlen($string);
while ($strlen) {
$array[] = mb_substr($string,$start,$len,"utf8");
$string = mb_substr($string, $len, $strlen,"utf8");
$strlen = mb_strlen($string);
}
return $array;
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace dzz\billfish\classes;
use \core as C;
use \DB as DB;
use \fmpeg as fmpeg;
class pichomevappdelete
{
public function run($appid)
{
C::t("#billfish#billfish_record")->delete_by_appid($appid);
C::t("#billfish#billfish_folderrecord")->delete_by_appid($appid);
C::t("#billfish#billfish_tagrecord")->delete_by_appid($appid);
C::t("#billfish#billfish_taggrouprecord")->delete_by_appid($appid);
}
}

View File

@@ -1,118 +1,118 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
define ('UTF32_BIG_ENDIAN_BOM' , chr(0x00) . chr(0x00) . chr(0xFE) . chr(0xFF));
define ('UTF32_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE) . chr(0x00) . chr(0x00));
define ('UTF16_BIG_ENDIAN_BOM' , chr(0xFE) . chr(0xFF));
define ('UTF16_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE));
define ('UTF8_BOM' , chr(0xEF) . chr(0xBB) . chr(0xBF));
class Encode_Core {
/**
* 文件分析方法来检查UNICODE文件ANSI文件没有文件头此处不分析
*/
private function detect_utf_encoding($text) {
$first2 = substr($text, 0, 2);
$first3 = substr($text, 0, 3);
$first4 = substr($text, 0, 3);
if ($first3 == UTF8_BOM) return 'UTF-8';
elseif ($first4 == UTF32_BIG_ENDIAN_BOM) return 'UTF-32BE';
elseif ($first4 == UTF32_LITTLE_ENDIAN_BOM) return 'UTF-32LE';
elseif ($first2 == UTF16_BIG_ENDIAN_BOM) return 'UTF-16BE';
elseif ($first2 == UTF16_LITTLE_ENDIAN_BOM) return 'UTF-16LE';
return '';
}
/**
* 检测是否GB2312编码
* @param string $str
* @since 2012-03-20
* @return boolean
*/
private function is_gb2312($str) {
for($i=0; $i<strlen($str); $i++) {
$v = ord( $str[$i] );
if( $v > 127) {
if( ($v >= 228) && ($v <= 233) ){
if( ($i+2) >= (strlen($str) - 1)) return true; // not enough characters
$v1 = ord( $str[$i+1] );
$v2 = ord( $str[$i+2] );
if( ($v1 >= 128) && ($v1 <=191) && ($v2 >=128) && ($v2 <= 191) )
return false;
else
return true; //GB编码
}
}
}
}
private function is_GBK($str){
$s1 = iconv('gbk','utf-8',$str);
$s0 = iconv('utf-8','gbk',$s1);
if($s0 == $str){
return true;
}else{
return false;
}
}
/**
* 取得编码
* @param string $str
* @return string $encoding
*/
public static function get_encoding($str){
$ary = array();
//$ary[] = "ASCII";
$ary[] = "UTF-8";
$ary[] = "GB18030";//简体码
$ary[] = "BIG-5";//繁体码
$ary[] = "EUC-CN";
$ary[] = "JIS";//日文编码
$ary[] = "EUC-JP";//日文编码
$encoding= self::detect_utf_encoding($str);
if(empty($encoding) && self::is_gb2312($str)) return 'GBK';
if(empty($encoding)){
$encoding=mb_detect_encoding($str,$ary);
}
if($encoding=='ASCII') $encoding='UTF-8';
return $encoding;
}
public function utf16_to_utf8($str) {
$len = strlen($str);
$dec = '';
for ($i = 0; $i < $len; $i += 2) {
$c = ($be) ? ord($str[$i]) << 8 | ord($str[$i + 1]) :
ord($str[$i + 1]) << 8 | ord($str[$i]);
if ($c >= 0x0001 && $c <= 0x007F) {
$dec .= chr($c);
} else if ($c > 0x07FF) {
$dec .= chr(0xE0 | (($c >> 12) & 0x0F));
$dec .= chr(0x80 | (($c >> 6) & 0x3F));
$dec .= chr(0x80 | (($c >> 0) & 0x3F));
} else {
$dec .= chr(0xC0 | (($c >> 6) & 0x1F));
$dec .= chr(0x80 | (($c >> 0) & 0x3F));
}
}
return $dec;
}
}
?>
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
define ('UTF32_BIG_ENDIAN_BOM' , chr(0x00) . chr(0x00) . chr(0xFE) . chr(0xFF));
define ('UTF32_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE) . chr(0x00) . chr(0x00));
define ('UTF16_BIG_ENDIAN_BOM' , chr(0xFE) . chr(0xFF));
define ('UTF16_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE));
define ('UTF8_BOM' , chr(0xEF) . chr(0xBB) . chr(0xBF));
class Encode_Core {
/**
* 文件分析方法来检查UNICODE文件ANSI文件没有文件头此处不分析
*/
private function detect_utf_encoding($text) {
$first2 = substr($text, 0, 2);
$first3 = substr($text, 0, 3);
$first4 = substr($text, 0, 3);
if ($first3 == UTF8_BOM) return 'UTF-8';
elseif ($first4 == UTF32_BIG_ENDIAN_BOM) return 'UTF-32BE';
elseif ($first4 == UTF32_LITTLE_ENDIAN_BOM) return 'UTF-32LE';
elseif ($first2 == UTF16_BIG_ENDIAN_BOM) return 'UTF-16BE';
elseif ($first2 == UTF16_LITTLE_ENDIAN_BOM) return 'UTF-16LE';
return '';
}
/**
* 检测是否GB2312编码
* @param string $str
* @since 2012-03-20
* @return boolean
*/
private function is_gb2312($str) {
for($i=0; $i<strlen($str); $i++) {
$v = ord( $str[$i] );
if( $v > 127) {
if( ($v >= 228) && ($v <= 233) ){
if( ($i+2) >= (strlen($str) - 1)) return true; // not enough characters
$v1 = ord( $str[$i+1] );
$v2 = ord( $str[$i+2] );
if( ($v1 >= 128) && ($v1 <=191) && ($v2 >=128) && ($v2 <= 191) )
return false;
else
return true; //GB编码
}
}
}
}
private function is_GBK($str){
$s1 = iconv('gbk','utf-8',$str);
$s0 = iconv('utf-8','gbk',$s1);
if($s0 == $str){
return true;
}else{
return false;
}
}
/**
* 取得编码
* @param string $str
* @return string $encoding
*/
public static function get_encoding($str){
$ary = array();
//$ary[] = "ASCII";
$ary[] = "UTF-8";
$ary[] = "GB18030";//简体码
$ary[] = "BIG-5";//繁体码
$ary[] = "EUC-CN";
$ary[] = "JIS";//日文编码
$ary[] = "EUC-JP";//日文编码
$encoding= self::detect_utf_encoding($str);
//if(empty($encoding) && self::is_GBK($str)) return 'GBK';
if(empty($encoding)){
$encoding=mb_detect_encoding($str,$ary);
}
if($encoding=='ASCII') $encoding='UTF-8';
return $encoding;
}
public function utf16_to_utf8($str) {
$len = strlen($str);
$dec = '';
for ($i = 0; $i < $len; $i += 2) {
$c = ($be) ? ord($str[$i]) << 8 | ord($str[$i + 1]) :
ord($str[$i + 1]) << 8 | ord($str[$i]);
if ($c >= 0x0001 && $c <= 0x007F) {
$dec .= chr($c);
} else if ($c > 0x07FF) {
$dec .= chr(0xE0 | (($c >> 12) & 0x0F));
$dec .= chr(0x80 | (($c >> 6) & 0x3F));
$dec .= chr(0x80 | (($c >> 0) & 0x3F));
} else {
$dec .= chr(0xC0 | (($c >> 6) & 0x1F));
$dec .= chr(0x80 | (($c >> 0) & 0x3F));
}
}
return $dec;
}
}
?>

View File

@@ -21,12 +21,10 @@ $filename = rtrim( $_GET[ 'n' ], '.dzz' );
$ext = strtolower( substr( strrchr( $filename, '.' ), 1, 10 ) );
if ( !$ext )$ext = strtolower( substr( strrchr( preg_replace( "/\.dzz$/i", '', preg_replace( "/\?.*/i", '', $url ) ), '.' ), 1, 10 ) );
$mime = dzz_mime::get_type( $ext );
if ( is_file( $url ) ) {
$filename = $url;
$start = 0;
$total = filesize( $filename );
header("Cache-Control: private, max-age=2592000, pre-check=2592000");
header("Pragma: private");
header("Expires: ".date(DATE_RFC822,strtotime(" 30 day")));

View File

@@ -62,8 +62,11 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
$vappids = [];
foreach(DB::fetch_all("select appid from %t where isdelete = 0",array('pichome_vapp')) as $v){
$vappids[] = $v['appid'];
foreach(DB::fetch_all("select appid,path from %t where isdelete = 0",array('pichome_vapp')) as $v){
if(is_dir($v['path'])){
$vappids[] = $v['appid'];
}
}
if(empty($vappids)){
$wheresql .= ' and 0';
@@ -823,8 +826,12 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
$vappids = [];
foreach(DB::fetch_all("select appid from %t where isdelete = 0",array('pichome_vapp')) as $v){
$vappids[] = $v['appid'];
$vappids = [];
foreach(DB::fetch_all("select appid,path from %t where isdelete = 0",array('pichome_vapp')) as $v){
if(is_dir($v['path'])){
$vappids[] = $v['appid'];
}
}
if(empty($vappids)){
$wheresql .= ' and 0';
@@ -1230,7 +1237,7 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$wheresql .= " and r.isdelete < 1 ";
$data = array();
if ($skey == 'tag') {
$cid = isset($_GET['cid']) ? $_GET['cid']:'';
/*$cid = isset($_GET['cid']) ? $_GET['cid']:'';
if ($cid) {
if ($cid == -1) {
$sql .= " left join %t tr on isnull(tr.cid)";
@@ -1242,7 +1249,7 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$para[] = $cid;
}
}
}*/
$tagkeyword = isset($_GET['tagkeyword']) ? trim($_GET['tagkeyword']):'';
if ($tagkeyword) {
$sql .= " left join %t t on t.tid=rt.tid ";
@@ -1268,14 +1275,17 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
$sql .= " left join %t g on g.cid = tr.cid ";
$params[] = 'pichome_taggroup';
if (!empty($para)) $params = array_merge($params, $para);
$sum = 0;
foreach (DB::fetch_all("$sql where $wheresql group by g.cid",$params) as $v) {
if($v['cid']){
$catdata[]=['cid'=>$v['cid'],'catname'=>$v['catname'],'num'=>$v['num']];
}else{
$catdata[]=['cid'=>0,'catname'=>'全部','num'=>$v['num']];
$catdata[]=['cid'=>-1,'catname'=>'未分类','num'=>$v['num']];
}
$sum += $v['num'];
}
$catdata[]=['cid'=>0,'catname'=>'全部','num'=>$sum];
}else{
//if (!empty($para)) $params = array_merge($params, $para);
@@ -1487,4 +1497,35 @@ if ($operation == 'addsearch') {//增加关键词搜索次数
C::t('user_setting')->update_by_skey('pichomeimageexpanded',$pichomeimageexpanded);
exit(json_encode(array('success' => true)));
}
}elseif($operation == 'gethostip'){
$iphost = [];
$os = PHP_OS;
if(preg_match('/^WIN(.+?)/i',$os)){
$host= gethostname();
}else{
$host = $_SERVER['SERVER_NAME'];
}
$host = $_SERVER['SERVER_NAME'];
$ip = gethostbyname($host);
$ip = filter_var($ip,FILTER_VALIDATE_IP);
if(!$ip || strpos($ip,'127') === 0){
if(preg_match('/^WIN(.+?)/i',$os)){
$host= gethostname();
}else{
$host = $_SERVER['SERVER_NAME'];
}
$ip = gethostbyname($host);
}
if($_SERVER['SERVER_PORT'] == 443){
$siteurl = 'https://'.$_SERVER['SERVER_NAME'];
} elseif($_SERVER["SERVER_PORT"] == 80) {
$siteurl = 'http://'.$_SERVER['SERVER_NAME'];
}else{
$ip = $ip . ':' . $_SERVER["SERVER_PORT"];
$siteurl = 'http://'.$_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"];
}
$iphost = ['ip'=>$ip,'siteurl'=>$siteurl];
exit(json_encode($iphost));
}

4
dzz/pichome/ceshi.php Normal file
View File

@@ -0,0 +1,4 @@
<?php
$a = C::t('pichome_vapp')->fetch('J62mX1');
print_r($a);die;

View File

@@ -115,6 +115,7 @@ class eagleexport
$readtxt = $this->readtxt . 'eagleexport' . md5($this->path) . '.txt';
$filenum = 0;
if (!is_file($readtxt) || filemtime($readtxt) < filemtime( $this->path . BS.'metadata.json')) {
C::t('pichome_vapp')->update($this->appid, array( 'state' => 1));
if ($dch = opendir($filedir)) {
$thandle = fopen($readtxt, 'w+');
while (($file = readdir($dch)) != false) {
@@ -136,28 +137,43 @@ class eagleexport
return array('error' => 'Read Dir Failer');
}
C::t('pichome_vapp')->update($this->appid, array('filenum' => $this->filenum, 'state' => 1));
C::t('pichome_vapp')->update($this->appid, array('filenum' => $this->filenum, 'state' => 2));
}
C::t('pichome_vapp')->update($this->appid, array('state' => 1));
C::t('pichome_vapp')->update($this->appid, array('state' => 2));
$this->initFoldertag();
return array('success' => true);
}
//获取文件可访问的真实地址
public function getFileRealFileName($filepath,$filename,$ext){
$charsetarr = ['GBK','GB18030'];
$returnname = $filename;
if(!is_file($filepath.BS.$filename.'.'.$ext)){
foreach ($charsetarr as $v){
$filemetadataname = diconv($filename, CHARSET, $v);
if(is_file($filepath.BS.$filemetadataname.'.'.$ext)){
$returnname = $filemetadataname;
break;
}
}
}
return $returnname;
}
public function execExport($force = false)
{
$filedir = $this->path . BS.'images';
$readtxt = $this->readtxt . 'eagleexport' . md5($this->path) . '.txt';
if(filesize($readtxt) == 0){
@unlink($readtxt);
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 2,'filenum'=>$this->filenum));
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 3,'filenum'=>$this->filenum));
return array('success'=>true);
}
if ($this->lastid) {
$start = $this->lastid * 19;
} else $start = 0;
if ($this->lastid < $this->filenum && $this->exportstatus == 1) {
if ($this->lastid < $this->filenum && $this->exportstatus == 2) {
$tfile = fopen($readtxt, 'r');
$i = 0;
fseek($tfile, $start);
@@ -198,9 +214,7 @@ class eagleexport
C::t('pichome_resources')->delete_by_rid($rid);
}
else{
$p = new Encode_Core();
$charset = $p->get_encoding($tmppath);
if (CHARSET != $charset) $filemetadataname = diconv($filemetadata['name'], CHARSET, $charset);
$filemetadataname = $this->getFileRealFileName($tmppath,$filemetadata['name'],$filemetadata['ext']);
//文件名称
$filename = $filemetadataname . '.' . $filemetadata['ext'];
//缩略图名称
@@ -338,10 +352,8 @@ class eagleexport
$haspassword = C::t('pichome_folder')->check_haspasswrod($filemetadata['folders'], $this->appid);
if (!$haspassword){
$p = new Encode_Core();
$charset = $p->get_encoding($tmppath);
if (CHARSET != $charset) $filemetadataname = diconv($filemetadata['name'], CHARSET, $charset);
$filemetadataname = $this->getFileRealFileName($tmppath,$filemetadata['name'],$filemetadata['ext']);
//echo $filemetadataname;die;
$filename = $filemetadataname . '.' . $filemetadata['ext'];
$thumbname = $filemetadataname . '_thumbnail.png';
//echo $i.'middle:'.memory_get_usage()/1024 . '<br>';
@@ -372,8 +384,9 @@ class eagleexport
$this->donum += 1;
$percent = floor(($this->donum / $this->filenum) * 100);
//防止因获取文件总个数不准确百分比溢出
$state = ($percent >= 100) ? 2 : 1;
if ($state == 2) {
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
fclose($tfile);
@unlink($this->readtxt . 'eagleexport' . md5($this->path) . '.txt');
$tfile = false;
@@ -396,7 +409,7 @@ class eagleexport
//校验文件
public function execCheckFile()
{
if ($this->exportstatus == 2) {
if ($this->exportstatus == 3) {
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
//校验文件
$this->check_file($total);
@@ -411,7 +424,7 @@ class eagleexport
$delrids = [];
$data = DB::fetch_all("select rid,isdelete from %t where appid = %s order by lastdate asc limit $limitsql ", array('pichome_resources', $this->appid));
if (empty($data)) {
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 3, 'lastid' => 0, 'donum' => 0));
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 4, 'lastid' => 0, 'donum' => 0));
//校验完成后更新目录文件数
foreach(DB::fetch_all("select count(rf.id) as num,f.fid from %t f left join %t rf on rf.fid=f.fid where f.appid = %s group by f.fid",array('pichome_folder','pichome_folderresources',$this->appid)) as $v){
C::t('pichome_folder')->update($v['fid'],array('filenum'=>$v['num']));
@@ -419,7 +432,9 @@ class eagleexport
}
//修正库中文件数
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
C::t('pichome_vapp')->update($this->appid,array('filenum'=>$total));
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$this->appid));
$nosubfilenum = $total - $hascatnum;
C::t('pichome_vapp')->update($this->appid,array('filenum'=>$total,'nosubfilenum'=>$nosubfilenum));
return true;
}
@@ -439,11 +454,20 @@ class eagleexport
if (!empty($delrids)) {
//如果有需要删除的,删除后,则重新查询上一页数据
C::t('pichome_resources')->delete_by_rid($delrids);
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 2));
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 3));
} else {
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 2));
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 3));
}
}

View File

@@ -91,6 +91,7 @@ class localexport
$filenum = 0;
if (!is_file($readtxt)) {
C::t('pichome_vapp')->update($this->appid, array( 'state' => 1));
$thandle = fopen($readtxt, 'w+');
$fileinfo = $this->readdir($filedir, $thandle, $filenum);
fclose($thandle);
@@ -98,10 +99,10 @@ class localexport
C::t('pichome_vapp')->update($this->appid, array('state' => 0));
return $fileinfo;
} else {
C::t('pichome_vapp')->update($this->appid, array('filenum' => $fileinfo['filenum'], 'state' => 1));
C::t('pichome_vapp')->update($this->appid, array('filenum' => $fileinfo['filenum'], 'state' => 2));
}
}
C::t('pichome_vapp')->update($this->appid, array('state' => 1));
C::t('pichome_vapp')->update($this->appid, array('state' => 2));
return array('success' => true);
}
@@ -148,7 +149,7 @@ class localexport
//如果txt为空直接进入下一步
if(filesize($readtxt) == 0){
@unlink($readtxt);
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 2, 'filenum' => $this->filenum));
C::t('pichome_vapp')->update($this->appid, array('lastid' => 0, 'percent' => 100, 'donum' => 0, 'state' => 3, 'filenum' => $this->filenum));
return array('success' => true);
}
@@ -161,7 +162,7 @@ class localexport
$spl_object = new SplFileObject($readtxt, 'rb');
$spl_object->seek($start);
if ($this->lastid < $this->filenum && $this->exportstatus == 1) {
if ($this->lastid < $this->filenum && $this->exportstatus == 2) {
$i = 0;
while (is_file($readtxt) && !$spl_object->eof()) {
$i++;
@@ -174,36 +175,45 @@ class localexport
$file = trim($file);
$file = str_replace(array('/', './', '\\'), BS, $file);
$filearr = explode("\t", $file);
$filepath = $filearr[0];
$filerelativepath = $filearr[0];
$filepath = str_replace($filedir . BS, '', $filerelativepath);
$p = new Encode_Core();
$this->charset = $p->get_encoding($filepath);
//如果是目录直接执行目录导入
if (isset($filearr[1]) && $filearr[1] == 'folder') {
$filepath = str_replace($filedir . BS, '', $filepath);
if ($this->charset != CHARSET) $filepath = diconv($filepath, $this->charset, CHARSET);
$fid = $this->createfolerbypath($filepath);
$spl_object->next();
continue;
} else {
//生成rid
$rid = md5($filepath.$this->appid);
$hasrid = 0;
if($rid = DB::result_first("select rid from %t where path = %s and appid = %s",
array('pichome_resources_attr',$filepath,$this->appid))){
$hasrid = 1;
}else{
//生成rid
$rid = $this->createRid();
}
$realfilepath = $filedir.BS.$filepath;
//如果文件不存在则删除记录
if (!is_file($filepath)) {
C::t('pichome_resources')->delete_by_rid($rid);
if (!is_file($realfilepath)) {
if($hasrid)C::t('pichome_resources')->delete_by_rid($rid);
$this->filenum -= 1;
} else {
$mtime = filemtime($filepath);
$ctime = filectime($filepath);
//修改时间
$mtime = filemtime($realfilepath);
//创建时间
$ctime = filectime($realfilepath);
//获取文件后缀
$ext = substr(strrchr($filepath, '.'), 1);
$ext = substr(strrchr($realfilepath, '.'), 1);
$ext = strtolower($ext);
//获取文件类型
$type = getTypeByExt($ext);
//获取文件大小
$size = filesize($filepath);
$size = filesize($realfilepath);
//获取图片信息,以取得宽高
$imginfo = @getimagesize($filepath);
$imginfo = @getimagesize($realfilepath);
//保存路径,用于之后获取文件使用
$savepath = str_replace(array('/', './', '\\'), '/', $filearr[0]);
$savepath = str_replace($this->path . '/', '', $savepath);
@@ -302,8 +312,8 @@ class localexport
}
$percent = floor(($this->donum / $this->filenum) * 100);
$percent = ($percent > 100) ? 100 : $percent;
$state = ($percent >= 100) ? 2 : 1;
if ($state == 2) {
$state = ($percent >= 100) ? 3 : 2;
if ($state == 3) {
@unlink($readtxt);
$lastid = 0;
} else {
@@ -320,7 +330,17 @@ class localexport
return array('success' => true);
}
//生成rid
public function createRid(){
//订单年月
$ridmd = strtoupper(dechex(date('m'))) . date('d');
//订单时间戳
$ridms = substr(time(), -5) . substr(microtime(), 2, 5);
//订单号
$rid = md5($ridmd.$ridms. sprintf('%02d', rand(0, 99)).$this->appid);
return $rid;
}
//根据路径创建目录
public function createfolerbypath($path, $pfid = '')
{
@@ -367,7 +387,7 @@ class localexport
//校验文件
public function execCheckFile()
{
if ($this->exportstatus == 2) {
if ($this->exportstatus == 3) {
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
//校验文件
$this->check_file($total);
@@ -382,7 +402,7 @@ class localexport
$delrids = [];
$data = DB::fetch_all("select rid,name from %t where appid = %s order by lastdate asc limit $limitsql ", array('pichome_resources', $this->appid));
if (empty($data)) {
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 3, 'lastid' => 0, 'donum' => 0));
C::t('pichome_vapp')->update($this->appid, array('percent' => 0, 'state' => 4, 'lastid' => 0, 'donum' => 0));
//校验完成后更新目录文件数
foreach (DB::fetch_all("select count(rf.id) as num,f.fid from %t f left join %t rf on rf.fid=f.fid where f.appid = %s group by f.fid", array('pichome_folder', 'pichome_folderresources', $this->appid)) as $v) {
C::t('pichome_folder')->update($v['fid'], array('filenum' => $v['num']));
@@ -394,6 +414,10 @@ class localexport
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=getinfo', 0, '', '', false, '', 1);
dfsockopen(getglobal('localurl') . 'index.php?mod=ffmpeg&op=thumb', 0, '', '', false, '', 1);
}
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$this->appid));
$nosubfilenum = $total - $hascatnum;
C::t('pichome_vapp')->update($this->appid,array('filenum'=>$total,'nosubfilenum'=>$nosubfilenum));
return true;
}
foreach ($data as $v) {
@@ -409,11 +433,21 @@ class localexport
$this->filenum = $this->filenum - count($delrids);
//如果有需要删除的,删除后,则重新查询上一页数据
C::t('pichome_resources')->delete_by_rid($delrids);
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 2, 'filenum' => $this->filenum));
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid, 'percent' => $percent, 'state' => 3, 'filenum' => $this->filenum));
} else {
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 2));
if($this->lastid == 1){
$percent = round(($this->checklimit / $total) * 100);
}else{
$percent = round((($this->lastid - 1) * $this->checklimit / $total) * 100);
}
$percent = ($percent > 100) ? 100:$percent;
C::t('pichome_vapp')->update($this->appid, array('lastid' => $this->lastid + 1, 'percent' => $percent, 'state' => 3));
}
}

View File

@@ -0,0 +1,74 @@
<?php
/*
* @copyright QiaoQiaoShiDai Internet Technology(Shanghai)Co.,Ltd
* @license https://www.oaooa.com/licenses/
*
* @link https://www.oaooa.com
* @author zyx(zyx@oaooa.com)
*/
//此页的调用地址 index.php?mod=test;
//同目录的其他php文件调用 index.php?mod=test&op=test1;
if (!defined('IN_OAOOA')) {//所有的php文件必须加上此句防止被外部调用
exit('Access Denied');
}
$ismobile = helper_browser::ismobile();
$overt = getglobal('setting/overt');
if(!$overt && !$overt = C::t('setting')->fetch('overt')){
Hook::listen('check_login');//检查是否登录,未登录跳转到登录界面
}
//主题
$theme = GetThemeColor();
//库
$apps = [];
foreach(DB::fetch_all("select * from %t where isdelete = 0 order by disp ",array('pichome_vapp')) as $v){
$v['path'] = urlencode($v['path']);
$v['leaf'] = DB::result_first("select count(*) from %t where appid = %s",array('pichome_folder',$v['appid'])) ? false:true;
if(!$v['nosubfilenum']){
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$v['appid']));
$v['nosubfilenum'] = $v['filenum'] - $hascatnum;
C::t('pichome_vapp')->update($v['appid'],array('nosubfilenum'=>$v['nosubfilenum']));
}
$apps[] = $v;
}
$apps = json_encode($apps);
//显示子分类内容
$ImageExpanded = C::t('user_setting')->fetch_by_skey('pichomeimageexpanded',$uid);
//筛选
$screen = C::t('user_setting')->fetch_by_skey('pichomeuserscreen',$uid);
$screen = $screen?intval($screen):0;
$setting = $_G['setting'];
$pagesetting = $setting['pichomepagesetting'] ? $setting['pichomepagesetting'] : [];
//排序方式
$pichomesortfileds = C::t('user_setting')->fetch_by_skey('pichomesortfileds',$_G['uid']);
//显示信息
$pichomeshowfileds = C::t('user_setting')->fetch_by_skey('pichomeshowfileds',$_G['uid']);
//布局类型
$pichomelayout = C::t('user_setting')->fetch_by_skey('pichomelayout',$_G['uid']);
if($pichomesortfileds){
$sortdatarr = unserialize($pichomesortfileds);
$sortfilearr = ['btime'=>1,'mtime'=>2,'dateline'=>3,'name'=>4,'size'=>5,'grade'=>6,'duration'=>7,'whsize'=>8];
$pagesetting['sort'] = $sortfilearr[$sortdatarr['filed']];
$pagesetting['desc'] = $sortdatarr['sort'];
}
if($pichomelayout){
$layout = unserialize($pichomelayout);
$pagesetting['layout'] = $layout['layout'];
}
if($pichomeshowfileds){
$pichomeshowfileds = unserialize($pichomeshowfileds);
$pagesetting['show'] = $pichomeshowfileds['filed'];
$pagesetting['other'] = $pichomeshowfileds['other'];
}
$template = 1;
if($pagesetting['template']){
$template = $pagesetting['template'];
}
$pagesetting = json_encode($pagesetting);
include template('pc/page/collection');

View File

@@ -26,6 +26,29 @@ html,body,#dzzoffice{
padding: 0;
overflow: hidden;
}
.bs-main-container{
height: 100%;
width: 100%;
overflow: hidden;
}
.pic-container{
height: 100%;
width: 100%;
overflow: hidden;
}
.pic-container .pic-container-scroll{
height: 100%;
width: 100%;
overflow: auto;
position: relative;
padding-top: 46px;
}
.pic-container .img-container{
min-height: 100% ;
position: relative;
padding: 0 4px;
}
input::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color : var(--tip-color);
}
@@ -45,10 +68,83 @@ input:-ms-input-placeholder { /* Internet Explorer 10-11 */
input::-ms-input-placeholder { /* Microsoft Edge */
color : var(--tip-color);
}
[v-cloak] {
display: none;
}
.page-popup{
background: var(--bg-content) !important;
}
.van-action-sheet__cancel, .van-action-sheet__item{
background-color: transparent;
}
.van-action-sheet__gap,
.van-action-sheet__cancel:active,
.van-action-sheet__item:active{
background-color: var(--bg-poperHover);
}
.van-action-sheet__cancel{
color: var(--header-text);
}
.custom-image.van-empty{
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
margin: auto;
}
.img-circle{
width: 2.1875rem;
height: 2.1875rem;
border-radius: 50%;
vertical-align: middle;
}
.Topcarousel{
border-radius: 50%;
text-align: center;
display: inline-block;
font-size: 1rem;
width: 2.1875rem;
height: 2.1875rem;
line-height: 2.1875rem;
color: #FFF;
}
#dzzoffice{
position: relative;
background: var(--bg-content);
}
.pic-logo{
height: 40px;
padding: 5px 0;
}
.pic-logo .h-left{
height: 30px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
color: var(--header-text);
text-decoration: none;
}
.pic-logo .h-left img{
max-width: 100%;
max-height: 100%;
margin-right: 10px;
}
.van-nav-bar__title{
color: var(--header-text);
}
.van-nav-bar__content{
/* 46px */
height: 46px;
}
.van-nav-bar .van-icon{
color: var(--content-textHover);
}
.van-nav-bar__content .van-nav-bar__text{
color: var(--header-text);
}
.van-popup.van-notify.van-notify--warning{
background-color: #ff976a;
color: #fff;
@@ -169,7 +265,9 @@ ul{
.van-cell::after{
border-color: var(--border-color-base);
}
.van-cell--clickable:active{
background-color: var(--bg-poperHover);
}
.van-search{
background-color: transparent;
}
@@ -189,6 +287,9 @@ ul{
background-color: transparent;
color: var(--header-text);
}
.van-sidebar-item.van-sidebar-item--disabled{
opacity: 0.7;
}
.van-sidebar-item--select{
color: var(--header-active);
}
@@ -267,4 +368,173 @@ ul{
to {
transform: rotate(359deg)
}
}
.van-cell-group{
background-color: transparent;
}
.about-popup,
.my-popup{
height: 100%;
width: 100%;
background: var(--bg-content);
color: var(--content-textHover);
overflow: hidden;
padding-top: 46px;
}
.about-popup .van-nav-bar,
.my-popup .van-nav-bar{
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.about-popup .scroll-box,
.my-popup .scroll-box{
width: 100%;
height: 100%;
overflow: auto;
padding-top: 0.9375rem;
}
.my-popup .scroll-box .van-cell-group{
background: transparent;
}
.my-popup .scroll-box .van-cell {
background: transparent;
}
.my-popup .scroll-box .van-cell::after{
display: none;
}
.my-popup .scroll-box .van-cell .van-cell__right-icon{
color: var(--header-text);
}
.about-popup .aboutlogo{
text-align: center;
padding-top: 3.125rem;
padding-bottom: 1.875rem;
}
.about-popup .aboutmessage{
padding: 0 2.1875rem;
}
.about-popup .aboutmessage .aboutlist{
margin-bottom: 1.25rem;
overflow: hidden;
font-size: 1rem;
}
.about-popup .aboutmessage .aboutlist .title{
float: left;
}
.about-popup .aboutmessage .aboutlist .address{
color: var(--color-primary);
font-size: 1rem;
vertical-align: sub;
}
@media screen and (min-width: 768px) {
.about-popup .aboutmessage{
padding: 0 6.25rem;
}
}
.pic-toolbar{
position: fixed;
width: 100%;
left: 0;
padding: 0 8%;
transition: all .3s;
transition:all .3s;
-moz-transition:all .3s; /* Firefox 4 */
-webkit-transition:all .3s; /* Safari and Chrome */
-o-transition:all .3s; /* Opera */
z-index: 100;
}
.pic-toolbar.footershow{
bottom: 3%;
opacity: 1;
}
.pic-toolbar.footerhide{
bottom: -2.9375rem;
opacity: 0;
}
.pic-toolbar .tabbar{
display: -webkit-box;
display: -webkit-flex;
display: flex;
border-radius: 39px;
background: var(--bg-poper);
padding: 0.375rem 0;
color: var(--header-text);
/* box-shadow: 0px 0px 5px 1px var(--bg-poperHover); */
}
.pic-toolbar .tab-item{
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
text-align: center;
font-size: 14px;
}
.pic-toolbar .tab-item .icon{
font-size: var(--font-32);
}
.pic-toolbar .tab-item img{
border-radius: 50%;
width: 2.1875rem;
height: 2.1875rem;
vertical-align: bottom;
}
.van-popup{
overflow: unset;
}
.van-popup .vam-popup-title{
height: 40px;
font-weight: 700;
position: absolute;
top: -40px;
left: 0;
width: 100%;
padding: 0 12px;
font-size: 18px;
color: #FFFFFF;
}
.footer-popup{
padding-bottom: 70px;
}
.footer-popup .btn-bottom{
padding: 10px;
height: 70px;
position: absolute;
width: 100%;
bottom: 0;
left: 0;
}
.footer-popup .btn-bottom .van-button{
width: auto;
padding: 15px 20px;
}
.footer-popup .popup-search-input .van-field__right-icon{
padding-right: 0;
}
.footer-popup .popup-search-input .van-field__right-icon .van-icon{
font-size: 1.25rem;
color: var(--header-active);
}
.footer-popup .van-search-box{
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.footer-popup .van-search-box .van-field{
border: 0;
font-size: 0.875rem;
}
.van-notify--success {
background-color: #07c160;
}
.van-notify--danger {
background-color: #ee0a24;
}
.van-notify--warning {
background-color: #ff976a;
}

View File

@@ -1,27 +1,27 @@
[v-cloak] {
display: none;
}
}
#dzzoffice {
position: relative;
background: var(--bg-content);
}
}
.detail-popup {
position: relative;
height: 100%;
padding-top: 46px;
padding-bottom: 60px;
overflow: hidden;
width: 100%;
background: var(--bg-content);
position: relative;
height: 100%;
padding-top: 46px;
padding-bottom: 60px;
overflow: hidden;
width: 100%;
background: var(--bg-content);
color: var(--content-textHover);
}
.detail-popup.full{
padding: 0;
background: #000000;
}
.detail-popup.NotFooter{
padding-bottom: 0;
}
}
.detail-popup.full{
padding: 0;
background: #000000;
}
.detail-popup.NotFooter{
padding-bottom: 0;
}
.header-top {
position: fixed;
top: 0;
@@ -33,256 +33,252 @@
-webkit-transition: all .3s;
-o-transition: all .3s;
background: var(--bg-content);
}
.detail-popup.full .header-top{
display: none;
}
.van-nav-bar .van-nav-bar__title,
.van-nav-bar .van-icon {
color: var(--content-textHover);
}
.detail-popup .detail-popup-translate{
position: relative;
height: 100%;
}
}
.detail-popup.full .header-top{
display: none;
}
.detail-popup .detail-popup-translate{
position: relative;
height: 100%;
}
.detail-popup .detail-popup-content {
position: absolute;
width: 100%;
height: 100%;
color: var(--content-textHover);
}
}
.detail-popup .detail-popup-content.opacity {
opacity: 0;
}
}
.detail-popup .detail-popup-content.prev {
right: 100%;
margin-right: 10px;
}
}
.detail-popup .detail-popup-content.next {
left: 100%;
margin-left: 10px;
}
}
.detail-popup .detail-popup-content .detail-popup-img {
height: 100%;
position: relative;
}
}
.detail-popup .detail-popup-content .video-box{
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
.detail-popup .detail-popup-content .img-box {
height: 100%;
width: 100%;
overflow: hidden;
position: relative;
}
}
.detail-popup .detail-popup-content .image-viewer__img {
position: absolute;
z-index: 10;
transform-origin: 0 0;
margin: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
max-width: 100%;
transform-origin: 0 0;
margin: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
max-width: 100%;
max-height: 100%;
}
}
.detail-popup .detail-popup-content .image-viewer__img {
-webkit-user-drag: none;
-moz-user-drag: none;
-ms-user-drag: none;
user-drag: none;
}
.pinch-zoom-container{
width: 100% !important;
height: 100% !important;
}
.detail-popup .detail-popup-content .image-viewer__img.opacity{
opacity: 0;
}
.detail-popup .detail-popup-content .image-viewer__img.thumbnail{
z-index: 5;
}
.detail-popup .footer-tabbar{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
line-height: 60px;
text-align: center;
font-size: 1.75rem;
/* border-top: 1px solid var(--border-color-base); */
display: -webkit-box;
display: -webkit-flex;
display: flex;
z-index: 10000;
background: var(--bg-content);
}
.detail-popup.full .footer-tabbar{
display: none;
}
-webkit-user-drag: none;
-moz-user-drag: none;
-ms-user-drag: none;
user-drag: none;
}
.pinch-zoom-container{
width: 100% !important;
height: 100% !important;
}
.detail-popup .detail-popup-content .image-viewer__img.opacity{
opacity: 0;
}
.detail-popup .detail-popup-content .image-viewer__img.thumbnail{
z-index: 5;
}
.detail-popup .footer-tabbar{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
line-height: 60px;
text-align: center;
font-size: 1.75rem;
/* border-top: 1px solid var(--border-color-base); */
display: -webkit-box;
display: -webkit-flex;
display: flex;
z-index: 10000;
background: var(--bg-content);
}
.detail-popup.full .footer-tabbar{
display: none;
}
.detail-popup .footer-tabbar .footer-tabbar-item {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
}
.detail-popup-message{
width: 100%;
height: 100%;
position: absolute;
background: transparent;
color: var(--content-textHover);
padding-bottom: 60px;
}
.detail-popup-message.noPadding{
padding-bottom: 0;
}
.detail-popup-message .DetailPopup-content{
padding: 0 1rem;
height: 100%;
overflow: auto;
}
.detail-popup-message .name{
}
.detail-popup-message{
width: 100%;
height: 100%;
position: absolute;
background: transparent;
color: var(--content-textHover);
padding-bottom: 60px;
}
.detail-popup-message.noPadding{
padding-bottom: 0;
}
.detail-popup-message .DetailPopup-content{
padding: 0 1rem;
height: 100%;
overflow: auto;
}
.detail-popup-message .name{
font-weight: 700;
padding: 16px 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.detail-popup-message .block{
margin-bottom: 1rem;
}
text-overflow: ellipsis;
}
.detail-popup-message .block{
margin-bottom: 1rem;
}
.detail-popup-message .block .title{
font-weight: 700;
margin-bottom: 0.625rem;
}
.detail-popup-message .block .block-item.colors{
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.detail-popup-message .block .block-item.colors{
display: -webkit-box;
display: -webkit-flex;
display: flex;
margin-left: -0.1875rem;
}
.detail-popup-message .block .block-item.colors .colors{
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
padding-left: 0.1875rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
}
.detail-popup-message .block .block-item.colors .colors{
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
padding-left: 0.1875rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
position: relative;
border-radius: 0.5rem;
border-radius: 0.5rem;
border: 1px solid var(--border-color-base);
}
@media screen and (max-width: 768px) {
.detail-popup-message .name{
font-size: 1.125rem;
}
.detail-popup-message .block .title{
font-size: 1rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
height: 1.5625rem;
}
.detail-popup-message .block .block-item.tag .tag{
font-size: 0.875rem;
padding:0 0.5rem;
}
@media screen and (max-width: 768px) {
.detail-popup-message .name{
font-size: 1.125rem;
}
.detail-popup-message .block .title{
font-size: 1rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
height: 1.5625rem;
}
.detail-popup-message .block .block-item.tag .tag{
font-size: 0.875rem;
padding:0 0.5rem;
height: 1.875rem;
line-height: 1.875rem;
}
.detail-popup-message .block .block-item.link{
font-size: 0.875rem;
height: 1.25rem;
line-height: 1.25rem;
}
.detail-popup-message .block .block-item.link i{
font-size: 1.125rem;
}
.detail-popup-message .block .block-item .basic{
font-size: 0.875rem;
}
}
@media screen and (min-width: 768px) {
.detail-popup-message .name{
font-size:1.25rem;
}
.detail-popup-message .block .title{
font-size: 1.125rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
height: 1.875rem;
line-height: 1.875rem;
}
.detail-popup-message .block .block-item.link{
font-size: 0.875rem;
height: 1.25rem;
line-height: 1.25rem;
}
.detail-popup-message .block .block-item.link i{
font-size: 1.125rem;
}
.detail-popup-message .block .block-item .basic{
font-size: 0.875rem;
}
}
@media screen and (min-width: 768px) {
.detail-popup-message .name{
font-size:1.25rem;
}
.detail-popup-message .block .title{
font-size: 1.125rem;
}
.detail-popup-message .block .block-item.colors .colors>div{
height: 1.875rem;
}
.detail-popup-message .block .block-item.tag .tag{
font-size: 1rem;
padding:0 0.625rem;
height: 2.5rem;
line-height:2.5rem;
}
.detail-popup-message .block .block-item.link{
font-size: 1rem;
height: 1.875rem;
line-height:1.875rem;
}
.detail-popup-message .block .block-item.link i{
font-size: 1.75rem;
}
.detail-popup-message .block .block-item .basic{
font-size: 1rem;
}
}
.detail-popup-message .block .block-item.tag{
overflow: hidden;
margin-left: -0.625rem;
}
.detail-popup-message .block .block-item.tag .tag{
}
.detail-popup-message .block .block-item.tag .tag{
font-size: 1rem;
padding:0 0.625rem;
height: 2.5rem;
line-height:2.5rem;
}
.detail-popup-message .block .block-item.link{
font-size: 1rem;
height: 1.875rem;
line-height:1.875rem;
}
.detail-popup-message .block .block-item.link i{
font-size: 1.75rem;
}
.detail-popup-message .block .block-item .basic{
font-size: 1rem;
}
}
.detail-popup-message .block .block-item.tag{
overflow: hidden;
margin-left: -0.625rem;
}
.detail-popup-message .block .block-item.tag .tag{
float: left;
min-width: 2.8125rem;
text-align: center;
border: 1px solid var(--border-color-base);
border-radius: 0.5rem;
margin-left: 0.625rem;
color: var(--content-text);
margin-bottom: 0.3125rem;
}
.detail-popup-message .block .block-item.link{
margin-left: 0.625rem;
color: var(--content-text);
margin-bottom: 0.3125rem;
}
.detail-popup-message .block .block-item.link{
color: var(--content-text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
position: relative;
padding-right: 1.5625rem;
}
.detail-popup-message .block .block-item.link i{
}
.detail-popup-message .block .block-item.link i{
position: absolute;
right: 0;
top: 0;
}
.detail-popup-message .block .block-item .basic{
color: var(--content-text);
margin-bottom: 0.625rem;
}
.detail-popup-message .block .block-item .basic .record{
text-align: right;
}
.detail-popup-message .block .block-item .basic .record .star{
color: var(--stars);
}
.detail-popup-message .block .block-item .basic .record .star.active{
color: var(--starsActive);
}
.detail-popup-message .block .block-item .basic{
color: var(--content-text);
margin-bottom: 0.625rem;
}
.detail-popup-message .block .block-item .basic .record{
text-align: right;
}
.detail-popup-message .block .block-item .basic .record .star{
color: var(--stars);
}
.detail-popup-message .block .block-item .basic .record .star.active{
color: var(--starsActive);
}

View File

@@ -0,0 +1,342 @@
#imgContainer .imgitem .imgchecked{
z-index: 5;
position: absolute;
left: 5%;
top: 3%;
}
#imgContainer .imgitem .imgchecked .van-checkbox__icon{
height: 25px;
}
#imgContainer .imgitem .imgchecked .van-checkbox__icon .van-icon{
font-size: 20px;
background-color: #FFFFFF;
}
#imgContainer .imgitem .imgchecked .van-checkbox__icon.van-checkbox__icon--checked .van-icon{
background-color: var(--color-primary);
}
#imgContainer .imgitem .imgbox .bottom-img-message{
text-align: center;
color: var(--content-text);
overflow: hidden;
max-height: 65px;
padding: 0 6px;
}
#imgContainer .imgitem .imgbox .bottom-img-message .name {
max-height: 45px;
display: -webkit-box;
display: -webkit-flex;
display: flex;
overflow: hidden;
justify-content: flex-end;
}
#imgContainer .imgitem .imgbox .bottom-img-message .name .text{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
font-size: 0.875rem;
width: 100%;
height: 35px;
margin-top: 10px;
word-wrap: break-word;
}
#imgContainer .imgitem .imgbox .bottom-img-message .name .circulars{
color: var(--content-text);
font-size: 16px;
min-width: 45px;
height: 35px;
text-align: center;
line-height: 35px;
}
#imgContainer .imgitem .imgbox .bottom-img-message .other {
font-size: 0.75rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
height: 21px;
padding-top: 5px;
color: var(--content-textMessage);
}
#imgContainer .imgitem .imgbox .bottom-img-message .other .score{
color: var(--stars);
}
#imgContainer .imgitem .imgbox .bottom-img-message .other .score.active{
color: var(--starsActive);
}
#imgContainer .imgitem .imgbox .annotation{
position: absolute;
right: 5px;
top: 5px;
font-size: 14px;
width: 22px;
height: 22px;
border: 2px solid #FFFFFF;
border-radius: 50%;
color: #FFFFFF;
text-align: center;
line-height: 20px;
background: var(--color-primary);
}
#imgContainer{
position: relative;
margin: 0 auto;
}
#imgContainer .imgitem{
position: absolute;
/* transition:all .2s; */
}
#imgContainer .imgitem .imgbox {
padding-left: 4px;
padding-right: 4px;
}
#imgContainer .imgitem .imgbox .imgbox-border {
position: relative;
overflow: hidden;
cursor: zoom-in;
/* min-height: 120px; */
height: 100%;
}
#imgContainer .imgitem .imgbox .imgbox-border.radius{
border-radius: 18px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black {
width: 100%;
height: 100%;
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .bck{
width: 100%;
height: 100%;
display: none;
background: var(--bg-poper);
top: 0;
left: 0;
position: absolute;
opacity: 0.7;
}
#imgContainer .imgitem .imgbox .imgbox-border .img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
border-radius: 18px;
}
#imgContainer .imgitem .imgbox .imgbox-border .img.opacity{
opacity: 0;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box{
display: none;
position: absolute;
z-index: 2;
width: 45px;
height: 45px;
border-radius: 50%;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box .circular-item{
width: 45px;
height: 45px;
border-radius: 50%;
color: #333;
z-index: 100;
font-size: 21px;
text-align: center;
line-height: 45px;
background: #ffffff;
position: absolute;
transition: top .3s ease-in-out,left .3s ease-in-out;
/* transition: all .3s ease-in-out; */
top: -22.5px;
left: -22.5px;
transform-origin: 0px;
/* transition-delay: 0.02s; */
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .bck{
display: block;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .img{
position: absolute;
z-index: 2;
max-width: inherit;
max-height: inherit;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box{
display: block;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .round{
position: absolute;
width: 45px;
height: 45px;
border-radius: 50%;
background: transparent;
left: 0px;
top: 0px;
border: 3px solid var(--bg-poper);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .circular-item-box{
position: absolute;
left: -67.5px;
top: -67.5px;
border: 90px solid transparent;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.first{
top: -22.5px;
left: -22.5px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.two{
top: 0px;
left: -80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.three{
top: -22.5px;
left: -138.5px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .circular-item-box .icon{
display: block;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.first{
transform: rotate(0deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.two{
transform: rotate(45deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.two .icon{
transform: rotate(-45deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.three{
transform: rotate(90deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.three .icon{
transform: rotate(-90deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.first{
top: -80.5px;
left: 1px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.two{
top: -22.5px;
left: -22.5px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.three{
top: 0px;
left: -80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.first{
transform: rotate(-45deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.first .icon{
transform: rotate(45deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.two{
transform: rotate(0deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.two .icon{
transform: rotate(0deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.three{
transform: rotate(45deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.three .icon{
transform: rotate(-45deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.first{
top: 0px;
left: -80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.two{
top: -22.5px;
left: -136.5px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.three{
left: -160px;
top: -80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.first{
transform: rotate(45deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.first .icon{
transform: rotate(-45deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.two{
transform: rotate(90deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.two .icon{
transform: rotate(-90deg);
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.three{
transform: rotate(135deg);
top: -80px;
left: -80px;
transform-origin: 80px 80px;
}
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.three .icon{
transform: rotate(-135deg);
}
@media screen and (min-width: 768px) {
.#imgContainer .imgitem {
width: 33.3333%;
}
}
@media screen and (min-width: 992px) {
.#imgContainer .imgitem {
width: 25%;
}
}
@media screen and (min-width: 1024px) {
.#imgContainer .imgitem {
width: 20%;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,289 @@
.notScreen{
width: 100%;
height: 100%;
position: relative;
}
.notScreen>div{
height: 80px;
text-align: center;
margin: auto;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
font-size: var(--font-14);
color: var(--header-text);
}
.notScreen>div img{
width: 3.125rem;
height: 3.125rem;
}
.sort-popup .van-popup__close-icon--top-right,
.screen-popup .van-popup__close-icon--top-right {
top: 10px;
right: 10px;
}
/* .sort-popup .van-tree-select{
height: calc(100% - 41px) !important;
height: -moz-calc(100% - 41px) !important;
height: -webkit-calc(100% - 41px) !important;
} */
.screen-popup .van-tree-select{
}
.screen-popup .van-tree-select .van-sidebar{
width: 6rem;
-webkit-box-flex: initial;
-webkit-flex: initial;
flex: initial;
}
.sort-popup .van-tree-select__content,
.screen-popup .van-tree-select__content{
height: 100%;
overflow: hidden;
position: relative;
background-color: transparent;
}
.van-popup .van-tree-select__content .screen-item-box{
height: 100%;
width: 100%;
position: relative;
overflow: hidden;
padding-top: 56px;
}
.van-popup .van-tree-select__content .screen-item .screen-item-option-box{
padding: 0px 8px;
}
.van-popup .van-tree-select__content .screen-item .screen-item-option-box .screen-item-option{
padding: 10px 16px;
margin-bottom: 8px;
border-radius: 8px;
}
.van-popup .van-tree-select__content .screen-item .screen-item-option-box .screen-item-option.active{
background: var(--bg-poperHover);
}
.screen-popup .van-tree-select__content .screen-item{
height: 100%;
overflow: auto;
padding: 0px 10px;
}
.screen-popup .van-tree-select__content .screen-item .swip-row{
border: 1px solid var(--border-color-base);
border-radius: 18px;
overflow: hidden;
}
.screen-popup .van-tree-select__content .screen-item .swip-row .swip{
height: 30px;
line-height: 30px;
text-align: center;
background-color: var(--bg-input);
color: var(--header-text);
}
.screen-popup .van-tree-select__content .screen-item .swip-row .swip.active{
background: var(--color-primary);
color: #FFFFFF;
}
.van-popup .van-tree-select__content .screen-item .van-cell-group .van-cell.van-cell-tag{
margin-bottom: 6px;
border-radius: 999px;
}
.van-popup .van-tree-select__content .screen-item .van-cell-group .van-cell.van-cell-tag.active{
background-color: var(--bg-poperHover);
}
.sort-popup .van-tree-select__content .screen-item .van-cell-group,
.screen-popup .van-tree-select__content .screen-item .van-cell-group{
background-color: transparent;
}
.sort-popup .van-tree-select__content .screen-item .van-cell-group .van-cell,
.screen-popup .van-tree-select__content .screen-item .van-cell-group .van-cell{
background-color: transparent;
}
.van-calendar__day--end, .van-calendar__day--multiple-middle, .van-calendar__day--multiple-selected, .van-calendar__day--start, .van-calendar__day--start-end{
background-color: var(--color-primary);
}
.screen-popup .van-hairline--top-bottom::after, .screen-popup .van-hairline-unset--top-bottom::after {
border-width: 0;
}
.sort-popup .van-hairline--top-bottom::after, .sort-popup .van-hairline-unset--top-bottom::after {
border-width: 0;
}
.screen-popup .van-tree-select__content .screen-item .color-box .quick{
overflow: hidden;
/* margin-left: -10px; */
}
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list-box{
width: 20%;
margin-bottom: 0.1875rem;
padding: 0 0.1875rem;
display: inline-block;
}
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list{
/* float: left;
height: calc(20% / 2);
width: 20%;
height: 2.5rem;
width: 2.5rem;
z-index: 1;
border-radius: 50%;
margin-bottom: 0.625rem;
margin-left: 0.625rem;
border: 1px solid transparent;
position: relative; */
height: 0;
padding: 25% 0;
position: relative;
border-radius: 8px;
}
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
position: absolute;
color: #FFFFFF;
margin: auto;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
@media screen and (max-width: 768px) {
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
font-size: 18px;
width: 18px;
height: 18px;
}
}
@media screen and (min-width: 768px) {
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
font-size: 30px;
width: 30px;
height: 30px;
}
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input{
position: relative;
margin-bottom: 0.9375rem;
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field{
/* padding: 0; */
/* height: 35px; */
padding-left: 35px;
/* height: 35px; */
border-radius: 8px;
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .color-show{
position: absolute;
width: 18px;
height: 18px;
z-index: 1;
border-radius: 6px;
margin-top: auto;
margin-bottom: auto;
top: 0;
bottom: 0;
left: 8px;
border: 1px solid transparent;
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .color-show.border{
border: 1px solid var(--border-color-base);
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field .van-field__button{
padding-left: 8px;
line-height: 35px;
padding-right: 8px;
border-left: 1px solid var(--border-color-base);
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field .van-field__button img{
vertical-align: sub;
width: 16px;
height: 16px;
}
.screen-popup .van-tree-select__content .screen-item .color-box .color-slider{
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
padding: 15px 0;
}
.screen-popup .van-calendar__popup .van-button--danger{
background-color: var(--color-primary);
border-color: var(--color-primary);
}
.screen-popup .van-calendar__popup .van-calendar__month-mark{
opacity: 0.5;
}
.screen-popup .van-tree-select__content .van-tabs{
height: 100%;
}
.screen-popup .van-tree-select__content .van-tabs--line .van-tabs__wrap{
/* border-bottom: 1px solid var(--slider-line); */
padding-right: 8px;
padding-left: 8px;
}
.screen-popup .van-tree-select__content .van-tabs .van-tabs__content{
height: calc(100% - 44px);
height: -moz-calc(100% - 44px);
height: -webkit-calc(100% - 44px);
}
.screen-popup .van-tree-select__content .van-tabs .van-tabs__content .van-tab__pane{
height: 100%;
padding-top: 10px;
overflow: hidden;
}
.screen-popup .van-tree-select__content .van-tabs__nav{
background-color: transparent;
}
.screen-popup .van-tree-select__content .van-tabs__nav .van-tab{
color: var(--header-text);
}
.screen-popup .van-tree-select__content .van-tabs__nav .van-tab.van-tab--active{
color: var(--header-active);
}
.screen-popup .van-tree-select__content .van-cell .num{
margin-right: 6px;
}
.sort-popup .van-tree-select__content .van-cell::after,
.screen-popup .van-tree-select__content .van-cell::after{
display: none;
}
.screen-popup .screen-classify-collapse .van-cell{
background-color: transparent;
margin-bottom: 6px;
}
.screen-popup .screen-classify-collapse .van-collapse-item.active>.van-cell{
background-color: var(--bg-poperHover);
border-radius: 999px;
}
.screen-popup .screen-classify-collapse .van-hairline--top-bottom::after,
.screen-popup .screen-classify-collapse .van-collapse-item--border::after{
display: none;
}
.screen-popup .screen-classify-collapse .van-collapse-item__content{
background-color: transparent;
padding: 0;
padding-left: 1rem;
}
.screen-popup .screen-classify-collapse .van-cell__value{
flex: none;
}
.van-calendar__day--middle{
color: var(--header-active);
}
.van-calendar__day--start{
border-radius: 16px 0 0 16px;
}
.van-calendar__day--end{
border-radius: 0 16px 16px 0;
}
.screen-cell-input{
margin-bottom: 16px;
border-radius: 8px;
}
.screen-cell-input::after{
display: none;
}
.screen-cell-input .van-field{
border-radius: 8px;
}

View File

@@ -0,0 +1,108 @@
.collection-dialog{
padding: 0;
}
.collection-dialog-content{
width: 360px;
height: 460px;
}
.collection-dialog-content .header{
padding: 12px;
padding-bottom: 0;
}
.collection-dialog-content .content{
padding: 12px 0;
height: 358px;
}
.collection-dialog-content .content .el-tree-node__content{
height: 64px;
padding-right: 8px;
border-radius: 3px;
}
.collection-dialog-content .content .el-tree-node__content .el-tree-node__expand-icon{
font-size: 16px;
}
.collection-dialog-content .content .custom-tree-node{
width: 100%;
position: relative;
padding-left: 55px;
height: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.collection-dialog-content .content .custom-tree-node .img{
width: 40px;
height: 40px;
border-radius: 3px;
overflow: hidden;
margin-top: auto;
margin-bottom: auto;
position: absolute;
left: 0;
top: 0;
bottom: 0;
}
.collection-dialog-content .content .custom-tree-node .img img{
object-fit: cover;
width: 100%;
height: 100%;
}
.collection-dialog-content .content .custom-tree-node .name{
width: 100%;
padding-right: 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 700;
font-size: 14px;
}
.collection-dialog-content .content .custom-tree-node .btn{
display: none;
}
.collection-dialog-content .content .custom-tree-node:hover .btn{
display: block;
}
.collection-dialog-content .content .custom-tree-node .avatar{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.collection-dialog-content .content .custom-tree-node .avatar>li{
margin-left: -8px;
}
.collection-dialog-content .content .custom-tree-node .avatar>li:first-child{
margin-left: 0;
}
.collection-dialog-content .content .custom-tree-node .avatar .img-circle{
width: 24px;
height: 24px;
vertical-align: text-top;
border: 1px solid var(--border-color-base);
}
.collection-dialog-content .content .custom-tree-node:hover .avatar{
display: none;
}
.collection-dialog-content .footer{
height: 50px;
line-height: 50px;
font-size: 18px;
border-top: 1px solid var(--border-color-base);
text-align: center;
cursor: pointer;
}
.collection-dialog-content .footer:hover{
background-color: var(--bg-poperHover);
}
.collection-dialog-content .footer i{
font-size: 23px;
margin-right: 8px;
color: var(--starsActive);
vertical-align: text-bottom;
}

View File

@@ -0,0 +1,92 @@
#imagelayout .collection-box{
padding: 0 16px;
}
#imagelayout .collection-box .jurisdiction-box{
text-align: center;
padding-bottom: 16px;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul{
display: inline-block;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item{
display: inline-block;
margin-left: -16px;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item:first-child{
margin: 0;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item .Topcarousel{
width: 48px;
height: 48px;
border: 1px solid var(--border-color-base);
line-height: 48px;
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item .add{
width: 48px;
height: 48px;
border: 1px solid var(--border-color-base);
line-height: 48px;
text-align: center;
border-radius: 50%;
background: var(--bg-poper);
cursor: pointer;
font-size: 20px;
font-weight: 700;
color: var(--header-text);
}
#imagelayout .collection-box .jurisdiction-box .jurisdiction-ul .jurisdiction-item .add:hover{
background: var(--bg-poperHover);
}
#imagelayout .collection-box .file-box .file-message{
overflow: hidden;
padding-bottom: 16px;
color: var(--content-text);
font-size: 16px;
}
#imagelayout .collection-box .file-box .file-message .left{
float: left;
padding: 8px 0;
}
#imagelayout .collection-box .file-box .file-message .right{
float: right;
cursor: pointer;
border-radius: 3px;
padding: 8px;
}
#imagelayout .collection-box .file-box .file-message .right:hover{
color: var(--header-active);
background: var(--bg-poperHover);
}
#imagelayout .collection-box .file-box .file-list{
margin-left: -16px;
padding-bottom: 16px;
}
#imagelayout .collection-box .file-box .file-list .item{
margin-left: 16px;
width: 320px;
display: inline-block;
border-radius: 3px;
margin-bottom: 16px;
overflow: hidden;
}
#imagelayout .collection-box .file-box .file-list .item .img{
overflow: hidden;
}
#imagelayout .collection-box .file-box .file-list .item .block{
width: 107px;
height: 141px;
border-left: 1px solid var(--border-color-base);
float: left;
background: var(--bg-poper);
}
#imagelayout .collection-box .file-box .file-list .item .block:first-child{
width: 106px;
border: 0;
}
#imagelayout .collection-box .file-box .file-list .item .text{
font-size: 18px;
color: var(--content-text);
line-height: 27px;
padding: 8px;
}

View File

@@ -1,3 +1,6 @@
/* color-primary
color-text-placeholder
border-color-base */
*{
padding: 0;
margin: 0;
@@ -28,6 +31,26 @@ body,
body{
background-color: var(--bg-content);
}
.el-page-header__left{
z-index: 100;
color: var(--header-text);
margin-right: 6px;
}
.el-page-header__left:hover{
color: var(--header-active);
}
.el-page-header__left .el-icon-back{
font-size: 21px;
font-weight: 700;
}
.el-page-header__left .el-page-header__title{
font-size: 16px;
font-weight: 700;
white-space: nowrap;
}
.el-page-header__left::after{
display: none;
}
.tipTxt{
color: var(--tip-color);
font-size: 12px;
@@ -117,6 +140,9 @@ body{
.el-progress-bar__outer{
background-color: var(--bg-input);
}
.el-dropdown-menu{
min-width: 165px;
}
.el-dropdown-menu__item--divided{
border-color: var(--border-color-base);
}
@@ -299,9 +325,15 @@ body{
height: 100%;
flex: 1;
}
.page-component__scroll>.el-scrollbar__wrap {
.el-scrollbar__wrap {
overflow-x: hidden;
}
#copyInput{
opacity: 0;
position: fixed;
bottom: 0;
left: 0;
}
.Topcarousel{
border-radius: 50%;
text-align: center;
@@ -311,17 +343,27 @@ body{
height: 100%;
color: #FFF;
}
#copyInput{
opacity: 0;
position: fixed;
bottom: 0;
left: 0;
}
.img-circle{
border-radius: 50%;
width: 100%;
height: 100%;
}
.img-circle,.Topcarousel{
width: 40px;
height: 40px;
line-height: 40px;
}
.small .img-circle,.small .Topcarousel{
width: 35px;
height: 35px;
line-height: 35px;
}
.mini .img-circle,.mini .Topcarousel{
width: 24px;
height: 24px;
line-height: 24px;
}
.hide{
display: none !important;
}
@@ -411,7 +453,7 @@ ul{
justify-content: left;
background: var(--bg-header);
margin-left: -20px;
min-width: 150px;
}
#top_header .header-content .h-left>a{
width: 100%;
@@ -419,6 +461,7 @@ ul{
padding-left: 41px;
text-decoration: none;
}
.container2 #top_header .header-content .h-left>a{
width: calc(100% - 45px);
}

View File

@@ -0,0 +1,33 @@
.addcollection-dialog .el-checkbox{
width: 100%;
overflow: hidden;
height: 50px;
margin: 0;
display: block;
}
.addcollection-dialog .el-checkbox .el-checkbox__input{
float: right;
line-height: 50px;
}
.addcollection-dialog .el-checkbox .el-checkbox__label{
float: left;
line-height: 50px;
padding-left: 0;
}
.addcollection-dialog .el-checkbox .el-checkbox__label .img-circle{
width: 32px;
height: 32px;
margin-top: 9px;
vertical-align: top;
margin-right: 6px;
}
.addcollection-dialog .el-checkbox .el-checkbox__label .Topcarousel{
width: 32px;
height: 32px;
margin-top: 9px;
margin-right: 6px;
color: #FFFFFF;
text-align: center;
line-height: 32px;
font-size: 14px;
}

View File

@@ -0,0 +1,132 @@
.collection-dialog{
padding: 0;
}
.collection-dialog .el-dialog__body{
padding: 0;
}
.collection-dialog.el-dialog .collection-dialog-content{
width: 100%;
}
.collection-dialog-content{
width: 360px;
height: 460px;
}
.collection-dialog-content .header{
padding: 12px;
padding-bottom: 0;
}
.collection-dialog-content .content{
padding: 12px 0;
height: 358px;
position: relative;
}
.collection-dialog-content .content.notadd{
height: 408px;
}
.collection-dialog-content .content .el-tree-node__content{
height: 64px;
padding-right: 8px;
border-radius: 3px;
}
.collection-dialog-content .content .el-tree-node__content .el-tree-node__expand-icon{
font-size: 16px;
}
.collection-dialog-content .content .custom-tree-node{
width: 100%;
position: relative;
padding-left: 55px;
height: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.collection-dialog-content .content .custom-tree-node.notpadding{
padding-left: 0px;
}
.collection-dialog-content .content .custom-tree-node .img{
width: 40px;
height: 40px;
border-radius: 3px;
overflow: hidden;
margin-top: auto;
margin-bottom: auto;
position: absolute;
left: 0;
top: 0;
bottom: 0;
background: var(--content-imgbg);
}
.collection-dialog-content .content .custom-tree-node .img img{
object-fit: cover;
width: 100%;
height: 100%;
}
.collection-dialog-content .content .custom-tree-node .name{
width: 100%;
padding-right: 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 700;
font-size: 14px;
}
.collection-dialog-content .content .custom-tree-node .btn{
display: none;
}
.collection-dialog-content .content .custom-tree-node:hover .btn{
display: block;
}
.collection-dialog-content .content .custom-tree-node .avatar{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.collection-dialog-content .content .custom-tree-node .avatar>li{
margin-left: -8px;
}
.collection-dialog-content .content .custom-tree-node .avatar>li:first-child{
margin-left: 0;
}
.collection-dialog-content .content .custom-tree-node .avatar .img-circle{
width: 24px;
height: 24px;
vertical-align: text-top;
border: 1px solid var(--border-color-base);
}
.collection-dialog-content .content .custom-tree-node .avatar .Topcarousel{
width: 24px;
height: 24px;
border: 1px solid var(--border-color-base);
text-align: center;
line-height: 24px;
color: #FFFFFF;
font-size: 14px;
}
.collection-dialog-content .content .custom-tree-node:hover .avatar{
display: none;
}
.collection-dialog-content .footer{
height: 50px;
line-height: 50px;
font-size: 18px;
border-top: 1px solid var(--border-color-base);
text-align: center;
cursor: pointer;
color: var(--header-text);
}
.collection-dialog-content .footer:hover{
background-color: var(--bg-poperHover);
color: var(--header-active);
}
.collection-dialog-content .footer i{
font-size: 23px;
margin-right: 8px;
color: var(--starsActive);
vertical-align: text-bottom;
}

View File

@@ -1,3 +1,11 @@
#Details_Iframe{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1000;
}
#container_scroll .el-loading-mask{
background: var(--bg-content);
z-index: 20;
@@ -21,6 +29,11 @@
width: 100%;
height: 100%;
}
#container_scroll .container-not.center{
display: flex;
justify-content: center;
align-items: center;
}
.image-container{
min-height: 100%;
position: relative;
@@ -34,12 +47,21 @@
position: absolute;
}
.image-container .image-wrapper .image-item .image-inside{
padding: 0 4px;
padding: 0 4px;
position: relative;
}
.image-container .image-wrapper .image-item .image-inside .image-single{
cursor: pointer;
position: relative;
background: var(--bg-content);
background: var(--bg-content);
border: 1px solid transparent;
}
.image-container .image-wrapper .image-item.checked .image-inside .image-single{
border: 1px solid var(--border-color-base);
border-radius: 18px;
}
.container2 .image-container .image-wrapper .image-item.checked .image-inside .image-single{
border-radius: 3px;
}
.image-container .image-wrapper .image-item .image-inside .image-single.radius{
border-radius: 18px;
@@ -99,7 +121,7 @@
height: 100%;
opacity: 0;
overflow: hidden;
z-index: 5;
z-index: 1;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl.show{
opacity: 1;
@@ -108,14 +130,54 @@
.image-container .image-wrapper .image-item .image-inside .message{
text-align: center;
}
.image-container .image-wrapper .image-item .image-inside .image-single .topFlex{
.image-container .image-wrapper .image-item .image-inside .el-button-group{
position: absolute;
left: 8px;
z-index: 10;
left: 12px;
top: 8px;
display: none;
}
.image-container .image-wrapper .image-item .image-inside:hover .el-button-group{
display: block;
}
.image-container .image-wrapper .image-item .image-inside .el-button-group .reference{
margin-right: -1px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
float: left;
border-left: 0;
border-top-left-radius: 18px;
border-bottom-left-radius: 18px;
}
.container2 .image-container .image-wrapper .image-item .image-inside .el-button-group .reference{
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.container2 .image-container .image-wrapper .image-item .image-inside .el-button-group.border .reference{
border-radius: 3px;
border-color: #f56c6c;
}
.image-container .image-wrapper .image-item .image-inside .el-button-group .el-dropdown__caret-button{
height: 36px;
padding: 0px 3px;
border-top-right-radius: 18px;
border-bottom-right-radius: 18px;
width: 30px;
}
.container2 .image-container .image-wrapper .image-item .image-inside .el-button-group .el-dropdown__caret-button{
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.image-container .image-wrapper .image-item .image-inside .topFlex{
position: absolute;
right: 8px;
top: 8px;
overflow: hidden;
z-index: 10;
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars{
.image-container .image-wrapper .image-item .image-inside .circulars{
background-color: var(--content-imgbg-btn);
color: var(--content-imgbg-txt);
border-radius: 50%;
@@ -130,17 +192,17 @@
display: none;
z-index: 10;
}
.image-container .image-wrapper .image-item .image-inside .image-single.showoperation .circulars{
.image-container .image-wrapper .image-item .image-inside:hover .circulars{
display: block;
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars:first-child{
.image-container .image-wrapper .image-item .image-inside .circulars:first-child{
margin-left: 0;
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars:hover{
.image-container .image-wrapper .image-item .image-inside .circulars:hover{
color: var(--content-imgbg-txtHover);
background-color: var(--content-imgbg-btnHover);
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars.link{
.image-container .image-wrapper .image-item .image-inside .circulars.link{
position: absolute;
bottom: 8px;
left: 8px;
@@ -148,22 +210,22 @@
width: auto;
border-radius: 8px;
padding: 0 5px;
z-index: 10;
z-index: 2;
margin-left: 0;
}
.image-container .image-wrapper .image-item .image-inside .image-single .circulars.link .el-link--inner{
.image-container .image-wrapper .image-item .image-inside .circulars.link .el-link--inner{
font-size: 14px;
vertical-align: top;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl .movies-box{
.image-container .image-wrapper .image-item .image-inside .image-playurl .movies-box{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 4;
z-index: 2;
background: var(--content-imgbg);
cursor: auto;
}
@@ -177,14 +239,17 @@
bottom: 0;
margin-top: auto;
margin-bottom: auto;
z-index: 4;
z-index: 2;
height: 100%;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl .movies-box .voice{
position: absolute;
position: absolute;
right: 46px;
top: 7px;
z-index: 2;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl.exhibit .movies-box .voice{
right: 8px;
top: 8px;
z-index: 10;
}
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl .movies-box .voice.yes .no,
.image-container .image-wrapper .image-item .image-inside .image-single .image-playurl .movies-box .voice.no .yes{
@@ -277,4 +342,55 @@
}
.image-container .image-wrapper .image-item .image-inside .message .other .score.active{
color: var(--starsActive);
}
.image-container .image-wrapper .image-item .collect-checkeds{
position: absolute;
width: 100%;
height: 100%;
z-index: 20;
display: none;
cursor: pointer;
/* border: 2px solid var(--border-color-base); */
}
.image-container .image-wrapper .image-item.checked .collect-checkeds{
display: block;
}
.image-container .image-wrapper .image-item .collect-checkeds .check{
position: absolute;
left: 12px;
top: 8px;
border-radius: 8px;
background: #000;
width: 24px;
height: 24px;
font-size: 16px;
font-weight: 700;
text-align: center;
line-height: 24px;
color: #FFFFFF;
}
#imagelayout .collects-move-btn-box{
position: fixed;
bottom: 30px;
left: 0;
z-index: 100;
width: 100%;
text-align: center;
}
#imagelayout .collects-move-btn-box .item{
width: 58px;
height: 58px;
text-align: center;
line-height: 58px;
font-size: 22px;
background: var(--header-textHover);
border-radius: 50%;
color: var(--header-text);
display: inline-block;
box-shadow: rgb(0,0,0,0.1) 0px 0px 20px;
cursor: pointer;
}
#imagelayout .collects-move-btn-box .item:hover{
background: var(--header-textHover);
color: var(--header-iconHover);
}

View File

@@ -51,6 +51,14 @@
text-overflow: ellipsis;
min-width: 80px;
}
.left-tree .el-tree-node__content .custom-tree-node .num{
color: var(--content-textMessage);
font-size: 14px;
}
.left-tree .el-tree-node__content .tree-node-color.custom-tree-node .name,
.left-tree .el-tree-node__content .tree-node-color.custom-tree-node .num{
color: var(--leftTreeColor);
}
.el-aside .classify-search{
position: absolute;
left: 0;
@@ -78,9 +86,6 @@
height: 100%;
width: 100%;
}
#container_scroll .el-scrollbar__wrap{
overflow-x: hidden;
}
#container_scroll .el-scrollbar__wrap .el-scrollbar__view{
min-height: 100%;
width: 100%;
@@ -91,14 +96,6 @@
#container_scroll .el-scrollbar__bar.is-vertical{
z-index: 10;
}
#Details_Iframe{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 1000;
}
.container2 .el-header{
padding: 0;
z-index: 10;

View File

@@ -1,42 +1,44 @@
:root{
--bg-header:#262626;/* 头部颜色 */
--header-text:#D4D4D4;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B4B4B8;/* 头部icon */
--header-iconHover:#C8C8CC;/* 头部icon选中 */
--header-textHover:#353535;/* 头部块hover的背景色 */
--header-screenDel:#C9405A;/* 头部清除筛选的 × 背景色 */
--bg-content:#1E1E1E;/* 内容背景色 */
--content-text:#BCBCBC;/* 内容文字颜色 */
--content-textHover:#F4F4F4;/* 内容文字hover颜色 */
--content-imgbg:#161616;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#8F8F8F;/* 图片文字信息 */
--td-striped:#252525;/* td斑纹颜色 */
--bg-input:#292929;/* 输入框背景色 */
--bg-inputfocus:#292929;/* 输入框focus背景色 */
--bg-poper:#353535;/* 浮层背景色 */
--bg-poperHover:#4A4A4A;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#141414;/* 组要边框颜色 */
--tip-color:#8A8A8A;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#404040;/* 滑块颜色 */
--radio-line:#686868;/* radio边框颜色 */
--tagbg:#2B2B2B;/* 标签左侧颜色 */
--stars:#3A3A3A;/* 评分颜色 */
--starsActive:#DDAB1E;/* 选中评分颜色 */
:root{
--bg-header:#262626;/* 头部颜色 */
--header-text:#D4D4D4;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B4B4B8;/* 头部icon */
--header-iconHover:#C8C8CC;/* 头部icon选中 */
--header-textHover:#353535;/* 头部块hover的背景色 */
--header-screenDel:#C9405A;/* 头部清除筛选的 × 背景色 */
--bg-content:#1E1E1E;/* 内容背景色 */
--bg-contentopacity:rgb(30,30,30,0.6);/* 内容背景色透明 */
--content-text:#BCBCBC;/* 内容文字颜色 */
--content-textHover:#F4F4F4;/* 内容文字hover颜色 */
--content-imgbg:#161616;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#8F8F8F;/* 图片文字信息 */
--td-striped:#252525;/* td斑纹颜色 */
--bg-input:#292929;/* 输入框背景色 */
--bg-inputfocus:#292929;/* 输入框focus背景色 */
--bg-poper:#353535;/* 浮层背景色 */
--bg-poperHover:#4A4A4A;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#141414;/* 组要边框颜色 */
--tip-color:#8A8A8A;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#404040;/* 滑块颜色 */
--radio-line:#686868;/* radio边框颜色 */
--tagbg:#2B2B2B;/* 标签左侧颜色 */
--stars:#3A3A3A;/* 评分颜色 */
--starsActive:#DDAB1E;/* 选中评分颜色 */
--leftTreeColor:#D7BA6E;
}

View File

@@ -1,42 +1,44 @@
:root{
--bg-header:#404040;/* 头部颜色 */
--header-text:#D9D9D9;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B9B9BD;/* 头部icon */
--header-iconHover:#CBCBCF;/* 头部icon选中 */
--header-textHover:#424242;/* 头部块hover的背景色 */
--header-screenDel:#C33A54;/* 头部清除筛选的 × 背景色 */
--bg-content:#383838;/* 内容背景色 */
--content-text:#C4C4C4;/* 内容文字颜色 */
--content-textHover:#F6F6F6;/* 内容文字hover颜色 */
--content-imgbg:#303030;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9C9C9C;/* 图片文字信息 */
--td-striped:#3E3E3E;/* td斑纹颜色 */
--bg-input:#2D2D2D;/* 输入框背景色 */
--bg-inputfocus:#2D2D2D;/* 输入框focus背景色 */
--bg-poper:#4C4C4C;/* 浮层背景色 */
--bg-poperHover:#5E5E5E;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#222222;/* 组要边框颜色 */
--tip-color:#8C8C8C;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#565656;/* 滑块颜色 */
--radio-line:#797979;/* radio边框颜色 */
--tagbg:#454545;/* 标签左侧颜色 */
--stars:#515151;/* 选中评分颜色 */
--starsActive:#E1AF22;/* 评分颜色 */
}
:root{
--bg-header:#404040;/* 头部颜色 */
--header-text:#D9D9D9;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B9B9BD;/* 头部icon */
--header-iconHover:#CBCBCF;/* 头部icon选中 */
--header-textHover:#424242;/* 头部块hover的背景色 */
--header-screenDel:#C33A54;/* 头部清除筛选的 × 背景色 */
--bg-content:#383838;/* 内容背景色 */
--bg-contentopacity:rgb(56,56,56,0.6);/* 内容背景色透明 */
--content-text:#C4C4C4;/* 内容文字颜色 */
--content-textHover:#F6F6F6;/* 内容文字hover颜色 */
--content-imgbg:#303030;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9C9C9C;/* 图片文字信息 */
--td-striped:#3E3E3E;/* td斑纹颜色 */
--bg-input:#2D2D2D;/* 输入框背景色 */
--bg-inputfocus:#2D2D2D;/* 输入框focus背景色 */
--bg-poper:#4C4C4C;/* 浮层背景色 */
--bg-poperHover:#5E5E5E;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#222222;/* 组要边框颜色 */
--tip-color:#8C8C8C;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#565656;/* 滑块颜色 */
--radio-line:#797979;/* radio边框颜色 */
--tagbg:#454545;/* 标签左侧颜色 */
--stars:#515151;/* 选中评分颜色 */
--starsActive:#E1AF22;/* 评分颜色 */
--leftTreeColor:#FFE9A4;
}

View File

@@ -1,42 +1,44 @@
:root{
--bg-header:#DCDEDF;/* 头部颜色 */
--header-text:#191D1E;/* 头部文字 */
--header-active:#121516;/* 头部文字选中色 */
--header-icon:#3B3C3C;/* 头部icon */
--header-iconHover:#393A3A;/* 头部icon选中 */
--header-textHover:#D8DADC;/* 头部块hover的背景色 */
--header-screenDel:#F66E88;/* 头部清除筛选的 × 背景色 */
--bg-content:#E2E4E5;/* 内容背景色 */
--content-text:#26292A;/* 内容文字颜色 */
--content-textHover:#121516;/* 内容文字hover颜色 */
--content-imgbg:#FFFFFF;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#535558;/* 图片文字信息 */
--td-striped:#EDEEEF;/* td斑纹颜色 */
--bg-input:#EBEDEE;/* 输入框背景色 */
--bg-inputfocus:#FFFFFF;/* 输入框focus背景色 */
--bg-poper:#DCDEDF;/* 浮层背景色 */
--bg-poperHover:#CBCDD0;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#C6C8C9;/* 组要边框颜色 */
--tip-color:#7E8182;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#C3C5C7;/* 滑块颜色 */
--radio-line:#ACAFB0;/* radio边框颜色 */
--tagbg:#F7F7F7;/* 标签左侧颜色 */
--stars:#BEC0C2;/* 评分颜色 */
--starsActive:#FD9B00;/* 选中评分颜色 */
:root{
--bg-header:#DCDEDF;/* 头部颜色 */
--header-text:#191D1E;/* 头部文字 */
--header-active:#121516;/* 头部文字选中色 */
--header-icon:#3B3C3C;/* 头部icon */
--header-iconHover:#393A3A;/* 头部icon选中 */
--header-textHover:#D8DADC;/* 头部块hover的背景色 */
--header-screenDel:#F66E88;/* 头部清除筛选的 × 背景色 */
--bg-content:#E2E4E5;/* 内容背景色 */
--bg-contentopacity:rgb(226,228,229,0.6);/* 内容背景色透明 */
--content-text:#26292A;/* 内容文字颜色 */
--content-textHover:#121516;/* 内容文字hover颜色 */
--content-imgbg:#FFFFFF;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#535558;/* 图片文字信息 */
--td-striped:#EDEEEF;/* td斑纹颜色 */
--bg-input:#EBEDEE;/* 输入框背景色 */
--bg-inputfocus:#FFFFFF;/* 输入框focus背景色 */
--bg-poper:#DCDEDF;/* 浮层背景色 */
--bg-poperHover:#CBCDD0;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#C6C8C9;/* 组要边框颜色 */
--tip-color:#7E8182;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#C3C5C7;/* 滑块颜色 */
--radio-line:#ACAFB0;/* radio边框颜色 */
--tagbg:#F7F7F7;/* 标签左侧颜色 */
--stars:#BEC0C2;/* 评分颜色 */
--starsActive:#FD9B00;/* 选中评分颜色 */
--leftTreeColor:#37567C;
}

View File

@@ -1,42 +1,43 @@
:root{
--bg-header:#363A4B;/* 头部颜色 */
--header-text:#D7D8DB;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B8B8BF;/* 头部icon */
--header-iconHover:#CDCDD3;/* 头部icon选中 */
--header-textHover:#454855;/* 头部块hover的背景色 */
--header-screenDel:#CD4562;/* 头部清除筛选的 × 背景色 */
--bg-content:#303342;/* 内容背景色 */
--content-text:#C1C2C7;/* 内容文字颜色 */
--content-textHover:#F2F2F3;/* 内容文字hover颜色 */
--content-imgbg:#2A2C39;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9899A1;/* 图片文字信息 */
--td-striped:#363948;/* td斑纹颜色 */
--bg-input:#262935;/* 输入框背景色 */
--bg-inputfocus:#262935;/* 输入框focus背景色 */
--bg-poper:#454855;/* 浮层背景色 */
--bg-poperHover:#585B66;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#1D1F28;/* 组要边框颜色 */
--tip-color:#888A90;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#4F515E;/* 滑块颜色 */
--radio-line:#747680;/* radio边框颜色 */
--tagbg:#3B3E51;/* 标签左侧颜色 */
--stars:#4A4D5A;/* 评分颜色 */
--starsActive:#DFAE23;/* 选中评分颜色 */
:root{
--bg-header:#363A4B;/* 头部颜色 */
--header-text:#D7D8DB;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B8B8BF;/* 头部icon */
--header-iconHover:#CDCDD3;/* 头部icon选中 */
--header-textHover:#454855;/* 头部块hover的背景色 */
--header-screenDel:#CD4562;/* 头部清除筛选的 × 背景色 */
--bg-content:#303342;/* 内容背景色 */
--bg-contentopacity:rgb(48,51,66,0.6);/* 内容背景色透明 */
--content-text:#C1C2C7;/* 内容文字颜色 */
--content-textHover:#F2F2F3;/* 内容文字hover颜色 */
--content-imgbg:#2A2C39;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9899A1;/* 图片文字信息 */
--td-striped:#363948;/* td斑纹颜色 */
--bg-input:#262935;/* 输入框背景色 */
--bg-inputfocus:#262935;/* 输入框focus背景色 */
--bg-poper:#454855;/* 浮层背景色 */
--bg-poperHover:#585B66;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#1D1F28;/* 组要边框颜色 */
--tip-color:#888A90;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#4F515E;/* 滑块颜色 */
--radio-line:#747680;/* radio边框颜色 */
--tagbg:#3B3E51;/* 标签左侧颜色 */
--stars:#4A4D5A;/* 评分颜色 */
--starsActive:#DFAE23;/* 选中评分颜色 */
--leftTreeColor:#93D7F8;
}

View File

@@ -1,43 +1,44 @@
:root{
--bg-header:#3B384A;/* 头部颜色 */
--header-text:#D8D7DB;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B8B8BF;/* 头部icon */
--header-iconHover:#CACAD0;/* 头部icon选中 */
--header-textHover:#494654;/* 头部块hover的背景色 */
--header-screenDel:#CE4462;/* 头部清除筛选的 × 背景色 */
--bg-content:#343141;/* 内容背景色 */
--content-text:#C2C2C6;/* 内容文字颜色 */
--content-textHover:#FFFFFF;/* 内容文字hover颜色 */
--content-imgbg:#2D2A38;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9A98A0;/* 图片文字信息 */
--td-striped:#3A3747;/* td斑纹颜色 */
--bg-input:#2A2734;/* 输入框背景色 */
--bg-inputfocus:#2A2734;/* 输入框focus背景色 */
--bg-poper:#494654;/* 浮层背景色 */
--bg-poperHover:#5C5965;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#1F1D27;/* 组要边框颜色 */
--tip-color:#8A8890;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#52505D;/* 滑块颜色 */
--radio-line:#77747F;/* radio边框颜色 */
--tagbg:#403C50;/* 标签左侧颜色 */
--stars:#4D4B59;/* 评分颜色 */
--starsActive:#E0AD23;/* 选中评分颜色 */
:root{
--bg-header:#3B384A;/* 头部颜色 */
--header-text:#D8D7DB;/* 头部文字 */
--header-active:#FFFFFF;/* 头部文字选中色 */
--header-icon:#B8B8BF;/* 头部icon */
--header-iconHover:#CACAD0;/* 头部icon选中 */
--header-textHover:#494654;/* 头部块hover的背景色 */
--header-screenDel:#CE4462;/* 头部清除筛选的 × 背景色 */
--bg-content:#343141;/* 内容背景色 */
--bg-contentopacity:rgb(52,49,65,0.6);/* 内容背景色透明 */
--content-text:#C2C2C6;/* 内容文字颜色 */
--content-textHover:#FFFFFF;/* 内容文字hover颜色 */
--content-imgbg:#2D2A38;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#9A98A0;/* 图片文字信息 */
--td-striped:#3A3747;/* td斑纹颜色 */
--bg-input:#2A2734;/* 输入框背景色 */
--bg-inputfocus:#2A2734;/* 输入框focus背景色 */
--bg-poper:#494654;/* 浮层背景色 */
--bg-poperHover:#5C5965;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#1F1D27;/* 组要边框颜色 */
--tip-color:#8A8890;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#52505D;/* 滑块颜色 */
--radio-line:#77747F;/* radio边框颜色 */
--tagbg:#403C50;/* 标签左侧颜色 */
--stars:#4D4B59;/* 评分颜色 */
--starsActive:#E0AD23;/* 选中评分颜色 */
--leftTreeColor:#D2A6FF;
}

View File

@@ -1,44 +1,45 @@
:root{
--bg-header:#F1F1F1;/* 头部颜色 */
--header-text:#1E1E1E;/* 头部文字 */
--header-active:#111111;/* 头部文字选中色 */
--header-icon:#404040;/* 头部icon */
--header-iconHover:#272727;/* 头部icon选中 */
--header-textHover:#DCDCDC;/* 头部块hover的背景色 */
--header-screenDel:#F46B85;/* 头部清除筛选的 × 背景色 */
--bg-content:#F8F8F8;/* 内容背景色 */
--content-text:#272727;/* 内容文字颜色 */
--content-textHover:#111111;/* 内容文字hover颜色 */
--content-imgbg:#FFFFFF;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#58595C;/* 图片文字信息 */
--td-striped:#FFFFFF;/* td斑纹颜色 */
--bg-input:#FFFFFF;/* 输入框背景色 */
--bg-inputfocus:#FFFFFF;/* 输入框focus背景色 */
--bg-poper:#FFFFFF;/* 浮层背景色 */
--bg-poperHover:#DCDCDC;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#D7D7D7;/* 组要边框颜色 */
--tip-color:#888888;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#D4D4D4;/* 滑块颜色 */
--radio-line:#BEBEBE;/* radio边框颜色 */
--tagbg:#F7F7F7;/* 标签左侧颜色 */
--stars:#CFD0D1;/* 评分颜色 */
--starsActive:#FD9B00;/* 选中评分颜色 */
:root{
--bg-header:#F1F1F1;/* 头部颜色 */
--header-text:#1E1E1E;/* 头部文字 */
--header-active:#111111;/* 头部文字选中色 */
--header-icon:#404040;/* 头部icon */
--header-iconHover:#272727;/* 头部icon选中 */
--header-textHover:#DCDCDC;/* 头部块hover的背景色 */
--header-screenDel:#F46B85;/* 头部清除筛选的 × 背景色 */
--bg-content:#F8F8F8;/* 内容背景色 */
--bg-contentopacity:rgb(248,248,248,0.6);/* 内容背景色透明 */
--content-text:#272727;/* 内容文字颜色 */
--content-textHover:#111111;/* 内容文字hover颜色 */
--content-imgbg:#FFFFFF;/* 图片背景色 */
--content-imgbg-btn:rgb(0,0,0,.3);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txt:#F5F5F5;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnHover:rgb(0,0,0,.5);/* 图片上的操作按钮背景颜色 */
--content-imgbg-txtHover:#F2F2F2;/* 图片上的操作按钮文字颜色 */
--content-imgbg-btnTime:rgb(0,0,0,.6);/* 图片上的操作时间背景颜色 */
--content-textMessage:#58595C;/* 图片文字信息 */
--td-striped:#FFFFFF;/* td斑纹颜色 */
--bg-input:#FFFFFF;/* 输入框背景色 */
--bg-inputfocus:#FFFFFF;/* 输入框focus背景色 */
--bg-poper:#FFFFFF;/* 浮层背景色 */
--bg-poperHover:#DCDCDC;/* hover背景色 */
--color-primary:#0072EF;/* 选中颜色 */
--border-color-base:#D7D7D7;/* 组要边框颜色 */
--tip-color:#888888;/* 提示文字颜色 */
--bg-tooltip:#303030;/* title显示背景色 */
--music-line:#9B9B9B;/* 音乐滑动线的颜色 */
--slider-line:#D4D4D4;/* 滑块颜色 */
--radio-line:#BEBEBE;/* radio边框颜色 */
--tagbg:#F7F7F7;/* 标签左侧颜色 */
--stars:#CFD0D1;/* 评分颜色 */
--starsActive:#FD9B00;/* 选中评分颜色 */
--leftTreeColor:#37748C;
}

View File

@@ -5,6 +5,19 @@ if (!defined('IN_OAOOA')) {
ignore_user_abort(true);
@set_time_limit(0);
@ini_set('max_execution_time', 0);
$locked = true;
$processname = 'DZZ_LOCK_PICHOMEDELETE';
if (!dzz_process::islocked($processname, 60*60)) {
$locked=false;
}
if ($locked) {
exit(json_encode( array('error'=>'进程已被锁定请稍后再试')));
}
foreach(DB::fetch_all("select appid from %t where isdelete =1",array('pichome_vapp')) as $v){
C::t('pichome_vapp')->delete_vapp_by_appid($v['appid']);
}
}
dzz_process::unlock($processname);
if(DB::result_first("select count(appid) from %t where isdelete =1 ",array('pichome_vapp'))){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=delete', 0, '', '', false, '', 0.1);
}
exit('success');

View File

@@ -1,20 +1,15 @@
<?php
if (!defined('IN_OAOOA')) {//所有的php文件必须加上此句防止被外部调用
exit('Access Denied');
}
$path = dzzdecode($_GET['dpath'],'',0);
if(!$path) exit(json_encode(array('error'=>'dpath is must')));
$resourcesdata = C::t('pichome_resources')->fetch($path);
$resourcesdata['name'] = '"' . (strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge') || strexists($_SERVER['HTTP_USER_AGENT'], 'rv:11')) ? urlencode($resourcesdata['name']) : ($resourcesdata['name'])) . '"';
$attach = DB::fetch_first("select path,appid from %t where rid = %s",array('pichome_resources_attr',$path));
$librarydata = DB::fetch_first("select path,iswebsitefile from %t where appid = %s",array('pichome_vapp',$attach['appid']));
if($librarydata['iswebsitefile']){
$realpath = $librarydata['path'].'./'.$attach['path'];
$attachurl= getglobal('siteurl') . 'index.php?mod=io&op=getImg&path=' . dzzencode($realpath);
}else{
$attachurl = $librarydata['path'].'./'.$attach['path'];
}
if (!defined('IN_OAOOA')) {//所有的php文件必须加上此句防止被外部调用
exit('Access Denied');
}
$path = dzzdecode($_GET['dpath'],'',0);
if(!$path) exit(json_encode(array('error'=>'dpath is must')));
$resourcesdata = C::t('pichome_resources')->fetch($path);
$resourcesdata['name'] = '"' . (strtolower(CHARSET) == 'utf-8' && (strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strexists($_SERVER['HTTP_USER_AGENT'], 'Edge') || strexists($_SERVER['HTTP_USER_AGENT'], 'rv:11')) ? urlencode($resourcesdata['name']) : ($resourcesdata['name'])) . '"';
$attach = DB::fetch_first("select path,appid from %t where rid = %s",array('pichome_resources_attr',$path));
$librarydata = DB::fetch_first("select path,iswebsitefile from %t where appid = %s",array('pichome_vapp',$attach['appid']));
$d = new FileDownload();
$d->download($attachurl, $resourcesdata['name'], $resourcesdata['size'], 0, true);
exit();
$attachurl = $librarydata['path'].BS.$attach['path'];
$d = new FileDownload();
$d->download($attachurl, $resourcesdata['name'], $resourcesdata['size'], 0, true);
exit();

View File

@@ -3,16 +3,16 @@
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
@ignore_user_abort(true);
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
$processname = 'DZZ_EXPORTFILE_LOCK_'.$appid;
// dzz_process::unlock($processname);
//dzz_process::unlock($processname);
$locked = true;
if (!dzz_process::islocked($processname, 60*5)) {
if (!dzz_process::islocked($processname, 60*60*24)) {
$locked=false;
}
if ($locked) {
@@ -22,17 +22,27 @@
$force = isset($_GET['force']) ? intval($_GET['force']):0;
$data = C::t('pichome_vapp')->fetch($appid);
if(!$data) exit(json_encode(array('error'=>'no data')));
if($data['type'] == 0 && $data['state'] == 1 && $data['isdelete'] == 0){
if($data['state'] != 2 && $data['isdelete'] != 0) exit(json_encode(array('error'=>'is deleted or state is not allow')));
if($data['type'] == 0){
include_once dzz_libfile('eagleexport');
$eagleexport = new eagleexport($data);
$return = $eagleexport->execExport($force);
}elseif($data['type'] == 1 && $data['state'] == 1 && $data['isdelete'] == 0){
}elseif($data['type'] == 1){
include_once dzz_libfile('localexport');
$localexport = new localexport($data);
//执行导入文件
$return = $localexport->execExport($force);
}elseif ($data['type'] == 2){
include_once DZZ_ROOT.'dzz'.BS.'billfish'.BS.'class'.BS.'class_billfishexport.php';
$billfishxport = new billfishxport($data);
$return = $billfishxport->execExport();
}
dzz_process::unlock($processname);
exit('success');
$data = C::t('pichome_vapp')->fetch($appid);
if($data['state'] == 2){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfile&appid=' . $appid, 0, '', '', false, '', 1);
}elseif($data['state'] == 3){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfilecheck&appid=' . $appid, 0, '', '', false, '', 1);
}
// exit('success');

View File

@@ -1,34 +1,43 @@
<?php
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@ignore_user_abort(true);
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
$processname = 'DZZ_EXPORTCHECKFILE_LOCK_'.$appid;
//dzz_process::unlock($processname);
$locked = true;
if (!dzz_process::islocked($processname, 60*5)) {
$locked=false;
}
if ($locked) {
exit(json_encode( array('error'=>'进程已被锁定请稍后再试')));
}
$force = isset($_GET['force']) ? intval($_GET['force']):0;
$data = C::t('pichome_vapp')->fetch($appid);
if(!$data) exit(json_encode(array('error'=>'no data')));
if($data['type'] == 0 && $data['state'] == 2 && $data['isdelete'] == 0){
include_once dzz_libfile('eagleexport');
$eagleexport = new eagleexport($data);
$return = $eagleexport->execCheckFile();
}elseif($data['type'] == 1 && $data['state'] == 2 && $data['isdelete'] == 0){
include_once dzz_libfile('localexport');
$localexport = new localexport($data);
$return = $localexport->execCheckFile();
}
dzz_process::unlock($processname);
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@ignore_user_abort(true);
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : 0;
$processname = 'DZZ_EXPORTCHECKFILE_LOCK_' . $appid;
//dzz_process::unlock($processname);
$locked = true;
if (!dzz_process::islocked($processname, 60*60*24)) {
$locked = false;
}
if ($locked) {
exit(json_encode(array('error' => '进程已被锁定请稍后再试')));
}
$force = isset($_GET['force']) ? intval($_GET['force']) : 0;
$data = C::t('pichome_vapp')->fetch($appid);
if (!$data) exit(json_encode(array('error' => 'no data')));
if ($data['state'] != 3 && $data['isdelete'] != 0) exit(json_encode(array('error' => 'is deleted or state is not allow')));
if ($data['type'] == 0) {
include_once dzz_libfile('eagleexport');
$eagleexport = new eagleexport($data);
$return = $eagleexport->execCheckFile();
} elseif ($data['type'] == 1) {
include_once dzz_libfile('localexport');
$localexport = new localexport($data);
$return = $localexport->execCheckFile();
}elseif ($data['type'] == 2){
include_once DZZ_ROOT.'dzz'.BS.'billfish'.BS.'class'.BS.'class_billfishexport.php';
$billfishxport = new billfishxport($data);
$return = $billfishxport->execCheckFile();
}
dzz_process::unlock($processname);
$data = C::t('pichome_vapp')->fetch($appid);
if($data['state'] == 3){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfilecheck&appid=' . $appid, 0, '', '', false, '', 1);
}

View File

@@ -41,8 +41,11 @@ if ($operation == 'filelist') {
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
$hassub = isset($_GET['hassub']) ? intval($_GET['hassub']) : 0;
$vappids = [];
foreach(DB::fetch_all("select appid from %t where isdelete = 0",array('pichome_vapp')) as $v){
$vappids[] = $v['appid'];
foreach(DB::fetch_all("select appid,path from %t where isdelete = 0",array('pichome_vapp')) as $v){
if(is_dir($v['path'])){
$vappids[] = $v['appid'];
}
}
if(empty($vappids)){
$wheresql .= ' and 0';

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

View File

@@ -20,17 +20,24 @@
//主题
$theme = GetThemeColor();
//主题
//
$apps = [];
foreach(DB::fetch_all("select * from %t where isdelete = 0",array('pichome_vapp')) as $v){
$v['path'] = urlencode($v['path']);
$v['leaf'] = DB::result_first("select count(*) from %t where appid = %s",array('pichome_folder',$v['appid'])) ? false:true;
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$v['appid']));
$v['nosubfilenum'] = $v['filenum'] - $hascatnum;
$apps[] = $v;
foreach(DB::fetch_all("select * from %t where isdelete = 0 order by disp ",array('pichome_vapp')) as $v){
if(is_dir($v['path'])){
$v['path'] = urlencode($v['path']);
$v['leaf'] = DB::result_first("select count(*) from %t where appid = %s",array('pichome_folder',$v['appid'])) ? false:true;
if(!$v['nosubfilenum']){
$hascatnum = DB::result_first("SELECT count(DISTINCT rid) FROM %t where appid = %s",array('pichome_folderresources',$v['appid']));
$v['nosubfilenum'] = $v['filenum'] - $hascatnum;
C::t('pichome_vapp')->update($v['appid'],array('nosubfilenum'=>$v['nosubfilenum']));
}
$apps[] = $v;
}
}
$apps = json_encode($apps);
//显示子分类内容
$ImageExpanded = C::t('user_setting')->fetch_by_skey('pichomeimageexpanded',$uid);
//筛选
$screen = C::t('user_setting')->fetch_by_skey('pichomeuserscreen',$uid);
@@ -39,8 +46,11 @@
$setting = $_G['setting'];
$pagesetting = $setting['pichomepagesetting'] ? $setting['pichomepagesetting'] : [];
//排序方式
$pichomesortfileds = C::t('user_setting')->fetch_by_skey('pichomesortfileds',$_G['uid']);
//显示信息
$pichomeshowfileds = C::t('user_setting')->fetch_by_skey('pichomeshowfileds',$_G['uid']);
//布局类型
$pichomelayout = C::t('user_setting')->fetch_by_skey('pichomelayout',$_G['uid']);
if($pichomesortfileds){
$sortdatarr = unserialize($pichomesortfileds);

View File

@@ -2,22 +2,32 @@
if (!defined('IN_OAOOA')) {
exit('Access Denied');
}
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
@ignore_user_abort(true);
@set_time_limit(0);
@ini_set('memory_limit', -1);
@ini_set('max_execution_time', 0);
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
$force = isset($_GET['force']) ? intval($_GET['force']):0;
$data = C::t('pichome_vapp')->fetch($appid);
if(!$data) exit(json_encode(array('error'=>'no data')));
if($data['type'] == 0 && $data['isdelete'] == 0){
if(($data['state'] > 1 && $data['state'] < 4) || $data['isdelete'] != 0) exit(json_encode(array('error'=>'export is runing or is deleted')));
if($data['type'] == 0){
include_once dzz_libfile('eagleexport');
$eagleexport = new eagleexport($data);
$return = $eagleexport->initExport();
}elseif($data['type'] == 1 && $data['isdelete'] == 0){
}elseif($data['type'] == 1 ){
include_once dzz_libfile('localexport');
$localexport = new localexport($data);
$return = $localexport->initExport();
}elseif ($data['type'] == 2){
include_once DZZ_ROOT.'dzz'.BS.'billfish'.BS.'class'.BS.'class_billfishexport.php';
$billfishxport = new billfishxport($data);
$return = $billfishxport->initExport();
}
$data = C::t('pichome_vapp')->fetch($appid);
if($data['state'] == 2){
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfile&appid=' . $appid, 0, '', '', false, '', 1);
}
exit(json_encode(array('success'=>true)));

View File

@@ -1,76 +1,73 @@
jQuery(document).ready(function() {
function debounce(fun, delay) {
var time;
return function(args) {
var that = this;
var _args = args;
if (time) clearTimeout(time);
time = setTimeout(function() {
fun.call(that, _args)
}, delay)
}
};
function URLdecode(str) {
var ret = "";
for(var i=0;i<str.length;i++) {
var chr = str.charAt(i);
if(chr == "+") {
ret += " ";
}else if(chr=="%") {
var asc = str.substring(i+1,i+3);
if(parseInt("0x"+asc)>0x7f) {
ret += decodeURI("%"+ str.substring(i+1,i+9));
i += 8;
}else {
ret += String.fromCharCode(parseInt("0x"+asc));
i += 2;
}
}else {
ret += chr;
}
}
return ret;
};
});
function debounce(fun, delay) {
var time;
return function(args) {
var that = this;
var _args = args;
if (time) clearTimeout(time);
time = setTimeout(function() {
fun.call(that, _args)
}, delay)
}
};
function URLdecode(str) {
var ret = "";
for(var i=0;i<str.length;i++) {
var chr = str.charAt(i);
if(chr == "+") {
ret += " ";
}else if(chr=="%") {
var asc = str.substring(i+1,i+3);
if(parseInt("0x"+asc)>0x7f) {
ret += decodeURI("%"+ str.substring(i+1,i+9));
i += 8;
}else {
ret += String.fromCharCode(parseInt("0x"+asc));
i += 2;
}
}else {
ret += chr;
}
}
return ret;
};
function GetDateVal(type){
var str = '';
var start = new Date();
var end = new Date();
switch(type){
case '今日':
break;
case '昨日':
end.setTime(end.getTime() - 3600 * 1000 * 24);
start.setTime(start.getTime() - 3600 * 1000 * 24);
break;
case '最近7日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
break;
case '最近30日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 29);
break;
case '最近90日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 89);
break;
case '最近365日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 364);
break;
}
str = start.getFullYear()+'-'+(start.getMonth()+1)+'-'+start.getDate()+'_'+end.getFullYear()+'-'+(end.getMonth()+1)+'-'+end.getDate();
return str;
}
function CopyTxt(item,text){
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
input.setAttribute('value', text);
document.getElementsByTagName('body')[0].appendChild(input);
document.getElementById('copyInput').select();
document.execCommand('copy')
item.$message({
message: '成功复制到剪切板',
type: 'success'
});
document.getElementById('copyInput').remove();
function GetDateVal(type){
var str = '';
var start = new Date();
var end = new Date();
switch(type){
case '今日':
break;
case '昨日':
end.setTime(end.getTime() - 3600 * 1000 * 24);
start.setTime(start.getTime() - 3600 * 1000 * 24);
break;
case '最近7日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
break;
case '最近30日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 29);
break;
case '最近90日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 89);
break;
case '最近365日':
start.setTime(start.getTime() - 3600 * 1000 * 24 * 364);
break;
}
str = start.getFullYear()+'-'+(start.getMonth()+1)+'-'+start.getDate()+'_'+end.getFullYear()+'-'+(end.getMonth()+1)+'-'+end.getDate();
return str;
}
function CopyTxt(item,text){
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
input.setAttribute('value', text);
document.getElementsByTagName('body')[0].appendChild(input);
document.getElementById('copyInput').select();
document.execCommand('copy')
item.$message({
message: '成功复制到剪切板',
type: 'success'
});
document.getElementById('copyInput').remove();
};

View File

@@ -0,0 +1,142 @@
Vue.component('add-star-tree', {
props:['rids','dialogvisible'],
template: `<el-dialog
title="创建收藏夹"
custom-class="addcollection-dialog"
@opened="PopoverShow"
@closed="PopoverHide"
:visible.sync="dialogvisible">
<el-form ref="form" :model="formdata" label-position="top">
<el-form-item label="名称" required>
<el-input v-model.trim="formdata.name" placeholder="请输入名称"></el-input>
</el-form-item>
<el-form-item label="用户权限">
<el-radio-group v-model="formdata.perm">
<el-radio :label="1">观察员</el-radio>
<el-radio :label="2">协作成员</el-radio>
<el-radio :label="3">管理员</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="添加合作用户">
<el-input v-model.trim="Userkeyword" @input="UserKeywordInput" placeholder="姓名搜索" clearable></el-input>
<div style="padding: 12px 24px 0 24px;">
<template v-if="user.loading">
<div style="position: relative;width: 100%;height: 100px;">
<div class="img-loading center">
<span class="el-icon-loading"></span>加载中...
</div>
</div>
</template>
<template v-else>
<el-checkbox-group v-model="formdata.user">
<el-checkbox v-for="item in user.data" :label="item.uid">
<div>
<div style="display:inline-block" v-html="item.icon"></div>
{{item.username}}
</div>
</el-checkbox>
</el-checkbox-group>
</template>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogvisible = false">取 消</el-button>
<el-button type="primary" @click="handleSubmit" :disabled="formdata.name?false:true">确 定</el-button>
</span>
</el-dialog>`,
data: function() {
return {
user:{
data:[],
loading:true
},
Userkeyword:'',
formdata:{
name:'',
perm:1,
user:[],
}
}
},
watch:{
},
created() {
},
methods:{
UserKeywordInput:debounce(function(val){//输入
this.GetUsers();
},800),
PopoverShow(){
this.GetUsers();
},
PopoverHide(){
var self = this;
self.user.loading = true;
self.Userkeyword = '';
self.formdata = {
name:'',
perm:1,
user:[],
};
self.$emit('closeaddcollectdialog');
},
handleSubmit(){
var self = this;
var param = {
name:self.formdata.name,
perm:self.formdata.perm,
uids:self.formdata.user.join(','),
};
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=addcollect',param,function(json){
if(json.success){
self.addCollect(json.success.clid);
}else{
self.$message.error(json.error);
}
},'json');
},
addCollect(clid){
var self = this;
var param = {
rids:this.rids.join(','),
clid:clid
};
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=addfilecollect',param,function(json){
if(json.success){
self.$message({
type:'success',
message:'收藏夹创建成功'
});
self.$message({
type:'success',
message:'文件收藏成功'
});
self.PopoverHide();
}else{
self.$message.error(json.error);
}
},'json');
},
GetUsers(){
var self = this;
self.user.loading = true;
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=getuser',{
keyword:self.Userkeyword
},function(json){
var data = [];
self.user.data = json.success;
self.user.loading = false;
},'json');
}
},
mounted() {
},
beforeRouteLeave() {
},
});

View File

@@ -0,0 +1,262 @@
Vue.component('star-tree', {
template: `<el-popover
popper-class="collection-dialog"
@show="PopoverShow"
@hide="PopoverHide"
placement="bottom"
ref="refcollectiondialog"
trigger="click">
<div class="collection-dialog-content">
<div class="header">
<el-input
clearable
v-model.trim="filterText"
placeholder="请输入关键字"></el-input>
</div>
<div class="content">
<div v-if="loading" style="background: var(--bg-header);position: absolute;width: 100%;height: 100%;z-index: 10;">
<div class="img-loading center">
<span class="el-icon-loading"></span>加载中...
</div>
</div>
<el-scrollbar style="height:100%;">
<div style="padding:0 12px;">
<el-tree
v-if="NodeShow"
ref="lefttree"
:load="GetTreeData"
node-key="cid"
lazy
:props="defaultProps"
:filter-node-method="TreeDataFilterNode"
:default-expanded-keys="ExpandedNodeKeys">
<div class="custom-tree-node" slot-scope="{ node, data }">
<div class="img">
<img v-if="data.covert" :src="data.covert" />
</div>
<div class="name" v-cloak>{{ data.catname }}</div>
<ul class="avatar">
<li v-for="item in data.uids" v-html="item.icon"></li>
</ul>
<el-button class="btn" @click.stop.prevent="handleSubmit(data.cid,data.clid,data.parent)" type="primary" size="medium">收藏</el-button>
</div>
</el-tree>
</div>
</el-scrollbar>
</div>
<div class="footer" @click="handleOpenAdd">
<i class="el-icon-circle-plus"></i>创建收藏夹
</div>
</div>
<button slot="reference" type="button" class="el-button el-button--danger reference el-button--medium">
<span>收藏</span>
</button>
</el-popover>`,
props:['rids'],
data: function() {
return {
filterText:'',
defaultProps: {
children: 'children',
label: 'catname'
},
loading:true,
NodeShow:false,
ExpandedNodeKeys:[],
alreadyExpandedNodeKeys:[]
}
},
watch:{
filterText:debounce(function(val){
var self = this;
if(val){
self.alreadyExpandedNodeKeys = [];
self.ExpandedNodeKeys = [];
self.loading = true;
this.NodeShow = false;
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=searchcollect',{
keyword:val
},function(json){
var data = [];
for(var i in json.clid){
var id = json.clid[i];
if(data.indexOf('p'+id)<0){
data.push('p'+id);
}
}
for(var x in json.cids){
var id = json.cids[x];
if(data.indexOf(parseInt(id))<0){
data.push(parseInt(id));
}
}
self.ExpandedNodeKeys = data;
self.$nextTick(function(){
self.NodeShow = true;
});
},'json');
}else{
this.filterTextclear();
}
},800)
},
created() {
},
methods:{
filterTextclear(){
var self = this;
self.alreadyExpandedNodeKeys = [];
self.ExpandedNodeKeys = [];
self.loading = true;
self.NodeShow = false;
self.$nextTick(function(){
self.NodeShow = true;
});
},
GetTreeData(node,resolve){
var self = this;
var param = {};
if(node.level == 1){
param = {
clid:node.data.cid.replace('p','')
}
}
if(node.level > 1){
param = {
cid:node.data.cid,
clid:node.data.clid
}
}
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=collectlist',param,function(json){
var data = [];
for(var i in json.success){
var item = json.success[i];
if(node.level == 0){
item['cid'] = 'p'+item.clid;
item['catname'] = item.name;
item['parent'] = true;
self.alreadyExpandedNodeKeys.push(item['cid']);
}else{
item['cid'] = parseInt(item.cid);
item['parent'] = false;
self.alreadyExpandedNodeKeys.push(parseInt(item['cid']));
}
data.push(item)
}
resolve(data);
self.$nextTick(function(){
self.LeftGetTreeDataFinish();
})
},'json');
},
LeftGetTreeDataFinish(){
var self = this;
var finish = false;
if(self.ExpandedNodeKeys.length){
for(var i in self.ExpandedNodeKeys){
var id = self.ExpandedNodeKeys[i];
if(self.alreadyExpandedNodeKeys.indexOf(id)>-1){
finish = true;
}else{
return false;
}
}
if(finish){
if(self.filterText){
self.$refs['lefttree'].filter(self.filterText);
}
self.loading = false;
}
}else{
if(self.filterText){
self.$refs['lefttree'].filter(self.filterText);
}
self.loading = false;
}
},
PopoverShow(){
var self = this;
var collectkey = JSON.parse(localStorage.getItem('collectkey'));
if(collectkey){
var keys = collectkey.key.split('-');
if(keys.length>1){
keys.pop();
}
var newkeys = [];
for(var i in keys){
if(keys[i].indexOf('p')>-1){
newkeys.push(keys[i]);
}else{
newkeys.push(parseInt(keys[i]));
}
}
this.ExpandedNodeKeys = newkeys;
}
this.NodeShow = true;
},
PopoverHide(){
this.NodeShow = false;
},
handleSubmit(cid,clid,parent){
var param = {}
var self = this;
if(parent){
param = {
rids:this.rids,
clid:cid.replace('p','')
}
}else{
param = {
rids:this.rids,
cid:cid,
clid:clid
}
}
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=addfilecollect',param,function(json){
if(json.success){
var node = self.$refs['lefttree'].getNode(cid);
if(parent){
var collect = {
name:node.data.catname,
key:cid
};
}else{
var collectkey = clid+'-'+node.data.pathkey;
var collect = {
name:node.data.catname,
key:'p'+clid+'-'+node.data.pathkey
};
}
localStorage.setItem('collectkey', JSON.stringify(collect));
self.$message({
type:'success',
message:'收藏成功'
});
self.$emit('addcollectsuccess');
self.$refs['refcollectiondialog'].doClose();
}else{
self.$message.error(json.error);
}
},'json');
},
handleOpenAdd(){
var self = this;
self.$refs['refcollectiondialog'].doClose();
self.$emit('openaddcollect',this.rids);
},
TreeDataFilterNode(value, data) {
if (!value) return true;
return data.catname.indexOf(value) !== -1;
},
},
mounted() {
var self = this;
},
beforeRouteLeave() {
},
});

View File

@@ -0,0 +1,256 @@
Vue.component('star-tree-dialog', {
props:['rids','dialogvisible'],
template: `<el-dialog
title="选择收藏夹"
custom-class="collection-dialog"
@open="PopoverShow"
@close="PopoverHide"
:visible.sync="dialogvisible">
<div class="collection-dialog-content">
<div class="header">
<el-input
clearable
v-model.trim="filterText"
placeholder="请输入关键字"></el-input>
</div>
<div class="content">
<el-scrollbar style="height:100%;">
<div style="padding:0 12px;">
<el-tree
v-if="NodeShow"
ref="lefttree"
:load="GetTreeData"
node-key="cid"
lazy
:props="defaultProps"
:filter-node-method="TreeDataFilterNode"
:default-expanded-keys="ExpandedNodeKeys">
<div class="custom-tree-node" :class="{notpadding:!data.parent}" slot-scope="{ node, data }">
<div class="img" v-if="data.parent">
<img v-if="data.covert" :src="data.covert" />
</div>
<div class="name" v-cloak>{{ data.catname }}</div>
<ul class="avatar">
<li v-for="item in data.uids" v-html="item.icon"></li>
</ul>
<el-button class="btn" @click.stop.prevent="handleSubmit(data.cid,data.clid,data.parent)" type="primary" size="medium">收藏</el-button>
</div>
</el-tree>
</div>
</el-scrollbar>
</div>
<div class="footer" @click="handleOpenAdd">
<i class="el-icon-circle-plus"></i>创建收藏夹
</div>
</div>
</el-dialog>`,
data: function() {
return {
filterText:'',
defaultProps: {
children: 'children',
label: 'catname'
},
loading:true,
NodeShow:false,
ExpandedNodeKeys:[],
alreadyExpandedNodeKeys:[]
}
},
watch:{
filterText:debounce(function(val){
var self = this;
if(val){
self.alreadyExpandedNodeKeys = [];
self.ExpandedNodeKeys = [];
self.loading = true;
this.NodeShow = false;
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=searchcollect',{
keyword:val
},function(json){
var data = [];
for(var i in json.clid){
var id = json.clid[i];
if(data.indexOf('p'+id)<0){
data.push('p'+id);
}
}
for(var x in json.cids){
var id = json.cids[x];
if(data.indexOf(parseInt(id))<0){
data.push(parseInt(id));
}
}
self.ExpandedNodeKeys = data;
self.$nextTick(function(){
self.NodeShow = true;
});
},'json');
}else{
self.filterTextclear();
}
},800)
},
created() {
// console.log(this.tabindex)
},
methods:{
filterTextclear(){
var self = this;
self.alreadyExpandedNodeKeys = [];
self.ExpandedNodeKeys = [];
self.loading = true;
self.NodeShow = false;
self.$nextTick(function(){
self.NodeShow = true;
});
},
GetTreeData(node,resolve){
var self = this;
var param = {};
if(node.level == 1){
param = {
clid:node.data.cid.replace('p','')
}
}
if(node.level > 1){
param = {
cid:node.data.cid,
clid:node.data.clid
}
}
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=collectlist',param,function(json){
var data = [];
for(var i in json.success){
var item = json.success[i];
if(node.level == 0){
item['cid'] = 'p'+item.clid;
item['catname'] = item.name;
item['parent'] = true;
self.alreadyExpandedNodeKeys.push(item['cid']);
}else{
item['cid'] = parseInt(item.cid);
item['parent'] = false;
self.alreadyExpandedNodeKeys.push(parseInt(item['cid']));
}
data.push(item)
}
resolve(data);
self.$nextTick(function(){
self.GetTreeDataFinish();
})
},'json');
},
GetTreeDataFinish(){
var self = this;
var finish = false;
if(self.ExpandedNodeKeys.length){
for(var i in self.ExpandedNodeKeys){
var id = self.ExpandedNodeKeys[i];
if(self.alreadyExpandedNodeKeys.indexOf(id)>-1){
finish = true;
}else{
return false;
}
}
if(finish){
if(self.filterText){
self.$refs['lefttree'].filter(self.filterText);
}
self.loading = false;
}
}else{
if(self.filterText){
self.$refs['lefttree'].filter(self.filterText);
}
self.loading = false;
}
},
handleSubmit(cid,clid,parent){
var param = {}
var self = this;
if(parent){
param = {
rids:this.rids.join(','),
clid:cid.replace('p','')
}
}else{
param = {
rids:this.rids.join(','),
cid:cid,
clid:clid,
}
}
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=addfilecollect',param,function(json){
if(json.success){
var node = self.$refs['lefttree'].getNode(cid);
if(parent){
var collect = {
name:node.data.catname,
key:cid
};
}else{
// var collectkey = clid+'-'+node.data.pathkey;
var collect = {
name:node.data.catname,
key:'p'+clid+'-'+node.data.pathkey.replaceAll('_','')
};
}
localStorage.setItem('collectkey', JSON.stringify(collect));
self.$message({
type:'success',
message:'文件收藏成功'
});
self.$emit('addcollectsuccess');
self.PopoverHide();
}else{
self.$message.error(json.error);
}
},'json');
},
PopoverShow(){
var self = this;
var collectkey = JSON.parse(localStorage.getItem('collectkey'));
if(collectkey){
var keys = collectkey.key.split('-');
if(keys.length>1){
keys.pop();
}
var newkeys = [];
for(var i in keys){
if(keys[i].indexOf('p')>-1){
newkeys.push(keys[i]);
}else{
newkeys.push(parseInt(keys[i]));
}
}
this.ExpandedNodeKeys = newkeys;
}
this.NodeShow = true;
},
PopoverHide(){
var self = this;
self.NodeShow = false;
self.filterText = '';
self.alreadyExpandedNodeKeys = [];
self.$emit('closecollectdialog');
},
handleOpenAdd(){
var self = this;
self.$emit('openaddcollect',this.rids);
},
TreeDataFilterNode(value, data) {
if (!value) return true;
return data.catname.indexOf(value) !== -1;
}
},
mounted() {
},
beforeRouteLeave() {
},
});

File diff suppressed because one or more lines are too long

View File

@@ -28,6 +28,8 @@ if ($operation == 'fetch') {
exit(json_encode(array('success' => true)));
} else {
if ($data = DB::fetch_first("select * from %t where appid=%s and isdelete = 0 ", array('pichome_vapp', $appid))) {
if($data['charset'] != CHARSET)$data['convertpath'] = diconv($data['path'],$data['charset'],CHARSET);
else $data['convertpath'] = $data['path'];
$data['path'] = urlencode($data['path']);
$data['filter'] = unserialize($data['filter']);
$getinfonum = 0;
@@ -35,69 +37,56 @@ if ($operation == 'fetch') {
where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or (ra.isget=1))",
array('pichome_resources_attr','pichome_ffmpeg_record','pichome_imagickrecord',$appid));
$catdata = C::t('pichome_taggroup')->fetch_by_appid($appid);
if (($data['state'] == 1)) {
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfile&appid=' . $appid, 0, '', '', false, '', 1);
} elseif ($data['state'] == 2) {
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfilecheck&appid=' . $appid, 0, '', '', false, '', 1);
if (($data['state'] == 2)) {
$processname = 'DZZ_PAGEEXPORTFILE_LOCK_' . $appid;
$locked = true;
if (!dzz_process::islocked($processname, 60 * 5)) {
$locked = false;
}
if ($locked) {
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfile&appid=' . $appid, 0, '', '', false, '', 1);
}
} elseif ($data['state'] == 3) {
$processname = 'DZZ_PAGEEXPORTCHECKFILE_LOCK_' . $appid;
$locked = true;
if (!dzz_process::islocked($processname, 60 * 5)) {
$locked = false;
}
if ($locked) {
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfilecheck&appid=' . $appid, 0, '', '', false, '', 1);
}
}
exit(json_encode(array('success' => true, 'data' => $data, 'catdata' => $catdata)));
} else {
exit(json_encode(array('error' => true)));
}
}
} elseif ($operation == 'getdata') {
}
elseif ($operation == 'getdata') {
$data = array();
foreach (DB::fetch_all("select * from %t where isdelete = 0", array('pichome_vapp')) as $val) {
foreach (DB::fetch_all("select r.rid,r.apptype,r.type,r.ext,r.name,ra.path,r.hasthumb from %t r left join %t ra on r.rid=ra.rid where r.appid = %s order by r.btime limit 0,4",
array('pichome_resources', 'pichome_resources_attr', $val['appid'])) as $v) {
if ($v['hasthumb']) {
//如果是本地文件
if ($v['apptype'] == 1) {
$filename = 'pichomethumb'.BS . $val['appid'] .BS . md5($v['path']) . '.jpg';
$thumbpath = getglobal('setting/attachurl') . $filename;
$v['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$v['path'] = str_replace('\\','/',$v['path']);
$filepath = dirname($v['path']);
$filename = substr($v['path'], strrpos($v['path'], '/') + 1);
$filename = str_replace(strrchr($filename, "."), "", $filename);
$filepath = str_replace('/',BS,$filepath);
if ($val['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $val['path']);
$thumbpath = $tmppath . BS . $filepath .BS . $filename . '_thumbnail.png';
$v['icondata'] = str_replace('+', '%20', urlencode($thumbpath));
} else {
$tmppath = $val['path'];
$thumbpath = $tmppath . BS . $filepath . BS . $filename . '_thumbnail.png';
$v['icondata'] = $_G['siteurl'] . 'index.php?mod=io&op=getImg&path=' . dzzencode($thumbpath,'',0,0);
}
}
} else {
if ($v['type'] == 'commonimage') {
if ($val['iswebsitefile']) {
$tmppath = str_replace(DZZ_ROOT, '', $val['path']);
$v['icondata'] = str_replace('+', '%20', urlencode($tmppath . BS . $v['path']));
} else {
$tmppath = $val['path'] . BS . $v['path'];
$v['icondata'] = $_G['siteurl'] . 'index.php?mod=io&op=getImg&path=' . dzzencode($tmppath,'',0,0);
}
} else {
$v['icondata'] = geticonfromext($v['ext'], $v['type']);
}
}
$v['path'] = str_replace('+', '%20', urlencode($v['path']));
$val['resources'][] = $v;
foreach (DB::fetch_all("select * from %t where isdelete = 0 order by disp", array('pichome_vapp')) as $val) {
$val['connect'] = (is_dir($val['path'])) ? 1:0;
if($val['charset'] != CHARSET){
//echo $val['path'];die;
$val['path'] = diconv($val['path'], $val['charset'], CHARSET);
}
$val['path'] = str_replace('+', '%20', urlencode($val['path']));
$data[] = $val;
}
exit(json_encode(array('data' => $data)));
} elseif ($operation == 'addlibrary') {
//require_once(DZZ_ROOT . './dzz/class/class_encode.php');
} elseif($operation == 'getinfonum'){//已获取文件信息个数
$returndata = [];
foreach(DB::fetch_all("select appid from %t where isdelete = 0 and getinfo = 1 and `type` = 1 and getinfonum < filenum", array('pichome_vapp')) as $v){
$getinfonum= DB::result_first("SELECT count(ra.rid) FROM %t ra left join %t fc on ra.rid = fc.rid left join %t ic on ra.rid= ic.rid
where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or (ra.isget=1))",
array('pichome_resources_attr','pichome_ffmpeg_record','pichome_imagickrecord',$v['appid']));
C::t('pichome_vapp')->update($v['appid'],array('getinfonum'=>$getinfonum));
$returndata['appid'] = $getinfonum;
}
exit(json_encode(array('data' => $returndata)));
}
elseif ($operation == 'addlibrary') {
//接收路径
$path = isset($_GET['path']) ? trim($_GET['path']) : '';
//接收编码
@@ -119,16 +108,28 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
if ($type == 0) {
$metajsonfile = $path . BS . 'metadata.json';
if (!is_file($metajsonfile)) {
exit(json_encode(array('error' => 'not a eagle library')));
exit(json_encode(array('error' => '系统检测该库不符合eagle库标准不能作为eagle库添加')));
}
$appname = str_replace('.library', '', $appname);
}
if ($type == 2) {
$dbfile = $path . BS . '.bf'.BS.'billfish.db';
if (!is_file($dbfile)) {
exit(json_encode(array('tips' => '系统检测该库不符合billfish库标准不能作为billfish库添加')));
}
}
if ($type == 1 && !$force) {
$metajsonfile = $path . BS . 'metadata.json';
if (is_file($metajsonfile) && is_dir($path . BS . 'images')) {
exit(json_encode(array('tips' => '系统检测该目录可能为eagle库您确认要作为普通目录导入吗')));
}
}
if ($type == 1 && !$force) {
$dbfile = $path . BS . '.bf'.BS.'billfish.db';
if (is_file($dbfile)) {
exit(json_encode(array('tips' => '系统检测该目录可能为billfish库您确认要作为普通目录导入吗')));
}
}
$appattr = [
'appname' => $appname,
@@ -143,27 +144,69 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
'allowext'=>getglobal('setting/pichomeimportallowext'),
'filter' => 'a:13:{i:0;a:3:{s:3:"key";s:8:"classify";s:4:"text";s:6:"分类";s:7:"checked";s:1:"1";}i:1;a:4:{s:3:"key";s:3:"tag";s:4:"text";s:6:"标签";s:7:"checked";s:1:"1";s:8:"showtype";s:1:"0";}i:2;a:3:{s:3:"key";s:5:"color";s:4:"text";s:6:"颜色";s:7:"checked";s:1:"1";}i:3;a:3:{s:3:"key";s:4:"link";s:4:"text";s:6:"链接";s:7:"checked";s:1:"1";}i:4;a:3:{s:3:"key";s:4:"desc";s:4:"text";s:6:"注释";s:7:"checked";s:1:"1";}i:5;a:3:{s:3:"key";s:8:"duration";s:4:"text";s:6:"时长";s:7:"checked";s:1:"1";}i:6;a:3:{s:3:"key";s:4:"size";s:4:"text";s:6:"尺寸";s:7:"checked";s:1:"1";}i:7;a:3:{s:3:"key";s:3:"ext";s:4:"text";s:6:"类型";s:7:"checked";s:1:"1";}i:8;a:3:{s:3:"key";s:5:"shape";s:4:"text";s:6:"形状";s:7:"checked";s:1:"1";}i:9;a:3:{s:3:"key";s:5:"grade";s:4:"text";s:6:"评分";s:7:"checked";s:1:"1";}i:10;a:3:{s:3:"key";s:5:"btime";s:4:"text";s:12:"添加时间";s:7:"checked";s:1:"1";}i:11;a:3:{s:3:"key";s:8:"dateline";s:4:"text";s:12:"修改日期";s:7:"checked";s:1:"1";}i:12;a:3:{s:3:"key";s:5:"mtime";s:4:"text";s:12:"创建日期";s:7:"checked";s:1:"1";}}'
];
if ($type == 1) $appattr['allowext'] = $Defaultallowext;
$path = str_replace(array('/', './', '\\'), BS, $path);
if (strpos($path, DZZ_ROOT) !== 0) $appattr['iswebsitefile'] = 0;
$appid = C::t('pichome_vapp')->insert($appattr);
if ($appid) {
$appattr['appid'] = $appid;
$appattr['path'] = urlencode($appattr['path']);
$appattr['path'] = $_GET['path'];
exit(json_encode(array('data' => $appattr)));
} else {
exit(json_encode(array('error' => 'create failer')));
}
} elseif ($operation == 'dellibrary') {
}
elseif($operation == 'changePath'){
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
if (C::t('pichome_vapp')->update($appid, array('isdelete' => 1))) {
$path = isset($_GET['path']) ? trim($_GET['path']):'';
//接收编码
$charset = isset($_GET['charset']) ? trim($_GET['charset']) : 'utf8';
//转换路径
$path = str_replace('/', BS, $path);
//转换编码防止路径找不到linux下中文乱码前端展示为正常编码依据前端传递编码转换出原路径存储
if (CHARSET != $charset) $path = diconv($path, CHARSET, $charset);
//存在相同路径的不允许重复添加
if (DB::result_first("select appid from %t where path = %s and isdelete = 0", array('pichome_vapp', $path))) {
exit(json_encode(array('tips' => '路径对应库已存在,不允许修改')));
}else{
$appdata = C::t('pichome_vapp')->fetch($appid);
}
if(!$appdata) exit(json_encode(array('tips' => '库不存在或已被删除,不允许修改')));
$type = $appdata['type'];
if ($type == 0) {
$metajsonfile = $path . BS . 'metadata.json';
if (!is_file($metajsonfile)) {
exit(json_encode(array('error' => '系统检测该库不已符合eagle库标准修改失败')));
}
}
if ($type == 2) {
$dbfile = $path . BS . '.bf'.BS.'billfish.db';
if (!is_file($dbfile)) {
exit(json_encode(array('tips' => '系统检测该库已不符合billfish库标准修改失败')));
}
}
//if(!is_dir($path)) exit(json_encode(array('tips' => '系统检测该库准,修改失败')));
if (strpos($path, DZZ_ROOT) !== 0) $iswebsitefile = 0;
else $iswebsitefile = 1;
if (C::t('pichome_vapp')->update($appid, array('path' => $path,'iswebsitefile'=>$iswebsitefile))) {
//dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=initexport&appid='.$appid, 0, '', '', false, '', 0.1);
exit(json_encode(array('success' => true)));
} else {
exit(json_encode(array('error' => true)));
}
} elseif ($operation == 'getpath') {
}
elseif ($operation == 'dellibrary') {
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
//if (C::t('pichome_vapp')->update($appid, array('isdelete' => 1,'deluid'=>getglobal('uid'),'delusername'=>getglobal('username')))) {
if (C::t('pichome_vapp')->update($appid, array('isdelete' => 1))) {
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=delete', 0, '', '', false, '', 0.1);
exit(json_encode(array('success' => true)));
} else {
exit(json_encode(array('error' => true)));
}
}
elseif ($operation == 'getpath') {
require_once(DZZ_ROOT . './dzz/class/class_encode.php');
$path = isset($_GET['path']) ? trim($_GET['path']) : '';
$gettype = isset($_GET['gettype']) ? intval($_GET['gettype']) : 0;
@@ -194,10 +237,11 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
if ($dh = @opendir($path)) {
while (($file = readdir($dh)) !== false) {
if ($file != '.' && $file != '..' && is_dir($path . BS . $file) && !preg_match('/^(' . $notallowdir . ')$/i', $file)) {
$returnfile = $file;
$returnfile = trim($file);
$p = new Encode_Core();
$charset = $p->get_encoding($file);
if (CHARSET != $charset) $returnfile = diconv($returnfile, $charset, CHARSET);
$returnfile = diconv($returnfile, $charset, CHARSET);
$datas[] = ['path' => $returnfile, 'charset' => $charset];
}
}
@@ -205,9 +249,6 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
closedir($dh);
}
} elseif ($gettype) {
//echo $notallowdir;die;
//$noallowshowdir = ['patch', 'opt', 'srv', 'run', 'lib64', 'sys', 'bin', 'mnt', 'media', 'boot', 'etc', 'sbin', 'lib', 'dev', 'root', 'usr', 'proc', 'var', 'tmp', 'lost+found', 'lib32', 'etc.defaults', 'var.defaults'];
if (is_dir($path)) {
if ($dh = @opendir($path)) {
while (($file = readdir($dh)) !== false) {
@@ -215,7 +256,7 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
$returnfile = $path . $file;
$p = new Encode_Core();
$charset = $p->get_encoding($file);
if (CHARSET != $charset) $returnfile = diconv($returnfile, $charset, CHARSET);
$returnfile = diconv($returnfile, $charset, CHARSET);
$datas[] = ['path' => $returnfile, 'charset' => $charset];
}
}
@@ -230,7 +271,20 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
}
exit(json_encode(array('data' => $datas)));
} else {
}
elseif ($operation == 'sort') {
$appids = isset($_GET['appids']) ? trim($_GET['appids']) : '';
if (submitcheck('settingsubmit')) {
if (!$appids) exit(json_encode(array('error' => true)));
$appidarr = explode(',', $appids);
$setarr = [];
foreach($appidarr as $k=>$v){
$setarr['disp'] = $k;
C::t('pichome_vapp')->update($v,$setarr);
}
exit(json_encode(array('success' => true)));
}
}else {
$theme = GetThemeColor();
include template('pc/page/library');
}

View File

@@ -4,7 +4,7 @@
}
$sid = isset($_GET['sid']) ? dzzdecode($_GET['sid'],'',0):'';
$sharedata = C::t('pichome_share')->fetch_by_id($sid);
$sharedata = C::t('pichome_share')->fetch_by_idandtype($sid);
$resourcesdata = $sharedata['resourcesdata'];
$resourcesdata['share'] = 0;
$colors = array();

View File

@@ -2,6 +2,7 @@
var CommonJs = {
CommonLibrary(){
if(this.ParamLibrary.data.length==0){
this.ParamImages.loading = false;
return false;
}
this.ParamLibrary.fdata = [{

View File

@@ -1,81 +1,78 @@
<div class="pic-container-scroll">
<div class="img-container">
<div id="imgContainer" :class="ParamSort.layout.value=='imageList'?'imagelist':''">
<div
class="imgitem"
v-for="item in ParamImages.Newdatas"
:style="{top:item.ptop+'px',left:item.pleft+'px',width:item.pwidth+'px'}"
:key="item.rid"
:rid="item.rid"
@click="ImagesDetailClick(item.rid,item.index)">
<div class="imgbox">
<div
class="imgbox-border radius"
:style="{height: item.pheight+'px',width: (item.pwidth-8)+'px',background:'#'+item.color}"
v-bind:class="item.opentype=='video'||item.opentype=='audio'?'border':''">
<div class="div-black" :data-rid="item.rid">
<div class="bck"></div>
<img
class="img el-image__inner opacity"
:ref="'ref_'+item.rid"
@load="ImagesImgload(item.rid)"
:src="item.icondata"
alt="" />
<!-- <img
<van-checkbox-group v-model="ParamImages.operation.rids">
<div
class="imgitem"
v-for="item in ParamImages.Newdatas"
:style="{top:item.ptop+'px',left:item.pleft+'px',width:item.pwidth+'px'}"
:key="item.rid"
:rid="item.rid"
@click="ImagesDetailClick(item.rid,item.index)">
<van-checkbox v-if="ParamImages.checked" class="imgchecked" icon-size="20px" :name="item.rid" disabled></van-checkbox>
<div class="imgbox">
<div
class="imgbox-border radius"
:style="{height: item.pheight+'px',width: (item.pwidth-8)+'px',background:'#'+item.color}"
v-bind:class="item.opentype=='video'||item.opentype=='audio'?'border':''">
<div class="div-black" :data-rid="item.rid">
<div class="bck"></div>
<img
class="img el-image__inner opacity"
:ref="'ref_'+item.rid"
@load="ImagesImgload(item.rid)"
:src="item.icondata"
@touchevent="ImagesTouchEvent"
@touchstart="ImagesTouchStart"
@touchmove="ImagesTouchMove"
@touchend="ImagesTouchEnd"
alt="" /> -->
<div class="circular-box">
<div class="circular-item-box">
<div class="circular-item first"><i class="ri-file-search-line icon"></i></div>
<div class="circular-item two"><i class="ri-share-line icon"></i></div>
<div class="circular-item three"><i class="ri-download-2-line icon"></i></div>
:src="item.icondata"
alt="" />
<div class="circular-box">
<div class="circular-item-box">
<div class="circular-item first"><i class="ri-file-search-line icon"></i></div>
<div class="circular-item two"><i class="ri-share-line icon"></i></div>
<div class="circular-item three"><i class="ri-download-2-line icon"></i></div>
</div>
<div class="round"></div>
<div></div>
</div>
<div class="round"></div>
<div></div>
</div>
<div v-if="ParamSort.showinformation.value.indexOf('tagging')>-1&&parseInt(item.annonationnum)>0" class="annotation">{{item.annonationnum}}</div>
</div>
<div v-if="ParamSort.showinformation.value.indexOf('tagging')>-1&&parseInt(item.annonationnum)>0" class="annotation">{{item.annonationnum}}</div>
</div>
<div class="bottom-img-message">
<div class="name" v-if="ParamSort.showinformation.value.indexOf('name')>-1 || ParamSort.showinformation.value.indexOf('extension')>-1">
<span v-if="ParamSort.showinformation.value.indexOf('name')>-1" v-cloak>{{item.name}}</span>
<span v-if="ParamSort.showinformation.value.indexOf('extension')>-1" class="suffix" v-cloak>.{{item.ext}}</span>
<div class="bottom-img-message">
<div class="name">
<div class="text" v-if="ParamSort.showinformation.value.indexOf('name')>-1||ParamSort.showinformation.value.indexOf('extension')>-1">
<template v-if="ParamSort.showinformation.value.indexOf('name')>-1" v-cloak>{{item.name}}</template><template v-if="ParamSort.showinformation.value.indexOf('extension')>-1" v-cloak>.{{item.ext}}</template>
</div>
<div v-if="!ParamImages.checked" class="circulars" @click.stop="ImagesMoreClick(item.rid,item.dpath)">
<i class="ri-more-fill"></i>
</div>
</div>
<template v-if="ParamSort.showinformation.value.indexOf('other')>-1">
<div class="other" v-if="ParamSort.otherinformation.value=='size'">
<span>{{item.width}} × {{item.height}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='filesize'">
<span>{{item.fsize}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='tag'">
<span v-if="!item.tags" class="label">-</span>
<span v-else class="label" v-for="tg in item.tags">•{{tg}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='grade'">
<van-icon v-for="item in parseInt(item.grade)" class="score active" name="star"></van-icon><van-icon v-for="item in 5-parseInt(item.grade)" class="score" name="star"></van-icon>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='btime'">
<span>{{item.btime}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='dateline'">
<span>{{item.dateline}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='mtime'">
<span>{{item.mtime}}</span>
</div>
</template>
</div>
<template v-if="ParamSort.showinformation.value.indexOf('other')>-1">
<div class="other" v-if="ParamSort.otherinformation.value=='size'">
<span>{{item.width}} × {{item.height}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='filesize'">
<span>{{item.fsize}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='tag'">
<span v-if="!item.tags" class="label">-</span>
<span v-else class="label" v-for="tg in item.tags">•{{tg}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='grade'">
<van-icon v-for="item in parseInt(item.grade)" class="score active" name="star"></van-icon><van-icon v-for="item in 5-parseInt(item.grade)" class="score" name="star"></van-icon>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='btime'">
<span>{{item.btime}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='dateline'">
<span>{{item.dateline}}</span>
</div>
<div class="other" v-else-if="ParamSort.otherinformation.value=='mtime'">
<span>{{item.mtime}}</span>
</div>
</template>
</div>
</div>
</div>
</van-checkbox-group>
<template v-if="ParamImages.data.length&&ParamBasic.page>=ParamBasic.totalpage&&!ParamImages.loading&&!ParamImages.valloading">
<div style="position: absolute;bottom: 0;left: 0;width: 100%;line-height: 40px;text-align: center;color: var(--content-text);font-size: 14px;">没有更多了</div>
</template>
@@ -99,36 +96,18 @@
</div>
<van-overlay :show="ParamImages.loading" :z-index="5000" />
<script type="text/javascript">
var ImagesData = {
var ImagesData = $.extend({},{
ParamImages:{
resize:0,
data:[],
Newdatas:{},
type:'refresh',
checked:false,
operation:{
time:'',
istouch:false,
target:'',
click:true,
details:{
touchMinw:0,
touchMaxw:0,
touchMinh:0,
touchMaxh:0,
},
share:{
touchMinw:0,
touchMaxw:0,
touchMinh:0,
touchMaxh:0,
},
down:{
touchMinw:0,
touchMaxw:0,
touchMinh:0,
touchMaxh:0,
},
type:'',
rids:[]
},
imageList:{
maxNewtop:0,
@@ -170,7 +149,7 @@
loading:true,
valloading:false
}
};
});
var ImagesWatchJs = {
'ParamImages.resize':debounce(function(val){
var self = this;
@@ -189,6 +168,31 @@
deep:true,
// immediate:true
},
'ParamImages.checked':{
handler(val){
if(val){
this.ParamFooter.data.clear.show = false;
this.ParamFooter.data.search.show = false;
this.ParamFooter.data.screen.show = false;
this.ParamFooter.data.sort.show = false;
this.ParamFooter.data.user.show = false;
this.ParamFooter.data.collectcheck.show = true;
this.ParamFooter.data.outcheck.show = true;
}else{
this.CommonSetFooterBadge();
this.ParamFooter.data.search.show = true;
this.ParamFooter.data.screen.show = true;
this.ParamFooter.data.sort.show = true;
this.ParamFooter.data.user.show = true;
this.ParamFooter.data.collectcheck.show = false;
this.ParamFooter.data.outcheck.show = false;
}
this.ParamImages.type = 'refresh';
this.ImagesLayoutInit();
},
deep:true,
// immediate:true
},
'ParamImages.loading':{
handler(val){
var self = this;
@@ -208,107 +212,31 @@
immediate:true
}
};
var ImagesJs = {
ImagesTouchEvent(){
},
ImagesTouchStart(e){
// var self = this;
// self.ParamImages.operation.click = false;
// self.ParamImages.operation.time = setTimeout(function(){
// self.asdfasdfdsf(e);
// },600);
},
ImagesTouchStartLongpress(e){
var self = this;
var img = $(e.target);
self.ParamImages.operation.target = img.closest('.div-black');
var circular = img.siblings('.circular-box');
var style = {
width:img.width()+'px',
height:img.height()+'px',
top:img.offset().top+'px',
left:img.offset().left+'px',
}
var box = $(document).width();
var touch = e.touches[0];
var pageR = touch.pageX+22.5+62;
var pageT = 22.5+70;
var pageL = 62+22.5;
var pageB = touch.pageX+22.5+62;
circular.addClass('top');
if(pageR>box){
circular.addClass('right')
}
if(pageL>touch.pageX){
circular.addClass('left')
}
self.ParamImages.operation.istouch = true;
circular.css({
top:touch.pageY-((circular.width()+6)/2),
left:touch.pageX-((circular.height()+6)/2),
});
img.css(style);
img.closest('.div-black').addClass('fixed');
setTimeout(function(){
var first = circular.find('.circular-item.first');
self.ParamImages.operation.details = {
touchMinw:first.offset().left,
touchMaxw:first.offset().left+45,
touchMinh:first.offset().top,
touchMaxh:first.offset().top+45,
};
var two = circular.find('.circular-item.two');
self.ParamImages.operation.share = {
touchMinw:two.offset().left,
touchMaxw:two.offset().left+45,
touchMinh:two.offset().top,
touchMaxh:two.offset().top+45,
};
var three = circular.find('.circular-item.three');
self.ParamImages.operation.share = {
touchMinw:three.offset().left,
touchMaxw:three.offset().left+45,
touchMinh:three.offset().top,
touchMaxh:three.offset().top+45,
};
},500)
},
ImagesTouchMove(e){
var self = this;
var touch = e.touches[0];
var x = touch.pageX;
var y = touch.pageY;
},
ImagesTouchEnd(e){
var self = this;
// e.preventDefault();
clearTimeout(self.ParamImages.operation.time);
self.ParamImages.operation.click = true;
if(self.ParamImages.operation.istouch){
self.ParamImages.operation.target.removeClass('fixed');
self.ParamImages.operation.target.find('.circular-box').removeClass('top left right');
}
var ImagesJs = $.extend({},{
ImagesMoreClick(rid,dpath){
this.ParamImages.operation.rids = [rid];
this.ImagesMore.dpath = dpath;
this.ImagesMore.visible = true;
},
ImagesDetailClick(rid,index){
var self = this;
// this.ParamDetail.ridIndex = index;
// this.ParamDetail.rid = rid;
// this.ParamDetail.PopupVisible = true;
var arr = [];
for(var i in self.ParamImages.data){
arr.push(self.ParamImages.data[i].rid);
if(self.ParamImages.checked){
var index = self.ParamImages.operation.rids.indexOf(rid);
if(index > -1){
self.ParamImages.operation.rids.splice(index,1);
}else{
self.ParamImages.operation.rids.push(rid);
}
}else{
var arr = [];
for(var i in self.ParamImages.data){
arr.push(self.ParamImages.data[i].rid);
}
arr = arr.join(',');
window.localStorage.setItem('imgs',arr);
window.location.href = SITEURL+MOD_URL+'&op=details#rid='+rid;
}
arr = arr.join(',');
window.localStorage.setItem('imgs',arr);
window.location.href = SITEURL+MOD_URL+'&op=details#rid='+rid;
},
ImagesMounted(){
var self = this;
@@ -317,7 +245,13 @@
$('.pic-container-scroll').scroll(function(e){
var afterScrollTop = $(this).scrollTop(),
updown = afterScrollTop - beforeScrollTop;
if( updown === 0 ) return false;
if(afterScrollTop == 0){
self.ParamFooter.IsShow = 'up';
return false;
}
if( updown === 0 ) {
return false;
}
beforeScrollTop = afterScrollTop;
self.ParamFooter.IsShow = updown > 0 ? "down" : "up"; //判断往上还是往下
self.ImagesLayoutScrollShow();
@@ -339,35 +273,6 @@
var item = $(self.$refs['ref_'+rid]);
item.removeClass('opacity');
item.parents('.imgbox-border').css('background','').removeClass('radius');
self.ParamImages.operation.click = 0;
// item[0].addEventListener("touchstart",function(e){
// var touch = e.touches[0];
// self.ParamImages.operation.click = touch.clientY;
// self.ParamImages.operation.time = setTimeout(function(){
// self.ParamImages.operation.click = true;
// self.ImagesTouchStartLongpress(e);
// },600);
// },false);
// item[0].addEventListener("touchmove",function(e){
// var touch = e.touches[0];
// console.log(Math.abs(touch.clientY - self.ParamImages.operation.click))
// if(Math.abs(touch.clientY - self.ParamImages.operation.click) < 10){
// e.preventDefault();
// }
// clearTimeout(self.ParamImages.operation.time);
// },false);
// item[0].addEventListener("touchend",function(e){
// clearTimeout(self.ParamImages.operation.time);
// // if(self.ParamImages.operation.istouch){
// self.ParamImages.operation.target.removeClass('fixed');
// self.ParamImages.operation.target.find('.circular-box').removeClass('top left right');
// // }
// },false)
},
ImagesLayoutInit(){
var self = this;
@@ -396,9 +301,12 @@
$('#imgContainer').height(0);
return false;
}
var OtherHeight = 0
var OtherHeight = 0;
if(!self.ParamImages.checked){
OtherHeight = 30;
}
if(self.ParamSort.showinformation.value.indexOf('name')>-1 || self.ParamSort.showinformation.value.indexOf('extension')>-1){
OtherHeight += 45;
OtherHeight = 45;
}
if(self.ParamSort.showinformation.value.indexOf('other')>-1){
OtherHeight += 20;
@@ -585,9 +493,12 @@
self.ParamImages.imageList.newWidth = (boxWidth-(columns*self.ParamImages.imageList.Margin-self.ParamImages.imageList.Margin)) / columns;
self.ParamImages.imageList.newHeight = 2 / 3 * self.ParamImages.imageList.newWidth;
var OtherHeight = 0
var OtherHeight = 0;
if(!self.ParamImages.checked){
OtherHeight = 30;
}
if(self.ParamSort.showinformation.value.indexOf('name')>-1 || self.ParamSort.showinformation.value.indexOf('extension')>-1){
OtherHeight += 45;
OtherHeight = 45;
}
if(self.ParamSort.showinformation.value.indexOf('other')>-1){
OtherHeight += 20;
@@ -654,9 +565,12 @@
self.ParamImages.imgageWaterfall.imgWidth = 252;
self.ParamImages.imgageWaterfall.columns = parseInt(boxWidth/self.ParamImages.imgageWaterfall.imgWidth);
}
var OtherHeight = 0
var OtherHeight = 0;
if(!self.ParamImages.checked){
OtherHeight = 30;
}
if(self.ParamSort.showinformation.value.indexOf('name')>-1 || self.ParamSort.showinformation.value.indexOf('extension')>-1){
OtherHeight += 45;
OtherHeight = 45;
}
if(self.ParamSort.showinformation.value.indexOf('other')>-1){
OtherHeight += 20;
@@ -751,5 +665,5 @@
}
}
};
});
</script>

View File

@@ -8,10 +8,10 @@
</div>
</template>
<template #right>
<van-dropdown-menu>
<van-dropdown-menu v-if="ParamLibrary.data.length">
<van-dropdown-item @change="ChangeLibrary" v-model="ParamLibrary.activeId" :options="ParamLibrary.fdata" />
</van-dropdown-menu>
<!-- <van-icon style="display: block;margin-left: 18px;" name="setting-o" @click="ParamImages.checked=true" size="18" /> -->
</template>
</van-nav-bar>
<div class="pic-container">
@@ -51,11 +51,13 @@
<!--{template mobile/components/index/JsSort}-->
<!--{template mobile/components/index/JsScreen}-->
<!--{template mobile/components/index/JsMy}-->
<!--{template mobile/components/index/image/more}-->
<!--{template mobile/components/index/image/classify}-->
<script type="text/javascript">
new Vue({
el: '#dzzoffice',
data: function() {
return $.extend({},MyData,SearchData,SortData,ImagesData,ScreenData,{
return $.extend({},MyData,SearchData,SortData,ImagesData,ScreenData,ImagesMoreData,ImagesClassifyData,{
ParamFooter:{
IsShow:'up',
data:{
@@ -63,7 +65,9 @@
search:{type:'search',icon:'icon ri-search-line',show:true},
screen:{type:'screen',icon:'icon ri-filter-2-fill',show:false},
sort:{type:'sort',icon:'icon ri-arrow-up-down-fill',show:true},
user:{type:'user',icon:'',show:true}
user:{type:'user',icon:'',show:true},
collectcheck:{type:'collectcheck',icon:'icon ri-star-fill',show:false},
outcheck:{type:'outcheck',icon:'icon ri-close-fill',show:false}
}
},
ParamDataInit:{
@@ -166,7 +170,7 @@
}
this.StartData();
},
methods:$.extend({},CommonJs,SearchJs,MyJs,ScreenJs,SortJs,ImagesJs,{
methods:$.extend({},CommonJs,SearchJs,MyJs,ScreenJs,SortJs,ImagesJs,ImagesMoreMethods,ImagesClassifyMethods,{
StartData(){
this.CommonLibrary();
},
@@ -179,6 +183,7 @@
window.location.reload();
},
handleFooterClick(type){
var self = this;
if(type == 'search'){
this.ParamSearch.PopupVisible = true;
}else if(type == 'screen'){
@@ -190,6 +195,16 @@
this.ScreenReset();
this.CommonSetFooterBadge();
this.CommonhandleHash();
}else if(type == 'outcheck'){
this.ParamImages.operation.rids = [];
this.ParamImages.checked = false;
}else if(type == 'collectcheck'){
if(!self.ParamImages.operation.rids.length){
self.$notify({ type: 'warning', message: '请先选择文件' });
return false;
}
this.ParamImages.operation.type = 'collect';
this.ImagesClassify.PopupVisible = true;
}
}

View File

@@ -1,100 +1,98 @@
<van-popup v-model="MyPopupVisible" class="my-popup" position="right">
<van-nav-bar title="我的设置" left-arrow @click-left="MyNavbarLeftClick"></van-nav-bar>
<div class="scroll-box">
<van-cell-group>
<!--{if $_G[uid]}-->
<van-cell clickable title="个人设置" is-link @click="MyClick('person')"></van-cell>
<!--{/if}-->
<van-cell clickable title="帮助文档" @click="MyClick('help')">
<template #right-icon>
<i class="ri-arrow-right-up-line"></i>
</template>
</van-cell>
<van-cell clickable title="问题反馈" @click="MyClick('question')">
<template #right-icon>
<i class="ri-arrow-right-up-line"></i>
</template>
</van-cell>
<van-cell clickable title="关于PicHome" is-link @click="MyClick('about')"></van-cell>
<!--{if $_G[uid]}-->
<van-cell clickable title="退出登录" @click="MyClick('out')">
<template #right-icon>
<i class="ri-logout-box-r-line"></i>
</template>
</van-cell>
<!--{else}-->
<van-cell clickable title="登录PicHome" @click="MyClick('login')" is-link></van-cell>
<!--{/if}-->
</van-cell-group>
</div>
</van-popup>
<van-popup v-model="AboutPopupVisible" class="about-popup" position="right">
<van-nav-bar title="关于PicHome" left-arrow @click-left="AboutNavbarLeftClick"></van-nav-bar>
<div class="scroll-box">
<div class="aboutlogo">
<img src="dzz/pichome/image/phlogo.png" alt="">
</div>
<div class="aboutmessage">
<div class="aboutlist">
<span class="title">软件名称:</span><span class="mes">欧奥PicHome</span>
</div>
<div class="aboutlist">
<span class="title">版本信息:</span><span class="mes">$_G[setting][version]</span>
</div>
<div class="aboutlist">
<span class="title">版权信息:</span><span class="mes">Powered By oaooa PicHome © 2020-2021 欧奥图文</span>
</div>
<div class="aboutlist">
<span class="title">网站地址:</span><span class="mes"><a class="address" href="https://oaooa.com/" target="_blank">oaooa.com</a></span>
</div>
</div>
</div>
</van-popup>
<script type="text/javascript">
var MyData = {
MyPopupVisible:false,
AboutPopupVisible:false,
};
var MyJs = {
MyNavbarLeftClick(){
this.MyPopupVisible = false;
},
AboutNavbarLeftClick(){
this.AboutPopupVisible = false;
},
MyClick(type){
var self = this;
switch(type){
case 'person':
window.location.href = MOD_URL + '&op=user&do=personal';
break;
case 'help':
window.location.href = "https://www.yuque.com/pichome";
break;
case 'question':
window.location.href = "https://support.qq.com/products/340252";
break;
case 'about':
this.AboutPopupVisible = true;
break;
case 'out':
self.$dialog.confirm({
title: '提示',
message: '您确定要注销登录?',
}).then(() => {
// on confirm
jQuery.get('user.php?mod=login&op=logging&action=logout&formhash={FORMHASH}&t='+new Date().getTime(),function(data){
window.location.reload();
});
}).catch(() => {
// on cancel
});
break;
case 'login':
window.location.href = SITEURL+'user.php?mod=login';
break;
}
}
};
<van-popup v-model="MyPopupVisible" class="my-popup" position="right">
<van-nav-bar title="我的设置" left-arrow @click-left="MyNavbarLeftClick"></van-nav-bar>
<div class="scroll-box">
<van-cell-group>
<!--{if $_G[uid]}-->
<van-cell clickable title="个人设置" is-link @click="MyClick('person')"></van-cell>
<!--{/if}-->
<van-cell clickable title="帮助文档" @click="MyClick('help')">
<template #right-icon>
<i class="ri-arrow-right-up-line"></i>
</template>
</van-cell>
<van-cell clickable title="问题反馈" @click="MyClick('question')">
<template #right-icon>
<i class="ri-arrow-right-up-line"></i>
</template>
</van-cell>
<van-cell clickable title="关于PicHome" is-link @click="MyClick('about')"></van-cell>
<!--{if $_G[uid]}-->
<van-cell clickable title="退出登录" @click="MyClick('out')">
<template #right-icon>
<i class="ri-logout-box-r-line"></i>
</template>
</van-cell>
<!--{else}-->
<van-cell clickable title="登录PicHome" @click="MyClick('login')" is-link></van-cell>
<!--{/if}-->
</van-cell-group>
</div>
</van-popup>
<van-popup v-model="AboutPopupVisible" class="about-popup" position="right">
<van-nav-bar title="关于PicHome" left-arrow @click-left="AboutNavbarLeftClick"></van-nav-bar>
<div class="scroll-box">
<div class="aboutlogo">
<img src="dzz/pichome/image/phlogo.png" alt="">
</div>
<div class="aboutmessage">
<div class="aboutlist">
<span class="title">软件名称:</span><span class="mes">欧奥PicHome</span>
</div>
<div class="aboutlist">
<span class="title">版本信息:</span><span class="mes">$_G[setting][version]</span>
</div>
<div class="aboutlist">
<span class="title">版权信息:</span><span class="mes">Powered By oaooa PicHome © 2020-2021 欧奥图文</span>
</div>
<div class="aboutlist">
<span class="title">网站地址:</span><span class="mes"><a class="address" href="https://oaooa.com/" target="_blank">oaooa.com</a></span>
</div>
</div>
</div>
</van-popup>
<script type="text/javascript">
var MyData = {
MyPopupVisible:false,
AboutPopupVisible:false,
};
var MyJs = {
MyNavbarLeftClick(){
this.MyPopupVisible = false;
},
AboutNavbarLeftClick(){
this.AboutPopupVisible = false;
},
MyClick(type){
var self = this;
switch(type){
case 'person':
window.location.href = MOD_URL + '&op=user&do=personal';
break;
case 'help':
window.location.href = "https://www.yuque.com/pichome";
break;
case 'question':
window.location.href = "https://support.qq.com/products/340252";
break;
case 'about':
this.AboutPopupVisible = true;
break;
case 'out':
self.$dialog.confirm({
title: '提示',
message: '您确定要注销登录?',
}).then(function(){
// on confirm
jQuery.get('user.php?mod=login&op=logging&action=logout&formhash={FORMHASH}&t='+new Date().getTime(),function(data){
window.location.reload();
});
});
break;
case 'login':
window.location.href = SITEURL+'user.php?mod=login';
break;
}
}
};
</script>

View File

@@ -0,0 +1,162 @@
<script type="text/javascript">
Vue.component('collect-all', {
template: `<van-collapse v-model="parammodel.active" :border="false">
<van-collapse-item v-for="item in paramdata" :key="item.cid" :name="item.cid" :class="{'active':parammodel.checkedvalue.indexOf(item.cid)>-1}" :ref="'collapse_'+item.cid">
<template #title>
<div @click.stop.self.prevent="select(item)">
{{item.catname}}
</div>
</template>
<template #right-icon>
<template v-if="!item.leaf">
<i @click.stop="toggle(item)" class="van-icon van-icon-arrow van-cell__right-icon"></i>
</template>
<template v-else>
<div style="width: 20px;"></div>
</template>
</template>
<div class="van-cell" v-if="item.loading">
<van-loading type="spinner" size="24px" />
</div>
<template v-if="item.children && item.children.length">
<collect-all
:parammodel="parammodel"
:paramdata="item.children"
@select="select"
:expandedkeys="expandedkeys"
:keyword="keyword"
@append="append"
:issearch="issearch"
:level="parseInt(level)+1"></collect-all>
</template>
</van-collapse-item>
</van-collapse>`,
props:['paramdata','parammodel','expandedkeys','keyword','level','issearch'],
data: function() {
return {
getnum:0
}
},
watch:{
},
created() {
if(this.level == 0){
this.getdata();
}else{
this.openChild(this.paramdata);
}
},
methods:{
toggle(item){
var self = this;
var cid = item.cid;
if(self.$refs['collapse_'+cid] && self.$refs['collapse_'+cid].length){
var expanded = self.$refs['collapse_'+cid][0].expanded;
if(!item.loaded){
self.getdata(item);
}
self.$nextTick(function(){
self.$refs['collapse_'+cid][0].toggle(!expanded);
});
}
},
append(data){
var self = this;
self.$emit('append',data);
},
select(data){
var self = this;
self.$emit('select',data);
},
getdata(data){
var self = this;
var param = {};
if(data){
data.loading = true;
if(data.parent){
param['clid'] = data.clid;
}else{
param['clid'] = data.clid;
param['cid'] = data.cid;
}
}
$.post('index.php?mod=collection&op=collect&do=collectlist',param,function(json){
if(json.success){
var arr = [];
for(var i in json.success){
var item = json.success[i];
if(data){
item['cid'] = parseInt(item['cid']);
item['parent'] = false;
}else{
item['cid'] = 'p'+item['clid'];
item['catname'] = item['name'];
item['parent'] = true;
}
item['children'] = [];
item['loaded'] = false;
item['loading'] = false;
item['leaf'] = false;
if(self.issearch){
if(self.expandedkeys.indexOf(item.cid)>-1){
arr.push(item);
}
}else{
arr.push(item);
}
}
if(data){
if(arr.length){
self.append({
data:data,
val:arr
});
data.leaf = false;
}else{
data.leaf = true;
}
data.loading = false;
data.loaded = true;
}else{
self.append({
type:'parent',
val:arr
});
}
if(self.getnum == 0){
self.$nextTick(function(){
self.getnum = 1;
self.openChild(arr);
});
}
}else{
}
},'json');
},
openChild(data){
if(this.expandedkeys.length){
for(var i in data){
var item = data[i];
if(parseInt(this.level) == 0){
if(this.expandedkeys.indexOf(item.cid)>-1){
this.getdata(item);
}
}else{
if(this.expandedkeys.indexOf(parseInt(item.cid))>-1){
this.getdata(item);
}
}
}
}
}
},
mounted() {
},
});
</script>

View File

@@ -0,0 +1,216 @@
<van-popup class="screen-popup page-popup" v-model="ImagesClassify.PopupVisible" position="right" style="width: 100%;height: 100%;" @open="ImagesClassifyPopupOpen" @closed="ImagesClassifyPopupClosed">
<van-nav-bar left-arrow @click-left="ImagesClassify.PopupVisible=false" title="选择收藏夹"></van-nav-bar>
<div class="scroll-box" style="padding: 0px 4px;height: 100%;overflow: auto;padding-bottom: 35%;">
<div class="screen-classify-collapse">
<collect-all
v-if="ImagesClassify.isshowloading"
:parammodel="ImagesClassify"
:paramdata="ImagesClassify.data"
@select="ImagesClassifyselect"
:expandedkeys="ImagesClassify.expandedkeys"
:keyword="ImagesClassify.search.name"
@append="ImagesClassifyAppenddata"
:issearch="ImagesClassify.issearch"
:level="0"></collect-all>
</div>
</div>
<footer class="pic-toolbar footershow">
<div class="tabbar">
<template v-for="item in ImagesClassify.Footer">
<template v-if="item.show">
<div class="tab-item" @click="ImagesClassifyFooterClick(item)">
<i :class="item.icon"></i>
</div>
</template>
</template>
</div>
</footer>
</van-popup>
<van-popup class="seasrch-popup footer-popup" v-model="ImagesClassify.search.PopupVisible" round position="bottom" :style="{ height: '90%' }" @open="ImagesClassifySearchPopupOpen" @close="ImagesClassifySearchPopupClose">
<div class="vam-popup-title" @click="ImagesClassify.search.PopupVisible=false">搜索</div>
<div class="van-search-box">
<van-search class="popup-search-input" v-model.trim="ImagesClassify.search.name" shape="round" placeholder="输入关键词" maxlength="50" :clearable="false">
<template #right-icon>
<van-icon v-show="ImagesClassify.search.name" @click="ImagesClassify.search.name=''" name="cross" />
</template>
</van-search>
</div>
<div class="btn-bottom">
<van-row gutter="20">
<van-col span="24" style="text-align: center;">
<van-button round type="info" size="large" @click="ImagesClassify.search.PopupVisible=false">确定</van-button>
</van-col>
</van-row>
</div>
</van-popup>
<!--{template mobile/components/index/image/JsCollect}-->
<script type="text/javascript">
var ImagesClassifyData = {
ImagesClassify:{
PopupVisible:false,
data:[],
expandedkeys:[],
active:[],
value:'',
node:'',
checkedvalue:[],
loading:false,
isshowloading:false,
issearch:false,
Footer:{
search:{type:'search',icon:'icon ri-search-line',show:true},
collect:{type:'collect',icon:'icon ri-star-fill',show:true},
},
search:{
PopupVisible:false,
name:'',
realname:'',
}
}
};
var ImagesClassifyMethods = {
ImagesClassifyAppenddata(data){
if(data.type == 'parent'){
this.ImagesClassify.data = data.val;
}else{
data.data.children = data.val;
}
},
ImagesClassifySearchPopupClose(){
var self = this;
if(this.ImagesClassify.search.realname != this.ImagesClassify.search.name){
self.ImagesClassify.isshowloading = false;
self.ImagesClassify.expandedkeys = [];
self.ImagesClassify.data = [];
if(this.ImagesClassify.search.name){
self.ImagesClassify.issearch = true;
$.post(MOD_URL+'&op=collect&do=searchcollect',{
keyword:self.ImagesClassify.search.name
},function(json){
for(var i in json.clid){
self.ImagesClassify.expandedkeys.push('p'+json.clid[i]);
self.ImagesClassify.active.push('p'+json.clid[i]);
}
for(var x in json.cids){
self.ImagesClassify.expandedkeys.push(parseInt(json.cids[x]));
self.ImagesClassify.active.push(parseInt(json.cids[x]));
}
self.$nextTick(function(){
self.ImagesClassify.isshowloading = true;
});
},'json');
}else{
self.ImagesClassify.issearch = false;
self.$nextTick(function(){
self.ImagesClassify.isshowloading = true;
});
}
}
},
ImagesClassifyFooterClick(data){
var self = this;
switch(data.type){
case 'search':
self.ImagesClassify.search.PopupVisible = true;
break;
case 'collect':
if(!self.ParamImages.operation.rids.length){
self.$notify({ type: 'warning', message: '请先选择文件' });
return false;
}
if(!this.ImagesClassify.value){
self.$notify({ type: 'warning', message: '请选择分类' });
return false;
}
var param = {};
if(self.ImagesClassify.node.parent){
param = {
rids:self.ParamImages.operation.rids.join(','),
clid:self.ImagesClassify.node.clid
}
}else{
param = {
rids:self.ParamImages.operation.rids.join(','),
clid:self.ImagesClassify.node.clid,
cid:self.ImagesClassify.node.cid
}
}
var url = 'index.php?mod=collection&op=collect&do=addfilecollect';
$.post(url,param,function(json){
if(json.success){
if(self.ImagesClassify.node.parent){
var collect = {
name:self.ImagesClassify.node.catname,
key:self.ImagesClassify.node.cid
};
}else{
var collect = {
name:self.ImagesClassify.node.catname,
key:'p'+self.ImagesClassify.node.clid+'-'+self.ImagesClassify.node.pathkey.replaceAll('_','')
};
}
localStorage.setItem('collectkey', JSON.stringify(collect));
self.$notify({ type: 'success', message: '文件收藏成功' });
}else{
self.$notify({ type: 'warning', message: json.error });
}
self.ImagesClassify.PopupVisible = false;
},'json')
break;
}
},
ImagesClassifyselect(data){
if(this.ImagesClassify.value == data.cid){
this.ImagesClassify.value = '';
this.ImagesClassify.node = '';
this.ImagesClassify.checkedvalue = [];
}else{
this.ImagesClassify.node = JSON.parse(JSON.stringify(data));
this.ImagesClassify.value = data.cid;
this.ImagesClassify.checkedvalue = [data.cid];
}
},
ImagesClassifySearchPopupOpen(){
var self = this;
this.ImagesClassify.search.realname = JSON.parse(JSON.stringify(this.ImagesClassify.search.name));
},
ImagesClassifyPopupOpen(){
var collectkey = JSON.parse(localStorage.getItem('collectkey'));
if(collectkey){
var keys = collectkey.key.split('-');
if(keys.length>1){
keys.pop();
}
var newkeys = [];
for(var i in keys){
if(keys[i].indexOf('p')>-1){
newkeys.push(keys[i]);
}else{
newkeys.push(parseInt(keys[i]));
}
}
this.ImagesClassify.expandedkeys = newkeys;
this.ImagesClassify.active = newkeys;
}
this.ImagesClassify.isshowloading = true;
},
ImagesClassifyPopupClosed(){
var self = this;
this.ImagesClassify.loading = false;
this.ImagesClassify.isshowloading = false;
this.ImagesClassify.data = [];
this.ImagesClassify.active = [];
this.ImagesClassify.value = '';
this.ImagesClassify.node = '';
this.ImagesClassify.checkedvalue = [];
this.ImagesClassify.search.name = '';
this.ImagesClassify.search.realname = '';
this.ParamImages.operation.rids = [];
},
};
</script>

View File

@@ -0,0 +1,54 @@
<van-action-sheet
style="padding-top: 10px;"
v-model="ImagesMore.visible"
:actions="ImagesMore.data"
cancel-text="取消"
@select="ImagesMoreSheetChange"
close-on-click-action>
</van-action-sheet>
<script type="text/javascript">
var ImagesMoreData = {
ImagesMore:{
visible:false,
dpath:'',
data:[
{ name: '收藏',type:'collect' },
{ name: '分享',type:'share' },
{ name: '下载',type:'down' },
]
}
};
var ImagesMoreMethods = {
ImagesMoreSheetChange(data){
var self = this;
switch(data.type){
case 'share':
$.post('{MOD_URL}&op=ajax&operation=createshare',{
rid:self.ParamImages.operation.rids.join(',')
},function(data){
if(data.success){
self.$dialog.confirm({
title: '',
confirmButtonText:'复制地址',
message: data.success,
}).then(function(){
self.CommonCopyTxt(data.success)
}).catch(function(){
// on cancel
});
}else{
self.$toast.fail('分享地址获取失败');
}
},'json');
break;
case 'down':
window.open(SITEURL+MOD_URL+'&op=download&dpath='+self.ImagesMore.dpath);
break;
case 'collect':
self.ParamImages.operation.type = data.type;
self.ImagesClassify.PopupVisible = true;
break;
}
}
};
</script>

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,9 @@
<!--{template mobile/frame/header_simple_start}-->
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/index.css?{VERHASH}" />
<!--{template mobile/frame/header_simple_end}-->
<div id="dzzoffice">
<!--{template mobile/components/index/JsIndex}-->
</div>
<!--{template mobile/frame/header_simple_start}-->
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/index.css?{VERHASH}" />
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/image.css?{VERHASH}" />
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/screen.css?{VERHASH}" />
<!--{template mobile/frame/header_simple_end}-->
<div id="dzzoffice">
<!--{template mobile/components/index/JsIndex}-->
</div>
<!--{template mobile/frame/footer_simple}-->

View File

@@ -1,315 +1,315 @@
<!--{template mobile/frame/header_simple_start}-->
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/share.css?{VERHASH}" />
<!--{template mobile/frame/header_simple_end}-->
<div id="dzzoffice">
<div
id="DetailPopup"
class="detail-popup-box"
:class="imagesData.footer?'':'NotFooter'">
<van-nav-bar>
<template #left>
<div class="pic-logo" slot="left">
<a class="h-left" href="{MOD_URL}">
<img src="data/attachment/sitelogo/sitelogo.png?{VERHASH}" alt="">
<span class="text">$_G['setting'][sitename]</span>
</a>
</div>
</template>
<template #right>
<div style="width: 25px;text-align: center;height: 25px;line-height: 25px;" @click.stop="PopupInformation=true">
<van-icon name="warning-o" size="18" />
</div>
</template>
</van-nav-bar>
<div class="detail-popup-translate">
<div class="detail-popup-content">
<div class="detail-popup-img">
<div class="detail-between">
<template v-if="imagesData.opentype=='video'">
<div class="video-box" :style="{'height':imagesData.videoH+'px'}">
<iframe
style="border: 0px;"
:src="'index.php?mod=xgplayer&src='+imagesData.realpath"
width="100%"
height="100%"></iframe>
</div>
</template>
<template v-else-if="imagesData.opentype=='pdf'">
<iframe
style="border: 0px;"
:src="'index.php?mod=pdf&src='+imagesData.realpath"
width="100%"
height="100%"></iframe>
</template>
<template v-else-if="imagesData.opentype=='text'">
<div style="padding: 10px;height: 100%;">
<iframe
style="border: 0px;border-radius: 18px;"
:src="'index.php?mod=textviewer&src='+imagesData.realpath"
width="100%"
height="100%"></iframe>
</div>
</template>
<template v-else-if="imagesData.opentype=='other'">
<div class="img-box">
<img
@load="DetailImgload"
:src="imagesData.icondata"
class="image-viewer__img opacity" />
</div>
</template>
<template v-else>
<div class="img-box">
<img :src="imagesData.icondata" class="image-viewer__img thumbnail" />
<img
@load="DetailImgload"
:src="imagesData.realpath"
class="image-viewer__img opacity" />
</div>
</template>
</div>
</div>
</div>
</div>
<div class="footer-tabbar" v-if="imagesData.footer">
<div class="footer-tabbar-item" v-if="imagesData.link" @click="DetailFooterClick('link')">
<i class="ri-links-line"></i>
</div>
<div class="footer-tabbar-item" v-if="imagesData.download" @click="DetailFooterClick('download')">
<i class="ri-download-2-line"></i>
</div>
<div class="footer-tabbar-item" v-if="imagesData.share" @click="DetailFooterClick('share')">
<i class="ri-share-line"></i>
</div>
</div>
<van-popup
v-model="PopupInformation"
class="detail-popup-message"
:class="imagesData.footer?'':'NotFooter'"
position="right"
:overlay="false"
get-container="#DetailPopup">
<div style="position: relative;height: 100%;background: var(--bg-content);padding-top: 2.875rem;">
<van-nav-bar title="详情信息" left-arrow @click-left="PopupInformation=false"></van-nav-bar>
<div class="DetailPopup-content" style="padding: 0 16px;">
<div class="name">{{imagesData.name}}.{{imagesData.ext}}</div>
<div class="block" v-if="imagesData.colors && imagesData.colors.length">
<div class="title">颜色</div>
<div class="block-item colors">
<div class="colors" v-for="item in imagesData.colors">
<div :style="{background: '#'+item}"></div>
</div>
</div>
</div>
<div class="block" v-if="imagesData.tag && imagesData.tag.length">
<div class="title">标签</div>
<div class="block-item tag">
<div class="tag" v-for="item in imagesData.tag">{{item}}</div>
</div>
</div>
<div class="block" v-if="imagesData.link">
<div class="title">链接</div>
<div class="block-item link">
<span>{{imagesData.link}}</span>
<i class="ri-file-copy-line" @click="CommonCopyTxt(imagesData.link)"></i>
</div>
</div>
<div class="block" v-if="imagesData.foldernames && imagesData.foldernames.length">
<div class="title">分类</div>
<div class="block-item tag">
<div class="tag" v-for="item in imagesData.foldernames">{{item}}</div>
</div>
</div>
<div class="block">
<div class="title">基本信息</div>
<div class="block-item">
<van-row class="basic">
<van-col span="12">
<div class="label">评分</div>
</van-col>
<van-col span="12">
<div class="record">
<van-icon v-for="item in imagesData.grade" name="star" class="star active"></van-icon><van-icon v-for="item in imagesData.fgrade" name="star" class="star"></van-icon>
</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">尺寸</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.width}}×{{imagesData.height}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">文件大小</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.fsize}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">类型</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.ext}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">创建时间</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.mtime}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">添加时间</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.btime}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">修改时间</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.dateline}}</div>
</van-col>
</van-row>
</div>
</div>
</div>
</div>
</van-popup>
</div>
</div>
<script type="text/javascript">
new Vue({
el: '#dzzoffice',
data: function() {
return {
imagesData: {
rid : '$resourcesdata[rid]',
appid : '$resourcesdata[appid]',
name : '$resourcesdata[name]',
type : '$resourcesdata[type]',
ext : '$resourcesdata[ext]',
height : $resourcesdata[height],
width : $resourcesdata[width],
dateline : '$resourcesdata[dateline]',
grade : $resourcesdata[grade],
mtime : '$resourcesdata[mtime]',
btime : '$resourcesdata[btime]',
colors : $resourcesdata[colors],
desc : '$resourcesdata[desc]',
link : '$resourcesdata[link]',
tag :$resourcesdata[tag],
opentype : '$resourcesdata[opentype]',
icondata:'$resourcesdata[icondata]',
iconwidth : $resourcesdata[iconwidth],
iconheight : $resourcesdata[iconheight],
share : $resourcesdata[share],
download : $resourcesdata[download],
originalimg : '$resourcesdata[originalimg]',
realpath : '$resourcesdata[realpath]',
fsize : '$resourcesdata[fsize]',
foldernames :$resourcesdata[foldernames],
dpath:'$resourcesdata[dpath]',
footer:false
},
PopupInformation:false
};
},
computed: {
},
created() {
if(this.imagesData.link ||this.imagesData.share || this.imagesData.download){
this.imagesData['footer'] = true;
}else{
this.imagesData['footer'] = false;
}
if(this.imagesData.opentype=='video'){
var ratio = parseFloat(this.imagesData.width)/document.body.clientWidth;
var h = parseFloat(this.imagesData.height)/ratio;
this.imagesData['videoH'] = h;
}
},
methods:{
DetailImgload(event){
$(event.target).removeClass('opacity').siblings('.thumbnail').remove();
},
DetailFooterClick(type){
var self = this;
var rid = self.imagesData.rid;
if(type == 'link'){
window.open(self.imagesData.link);
return false;
}
if(type == 'download'){
if (self.imagesData.dpath) {
window.open(SITEURL + MOD_URL + '&op=download&dpath=' + self.imagesData.dpath)
} else {
self.$toast({
message: '数据错误',
icon: 'cross',
});
}
return false;
}
if(type == 'share'){
if (self.imagesData.rid) {
$.post('{MOD_URL}&op=ajax&operation=createshare', {
rid: self.imagesData.rid
}, function(data) {
if (data.success) {
self.$dialog.confirm({
title: '分享成功',
message: data.success,
confirmButtonText:'复制地址',
cancelButtonText:'关闭'
}).then(() => {
self.CommonCopyTxt(data.success);
}).catch(() => {
// on cancel
});
} else {
self.$toast({
message: '分享失败',
icon: 'cross',
});
}
}, 'json')
} else {
self.$toast({
message: '数据错误',
icon: 'cross',
});
}
}
},
CommonCopyTxt(text){
var self = this;
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
input.setAttribute('value', text);
document.getElementsByTagName('body')[0].appendChild(input);
document.getElementById('copyInput').select();
document.execCommand('copy');
document.getElementById('copyInput').remove();
self.$toast.success('复制成功');
}
},
mounted() {
}
});
</script>
<!--{template mobile/frame/header_simple_start}-->
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/share.css?{VERHASH}" />
<!--{template mobile/frame/header_simple_end}-->
<div id="dzzoffice">
<div
id="DetailPopup"
class="detail-popup-box"
:class="imagesData.footer?'':'NotFooter'">
<van-nav-bar>
<template #left>
<div class="pic-logo" slot="left">
<a class="h-left" href="{MOD_URL}">
<img src="data/attachment/sitelogo/sitelogo.png?{VERHASH}" alt="">
<span class="text">$_G['setting'][sitename]</span>
</a>
</div>
</template>
<template #right>
<div style="width: 25px;text-align: center;height: 25px;line-height: 25px;" @click.stop="PopupInformation=true">
<van-icon name="warning-o" size="18" />
</div>
</template>
</van-nav-bar>
<div class="detail-popup-translate">
<div class="detail-popup-content">
<div class="detail-popup-img">
<div class="detail-between">
<template v-if="imagesData.opentype=='video'">
<div class="video-box" :style="{'height':imagesData.videoH+'px'}">
<iframe
style="border: 0px;"
:src="'index.php?mod=xgplayer&src='+imagesData.realpath"
width="100%"
height="100%"></iframe>
</div>
</template>
<template v-else-if="imagesData.opentype=='pdf'">
<iframe
style="border: 0px;"
:src="'index.php?mod=pdf&src='+imagesData.realpath"
width="100%"
height="100%"></iframe>
</template>
<template v-else-if="imagesData.opentype=='text'">
<div style="padding: 10px;height: 100%;">
<iframe
style="border: 0px;border-radius: 18px;"
:src="'index.php?mod=textviewer&src='+imagesData.realpath"
width="100%"
height="100%"></iframe>
</div>
</template>
<template v-else-if="imagesData.opentype=='other'">
<div class="img-box">
<img
@load="DetailImgload"
:src="imagesData.icondata"
class="image-viewer__img opacity" />
</div>
</template>
<template v-else>
<div class="img-box">
<img :src="imagesData.icondata" class="image-viewer__img thumbnail" />
<img
@load="DetailImgload"
:src="imagesData.realpath"
class="image-viewer__img opacity" />
</div>
</template>
</div>
</div>
</div>
</div>
<div class="footer-tabbar" v-if="imagesData.footer">
<div class="footer-tabbar-item" v-if="imagesData.link" @click="DetailFooterClick('link')">
<i class="ri-links-line"></i>
</div>
<div class="footer-tabbar-item" v-if="imagesData.download" @click="DetailFooterClick('download')">
<i class="ri-download-2-line"></i>
</div>
<div class="footer-tabbar-item" v-if="imagesData.share" @click="DetailFooterClick('share')">
<i class="ri-share-line"></i>
</div>
</div>
<van-popup
v-model="PopupInformation"
class="detail-popup-message"
:class="imagesData.footer?'':'NotFooter'"
position="right"
:overlay="false"
get-container="#DetailPopup">
<div style="position: relative;height: 100%;background: var(--bg-content);padding-top: 2.875rem;">
<van-nav-bar title="详情信息" left-arrow @click-left="PopupInformation=false"></van-nav-bar>
<div class="DetailPopup-content" style="padding: 0 16px;">
<div class="name">{{imagesData.name}}.{{imagesData.ext}}</div>
<div class="block" v-if="imagesData.colors && imagesData.colors.length">
<div class="title">颜色</div>
<div class="block-item colors">
<div class="colors" v-for="item in imagesData.colors">
<div :style="{background: '#'+item}"></div>
</div>
</div>
</div>
<div class="block" v-if="imagesData.tag && imagesData.tag.length">
<div class="title">标签</div>
<div class="block-item tag">
<div class="tag" v-for="item in imagesData.tag">{{item}}</div>
</div>
</div>
<div class="block" v-if="imagesData.link">
<div class="title">链接</div>
<div class="block-item link">
<span>{{imagesData.link}}</span>
<i class="ri-file-copy-line" @click="CommonCopyTxt(imagesData.link)"></i>
</div>
</div>
<div class="block" v-if="imagesData.foldernames && imagesData.foldernames.length">
<div class="title">分类</div>
<div class="block-item tag">
<div class="tag" v-for="item in imagesData.foldernames">{{item}}</div>
</div>
</div>
<div class="block">
<div class="title">基本信息</div>
<div class="block-item">
<van-row class="basic">
<van-col span="12">
<div class="label">评分</div>
</van-col>
<van-col span="12">
<div class="record">
<van-icon v-for="item in imagesData.grade" name="star" class="star active"></van-icon><van-icon v-for="item in imagesData.fgrade" name="star" class="star"></van-icon>
</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">尺寸</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.width}}×{{imagesData.height}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">文件大小</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.fsize}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">类型</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.ext}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">创建时间</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.mtime}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">添加时间</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.btime}}</div>
</van-col>
</van-row>
<van-row class="basic">
<van-col span="12">
<div class="label">修改时间</div>
</van-col>
<van-col span="12">
<div class="record">{{imagesData.dateline}}</div>
</van-col>
</van-row>
</div>
</div>
</div>
</div>
</van-popup>
</div>
</div>
<script type="text/javascript">
new Vue({
el: '#dzzoffice',
data: function() {
return {
imagesData: {
rid : '$resourcesdata[rid]',
appid : '$resourcesdata[appid]',
name : '$resourcesdata[name]',
type : '$resourcesdata[type]',
ext : '$resourcesdata[ext]',
height : $resourcesdata[height],
width : $resourcesdata[width],
dateline : '$resourcesdata[dateline]',
grade : $resourcesdata[grade],
mtime : '$resourcesdata[mtime]',
btime : '$resourcesdata[btime]',
colors : $resourcesdata[colors],
desc : '$resourcesdata[desc]',
link : '$resourcesdata[link]',
tag :$resourcesdata[tag],
opentype : '$resourcesdata[opentype]',
icondata:'$resourcesdata[icondata]',
iconwidth : $resourcesdata[iconwidth],
iconheight : $resourcesdata[iconheight],
share : $resourcesdata[share],
download : $resourcesdata[download],
originalimg : '$resourcesdata[originalimg]',
realpath : '$resourcesdata[realpath]',
fsize : '$resourcesdata[fsize]',
foldernames :$resourcesdata[foldernames],
dpath:'$resourcesdata[dpath]',
footer:false
},
PopupInformation:false
};
},
computed: {
},
created() {
if(this.imagesData.link ||this.imagesData.share || this.imagesData.download){
this.imagesData['footer'] = true;
}else{
this.imagesData['footer'] = false;
}
if(this.imagesData.opentype=='video'){
var ratio = parseFloat(this.imagesData.width)/document.body.clientWidth;
var h = parseFloat(this.imagesData.height)/ratio;
this.imagesData['videoH'] = h;
}
},
methods:{
DetailImgload(event){
$(event.target).removeClass('opacity').siblings('.thumbnail').remove();
},
DetailFooterClick(type){
var self = this;
var rid = self.imagesData.rid;
if(type == 'link'){
window.open(self.imagesData.link);
return false;
}
if(type == 'download'){
if (self.imagesData.dpath) {
window.open(SITEURL + MOD_URL + '&op=download&dpath=' + self.imagesData.dpath)
} else {
self.$toast({
message: '数据错误',
icon: 'cross',
});
}
return false;
}
if(type == 'share'){
if (self.imagesData.rid) {
$.post('{MOD_URL}&op=ajax&operation=createshare', {
rid: self.imagesData.rid
}, function(data) {
if (data.success) {
self.$dialog.confirm({
title: '分享成功',
message: data.success,
confirmButtonText:'复制地址',
cancelButtonText:'关闭'
}).then(function() {
self.CommonCopyTxt(data.success);
}).catch(function() {
// on cancel
});
} else {
self.$toast({
message: '分享失败',
icon: 'cross',
});
}
}, 'json')
} else {
self.$toast({
message: '数据错误',
icon: 'cross',
});
}
}
},
CommonCopyTxt(text){
var self = this;
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
input.setAttribute('value', text);
document.getElementsByTagName('body')[0].appendChild(input);
document.getElementById('copyInput').select();
document.execCommand('copy');
document.getElementById('copyInput').remove();
self.$toast.success('复制成功');
}
},
mounted() {
}
});
</script>
<!--{template mobile/frame/footer_simple}-->

View File

@@ -0,0 +1,334 @@
<div class="classify-search">
<el-input
v-model="LeftTree.filterText"
placeholder="搜索文件夹"
clearable
size="medium"
prefix-icon="ri-search-line"
@input="LeftClassifyFilterInput"></el-input>
</div>
<div class="left-scroll">
<el-scrollbar style="height: 100%;">
<el-menu
default-active="tt">
<el-menu-item index="tt" style="padding-left: 24px;">
<i class="ri-home-heart-line" style="font-size: 20px;"></i>
<span slot="title" style="font-size: 16px;">全部收藏</span>
</el-menu-item>
<el-menu-item index="xx" style="padding-left: 24px;">
<i class="ri-folder-reduce-line" style="font-size: 20px;"></i>
<span slot="title" style="font-size: 16px;">未分类收藏</span>
</el-menu-item>
</el-menu>
<el-divider></el-divider>
<div class="tree-box" v-if="LeftTree.show">
<el-tree
class="left-tree"
ref="lefttree"
:load="LeftGetTreeData"
lazy
indent="8"
:props="LeftTree.defaultProps"
:expand-on-click-node="false"
node-key="fid"
accordion
:current-node-key="LeftTree.defaultChecked"
:default-expanded-keys="LeftTree.defaultOpenkeys"
@node-click="LeftTreeClick"
:filter-node-method="LeftTreeFilterNode"
highlight-current>
<div class="custom-tree-node" slot-scope="{ node, data }" :class="{'tree-node-color':node.level==1?Appid==data.fid:Appid==data.appid}">
<i class="ri-folder-line" style="font-size: 20px;vertical-align: middle;margin-right: 5px;"></i>
<!-- <i class="ri-folder-open-line"></i> -->
<div class="name" v-cloak>{{ node.label }}</div>
<div class="num" v-if="node.expanded && parseInt(data.nosubfilenum)>0">{{data.nosubfilenum}}</div>
<div class="num" v-if="!node.expanded && parseInt(data.filenum)>0">{{data.filenum}}</div>
</div>
</el-tree>
</div>
<div class="TreeBackloading" v-if="Leftloading">
<div class="img-loading center">
<span class="el-icon-loading"></span>加载中...
</div>
</div>
</el-scrollbar>
</div>
<script type="text/javascript">
var JsLeftData = {
Appid:'all',
Librarys:$apps,
LeftClassify:'',
Leftloading:true,
LeftTree:{
show:true,
defaultDataInit:{},
defaultProps:{
children: 'children',
label: 'fname',
isLeaf: 'leaf'
},
filterText:'',
defaultChecked:'',
defaultOpenkeysInit:[],
defaultOpenkeys:[],
arrangement:[],
arrangementLast:[],
}
};
var JsLeftMethods = {
LeftCreat(){
var self = this;
var appid = this.CommonGetHashParam('appid');
var classify = this.CommonGetHashParam('classify',true);
if(classify){
var fclassify = decodeURI(classify.split(',')[0]);
if(fclassify == '未分类'){
self.LeftClassify = 'not'+appid;
}else{
self.LeftClassify = fclassify;
}
}
if(appid){
this.Appid = appid;
for(var i in this.Librarys){
if(this.Librarys[i].appid == appid){
this.LibrarysName = this.Librarys[i].appname;
self.ImageDataIsExpanded = this.Librarys[i].leaf?false:true;
}
}
}else{
if(this.Librarys.length==1){
this.Appid = this.Librarys[0].appid;
this.LibrarysName = this.Librarys[0].appname;
}
}
if(self.Appid && self.Appid!='all'&&self.LeftClassify){
self.LeftTree.defaultOpenkeysInit.push(self.Appid);
}
if(classify){
self.LeftTree.defaultChecked = self.LeftClassify;
}else{
self.LeftTree.defaultChecked = self.Appid;
}
},
LeftTreeClick(data,node){
var self = this;
if(node.isLeaf){
node.loading = false;
node.loaded = true;
self.ImageDataIsExpanded = false;
}else{
self.ImageDataIsExpanded = true;
}
if(self.$refs.ScreenPopoverRef && self.$refs.ScreenPopoverRef.length){
for(var s in self.$refs.ScreenPopoverRef){
self.$refs.ScreenPopoverRef[s].doClose();
}
}
self.HeaderPopoverSearchHide()
if(node.level>1){
if(self.LeftClassify != data.fid){
self.Appid = data.appid;
self.LeftClassify = data.fid;
self.LeftTree.defaultChecked = self.LeftClassify;
self.LeftTree.defaultOpenkeysInit = [data.appid];
if(data.pathkey){
self.ScreenSubstring(data.pathkey,data.appid);
}
self.LeftTree.defaultOpenkeys = self.LeftTree.defaultOpenkeysInit;
this.CommonGetImageData();
}
}else{
if(self.Appid != data.fid || self.LeftClassify){
self.Appid = data.fid;
self.LeftClassify = '';
self.LeftTree.defaultChecked = self.Appid;
self.LeftTree.defaultOpenkeys = [];
self.LeftTree.defaultOpenkeysInit = [];
this.CommonGetImageData();
}
}
},
LeftTreeFilterNode(value, data){
if (!value) return true;
return data.fname.indexOf(value) !== -1;
},
LeftClassifyFilterInput:debounce(function(val){//输入
var self = this;
self.LeftTree.defaultOpenkeys = [];
self.LeftTree.arrangementLast = [];
self.LeftTree.show = false;
self.Leftloading = true;
if(val){
$.post(MOD_URL+'&op=ajax&operation=searchfolderbyname',{
keyword:val
},function(data){
for(var b in data.folderdata){
var bitem = data.folderdata[b];
var pathkey = [];
if(self.LeftTree.arrangementLast.indexOf(bitem.fid)<0){
self.LeftTree.arrangementLast.push(bitem.fid);
}
if(self.LeftTree.defaultOpenkeys.indexOf(bitem.appid)<0){
self.LeftTree.defaultOpenkeys.push(bitem.appid)
}
self.LeftTree.arrangement = [];
if(bitem.pathkey){
self.LeftGetTreeDataSubstring(bitem.pathkey,bitem.appid);
}
for(var p in self.LeftTree.arrangement){
if(self.LeftTree.defaultOpenkeys.indexOf(self.LeftTree.arrangement[p])<0){
self.LeftTree.defaultOpenkeys.push(self.LeftTree.arrangement[p])
}
}
}
self.$nextTick(function(){
self.LeftTree.show = true;
})
},'json');
}else{
self.LeftTree.defaultOpenkeys = self.LeftTree.defaultOpenkeysInit;
self.$nextTick(function(){
self.LeftTree.show = true;
})
}
},800),
LeftGetTreeDataSubstring(str,appid){
var self = this;
var farr = str.split(appid);
var arr = [];
for(var f in farr){
if(farr[f]){
arr.push(farr[f]);
}
}
arr.pop();
for(var i in arr){
var pathkey = arr[i]+appid;
if(self.LeftTree.arrangement.indexOf(pathkey) == -1){
self.LeftTree.arrangement.push(pathkey);
}
}
},
LeftGetTreeDataSubstringFinish(){
var self = this;
if(this.LeftTree.defaultOpenkeys.length){
var status = false;
for(var i in this.LeftTree.defaultOpenkeys){
var node = self.$refs.lefttree.getNode(this.LeftTree.defaultOpenkeys[i]);
if(!node){
return false;
}
status = true;
}
if(status){
self.Leftloading = false;
}
}else{
self.Leftloading = false;
}
},
LeftGetTreeData(node,resolve){
var self = this;
if(node.level == 0){
var arr = [];
if(self.LeftTree.filterText){
for(var i in self.Librarys){
var item = self.Librarys[i];
if(self.LeftTree.defaultOpenkeys.indexOf(item.appid)>-1){
arr.push({
fid:item.appid,
fname:item.appname,
leaf:item.leaf,
filenum:item.filenum,
nosubfilenum:item.nosubfilenum
});
}
}
}else{
var num = 0;
for(var i in self.Librarys){
var item = self.Librarys[i];
num += parseInt(item.filenum);
arr.push({
fid:item.appid,
fname:item.appname,
leaf:item.leaf,
filenum:item.filenum,
nosubfilenum:item.nosubfilenum
});
}
// if(self.Librarys.length>1){
// arr.unshift({
// fid:'all',
// fname:'全部库',
// filenum:num,
// leaf:true
// });
// }
}
resolve(arr);
self.$nextTick(function(){
self.LeftGetTreeDataSubstringFinish();
})
}
if(node.level == 1){
$.post(MOD_URL+'&op=ajax&operation=getsearchfolder',{
appid:node.data.fid,
},function(data){
var arr = [];
var num = 0;
for(var i in data.folderdatanum){
var item = data.folderdatanum[i];
if(self.LeftTree.filterText){
if(self.LeftTree.defaultOpenkeys.indexOf(item.fid)>-1 || self.LeftTree.arrangementLast.indexOf(item.fid)>-1){
arr.push(item);
}
}else{
arr.push(item);
}
}
resolve(arr);
self.$nextTick(function(){
self.LeftGetTreeDataSubstringFinish();
})
},'json');
}
if(node.level > 1){
$.post(MOD_URL+'&op=ajax&operation=getsearchfolder',{
appid:node.data.appid,
pfids:node.data.fid,
},function(data){
var arr = [];
var num = 0;
for(var i in data.folderdatanum){
var item = data.folderdatanum[i];
if(self.LeftTree.filterText){
if(self.LeftTree.defaultOpenkeys.indexOf(item.fid)>-1 || self.LeftTree.arrangementLast.indexOf(item.fid)>-1){
arr.push(item);
}
}else{
arr.push(item);
}
}
resolve(arr);
self.$nextTick(function(){
self.LeftGetTreeDataSubstringFinish();
})
},'json');
}
}
};
</script>

View File

@@ -0,0 +1,377 @@
<div id="imagelayout">
<!-- <div class="image-top-message">
<div class="right" v-if="DocumentTemplate==2 && ImageDataIsExpanded"><el-checkbox v-model="ImageParams.expanded">显示子分类内容</el-checkbox></div>
</div> -->
<div class="collection-box">
<h2 style="text-align: center;padding: 16px 0;">收藏名称</h2>
<div class="jurisdiction-box">
<ul class="jurisdiction-ul">
<li class="jurisdiction-item">{eval echo avatar_block($_G[uid]);}</li>
<li class="jurisdiction-item">{eval echo avatar_block($_G[uid]);}</li>
<li class="jurisdiction-item">{eval echo avatar_block($_G[uid]);}</li>
<li class="jurisdiction-item">{eval echo avatar_block($_G[uid]);}</li>
<li class="jurisdiction-item">
<div class="add">
<i class="icon el-icon-plus"></i>
</div>
</li>
</ul>
</div>
<div class="file-box">
<div class="file-message">
<div class="left">53个收藏&nbsp;&nbsp;4个收藏夹</div>
<div class="right">
<i class="el-icon-circle-plus-outline"></i>
新建子收藏夹
</div>
</div>
<ul class="file-list">
<li class="item">
<div class="img">
<div class="block">
<el-image
style="width: 100%; height: 100%"
src="data%2Fattachment%2Fpichomethumb%5C3uyIM4%5C08d06a539d8e87152e2ef61e10b58f0d.jpg"
fit="cover"></el-image>
</div>
<div class="block">
<el-image
style="width: 100%; height: 100%"
src="data%2Fattachment%2Fpichomethumb%5C3uyIM4%5Cb243b7dc689fa6f97394d9b414a91846.jpg"
fit="cover"></el-image>
</div>
<div class="block">
<el-image
style="width: 100%; height: 100%"
src="http://127.0.0.6/index.php?mod=io&op=getImg&path=VGMyMkZKYW1HRmJGX3hka2VUSV9jWjREaEswWkpJVkZSN25HTEtRR2JiTWROSzBZRGNjX2ZRSjBaZ0ZWWEFNRjVseHBHdUNuMDNDUkxHeVdwckJ1ZDYzLTZFVV8wWk01SERKM25LMzJ3VFhTRmE0UlFCa245WlN5Y2UyU1B6U0lCVWVxVUhlOUZSdVJzOFIw"
fit="cover"></el-image>
</div>
</div>
<p class="text">
<span>子收藏夹名称</span>
<span style="font-size: 14px;display: block;">8个收藏</span>
</p>
</li>
<li class="item">
<div class="img">
<div class="block">
<el-image
style="width: 100%; height: 100%"
src="data%2Fattachment%2Fpichomethumb%5C3uyIM4%5C08d06a539d8e87152e2ef61e10b58f0d.jpg"
fit="cover"></el-image>
</div>
<div class="block">
<el-image
style="width: 100%; height: 100%"
src="data%2Fattachment%2Fpichomethumb%5C3uyIM4%5Cb243b7dc689fa6f97394d9b414a91846.jpg"
fit="cover"></el-image>
</div>
<div class="block">
<el-image
style="width: 100%; height: 100%"
src="http://127.0.0.6/index.php?mod=io&op=getImg&path=VGMyMkZKYW1HRmJGX3hka2VUSV9jWjREaEswWkpJVkZSN25HTEtRR2JiTWROSzBZRGNjX2ZRSjBaZ0ZWWEFNRjVseHBHdUNuMDNDUkxHeVdwckJ1ZDYzLTZFVV8wWk01SERKM25LMzJ3VFhTRmE0UlFCa245WlN5Y2UyU1B6U0lCVWVxVUhlOUZSdVJzOFIw"
fit="cover"></el-image>
</div>
</div>
<p class="text">
<span>子收藏夹名称</span>
<span style="font-size: 14px;display: block;">8个收藏</span>
</p>
</li>
</ul>
</div>
</div>
<div class="image-container">
<div class="image-wrapper">
<template v-for="item in ImageDataListShow">
<div class="image-item" :key="item.rid" :style="{top:item.ptop+'px',left:item.pleft+'px',width:item.pwidth+'px'}" >
<div class="image-inside">
<div
class="image-single radius"
:class="[{'border':item.opentype=='video'||item.opentype=='audio'},ImageType]"
:style="{height: item.pheight+'px',width: (item.pwidth-8)+'px',background:'#'+item.color}"
@mouseenter="ImageMouseenter"
@mouseleave="ImageMouseleave"
@click="item.type!='audio'&&ImageDetails(item.rid)">
<div class="image-storage">
<img class="img thumbnail" :src="item.icondata" alt="">
<img class="img opacity" :src="item.icondata" alt="" @load="Imageload(item.rid)" :ref="'img_'+item.rid" />
</div>
<div class="topFlex" v-if="parseInt(item.download)||parseInt(item.share)">
<div v-if="parseInt(item.share)" class="circulars" @click.stop="ImageOperation('share',item.rid)">
<i class="ri-share-line"></i>
</div>
<div v-if="parseInt(item.download)" class="circulars" @click.stop="ImageOperation('down',item.dpath)">
<i class="ri-download-2-line"></i>
</div>
</div>
<template v-if="item.type=='audio'">
<div @click.stop="ImageDetails(item.rid)" class="circulars link">
<i class="ri-search-line"></i>
<span class="el-link--inner">详情</span>
</div>
</template>
<template v-else>
<div v-if="item.link" @click.stop="ImageLink(item.link)" class="circulars link">
<i class="ri-link"></i>
<span class="el-link--inner">链接</span>
</div>
</template>
<div v-if="item.type=='audio'||item.type=='video'" class="image-playurl" data-status="true" :data-type="item.type" :data-playurl="item.realpath">
</div>
</div>
<div class="message">
<div class="name" v-if="HeaderRightBtnDisplay.value.indexOf('name')>-1 || HeaderRightBtnDisplay.value.indexOf('extension')>-1">
<template v-if="HeaderRightBtnDisplay.value.indexOf('name')>-1">{{item.name}}</template><template v-if="HeaderRightBtnDisplay.value.indexOf('extension')>-1">.{{item.ext}}</template>
</div>
<template v-if="HeaderRightBtnDisplay.value.indexOf('other')>-1">
<div class="other" v-if="HeaderRightBtnDisplay.other=='size'">
<template v-if="parseInt(item.width)>0">
<span>{{item.width}} × {{item.height}}</span>
</template>
<template v-else></template>
</div>
<div class="other" v-else-if="HeaderRightBtnDisplay.other=='filesize'">
<span>{{item.fsize}}</span>
</div>
<div class="other" v-else-if="HeaderRightBtnDisplay.other=='tag'">
<span v-if="!item.tags" class="label">-</span>
<span v-else class="label" v-for="tg in item.tags">•{{tg}}</span>
</div>
<div class="other" v-else-if="HeaderRightBtnDisplay.other=='grade'">
<span v-for="item in parseInt(item.grade)" class="score active el-icon-star-on"></span><span v-for="item in 5-parseInt(item.grade)" class="score el-icon-star-on"></span>
</div>
<div class="other" v-else-if="HeaderRightBtnDisplay.other=='btime'">
<span>{{item.btime}}</span>
</div>
<div class="other" v-else-if="HeaderRightBtnDisplay.other=='dateline'">
<span>{{item.dateline}}</span>
</div>
<div class="other" v-else-if="HeaderRightBtnDisplay.other=='mtime'">
<span>{{item.mtime}}</span>
</div>
</template>
</div>
</div>
</div>
</template>
</div>
</div>
<div style="position: relative;height: 40px;" v-if="ImageParams.ValLoading" v-cloak>
<div class="img-loading">
<span class="el-icon-loading"></span>加载中...
</div>
</div>
<div style="position: relative;height: 40px;" v-if="ImageDataList.length&&ImageParams.page>=ImageParams.totalpage&&!ImageParams.loading&&!ImageParams.ValLoading" v-cloak>
<div class="img-loading">已经到底了</div>
</div>
</div>
<div class="container-not" style="display: none;" v-cloak>
<div class="el-empty">
<div class="el-empty__image">
<img src="{MOD_PATH}/image/nodata.svg" />
</div>
<div class="el-empty__description">
<p>暂无数据</p>
</div>
</div>
</div>
<!--{template pc/components/image/ImageWaterfall}-->
<!--{template pc/components/image/ImageRowGrid}-->
<!--{template pc/components/image/ImageList}-->
<!--{template pc/components/image/ImageAudioPlay}-->
<script type="text/javascript">
var JsImageWatch = {
ImageType:{
handler(){
var self = this;
if(this.ImageParams.loading && this.ImageParams.ValLoading){
return false;
}
self.$nextTick(function(){
self.ImageParams.scroll = false;
self.ImageInit();
});
},
deep:true
},
ImageDataList:{
handler(val){
var self = this;
var h = $(document).height()-$('.el-header').height();
this.ImageParams.Height = h;
self.$nextTick(function(){
self.ImageInit();
if(val.length){
$('#container_scroll .container-not').hide();
}else{
$('#container_scroll .container-not').show();
}
});
},
deep:true
}
};
var JsImageData = $.extend({},JsImageWaterfallData,JsImageRowGridData,JsImageListData,ImageAudioPlayData,{
ImageDataIsExpanded:false,
ImageDataList:[],
ImageDataListShow:{},
ImageType:'waterFall',//rowGrid,imageList
ImageParams:{
counttotal:0,
expanded:false,
page: 1,
perpage: 50,
total: 0,
totalpage:0,
scroll:false,
loading:true,
ValLoading:false,
Height:0,
Videovoice:true,
Musicovoice:false
}
});
var JsImageMethods = $.extend({},JsImageWaterfallMethods,JsImageRowGridMethods,JsImageListMethods,ImageAudioPlayMethods,{
ImageCreate(){
var pagesetting = $pagesetting;
var layout = 'waterFall';
var imageexpanded = false;
<!--{if $_G[uid]}-->
if(pagesetting && pagesetting.layout){
layout = pagesetting.layout;
}
var fimageexpanded = '$ImageExpanded';
if(fimageexpanded && parseInt(fimageexpanded)>0){
imageexpanded = true;
}
<!--{else}-->
var flayout = sessionStorage.getItem('Layout');
if(flayout){
layout = flayout;
}else{
if(pagesetting && pagesetting.layout){
layout = pagesetting.layout;
}
}
var fimageexpanded = sessionStorage.getItem('imageexpanded');
if(fimageexpanded == null){
imageexpanded = true;
}else{
if(parseInt(fimageexpanded)){
imageexpanded = true;
}
}
<!--{/if}-->
this.ImageParams.expanded = imageexpanded;
this.ImageType = layout;
},
ImageInit(){
var IsRefresh = true;
if(this.ImageParams.scroll){
IsRefresh = false;
}
if(this.ImageType == 'imageList'){
this.ImagesListInit(IsRefresh);
}else if(this.ImageType == 'rowGrid'){
this.ImagesRowGridInit(IsRefresh);
}else{
this.ImagesWaterfallInit(IsRefresh);
}
this.ImageParams.loading = false;
this.ImageParams.ValLoading = false;
},
ImageDetails(rid){
var arr = [];
for(var i in this.ImageDataList){
arr.push(this.ImageDataList[i].rid)
}
window.localStorage.setItem('imgs',arr.join(','));
if(this.OpenDetailType == 'new'){
window.open(SITEURL+MOD_URL+'&op=details#rid='+rid);
}else{
this.DetailsIframe = SITEURL+MOD_URL+'&op=details&opentype=current#rid='+rid;
}
},
ImageLink(url){
if(url.indexOf('https://')>-1){
window.open(url);
}else{
window.open('https://'+url);
}
return false;
},
ImageMouseenter(e){
this.ImageAudioPlayMouseenter($(e.target));
},
ImageMouseleave(e){
this.ImageAudioPlayMouseleave($(e.target));
},
ImageLayoutScrollShow(){
var self = this;
var H = $('#container_scroll .el-scrollbar__wrap')[0].clientHeight;//获取可视区域高度
var S = $('#container_scroll .el-scrollbar__wrap')[0].scrollTop;
var arr = [];
if(self.ImageType == 'imageList'){
var StoreImgdatas = JSON.parse(JSON.stringify(self.ImageList.StoreImgdatas));
}else if(self.ImageType == 'rowGrid'){
var StoreImgdatas = JSON.parse(JSON.stringify(self.ImageRowGrid.StoreImgdatas));
}else{
var StoreImgdatas = JSON.parse(JSON.stringify(self.ImageWaterfall.StoreImgdatas));
}
self.ImageDataListShow = {};
for(var o in StoreImgdatas){
var item = JSON.parse(JSON.stringify(StoreImgdatas[o]));
if ((H+S) >= item.ptop && S<item.pbottom) {
item['index'] = parseInt(o);
self.ImageDataListShow[item.rid] = item;
}
}
},
Imageload(rid){
var self = this;
var item = $(self.$refs['img_'+rid]);
item.closest('.image-single').css('background','').removeClass('radius');
item.removeClass('opacity').siblings('.img').remove();
},
ImageOperation(type,val){
if(type == 'share'){
var self = this;
$.post('{MOD_URL}&op=ajax&operation=createshare',{
rid:val
},function(data){
if(data.success){
self.$notify({
title: '分享成功',
duration:6000,
dangerouslyUseHTMLString: true,
message: '<p class="address">'+data.success+'</p><div style="text-align: right;margin-top: 6px;"><button type="button" class="el-button el-button--primary el-button--mini copy-share-btn"><span>复制地址</span></button></div>',
position: 'bottom-right'
});
}else{
self.$message({
message: '分享失败',
type: 'error'
});
}
},'json')
}else if(type == 'down'){
window.open(SITEURL+MOD_URL+'&op=download&dpath='+val);
}else if(type == 'star'){
// this.dialogVisible = true;
}
},
});
</script>

View File

@@ -2,11 +2,19 @@
<div>
<div id="top_header" style="padding: 4px 16px;">
<div class="header-content">
<div class="h-left">
<!-- <div class="h-left">
<a href="{MOD_URL}">
<el-image src="data/attachment/sitelogo/sitelogo.png?{VERHASH}" fit="contain"></el-image>
<span class="text">$_G['setting'][sitename]</span>
</a>
</div> -->
<div class="h-left">
<div class="el-page-header__left" @click="goBack">
<i class="el-icon-back"></i>
</div>
<span class="text" >
<span v-cloak>$_G['setting'][sitename]</span>
</span>
</div>
<div class="h-center">
</div>
@@ -97,11 +105,11 @@
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).then(function() {
jQuery.get('user.php?mod=login&op=logging&action=logout&formhash={FORMHASH}&t='+new Date().getTime(),function(data){
window.location.reload();
});
}).catch(() => {
}).catch(function() {
});
break;
@@ -111,6 +119,9 @@
}
},
goBack(){
window.location.href=MOD_URL;
}
},
mounted() {

View File

@@ -0,0 +1,293 @@
<script type="text/javascript">
var ImageAudioPlayData = {
};
var ImageAudioPlayMethods = {
ImageAudioPlayMouseenter(tage){
var find = tage.find('.image-playurl');
tage.closest('.image-inside').addClass('showoperation');
var status = find.data('status');
var type = find.data('type');
if(type == 'video' || type == 'audio'){
find.addClass('show');
}
if(status){
find.data('status',false);
if(type == 'video'){
this.ImageAudioPlayVideo(find);
}
if(type == 'audio'){
this.ImageAudioPlayMusic(find);
}
}
},
ImageAudioPlayMouseleave(tage){
tage.closest('.image-inside').removeClass('showoperation');
tage.find('.image-playurl').removeClass('show');
},
ImageAudioPlayVideo(box){
var self = this;
var str = {
loading:false,
finish:false,
};
if(str.loading){
return false;
}
var realpath = box.data('playurl');
if(!realpath){
return false;
}
str.loading = true;
var html_box = jQuery('<div class="movies-box"><div class="html-loading"><div class="el-loading-mask" style=""><div class="el-loading-spinner"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg></div></div></div></div>');
box.append(html_box);
var html_video = jQuery('<video src="'+realpath+'" class="video"></video>');
var html_progress = jQuery('<div class="progress"><div class="progress-bar" style="width: 0%;"></div></div>');
var html_time = jQuery('<div class="time"></div>');
if(self.ImageParams.Videovoice){
var html_voice = jQuery('<div class="circulars voice no"><i class="ri-volume-up-line yes"></i><i class="ri-volume-mute-line no"></i></div>');
}else{
var html_voice = jQuery('<div class="circulars voice yes"><i class="ri-volume-up-line yes"></i><i class="ri-volume-mute-line no"></i></div>');
}
var video = html_video.get(0);
video.muted = self.ImageParams.Videovoice;
html_box.append(html_video);
video.addEventListener('canplay', function () { //加载数据
if(!str.finish){
html_box.find('.html-loading').remove();
html_box.append(html_voice);
html_box.append(html_progress);
html_box.append(html_time);
if(video.paused && box.hasClass('show')){
var playPromise = video.play()
if (playPromise !== undefined) {
playPromise.then(function(){
video.play()
}).catch(function(){
video.pause();
console.log('播放失败!');
})
}
// video.play();
}
str.finish = true;
}
});
video.addEventListener('timeupdate',function(){
var timeDisplay = video.currentTime;
var progre = parseInt(parseInt(timeDisplay)/parseInt(video.duration) * 100, 10);
box.find('.progress-bar').css('width',progre+'%');
var time = self.ImageAudioPlaySecondToDate(timeDisplay,video.duration);
box.find('.time').text(time);
});
html_voice.click(function(){
if(str.finish){
if(video.muted){
jQuery(this).addClass('yes').removeClass('no');
video.muted = false;
self.ImageParams.Videovoice = false;
}else{
jQuery(this).addClass('no').removeClass('yes');
self.ImageParams.Videovoice = true;
video.muted = true;
}
}
return false;
});
html_box.bind('mouseenter',function(e){
if(str.finish && box.hasClass('show')){
video.currentTime = 0;
var playPromise = video.play()
if (playPromise !== undefined) {
playPromise.then(function(){
video.play()
}).catch(function(){
video.pause();
console.log('播放失败!');
})
}
}
});
var moveStr = {
time:true,
isMove:false
};
html_box.bind('mousemove',function(e){
var item = jQuery(this);
if(moveStr.time){
moveStr.time = false;
setTimeout(function(){
moveStr.isMove = true;
},600);
}
if(video && moveStr.isMove){
var parentOffset = item.offset();
var relX = e.clientX - parentOffset.left;
if(relX > 0 && relX <= item.width()){
var progre = parseInt(parseInt(relX)/item.width() * 100, 10);
item.find('.progress-bar').css('width',progre+'%');
var videoStime = parseInt(progre*(parseInt(video.duration) / 100));
video.currentTime = videoStime;
var time = self.ImageAudioPlaySecondToDate(videoStime,video.duration);
item.find('.time').text(time);
if(video.paused && box.hasClass('show')){
var playPromise = video.play()
if (playPromise !== undefined) {
playPromise.then(function(){
video.play()
}).catch(function(){
video.pause();
console.log('播放失败!');
})
}
}
}
}
});
html_box.bind('mouseleave',function(){
var item = jQuery(this);
video.pause();
moveStr = {
time:true,
isMove:false
};
item.find('.progress-bar').css('width','0%');
});
},
ImageAudioPlayMusic(box){
var self = this;
var str = {
loading:false,
finish:false,
fmousemove:0,
isplay:false,
};
if(str.loading){
return false;
}
var realpath = box.data('playurl');
if(!realpath){
return false;
}
str.loading = true;
var html_box = jQuery('<div class="movies-box"><div class="html-loading"><div class="el-loading-mask" style=""><div class="el-loading-spinner"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg></div></div></div></div>');
var html_time = jQuery('<div class="time"></div>');
var html_line = jQuery('<div class="line"></div>');
if(self.ImageParams.Musicovoice){
var html_voice = jQuery('<div class="circulars voice yes"><i class="ri-pause-line yes"></i><i class="ri-play-line no"></i></div>');
}else{
var html_voice = jQuery('<div class="circulars voice no"><i class="ri-pause-line yes"></i><i class="ri-play-line no"></i></div>');
}
box.append(html_box);
var wavesurfer = WaveSurfer.create({
container: html_box.get(0),
waveColor: '#888888',
progressColor: 'purple',
hideScrollbar:true,
height:box.closest('.image-single').find('.img').height(),
});
wavesurfer.load(realpath);
wavesurfer.on("ready", function(){
if(!str.finish){
str.finish = true;
html_box.find('.html-loading').remove();
html_box.append(html_voice);
html_box.append(html_time);
html_box.append(html_line);
var timeDisplay = parseInt(wavesurfer.getCurrentTime());
var count = parseInt(wavesurfer.getDuration());
var time = self.ImageAudioPlaySecondToDate(timeDisplay,count);
html_box.find('.time').text(time);
if(str.isplay && self.ImageParams.Musicovoice && box.hasClass('show')){
wavesurfer.play();
}
}
});
wavesurfer.on("audioprocess", function(){
var timeDisplay = parseInt(wavesurfer.getCurrentTime());
var count = parseInt(wavesurfer.getDuration());
var time = self.ImageAudioPlaySecondToDate(timeDisplay,count);
html_box.find('.time').text(time);
});
wavesurfer.on("seek", function(){
if(str.isplay && box.hasClass('show')){
wavesurfer.play();
}
});
wavesurfer.on("play", function(){
// console.log(1111)
self.ImageParams.Musicovoice = true;
html_voice.removeClass('no').addClass('yes');
});
wavesurfer.on("pause", function(){
// console.log(222)
// self.ImageParams.Musicovoice = false;
html_voice.removeClass('yes').addClass('no');
});
html_voice.click(function(){
if(str.isplay && str.finish){
wavesurfer.playPause();
}
});
html_box.bind('mouseenter',function(e){
if(str.finish){
var imgHeight = $(this).closest('.image-single').find('.img').height();
wavesurfer.setHeight(imgHeight);
}
str.isplay = true;
if(str.finish && self.ImageParams.Musicovoice){
wavesurfer.play(0);
}
});
html_box.bind('mousemove',function(e){
if(!str.finish){
return false;
}
var clientX = e.clientX;
var parentOffset = jQuery(this).offset();
var relX = clientX - (parentOffset.left+1);
if(relX<=0){
relX = 0;
}
if(relX>=jQuery(this).width()){
relX = jQuery(this).width();
}
str.fmousemove = relX;
// if(_filemanage.view == 2){
// jQuery(this).find('.line').css('left',parseInt(relX));
// }else{
var WaveHeight = jQuery(this).find('wave').height();
jQuery(this).find('.line').css({
left:parseInt(relX),
height:WaveHeight
});
// }
});
html_box.bind('mouseleave',function(){
str.isplay = false;
if(str.finish || wavesurfer){
wavesurfer.pause();
}
});
},
ImageAudioPlaySecondToDate(result,count){
var h = Math.floor(result / 3600) < 10 ? '0'+Math.floor(result / 3600) : Math.floor(result / 3600);
var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
if(count >= 3600){
return result = h + ":" + m + ":" + s;
}else if(count >= 60){
return result = m + ":" + s;
}else{
return result = s;
}
}
};
</script>

View File

@@ -0,0 +1,101 @@
<script type="text/javascript">
var JsImageListData = {
ImageList:{
maxNewtop:0,
maxNewLeft:0,
perpage : 0,
Margin:4,
columns:0,
fcolumns:1,
newWidth:0,//图片宽度
newHeight:0,//图片高度
boxHeight:0,//总体高度
OtherHeight:0,//底部信息
StoreImgdatas:[],
},
};
var JsImageListMethods = {
ImagesListInit(IsRefresh){
var self = this;
if(IsRefresh || !self.ImageDataList.length){
self.ImageList.perpage = 0;
var documentW = document.body.clientWidth;
var boxWidth = $('.image-container').width();
$('.image-wrapper').width(boxWidth);
var columns = 0;
if(documentW>=1024){
columns = 5;
}else if(documentW>=992){
columns = 4;
}else if(documentW>=768){
columns = 3;
}else{
columns = 2;
}
self.ImageList.maxNewLeft = 0;
self.ImageList.maxNewtop = 0;
self.ImageList.fcolumns = 1;
self.ImageList.boxHeight = 0;
self.ImageList.StoreImgdatas = [];
self.ImageDataListShow = {};
self.ImageList.columns = columns;
self.ImageList.newWidth = (boxWidth-(columns*self.ImageList.Margin-self.ImageList.Margin)) / columns;
self.ImageList.newHeight = 2 / 3 * self.ImageList.newWidth;
var OtherHeight = 0
if(self.HeaderRightBtnDisplay.value.indexOf('name')>-1 || self.HeaderRightBtnDisplay.value.indexOf('extension')>-1){
OtherHeight += 45;
}
if(self.HeaderRightBtnDisplay.value.indexOf('other')>-1){
OtherHeight += 21;
}
self.ImageList.OtherHeight = OtherHeight;
}
if(!self.ImageDataList.length){
$('.image-wrapper').height(0);
return false;
}
var arr = [];
var i = 0;
for(var index = self.ImageList.perpage; index < self.ImageDataList.length;++index){
var item = JSON.parse(JSON.stringify(self.ImageDataList[index]));
arr[i] = item;
arr[i]['pwidth'] = self.ImageList.newWidth;
arr[i]['pheight'] = self.ImageList.newHeight;
arr[i]['ptop'] = self.ImageList.maxNewtop;
arr[i]['pleft'] = self.ImageList.maxNewLeft;
arr[i]['pbottom'] = self.ImageList.maxNewtop + self.ImageList.newHeight+self.ImageList.OtherHeight;
self.ImageList.maxNewLeft += self.ImageList.newWidth+self.ImageList.Margin;
self.ImageList.fcolumns++;
if(self.ImageList.fcolumns > self.ImageList.columns){
self.ImageList.maxNewLeft = 0;
self.ImageList.maxNewtop += self.ImageList.newHeight+self.ImageList.Margin+self.ImageList.OtherHeight;
self.ImageList.fcolumns = 1;
self.ImageList.boxHeight = self.ImageList.maxNewtop;
}
i++;
}
self.ImageList.perpage = self.ImageDataList.length;
if(!IsRefresh){
self.ImageList.StoreImgdatas.push.apply(self.ImageList.StoreImgdatas,arr);
}else{
self.ImageList.StoreImgdatas = arr;
}
if(self.ImageList.fcolumns>1&&self.ImageList.fcolumns<self.ImageList.columns+1){
self.ImageList.boxHeight += self.ImageList.newHeight+self.ImageList.OtherHeight;
}
var boxHeight = $('#container_scroll').height();
if(boxHeight>self.ImageList.boxHeight){
$('.image-wrapper').height(boxHeight);
}else{
$('.image-wrapper').height(self.ImageList.boxHeight);
}
self.ImageLayoutScrollShow();
}
};
</script>

View File

@@ -0,0 +1,202 @@
<script type="text/javascript">
var JsImageRowGridData = {
ImageRowGrid:{
maxNewtop:0,
maxNewLeft:0,
rowElems:[],
perpage : 0,
Margin:4,
rowWidth:0,
OtherHeight:0,
SurplusImgdatas:[],
StoreImgdatas:[],
},
};
var JsImageRowGridMethods = {
ImagesRowGridInit(IsRefresh){
var self = this;
var imagerowGrid = self.ImageRowGrid;
if(IsRefresh || !self.ImageDataList.length){
imagerowGrid.maxNewtop = 0;
imagerowGrid.rowWidth = 0;
imagerowGrid.rowElems = [];
imagerowGrid.maxNewLeft = 0;
imagerowGrid.perpage = 0;
imagerowGrid.SurplusImgdatas = [];
imagerowGrid.StoreImgdatas = [];
self.ImageDataListShow = {};
}
if(!self.ImageDataList.length){
$('.image-wrapper').height(0);
return false;
}
var OtherHeight = 0
if(self.HeaderRightBtnDisplay.value.indexOf('name')>-1 || self.HeaderRightBtnDisplay.value.indexOf('extension')>-1){
OtherHeight += 45;
}
if(self.HeaderRightBtnDisplay.value.indexOf('other')>-1){
OtherHeight += 21;
}
imagerowGrid.OtherHeight = OtherHeight;
var arr = {};
if(imagerowGrid.rowElems.length){
for(var s in imagerowGrid.rowElems){
arr[imagerowGrid.rowElems[s].rid] = JSON.parse(JSON.stringify(imagerowGrid.rowElems[s]));
}
imagerowGrid.rowWidth = 0;
imagerowGrid.rowElems = [];
imagerowGrid.maxNewLeft = 0;
}
for(var findex = imagerowGrid.perpage; findex < self.ImageDataList.length;++findex){
var str = JSON.parse(JSON.stringify(self.ImageDataList[findex]));
var rid = str.rid;
arr[rid] = str;
var w = parseInt(arr[rid]['thumbwidth']);
var h = parseInt(arr[rid]['thumbheight']);
var r = w / h;
var r1 = h / w;
if (h > 360) {
h = 360;
w = r * h;
} else if (w < 360) {
w = 360;
h = 360;
}
arr[rid]['pwidth'] = w;
arr[rid]['pheight'] = h;
}
var documentW = document.body.clientWidth;
var boxWidth = $('.image-container').width();
$('.image-wrapper').width(boxWidth);
for(var index in arr){
var item = arr[index];
imagerowGrid.rowWidth += item['pwidth'];
imagerowGrid.rowElems.push(item);
var fdiiff = imagerowGrid.rowWidth + imagerowGrid.Margin * (imagerowGrid.rowElems.length - 1);
var diff = fdiiff - boxWidth;//多出来的宽度
if (fdiiff > boxWidth){
var widthDiff = 0,maxNewHeight = 0;
for(var rowElemIndex in imagerowGrid.rowElems){
var rid = imagerowGrid.rowElems[rowElemIndex].rid;
var rowElemWidth = arr[rid]['pwidth'];//获取一行每个都宽度
var rowElemHeight = arr[rid]['pheight'];//获取一行每个都宽度
var newWidth = rowElemWidth - (rowElemWidth / imagerowGrid.rowWidth) * diff;//新宽度
var newHeight = Math.round(rowElemHeight * (newWidth / rowElemWidth));//新高度
if (widthDiff + 1 - newWidth % 1 >= 0.5) {
widthDiff -= newWidth % 1;
newWidth = Math.floor(newWidth);
} else {
widthDiff += 1 - newWidth % 1;
newWidth = Math.ceil(newWidth);
}
if (newHeight > maxNewHeight){
maxNewHeight = newHeight;
}
arr[rid]['pwidth'] = newWidth;
arr[rid]['pheight'] = maxNewHeight;
arr[rid]['ptop'] = imagerowGrid.maxNewtop;
arr[rid]['pbottom'] = imagerowGrid.maxNewtop+maxNewHeight+imagerowGrid.OtherHeight;
if(rowElemIndex > 0){
arr[rid]['pleft'] = imagerowGrid.maxNewLeft;
}else{
arr[rid]['pleft'] = 0;
}
imagerowGrid.maxNewLeft += newWidth + imagerowGrid.Margin;
}
for(var frowElemIndex in imagerowGrid.rowElems){//规整每行的高
var rowElem = imagerowGrid.rowElems[frowElemIndex].rid;
var height = arr[rowElem]['pheight'];//获取一行每个都宽度
if(height<maxNewHeight){
arr[rowElem]['pbottom'] += maxNewHeight-height;
arr[rowElem]['pheight'] = maxNewHeight;
}
}
imagerowGrid.maxNewtop += maxNewHeight + imagerowGrid.Margin +imagerowGrid.OtherHeight
imagerowGrid.rowElems = [];
imagerowGrid.rowWidth = 0;
imagerowGrid.maxNewLeft = 0;
}
}
var surplusheight = 0;
if (imagerowGrid.rowElems.length) {
var maxNewHeight = 0;
for(var f in imagerowGrid.rowElems){
var rowElem = imagerowGrid.rowElems[f].rid;
var rowElemWidth = arr[rowElem].pwidth;//获取一行每个都宽度
var rowElemHeight = arr[rowElem].pheight;//获取一行每个都宽度
arr[rowElem]['pwidth'] = rowElemWidth;
arr[rowElem]['pheight'] = rowElemHeight;
arr[rowElem]['ptop'] = imagerowGrid.maxNewtop;
arr[rowElem]['pbottom'] = imagerowGrid.maxNewtop+rowElemHeight+imagerowGrid.OtherHeight;
if (rowElemHeight > maxNewHeight){
maxNewHeight = rowElemHeight;
}
if(f > 0){
arr[rowElem]['pleft'] = imagerowGrid.maxNewLeft;
}else{
arr[rowElem]['pleft'] = 0;
}
imagerowGrid.maxNewLeft += rowElemWidth + imagerowGrid.Margin;
}
for(var ff in imagerowGrid.rowElems){
var rowElem = imagerowGrid.rowElems[ff].rid;
imagerowGrid.SurplusImgdatas.push(rowElem);
var height = arr[rowElem]['pheight'];
if(height<maxNewHeight){
arr[rowElem]['pbottom'] += maxNewHeight-height;
arr[rowElem]['pheight'] = maxNewHeight;
}
}
surplusheight = maxNewHeight+imagerowGrid.OtherHeight+imagerowGrid.Margin;
// imagerowGrid.maxNewLeft = 0;
}else{
imagerowGrid.SurplusImgdatas = [];
}
// $('.image-wrapper').css({
// height:imagerowGrid.maxNewtop+surplusheight+'px',
// });
var boxHeight = $('#container_scroll').height();
if(boxHeight>(imagerowGrid.maxNewtop+surplusheight)){
$('.image-wrapper').height(boxHeight);
}else{
$('.image-wrapper').height(imagerowGrid.maxNewtop+surplusheight);
}
imagerowGrid.perpage = self.ImageDataList.length;
var newarr = [];
for(var n in arr){
newarr.push(arr[n]);
}
if(!IsRefresh){
var StoreImgdatas = JSON.parse(JSON.stringify(imagerowGrid.StoreImgdatas));
if(imagerowGrid.SurplusImgdatas.length){
var splic = [];
for(var b in StoreImgdatas){
if(imagerowGrid.SurplusImgdatas.indexOf(StoreImgdatas[b].rid)>-1){
splic.push(b)
}
}
for(var h in splic){
imagerowGrid.StoreImgdatas.splice(parseInt(splic[h]),1);
}
}
// for(var y in newarr){
// imagerowGrid.StoreImgdatas.push(newarr[y])
// }
imagerowGrid.StoreImgdatas.push.apply(imagerowGrid.StoreImgdatas,newarr);
}else{
imagerowGrid.StoreImgdatas = newarr;
}
self.ImageLayoutScrollShow()
},
};
</script>

View File

@@ -0,0 +1,119 @@
<script type="text/javascript">
var JsImageWaterfallData = {
ImageWaterfall:{
imgWidth : 252,
imgArr : [],
ImgAll : [],
total : 0,
columns:0,
boxHeight:0,
OtherHeight:0,
perpage:0,
Margin:8,
StoreImgdatas:[],
}
};
var JsImageWaterfallMethods = {
ImagesWaterfallInit(IsRefresh){
var self = this;
var documentW = document.body.clientWidth;
var boxWidth = $('.image-container').width();
if(IsRefresh || !self.ImageDataList.length){
self.ImageWaterfall.imgArr = [];
self.ImageWaterfall.perpage = 0;
self.ImageWaterfall.StoreImgdatas = [];
self.ImageDataListShow = {};
if(documentW<768){
self.ImageWaterfall.isMax = false;
self.ImageWaterfall.columns = 2;
self.ImageWaterfall.imgWidth = boxWidth/2;
}else{
self.ImageWaterfall.isMax = true;
self.ImageWaterfall.imgWidth = 252;
self.ImageWaterfall.columns = parseInt(boxWidth/self.ImageWaterfall.imgWidth);
}
var OtherHeight = 0
if(self.HeaderRightBtnDisplay.value.indexOf('name')>-1 || self.HeaderRightBtnDisplay.value.indexOf('extension')>-1){
OtherHeight += 45;
}
if(self.HeaderRightBtnDisplay.value.indexOf('other')>-1){
OtherHeight += 21;
}
self.ImageWaterfall.OtherHeight = OtherHeight;
}
if(!self.ImageDataList.length){
$('.image-wrapper').height(0);
return false;
}
var pwidth = self.ImageWaterfall.imgWidth;
var arr = [];
var i = 0;
for (var index = self.ImageWaterfall.perpage; index < self.ImageDataList.length; index++){
arr[i] = JSON.parse(JSON.stringify(self.ImageDataList[index]));
var ppwidth = pwidth-8;
if(self.ImageWaterfall.isMax){
arr[i]['pwidth'] = 252;
}else{
arr[i]['pwidth'] = pwidth;
}
var h = ppwidth/parseFloat(arr[i].thumbwidth)*parseInt(arr[i].thumbheight)>120?ppwidth/parseFloat(arr[i].thumbwidth)*parseInt(arr[i].thumbheight):120;
arr[i]['pheight'] = h;
if (index < self.ImageWaterfall.columns) {
arr[i]['ptop'] = 0;
arr[i]['pleft'] = pwidth*index;
arr[i]['pbottom'] = arr[i]['ptop']+arr[i]['pheight']+self.ImageWaterfall.Margin+self.ImageWaterfall.OtherHeight;
var imgArr = JSON.parse(JSON.stringify(arr[i]));
self.ImageWaterfall.imgArr.push(imgArr);
}else{
if(self.ImageWaterfall.imgArr.length){
var minHeight = self.ImageWaterfall.imgArr[0]['pbottom'];
var findex = 0;
for (var j = 0; j < self.ImageWaterfall.imgArr.length; j++) {
if (minHeight > self.ImageWaterfall.imgArr[j]['pbottom']) {
minHeight = self.ImageWaterfall.imgArr[j]['pbottom'];
findex = j;
}
}
arr[i]['ptop'] = JSON.parse(JSON.stringify(self.ImageWaterfall.imgArr[findex]['pbottom']));
arr[i]['pleft'] = JSON.parse(JSON.stringify(self.ImageWaterfall.imgArr[findex]['pleft']));
arr[i]['pbottom'] = arr[i]['ptop']+arr[i]['pheight']+self.ImageWaterfall.Margin+self.ImageWaterfall.OtherHeight;
var imgArr = JSON.parse(JSON.stringify(arr[i]));
self.ImageWaterfall.imgArr[findex] = imgArr;
}
}
i++;
}
self.ImageWaterfall.perpage = self.ImageDataList.length;
if(self.ImageParams.scroll){
self.ImageWaterfall.StoreImgdatas.push.apply(self.ImageWaterfall.StoreImgdatas,arr);
}else{
self.ImageWaterfall.StoreImgdatas = arr;
}
var fminHeight = 0;
if(self.ImageWaterfall.imgArr.length){
for (var j = 0; j < self.ImageWaterfall.imgArr.length; j++) {
if (fminHeight < self.ImageWaterfall.imgArr[j]['pbottom']) {
fminHeight = self.ImageWaterfall.imgArr[j]['pbottom'];
}
}
}
self.ImageWaterfall.boxHeight = fminHeight;
$('.image-wrapper').css({
width:self.ImageWaterfall.columns*pwidth+'px'
});
var boxHeight = $('#container_scroll').height();
if(boxHeight>self.ImageWaterfall.boxHeight){
$('.image-wrapper').height(boxHeight);
}else{
$('.image-wrapper').height(self.ImageWaterfall.boxHeight);
}
self.ImageLayoutScrollShow();
},
};
</script>

View File

@@ -161,7 +161,7 @@
var self = this;
var param = {};
for(var key in self.ScreenValue){
if(type && type != 'hash' && key == type){
if(type && type != 'hash' && key == type && key!='tag'){
continue;
}
switch(key){
@@ -318,6 +318,7 @@
self.ScreenValue[type].loading = true;
}
var param = self.ScreenGetParam(type);
console.log(param)
param['skey'] = type;
if(self.Appid && self.Appid!='all'){
param['appid'] = self.Appid;
@@ -656,7 +657,11 @@
// self.ScreenValue.classify.DefaultExpandedKeys = farr[1].split(',');
break;
case 'tag':
self.ScreenValue.tag.value = farr[1].split(',');
var tags = farr[1].split(',');
for(var t in tags){
self.ScreenValue.tag.value.push(parseInt(tags[t]))
}
console.log(self.ScreenValue.tag.value)
break;
case 'tagrelative':
self.ScreenValue.tag.tagrelative = farr[1];

View File

@@ -2,44 +2,96 @@
<div class="image-top-message">
<!-- <div class="left" v-cloak>找到文件&nbsp;{{ImageParams.counttotal}}&nbsp;个</div> -->
<div class="right" v-if="DocumentTemplate==2 && ImageDataIsExpanded"><el-checkbox v-model="ImageParams.expanded" @change="ImageExpandedChange">显示子分类内容</el-checkbox></div>
</div>
<div class="collects-move-btn-box" v-if="ImageCollect.show" :style="{'padding-left':DocumentLeftWidth+'px'}">
<el-tooltip class="item" effect="dark" content="收藏" placement="top">
<div class="item" @click="ImageCollect.dialogVisible=true">
<i class="ri-star-fill"></i>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="取消选中" placement="top">
<div class="item" @click="ImageCollectCancelChecked">
<i class="ri-close-circle-fill"></i>
</div>
</el-tooltip>
</div>
<div class="image-container">
<div class="image-wrapper">
<template v-for="item in ImageDataListShow">
<div class="image-item" :key="item.rid" :style="{top:item.ptop+'px',left:item.pleft+'px',width:item.pwidth+'px'}" >
<div
class="image-item"
:class="{checked:ImageCollect.show&&ImageCollect.rids.indexOf(item.rid)>-1}"
:key="item.rid"
:data-rid="item.rid"
:style="{top:item.ptop+'px',left:item.pleft+'px',width:item.pwidth+'px'}"
@click="ImageCtrlClick(item.rid)">
<div class="collect-checkeds" @click="ImageCtrlClick(item.rid,'1')">
<div class="check">
<i class="el-icon-check"></i>
</div>
</div>
<div class="image-inside">
<!--{if $_G[uid]}-->
<!-- <div class="el-button-group" :class="{border:!ImageCollect.quick}" v-if="!ImageDocumentCtrl">
<button type="button" class="el-button el-button--danger reference el-button--medium" @click.stop="ImageQuickChangeCollect(item.rid)">
<span>收藏</span>
</button>
<el-tooltip v-if="ImageCollect.quick" class="item" effect="dark" :content="ImageCollect.name?'收藏到:'+ImageCollect.name:''" placement="top">
<button type="button" class="el-button el-button--danger el-dropdown__caret-button el-button--medium" style="padding: 0;" @click.stop="ImageQuickAddCollect(item.rid)">
<img style="height: 20px;" src="dzz/pichome/image/flashlight.png" alt="">
</button>
</el-tooltip>
</div> -->
<!--{/if}-->
<div class="topFlex" v-if="!ImageDocumentCtrl">
<!-- <div v-if="parseInt(item.share)" class="circulars" @click.stop="ImageOperation('share',item.rid)">
<i class="ri-share-line"></i>
</div> -->
<!-- <div v-if="parseInt(item.download)" class="circulars" @click.stop="ImageOperation('down',item.dpath)">
<i class="ri-download-2-line"></i>
</div> -->
<el-dropdown trigger="click" @command="ImageOperation" placement="bottom" v-if="parseInt(item.share) || parseInt(item.download)">
<div class="circulars">
<i class="ri-more-2-fill"></i>
</div>
<el-dropdown-menu slot="dropdown" style="width: 165px;">
<el-dropdown-item v-if="parseInt(item.share)" :command="ImageOperationVal('share',item.rid)">
<i class="ri-share-line" style="vertical-align: bottom;font-size: 16px;"></i>
分享
</el-dropdown-item>
<el-dropdown-item v-if="parseInt(item.download)" :command="ImageOperationVal('down',item.dpath)" class="circulars">
<i class="ri-download-2-line" style="vertical-align: bottom;font-size: 16px;"></i>
下载
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div
class="image-single radius"
:class="[{'border':item.opentype=='video'||item.opentype=='audio'},ImageType]"
:style="{height: item.pheight+'px',width: (item.pwidth-8)+'px',background:'#'+item.color}"
@mouseenter="ImageMouseenter"
@mouseleave="ImageMouseleave"
@click="item.type!='audio'&&ImageDetails(item.rid)">
@click="item.type!='audio'&&!ImageDocumentCtrl&&ImageDetails(item.rid)">
<div class="image-storage">
<img class="img thumbnail" :src="item.icondata" alt="">
<img class="img opacity" :src="item.icondata" alt="" @load="Imageload(item.rid)" :ref="'img_'+item.rid" />
</div>
<div class="topFlex" v-if="parseInt(item.download)||parseInt(item.share)">
<div v-if="parseInt(item.share)" class="circulars" @click.stop="ImageOperation('share',item.rid)">
<i class="ri-share-line"></i>
</div>
<div v-if="parseInt(item.download)" class="circulars" @click.stop="ImageOperation('down',item.dpath)">
<i class="ri-download-2-line"></i>
</div>
</div>
<template v-if="item.type=='audio'">
<div @click.stop="ImageDetails(item.rid)" class="circulars link">
<div v-if="!ImageDocumentCtrl" @click.stop="ImageDetails(item.rid)" class="circulars link">
<i class="ri-search-line"></i>
<span class="el-link--inner">详情</span>
</div>
</template>
<template v-else>
<div v-if="item.link" @click.stop="ImageLink(item.link)" class="circulars link">
<div v-if="item.link&&!ImageDocumentCtrl" @click.stop="ImageLink(item.link)" class="circulars link">
<i class="ri-link"></i>
<span class="el-link--inner">链接</span>
</div>
</template>
<div v-if="item.type=='audio'||item.type=='video'" class="image-playurl" data-status="true" :data-type="item.type" :data-playurl="item.realpath">
<div v-if="!ImageDocumentCtrl && (item.type=='audio'||item.type=='video')" class="image-playurl" data-status="true" :data-type="item.type" :data-playurl="item.realpath" :class="{exhibit:!parseInt(item.share)&&!parseInt(item.download)}">
</div>
@@ -103,10 +155,17 @@
</div>
</div>
</div>
<!--{template pc/components/index/image/ImageWaterfall}-->
<!--{template pc/components/index/image/ImageRowGrid}-->
<!--{template pc/components/index/image/ImageList}-->
<!--{template pc/components/index/image/ImageAudioPlay}-->
<add-star-tree :rids="ImageCollect.rids" :dialogvisible="ImageCollect.AdddialogVisible" @closeaddcollectdialog="ImageCloseAddcollectdialog"></add-star-tree>
<star-tree-dialog
:rids="ImageCollect.rids"
:dialogvisible="ImageCollect.dialogVisible"
@closecollectdialog="ImageClosecollectdialog"
@openaddcollect="ImageOpenAddCollect"
@addcollectsuccess="ImageOpenAddCollectsuccess"></star-tree-dialog>
<!--{template pc/components/image/ImageWaterfall}-->
<!--{template pc/components/image/ImageRowGrid}-->
<!--{template pc/components/image/ImageList}-->
<!--{template pc/components/image/ImageAudioPlay}-->
<script type="text/javascript">
var JsImageWatch = {
ImageType:{
@@ -141,6 +200,7 @@
}
};
var JsImageData = $.extend({},JsImageWaterfallData,JsImageRowGridData,JsImageListData,ImageAudioPlayData,{
ImageDocumentCtrl:false,
ImageDataIsExpanded:false,
ImageDataList:[],
ImageDataListShow:{},
@@ -158,10 +218,24 @@
Height:0,
Videovoice:true,
Musicovoice:false
},
ImageCollect:{
show:false,
name:'',
dialogVisible:false,
AdddialogVisible:false,
rids:[],
quick:false
}
});
var JsImageMethods = $.extend({},JsImageWaterfallMethods,JsImageRowGridMethods,JsImageListMethods,ImageAudioPlayMethods,{
ImageCreate(){
var collectkey = JSON.parse(localStorage.getItem('collectkey'));
if(collectkey){
this.ImageCollect.name = collectkey.name;
this.ImageCollect.quick = true;
}
var pagesetting = $pagesetting;
var layout = 'waterFall';
var imageexpanded = false;
@@ -196,6 +270,77 @@
this.ImageParams.expanded = imageexpanded;
this.ImageType = layout;
},
ImageCloseAddcollectdialog(){
this.ImageCollect.AdddialogVisible = false;
},
ImageClosecollectdialog(){
this.ImageCollect.dialogVisible = false;
},
ImageCtrlClick(rid,type){
var self = this;
if(!self.ImageDocumentCtrl && !type){
return false;
}
var index = self.ImageCollect.rids.indexOf(rid);
if(index>-1){
self.ImageCollect.rids.splice(index,1);
}else{
self.ImageCollect.rids.push(rid);
}
if(self.ImageCollect.rids.length){
self.ImageCollect.show = true;
}else{
self.ImageCollect.show = false;
self.ImageDocumentCtrl = false;
}
},
ImageCollectCancelChecked(){
this.ImageCollect.show = false;
this.ImageCollect.rids = [];
},
ImageOpenAddCollect(val){
this.ImageCollect.rids = [val];
this.ImageCollect.dialogVisible = false;
this.ImageCollect.AdddialogVisible = true;
},
ImageOpenAddCollectsuccess(){
var collectkey = JSON.parse(localStorage.getItem('collectkey'));
if(collectkey){
this.ImageCollect.name = collectkey.name;
this.ImageCollect.quick = true;
}
this.ImageCollect.show = false;
this.ImageCollect.rids = [];
},
ImageQuickChangeCollect(rid){
this.ImageCollect.rids = [rid];
this.ImageCollect.dialogVisible = true;
},
ImageQuickAddCollect(rid){
var self = this;
var collectkey = JSON.parse(localStorage.getItem('collectkey'));
if(collectkey){
var keys = collectkey.key.split('-');
var param = {
rids:rid,
clid:keys[0].replace('p','')
}
if(keys.length>1){
param['cid'] = keys.pop()
}
$.post(SITEURL+DZZSCRIPT+'?mod=collection&op=collect&do=addfilecollect',param,function(json){
if(json.success){
self.$message({
type:'success',
message:'收藏成功'
});
}else{
self.$message.error(json.error);
}
},'json');
}
},
ImageInit(){
var IsRefresh = true;
if(this.ImageParams.scroll){
@@ -268,7 +413,15 @@
item.removeClass('opacity').siblings('.img').remove();
},
ImageOperation(type,val){
ImageOperationVal(type,val){
return {
type:type,
val:val
};
},
ImageOperation(command){
var type = command.type;
var val = command.val;
if(type == 'share'){
var self = this;
$.post('{MOD_URL}&op=ajax&operation=createshare',{
@@ -314,6 +467,19 @@
sessionStorage.setItem('imageexpanded',status?1:0);
<!--{/if}-->
this.CommonGetImageData();
},
ImageMounted(){
var self = this;
// $(document).keydown(function(e){
// if (e.which === 17 && !self.ImageDocumentCtrl){
// self.ImageDocumentCtrl = true;
// }
// }).keyup(function(e){
// if (e.which === 17 && self.ImageDocumentCtrl){
// self.ImageDocumentCtrl = false;
// }
// });
}
});
</script>

View File

@@ -61,6 +61,8 @@
this.HeaderKeyword=value.slice(0,100)
}
this.HdeaderSearchInputKeyword(1);
}else{
this.HdeaderSearchInputSubmit();
}
},300),
HeaderKeywordInputKeyup(){

View File

@@ -2,6 +2,7 @@
<el-dropdown trigger="click" @command="HeaderRightAvatar" v-cloak>
<div id="dzz_avatar_img">{eval echo avatar_block($_G[uid]);} </div>
<el-dropdown-menu slot="dropdown" style="width: 165px;">
<!-- <el-dropdown-item command="collection">收藏夹</el-dropdown-item> -->
<el-dropdown-item command="personal">个人设置</el-dropdown-item>
<el-dropdown-item command="help">帮助文档</el-dropdown-item>
<el-dropdown-item command="problem">问题反馈</el-dropdown-item>
@@ -29,6 +30,9 @@
HeaderRightAvatar(type){
var self = this;
switch(type){
case 'collection':
window.location.href = DZZSCRIPT + '?mod=collection';
break;
case 'personal':
window.location.href = MOD_URL + '&op=user&do=personal';
break;
@@ -77,11 +81,11 @@
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).then(function() {
jQuery.get('user.php?mod=login&op=logging&action=logout&formhash={FORMHASH}&t='+new Date().getTime(),function(data){
window.location.reload();
});
}).catch(() => {
}).catch(function() {
});
break;

View File

@@ -44,6 +44,9 @@
this.ScreenSubmit();
},
ScreenGetTagGroupNum(ParamData){
if(ParamData['cid']){
ParamData['cid'] = '';
}
var self = this;
$.post(MOD_URL+'&op=ajax&operation=search_menu',ParamData,function(data){
if(data.catdata){

View File

@@ -25,10 +25,10 @@
@node-click="LeftTreeClick"
:filter-node-method="LeftTreeFilterNode"
highlight-current>
<div class="custom-tree-node" slot-scope="{ node, data }">
<div class="custom-tree-node" slot-scope="{ node, data }" :class="{'tree-node-color':node.level==1?Appid==data.fid:Appid==data.appid}">
<div class="name" v-cloak>{{ node.label }}</div>
<div style="color: var(--content-textMessage);font-size: 14px;" v-if="node.expanded && parseInt(data.nosubfilenum)>0">{{data.nosubfilenum}}</div>
<div style="color: var(--content-textMessage);font-size: 14px;" v-if="!node.expanded && parseInt(data.filenum)>0">{{data.filenum}}</div>
<div class="num" v-if="node.expanded && parseInt(data.nosubfilenum)>0">{{data.nosubfilenum}}</div>
<div class="num" v-if="!node.expanded && parseInt(data.filenum)>0">{{data.filenum}}</div>
</div>
</el-tree>
</div>

View File

@@ -16,6 +16,18 @@
<el-scrollbar class="page-component__scroll">
<div class="content" style="padding: 16px 25px;">
<el-form ref="form" :model="formdata" label-width="200px">
<!-- <el-form-item label="本机地址:">
<el-input class="maxWidth" v-model="formdata.sitename"></el-input>
<p class="tipTxt">用于服务器本机访问</p>
</el-form-item>
<el-form-item label="网络地址:">
<el-input class="maxWidth" v-model="formdata.sitename"></el-input>
<p class="tipTxt">用于内网其它电脑、手机、平板访问</p>
</el-form-item> -->
<!-- <el-form-item label="设备号:">
<el-input class="maxWidth" v-model="formdata.sitename"></el-input>
<p class="tipTxt">服务器识别码,用于与商业功能绑定</p>
</el-form-item> -->
<el-form-item label="站点LOGO">
<el-upload
class="avatar-uploader"

View File

@@ -1,257 +1,259 @@
<!--{template pc/frame/header_simple_start}-->
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/admin.css?{VERHASH}" />
<style type="text/css">
.tipTxt{
margin-left: 6px;
display: inline-block;
}
.avatarstatus{
width: 100%;
height: 100%;
}
.avatarstatus .img-circle{
border-radius: 0;
}
.page-content .Topcarousel{
line-height: 148px;
}
</style>
<!--{template pc/frame/header_simple_end}-->
<div id="dzzoffice">
<el-container>
<el-header height="auto" style="padding: 0;z-index: 10;">
<page-header :isscreenshow="false"></page-header>
</el-header>
<el-main>
<div class="page-content">
<el-scrollbar class="page-component__scroll">
<div class="content" style="padding: 16px 25px;">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="200px">
<el-form-item label="头像:">
<el-upload
class="avatar-uploader"
action="{MOD_URL}&op=user&do=uploadimg"
name="file"
accept="image/png,image/jpg,image/jpeg,image/gif"
:on-success="handleLogoSuccess"
:on-progress="handleLogoProgress"
:before-upload="beforeLogoUpload"
:show-file-list="false">
<el-progress v-show="ispercentage" type="circle" :width="148" :percentage="percentage"></el-progress>
<template v-if="ruleForm.imgpath||avatarstatus=='1'">
<template v-if="ruleForm.imgpath">
<el-image class="avatarimg" fit="contain" :src="ruleForm.imgpath"></el-image>
</template>
<template v-else>
<div class="avatarstatus">
<img :src="'avatar.php?uid=1&random='+Math.ceil(Math.random()*100)" title="admin" class="img-circle special_avatar_class">
</div>
</template>
</template>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="邮箱:" prop="email">
<el-input class="maxWidth" v-model.trim="ruleForm.email"></el-input>
<p class="tipTxt">用于登录</p>
</el-form-item>
<el-form-item label="用户名:" prop="nickname">
<el-input class="maxWidth" v-model.trim="ruleForm.nickname"></el-input>
<p class="tipTxt">用于登录,站点中不显示</p>
</el-form-item>
<el-form-item label="姓名:" prop="username">
<el-input class="maxWidth" v-model.trim="ruleForm.username"></el-input>
<p class="tipTxt">用户界面中显示,不能用于登录</p>
</el-form-item>
<el-form-item label="手机号:" prop="phone">
<el-input class="maxWidth" v-model.trim="ruleForm.phone"></el-input>
</el-form-item>
<el-form-item label="微信号:" prop="weixinid">
<el-input class="maxWidth" v-model.trim="ruleForm.weixinid"></el-input>
</el-form-item>
<el-form-item label="新密码:" prop="password">
<el-input class="maxWidth" v-model.trim="ruleForm.password"></el-input>
</el-form-item>
<el-form-item label="确认新密码:" prop="password2">
<el-input class="maxWidth" v-model.trim="ruleForm.password2"></el-input>
</el-form-item>
<el-form-item label="主题色:" prop="themecolor">
<div class="theme-block" v-for="item in themes" @click="handleColor(item.val)">
<el-tooltip class="item" effect="dark" :content="item.txt" placement="bottom">
<div class="bg" :class="item.val==ruleForm.themecolor?'active':''" :style="item.color">
<div class="triangle"></div>
<i class="icon el-icon-check"></i>
</div>
</el-tooltip>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSubmit" :loading="btnloading">保存更改</el-button>
</el-form-item>
</el-form>
</div>
</el-scrollbar>
</div>
</el-main>
</el-container>
</div>
<!--{template pc/components/headerAdmin/index}-->
<script type="text/javascript">
new Vue({
el: '#dzzoffice',
data() {
var self = this;
var inputpassword = function(rule, value, callback){
if (value) {
if (self.ruleForm.password2 !== '') {
self.$refs.ruleForm.validateField('password2');
}
callback();
}else{
callback();
}
};
var inputpassword2 = function(rule, value, callback){
if (value !== self.ruleForm.password) {
callback(new Error('两次输入密码不一致!'));
} else {
callback();
}
};
return {
percentage:0,
ispercentage:false,
btnloading:false,
avatarstatus:'$userdata[avatarstatus]',
ruleForm: {
imgpath:'',
email:'$userdata[email]',
nickname:'$userdata[nickname]',
username:'$userdata[username]',
phone:'$userdata[phone]',
weixinid:'$userdata[weixinid]',
password:'',
password2:'',
themecolor:'$theme'
},
rules: {
email: [
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
],
nickname: [
{ required: true, message: '请输入用户名', trigger: 'blur' },
{ min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: ['blur', 'change'] }
],
username: [
{ required: true, message: '请输入姓名', trigger: 'blur' },
{ min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: ['blur', 'change'] }
],
phone: [
{ required: false, message: '请输入手机号'}
],
weixinid: [
{ required: false, message: '请输入微信' },
],
password: [
{ validator: inputpassword, trigger: ['blur', 'change'] }
],
password2: [
{ validator: inputpassword2, trigger: ['blur', 'change'] }
]
},
themes:[
{txt:'自动(依系统设置)',color:'',val:''},
{txt:'白色',color:'background:#D0D0D0',val:'white'},
{txt:'浅灰色',color:'background:#808080',val:'lightgrey'},
{txt:'深灰色',color:'background:#444444',val:'darkgrey'},
{txt:'色',color:'background:#333333',val:'black'},
{txt:'深色',color:'background:#2A356D',val:'navyblue'},
{txt:'色',color:'background:#463275',val:'purple'},
],
}
},
created() {
// console.log(11111)
// var avatarstatus =
},
methods: {
handleColor(val){
this.ruleForm.themecolor = val;
},
beforeLogoUpload(file){
var self = this;
var isJPG = ['image/png','image/jpeg','image/jpg','image/gif'];
var isLt2M = file.size / 1024 / 1024 < 2;
if (isJPG.indexOf(file.type)<0) {
self.$message.error('图片格式错误');
}
if (!isLt2M) {
self.$message.error('图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
self.ispercentage = true;
},
handleLogoSuccess(res, file){
if(res.error){
var self = this;
self.$message.error(res.error);
}else{
this.ruleForm.imgpath = res.path;
}
},
handleLogoProgress(event, file, fileList) {
var percent = parseInt(event.percent);
this.percentage = percent;
if(percent == 100){
this.ispercentage = false;
this.percentage = 0
}
},
handleSubmit(){
var self = this;
self.$refs.ruleForm.validate(function(valid){
if (valid) {
var params = {
'accountedit':true,
'formhash':'{FORMHASH}',
'uid':'$uid',
'email':self.ruleForm.email,
'nickname':self.ruleForm.nickname,
'username':self.ruleForm.username,
'phone':self.ruleForm.phone,
'weixinid':self.ruleForm.weixinid,
'password':self.ruleForm.password,
'password2':self.ruleForm.password2,
'themecolor':self.ruleForm.themecolor,
};
if(self.ruleForm.imgpath){
params['imgpath'] = self.ruleForm.imgpath;
}
$.post(MOD_URL+"&op=user&do=personal",params,function(res){
if(res.success){
// self.$message({
// message: '保存成功',
// type: 'success'
// });
window.location.reload();
}else{
self.$message.error(res.msg);
}
},'json');
} else {
self.$message.error('验证失败');
return false;
}
});
}
},
mounted() {}
})
</script>
<!--{template pc/frame/header_simple_start}-->
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/admin.css?{VERHASH}" />
<style type="text/css">
.tipTxt{
margin-left: 6px;
display: inline-block;
}
.avatarstatus{
width: 100%;
height: 100%;
}
.avatarstatus .img-circle{
border-radius: 0;
width: 100%;
height: 100%;
}
.page-content .Topcarousel{
line-height: 148px;
}
</style>
<!--{template pc/frame/header_simple_end}-->
<div id="dzzoffice">
<el-container>
<el-header height="auto" style="padding: 0;z-index: 10;">
<page-header :isscreenshow="false"></page-header>
</el-header>
<el-main>
<div class="page-content">
<el-scrollbar class="page-component__scroll">
<div class="content" style="padding: 16px 25px;">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="200px">
<el-form-item label="头像:">
<el-upload
class="avatar-uploader"
action="{MOD_URL}&op=user&do=uploadimg"
name="file"
accept="image/png,image/jpg,image/jpeg,image/gif"
:on-success="handleLogoSuccess"
:on-progress="handleLogoProgress"
:before-upload="beforeLogoUpload"
:show-file-list="false">
<el-progress v-show="ispercentage" type="circle" :width="148" :percentage="percentage"></el-progress>
<template v-if="ruleForm.imgpath||avatarstatus=='1'">
<template v-if="ruleForm.imgpath">
<el-image class="avatarimg" fit="contain" :src="ruleForm.imgpath"></el-image>
</template>
<template v-else>
<div class="avatarstatus">
<img :src="'avatar.php?uid=1&random='+Math.ceil(Math.random()*100)" title="admin" class="img-circle special_avatar_class">
</div>
</template>
</template>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label="邮箱:" prop="email">
<el-input class="maxWidth" v-model.trim="ruleForm.email"></el-input>
<p class="tipTxt">用于登录</p>
</el-form-item>
<el-form-item label="用户名:" prop="nickname">
<el-input class="maxWidth" v-model.trim="ruleForm.nickname"></el-input>
<p class="tipTxt">用于登录,站点中不显示</p>
</el-form-item>
<el-form-item label="姓名:" prop="username">
<el-input class="maxWidth" v-model.trim="ruleForm.username"></el-input>
<p class="tipTxt">用户界面中显示,不能用于登录</p>
</el-form-item>
<el-form-item label="手机号:" prop="phone">
<el-input class="maxWidth" v-model.trim="ruleForm.phone"></el-input>
</el-form-item>
<el-form-item label="微信号:" prop="weixinid">
<el-input class="maxWidth" v-model.trim="ruleForm.weixinid"></el-input>
</el-form-item>
<el-form-item label="新密码:" prop="password">
<el-input class="maxWidth" v-model.trim="ruleForm.password"></el-input>
</el-form-item>
<el-form-item label="确认新密码:" prop="password2">
<el-input class="maxWidth" v-model.trim="ruleForm.password2"></el-input>
</el-form-item>
<el-form-item label="主题色:" prop="themecolor">
<div class="theme-block" v-for="item in themes" @click="handleColor(item.val)">
<el-tooltip class="item" effect="dark" :content="item.txt" placement="bottom">
<div class="bg" :class="item.val==ruleForm.themecolor?'active':''" :style="item.color">
<div class="triangle"></div>
<i class="icon el-icon-check"></i>
</div>
</el-tooltip>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSubmit" :loading="btnloading">保存更改</el-button>
</el-form-item>
</el-form>
</div>
</el-scrollbar>
</div>
</el-main>
</el-container>
</div>
<!--{template pc/components/headerAdmin/index}-->
<script type="text/javascript">
new Vue({
el: '#dzzoffice',
data() {
var self = this;
var inputpassword = function(rule, value, callback){
if (value) {
if (self.ruleForm.password2 !== '') {
self.$refs.ruleForm.validateField('password2');
}
callback();
}else{
callback();
}
};
var inputpassword2 = function(rule, value, callback){
if (value !== self.ruleForm.password) {
callback(new Error('两次输入密码不一致!'));
} else {
callback();
}
};
return {
percentage:0,
ispercentage:false,
btnloading:false,
avatarstatus:'$userdata[avatarstatus]',
ruleForm: {
imgpath:'',
email:'$userdata[email]',
nickname:'$userdata[nickname]',
username:'$userdata[username]',
phone:'$userdata[phone]',
weixinid:'$userdata[weixinid]',
password:'',
password2:'',
themecolor:'$theme'
},
rules: {
email: [
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
],
nickname: [
{ required: true, message: '请输入用户名', trigger: 'blur' },
{ min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: ['blur', 'change'] }
],
username: [
{ required: true, message: '请输入姓名', trigger: 'blur' },
{ min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: ['blur', 'change'] }
],
phone: [
{ required: false, message: '请输入手机号'}
],
weixinid: [
{ required: false, message: '请输入微信' },
],
password: [
{ validator: inputpassword, trigger: ['blur', 'change'] }
],
password2: [
{ validator: inputpassword2, trigger: ['blur', 'change'] }
]
},
themes:[
{txt:'自动(依系统设置)',color:'',val:''},
{txt:'色',color:'background:#D0D0D0',val:'white'},
{txt:'浅灰色',color:'background:#808080',val:'lightgrey'},
{txt:'深色',color:'background:#444444',val:'darkgrey'},
{txt:'色',color:'background:#333333',val:'black'},
{txt:'深蓝色',color:'background:#2A356D',val:'navyblue'},
{txt:'紫色',color:'background:#463275',val:'purple'},
],
}
},
created() {
// console.log(11111)
// var avatarstatus =
},
methods: {
handleColor(val){
this.ruleForm.themecolor = val;
},
beforeLogoUpload(file){
var self = this;
var isJPG = ['image/png','image/jpeg','image/jpg','image/gif'];
var isLt2M = file.size / 1024 / 1024 < 2;
if (isJPG.indexOf(file.type)<0) {
self.$message.error('图片格式错误');
}
if (!isLt2M) {
self.$message.error('图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
self.ispercentage = true;
},
handleLogoSuccess(res, file){
if(res.error){
var self = this;
self.$message.error(res.error);
}else{
this.ruleForm.imgpath = res.path;
}
},
handleLogoProgress(event, file, fileList) {
var percent = parseInt(event.percent);
this.percentage = percent;
if(percent == 100){
this.ispercentage = false;
this.percentage = 0
}
},
handleSubmit(){
var self = this;
self.$refs.ruleForm.validate(function(valid){
if (valid) {
var params = {
'accountedit':true,
'formhash':'{FORMHASH}',
'uid':'$uid',
'email':self.ruleForm.email,
'nickname':self.ruleForm.nickname,
'username':self.ruleForm.username,
'phone':self.ruleForm.phone,
'weixinid':self.ruleForm.weixinid,
'password':self.ruleForm.password,
'password2':self.ruleForm.password2,
'themecolor':self.ruleForm.themecolor,
};
if(self.ruleForm.imgpath){
params['imgpath'] = self.ruleForm.imgpath;
}
$.post(MOD_URL+"&op=user&do=personal",params,function(res){
if(res.success){
// self.$message({
// message: '保存成功',
// type: 'success'
// });
window.location.reload();
}else{
self.$message.error(res.msg);
}
},'json');
} else {
self.$message.error('验证失败');
return false;
}
});
}
},
mounted() {}
})
</script>
<!--{template pc/frame/footer_simple}-->

View File

@@ -385,8 +385,7 @@
},
'ImgParam.proportion':function(val){
this.ImgParam.fproportion = Math.round(val*100);
this.handleImgSize(val);
},
'ImgParam.rotate':function(val){
this.handleImgTransform();
@@ -415,6 +414,7 @@
var self = this;
self.$nextTick(function(){
if(dasta.opentype=='image' || dasta.opentype=='other'){
// console.log(33333333)
self.handleImgSet();
}
});
@@ -436,6 +436,14 @@
},
methods: {
handleproportion(){
var self = this;
var val = self.ImgParam.proportion
this.ImgParam.fproportion = Math.round(val*100);
self.$nextTick(function(){
self.handleImgSize(val);
});
},
handleImgTransform(){
var self = this;
var str = '';
@@ -503,7 +511,6 @@
}else{
img.css({
'max-height': '',
'height':fheight+'px',
});
}
@@ -554,10 +561,10 @@
}else{
proportion = 1;
}
this.ImgParam.proportion = proportion;
self.ImgParam.proportion = proportion;
var fproportion = Math.round(proportion*100);
this.ImgParam.slider = ($('.el-slider').width()/2)*(fproportion/100);
this.handleproportion();
},
handleImgDrag(e){//图片移动
var self = this;
@@ -620,6 +627,7 @@
}
self.ImgParam.slider = moveX;
self.ImgParam.proportion = proportion/100;
self.handleproportion();
return false; //阻止默认事件或冒泡
});
@@ -633,8 +641,8 @@
},
GetData(){
var self = this;
self.imagesData.icondata = '';
self.imagesData.originalimg = '';
// self.imagesData.icondata = '';
// self.imagesData.originalimg = '';
self.HtmlLoading = true;
$.post(MOD_URL+'&op=details&operation=fetch',{
rid:self.rid
@@ -715,7 +723,7 @@
var num = parseInt(type)/100;
this.ImgParam.scale = num;
var proportion = parseInt(type);
this.ImgParam.proportion = proportion/100;
self.ImgParam.proportion = proportion/100;
// var img = $('.image-viewer__img');
var slider = $('.el-slider');
var fslider = 0;
@@ -725,7 +733,7 @@
fslider = (slider.width()/2)*(proportion/100);
}
this.ImgParam.slider = fslider;
this.handleproportion();
}
},
handleImgOperation(type){//图片快捷点击
@@ -733,11 +741,12 @@
var self = this;
if(type==1){
var proportion = 1;
this.ImgParam.proportion = proportion;
self.ImgParam.proportion = proportion;
// var img = $('.image-viewer__img');
var slider = $('.el-slider');
this.ImgParam.slider = (slider.width()/2)*proportion;
this.handleproportion();
}else if(type==2){
this.handleImgSet();
}else if(type==3){
@@ -1035,11 +1044,11 @@
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).then(function() {
jQuery.get('user.php?mod=login&op=logging&action=logout&formhash={FORMHASH}&t='+new Date().getTime(),function(data){
window.location.reload();
});
}).catch(() => {
}).catch(function() {
});
break;

View File

@@ -2,39 +2,44 @@
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/index.css?{VERHASH}"/>
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/screen.css?{VERHASH}"/>
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/image.css?{VERHASH}"/>
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/components/collect.css?{VERHASH}"/>
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/components/addcollect.css?{VERHASH}"/>
<script type="text/javascript" src="{MOD_PATH}/js/pc/plug/wavesurfer.js?{VERHASH}"></script>
<script type="text/javascript" src="{MOD_PATH}/js/pc/plug/DomResize.js?{VERHASH}"></script>
<!-- <script type="text/javascript" src="{MOD_PATH}/js/pc/components/collect.js?{VERHASH}"></script> -->
<script type="text/javascript" src="{MOD_PATH}/js/pc/components/collectdialog.js?{VERHASH}"></script>
<script type="text/javascript" src="{MOD_PATH}/js/pc/components/addcollect.js?{VERHASH}"></script>
<style type="text/css">
.el-header{
border-bottom: 0;
}
</style>
<!--{template mobile/components/classify}-->
<!--{template pc/frame/header_simple_end}-->
<div id="dzzoffice">
<el-container>
<el-header class="fixed" height="auto" style="padding: 0;z-index: 100;">
<div class="header-wrapper">
<!--{template pc/components/index/JsHeader1}-->
</div>
</el-header>
<el-scrollbar id="container_scroll">
<div class="container-scroll-loading" v-if="ImageParams.loading" style="position: absolute;width: 100%;height: 100%;left: 0;top: 0;padding-top: 70px;">
<div v-loading="ImageParams.loading" style="width: 100%;height: 100%;">
<el-scrollbar id="container_scroll">
<el-container>
<el-header class="fixed" height="auto" style="padding: 0;z-index: 5;">
<div class="header-wrapper">
<!--{template pc/components/index/JsHeader1}-->
</div>
</div>
<div class="page-content" style="min-height: 100%;">
<!--{template pc/components/index/Jsimage}-->
<el-backtop target="#container_scroll>.el-scrollbar__wrap"></el-backtop>
</div>
</el-scrollbar>
</el-container>
</el-header>
<div class="container-scroll-loading" v-if="ImageParams.loading" style="position: absolute;width: 100%;height: 100%;left: 0;top: 0;padding-top: 70px;">
<div v-loading="ImageParams.loading" style="width: 100%;height: 100%;">
</div>
</div>
<div class="page-content" style="min-height: 100%;">
<!--{template pc/components/index/Jsimage}-->
<el-backtop target="#container_scroll>.el-scrollbar__wrap"></el-backtop>
</div>
</el-container>
</el-scrollbar>
<div id="Details_Iframe" v-if="DetailsIframe">
<iframe id="iframesrc" :src="DetailsIframe" width="100%" height="100%" style="border: 0;"></iframe>
</div>
</div>
<!--{template pc/components/index/JsCommon}-->
<script type="text/javascript">
@@ -42,6 +47,7 @@
el: '#dzzoffice',
data: function() {
return $.extend({},JsCommonData,JsHeaderData,JsImageData,{
DocumentLeftWidth:0,
DocumentResize:0,
DocumentTemplate:1,
OpenDetailType:'new',
@@ -123,6 +129,7 @@
mounted() {
var self = this;
this.HeaderPopoverSearchMounted();
this.ImageMounted();
window.onresize = function(){
self.LayoutStructure();
if(!self.ImageParams.loading){

View File

@@ -2,8 +2,13 @@
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/index.css?{VERHASH}"/>
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/screen.css?{VERHASH}"/>
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/image.css?{VERHASH}"/>
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/components/collect.css?{VERHASH}"/>
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/components/addcollect.css?{VERHASH}"/>
<script type="text/javascript" src="{MOD_PATH}/js/pc/plug/wavesurfer.js?{VERHASH}"></script>
<script type="text/javascript" src="{MOD_PATH}/js/pc/plug/DomResize.js?{VERHASH}"></script>
<!-- <script type="text/javascript" src="{MOD_PATH}/js/pc/components/collect.js?{VERHASH}"></script> -->
<script type="text/javascript" src="{MOD_PATH}/js/pc/components/collectdialog.js?{VERHASH}"></script>
<script type="text/javascript" src="{MOD_PATH}/js/pc/components/addcollect.js?{VERHASH}"></script>
<style type="text/css">
.el-header{
border-bottom: 0;
@@ -173,6 +178,7 @@
mounted() {
var self = this;
this.HeaderPopoverSearchMounted();
this.ImageMounted();
$(document).resize(function(){
self.LayoutStructure();
self.DocumentResize += 1;

File diff suppressed because it is too large Load Diff

View File

@@ -745,10 +745,10 @@ UNIQUE KEY `orgid` (`orgid`, `uid`) USING BTREE
DROP TABLE IF EXISTS `dzz_pichome_comments`;
CREATE TABLE `dzz_pichome_comments` (
`id` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标注id' ,
`x` float(11,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT 'x轴位置' ,
`y` float(11,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT 'y轴位置' ,
`width` float(11,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '' ,
`height` float(11,2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '高度' ,
`x` float(11,2) NOT NULL DEFAULT 0.00 COMMENT 'x轴位置' ,
`y` float(11,2) NOT NULL DEFAULT 0.00 COMMENT 'y轴位置' ,
`width` float(11,2) NOT NULL DEFAULT 0.00 COMMENT '' ,
`height` float(11,2) NOT NULL DEFAULT 0.00 COMMENT '高度' ,
`annotation` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '标注内容' ,
`lastModified` char(13) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '最后更改时间' ,
`appid` char(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '库id' ,
@@ -1018,13 +1018,13 @@ CREATE TABLE `dzz_pichome_vapp` (
`filenum` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文件个数' ,
`lastid` char(13) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '最后执行位置id' ,
`percent` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '导入百分比' ,
`state` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0未导入1导入中2检校3完成' ,
`state` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0未导入1准备中2导入中3校验中4已完成' ,
`filter` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '筛选项' ,
`share` tinyint(1) NOT NULL COMMENT '分享是否开放' ,
`download` tinyint(1) NOT NULL COMMENT '是否开放下载' ,
`donum` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '已导入文件数' ,
`charset` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '库编码类型' ,
`type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0eagle库1本地目录库2oaooa' ,
`type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0eagle库1本地目录库billfish' ,
`isdelete` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已删除' ,
`sort` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序,值越大越靠前' ,
`allowext` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '允许导入后缀' ,
@@ -1032,9 +1032,10 @@ CREATE TABLE `dzz_pichome_vapp` (
`iswebsitefile` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否是站点下文件' ,
`getinfonum` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '获取信息文件数' ,
`getinfo` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否获取信息' ,
`nosubfilenum` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '未分类文件总数' ,
`disp` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序' ,
PRIMARY KEY (`appid`)
)ENGINE=MyISAM;
-- ----------------------------
-- Table structure for `dzz_process`
-- ----------------------------
@@ -1369,4 +1370,70 @@ CREATE TABLE `dzz_usergroup_field` (
`maxattachsize` int(10) UNSIGNED NOT NULL DEFAULT 0 ,
`perm` int(10) UNSIGNED NOT NULL DEFAULT 0 ,
UNIQUE KEY `groupid` (`groupid`) USING BTREE
)ENGINE=MyISAM;
)ENGINE=MyISAM;
DROP TABLE IF EXISTS `dzz_billfish_folderrecord`;
CREATE TABLE `dzz_billfish_folderrecord` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id',
`bfid` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'billfish目录id',
`fid` char(19) NOT NULL DEFAULT '' COMMENT 'pichome目录id',
`appid` char(6) NOT NULL DEFAULT '' COMMENT '库id',
PRIMARY KEY (id),
KEY `bfid` (`bfid`,`appid`),
KEY `fid` (`fid`),
KEY `appid` (`appid`)
) ENGINE=MyISAM;
-- --------------------------------------------------------
--
-- table dzz_billfish_record
--
DROP TABLE IF EXISTS `dzz_billfish_record`;
CREATE TABLE `dzz_billfish_record` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id',
`bid` int(11) UNSIGNED NOT NULL,
`rid` char(32) NOT NULL DEFAULT '' COMMENT '对应resources表id',
`appid` char(6) NOT NULL DEFAULT '' COMMENT '库id',
`thumb` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '缩略图id',
PRIMARY KEY (`id`),
KEY `rid` (`rid`),
KEY `appid` (`appid`),
KEY `bid` (`bid`,`appid`) USING BTREE
) ENGINE=MyISAM ;
-- --------------------------------------------------------
--
-- table dzz_billfish_taggrouprecord
--
DROP TABLE IF EXISTS `dzz_billfish_taggrouprecord`;
CREATE TABLE dzz_billfish_taggrouprecord (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id',
`cid` char(19) NOT NULL DEFAULT '' COMMENT '标签分类id',
`bcid` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'billfish标签分类id',
`appid` char(6) NOT NULL DEFAULT '' COMMENT 'appid',
PRIMARY KEY (`id`),
KEY `bcid` (`bcid`,`appid`),
KEY `appid` (`appid`),
KEY `cid` (`cid`)
) ENGINE=MyISAM;
-- --------------------------------------------------------
--
-- table dzz_billfish_tagrecord
--
DROP TABLE IF EXISTS `dzz_billfish_tagrecord`;
CREATE TABLE `dzz_billfish_tagrecord` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键id',
`lid` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '标签id',
`name` varchar(128) NOT NULL DEFAULT '' COMMENT 'billfish标签',
`appid` char(6) NOT NULL DEFAULT '' COMMENT '库id',
PRIMARY KEY (`id`),
KEY `btid` (`name`,`appid`),
KEY `tid` (`lid`),
KEY `appid` (`appid`)
) ENGINE=MyISAM;

View File

@@ -25,7 +25,7 @@ INSERT INTO `dzz_cron` (`cronid`, `available`, `type`, `name`, `filename`, `last
--
-- 转存表中的数据 `dzz_hooks`
--
INSERT INTO `dzz_hooks` (`id`, `app_market_id`, `name`, `description`, `type`, `update_time`, `addons`, `status`, `priority`) VALUES
INSERT INTO dzz_hooks (id, app_market_id, `name`, description, `type`, update_time, addons, `status`, priority) VALUES
(1, 0, 'check_login', '', 1, 0, 'user\\classes\\checklogin', 1, 0),
(2, 0, 'safe_chk', '', 1, 0, 'user\\classes\\safechk', 1, 0),
(3, 0, 'config_read', '读取配置钩子', 0, 0, 'core\\dzz\\config', 1, 0),
@@ -44,8 +44,10 @@ INSERT INTO `dzz_hooks` (`id`, `app_market_id`, `name`, `description`, `type`, `
(18, 0, 'check_val', '', 1, 0, 'user\\register\\classes\\checkvalue|user', 1, 0),
(19, 0, 'register_common', '', 1, 0, 'user\\register\\classes\\regcommon', 1, 0),
(20, 8, 'systemlog', '', 1, 0, 'admin\\systemlog\\classes\\systemlog', 1, 0),
(21, 0, 'pichomegetinfo', ' ', '1', '0', 'dzz\\imageColor\\classes\\getcolor', '1', '0'),
(22, 0, 'pichomegetinfo', ' ', '1', '0', 'dzz\\ffmpeg\\classes\\info', '1', '0');
(21, 0, 'pichomegetinfo', ' ', 1, 0, 'dzz\\imageColor\\classes\\getcolor', 1, 0),
(22, 0, 'pichomegetinfo', ' ', 1, 0, 'dzz\\ffmpeg\\classes\\info', 1, 0),
(23, 0, 'getpichomethumb', ' ', 1, 0, 'dzz\\billfish\\classes\\getpichomethumb', 1, 0),
(24, 0, 'pichomevappdelete', ' ', 1, 0, 'dzz\\billfish\\classes\\pichomevappdelete', 1, 0);