更新版本 beta3.1
This commit is contained in:
21
UPDATE.md
21
UPDATE.md
@@ -1,17 +1,20 @@
|
||||
## PicHome beta3.0 更新说明
|
||||
## PicHome beta3.1 更新说明
|
||||
|
||||
### 1.增加普通目录导入支持,普通目录可限定文件导入,默认使用 “站点设置”=>“导入设置”中的“允许导入文件”中的设置值,可根据需要更改。
|
||||
### 1.增加billfish库文件导入支持
|
||||
|
||||
### 2.支持选择或输入指定目录地址作为库;库更改为手动添加以便于自由选择eagle库或者普通目录库;目录选择中默认屏蔽了一些由系统生成目录,可在站点设置=>导入设置中的“禁止导入目录”中更改。
|
||||
### 2.库设置内容更改,显示当前库连接状态,断开为不可用;增加普通目录文件缩略图生成数量显示,
|
||||
整体优化库设置在未导入之前也可对库进行管理操作
|
||||
|
||||
### 3.普通目录支持部分图片缩略图、颜色获取和部分音视频文件信息和缩略图获取(注:格式可参考 站点设置”=>“导入设置”中的“允许导入文件”;此功能pdf格式需有iamgick支持,linux下音视频需ffmpeg支持);该功能可在库的“设置”中选择开启或不开启,需要注意的是开启该功能可能会占用大量服务器资源。
|
||||
### 3.修复系统设置界面因二级域名导致的白页问题
|
||||
|
||||
### 4.增加新的界面展示模板,可在 “站点设置”=>“界面设置”中切换
|
||||
### 4.修复标签分类等数据显示异常问题;不可用状态的库将不在列表页展示其内容
|
||||
|
||||
### 5.导入逻辑优化,优化导入效率,修复没有文件时,一直在导入状态的bug
|
||||
### 5.修复下载时提示文件不存在的bug
|
||||
|
||||
### 6.优化删除库逻辑,删除更改为异步删除
|
||||
### 6.优化删除逻辑,将更快清理冗余数据
|
||||
|
||||
### 7.优化访问效率
|
||||
### 7.优化导入逻辑
|
||||
|
||||
### 8.其他已知bug修复
|
||||
### 8.优化访问效率
|
||||
|
||||
### 9.其他已知bug修复
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,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,16 +107,18 @@ 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;
|
||||
}
|
||||
|
||||
@@ -145,19 +147,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 +166,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 +202,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,7 +233,7 @@ 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);
|
||||
$resourcesdata['dpath'] = dzzencode($rid, '', 0, 0);
|
||||
//print_r($resourcesdata);die;
|
||||
|
||||
return $resourcesdata;
|
||||
@@ -245,37 +257,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']);
|
||||
@@ -284,13 +307,13 @@ class table_pichome_resources extends dzz_table
|
||||
}
|
||||
}
|
||||
//文件真实地址
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -299,44 +322,54 @@ class table_pichome_resources extends dzz_table
|
||||
}
|
||||
return $returndata;
|
||||
}
|
||||
public function geticondata_by_rid($rid){
|
||||
|
||||
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 +379,7 @@ class table_pichome_resources extends dzz_table
|
||||
}
|
||||
return $resourcesdata;
|
||||
}
|
||||
|
||||
public function fetch_like_words($keyword, $limit = 10)
|
||||
{
|
||||
$likewords = [];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ if(!defined('IN_OAOOA')) {
|
||||
}
|
||||
|
||||
if(!defined('CORE_VERSION')) {
|
||||
define('CORE_VERSION', 'beta3.0');
|
||||
define('CORE_VERSION', 'beta3.1');
|
||||
define('CORE_VERSION_LEVEL', 'Pichome');
|
||||
define('CORE_RELEASE', '20211208');
|
||||
define('CORE_FIXBUG' , '03000000');
|
||||
define('CORE_RELEASE', '20211220');
|
||||
define('CORE_FIXBUG' , '03100000');
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
527
dzz/billfish/class/class_billfishexport.php
Normal file
527
dzz/billfish/class/class_billfishexport.php
Normal file
@@ -0,0 +1,527 @@
|
||||
<?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 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['searchval'] = $setarr['name'].$attrdata['desc'];
|
||||
//处理目录数据
|
||||
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'];
|
||||
}
|
||||
//目录数据处理完成
|
||||
|
||||
//转码路径 记入属性表
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
71
dzz/billfish/class/table/table_billfish_folderrecord.php
Normal file
71
dzz/billfish/class/table/table_billfish_folderrecord.php
Normal 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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
43
dzz/billfish/class/table/table_billfish_record.php
Normal file
43
dzz/billfish/class/table/table_billfish_record.php
Normal 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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
42
dzz/billfish/class/table/table_billfish_taggrouprecord.php
Normal file
42
dzz/billfish/class/table/table_billfish_taggrouprecord.php
Normal 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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
39
dzz/billfish/class/table/table_billfish_tagrecord.php
Normal file
39
dzz/billfish/class/table/table_billfish_tagrecord.php
Normal 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));
|
||||
}
|
||||
}
|
||||
|
||||
38
dzz/billfish/classes/getpichomethumb.php
Normal file
38
dzz/billfish/classes/getpichomethumb.php
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
23
dzz/billfish/classes/pichomevappdelete.php
Normal file
23
dzz/billfish/classes/pichomevappdelete.php
Normal 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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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")));
|
||||
|
||||
@@ -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);
|
||||
|
||||
4
dzz/pichome/ceshi.php
Normal file
4
dzz/pichome/ceshi.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
$a = C::t('pichome_vapp')->fetch('J62mX1');
|
||||
print_r($a);die;
|
||||
@@ -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,9 +137,9 @@ 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);
|
||||
}
|
||||
@@ -150,14 +151,14 @@ class eagleexport
|
||||
$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);
|
||||
@@ -372,8 +373,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 +398,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 +413,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 +421,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 +443,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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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++;
|
||||
@@ -302,8 +303,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 {
|
||||
@@ -367,7 +368,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 +383,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 +395,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 +414,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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
74
dzz/pichome/collection.php
Normal file
74
dzz/pichome/collection.php
Normal 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');
|
||||
|
||||
|
||||
92
dzz/pichome/css/pc/collection.css
Normal file
92
dzz/pichome/css/pc/collection.css
Normal 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;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
/* color-primary
|
||||
color-text-placeholder
|
||||
border-color-base */
|
||||
*{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
@@ -99,7 +99,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;
|
||||
@@ -148,7 +148,7 @@
|
||||
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{
|
||||
@@ -163,7 +163,7 @@
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 4;
|
||||
z-index: 2;
|
||||
background: var(--content-imgbg);
|
||||
cursor: auto;
|
||||
}
|
||||
@@ -177,14 +177,14 @@
|
||||
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;
|
||||
right: 8px;
|
||||
top: 8px;
|
||||
z-index: 10;
|
||||
z-index: 2;
|
||||
}
|
||||
.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{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,42 +1,43 @@
|
||||
: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;/* 内容背景色 */
|
||||
--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;
|
||||
}
|
||||
@@ -1,42 +1,43 @@
|
||||
: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;/* 内容背景色 */
|
||||
--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;
|
||||
}
|
||||
|
||||
@@ -1,42 +1,43 @@
|
||||
: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;/* 内容背景色 */
|
||||
--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;
|
||||
}
|
||||
@@ -1,42 +1,42 @@
|
||||
: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;/* 内容背景色 */
|
||||
--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;
|
||||
}
|
||||
@@ -1,43 +1,43 @@
|
||||
: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;/* 内容背景色 */
|
||||
--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;
|
||||
}
|
||||
@@ -1,44 +1,44 @@
|
||||
: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;/* 内容背景色 */
|
||||
--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;
|
||||
}
|
||||
@@ -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');
|
||||
@@ -1,20 +1,16 @@
|
||||
<?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();
|
||||
@@ -22,16 +22,20 @@
|
||||
$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');
|
||||
|
||||
@@ -1,34 +1,39 @@
|
||||
<?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 * 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['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);
|
||||
|
||||
@@ -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';
|
||||
|
||||
BIN
dzz/pichome/image/library/billfish.png
Normal file
BIN
dzz/pichome/image/library/billfish.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
BIN
dzz/pichome/image/library/eagle.png
Normal file
BIN
dzz/pichome/image/library/eagle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
BIN
dzz/pichome/image/library/file.png
Normal file
BIN
dzz/pichome/image/library/file.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
dzz/pichome/image/library/library.png
Normal file
BIN
dzz/pichome/image/library/library.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 807 B |
@@ -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);
|
||||
|
||||
@@ -10,14 +10,19 @@
|
||||
$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();
|
||||
}
|
||||
exit(json_encode(array('success'=>true)));
|
||||
|
||||
@@ -35,9 +35,9 @@ 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)) {
|
||||
if (($data['state'] == 2)) {
|
||||
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfile&appid=' . $appid, 0, '', '', false, '', 1);
|
||||
} elseif ($data['state'] == 2) {
|
||||
} elseif ($data['state'] == 3) {
|
||||
dfsockopen(getglobal('localurl') . 'index.php?mod=pichome&op=exportfilecheck&appid=' . $appid, 0, '', '', false, '', 1);
|
||||
}
|
||||
exit(json_encode(array('success' => true, 'data' => $data, 'catdata' => $catdata)));
|
||||
@@ -47,57 +47,26 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
|
||||
}
|
||||
} 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){
|
||||
$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 +88,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,
|
||||
@@ -150,7 +131,7 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
|
||||
$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')));
|
||||
@@ -159,6 +140,7 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
|
||||
} elseif ($operation == 'dellibrary') {
|
||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||
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)));
|
||||
@@ -205,9 +187,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) {
|
||||
@@ -230,6 +209,18 @@ where ra.appid = %s and ((ra.isget = 0 and ISNULL(fc.rid) and ISNULL(ic.rid)) or
|
||||
|
||||
}
|
||||
exit(json_encode(array('data' => $datas)));
|
||||
} 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');
|
||||
|
||||
334
dzz/pichome/template/pc/components/collection/JsLeft.htm
Normal file
334
dzz/pichome/template/pc/components/collection/JsLeft.htm
Normal 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>
|
||||
377
dzz/pichome/template/pc/components/collection/Jsimage.htm
Normal file
377
dzz/pichome/template/pc/components/collection/Jsimage.htm
Normal 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个收藏 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>
|
||||
293
dzz/pichome/template/pc/components/image/ImageAudioPlay.htm
Normal file
293
dzz/pichome/template/pc/components/image/ImageAudioPlay.htm
Normal file
@@ -0,0 +1,293 @@
|
||||
<script type="text/javascript">
|
||||
var ImageAudioPlayData = {
|
||||
|
||||
};
|
||||
var ImageAudioPlayMethods = {
|
||||
ImageAudioPlayMouseenter(tage){
|
||||
var find = tage.find('.image-playurl');
|
||||
|
||||
tage.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.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>
|
||||
101
dzz/pichome/template/pc/components/image/ImageList.htm
Normal file
101
dzz/pichome/template/pc/components/image/ImageList.htm
Normal 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>
|
||||
202
dzz/pichome/template/pc/components/image/ImageRowGrid.htm
Normal file
202
dzz/pichome/template/pc/components/image/ImageRowGrid.htm
Normal 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]['width']);
|
||||
var h = parseInt(arr[rid]['height']);
|
||||
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>
|
||||
119
dzz/pichome/template/pc/components/image/ImageWaterfall.htm
Normal file
119
dzz/pichome/template/pc/components/image/ImageWaterfall.htm
Normal 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].width)*parseInt(arr[i].height)>120?ppwidth/parseFloat(arr[i].width)*parseInt(arr[i].height):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>
|
||||
@@ -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];
|
||||
|
||||
@@ -103,10 +103,10 @@
|
||||
</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}-->
|
||||
<!--{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:{
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
this.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){
|
||||
|
||||
@@ -8,33 +8,32 @@
|
||||
.el-header{
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--{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">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 '0,eagle库,1本地目录库,2,oaooa库' ,
|
||||
`type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0,eagle库,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;
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user