Compare commits
1 Commits
12
UPDATE.md
12
UPDATE.md
@@ -1,9 +1,11 @@
|
|||||||
## PicHome beta1.1 更新说明
|
## PicHome beta2.0 更新说明
|
||||||
|
|
||||||
### 1.导入逻辑优化,修复库导入文件和实际文件严重不符问题,支持合并库和导入库等文件库的导入,以及导入效率优化
|
### 1.增加移动端支持
|
||||||
|
|
||||||
### 2.修复库设置中“分类(文件夹)”筛选项丢失的问题
|
### 2.导入逻辑优化,优化导入效率,修复文件移动分类后分类丢失问题
|
||||||
|
|
||||||
### 3.在站点设置=>界面设置内增加“默认打开文件窗口方式”设置,支持文件在当前窗口打开,详情页显示和功能优化
|
### 3.优化删除库逻辑,修复删除库导致的导入状态bug
|
||||||
|
|
||||||
### 4.其他已知bug修复
|
### 4.优化访问效率
|
||||||
|
|
||||||
|
### 5.其他已知bug修复
|
||||||
@@ -241,11 +241,11 @@ bc2e189cfaacbdb84ddceb3a0abdcf92 *core/class/table/table_user_verify_info.php
|
|||||||
ca64f852f9c9442d65fa30ed279c6d6c *core/coreBase.php
|
ca64f852f9c9442d65fa30ed279c6d6c *core/coreBase.php
|
||||||
b335e80b81831d8e322f43e404124d1d *core/core_version.php
|
b335e80b81831d8e322f43e404124d1d *core/core_version.php
|
||||||
d90d23b8deb20cef2c43e66725ec2813 *core/cron/cron_cache_cleanup_week.php
|
d90d23b8deb20cef2c43e66725ec2813 *core/cron/cron_cache_cleanup_week.php
|
||||||
d6f619ef3f14590fc5abc6ce76954d25 *core/cron/cron_cache_pichome_searchhot.php
|
540843e90244b66d31a1deb8c882d238 *core/cron/cron_cache_pichome_searchhot.php
|
||||||
09bf107dfc58f0424b0245834d221a42 *core/cron/cron_clean_notification_month.php
|
09bf107dfc58f0424b0245834d221a42 *core/cron/cron_clean_notification_month.php
|
||||||
56383d04d4bbd0537c55ff7ed42536f8 *core/cron/cron_database_backup.php
|
56383d04d4bbd0537c55ff7ed42536f8 *core/cron/cron_database_backup.php
|
||||||
d0cc3acfbff044dbb11da3ba9019c58d *core/cron/cron_pichome_check_library.php
|
d0cc3acfbff044dbb11da3ba9019c58d *core/cron/cron_pichome_check_library.php
|
||||||
8e19dc5a19821962504d18efc6e06bdf *core/cron/cron_pichome_updatelibrary_file.php
|
4caf8be54c02549767e2adb440a47764 *core/cron/cron_pichome_updatelibrary_file.php
|
||||||
e437812ec0dbb1050daa691303544d1c *core/dzzstart.php
|
e437812ec0dbb1050daa691303544d1c *core/dzzstart.php
|
||||||
d4c7872572f6965e3173a12153dd758b *core/function/cache/cache_fields_optional.php
|
d4c7872572f6965e3173a12153dd758b *core/function/cache/cache_fields_optional.php
|
||||||
98b3024c7107943c8573cf473d624710 *core/function/cache/cache_fields_register.php
|
98b3024c7107943c8573cf473d624710 *core/function/cache/cache_fields_register.php
|
||||||
@@ -1040,9 +1040,9 @@ badeea57fda90d27e54a9f9488ac4c43 *dzz/pdf/web/viewer.html
|
|||||||
6cf3b8dd7fae022af726634be28de37d *dzz/pdf/web/viewer.js
|
6cf3b8dd7fae022af726634be28de37d *dzz/pdf/web/viewer.js
|
||||||
9d8f7b8df2cf3dffa23febb3582928d4 *dzz/pdf/web/viewer.js.map
|
9d8f7b8df2cf3dffa23febb3582928d4 *dzz/pdf/web/viewer.js.map
|
||||||
9702eb58e8b17ea4d968e2f0f6a7d14e *dzz/pichome/admin.php
|
9702eb58e8b17ea4d968e2f0f6a7d14e *dzz/pichome/admin.php
|
||||||
8d4800ca355e9f6a54e78f5349717829 *dzz/pichome/ajax.php
|
7769201a069c9a56a632185be123dea7 *dzz/pichome/ajax.php
|
||||||
0ca8de11ebaf13e2a461dc37a5182f65 *dzz/pichome/checkexport.php
|
723acce1a4da50a5f61eb85632daee3f *dzz/pichome/checkexport.php
|
||||||
fc77d297675059d228b072772c97071b *dzz/pichome/class/class_eagleexport.php
|
9f87ac4edea0ea57b5563bc4a0b7fb61 *dzz/pichome/class/class_eagleexport.php
|
||||||
6293eb9bd5b473c7f178be5d6534341c *dzz/pichome/config/config.php
|
6293eb9bd5b473c7f178be5d6534341c *dzz/pichome/config/config.php
|
||||||
29640dfed0df1100d9c8e4d819b4c593 *dzz/pichome/css/admin.css
|
29640dfed0df1100d9c8e4d819b4c593 *dzz/pichome/css/admin.css
|
||||||
07f01151181178c663d669622ea927f3 *dzz/pichome/css/common.css
|
07f01151181178c663d669622ea927f3 *dzz/pichome/css/common.css
|
||||||
@@ -1056,16 +1056,21 @@ f09b1c7476e28ad67f1c2f2f314230a0 *dzz/pichome/css/fonts/remixicon.symbol.svg
|
|||||||
881fbc46361e0c0e5f003c159b2f3005 *dzz/pichome/css/fonts/remixicon.woff
|
881fbc46361e0c0e5f003c159b2f3005 *dzz/pichome/css/fonts/remixicon.woff
|
||||||
9915fef980fa539085da55b84dfde760 *dzz/pichome/css/fonts/remixicon.woff2
|
9915fef980fa539085da55b84dfde760 *dzz/pichome/css/fonts/remixicon.woff2
|
||||||
beba9d9c0e6f710c90145d9e3cbbab2d *dzz/pichome/css/index.css
|
beba9d9c0e6f710c90145d9e3cbbab2d *dzz/pichome/css/index.css
|
||||||
|
a90f33a177ffdcb9d8c64b598c7dfb5f *dzz/pichome/css/mobile/common.css
|
||||||
|
577f7f31ca1ac0fe27b7c7e8f28f838f *dzz/pichome/css/mobile/details.css
|
||||||
|
871bda5b39c93380460d42db713c2932 *dzz/pichome/css/mobile/index.css
|
||||||
|
f1e227b4a2e8a0345daaf6141e1856dd *dzz/pichome/css/mobile/personal.css
|
||||||
|
cc6d3bf279ed780dd69d0dcc250bd442 *dzz/pichome/css/mobile/share.css
|
||||||
29640dfed0df1100d9c8e4d819b4c593 *dzz/pichome/css/pc/admin.css
|
29640dfed0df1100d9c8e4d819b4c593 *dzz/pichome/css/pc/admin.css
|
||||||
8106960af48c6ce411b168662f3a4386 *dzz/pichome/css/pc/common.css
|
8106960af48c6ce411b168662f3a4386 *dzz/pichome/css/pc/common.css
|
||||||
e3123a0f6930b3d0a84387d3102c704d *dzz/pichome/css/pc/details.css
|
e3123a0f6930b3d0a84387d3102c704d *dzz/pichome/css/pc/details.css
|
||||||
73f2dc27a3b58222ac1c0cfebb8bd4cb *dzz/pichome/css/pc/index.css
|
4523e1f7dffb0ae26490b704faec2429 *dzz/pichome/css/pc/index.css
|
||||||
69c8a20f13ee8eb40d35ddd497d35fd3 *dzz/pichome/css/pc/xuanzhuan/iconfont.ttf
|
69c8a20f13ee8eb40d35ddd497d35fd3 *dzz/pichome/css/pc/xuanzhuan/iconfont.ttf
|
||||||
b006647cb9c39a657d354fcf0bdf88bf *dzz/pichome/css/pc/xuanzhuan/index.css
|
b006647cb9c39a657d354fcf0bdf88bf *dzz/pichome/css/pc/xuanzhuan/index.css
|
||||||
48994b9f88c49cdb67a88116380cfb95 *dzz/pichome/css/theme/black/index.css
|
48994b9f88c49cdb67a88116380cfb95 *dzz/pichome/css/theme/black/index.css
|
||||||
3d037ab39fd205fc01dcb0644dc73594 *dzz/pichome/css/theme/black/root.css
|
3d037ab39fd205fc01dcb0644dc73594 *dzz/pichome/css/theme/black/root.css
|
||||||
247be4f622b714c5745e69ebb932e197 *dzz/pichome/css/theme/darkgrey/index.css
|
247be4f622b714c5745e69ebb932e197 *dzz/pichome/css/theme/darkgrey/index.css
|
||||||
e19d97f977fa3d2316168bbe8e4101e5 *dzz/pichome/css/theme/darkgrey/root.css
|
9a6e6b73f09a721abe91bcadd9d1dbcd *dzz/pichome/css/theme/darkgrey/root.css
|
||||||
732389ded34cb9c52dd88271f1345af9 *dzz/pichome/css/theme/fonts/element-icons.ttf
|
732389ded34cb9c52dd88271f1345af9 *dzz/pichome/css/theme/fonts/element-icons.ttf
|
||||||
535877f50039c0cb49a6196a5b7517cd *dzz/pichome/css/theme/fonts/element-icons.woff
|
535877f50039c0cb49a6196a5b7517cd *dzz/pichome/css/theme/fonts/element-icons.woff
|
||||||
dce825b1ca6c3b1c18adc856618b8602 *dzz/pichome/css/theme/lightgrey/index.css
|
dce825b1ca6c3b1c18adc856618b8602 *dzz/pichome/css/theme/lightgrey/index.css
|
||||||
@@ -1076,11 +1081,12 @@ dce825b1ca6c3b1c18adc856618b8602 *dzz/pichome/css/theme/lightgrey/index.css
|
|||||||
2566cbfc860d4bc3c12812d9d35011ef *dzz/pichome/css/theme/purple/root.css
|
2566cbfc860d4bc3c12812d9d35011ef *dzz/pichome/css/theme/purple/root.css
|
||||||
4705cbd2d8a842635d69d2ace637212e *dzz/pichome/css/theme/white/index.css
|
4705cbd2d8a842635d69d2ace637212e *dzz/pichome/css/theme/white/index.css
|
||||||
b07e0746971bb7c6dfc1d88ed2bdc4b2 *dzz/pichome/css/theme/white/root.css
|
b07e0746971bb7c6dfc1d88ed2bdc4b2 *dzz/pichome/css/theme/white/root.css
|
||||||
a735516da3ba332a53a8bfad48610aea *dzz/pichome/details.php
|
0bc21a1af1a289191cf5a48523f2cf8c *dzz/pichome/details.php
|
||||||
8cbb24ea1bf37279c62c847f69984107 *dzz/pichome/download.php
|
8cbb24ea1bf37279c62c847f69984107 *dzz/pichome/download.php
|
||||||
e245c8b1f860c8252eade7f3dec51879 *dzz/pichome/dzz_app_pichome.xml
|
e245c8b1f860c8252eade7f3dec51879 *dzz/pichome/dzz_app_pichome.xml
|
||||||
15b6fca48208432cea1930bb57e0db5a *dzz/pichome/exportfile.php
|
6ebe1a87ddd4f9d980c7e484b5168937 *dzz/pichome/exportfile.php
|
||||||
06880b4a650311dd50933bf9a5aece2a *dzz/pichome/filelist.php
|
32e51cefc13d10a0eee49874203dd564 *dzz/pichome/exportfilecheck.php
|
||||||
|
0266871ad080f42c5ccd3a8e972a3abf *dzz/pichome/filelist.php
|
||||||
ae3317853c4561197a9a649000597886 *dzz/pichome/function/function_common.php
|
ae3317853c4561197a9a649000597886 *dzz/pichome/function/function_common.php
|
||||||
d211a97399d52fea48f94a45a06648d1 *dzz/pichome/image/eaglefile.webp
|
d211a97399d52fea48f94a45a06648d1 *dzz/pichome/image/eaglefile.webp
|
||||||
152ec265e38eb67acb6cb31026448e3d *dzz/pichome/image/img/t1.jpeg
|
152ec265e38eb67acb6cb31026448e3d *dzz/pichome/image/img/t1.jpeg
|
||||||
@@ -1088,23 +1094,33 @@ d211a97399d52fea48f94a45a06648d1 *dzz/pichome/image/eaglefile.webp
|
|||||||
309c31fa9200e0c9b4ee8fd3f1399dfc *dzz/pichome/image/img/t3.jpeg
|
309c31fa9200e0c9b4ee8fd3f1399dfc *dzz/pichome/image/img/t3.jpeg
|
||||||
5f5562a16dad1fa33294b5c0a920f1d6 *dzz/pichome/image/img/t4.jpeg
|
5f5562a16dad1fa33294b5c0a920f1d6 *dzz/pichome/image/img/t4.jpeg
|
||||||
08a26df5cbee8f21dbac8d646d1da218 *dzz/pichome/image/nodata.svg
|
08a26df5cbee8f21dbac8d646d1da218 *dzz/pichome/image/nodata.svg
|
||||||
|
1f0ee3cd38e82bd18490a34fcec8c690 *dzz/pichome/image/notScreen.png
|
||||||
f308fd14dbe2e06349ef366d6f9aa2c7 *dzz/pichome/image/palette.png
|
f308fd14dbe2e06349ef366d6f9aa2c7 *dzz/pichome/image/palette.png
|
||||||
efdb2935803c55f32f283c48abed9dbd *dzz/pichome/image/phlogo.png
|
d51db8efca781201f641a41b57420dfe *dzz/pichome/image/phlogo.png
|
||||||
fcb60dfc7f223068eac9d35e8028617c *dzz/pichome/index.php
|
fcb60dfc7f223068eac9d35e8028617c *dzz/pichome/index.php
|
||||||
|
fbc658afc26c123d3ab585fd2eec4f2e *dzz/pichome/initexport.php
|
||||||
c9b191574ccc8ab6c8ff631302f10561 *dzz/pichome/install.php
|
c9b191574ccc8ab6c8ff631302f10561 *dzz/pichome/install.php
|
||||||
29b8b6254aaaa263cbb0fe8272f05a59 *dzz/pichome/js/audioPlay.js
|
29b8b6254aaaa263cbb0fe8272f05a59 *dzz/pichome/js/audioPlay.js
|
||||||
a088950fc4bf4348d87cda978e5ded97 *dzz/pichome/js/common.js
|
a088950fc4bf4348d87cda978e5ded97 *dzz/pichome/js/common.js
|
||||||
b7a95d9f617863cf515a43e7b83978c5 *dzz/pichome/js/headerMethods.js
|
b7a95d9f617863cf515a43e7b83978c5 *dzz/pichome/js/headerMethods.js
|
||||||
d752d1878252e486cc0244887cfadbae *dzz/pichome/js/headerWatch.js
|
d752d1878252e486cc0244887cfadbae *dzz/pichome/js/headerWatch.js
|
||||||
d5843dbdc71ff8014a5eafd346a262da *dzz/pichome/js/jquery.mousewheel.min.js
|
d5843dbdc71ff8014a5eafd346a262da *dzz/pichome/js/jquery.mousewheel.min.js
|
||||||
|
d37b5113b01a2ef9fb6cf447a5dcff89 *dzz/pichome/js/mobile/pinchzoom.js
|
||||||
|
57c1fe0c8799e3ad619c0ef6e719bfbc *dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.css
|
||||||
|
043afc4dc77f0ef3f9923c38170c52cf *dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.min.js
|
||||||
|
d36c75e3d8880ebfece375fd7cd46787 *dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.png
|
||||||
|
b5d4479aca9121ce9ed95af5d77c10d9 *dzz/pichome/js/mobile/plug/vant/index.css
|
||||||
|
3d5fcccab75bba76cc259351e875d42a *dzz/pichome/js/mobile/plug/vant/vant.min.js
|
||||||
29b8b6254aaaa263cbb0fe8272f05a59 *dzz/pichome/js/pc/audioPlay.js
|
29b8b6254aaaa263cbb0fe8272f05a59 *dzz/pichome/js/pc/audioPlay.js
|
||||||
cda62b1eb2f8a116c0016cd3a603e014 *dzz/pichome/js/pc/headerMethods.js
|
2ffc868ac18c18d948c3ae5576afa98b *dzz/pichome/js/pc/headerMethods.js
|
||||||
d752d1878252e486cc0244887cfadbae *dzz/pichome/js/pc/headerWatch.js
|
84f0575bc959e85fc1abab5dc71d3079 *dzz/pichome/js/pc/headerWatch.js
|
||||||
d5843dbdc71ff8014a5eafd346a262da *dzz/pichome/js/pc/jquery.mousewheel.min.js
|
d5843dbdc71ff8014a5eafd346a262da *dzz/pichome/js/pc/jquery.mousewheel.min.js
|
||||||
72dbef2b0dd2644f4fb4e72ddbb7013b *dzz/pichome/js/pc/plug/DomResize.js
|
72dbef2b0dd2644f4fb4e72ddbb7013b *dzz/pichome/js/pc/plug/DomResize.js
|
||||||
8a788a8d0bfb2d3c1988bddb4aef4b4b *dzz/pichome/js/pc/plug/element-ui.js
|
8a788a8d0bfb2d3c1988bddb4aef4b4b *dzz/pichome/js/pc/plug/element-ui.js
|
||||||
66fe9527aec8d8b68e3bc5036ea8f7f9 *dzz/pichome/js/pc/plug/sortable.min.js
|
66fe9527aec8d8b68e3bc5036ea8f7f9 *dzz/pichome/js/pc/plug/sortable.min.js
|
||||||
7fe276a3e0d5ed3a6f2c84a9440c4add *dzz/pichome/js/pc/plug/wavesurfer.js
|
7fe276a3e0d5ed3a6f2c84a9440c4add *dzz/pichome/js/pc/plug/wavesurfer.js
|
||||||
|
ef4591bffb23a90c8d9e0d02a7b5c15f *dzz/pichome/js/pc/row-grid.js
|
||||||
|
ec0f395ef389b9e369cf0bf354d2dd01 *dzz/pichome/js/pc/waterfall.js
|
||||||
72dbef2b0dd2644f4fb4e72ddbb7013b *dzz/pichome/js/plug/DomResize.js
|
72dbef2b0dd2644f4fb4e72ddbb7013b *dzz/pichome/js/plug/DomResize.js
|
||||||
8a788a8d0bfb2d3c1988bddb4aef4b4b *dzz/pichome/js/plug/element-ui.js
|
8a788a8d0bfb2d3c1988bddb4aef4b4b *dzz/pichome/js/plug/element-ui.js
|
||||||
dc3ea9ad3b70dda4a5250f14e9f2a36a *dzz/pichome/js/plug/jquery.row-grid.js
|
dc3ea9ad3b70dda4a5250f14e9f2a36a *dzz/pichome/js/plug/jquery.row-grid.js
|
||||||
@@ -1117,32 +1133,47 @@ b21b8531847604ab5f2f5caaef51ba31 *dzz/pichome/js/vue/vue.js
|
|||||||
69764bf35375a54256412f3c748b312d *dzz/pichome/js/waterfall.js
|
69764bf35375a54256412f3c748b312d *dzz/pichome/js/waterfall.js
|
||||||
c24f19d7061cdf5bae41e5e9b9f5600c *dzz/pichome/language/en-US/lang.php
|
c24f19d7061cdf5bae41e5e9b9f5600c *dzz/pichome/language/en-US/lang.php
|
||||||
8a3e6ab24d873202b96c3acd9c1b0d2b *dzz/pichome/language/zh-CN/lang.php
|
8a3e6ab24d873202b96c3acd9c1b0d2b *dzz/pichome/language/zh-CN/lang.php
|
||||||
2d494f5deef41265f95908bd33a902dd *dzz/pichome/library.php
|
50c4c9bf7d32e57f7e7816680f972453 *dzz/pichome/library.php
|
||||||
ccef8b340c90fc0061c6dd645fecc8df *dzz/pichome/setting.php
|
ccef8b340c90fc0061c6dd645fecc8df *dzz/pichome/setting.php
|
||||||
cecf65f580b3a209dcf80cd8560ec6bb *dzz/pichome/share.php
|
f1753ea283af7618463e0d03b8735e6f *dzz/pichome/share.php
|
||||||
|
25cb394f79991dcd599e3a48434d8a08 *dzz/pichome/template/mobile/components/index/JsCommon.htm
|
||||||
|
3c0bae451668c060ae526d3253e9be73 *dzz/pichome/template/mobile/components/index/JsDetailMessage.htm
|
||||||
|
acea860028318bbeab9263e0028c0876 *dzz/pichome/template/mobile/components/index/JsImages.htm
|
||||||
|
ab5bf119eb21b0b847dcf178a8dff9d9 *dzz/pichome/template/mobile/components/index/JsIndex.htm
|
||||||
|
18939ca3c3ccb67156c1d2f3d059a3fa *dzz/pichome/template/mobile/components/index/JsMy.htm
|
||||||
|
63e7150d7f8268df832d643c34964c82 *dzz/pichome/template/mobile/components/index/JsScreen.htm
|
||||||
|
76399fc5b4e7a84ee75ed49e34e483c9 *dzz/pichome/template/mobile/components/index/JsSearch.htm
|
||||||
|
b8d6091bba53d62ce9a4f1465da5412d *dzz/pichome/template/mobile/components/index/JsSort.htm
|
||||||
|
8f54b82e6d2f9cb4d7ba43d09a39f088 *dzz/pichome/template/mobile/frame/footer_simple.htm
|
||||||
|
ae502b90b2b31175892efe56867bc2e7 *dzz/pichome/template/mobile/frame/header_simple_end.htm
|
||||||
|
fdc74d5e180321fc338ae91a1a90e22e *dzz/pichome/template/mobile/frame/header_simple_start.htm
|
||||||
|
f5cceb704def0ea998936386fe5f5abf *dzz/pichome/template/mobile/page/details.htm
|
||||||
|
f9f65e35608efe6563e49abbc66c1249 *dzz/pichome/template/mobile/page/index.htm
|
||||||
|
be7755b8e73e2ffa49557e8c3891027a *dzz/pichome/template/mobile/page/personal.htm
|
||||||
|
e26ea0557cda6d3b4d550e72ced64611 *dzz/pichome/template/mobile/page/share.htm
|
||||||
1b2b3b2922d7e02373b1b9862c7a5ef7 *dzz/pichome/template/pc/components/headerAdmin/index.htm
|
1b2b3b2922d7e02373b1b9862c7a5ef7 *dzz/pichome/template/pc/components/headerAdmin/index.htm
|
||||||
75ece58d5e173d62a72275aefc2ea7ec *dzz/pichome/template/pc/components/headerindex/index.htm
|
e078614bb6d558d96006ec127f7c392c *dzz/pichome/template/pc/components/headerindex/index.htm
|
||||||
5518c2bc4f44f3636e63d6a3ebe6e508 *dzz/pichome/template/pc/components/headerindex/screen.htm
|
0436c3ba601aa0804b0e51926f557988 *dzz/pichome/template/pc/components/headerindex/screen.htm
|
||||||
105d244408ea6a9780677c28b376ea6c *dzz/pichome/template/pc/components/headerindex/searchScreen.htm
|
105d244408ea6a9780677c28b376ea6c *dzz/pichome/template/pc/components/headerindex/searchScreen.htm
|
||||||
fc0a8c88bf39abe81695ab58de8d6a9f *dzz/pichome/template/pc/components/index/images.htm
|
e75f2d5563b6d12d345ee4414e2840f9 *dzz/pichome/template/pc/components/index/images.htm
|
||||||
0b479ca8b7c107cd66492c3b5e9a7bce *dzz/pichome/template/pc/components/index/indexVuex.htm
|
0764f300b91acf6e60925fa91c528941 *dzz/pichome/template/pc/components/index/indexVuex.htm
|
||||||
c2953f2cc75684f3a777148ad8c5fce9 *dzz/pichome/template/pc/components/index/screen.htm
|
c2953f2cc75684f3a777148ad8c5fce9 *dzz/pichome/template/pc/components/index/screen.htm
|
||||||
8f54b82e6d2f9cb4d7ba43d09a39f088 *dzz/pichome/template/pc/frame/footer_simple.htm
|
8f54b82e6d2f9cb4d7ba43d09a39f088 *dzz/pichome/template/pc/frame/footer_simple.htm
|
||||||
ae502b90b2b31175892efe56867bc2e7 *dzz/pichome/template/pc/frame/header_simple_end.htm
|
ae502b90b2b31175892efe56867bc2e7 *dzz/pichome/template/pc/frame/header_simple_end.htm
|
||||||
08154101159fde8eb21fe522cc937e4c *dzz/pichome/template/pc/frame/header_simple_start.htm
|
08154101159fde8eb21fe522cc937e4c *dzz/pichome/template/pc/frame/header_simple_start.htm
|
||||||
6b71a79c84f6349ee7756391c94dd889 *dzz/pichome/template/pc/page/adminBasic.htm
|
32def5e1c372b587b41991cc72da998d *dzz/pichome/template/pc/page/adminBasic.htm
|
||||||
cc96dd261e08e02dc52f76cd93f2b606 *dzz/pichome/template/pc/page/adminFileterset.htm
|
cc96dd261e08e02dc52f76cd93f2b606 *dzz/pichome/template/pc/page/adminFileterset.htm
|
||||||
109683e420385c288d86639466b6a1d8 *dzz/pichome/template/pc/page/adminLoginpage.htm
|
109683e420385c288d86639466b6a1d8 *dzz/pichome/template/pc/page/adminLoginpage.htm
|
||||||
e066dec8e0303fabf007c8a74eb4625e *dzz/pichome/template/pc/page/adminPagesetting.htm
|
e066dec8e0303fabf007c8a74eb4625e *dzz/pichome/template/pc/page/adminPagesetting.htm
|
||||||
0920466b526ad2b5b6e20c8b2acead53 *dzz/pichome/template/pc/page/adminPersonal.htm
|
0920466b526ad2b5b6e20c8b2acead53 *dzz/pichome/template/pc/page/adminPersonal.htm
|
||||||
ad552124940206341e350aceaedc0e16 *dzz/pichome/template/pc/page/details.htm
|
ad552124940206341e350aceaedc0e16 *dzz/pichome/template/pc/page/details.htm
|
||||||
ed7a4b32a51a8fb8dd3f5760d76d493a *dzz/pichome/template/pc/page/index.htm
|
8e351bacc90f2855e890cc3cb0ef9fc2 *dzz/pichome/template/pc/page/index.htm
|
||||||
4cc95ff5505efa436d8cce73dd456cfe *dzz/pichome/template/pc/page/library.htm
|
1e718307be2a24429f9d37f225fb8988 *dzz/pichome/template/pc/page/library.htm
|
||||||
953101b30d9f9f7e303a7891ade351f3 *dzz/pichome/template/pc/page/share.htm
|
953101b30d9f9f7e303a7891ade351f3 *dzz/pichome/template/pc/page/share.htm
|
||||||
3cd79761b99168c3f9faf607183df134 *dzz/pichome/uninstall.php
|
3cd79761b99168c3f9faf607183df134 *dzz/pichome/uninstall.php
|
||||||
b5221437a0c978e0caf63f2278759934 *dzz/pichome/uninstall_real.php
|
b5221437a0c978e0caf63f2278759934 *dzz/pichome/uninstall_real.php
|
||||||
efbd03954c4e8df90891d9d6f338619f *dzz/pichome/upload.php
|
efbd03954c4e8df90891d9d6f338619f *dzz/pichome/upload.php
|
||||||
91a4166d72ff4c926e1f5a73c804466c *dzz/pichome/user.php
|
e79dc819cafad7450fda2748ee3989dd *dzz/pichome/user.php
|
||||||
3d037ab39fd205fc01dcb0644dc73594 *dzz/textviewer/css/theme/black/root.css
|
3d037ab39fd205fc01dcb0644dc73594 *dzz/textviewer/css/theme/black/root.css
|
||||||
e19d97f977fa3d2316168bbe8e4101e5 *dzz/textviewer/css/theme/darkgrey/root.css
|
e19d97f977fa3d2316168bbe8e4101e5 *dzz/textviewer/css/theme/darkgrey/root.css
|
||||||
732389ded34cb9c52dd88271f1345af9 *dzz/textviewer/css/theme/fonts/element-icons.ttf
|
732389ded34cb9c52dd88271f1345af9 *dzz/textviewer/css/theme/fonts/element-icons.ttf
|
||||||
@@ -1182,7 +1213,7 @@ fc25acefcabc066437d4b27550387954 *install/images/logo.png
|
|||||||
a987af86766c27c565794ffa189cf664 *install/include/install_mysql.php
|
a987af86766c27c565794ffa189cf664 *install/include/install_mysql.php
|
||||||
249b244097610688130b93721d1c2bd1 *install/include/install_mysqli.php
|
249b244097610688130b93721d1c2bd1 *install/include/install_mysqli.php
|
||||||
d7d7fef7dc366413340be8ad3da41709 *install/include/install_var.php
|
d7d7fef7dc366413340be8ad3da41709 *install/include/install_var.php
|
||||||
5c2f5c9042a9e66bc8f5af0b638cf1de *install/index.php
|
dd4116d4f1d942f52548e4a27c65a19f *install/index.php
|
||||||
8eca1f167c0b805d9fda97804379a962 *install/language/zh-cn/lang.php
|
8eca1f167c0b805d9fda97804379a962 *install/language/zh-cn/lang.php
|
||||||
9df77036c7ebea501feaa23661852767 *install/update.php
|
9df77036c7ebea501feaa23661852767 *install/update.php
|
||||||
5aefe69b1ba16fe8a6f79c2156f8f281 *misc/ajax.php
|
5aefe69b1ba16fe8a6f79c2156f8f281 *misc/ajax.php
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ if(!defined('IN_OAOOA')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!defined('CORE_VERSION')) {
|
if(!defined('CORE_VERSION')) {
|
||||||
define('CORE_VERSION', 'beta1.1');
|
define('CORE_VERSION', 'beta2.0');
|
||||||
define('CORE_VERSION_LEVEL', 'Pichome');
|
define('CORE_VERSION_LEVEL', 'Pichome');
|
||||||
define('CORE_RELEASE', '20210923');
|
define('CORE_RELEASE', '20211110');
|
||||||
define('CORE_FIXBUG' , '01100000');
|
define('CORE_FIXBUG' , '20000000');
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
if(!defined('IN_OAOOA')) {
|
if(!defined('IN_OAOOA')) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
}
|
}
|
||||||
gnore_user_abort(true);
|
ignore_user_abort(true);
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
$percachename = 'pichome_searchhot';
|
$percachename = 'pichome_searchhot';
|
||||||
$alldata = C::t('pichome_searchrecent')->fetch_hotkeyword_by_appid();
|
$alldata = C::t('pichome_searchrecent')->fetch_hotkeyword_by_appid();
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
if(!defined('IN_OAOOA')) {
|
if(!defined('IN_OAOOA')) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
}
|
}
|
||||||
ignore_user_abort(true);
|
//ignore_user_abort(true);
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
$appdata = DB::fetch_all("select * from %t where 1 ",array('pichome_vapp'));
|
$appdata = DB::fetch_all("select * from %t where 1 ",array('pichome_vapp'));
|
||||||
foreach($appdata as $v){
|
foreach($appdata as $v){
|
||||||
@@ -11,7 +11,12 @@
|
|||||||
//删除库
|
//删除库
|
||||||
C::t('#pichome#pichome_vapp')->delete_vapp_by_appid($v['appid']);
|
C::t('#pichome#pichome_vapp')->delete_vapp_by_appid($v['appid']);
|
||||||
}else{
|
}else{
|
||||||
|
if($v['state'] == 1){
|
||||||
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfile&appid='.$v['appid'],0, '', '', false, '', 1);
|
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfile&appid='.$v['appid'],0, '', '', false, '', 1);
|
||||||
|
}elseif($v['state'] == 2){
|
||||||
|
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfilecheck&appid='.$v['appid'],0, '', '', false, '', 1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,44 +1,57 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('IN_OAOOA')) {
|
if (!defined('IN_OAOOA')) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
}
|
}
|
||||||
|
|
||||||
$operation = isset($_GET['operation']) ? trim($_GET['operation']) : '';
|
$operation = isset($_GET['operation']) ? trim($_GET['operation']) : '';
|
||||||
global $_G;
|
global $_G;
|
||||||
if ($operation == 'addsearch') {//增加关键词搜索次数
|
if ($operation == 'addsearch') {//增加关键词搜索次数
|
||||||
$keyword = isset($_GET['keyword']) ? trim($_GET['keyword']) : '';
|
$keyword = isset($_GET['keyword']) ? trim($_GET['keyword']) : '';
|
||||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||||
$ktype = isset($_GET['ktype']) ? intval($_GET['ktype']) : 0;
|
$ktype = isset($_GET['ktype']) ? intval($_GET['ktype']) : 0;
|
||||||
if (!$keyword) exit();
|
if (!$keyword) exit();
|
||||||
C::t('pichome_searchrecent')->add_search($keyword, $appid, $ktype);
|
C::t('pichome_searchrecent')->add_search($keyword, $appid, $ktype);
|
||||||
} elseif ($operation == 'getsearchtag') {//最近搜索标签和热门标签
|
} elseif ($operation == 'getsearchtag') {//最近搜索标签和热门标签
|
||||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||||
//$recenttag = C::t('pichome_searchrecent')->fetch_renctent_search_tag($appid);
|
//$recenttag = C::t('pichome_searchrecent')->fetch_renctent_search_tag($appid);
|
||||||
$percachename = 'pichome_searchhot';
|
$percachename = 'pichome_searchhot';
|
||||||
//$recenttag = C::t('pichome_searchrecent')->fetch_renctent_search_tag($appid);
|
//$recenttag = C::t('pichome_searchrecent')->fetch_renctent_search_tag($appid);
|
||||||
$hotdatas = false;
|
$hotdatas = false;
|
||||||
$hotdatas = C::t('cache')->fetch($percachename.$appid);
|
$hotdatas = C::t('cache')->fetch($percachename . $appid);
|
||||||
if(!$hotdatas){
|
if (!$hotdatas) {
|
||||||
$tmpkey = $percachename.$appid;
|
$tmpkey = $percachename . $appid;
|
||||||
$hotdatas = C::t('pichome_searchrecent')->fetch_hotkeyword_by_appid($appid);
|
$hotdatas = C::t('pichome_searchrecent')->fetch_hotkeyword_by_appid($appid);
|
||||||
$setarr = ['cachekey'=>$tmpkey,'cachevalue'=>serialize($hotdatas),'dateline'=>time()];
|
$setarr = ['cachekey' => $tmpkey, 'cachevalue' => serialize($hotdatas), 'dateline' => time()];
|
||||||
C::t('cache')->insert($setarr);
|
C::t('cache')->insert($setarr);
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
$hotdatas = unserialize($hotdatas['cachevalue']);
|
$hotdatas = unserialize($hotdatas['cachevalue']);
|
||||||
}
|
}
|
||||||
//$hottags = C::t('pichome_tag')->fetch_data_by_hot();
|
//$hottags = C::t('pichome_tag')->fetch_data_by_hot();
|
||||||
exit(json_encode(array('hottags' => $hotdatas)));
|
exit(json_encode(array('hottags' => $hotdatas)));
|
||||||
} elseif ($operation == 'getsearchfolder') {//最近搜索目录和目录信息
|
} elseif ($operation == 'getsearchfolder') {//最近搜索目录和目录信息
|
||||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||||
$hotsearchnum = C::t('pichome_searchrecent')->fetch_renctent_search_foldername($appid);
|
$hotsearchnum = C::t('pichome_searchrecent')->fetch_renctent_search_foldername($appid);
|
||||||
$folderdatanum = C::t('pichome_folder')->fetch_all_folder_by_appid($appid);
|
$folderdatanum = C::t('pichome_folder')->fetch_all_folder_by_appid($appid);
|
||||||
exit(json_encode(array('hotsearchnum' => $hotsearchnum, 'folderdatanum' => $folderdatanum)));
|
exit(json_encode(array('hotsearchnum' => $hotsearchnum, 'folderdatanum' => $folderdatanum)));
|
||||||
} elseif ($operation == 'searchmenu_num') {
|
} elseif ($operation == 'searchmenu_num') {
|
||||||
$sql = " %t r ";
|
|
||||||
|
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
|
||||||
|
$prepage = 20;
|
||||||
|
$pagelimit = 'limit '.($page - 1) * $prepage . ',' . $prepage;
|
||||||
|
$cid = isset($_GET['cid']) ? trim($_GET['cid']) : '';
|
||||||
|
$tagkeyword = isset($_GET['tagkeyword']) ? htmlspecialchars($_GET['tagkeyword']) : '';
|
||||||
$skey = isset($_GET['skey']) ? trim($_GET['skey']) : '';
|
$skey = isset($_GET['skey']) ? trim($_GET['skey']) : '';
|
||||||
$wheresql = " r.isdelete < 1 ";
|
$wheresql = " 1 ";
|
||||||
|
if ($skey == 'tag') {
|
||||||
|
$sql = " select distinct rt.tid from %t rt left join %t r on rt.rid=r.rid ";
|
||||||
|
$params = [ 'pichome_resourcestag','pichome_resources'];
|
||||||
|
//$wheresql = " r.isdelete < 1 ";
|
||||||
|
}else{
|
||||||
|
$sql = " %t r ";
|
||||||
$params = ['pichome_resources'];
|
$params = ['pichome_resources'];
|
||||||
|
}
|
||||||
|
|
||||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||||
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
|
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
|
||||||
if ($appid) {
|
if ($appid) {
|
||||||
@@ -113,6 +126,19 @@
|
|||||||
$wheresql .= " and ra.tag = '' ";
|
$wheresql .= " and ra.tag = '' ";
|
||||||
} else {
|
} else {
|
||||||
$tagval = explode(',', trim($_GET['tag']));
|
$tagval = explode(',', trim($_GET['tag']));
|
||||||
|
if(!empty($tagval)){
|
||||||
|
$seltagdata=[];
|
||||||
|
if($appid){
|
||||||
|
foreach(DB::fetch_all("select t.tagname,t.tid,tr.cid from %t t left join %t tr on t.tid = tr.tid where t.tid in(%n) and tr.appid=%s",array('pichome_tag','pichome_tagrelation',$tagval,$appid)) as $tv){
|
||||||
|
$seltagdata[] = array('tagname'=>$tv['tagname'],'tid'=>intval($tv['tid']),'cid'=>$tv['cid']);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
foreach(DB::fetch_all("select tagname,tid from %t where tid in(%n) ",array('pichome_tag',$tagval)) as $tv){
|
||||||
|
$seltagdata[] = array('tagname'=>$tv['tagname'],'tid'=>intval($tv['tid']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
foreach ($tagval as $v) {
|
foreach ($tagval as $v) {
|
||||||
$tagwherearr[] = " find_in_set(%d,ra.tag)";
|
$tagwherearr[] = " find_in_set(%d,ra.tag)";
|
||||||
$para[] = $v;
|
$para[] = $v;
|
||||||
@@ -220,15 +246,6 @@
|
|||||||
if (isset($_GET['shape'])) {
|
if (isset($_GET['shape'])) {
|
||||||
$shape = trim($_GET['shape']);
|
$shape = trim($_GET['shape']);
|
||||||
$shapes = explode(',', $shape);
|
$shapes = explode(',', $shape);
|
||||||
//指定宽高比
|
|
||||||
// $swidth = 0;
|
|
||||||
// $sheight = 0;
|
|
||||||
// if(isset($_GET['shapesize'])){
|
|
||||||
// $shapesize = trim($_GET['shapesize']);
|
|
||||||
// $shapesizes = explode(':',$shapesize);
|
|
||||||
// $swidth = intval($shapesizes[0]);
|
|
||||||
// $sheight = intval($shapesizes[1]);
|
|
||||||
// }
|
|
||||||
$shapewherearr = [];
|
$shapewherearr = [];
|
||||||
foreach ($shapes as $v) {
|
foreach ($shapes as $v) {
|
||||||
switch ($v) {
|
switch ($v) {
|
||||||
@@ -499,67 +516,74 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
//if (!empty($para)) $params = array_merge($params, $para);
|
||||||
|
//$count = DB::result_first("$countsql where $wheresql", $params);
|
||||||
//标签统计
|
//标签统计
|
||||||
if ($skey == 'tag') {
|
if ($skey == 'tag') {
|
||||||
$sql .= ' left join %t rt on rt.rid=r.rid';
|
$cid = isset($_GET['cid']) ? $_GET['cid']:'';
|
||||||
$params[] = 'pichome_resourcestag';
|
if ($cid) {
|
||||||
|
if ($cid == -1) {
|
||||||
|
$sql .= " left join %t tr on isnull(tr.cid)";
|
||||||
|
$params[] = 'pichome_tagrelation';
|
||||||
|
} else {
|
||||||
|
$sql .= " left join %t tr on tr.tid = rt.tid";
|
||||||
|
$params[] = 'pichome_tagrelation';
|
||||||
|
$wheresql .= ' and tr.cid = %s';
|
||||||
|
$para[] = $cid;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$tagkeyword = isset($_GET['tagkeyword']) ? trim($_GET['tagkeyword']):'';
|
||||||
|
if ($tagkeyword) {
|
||||||
|
$sql .= " left join %t t on t.tid=rt.tid";
|
||||||
|
$params[] = 'pichome_tag';
|
||||||
|
$wheresql .= " and t.tagname LIKE %s ";
|
||||||
|
$para[] = '%'.$tagkeyword.'%';
|
||||||
|
}
|
||||||
if (!empty($para)) $params = array_merge($params, $para);
|
if (!empty($para)) $params = array_merge($params, $para);
|
||||||
|
|
||||||
|
$tagdata = [];
|
||||||
//每个标签对应文件个数
|
//每个标签对应文件个数
|
||||||
$tdata = [];
|
$tdata = [];
|
||||||
//所有符合条件标签id
|
//所有符合条件标签id
|
||||||
$tids = [];
|
$tids= [];
|
||||||
foreach (DB::fetch_all("select rt.tid,r.rid from $sql where $wheresql", $params) as $v) {
|
foreach (DB::fetch_all("$sql where $wheresql $pagelimit", $params) as $v){
|
||||||
if (!isset($tdata[$v['tid']])) $tdata[$v['tid']]['num'] = 1;
|
$tids[] = $v['tid'];
|
||||||
else $tdata[$v['tid']]['num'] += 1;
|
|
||||||
if ($v['tid']) $tids[] = $v['tid'];
|
|
||||||
}
|
}
|
||||||
//统计所有标签,去掉重复标签
|
|
||||||
$tids = array_unique($tids);
|
$finish = (count($tids) >= 20) ? false:true;
|
||||||
//标签id对应标签名称数组
|
|
||||||
$tagdata = [];
|
foreach (DB::fetch_all("select rt.tid,t.tagname from %t rt left join %t
|
||||||
foreach (DB::fetch_all("select tagname,tid from %t where tid in(%n)", array('pichome_tag', $tids)) as $v) {
|
t on t.tid=rt.tid where rt.tid in(%n)",
|
||||||
$tagdata[$v['tid']] = $v['tagname'];
|
array('pichome_resourcestag','pichome_tag',$tids)) as $v) {
|
||||||
|
if (!isset($tagdata[$v['tid']])) {
|
||||||
|
$tagdata[$v['tid']]['tagname'] = $v['tagname'];
|
||||||
|
$tagdata[$v['tid']]['num'] = 1;
|
||||||
|
} else {
|
||||||
|
$tagdata[$v['tid']]['num'] += 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//最后返回数组
|
//最后返回数组
|
||||||
$data = [];
|
$data = [];
|
||||||
//含分类标签数据数组
|
//含分类标签数据数组
|
||||||
$catdata = [];
|
$catdata = [];
|
||||||
//如果有appid则获取标签分类数据
|
//如果有appid则获取标签分类数据
|
||||||
if ($appid) {
|
if ($appid) {
|
||||||
//有分类的标签id
|
$taggroupdata[] = ['cid'=>0,'catname'=>'全部'];
|
||||||
$hascattids = [];
|
//获取标签分类数据
|
||||||
foreach (DB::fetch_all("select tr.cid,tr.tid,g.catname from %t tr
|
$taggroupdata = DB::fetch_all("SELECT cid,catname
|
||||||
left join %t g on g.cid=tr.cid where tid in(%n)", array('pichome_tagrelation', 'pichome_taggroup', $tids)) as $v) {
|
FROM %t where appid = %s group by cid;", array( 'pichome_taggroup', $appid));
|
||||||
$hascattids[] = $v['tid'];
|
$taggroupdata[] = ['cid'=>-1,'catname' => '未分组'];
|
||||||
if (!isset($catdata[$v['cid']])) {
|
|
||||||
$catdata[$v['cid']]['catname'] = $v['catname'];
|
|
||||||
$catdata[$v['cid']]['tdatas'][$v['tid']] = ['tagname' => $tagdata[$v['tid']], 'num' => $tdata[$v['tid']]['num'], 'tid' => intval($v['tid'])];
|
|
||||||
$catdata[$v['cid']]['num'] = $tdata[$v['tid']]['num'];
|
|
||||||
} else {
|
|
||||||
$catdata[$v['cid']]['tdatas'][$v['tid']] = ['tagname' => $tagdata[$v['tid']], 'num' => $tdata[$v['tid']]['num'], 'tid' => intval($v['tid'])];
|
|
||||||
$catdata[$v['cid']]['num'] += $tdata[$v['tid']]['num'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//没有分类的标签id
|
|
||||||
$nocattids = array_diff($tids, $hascattids);
|
|
||||||
//未分类数据
|
|
||||||
if (!empty($nocattids)) {
|
|
||||||
$catdata['nottag']['catname'] = '未分类';
|
|
||||||
foreach ($nocattids as $v) {
|
|
||||||
$catdata['nottag']['tdatas'][$v] = ['tagname' => $tagdata[$v], 'num' => $tdata[$v]['num'], 'tid' => intval($v)];
|
|
||||||
$catdata['nottag']['num'] += $tdata[$v]['num'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//分类标签数据
|
//分类标签数据
|
||||||
$data['catdata'] = $catdata;
|
$data['catdata'] = $taggroupdata;
|
||||||
//标签不含分类数据
|
//标签不含分类数据
|
||||||
$alltagdata = [];
|
$alltagdata = $tagdata;
|
||||||
foreach ($tdata as $tid => $num) {
|
$data['finish'] = $finish;
|
||||||
if (isset($tagdata[$tid])) $alltagdata[$tid] = array('tid' => intval($tid), 'tagname' => $tagdata[$tid], 'num' => $num['num']);
|
|
||||||
else $alltagdata[-1] = array('tid' => -1, 'tagname' => '未打标签', 'num' => $num['num']);
|
|
||||||
}
|
|
||||||
$data['alltagdata'] = $alltagdata;
|
$data['alltagdata'] = $alltagdata;
|
||||||
|
$data['tgdata'] = $seltagdata;
|
||||||
} elseif ($skey == 'shape') {
|
} elseif ($skey == 'shape') {
|
||||||
//形状统计
|
//形状统计
|
||||||
$presql = ' case ';
|
$presql = ' case ';
|
||||||
@@ -583,35 +607,31 @@
|
|||||||
|
|
||||||
if (!empty($para)) $params = array_merge($params, $para);
|
if (!empty($para)) $params = array_merge($params, $para);
|
||||||
if (!empty($prepara)) $shapeparams = array_merge($prepara, $params);
|
if (!empty($prepara)) $shapeparams = array_merge($prepara, $params);
|
||||||
//echo "select $presql FROM $sql where $wheresql";
|
|
||||||
// print_r($shapeparams);
|
|
||||||
//print_r(DB::fetch_all("select r.rid,$presql FROM $sql where $wheresql", $shapeparams));
|
|
||||||
// die;
|
|
||||||
foreach (DB::fetch_all("select $presql FROM $sql where $wheresql", $shapeparams) as $value) {
|
foreach (DB::fetch_all("select $presql FROM $sql where $wheresql", $shapeparams) as $value) {
|
||||||
if (!isset($data[$value['shapedata']]) && $shapedataarr[$value['shapedata']]['val']) {
|
if (!isset($data[$value['shapedata']]) && $shapedataarr[$value['shapedata']]['val']) {
|
||||||
$data[$value['shapedata']]['num'] = 1;
|
$data[$value['shapedata']]['num'] = 1;
|
||||||
$data[$value['shapedata']]['lablename'] = $shapedataarr[$value['shapedata']]['lablename'];
|
$data[$value['shapedata']]['lablename'] = $shapedataarr[$value['shapedata']]['lablename'];
|
||||||
$data[$value['shapedata']]['val'] = $shapedataarr[$value['shapedata']]['val'];
|
$data[$value['shapedata']]['val'] = $shapedataarr[$value['shapedata']]['val'];
|
||||||
} elseif($data[$value['shapedata']]['num']){
|
} elseif ($data[$value['shapedata']]['num']) {
|
||||||
$data[$value['shapedata']]['num']++;
|
$data[$value['shapedata']]['num']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//将3:4 9:16 细长竖图归类到竖图
|
//将3:4 9:16 细长竖图归类到竖图
|
||||||
$data[9]['num'] = ($data[9]['num'] ? $data[9]['num']:0) + ($data[2]['num'] ? $data[2]['num'] : 0) + ($data[4]['num'] ? $data[4]['num'] : 0) + ($data[6]['num'] ? $data[6]['num'] : 0);
|
$data[9]['num'] = ($data[9]['num'] ? $data[9]['num'] : 0) + ($data[2]['num'] ? $data[2]['num'] : 0) + ($data[4]['num'] ? $data[4]['num'] : 0) + ($data[6]['num'] ? $data[6]['num'] : 0);
|
||||||
|
|
||||||
if($data[9]['num']) {
|
if ($data[9]['num']) {
|
||||||
$data[9]['lablename'] = $shapedataarr[9]['lablename'];
|
$data[9]['lablename'] = $shapedataarr[9]['lablename'];
|
||||||
$data[9]['val'] = $shapedataarr[9]['val'];
|
$data[9]['val'] = $shapedataarr[9]['val'];
|
||||||
}else{
|
} else {
|
||||||
unset($data[9]);
|
unset($data[9]);
|
||||||
}
|
}
|
||||||
//将4:3 16:9 细长横图图归类到横图
|
//将4:3 16:9 细长横图图归类到横图
|
||||||
$data[8]['num'] = ($data[8]['num'] ? $data[8]['num']:0) + ($data[1]['num'] ? $data[1]['num'] : 0) + ($data[3]['num'] ? $data[3]['num'] : 0) + ($data[5]['num'] ? $data[5]['num'] : 0);
|
$data[8]['num'] = ($data[8]['num'] ? $data[8]['num'] : 0) + ($data[1]['num'] ? $data[1]['num'] : 0) + ($data[3]['num'] ? $data[3]['num'] : 0) + ($data[5]['num'] ? $data[5]['num'] : 0);
|
||||||
if ($data[8]['num']){
|
if ($data[8]['num']) {
|
||||||
$data[8]['val'] = $shapedataarr[8]['val'];
|
$data[8]['val'] = $shapedataarr[8]['val'];
|
||||||
$data[8]['lablename'] = $shapedataarr[8]['lablename'];
|
$data[8]['lablename'] = $shapedataarr[8]['lablename'];
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
unset($data[8]);
|
unset($data[8]);
|
||||||
}
|
}
|
||||||
} elseif ($skey == 'grade') {
|
} elseif ($skey == 'grade') {
|
||||||
@@ -651,16 +671,16 @@
|
|||||||
}
|
}
|
||||||
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
||||||
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
||||||
$data[-7]['num'] =(isset($data[-7]['num']) ? intval($data[-7]['num']):0) + (isset($data[1]['num']) ? intval($data[1]['num']):0) + (isset($data[-1]['num']) ? intval($data[-1]['num']):0);
|
$data[-7]['num'] = (isset($data[-7]['num']) ? intval($data[-7]['num']) : 0) + (isset($data[1]['num']) ? intval($data[1]['num']) : 0) + (isset($data[-1]['num']) ? intval($data[-1]['num']) : 0);
|
||||||
if($data[-7]['num']) $data[-7] = array('num'=>$data[-7]['num'],'val'=>$timedataarr[-7]['val'],'label'=>$timedataarr[-7]['label']);
|
if ($data[-7]['num']) $data[-7] = array('num' => $data[-7]['num'], 'val' => $timedataarr[-7]['val'], 'label' => $timedataarr[-7]['label']);
|
||||||
$data[-30]['num'] =(isset($data[-30]['num']) ? intval($data[-30]['num']):0) + (isset($data[-7]['num']) ? intval($data[-7]['num']):0);
|
$data[-30]['num'] = (isset($data[-30]['num']) ? intval($data[-30]['num']) : 0) + (isset($data[-7]['num']) ? intval($data[-7]['num']) : 0);
|
||||||
if($data[-30]['num']) $data[-30] = array('num'=>$data[-30]['num'],'val'=>$timedataarr[-30]['val'],'label'=>$timedataarr[-30]['label']);
|
if ($data[-30]['num']) $data[-30] = array('num' => $data[-30]['num'], 'val' => $timedataarr[-30]['val'], 'label' => $timedataarr[-30]['label']);
|
||||||
$data[-90]['num'] =(isset($data[-90]['num']) ? intval($data[-90]['num']):0) + (isset($data[-30]['num']) ? intval($data[-30]['num']):0);
|
$data[-90]['num'] = (isset($data[-90]['num']) ? intval($data[-90]['num']) : 0) + (isset($data[-30]['num']) ? intval($data[-30]['num']) : 0);
|
||||||
if($data[-90]['num']) $data[-90] = array('num'=>$data[-90]['num'],'val'=>$timedataarr[-90]['val'],'label'=>$timedataarr[-90]['label']);
|
if ($data[-90]['num']) $data[-90] = array('num' => $data[-90]['num'], 'val' => $timedataarr[-90]['val'], 'label' => $timedataarr[-90]['label']);
|
||||||
$data[-365]['num'] =(isset($data[-365]['num']) ? intval($data[-365]['num']):0) + (isset($data[-90]['num']) ? intval($data[-90]['num']):0);
|
$data[-365]['num'] = (isset($data[-365]['num']) ? intval($data[-365]['num']) : 0) + (isset($data[-90]['num']) ? intval($data[-90]['num']) : 0);
|
||||||
if($data[-365]['num']) $data[-365] = array('num'=>$data[-365]['num'],'val'=>$timedataarr[-365]['val'],'label'=>$timedataarr[-365]['label']);
|
if ($data[-365]['num']) $data[-365] = array('num' => $data[-365]['num'], 'val' => $timedataarr[-365]['val'], 'label' => $timedataarr[-365]['label']);
|
||||||
foreach($data as $k=>$v){
|
foreach ($data as $k => $v) {
|
||||||
if($v['num'] == 0) unset($data[$k]);
|
if ($v['num'] == 0) unset($data[$k]);
|
||||||
}
|
}
|
||||||
krsort($data);
|
krsort($data);
|
||||||
} elseif ($skey == 'mtime') {
|
} elseif ($skey == 'mtime') {
|
||||||
@@ -690,16 +710,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
||||||
$data[-7]['num'] =(isset($data[-7]['num']) ? intval($data[-7]['num']):0) + (isset($data[1]['num']) ? intval($data[1]['num']):0) + (isset($data[-1]['num']) ? intval($data[-1]['num']):0);
|
$data[-7]['num'] = (isset($data[-7]['num']) ? intval($data[-7]['num']) : 0) + (isset($data[1]['num']) ? intval($data[1]['num']) : 0) + (isset($data[-1]['num']) ? intval($data[-1]['num']) : 0);
|
||||||
if($data[-7]['num']) $data[-7] = array('num'=>$data[-7]['num'],'val'=>$timedataarr[-7]['val'],'label'=>$timedataarr[-7]['label']);
|
if ($data[-7]['num']) $data[-7] = array('num' => $data[-7]['num'], 'val' => $timedataarr[-7]['val'], 'label' => $timedataarr[-7]['label']);
|
||||||
$data[-30]['num'] =(isset($data[-30]['num']) ? intval($data[-30]['num']):0) + (isset($data[-7]['num']) ? intval($data[-7]['num']):0);
|
$data[-30]['num'] = (isset($data[-30]['num']) ? intval($data[-30]['num']) : 0) + (isset($data[-7]['num']) ? intval($data[-7]['num']) : 0);
|
||||||
if($data[-30]['num']) $data[-30] = array('num'=>$data[-30]['num'],'val'=>$timedataarr[-30]['val'],'label'=>$timedataarr[-30]['label']);
|
if ($data[-30]['num']) $data[-30] = array('num' => $data[-30]['num'], 'val' => $timedataarr[-30]['val'], 'label' => $timedataarr[-30]['label']);
|
||||||
$data[-90]['num'] =(isset($data[-90]['num']) ? intval($data[-90]['num']):0) + (isset($data[-30]['num']) ? intval($data[-30]['num']):0);
|
$data[-90]['num'] = (isset($data[-90]['num']) ? intval($data[-90]['num']) : 0) + (isset($data[-30]['num']) ? intval($data[-30]['num']) : 0);
|
||||||
if($data[-90]['num']) $data[-90] = array('num'=>$data[-90]['num'],'val'=>$timedataarr[-90]['val'],'label'=>$timedataarr[-90]['label']);
|
if ($data[-90]['num']) $data[-90] = array('num' => $data[-90]['num'], 'val' => $timedataarr[-90]['val'], 'label' => $timedataarr[-90]['label']);
|
||||||
$data[-365]['num'] =(isset($data[-365]['num']) ? intval($data[-365]['num']):0) + (isset($data[-90]['num']) ? intval($data[-90]['num']):0);
|
$data[-365]['num'] = (isset($data[-365]['num']) ? intval($data[-365]['num']) : 0) + (isset($data[-90]['num']) ? intval($data[-90]['num']) : 0);
|
||||||
if($data[-365]['num']) $data[-365] = array('num'=>$data[-365]['num'],'val'=>$timedataarr[-365]['val'],'label'=>$timedataarr[-365]['label']);
|
if ($data[-365]['num']) $data[-365] = array('num' => $data[-365]['num'], 'val' => $timedataarr[-365]['val'], 'label' => $timedataarr[-365]['label']);
|
||||||
foreach($data as $k=>$v){
|
foreach ($data as $k => $v) {
|
||||||
if($v['num'] == 0) unset($data[$k]);
|
if ($v['num'] == 0) unset($data[$k]);
|
||||||
}
|
}
|
||||||
krsort($data);
|
krsort($data);
|
||||||
} elseif ($skey == 'dateline') {
|
} elseif ($skey == 'dateline') {
|
||||||
@@ -730,16 +750,16 @@
|
|||||||
}
|
}
|
||||||
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
||||||
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
//将今天昨天归类到最近七天,将最近七天归到最近30天,将近30天归到最近90天,将最近90天归到最近365天
|
||||||
$data[-7]['num'] =(isset($data[-7]['num']) ? intval($data[-7]['num']):0) + (isset($data[1]['num']) ? intval($data[1]['num']):0) + (isset($data[-1]['num']) ? intval($data[-1]['num']):0);
|
$data[-7]['num'] = (isset($data[-7]['num']) ? intval($data[-7]['num']) : 0) + (isset($data[1]['num']) ? intval($data[1]['num']) : 0) + (isset($data[-1]['num']) ? intval($data[-1]['num']) : 0);
|
||||||
if($data[-7]['num']) $data[-7] = array('num'=>$data[-7]['num'],'val'=>$timedataarr[-7]['val'],'label'=>$timedataarr[-7]['label']);
|
if ($data[-7]['num']) $data[-7] = array('num' => $data[-7]['num'], 'val' => $timedataarr[-7]['val'], 'label' => $timedataarr[-7]['label']);
|
||||||
$data[-30]['num'] =(isset($data[-30]['num']) ? intval($data[-30]['num']):0) + (isset($data[-7]['num']) ? intval($data[-7]['num']):0);
|
$data[-30]['num'] = (isset($data[-30]['num']) ? intval($data[-30]['num']) : 0) + (isset($data[-7]['num']) ? intval($data[-7]['num']) : 0);
|
||||||
if($data[-30]['num']) $data[-30] = array('num'=>$data[-30]['num'],'val'=>$timedataarr[-30]['val'],'label'=>$timedataarr[-30]['label']);
|
if ($data[-30]['num']) $data[-30] = array('num' => $data[-30]['num'], 'val' => $timedataarr[-30]['val'], 'label' => $timedataarr[-30]['label']);
|
||||||
$data[-90]['num'] =(isset($data[-90]['num']) ? intval($data[-90]['num']):0) + (isset($data[-30]['num']) ? intval($data[-30]['num']):0);
|
$data[-90]['num'] = (isset($data[-90]['num']) ? intval($data[-90]['num']) : 0) + (isset($data[-30]['num']) ? intval($data[-30]['num']) : 0);
|
||||||
if($data[-90]['num']) $data[-90] = array('num'=>$data[-90]['num'],'val'=>$timedataarr[-90]['val'],'label'=>$timedataarr[-90]['label']);
|
if ($data[-90]['num']) $data[-90] = array('num' => $data[-90]['num'], 'val' => $timedataarr[-90]['val'], 'label' => $timedataarr[-90]['label']);
|
||||||
$data[-365]['num'] =(isset($data[-365]['num']) ? intval($data[-365]['num']):0) + (isset($data[-90]['num']) ? intval($data[-90]['num']):0);
|
$data[-365]['num'] = (isset($data[-365]['num']) ? intval($data[-365]['num']) : 0) + (isset($data[-90]['num']) ? intval($data[-90]['num']) : 0);
|
||||||
if($data[-365]['num']) $data[-365] = array('num'=>$data[-365]['num'],'val'=>$timedataarr[-365]['val'],'label'=>$timedataarr[-365]['label']);
|
if ($data[-365]['num']) $data[-365] = array('num' => $data[-365]['num'], 'val' => $timedataarr[-365]['val'], 'label' => $timedataarr[-365]['label']);
|
||||||
foreach($data as $k=>$v){
|
foreach ($data as $k => $v) {
|
||||||
if($v['num'] == 0) unset($data[$k]);
|
if ($v['num'] == 0) unset($data[$k]);
|
||||||
}
|
}
|
||||||
krsort($data);
|
krsort($data);
|
||||||
} elseif ($skey == 'grouptag') {
|
} elseif ($skey == 'grouptag') {
|
||||||
@@ -774,13 +794,436 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exit(json_encode($data));
|
exit(json_encode($data));
|
||||||
} elseif ($operation == 'search_menu') {
|
} elseif ($operation == 'search_menu') {
|
||||||
$skey = isset($_GET['skey']) ? trim($_GET['skey']) : '';
|
|
||||||
$data = array();
|
|
||||||
exit(json_decode($data));
|
|
||||||
} elseif ($operation == 'getsearchmenudata') {//获取筛选项
|
|
||||||
|
|
||||||
} elseif ($operation == 'setshow') {//设置显示字段
|
$skey = isset($_GET['skey']) ? trim($_GET['skey']) : '';
|
||||||
|
|
||||||
|
if($skey == 'tag'){
|
||||||
|
$sql = "select distinct rt.tid from %t rt left join %t r on rt.rid=r.rid ";
|
||||||
|
$params = [ 'pichome_resourcestag','pichome_resources'];
|
||||||
|
|
||||||
|
}else{
|
||||||
|
exit(json_encode(array()));
|
||||||
|
}
|
||||||
|
$wheresql = " 1 ";
|
||||||
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||||
|
$fids = isset($_GET['fids']) ? trim($_GET['fids']) : '';
|
||||||
|
if ($appid) {
|
||||||
|
$wheresql .= ' and r.appid = %s ';
|
||||||
|
$para[] = $appid;
|
||||||
|
}
|
||||||
|
if ($fids) {
|
||||||
|
$sql .= " LEFT JOIN %t fr on fr.rid = r.rid ";
|
||||||
|
$wheresql .= ' and fr.fid in(%n)';
|
||||||
|
$fidarr = explode(',', $fids);
|
||||||
|
$para[] = $fidarr;
|
||||||
|
$params[] = 'pichome_folderresources';
|
||||||
|
}
|
||||||
|
//关键词条件
|
||||||
|
$keyword = isset($_GET['keyword']) ? htmlspecialchars($_GET['keyword']) : '';
|
||||||
|
if ($keyword) {
|
||||||
|
$sql .= " LEFT JOIN %t c on c.rid = r.rid left join %t rt on r.rid = rt.rid left join %t t on rt.tid= t.tid ";
|
||||||
|
$params[] = 'pichome_comments';
|
||||||
|
$params[] = 'pichome_resourcestag';
|
||||||
|
$params[] = 'pichome_tag';
|
||||||
|
if (!in_array('pichome_resources_attr', $params)) {
|
||||||
|
$sql .= "left join %t ra on r.rid = ra.rid";
|
||||||
|
$params[] = 'pichome_resources_attr';
|
||||||
|
}
|
||||||
|
$keywords = array();
|
||||||
|
$arr1 = explode('+', $keyword);
|
||||||
|
foreach ($arr1 as $value1) {
|
||||||
|
$value1 = trim($value1);
|
||||||
|
$arr2 = explode(' ', $value1);
|
||||||
|
$arr3 = array();
|
||||||
|
foreach ($arr2 as $value2) {
|
||||||
|
$arr3[] = " r.name LIKE %s ";
|
||||||
|
$para[] = '%' . $value2 . '%';
|
||||||
|
$arr3[] = " ra.link LIKE %s ";
|
||||||
|
$para[] = '%' . $value2 . '%';
|
||||||
|
$arr3[] = " ra.desc LIKE %s ";
|
||||||
|
$para[] = '%' . $value2 . '%';
|
||||||
|
$arr3[] = " c.annotation LIKE %s ";
|
||||||
|
$para[] = '%' . $value2 . '%';
|
||||||
|
$arr3[] = " t.tagname LIKE %s ";
|
||||||
|
$para[] = '%' . $value2 . '%';
|
||||||
|
}
|
||||||
|
$keywords[] = "(" . implode(" OR ", $arr3) . ")";
|
||||||
|
}
|
||||||
|
if ($keywords) {
|
||||||
|
$wheresql .= " and (" . implode(" AND ", $keywords) . ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//颜色条件
|
||||||
|
if (isset($_GET['color'])) {
|
||||||
|
$persion = isset($_GET['persion']) ? intval($_GET['persion']) : 0;
|
||||||
|
$maxColDist = 764.8339663572415;
|
||||||
|
$similarity = 80 + (20 / 100) * $persion;
|
||||||
|
$color = trim($_GET['color']);
|
||||||
|
$rgbcolor = hex2rgb($color);
|
||||||
|
$sql .= " left join %t p on r.rid = p.rid ";
|
||||||
|
$params[] = 'pichome_palette';
|
||||||
|
$wheresql .= "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";
|
||||||
|
if (!empty($para)) $para = array_merge($para, array($maxColDist, $rgbcolor['r'], $rgbcolor['r'], $rgbcolor['g'], $rgbcolor['r'], $rgbcolor['b'], $maxColDist, $similarity));
|
||||||
|
else $para = array($maxColDist, $rgbcolor['r'], $rgbcolor['r'], $rgbcolor['g'], $rgbcolor['r'], $rgbcolor['b'], $maxColDist, $similarity);
|
||||||
|
}
|
||||||
|
//标签条件
|
||||||
|
if (isset($_GET['tag'])) {
|
||||||
|
$tagwherearr = [];
|
||||||
|
$tagrelative = isset($_GET['tagrelative']) ? intval($_GET['tagrelative']) : 1;
|
||||||
|
if (!in_array('pichome_resources_attr', $params)) {
|
||||||
|
$sql .= "left join %t ra on r.rid = ra.rid";
|
||||||
|
$params[] = 'pichome_resources_attr';
|
||||||
|
}
|
||||||
|
$tag = trim($_GET['tag']);
|
||||||
|
if ($tag == -1) {
|
||||||
|
$wheresql .= " and ra.tag = '' ";
|
||||||
|
} else {
|
||||||
|
$tagval = explode(',', trim($_GET['tag']));
|
||||||
|
foreach ($tagval as $v) {
|
||||||
|
$tagwherearr[] = " find_in_set(%d,ra.tag)";
|
||||||
|
$para[] = $v;
|
||||||
|
}
|
||||||
|
if ($tagrelative) {
|
||||||
|
$wheresql .= " and (" . implode(" or ", $tagwherearr) . ")";
|
||||||
|
} else {
|
||||||
|
$wheresql .= " and (" . implode(" and ", $tagwherearr) . ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//时长条件
|
||||||
|
if (isset($_GET['duration'])) {
|
||||||
|
if (!in_array('pichome_resources_attr', $params)) {
|
||||||
|
$sql .= "left join %t ra on r.rid = ra.rid";
|
||||||
|
$params[] = 'pichome_resources_attr';
|
||||||
|
}
|
||||||
|
$durationarr = explode('_', $_GET['duration']);
|
||||||
|
$dunit = isset($_GET['dunit']) ? trim($_GET['dunit']) : 's';
|
||||||
|
if ($durationarr[0]) {
|
||||||
|
$wheresql .= " and ra.duration >= %d";
|
||||||
|
$para[] = ($dunit == 'm') ? $durationarr[0] * 60 : $durationarr[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($durationarr[1]) {
|
||||||
|
$wheresql .= " and ra.duration <= %d";
|
||||||
|
$para[] = ($dunit == 'm') ? $durationarr[1] * 60 : $durationarr[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//标注条件
|
||||||
|
if (isset($_GET['comments'])) {
|
||||||
|
$sql .= " left join %t c on r.rid = c.rid";
|
||||||
|
$params[] = 'pichome_comments';
|
||||||
|
$comments = intval($_GET['comments']);
|
||||||
|
$cval = isset($_GET['cval']) ? trim($_GET['cval']) : '';
|
||||||
|
if (!$comments) {
|
||||||
|
$wheresql .= " and isnull(c.annotation) ";
|
||||||
|
} else {
|
||||||
|
if ($cval) {
|
||||||
|
$cvalarr = explode(',', $cval);
|
||||||
|
$cvalwhere = [];
|
||||||
|
foreach ($cvalarr as $cv) {
|
||||||
|
$cvalwhere[] = " c.annotation like %s";
|
||||||
|
$para[] = '%' . $cv . '%';
|
||||||
|
}
|
||||||
|
$wheresql .= " and (" . implode(" or ", $cvalwhere) . ")";
|
||||||
|
} else {
|
||||||
|
$wheresql .= " and !isnull(c.annotation)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//注释条件
|
||||||
|
if (isset($_GET['desc'])) {
|
||||||
|
if (!in_array('pichome_resources_attr', $params)) {
|
||||||
|
$sql .= "left join %t ra on r.rid = ra.rid";
|
||||||
|
$params[] = 'pichome_resources_attr';
|
||||||
|
}
|
||||||
|
$desc = intval($_GET['desc']);
|
||||||
|
$descval = isset($_GET['descval']) ? trim($_GET['descval']) : '';
|
||||||
|
if (!$desc) {
|
||||||
|
$wheresql .= " and (isnull(ra.desc) or ra.desc='') ";
|
||||||
|
} else {
|
||||||
|
if ($descval) {
|
||||||
|
$descvalarr = explode(',', $descval);
|
||||||
|
$descvalwhere = [];
|
||||||
|
foreach ($descvalarr as $dv) {
|
||||||
|
$descvalwhere[] = " ra.desc like %s";
|
||||||
|
$para[] = '%' . $dv . '%';
|
||||||
|
}
|
||||||
|
$wheresql .= " and (" . implode(" or ", $descvalwhere) . ")";
|
||||||
|
} else {
|
||||||
|
$wheresql .= " and ra.desc !=''";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//链接条件
|
||||||
|
if (isset($_GET['link'])) {
|
||||||
|
if (!in_array('pichome_resources_attr', $params)) {
|
||||||
|
$sql .= "left join %t ra on r.rid = ra.rid";
|
||||||
|
$params[] = 'pichome_resources_attr';
|
||||||
|
}
|
||||||
|
$link = intval($_GET['link']);
|
||||||
|
$linkval = isset($_GET['linkval']) ? trim($_GET['linkval']) : '';
|
||||||
|
if (!$link) {
|
||||||
|
$wheresql .= " and (isnull(ra.link) or ra.link='') ";
|
||||||
|
} else {
|
||||||
|
if ($linkval) {
|
||||||
|
$linkvalarr = explode(',', $linkval);
|
||||||
|
$linkvalwhere = [];
|
||||||
|
foreach ($linkvalarr as $lv) {
|
||||||
|
$linkvalwhere[] = " ra.link like %s";
|
||||||
|
$para[] = '%' . $lv . '%';
|
||||||
|
}
|
||||||
|
$wheresql .= " and (" . implode(" or ", $linkvalwhere) . ")";
|
||||||
|
} else {
|
||||||
|
$wheresql .= " and ra.link !='' ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//形状条件
|
||||||
|
if (isset($_GET['shape'])) {
|
||||||
|
$shape = trim($_GET['shape']);
|
||||||
|
$shapes = explode(',', $shape);
|
||||||
|
|
||||||
|
$shapewherearr = [];
|
||||||
|
foreach ($shapes as $v) {
|
||||||
|
switch ($v) {
|
||||||
|
case 7://方图
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) = %d';
|
||||||
|
$para[] = 100;
|
||||||
|
break;
|
||||||
|
case 8://横图
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) > %d and round((r.width / r.height) * 100) < 250';
|
||||||
|
$para[] = 100;
|
||||||
|
break;
|
||||||
|
case 5://细长横图
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) >= %d';
|
||||||
|
$para[] = 250;
|
||||||
|
break;
|
||||||
|
case 6://细长竖图
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) <= %d';
|
||||||
|
$para[] = 40;
|
||||||
|
break;
|
||||||
|
case 9://竖图
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) < %d and round((r.width / r.height) * 100) > %d';
|
||||||
|
$para[] = 100;
|
||||||
|
$para[] = 40;
|
||||||
|
break;
|
||||||
|
case 1://4:3
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) = %d';
|
||||||
|
$para[] = (4 / 3) * 100;
|
||||||
|
break;
|
||||||
|
case 2://3:4
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) = %d';
|
||||||
|
$para[] = (3 / 4) * 100;
|
||||||
|
break;
|
||||||
|
case 3://16:9
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) = %d';
|
||||||
|
$para[] = (16 / 9) * 100;
|
||||||
|
break;
|
||||||
|
case 4://9:16
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) = %d';
|
||||||
|
$para[] = (9 / 16) * 100;
|
||||||
|
break;
|
||||||
|
/*case 10:
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) = %d';
|
||||||
|
$para[] = ($swidth / $sheight) * 100;
|
||||||
|
break;*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isset($_GET['shapesize'])) {
|
||||||
|
$shapesize = trim($_GET['shapesize']);
|
||||||
|
$shapesizes = explode(':', $shapesize);
|
||||||
|
$swidth = intval($shapesizes[0]);
|
||||||
|
$sheight = intval($shapesizes[1]);
|
||||||
|
$shapewherearr[] = ' round((r.width / r.height) * 100) = %d';
|
||||||
|
$para[] = ($swidth / $sheight) * 100;
|
||||||
|
}
|
||||||
|
if ($shapewherearr) {
|
||||||
|
$wheresql .= " and (" . implode(" or ", $shapewherearr) . ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//评分条件
|
||||||
|
if (isset($_GET['grade'])) {
|
||||||
|
$grade = trim($_GET['grade']);
|
||||||
|
$grades = explode(',', $grade);
|
||||||
|
$wheresql .= " and r.grade in(%n)";
|
||||||
|
$para[] = $grades;
|
||||||
|
}
|
||||||
|
//类型条件
|
||||||
|
if (isset($_GET['ext'])) {
|
||||||
|
$ext = trim($_GET['ext']);
|
||||||
|
$exts = explode(',', $ext);
|
||||||
|
$wheresql .= " and r.ext in(%n)";
|
||||||
|
$para[] = $exts;
|
||||||
|
}
|
||||||
|
//添加日期
|
||||||
|
if (isset($_GET['btime'])) {
|
||||||
|
$btime = explode('_', $_GET['btime']);
|
||||||
|
$bstart = strtotime($btime[0]);
|
||||||
|
$bend = strtotime($btime[1]) + 24 * 60 * 60;
|
||||||
|
if ($bstart) {
|
||||||
|
$wheresql .= " and r.btime > %d";
|
||||||
|
//将时间补足13位
|
||||||
|
$para[] = $bstart * 1000;
|
||||||
|
}
|
||||||
|
if ($bend) {
|
||||||
|
$wheresql .= " and r.btime < %d";
|
||||||
|
//将时间补足13位
|
||||||
|
$para[] = $bend * 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//修改日期
|
||||||
|
if (isset($_GET['dateline'])) {
|
||||||
|
$dateline = explode('_', $_GET['dateline']);
|
||||||
|
$dstart = strtotime($dateline[0]);
|
||||||
|
$dend = strtotime($dateline[1]) + 24 * 60 * 60;
|
||||||
|
if ($dstart) {
|
||||||
|
$wheresql .= " and r.dateline > %d";
|
||||||
|
//将时间补足13位
|
||||||
|
$para[] = $dstart * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($dend) {
|
||||||
|
$wheresql .= " and r.dateline < %d";
|
||||||
|
//将时间补足13位
|
||||||
|
$para[] = $dend * 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//创建日期
|
||||||
|
if (isset($_GET['mtime'])) {
|
||||||
|
$mtime = explode('_', $_GET['mtime']);
|
||||||
|
$mstart = strtotime($mtime[0]);
|
||||||
|
$mend = strtotime($mtime[1]) + 24 * 60 * 60;
|
||||||
|
if ($mstart) {
|
||||||
|
$wheresql .= " and r.mtime > %d";
|
||||||
|
//将时间补足13位
|
||||||
|
$para[] = $mstart * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($mend) {
|
||||||
|
$wheresql .= " and r.mtime < %d";
|
||||||
|
//将时间补足13位
|
||||||
|
$para[] = $mend * 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//尺寸条件
|
||||||
|
if (isset($_GET['wsize']) || isset($_GET['hsize'])) {
|
||||||
|
$wsizearr = explode('_', $_GET['wsize']);
|
||||||
|
$hsizearr = explode('_', $_GET['hsize']);
|
||||||
|
if ($wsizearr[0]) {
|
||||||
|
$wheresql .= " and r.width >= %d";
|
||||||
|
$para[] = intval($wsizearr[0]);
|
||||||
|
}
|
||||||
|
if ($wsizearr[1]) {
|
||||||
|
$wheresql .= " and r.width <= %d";
|
||||||
|
$para[] = intval($wsizearr[1]);
|
||||||
|
}
|
||||||
|
if ($hsizearr[0]) {
|
||||||
|
$wheresql .= " and r.height >= %d";
|
||||||
|
$para[] = intval($hsizearr[0]);
|
||||||
|
}
|
||||||
|
if ($hsizearr[1]) {
|
||||||
|
$wheresql .= " and r.height <= %d";
|
||||||
|
$para[] = intval($hsizearr[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//大小条件
|
||||||
|
if (isset($_GET['size'])) {
|
||||||
|
$size = explode('_', $_GET['size']);
|
||||||
|
$unit = isset($_GET['unit']) ? intval($_GET['unit']) : 1;
|
||||||
|
switch ($unit) {
|
||||||
|
case 0://b
|
||||||
|
$size[0] = $size[0];
|
||||||
|
$size[1] = $size[1];
|
||||||
|
break;
|
||||||
|
case 1://kb
|
||||||
|
$size[0] = $size[0] * 1024;
|
||||||
|
$size[1] = $size[1] * 1024;
|
||||||
|
break;
|
||||||
|
case 2://mb
|
||||||
|
$size[0] = $size[0] * 1024 * 1024;
|
||||||
|
$size[1] = $size[1] * 1024 * 1024;
|
||||||
|
break;
|
||||||
|
case 3://gb
|
||||||
|
$size[0] = $size[0] * 1024 * 1024 * 1024;
|
||||||
|
$size[1] = $size[1] * 1024 * 1024 * 1024;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ($size[0]) {
|
||||||
|
$wheresql .= " and r.szie > %d";
|
||||||
|
$para[] = $size[0];
|
||||||
|
}
|
||||||
|
if ($size[1]) {
|
||||||
|
$wheresql .= " and r.size < %d";
|
||||||
|
$para[] = $size[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$wheresql .= " and r.isdelete < 1 ";
|
||||||
|
$data = array();
|
||||||
|
if ($skey == 'tag') {
|
||||||
|
$cid = isset($_GET['cid']) ? $_GET['cid']:'';
|
||||||
|
if ($cid) {
|
||||||
|
if ($cid == -1) {
|
||||||
|
$sql .= " left join %t tr on isnull(tr.cid)";
|
||||||
|
$params[] = 'pichome_tagrelation';
|
||||||
|
} else {
|
||||||
|
$sql .= " left join %t tr on tr.tid = rt.tid";
|
||||||
|
$params[] = 'pichome_tagrelation';
|
||||||
|
$wheresql .= ' and tr.cid = %s';
|
||||||
|
$para[] = $cid;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$tagkeyword = isset($_GET['tagkeyword']) ? trim($_GET['tagkeyword']):'';
|
||||||
|
if ($tagkeyword) {
|
||||||
|
$sql .= " left join %t t on t.tid=rt.tid";
|
||||||
|
$params[] = 'pichome_tag';
|
||||||
|
$wheresql .= " and t.tagname LIKE %s ";
|
||||||
|
$para[] = '%'.$tagkeyword.'%';
|
||||||
|
}
|
||||||
|
if (!empty($para)) $params = array_merge($params, $para);
|
||||||
|
|
||||||
|
//所有符合条件标签id
|
||||||
|
$tids= [];
|
||||||
|
foreach (DB::fetch_all("$sql where $wheresql", $params) as $v){
|
||||||
|
$tids[] = $v['tid'];
|
||||||
|
}
|
||||||
|
$catdata = [];
|
||||||
|
if($appid){
|
||||||
|
$cattotal = 0;
|
||||||
|
$catdata[]=['cid'=>0,'catname'=>'全部','num'=>count($tids)];
|
||||||
|
foreach (DB::fetch_all("select count(t.tid) as num,g.cid,g.catname from %t t left join %t
|
||||||
|
tr on tr.tid=t.tid left join %t g on g.cid = tr.cid where t.tid in(%n) and g.appid = %s group by g.cid",
|
||||||
|
array('pichome_tag','pichome_tagrelation','pichome_taggroup',$tids,$appid)) as $v) {
|
||||||
|
if($v['cid']){
|
||||||
|
$catdata[]=['cid'=>$v['cid'],'catname'=>$v['catname'],'num'=>$v['num']];
|
||||||
|
}
|
||||||
|
$cattotal += $v['num'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$catdata[]=['cid'=>-1,'catname'=>'未分类','num'=>count($tids) - $cattotal];
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$catdata[]=['cid'=>0,'catname'=>'全部','num'=>count($tids)];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//最后返回数组
|
||||||
|
$data = [];
|
||||||
|
|
||||||
|
$data['catdata'] = $catdata;
|
||||||
|
}
|
||||||
|
exit(json_encode($data));
|
||||||
|
} elseif ($operation == 'getsearchmenudata') {//获取筛选项
|
||||||
|
|
||||||
|
} elseif ($operation == 'setshow') {//设置显示字段
|
||||||
$showfileds = isset($_GET['showfileds']) ? trim($_GET['showfileds']) : '';
|
$showfileds = isset($_GET['showfileds']) ? trim($_GET['showfileds']) : '';
|
||||||
$other = isset($_GET['other']) ? trim($_GET['other']) : '';
|
$other = isset($_GET['other']) ? trim($_GET['other']) : '';
|
||||||
// $allowsetarr = ['name', 'tagging', 'extension', 'other', 'size', 'filesize', 'grade', 'btime', 'dateline', 'mtime'];
|
// $allowsetarr = ['name', 'tagging', 'extension', 'other', 'size', 'filesize', 'grade', 'btime', 'dateline', 'mtime'];
|
||||||
@@ -795,7 +1238,7 @@
|
|||||||
if (!$uid) exit(json_encode(array('error' => true)));
|
if (!$uid) exit(json_encode(array('error' => true)));
|
||||||
C::t('user_setting')->update_by_skey('pichomeshowfileds', serialize(array('filed' => $showfileds, 'other' => $other)), $uid);
|
C::t('user_setting')->update_by_skey('pichomeshowfileds', serialize(array('filed' => $showfileds, 'other' => $other)), $uid);
|
||||||
exit(json_encode(array('success' => true)));
|
exit(json_encode(array('success' => true)));
|
||||||
} elseif ($operation == 'setsort') {//设置排序方式
|
} elseif ($operation == 'setsort') {//设置排序方式
|
||||||
$sortfiled = isset($_GET['sortfiled']) ? trim($_GET['sortfiled']) : '';
|
$sortfiled = isset($_GET['sortfiled']) ? trim($_GET['sortfiled']) : '';
|
||||||
$allowsortarr = ['name', 'size', 'whsize', 'ext', 'size', 'grade', 'filesize', 'mtime', 'dateline', 'btime', 'duration'];
|
$allowsortarr = ['name', 'size', 'whsize', 'ext', 'size', 'grade', 'filesize', 'mtime', 'dateline', 'btime', 'duration'];
|
||||||
if (!in_array($sortfiled, $allowsortarr)) exit(json_encode(array('error' => true)));
|
if (!in_array($sortfiled, $allowsortarr)) exit(json_encode(array('error' => true)));
|
||||||
@@ -806,13 +1249,13 @@
|
|||||||
C::t('user_setting')->update_by_skey('pichomesortfileds', serialize(array('filed' => $sortfiled, 'sort' => $sort)), $uid);
|
C::t('user_setting')->update_by_skey('pichomesortfileds', serialize(array('filed' => $sortfiled, 'sort' => $sort)), $uid);
|
||||||
exit(json_encode(array('success' => true)));
|
exit(json_encode(array('success' => true)));
|
||||||
|
|
||||||
} elseif ($operation == 'setlayout') {//设置布局方式
|
} elseif ($operation == 'setlayout') {//设置布局方式
|
||||||
$layout = isset($_GET['layout']) ? trim($_GET['layout']) : '';
|
$layout = isset($_GET['layout']) ? trim($_GET['layout']) : '';
|
||||||
$uid = getglobal('uid');
|
$uid = getglobal('uid');
|
||||||
if (!$uid) exit(json_encode(array('error' => true)));
|
if (!$uid) exit(json_encode(array('error' => true)));
|
||||||
C::t('user_setting')->update_by_skey('pichomelayout', serialize(array('layout' => $layout)), $uid);
|
C::t('user_setting')->update_by_skey('pichomelayout', serialize(array('layout' => $layout)), $uid);
|
||||||
exit(json_encode(array('success' => true)));
|
exit(json_encode(array('success' => true)));
|
||||||
} elseif ($operation == 'likewords') {//联想词
|
} elseif ($operation == 'likewords') {//联想词
|
||||||
$keyword = isset($_GET['keyword']) ? htmlspecialchars($_GET['keyword']) : '';
|
$keyword = isset($_GET['keyword']) ? htmlspecialchars($_GET['keyword']) : '';
|
||||||
//取出name,desc,tagname,comments和最近搜索中包含关键词的内容各10条
|
//取出name,desc,tagname,comments和最近搜索中包含关键词的内容各10条
|
||||||
$resourceslikeword = C::t('pichome_resources')->fetch_like_words($keyword);
|
$resourceslikeword = C::t('pichome_resources')->fetch_like_words($keyword);
|
||||||
@@ -841,7 +1284,7 @@
|
|||||||
$returnlikekeywords = array_slice($returnlikekeywords, 0, 10);
|
$returnlikekeywords = array_slice($returnlikekeywords, 0, 10);
|
||||||
|
|
||||||
exit(json_encode(array('likewords' => $returnlikekeywords)));
|
exit(json_encode(array('likewords' => $returnlikekeywords)));
|
||||||
} elseif ($operation == 'screensetting') {//筛选设置
|
} elseif ($operation == 'screensetting') {//筛选设置
|
||||||
$uid = getglobal('uid');
|
$uid = getglobal('uid');
|
||||||
if (!$uid) exit(json_encode(array('error' => true)));
|
if (!$uid) exit(json_encode(array('error' => true)));
|
||||||
if (!submitcheck('settingsubmit')) {
|
if (!submitcheck('settingsubmit')) {
|
||||||
@@ -852,7 +1295,7 @@
|
|||||||
C::t('user_setting')->update_by_skey('pichomeuserscreen', $screen, $uid);
|
C::t('user_setting')->update_by_skey('pichomeuserscreen', $screen, $uid);
|
||||||
exit(json_encode(array('success' => true)));
|
exit(json_encode(array('success' => true)));
|
||||||
}
|
}
|
||||||
} elseif ($operation == 'getscreen') {//获取筛选项
|
} elseif ($operation == 'getscreen') {//获取筛选项
|
||||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||||
if ($appid) {
|
if ($appid) {
|
||||||
if ($data = DB::fetch_first("select * from %t where appid=%s ", array('pichome_vapp', $appid))) {
|
if ($data = DB::fetch_first("select * from %t where appid=%s ", array('pichome_vapp', $appid))) {
|
||||||
@@ -866,7 +1309,7 @@
|
|||||||
if ($tgdata) {
|
if ($tgdata) {
|
||||||
$tgdata['chacked'] = $tg['chacked'];
|
$tgdata['chacked'] = $tg['chacked'];
|
||||||
$data['filter'][$k]['group'][$key] = $tgdata;
|
$data['filter'][$k]['group'][$key] = $tgdata;
|
||||||
}else{
|
} else {
|
||||||
unset($data['filter'][$k]['group'][$key]);
|
unset($data['filter'][$k]['group'][$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -892,24 +1335,24 @@
|
|||||||
exit(json_encode(array('success' => true, 'data' => $_G['setting']['pichomefilterfileds'])));
|
exit(json_encode(array('success' => true, 'data' => $_G['setting']['pichomefilterfileds'])));
|
||||||
} else {
|
} else {
|
||||||
$setting = C::t('setting')->fetch_all('pichomefilterfileds');
|
$setting = C::t('setting')->fetch_all('pichomefilterfileds');
|
||||||
exit(json_encode(array('success' => true, 'data' =>$setting['pichomefilterfileds'])));
|
exit(json_encode(array('success' => true, 'data' => $setting['pichomefilterfileds'])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif ($operation == 'createshare') {//分享
|
} elseif ($operation == 'createshare') {//分享
|
||||||
$rid = isset($_GET['rid']) ? trim($_GET['rid']) : '';
|
$rid = isset($_GET['rid']) ? trim($_GET['rid']) : '';
|
||||||
if ($shareurl = C::t('pichome_share')->add_share($rid)) {
|
if ($shareurl = C::t('pichome_share')->add_share($rid)) {
|
||||||
exit(json_encode(array('success' => $shareurl)));
|
exit(json_encode(array('success' => $shareurl)));
|
||||||
} else {
|
} else {
|
||||||
exit(json_encode(array('error' => true)));
|
exit(json_encode(array('error' => true)));
|
||||||
}
|
}
|
||||||
} elseif ($operation == 'getapp') {
|
} elseif ($operation == 'getapp') {
|
||||||
$apps = [];
|
$apps = [];
|
||||||
foreach (DB::fetch_all("select * from %t where 1", array('pichome_vapp')) as $v) {
|
foreach (DB::fetch_all("select * from %t where 1", array('pichome_vapp')) as $v) {
|
||||||
$apps[] = $v;
|
$apps[] = $v;
|
||||||
}
|
}
|
||||||
exit(json_encode(array('vapps' => $apps)));
|
exit(json_encode(array('vapps' => $apps)));
|
||||||
} elseif ($operation == 'reloadresources') {//更新单个文件资源
|
} elseif ($operation == 'reloadresources') {//更新单个文件资源
|
||||||
$rid = isset($_GET['rid']) ? trim($_GET['rid']) : '';
|
$rid = isset($_GET['rid']) ? trim($_GET['rid']) : '';
|
||||||
if (!$rid) exit(json_encode(array('error' => 'empty resources')));
|
if (!$rid) exit(json_encode(array('error' => 'empty resources')));
|
||||||
include_once dzz_libfile('eagleexport');
|
include_once dzz_libfile('eagleexport');
|
||||||
@@ -918,18 +1361,18 @@
|
|||||||
exit(json_encode(array('success' => true)));
|
exit(json_encode(array('success' => true)));
|
||||||
}
|
}
|
||||||
exit(json_encode(array('success' => true)));
|
exit(json_encode(array('success' => true)));
|
||||||
} elseif ($operation == 'sharedetails') {//分享详情数据
|
} elseif ($operation == 'sharedetails') {//分享详情数据
|
||||||
$id = isset($_GET['id']) ? trim($_GET['id']) : '';
|
$id = isset($_GET['id']) ? trim($_GET['id']) : '';
|
||||||
$shareid = dzzdecode($id, '', 0);
|
$shareid = dzzdecode($id, '', 0);
|
||||||
$sharedata = C::t('pichome_share')->fetch($shareid);
|
$sharedata = C::t('pichome_share')->fetch($shareid);
|
||||||
if (!$sharedata) exit(json_encode(array('error' => 'share is not exists')));
|
if (!$sharedata) exit(json_encode(array('error' => 'share is not exists')));
|
||||||
$resourcesdata = C::t('pichome_resources')->fetch_by_rid($sharedata['filepath']);
|
$resourcesdata = C::t('pichome_resources')->fetch_by_rid($sharedata['filepath']);
|
||||||
exit(json_encode(array('data' => $resourcesdata)));
|
exit(json_encode(array('data' => $resourcesdata)));
|
||||||
} elseif ($operation == 'getapptagcat') {
|
} elseif ($operation == 'getapptagcat') {
|
||||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||||
$catdata = C::t('pichome_taggroup')->fetch_by_appid($appid);
|
$catdata = C::t('pichome_taggroup')->fetch_by_appid($appid);
|
||||||
exit(json_encode($catdata));
|
exit(json_encode($catdata));
|
||||||
} elseif ($operation == 'appset') {
|
} elseif ($operation == 'appset') {
|
||||||
Hook::listen('adminlogin');//检查是否登录,未登录跳转到登录界面
|
Hook::listen('adminlogin');//检查是否登录,未登录跳转到登录界面
|
||||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']) : '';
|
||||||
if (!$appid) exit(json_encode(array('error' => true)));
|
if (!$appid) exit(json_encode(array('error' => true)));
|
||||||
@@ -940,4 +1383,4 @@
|
|||||||
];
|
];
|
||||||
C::t('pichome_vapp')->update($appid, $setarr);
|
C::t('pichome_vapp')->update($appid, $setarr);
|
||||||
exit(json_encode(array('success' => true)));
|
exit(json_encode(array('success' => true)));
|
||||||
}
|
}
|
||||||
@@ -43,12 +43,12 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach(DB::fetch_all("select * from %t where 1",array('pichome_vapp')) as $v){
|
foreach(DB::fetch_all("select * from %t where 1",array('pichome_vapp')) as $v){
|
||||||
if(!in_array($eagledir.'/'.$v['path'],$apppaths)){
|
if(!in_array($eagledir.'/'.$v['path'],$apppaths)){
|
||||||
C::t('pichome_vapp')->delete_vapp_by_appid($v['appid']);
|
C::t('pichome_vapp')->delete_vapp_by_appid($v['appid']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//创建库
|
//创建库
|
||||||
foreach ($apppaths as $val) {
|
foreach ($apppaths as $val) {
|
||||||
$jsonfile = $val . BS . 'metadata.json';
|
$jsonfile = $val . BS . 'metadata.json';
|
||||||
|
|||||||
@@ -1,24 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('IN_OAOOA')) {
|
if (!defined('IN_OAOOA')) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
}
|
}
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
@ini_set('max_execution_time', 0);
|
@ini_set('max_execution_time', 0);
|
||||||
require_once(DZZ_ROOT . './dzz/class/class_encode.php');
|
require_once(DZZ_ROOT . './dzz/class/class_encode.php');
|
||||||
require_once './core/class/class_Color.php';
|
require_once './core/class/class_Color.php';
|
||||||
require_once libfile('function/user', '', 'user');
|
require_once libfile('function/user', '', 'user');
|
||||||
|
|
||||||
class eagleexport
|
class eagleexport
|
||||||
{
|
{
|
||||||
private $path = '';//待执行数据path
|
private $path = '';//待执行数据path
|
||||||
private $appid = 0;//库id
|
private $appid = 0;//库id
|
||||||
private $uid = 0;//用户id
|
private $uid = 0;//用户id
|
||||||
private $username = null;//用户名
|
private $username = null;//用户名
|
||||||
private $filenum = 0;//总文件数
|
private $filenum = 0;//总文件数
|
||||||
private $checkpage = 1;
|
private $checkpage = 1;
|
||||||
private $checklimit = 100;
|
private $checklimit = 1000;
|
||||||
|
private $onceexportnum = 1000;
|
||||||
private $checknum = 0;
|
private $checknum = 0;
|
||||||
private $eagledir =DZZ_ROOT.'library';
|
private $eagledir = DZZ_ROOT . 'library';
|
||||||
|
private $readtxt = DZZ_ROOT . './data/attachment/cache/';
|
||||||
private $exportstatus = 0;
|
private $exportstatus = 0;
|
||||||
private $donum = 0;
|
private $donum = 0;
|
||||||
private $lastid = '';
|
private $lastid = '';
|
||||||
@@ -30,215 +32,93 @@
|
|||||||
$this->appid = $data['appid'];
|
$this->appid = $data['appid'];
|
||||||
$this->uid = $data['uid'];
|
$this->uid = $data['uid'];
|
||||||
$this->username = $data['username'];
|
$this->username = $data['username'];
|
||||||
$this->exportstatus = ($data['status'] == 1) ? 1:0;
|
$this->exportstatus = $data['state'];
|
||||||
// $this->donum = $data['donum'];
|
$this->donum = $data['donum'];
|
||||||
$this->eagledir = str_replace(BS,'/',$this->eagledir);
|
$this->filenum = $data['filenum'];
|
||||||
|
$this->eagledir = str_replace(BS, '/', $this->eagledir);
|
||||||
$this->lastid = $data['lastid'];
|
$this->lastid = $data['lastid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exportAloneFile($rid,$force = 0)
|
public function initExport()
|
||||||
{
|
{
|
||||||
$data = C::t('pichome_resources')->fetch($rid);
|
$filedir = $this->eagledir . '/' . $this->path . '/images';
|
||||||
$this->appid = $data['appid'];
|
$readtxt = $this->readtxt . 'eagleexport' . md5($this->path) . '.txt';
|
||||||
//获得文件对应目录id
|
$filenum = 0;
|
||||||
$id = str_replace($this->appid, '', $rid);
|
if (!is_file($readtxt) || filemtime($readtxt) < filemtime($this->eagledir . '/' . $this->path . '/metadata.json')) {
|
||||||
$appdata = C::t('pichome_vapp')->fetch($this->appid);
|
if ($dch = opendir($filedir)) {
|
||||||
$path = $appdata['path'];
|
$thandle = fopen($readtxt, 'w+');
|
||||||
$filepath = $this->eagledir .BS . $path . BS . 'images' . BS . $id . '.info';
|
while (($file = readdir($dch)) != false) {
|
||||||
//文件信息文件路径
|
if ($file != '.' && $file != '..') {
|
||||||
$metadatajsonfile = $filepath . BS . 'metadata.json';
|
$filePath = $filedir . '/' . $file;
|
||||||
if (!file_exists($metadatajsonfile)) {
|
if (is_dir($filePath) && is_file($filePath . '/metadata.json')) {
|
||||||
C::t('pichome_resources')->delete_by_rid($rid);
|
$filenum++;
|
||||||
return true;
|
fwrite($thandle, $file . "\n");
|
||||||
}
|
}
|
||||||
|
unset($filePath);
|
||||||
$this->uid = $data['uid'];
|
unset($file);
|
||||||
$this->username = $data['username'];
|
|
||||||
//文件信息json文件
|
|
||||||
$mjsonfile = $this->eagledir . BS . $path . BS . 'mtime.json';
|
|
||||||
$allfiledata = file_get_contents($mjsonfile);
|
|
||||||
//获取文件信息
|
|
||||||
$allfiledata = json_decode($allfiledata, true);
|
|
||||||
|
|
||||||
unset($allfiledata['all']);
|
|
||||||
|
|
||||||
if ($force || $data['dateline'] < $allfiledata[$id]) {//当文件最后更新时间小于eagle时间时,需处理标签,颜色,目录等信息
|
|
||||||
//获取文件信息数据
|
|
||||||
$metadata = file_get_contents($metadatajsonfile);
|
|
||||||
$filemetadata = json_decode($metadata, true);
|
|
||||||
$p = new Encode_Core();
|
|
||||||
$charset = $p->get_encoding($filepath);
|
|
||||||
if(CHARSET != $charset)$filemetadataname= diconv($filemetadata['name'],CHARSET,$charset);
|
|
||||||
//文件名称
|
|
||||||
$filename = $filemetadataname . '.' . $filemetadata['ext'];
|
|
||||||
//缩略图名称
|
|
||||||
$thumbname =$filemetadataname . '_thumbnail.png';
|
|
||||||
//文件路径
|
|
||||||
$file = $filepath . BS . $filename;
|
|
||||||
if (!file_exists($file)) {
|
|
||||||
return ;
|
|
||||||
}
|
}
|
||||||
//如果文件不存在删除
|
|
||||||
if (!file_exists($file)) {
|
|
||||||
C::t('pichome_resources')->delete_by_rid($rid);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
//缩略图路径
|
fclose($thandle);
|
||||||
$thumbfile = $filepath . BS . $thumbname;
|
closedir($dch);
|
||||||
|
if ($filenum) $this->filenum = $filenum;
|
||||||
|
|
||||||
//检查md5是否发生变化
|
|
||||||
$filemd5 = md5_file($file);
|
|
||||||
//如果md5发生变化则删除原数据,重新导入
|
|
||||||
if ($data['md5'] != $filemd5) {
|
|
||||||
C::t('pichome_resources')->delete_by_rid($rid);
|
|
||||||
$filemetadata['filename'] = $filemetadata['name'];
|
|
||||||
$filemetadata['file'] = $file;
|
|
||||||
$filemetadata['thumbfile'] = $thumbfile;
|
|
||||||
$filemetadata['md5'] = $filemd5;
|
|
||||||
$filemetadata['rid'] = $rid;
|
|
||||||
$filemetadata['dateline'] = $allfiledata[$id];
|
|
||||||
$this->exportfile($filemetadata);
|
|
||||||
} else {
|
} else {
|
||||||
//查询原数据中的属性信息
|
C::t('pichome_vapp')->update($this->appid, array('state' => 0));
|
||||||
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
|
return array('error' => 'Read Dir Failer');
|
||||||
//信息表数据记录
|
|
||||||
$setarr = [];
|
|
||||||
//检查标签变化
|
|
||||||
//标签数据
|
|
||||||
$tags = $filemetadata['tags'];
|
|
||||||
//现有标签
|
|
||||||
$tagids = [];
|
|
||||||
//原有标签
|
|
||||||
$oldtids=[];
|
|
||||||
if ($attrdata['tag']) $oldtids = explode(',', $attrdata['tag']);
|
|
||||||
if (!empty($tags)) {
|
|
||||||
$tagids = $this->addtag($tags);
|
|
||||||
$setarr['tag'] = implode(',',$tagids);
|
|
||||||
}
|
}
|
||||||
/* $addtags = array_diff($tagids,$oldtids);
|
C::t('pichome_vapp')->update($this->appid, array('filenum' => $this->filenum, 'state' => 1));
|
||||||
$deltags = array_diff($oldtids,$tagids);
|
|
||||||
|
|
||||||
if(!empty($deltags))C::t('pichome_resourcestag')->delete_by_ridtid($rid,$deltags);
|
|
||||||
foreach($addtags as $tid){
|
|
||||||
$rtag = ['appid' => $this->appid, 'rid' => $rid, 'tid' => $tid];
|
|
||||||
C::t('pichome_resourcestag')->insert($rtag);
|
|
||||||
}*/
|
|
||||||
//检查标注变化
|
|
||||||
if (isset($filemetadata['comments'])) {
|
|
||||||
$cids = [];
|
|
||||||
foreach ($filemetadata['comments'] as $commentval) {
|
|
||||||
$commentval['id'] = $commentval['id'] . $this->appid;
|
|
||||||
$commentval['appid'] = $this->appid;
|
|
||||||
$commentval['rid'] = $rid;
|
|
||||||
$commentval['x'] = number_format($commentval['x'], 2);
|
|
||||||
$commentval['y'] = number_format($commentval['y'], 2);
|
|
||||||
C::t('pichome_comments')->insert($commentval);
|
|
||||||
$cids[] = $commentval['id'];
|
|
||||||
}
|
}
|
||||||
$ocids = C::t('pichome_comments')->fetch_id_by_rid($rid);
|
C::t('pichome_vapp')->update($this->appid, array('state' => 1));
|
||||||
$delcids = array_diff($ocids, $cids);
|
return array('success' => true);
|
||||||
if (!empty($delcids)) C::t('pichome_comments')->delete($delcids);
|
|
||||||
} else {
|
|
||||||
C::t('pichome_comments')->delete_by_rid($rid);
|
|
||||||
}
|
|
||||||
|
|
||||||
$thumb = file_exists($thumbfile) ? 1 : 0;
|
|
||||||
//检查reources数据变化
|
|
||||||
$resourcesarr = [
|
|
||||||
'name' => $filename,
|
|
||||||
'dateline' => $allfiledata[$id],
|
|
||||||
'isdelete' => $filemetadata['isDeleted'],
|
|
||||||
'hasthumb' => $thumb,
|
|
||||||
'grade' => $filemetadata['star'] ? intval($filemetadata['star']) : 0
|
|
||||||
];
|
|
||||||
|
|
||||||
//文件路径
|
|
||||||
$file = str_replace(BS,'/',$file);
|
|
||||||
$attachment = str_replace($this->eagledir.'/', '', $file);
|
|
||||||
$path = str_replace(BS, '/', $attachment);
|
|
||||||
$setarr['path'] = $path;
|
|
||||||
$resourcesarr['hasthumb'] = $thumb;
|
|
||||||
$resourcesarr['rid'] = $rid;
|
|
||||||
C::t('pichome_resources')->insert($resourcesarr);
|
|
||||||
$rfids = [];
|
|
||||||
//检查目录变化
|
|
||||||
foreach ($filemetadata['folders'] as $fv) {
|
|
||||||
$fid = $fv . $this->appid;
|
|
||||||
if (!C::t('pichome_folder')->check_password_byfid($fid)) {
|
|
||||||
$frsetarr = ['appid' => $this->appid, 'rid' => $rid, 'fid' => $fid];
|
|
||||||
$rfids[] = C::t('pichome_folderresources')->insert($frsetarr);
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$orfids = C::t('pichome_folderresources')->fetch_id_by_rid($rid);
|
|
||||||
$delrfids = array_diff($orfids, $rfids);
|
|
||||||
C::t('pichome_folderresources')->delete($delrfids);
|
|
||||||
//尝试更新属性表数据
|
|
||||||
$setarr['link'] = $filemetadata['url'] ? trim($filemetadata['url']) : '';
|
|
||||||
//描述数据
|
|
||||||
$setarr['desc'] = $filemetadata['annotation'] ? htmlspecialchars($filemetadata['annotation']) : '';
|
|
||||||
if ($filemetadata['duration']) $setarr['duration'] = number_format($filemetadata['duration'], 2);
|
|
||||||
$setarr['rid'] = $rid;
|
|
||||||
C::t('pichome_resources_attr')->insert($setarr);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function execExport($force = false)
|
public function execExport($force = false)
|
||||||
{
|
{
|
||||||
if($this->exportstatus > 0 && $this->exportstatus<3 ) return ;
|
$filedir = $this->eagledir . '/' . $this->path . '/images';
|
||||||
C::t('pichome_vapp')->update($this->appid,array('state'=>1,'donum'=>0,'percent'=>0));
|
$readtxt = $this->readtxt . 'eagleexport' . md5($this->path) . '.txt';
|
||||||
$filedir = $this->eagledir . '/' . $this->path.'/images';
|
runlog('aaa', $readtxt);
|
||||||
if ($dch = opendir($filedir)) {
|
if ($this->lastid) {
|
||||||
while (($file = readdir($dch)) != false) {
|
$start = $this->lastid * 19;
|
||||||
if ($file != '.' && $file != '..') {
|
} else $start = 0;
|
||||||
|
|
||||||
|
if ($this->lastid < $this->filenum && $this->exportstatus == 1) {
|
||||||
|
$tfile = fopen($readtxt, 'r');
|
||||||
|
$i = 1;
|
||||||
|
fseek($tfile, $start);
|
||||||
|
while (!feof($tfile)) {
|
||||||
|
if ($i > $this->onceexportnum) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$file = trim(fgets($tfile));
|
||||||
$filePath = $filedir . '/' . $file;
|
$filePath = $filedir . '/' . $file;
|
||||||
if (is_dir($filePath) && file_exists($filePath.'/metadata.json')) {
|
if (is_dir($filePath) && is_file($filePath . '/metadata.json')) {
|
||||||
$this->filenum++;
|
$id = str_replace('.info', '', $file);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($dch);
|
|
||||||
}else{
|
|
||||||
C::t('pichome_vapp')->update($this->appid,array('state'=>0));
|
|
||||||
return array('error' => 'Read Dir Failer');
|
|
||||||
}
|
|
||||||
if ($dh = opendir($filedir)) {
|
|
||||||
while (($file = readdir($dh)) != false) {
|
|
||||||
if ($file != '.' && $file != '..') {
|
|
||||||
$filePath = $filedir . '/' . $file;
|
|
||||||
if (is_dir($filePath) && file_exists($filePath.'/metadata.json')) {
|
|
||||||
$id = str_replace('.info','',$file);
|
|
||||||
//组合文件id
|
//组合文件id
|
||||||
$rid = $id . $this->appid;
|
$rid = $id . $this->appid;
|
||||||
//文件路径
|
//文件路径
|
||||||
$tmppath =$filePath;
|
$tmppath = $filePath;
|
||||||
|
unset($filePath);
|
||||||
//文件信息文件路径
|
//文件信息文件路径
|
||||||
$metadatajsonfile = $tmppath . BS . 'metadata.json';
|
$metadatajsonfile = $tmppath . BS . 'metadata.json';
|
||||||
|
|
||||||
$data = C::t('pichome_resources')->fetch($rid);
|
$data = C::t('pichome_resources')->fetch($rid);
|
||||||
//获取json文件最后修改时间
|
//获取json文件最后修改时间
|
||||||
$lastdate = filemtime($metadatajsonfile);
|
$lastdate = filemtime($metadatajsonfile);
|
||||||
|
$metadata = file_get_contents($metadatajsonfile);
|
||||||
|
$filemetadata = json_decode($metadata, true);
|
||||||
//查询文件表是否有对应记录
|
//查询文件表是否有对应记录
|
||||||
if ($data ) {
|
if ($data) {
|
||||||
|
|
||||||
//json文件不存在时删除文件,此情形基本不会出现(文件更新时,mtime会对应发生变化)
|
//json文件不存在时删除文件,此情形基本不会出现(文件更新时,mtime会对应发生变化)
|
||||||
if (!file_exists($metadatajsonfile)) {
|
if (!is_file($metadatajsonfile)) {
|
||||||
//删除文件
|
//删除文件
|
||||||
C::t('pichome_resources')->delete_by_rid($rid);
|
C::t('pichome_resources')->delete_by_rid($rid);
|
||||||
continue;
|
continue;
|
||||||
}
|
} elseif ($force || ($data['lastdate'] < $lastdate)) {//当文件最后更新时间小于eagle时间时,需处理标签,颜色,目录等信息
|
||||||
elseif ($force || ($data['lastdate']< $lastdate)) {//当文件最后更新时间小于eagle时间时,需处理标签,颜色,目录等信息
|
|
||||||
//获取文件信息数据
|
|
||||||
$metadata = file_get_contents($metadatajsonfile);
|
|
||||||
$filemetadata = json_decode($metadata, true);
|
|
||||||
$p = new Encode_Core();
|
$p = new Encode_Core();
|
||||||
$charset = $p->get_encoding($tmppath);
|
$charset = $p->get_encoding($tmppath);
|
||||||
if(CHARSET != $charset)$filemetadataname= diconv($filemetadata['name'],CHARSET,$charset);
|
if (CHARSET != $charset) $filemetadataname = diconv($filemetadata['name'], CHARSET, $charset);
|
||||||
//文件名称
|
//文件名称
|
||||||
$filename = $filemetadataname . '.' . $filemetadata['ext'];
|
$filename = $filemetadataname . '.' . $filemetadata['ext'];
|
||||||
//缩略图名称
|
//缩略图名称
|
||||||
@@ -247,21 +127,21 @@
|
|||||||
$file = $tmppath . BS . $filename;
|
$file = $tmppath . BS . $filename;
|
||||||
//缩略图路径
|
//缩略图路径
|
||||||
$thumbfile = $tmppath . BS . $thumbname;
|
$thumbfile = $tmppath . BS . $thumbname;
|
||||||
//检查md5是否发生变化
|
|
||||||
$filemd5 = md5_file($file);
|
//如果mtime发生变化则删除原数据,重新导入
|
||||||
//如果md5发生变化则删除原数据,重新导入
|
if ($data['mtime'] < $filemetadata['mtime']) {
|
||||||
if ($data['md5'] != $filemd5) {
|
|
||||||
C::t('pichome_resources')->delete_by_rid($rid);
|
C::t('pichome_resources')->delete_by_rid($rid);
|
||||||
$filemetadata['filename'] = $filemetadata['name'];
|
$filemetadata['filename'] = $filemetadata['name'];
|
||||||
$filemetadata['file'] = $file;
|
$filemetadata['file'] = $file;
|
||||||
$filemetadata['thumbfile'] = $thumbfile;
|
$filemetadata['thumbfile'] = $thumbfile;
|
||||||
$filemetadata['md5'] = $filemd5;
|
|
||||||
$filemetadata['rid'] = $rid;
|
$filemetadata['rid'] = $rid;
|
||||||
$filemetadata['dateline'] = $filemetadata['mtime'];
|
$filemetadata['mtime'] = $filemetadata['mtime'] ? $filemetadata['mtime'] : $filemetadata['modificationTime'];
|
||||||
|
$filemetadata['btime'] = $filemetadata['btime'] ? $filemetadata['btime'] : $filemetadata['modificationTime'];
|
||||||
|
$filemetadata['dateline'] = $filemetadata['lastModified'];
|
||||||
$filemetadata['lastdate'] = $lastdate;
|
$filemetadata['lastdate'] = $lastdate;
|
||||||
$this->exportfile($filemetadata);
|
$this->exportfile($filemetadata);
|
||||||
}
|
unset($filemetadata);
|
||||||
else {
|
} else {
|
||||||
//查询原数据中的属性信息
|
//查询原数据中的属性信息
|
||||||
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
|
$attrdata = C::t('pichome_resources_attr')->fetch($rid);
|
||||||
//信息表数据记录
|
//信息表数据记录
|
||||||
@@ -272,18 +152,18 @@
|
|||||||
//现有标签
|
//现有标签
|
||||||
$tagids = [];
|
$tagids = [];
|
||||||
//原有标签
|
//原有标签
|
||||||
$oldtids=[];
|
$oldtids = [];
|
||||||
if ($attrdata['tag']) $oldtids = explode(',', $attrdata['tag']);
|
if ($attrdata['tag']) $oldtids = explode(',', $attrdata['tag']);
|
||||||
|
|
||||||
if (!empty($tags)) {
|
if (!empty($tags)) {
|
||||||
$tagids = $this->addtag($tags);
|
$tagids = $this->addtag($tags);
|
||||||
$setarr['tag'] = implode(',',$tagids);
|
$setarr['tag'] = implode(',', $tagids);
|
||||||
}
|
}
|
||||||
$addtags = array_diff($tagids,$oldtids);
|
$addtags = array_diff($tagids, $oldtids);
|
||||||
$deltags = array_diff($oldtids,$tagids);
|
$deltags = array_diff($oldtids, $tagids);
|
||||||
|
|
||||||
if(!empty($deltags))C::t('pichome_resourcestag')->delete_by_ridtid($rid,$deltags);
|
if (!empty($deltags)) C::t('pichome_resourcestag')->delete_by_ridtid($rid, $deltags);
|
||||||
foreach($addtags as $tid){
|
foreach ($addtags as $tid) {
|
||||||
$rtag = ['appid' => $this->appid, 'rid' => $rid, 'tid' => $tid];
|
$rtag = ['appid' => $this->appid, 'rid' => $rid, 'tid' => $tid];
|
||||||
C::t('pichome_resourcestag')->insert($rtag);
|
C::t('pichome_resourcestag')->insert($rtag);
|
||||||
}
|
}
|
||||||
@@ -297,12 +177,14 @@
|
|||||||
$tcommentval['rid'] = $rid;
|
$tcommentval['rid'] = $rid;
|
||||||
$tcommentval['x'] = number_format($commentval['x'], 2);
|
$tcommentval['x'] = number_format($commentval['x'], 2);
|
||||||
$tcommentval['y'] = number_format($commentval['y'], 2);
|
$tcommentval['y'] = number_format($commentval['y'], 2);
|
||||||
try{
|
try {
|
||||||
C::t('pichome_comments')->insert($tcommentval);
|
C::t('pichome_comments')->insert($tcommentval);
|
||||||
}catch (Exception $e){
|
} catch (Exception $e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
$cids[] = $tcommentval['id'];
|
$cids[] = $tcommentval['id'];
|
||||||
|
unset($tcommentval);
|
||||||
|
|
||||||
}
|
}
|
||||||
$ocids = C::t('pichome_comments')->fetch_id_by_rid($rid);
|
$ocids = C::t('pichome_comments')->fetch_id_by_rid($rid);
|
||||||
$delcids = array_diff($ocids, $cids);
|
$delcids = array_diff($ocids, $cids);
|
||||||
@@ -318,36 +200,30 @@
|
|||||||
'dateline' => $filemetadata['lastModified'],
|
'dateline' => $filemetadata['lastModified'],
|
||||||
'isdelete' => $filemetadata['isDeleted'],
|
'isdelete' => $filemetadata['isDeleted'],
|
||||||
'grade' => $filemetadata['star'] ? intval($filemetadata['star']) : 0,
|
'grade' => $filemetadata['star'] ? intval($filemetadata['star']) : 0,
|
||||||
'lastdate'=>$lastdate
|
'lastdate' => $lastdate
|
||||||
];
|
];
|
||||||
$file = str_replace(BS,'/',$file);
|
$file = str_replace(BS, '/', $file);
|
||||||
$attachment = str_replace($this->eagledir .'/', '', $file);
|
$attachment = str_replace($this->eagledir . '/', '', $file);
|
||||||
$path = str_replace(BS, '/', $attachment);
|
$path = str_replace(BS, '/', $attachment);
|
||||||
if (!file_exists($thumbfile)) {
|
$thumb = (is_file($thumbfile)) ? 1 : 0;
|
||||||
$thumb = (file_exists($filemetadata['thumbfile'])) ? 1 : 0;
|
|
||||||
} else {
|
|
||||||
$thumb = 1;
|
|
||||||
}
|
|
||||||
$setarr['path'] = $path;
|
$setarr['path'] = $path;
|
||||||
$resourcesarr['hasthumb'] = $thumb;
|
$resourcesarr['hasthumb'] = $thumb;
|
||||||
$resourcesarr['rid'] = $rid;
|
$resourcesarr['rid'] = $rid;
|
||||||
C::t('pichome_resources')->insert($resourcesarr);
|
C::t('pichome_resources')->insert($resourcesarr);
|
||||||
$rfids = [];
|
$rfids = [];
|
||||||
|
$orfids = C::t('pichome_folderresources')->fetch_id_by_rid($rid);
|
||||||
|
C::t('pichome_folderresources')->delete($orfids);
|
||||||
//检查目录变化
|
//检查目录变化
|
||||||
foreach ($filemetadata['folders'] as $fv) {
|
foreach ($filemetadata['folders'] as $fv) {
|
||||||
$fid = $fv . $this->appid;
|
$fid = trim($fv) . $this->appid;
|
||||||
if (!C::t('pichome_folder')->check_password_byfid($fid)) {
|
if (!C::t('pichome_folder')->check_password_byfid($fid)) {
|
||||||
$frsetarr = ['appid' => $this->appid, 'rid' => $rid, 'fid' => $fid];
|
$frsetarr = ['appid' => $this->appid, 'rid' => $rid, 'fid' => $fid];
|
||||||
|
C::t('pichome_folderresources')->insert($frsetarr);
|
||||||
$rfids[] = C::t('pichome_folderresources')->insert($frsetarr);
|
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$orfids = C::t('pichome_folderresources')->fetch_id_by_rid($rid);
|
|
||||||
$delrfids = array_diff($orfids, $rfids);
|
|
||||||
C::t('pichome_folderresources')->delete($delrfids);
|
|
||||||
//尝试更新属性表数据
|
//尝试更新属性表数据
|
||||||
$setarr['link'] = $filemetadata['url'] ? trim($filemetadata['url']) : '';
|
$setarr['link'] = $filemetadata['url'] ? trim($filemetadata['url']) : '';
|
||||||
//描述数据
|
//描述数据
|
||||||
@@ -355,121 +231,138 @@
|
|||||||
if ($filemetadata['duration']) $setarr['duration'] = number_format($filemetadata['duration'], 2);
|
if ($filemetadata['duration']) $setarr['duration'] = number_format($filemetadata['duration'], 2);
|
||||||
$setarr['rid'] = $rid;
|
$setarr['rid'] = $rid;
|
||||||
C::t('pichome_resources_attr')->insert($setarr);
|
C::t('pichome_resources_attr')->insert($setarr);
|
||||||
|
unset($filemetadata);
|
||||||
|
unset($setarr);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else{
|
unset($data);
|
||||||
$this->donum += 1;
|
$this->donum += 1;
|
||||||
$percent = round(($this->donum/$this->filenum)*100);
|
$percent = round(($this->donum / $this->filenum) * 100);
|
||||||
//防止因获取文件总个数不准确百分比溢出
|
$state = ($percent >= 100) ? 2 : 1;
|
||||||
$percent = ($percent > 100) ? 100:$percent;
|
if ($state == 2) {
|
||||||
|
fclose($tfile);
|
||||||
|
@unlink($this->readtxt . 'eagleexport' . md5($this->path) . '.txt');
|
||||||
|
$lastid = 0;
|
||||||
|
} else {
|
||||||
|
$lastid = $this->donum;
|
||||||
|
}
|
||||||
//记录导入起始位置,以备中断后从此处,更改导入状态为正在导入
|
//记录导入起始位置,以备中断后从此处,更改导入状态为正在导入
|
||||||
C::t('pichome_vapp')->update($this->appid,array('lastid'=>$id,'percent'=>$percent,'donum'=>$this->donum,'state'=>1));
|
C::t('pichome_vapp')->update($this->appid, array('lastid' => $lastid, 'percent' => $percent, 'donum' => $this->donum, 'state' => $state));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
} else {//如果没有记录,则为新导入文件
|
||||||
else {//如果没有记录,则为新导入文件
|
if (!is_file($metadatajsonfile)) {
|
||||||
if (!file_exists($metadatajsonfile)) {
|
|
||||||
$this->filenum -= 1;
|
$this->filenum -= 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//获取文件信息数据
|
|
||||||
$metadata = file_get_contents($metadatajsonfile);
|
|
||||||
$filemetadata = json_decode($metadata, true);
|
|
||||||
//文件目录信息
|
|
||||||
$filefolders = $filemetadata['folders'];
|
|
||||||
//如果目录含有密码则不导入数据直接跳过
|
|
||||||
$haspassword = C::t('pichome_folder')->check_haspasswrod($filefolders, $this->appid);
|
|
||||||
|
|
||||||
|
//如果目录含有密码则不导入数据直接跳过
|
||||||
|
$haspassword = C::t('pichome_folder')->check_haspasswrod($filemetadata['folders'], $this->appid);
|
||||||
|
//echo '判断目录密码后缓存:'.memory_get_usage()/1024 . '<br>';
|
||||||
if ($haspassword) continue;
|
if ($haspassword) continue;
|
||||||
$p = new Encode_Core();
|
$p = new Encode_Core();
|
||||||
$charset = $p->get_encoding($tmppath);
|
$charset = $p->get_encoding($tmppath);
|
||||||
if(CHARSET != $charset)$filemetadataname= diconv($filemetadata['name'],CHARSET,$charset);
|
if (CHARSET != $charset) $filemetadataname = diconv($filemetadata['name'], CHARSET, $charset);
|
||||||
$filename =$filemetadataname . '.' . $filemetadata['ext'];
|
|
||||||
$thumbname = $filemetadataname . '_thumbnail.png';
|
|
||||||
|
|
||||||
|
$filename = $filemetadataname . '.' . $filemetadata['ext'];
|
||||||
|
$thumbname = $filemetadataname . '_thumbnail.png';
|
||||||
|
//echo $i.'middle:'.memory_get_usage()/1024 . '<br>';
|
||||||
$file = $tmppath . BS . $filename;
|
$file = $tmppath . BS . $filename;
|
||||||
$thumbfile = $tmppath . BS . $thumbname;
|
$thumbfile = $tmppath . BS . $thumbname;
|
||||||
$filemd5 = md5_file($file);
|
//$filemd5 = md5_file($file);
|
||||||
$filemetadata['filename'] = $filemetadata['name'];
|
$filemetadata['filename'] = $filemetadata['name'];
|
||||||
$filemetadata['file'] = $file;
|
$filemetadata['file'] = $file;
|
||||||
|
unset($file);
|
||||||
$filemetadata['thumbfile'] = $thumbfile;
|
$filemetadata['thumbfile'] = $thumbfile;
|
||||||
$filemetadata['md5'] = $filemd5;
|
unset($thumbfile);
|
||||||
|
// $filemetadata['md5'] = $filemd5;
|
||||||
$filemetadata['rid'] = $rid;
|
$filemetadata['rid'] = $rid;
|
||||||
$filemetadata['mtime'] = $filemetadata['mtime'] ? $filemetadata['mtime']:$filemetadata['modificationTime'];
|
$filemetadata['mtime'] = $filemetadata['mtime'] ? $filemetadata['mtime'] : $filemetadata['modificationTime'];
|
||||||
$filemetadata['btime'] = $filemetadata['btime'] ? $filemetadata['btime']:$filemetadata['modificationTime'];
|
$filemetadata['btime'] = $filemetadata['btime'] ? $filemetadata['btime'] : $filemetadata['modificationTime'];
|
||||||
$filemetadata['dateline'] = $filemetadata['lastModified'];
|
$filemetadata['dateline'] = $filemetadata['lastModified'];
|
||||||
$filemetadata['lastdate'] = $lastdate;
|
$filemetadata['lastdate'] = $lastdate;
|
||||||
$this->exportfile($filemetadata);
|
$this->exportfile($filemetadata);
|
||||||
|
unset($filemetadata);
|
||||||
|
|
||||||
}
|
}
|
||||||
$this->donum += 1;
|
$this->donum += 1;
|
||||||
$percent = round(($this->donum/$this->filenum)*100);
|
$percent = round(($this->donum / $this->filenum) * 100);
|
||||||
//防止因获取文件总个数不准确百分比溢出
|
//防止因获取文件总个数不准确百分比溢出
|
||||||
$percent = ($percent > 100) ? 100:$percent;
|
$state = ($percent >= 100) ? 2 : 1;
|
||||||
|
if ($state == 2) {
|
||||||
|
fclose($tfile);
|
||||||
|
@unlink($this->readtxt . 'eagleexport' . md5($this->path) . '.txt');
|
||||||
|
$lastid = 0;
|
||||||
|
} else {
|
||||||
|
$lastid = $this->donum;
|
||||||
|
}
|
||||||
//记录导入起始位置,以备中断后从此处,更改导入状态为正在导入
|
//记录导入起始位置,以备中断后从此处,更改导入状态为正在导入
|
||||||
C::t('pichome_vapp')->update($this->appid,array('lastid'=>$id,'percent'=>$percent,'donum'=>$this->donum,'state'=>1));
|
C::t('pichome_vapp')->update($this->appid, array('lastid' => $lastid, 'percent' => $percent, 'donum' => $this->donum, 'state' => $state));
|
||||||
}
|
}
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
closedir($dh);
|
|
||||||
}else{
|
|
||||||
C::t('pichome_vapp')->update($this->appid,array('state'=>0));
|
|
||||||
return array('error' => 'Read Dir Failer');
|
|
||||||
}
|
|
||||||
//更改状态为校验
|
|
||||||
C::t('pichome_vapp')->update($this->appid,array('lastid'=>'','percent'=>100,'filenum'=>$this->filenum,'donum'=>0,'state'=>2));
|
|
||||||
$total = DB::result_first("select count(rid) from %t where appid = %s ",array('pichome_resources',$this->appid));
|
|
||||||
//校验文件
|
|
||||||
$this->check_file($total);
|
|
||||||
return array('success' => true);
|
return array('success' => true);
|
||||||
|
|
||||||
}
|
}
|
||||||
public function check_file($total){
|
|
||||||
|
|
||||||
$limitsql = ($this->checkpage -1)*$this->checklimit.','.$this->checklimit;
|
//校验文件
|
||||||
$delrids = [];
|
public function execCheckFile()
|
||||||
$data = DB::fetch_all("select rid from %t where appid = %s order by lastdate asc limit $limitsql ",array('pichome_resources',$this->appid));
|
{
|
||||||
if(empty($data)) {
|
if ($this->exportstatus == 2) {
|
||||||
C::t('pichome_vapp')->update($this->appid,array('percent'=>100,'state'=>3));
|
$total = DB::result_first("select count(rid) from %t where appid = %s ", array('pichome_resources', $this->appid));
|
||||||
return true;
|
//校验文件
|
||||||
}
|
|
||||||
foreach ( $data as $v){
|
|
||||||
$id = str_replace($this->appid,'',$v['rid']);
|
|
||||||
$filejson = $this->eagledir . '/' . $this->path.'/images/'.$id.'.info/metadata.json';
|
|
||||||
if(!file_exists($filejson)){
|
|
||||||
$delrids[] = $v['rid'];
|
|
||||||
}
|
|
||||||
$this->checknum += 1;
|
|
||||||
$percent = round(( $this->checknum/$total)*100);
|
|
||||||
//记录导入起始位置,以备中断后从此处,更改导入状态为正在导入
|
|
||||||
C::t('pichome_vapp')->update($this->appid,array('percent'=>$percent,'state'=>2));
|
|
||||||
}
|
|
||||||
if(!empty($delrids)){
|
|
||||||
//如果有需要删除的,删除后,则重新查询上一页数据
|
|
||||||
C::t('pichome_resources')->delete_by_rid($delrids);
|
|
||||||
$ctotal = DB::result_first("select count(rid) from %t where appid = %s ",array('pichome_resources',$this->appid));
|
|
||||||
if($ctotal)$this->check_file($total);
|
|
||||||
}else{
|
|
||||||
$this->checkpage += 1;
|
|
||||||
$this->check_file($total);
|
$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 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));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($data as $v) {
|
||||||
|
$id = str_replace($this->appid, '', $v['rid']);
|
||||||
|
$filejson = $this->eagledir . '/' . $this->path . '/images/' . $id . '.info/metadata.json';
|
||||||
|
if (!is_file($filejson)) {
|
||||||
|
$delrids[] = $v['rid'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
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));
|
||||||
|
} 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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function exportfile($filemetadata)
|
public function exportfile($filemetadata)
|
||||||
{
|
{
|
||||||
$rid = $filemetadata['rid'];
|
$rid = $filemetadata['rid'];
|
||||||
if (!file_exists($filemetadata['file'])) {
|
if (!is_file($filemetadata['file'])) {
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$filemetadata['file'] = str_replace(BS,'/',$filemetadata['file']);
|
$filemetadata['file'] = str_replace(BS, '/', $filemetadata['file']);
|
||||||
$attachment = str_replace(BS, '/', $filemetadata['file']);
|
$attachment = str_replace(BS, '/', $filemetadata['file']);
|
||||||
$path = str_replace($this->eagledir.'/', '', $attachment);
|
$path = str_replace($this->eagledir . '/', '', $attachment);
|
||||||
if (!file_exists($filemetadata['thumbfile'])) {
|
unset($attachment);
|
||||||
$thumb = (file_exists($filemetadata['thumbfile'])) ? 1 : 0;
|
$thumb = (is_file($filemetadata['thumbfile'])) ? 1 : 0;
|
||||||
} else {
|
//echo 'middle1:'.memory_get_usage()/1024 . '<br>';
|
||||||
$thumb = 1;
|
$type = getTypeByExt($filemetadata['ext']);
|
||||||
}
|
|
||||||
$ext = $filemetadata['ext'];
|
|
||||||
$type = getTypeByExt($ext);
|
|
||||||
$resourcesarr = [
|
$resourcesarr = [
|
||||||
'rid' => $rid,
|
'rid' => $rid,
|
||||||
'uid' => $this->uid,
|
'uid' => $this->uid,
|
||||||
@@ -477,18 +370,19 @@
|
|||||||
'appid' => $this->appid,
|
'appid' => $this->appid,
|
||||||
'width' => $filemetadata['width'] ? $filemetadata['width'] : 0,
|
'width' => $filemetadata['width'] ? $filemetadata['width'] : 0,
|
||||||
'height' => $filemetadata['height'] ? $filemetadata['height'] : 0,
|
'height' => $filemetadata['height'] ? $filemetadata['height'] : 0,
|
||||||
'name' => $filemetadata['filename'].'.'.$filemetadata['ext'],
|
'name' => $filemetadata['filename'] . '.' . $filemetadata['ext'],
|
||||||
'ext' => $filemetadata['ext'],
|
'ext' => $filemetadata['ext'],
|
||||||
'size' => $filemetadata['size'],
|
'size' => $filemetadata['size'],
|
||||||
'dateline' => $filemetadata['dateline'],
|
'dateline' => $filemetadata['dateline'],
|
||||||
'btime' => $filemetadata['btime'],
|
'btime' => $filemetadata['btime'],
|
||||||
'mtime' => $filemetadata['mtime'],
|
'mtime' => $filemetadata['mtime'],
|
||||||
'isdelete' => $filemetadata['isDeleted'],
|
'isdelete' => $filemetadata['isDeleted'],
|
||||||
'md5' => $filemetadata['md5'],
|
|
||||||
'hasthumb' => $thumb,
|
'hasthumb' => $thumb,
|
||||||
'grade' => $filemetadata['star'] ? intval($filemetadata['star']) : 0,
|
'grade' => $filemetadata['star'] ? intval($filemetadata['star']) : 0,
|
||||||
'type' => $type
|
'type' => $type,
|
||||||
|
'lastdate' => $filemetadata['lastdate']
|
||||||
];
|
];
|
||||||
|
unset($type);
|
||||||
//插入文件表数据
|
//插入文件表数据
|
||||||
if (C::t('pichome_resources')->insert($resourcesarr)) {
|
if (C::t('pichome_resources')->insert($resourcesarr)) {
|
||||||
//插入目录关联表数据
|
//插入目录关联表数据
|
||||||
@@ -497,6 +391,7 @@
|
|||||||
if (!C::t('pichome_folder')->check_password_byfid($fid)) {
|
if (!C::t('pichome_folder')->check_password_byfid($fid)) {
|
||||||
$frsetarr = ['appid' => $this->appid, 'rid' => $rid, 'fid' => $fid];
|
$frsetarr = ['appid' => $this->appid, 'rid' => $rid, 'fid' => $fid];
|
||||||
C::t('pichome_folderresources')->insert($frsetarr);
|
C::t('pichome_folderresources')->insert($frsetarr);
|
||||||
|
unset($frsetarr);
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -507,12 +402,13 @@
|
|||||||
$tags = $filemetadata['tags'];
|
$tags = $filemetadata['tags'];
|
||||||
if (!empty($tags)) {
|
if (!empty($tags)) {
|
||||||
$tagids = $this->addtag($tags);
|
$tagids = $this->addtag($tags);
|
||||||
//$setarr['tag'] = implode(',', $tagids);
|
unset($tags);
|
||||||
foreach ($tagids as $tid) {
|
foreach ($tagids as $tid) {
|
||||||
$rtag = ['appid' => $this->appid, 'rid' => $rid, 'tid' => $tid];
|
$rtag = ['appid' => $this->appid, 'rid' => $rid, 'tid' => $tid];
|
||||||
C::t('pichome_resourcestag')->insert($rtag);
|
C::t('pichome_resourcestag')->insert($rtag);
|
||||||
}
|
}
|
||||||
$setarr['tag'] = implode(',',$tagids);
|
$setarr['tag'] = implode(',', $tagids);
|
||||||
|
unset($tagids);
|
||||||
}
|
}
|
||||||
//颜色数据
|
//颜色数据
|
||||||
if (isset($filemetadata['palettes'])) {
|
if (isset($filemetadata['palettes'])) {
|
||||||
@@ -520,6 +416,7 @@
|
|||||||
$setarr['colors'] = $returndata['colors'];
|
$setarr['colors'] = $returndata['colors'];
|
||||||
$setarr['gray'] = $returndata['gray'];
|
$setarr['gray'] = $returndata['gray'];
|
||||||
$setarr['shape'] = $returndata['shape'];
|
$setarr['shape'] = $returndata['shape'];
|
||||||
|
unset($returndata);
|
||||||
}
|
}
|
||||||
//标注数据
|
//标注数据
|
||||||
if (isset($filemetadata['comments'])) {
|
if (isset($filemetadata['comments'])) {
|
||||||
@@ -530,6 +427,7 @@
|
|||||||
$tcommentval['x'] = number_format($commentval['x'], 2);
|
$tcommentval['x'] = number_format($commentval['x'], 2);
|
||||||
$t['y'] = number_format($commentval['y'], 2);
|
$t['y'] = number_format($commentval['y'], 2);
|
||||||
C::t('pichome_comments')->insert($tcommentval);
|
C::t('pichome_comments')->insert($tcommentval);
|
||||||
|
unset($tcommentval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//时长
|
//时长
|
||||||
@@ -541,10 +439,12 @@
|
|||||||
$setarr['rid'] = $rid;
|
$setarr['rid'] = $rid;
|
||||||
$setarr['appid'] = $this->appid;
|
$setarr['appid'] = $this->appid;
|
||||||
$setarr['path'] = $path;
|
$setarr['path'] = $path;
|
||||||
|
//echo '属性插入前缓存:'.memory_get_usage()/1024 . '<br>';
|
||||||
//插入数据
|
//插入数据
|
||||||
C::t('pichome_resources_attr')->insert($setarr);
|
C::t('pichome_resources_attr')->insert($setarr);
|
||||||
}else{
|
//echo '属性插入后缓存:'.memory_get_usage()/1024 . '<br>';
|
||||||
runlog('eagleexport',$rid);
|
} else {
|
||||||
|
runlog('eagleexport', $rid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -556,9 +456,11 @@
|
|||||||
foreach ($colors as $color) {
|
foreach ($colors as $color) {
|
||||||
$color = new Color($color);
|
$color = new Color($color);
|
||||||
$rgb = $color->toRGB();
|
$rgb = $color->toRGB();
|
||||||
|
unset($color);
|
||||||
if (abs($rgb[0] - $rgb[1]) < 10 && abs($rgb[2] - $rgb[1]) < 10) {
|
if (abs($rgb[0] - $rgb[1]) < 10 && abs($rgb[2] - $rgb[1]) < 10) {
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
unset($rgb);
|
||||||
}
|
}
|
||||||
if ($i == count($colors)) {
|
if ($i == count($colors)) {
|
||||||
return 1;
|
return 1;
|
||||||
@@ -570,20 +472,28 @@
|
|||||||
//获取颜色数据
|
//获取颜色数据
|
||||||
public function getColor($colors, $width, $height, $rid)
|
public function getColor($colors, $width, $height, $rid)
|
||||||
{
|
{
|
||||||
$intcolorsarr = $returndata = $palattedataarr = [];
|
//echo '颜色处理前:'.memory_get_usage()/1024 . '<br>';
|
||||||
|
$intcolorsarr = $returndata = [];
|
||||||
|
$i = 1;
|
||||||
foreach ($colors as $c) {
|
foreach ($colors as $c) {
|
||||||
$color = new \Color($c['color']);
|
$color = new \Color($c['color']);
|
||||||
//获取颜色整型值
|
//获取颜色整型值
|
||||||
$intcolor = $color->toInt();
|
$intcolor = $color->toInt();
|
||||||
$palattedataarr = ['rid' => $rid, 'color' => $intcolor, 'weight' => $c['ratio'], 'r' => $c['color'][0], 'g' => $c['color'][1], 'b' => $c['color'][2]];
|
$palattedataarr = ['rid' => $rid, 'color' => $intcolor, 'weight' => $c['ratio'], 'r' => $c['color'][0], 'g' => $c['color'][1], 'b' => $c['color'][2]];
|
||||||
$intcolorsarr[] = $intcolor;
|
$intcolorsarr[] = $intcolor;
|
||||||
|
//echo "颜色处理中前 $i :".memory_get_usage()/1024 . '<br>';
|
||||||
C::t('pichome_palette')->insert($palattedataarr);
|
C::t('pichome_palette')->insert($palattedataarr);
|
||||||
|
//echo "颜色处理中后 $i :".memory_get_usage()/1024 . '<br>';
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
unset($colors);
|
||||||
//颜色整型值数据
|
//颜色整型值数据
|
||||||
// $intcolorsarr= array_keys($palattedataarr);
|
// $intcolorsarr= array_keys($palattedataarr);
|
||||||
$returndata['colors'] = implode(',', $intcolorsarr);
|
$returndata['colors'] = implode(',', $intcolorsarr);
|
||||||
$returndata['gray'] = $this->isgray($intcolorsarr);
|
$returndata['gray'] = $this->isgray($intcolorsarr);
|
||||||
$returndata['shape'] = round(($width / $height) * 100);
|
$returndata['shape'] = round(($width / $height) * 100);
|
||||||
|
unset($intcolorsarr);
|
||||||
|
//echo '颜色处理后缓存:'.memory_get_usage()/1024 . '<br>';
|
||||||
return $returndata;
|
return $returndata;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -599,6 +509,7 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unset($tags);
|
||||||
return $tagids;
|
return $tagids;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
269
dzz/pichome/css/mobile/common.css
Normal file
269
dzz/pichome/css/mobile/common.css
Normal file
@@ -0,0 +1,269 @@
|
|||||||
|
:root{
|
||||||
|
--font-14:0.875rem;
|
||||||
|
--font-14:1rem;
|
||||||
|
--font-32:2rem;
|
||||||
|
}
|
||||||
|
*{
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
html{
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
html{
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
html,body,#dzzoffice{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
input::-webkit-input-placeholder { /* WebKit, Blink, Edge */
|
||||||
|
color : var(--tip-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
|
||||||
|
color : var(--tip-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
input::-moz-placeholder { /* Mozilla Firefox 19+ */
|
||||||
|
color : var(--tip-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
input:-ms-input-placeholder { /* Internet Explorer 10-11 */
|
||||||
|
color : var(--tip-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
input::-ms-input-placeholder { /* Microsoft Edge */
|
||||||
|
color : var(--tip-color);
|
||||||
|
}
|
||||||
|
.van-nav-bar__content{
|
||||||
|
/* 46px */
|
||||||
|
height: 46px;
|
||||||
|
}
|
||||||
|
.van-popup.van-notify.van-notify--warning{
|
||||||
|
background-color: #ff976a;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.van-dialog{
|
||||||
|
background: var(--bg-poper);
|
||||||
|
color: var(--header-active);
|
||||||
|
}
|
||||||
|
.van-dialog .van-dialog__message--has-title{
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.van-dialog .van-button{
|
||||||
|
background: var(--bg-poper);
|
||||||
|
}
|
||||||
|
.van-dialog .van-dialog__cancel{
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.van-dialog .van-dialog__confirm{
|
||||||
|
color: var(--header-active);
|
||||||
|
}
|
||||||
|
.van-dialog .van-hairline--top::after{
|
||||||
|
border-top: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
.van-dialog .van-button.van-hairline--left::after{
|
||||||
|
border-left: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
.custom-load{
|
||||||
|
height: 51px;
|
||||||
|
height: 55px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: auto;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
/* 12px */
|
||||||
|
.van-checkbox__icon .van-icon,
|
||||||
|
.van-radio__icon .van-icon{
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
/* 14px */
|
||||||
|
.van-tree-select,
|
||||||
|
.van-tab,
|
||||||
|
.van-sidebar-item,
|
||||||
|
.van-dropdown-menu__title,
|
||||||
|
.van-cell,
|
||||||
|
.van-nav-bar__left,
|
||||||
|
.van-nav-bar__right{
|
||||||
|
font-size: var(--font-14);
|
||||||
|
}
|
||||||
|
/* 16px */
|
||||||
|
.van-field__left-icon .van-icon,
|
||||||
|
.van-field__right-icon .van-icon{
|
||||||
|
font-size: var(--font-16);
|
||||||
|
}
|
||||||
|
.van-checkbox__icon .van-icon,
|
||||||
|
.van-radio__icon .van-icon{
|
||||||
|
border-color: var(--radio-line);
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-tabs__line,
|
||||||
|
.van-sidebar-item--select::before,
|
||||||
|
.van-checkbox__icon--checked .van-icon,
|
||||||
|
.van-radio__icon--checked .van-icon{
|
||||||
|
background-color: var(--color-primary);
|
||||||
|
border-color:var(--color-primary);
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
.van-button--info{
|
||||||
|
background-color: var(--color-primary);
|
||||||
|
border-color:var(--color-primary);
|
||||||
|
}
|
||||||
|
.hide{
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.load-more{
|
||||||
|
line-height: 35px;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 15px;
|
||||||
|
text-align: center;
|
||||||
|
color: var(--content-text);
|
||||||
|
}
|
||||||
|
.load-more .icon{
|
||||||
|
font-size: 18px;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
ul{
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
.van-field,input,textarea{
|
||||||
|
background-color: var(--bg-input) !important;
|
||||||
|
color: var(--header-text) !important;
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
.van-popup,.van-cell,.van-calendar{
|
||||||
|
background-color: var(--bg-poper);
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.screen-radio-group .van-radio {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-dropdown-item__option--active,.van-dropdown-item__option--active .van-dropdown-item__icon{
|
||||||
|
color: var(--header-active);
|
||||||
|
}
|
||||||
|
.van-dropdown-menu__bar{
|
||||||
|
background-color: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.van-dropdown-menu__title,.van-field__label{
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.van-dropdown-menu__title::after{
|
||||||
|
border-color: transparent transparent var(--header-text) var(--header-text);
|
||||||
|
}
|
||||||
|
.van-cell::after{
|
||||||
|
border-color: var(--border-color-base);
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-search{
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.van-search__content{
|
||||||
|
background-color: var(--bg-input);
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
.van-field__control,
|
||||||
|
.van-radio__label{
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.van-tree-select__nav{
|
||||||
|
border-right: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
.van-tree-select__nav,.van-sidebar-item,.van-sidebar-item:active{
|
||||||
|
background-color: transparent;
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.van-sidebar-item--select{
|
||||||
|
color: var(--header-active);
|
||||||
|
}
|
||||||
|
.van-sidebar-item--select:active,
|
||||||
|
.van-tree-select__content .van-tree-select__item{
|
||||||
|
background-color: var(--bg-poperHover);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.van-popover__content{
|
||||||
|
max-height: 500px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-popover--light .van-popover__arrow {
|
||||||
|
color: var(--bg-poper);
|
||||||
|
}
|
||||||
|
.van-popover--light .van-popover__content{
|
||||||
|
background-color: var(--bg-poper);
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.van-nav-bar {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
[class*=van-hairline]::after {
|
||||||
|
border:0;
|
||||||
|
}
|
||||||
|
.xuanzhun {
|
||||||
|
display: inline-block;
|
||||||
|
-webkit-transition-property: -webkit-transform;
|
||||||
|
-webkit-transition-duration: 1s;
|
||||||
|
-moz-transition-property: -moz-transform;
|
||||||
|
-moz-transition-duration: 1s;
|
||||||
|
-webkit-animation: xuanzhun 3s linear infinite;
|
||||||
|
-moz-animation: xuanzhun 3s linear infinite;
|
||||||
|
-o-animation: xuanzhun 3s linear infinite;
|
||||||
|
animation: xuanzhun 3s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes xuanzhun {
|
||||||
|
from {
|
||||||
|
-webkit-transform: rotate(0deg)
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
-webkit-transform: rotate(360deg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-moz-keyframes xuanzhun {
|
||||||
|
from {
|
||||||
|
-moz-transform: rotate(0deg)
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
-moz-transform: rotate(359deg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-o-keyframes xuanzhun {
|
||||||
|
from {
|
||||||
|
-o-transform: rotate(0deg)
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
-o-transform: rotate(359deg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes xuanzhun {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg)
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: rotate(359deg)
|
||||||
|
}
|
||||||
|
}
|
||||||
288
dzz/pichome/css/mobile/details.css
Normal file
288
dzz/pichome/css/mobile/details.css
Normal file
@@ -0,0 +1,288 @@
|
|||||||
|
[v-cloak] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#dzzoffice {
|
||||||
|
position: relative;
|
||||||
|
background: var(--bg-content);
|
||||||
|
}
|
||||||
|
.detail-popup {
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 46px;
|
||||||
|
padding-bottom: 60px;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
background: var(--bg-content);
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
.detail-popup.full{
|
||||||
|
padding: 0;
|
||||||
|
background: #000000;
|
||||||
|
}
|
||||||
|
.detail-popup.NotFooter{
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
.header-top {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
transition: all .3s;
|
||||||
|
transition: all .3s;
|
||||||
|
-moz-transition: all .3s;
|
||||||
|
-webkit-transition: all .3s;
|
||||||
|
-o-transition: all .3s;
|
||||||
|
background: var(--bg-content);
|
||||||
|
}
|
||||||
|
.detail-popup.full .header-top{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.van-nav-bar .van-nav-bar__title,
|
||||||
|
.van-nav-bar .van-icon {
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-popup .detail-popup-translate{
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content.opacity {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content.prev {
|
||||||
|
right: 100%;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content.next {
|
||||||
|
left: 100%;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content .detail-popup-img {
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content .video-box{
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content .img-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content .image-viewer__img {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 10;
|
||||||
|
transform-origin: 0 0;
|
||||||
|
margin: auto;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
top: 0;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-popup .detail-popup-content .image-viewer__img {
|
||||||
|
-webkit-user-drag: none;
|
||||||
|
-moz-user-drag: none;
|
||||||
|
-ms-user-drag: none;
|
||||||
|
user-drag: none;
|
||||||
|
}
|
||||||
|
.pinch-zoom-container{
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content .image-viewer__img.opacity{
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.detail-popup .detail-popup-content .image-viewer__img.thumbnail{
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
.detail-popup .footer-tabbar{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 60px;
|
||||||
|
line-height: 60px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.75rem;
|
||||||
|
/* border-top: 1px solid var(--border-color-base); */
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
z-index: 10000;
|
||||||
|
background: var(--bg-content);
|
||||||
|
}
|
||||||
|
.detail-popup.full .footer-tabbar{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.detail-popup .footer-tabbar .footer-tabbar-item {
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.detail-popup-message{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--content-textHover);
|
||||||
|
padding-bottom: 60px;
|
||||||
|
}
|
||||||
|
.detail-popup-message.noPadding{
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-popup-message .DetailPopup-content{
|
||||||
|
padding: 0 1rem;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.detail-popup-message .name{
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 16px 0;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block{
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .title{
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 0.625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors{
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
margin-left: -0.1875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors .colors{
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
padding-left: 0.1875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors .colors>div{
|
||||||
|
position: relative;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.detail-popup-message .name{
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .title{
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors .colors>div{
|
||||||
|
height: 1.5625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.tag .tag{
|
||||||
|
font-size: 0.875rem;
|
||||||
|
padding:0 0.5rem;
|
||||||
|
height: 1.875rem;
|
||||||
|
line-height: 1.875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link{
|
||||||
|
font-size: 0.875rem;
|
||||||
|
height: 1.25rem;
|
||||||
|
line-height: 1.25rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link i{
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic{
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.detail-popup-message .name{
|
||||||
|
font-size:1.25rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .title{
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors .colors>div{
|
||||||
|
height: 1.875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.tag .tag{
|
||||||
|
font-size: 1rem;
|
||||||
|
padding:0 0.625rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
line-height:2.5rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link{
|
||||||
|
font-size: 1rem;
|
||||||
|
height: 1.875rem;
|
||||||
|
line-height:1.875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link i{
|
||||||
|
font-size: 1.75rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic{
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.tag{
|
||||||
|
overflow: hidden;
|
||||||
|
margin-left: -0.625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.tag .tag{
|
||||||
|
float: left;
|
||||||
|
min-width: 2.8125rem;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
margin-left: 0.625rem;
|
||||||
|
color: var(--content-text);
|
||||||
|
margin-bottom: 0.3125rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link{
|
||||||
|
color: var(--content-text);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
position: relative;
|
||||||
|
padding-right: 1.5625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link i{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic{
|
||||||
|
color: var(--content-text);
|
||||||
|
margin-bottom: 0.625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic .record{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic .record .star{
|
||||||
|
color: var(--stars);
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic .record .star.active{
|
||||||
|
color: var(--starsActive);
|
||||||
|
}
|
||||||
938
dzz/pichome/css/mobile/index.css
Normal file
938
dzz/pichome/css/mobile/index.css
Normal file
@@ -0,0 +1,938 @@
|
|||||||
|
[v-cloak] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#dzzoffice{
|
||||||
|
position: relative;
|
||||||
|
background: var(--bg-content);
|
||||||
|
}
|
||||||
|
.van-tree-select__content{
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.custom-image.van-empty{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
top: 0;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.van-popup{
|
||||||
|
overflow: unset;
|
||||||
|
}
|
||||||
|
.van-popup .vam-popup-title{
|
||||||
|
height: 40px;
|
||||||
|
font-weight: 700;
|
||||||
|
position: absolute;
|
||||||
|
top: -40px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 12px;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.conter-toast{
|
||||||
|
z-index: 5001 !important;
|
||||||
|
}
|
||||||
|
.notScreen{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.notScreen>div{
|
||||||
|
height: 80px;
|
||||||
|
text-align: center;
|
||||||
|
margin: auto;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
font-size: var(--font-14);
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.notScreen>div img{
|
||||||
|
width: 3.125rem;
|
||||||
|
height: 3.125rem;
|
||||||
|
}
|
||||||
|
.screen-textarea{
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
#dzz_avatar_img{
|
||||||
|
width: 2.1875rem;
|
||||||
|
height: 2.1875rem;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
#dzz_avatar_img .Topcarousel{
|
||||||
|
width: 2.1875rem;
|
||||||
|
height: 2.1875rem;
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 2.1875rem;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.library-box{
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.van-nav-bar .library-box .van-icon{
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.header-top{
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
transition: all .3s;
|
||||||
|
transition: all .3s;
|
||||||
|
-moz-transition: all .3s;
|
||||||
|
-webkit-transition: all .3s;
|
||||||
|
-o-transition: all .3s;
|
||||||
|
background: var(--bg-content);
|
||||||
|
}
|
||||||
|
.header-top.headerhide{
|
||||||
|
top: -46px;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.header-top .van-dropdown-menu__bar{
|
||||||
|
height: 46px;
|
||||||
|
}
|
||||||
|
.footer-popup{
|
||||||
|
padding-bottom: 70px;
|
||||||
|
}
|
||||||
|
.footer-popup .btn-bottom{
|
||||||
|
padding: 10px;
|
||||||
|
height: 70px;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.footer-popup .btn-bottom .van-button{
|
||||||
|
width: auto;
|
||||||
|
padding: 15px 20px;
|
||||||
|
}
|
||||||
|
.footer-popup .popup-search-input .van-field__right-icon{
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
.footer-popup .popup-search-input .van-field__right-icon .van-icon{
|
||||||
|
font-size: 1.25rem;
|
||||||
|
color: var(--header-active);
|
||||||
|
}
|
||||||
|
.seasrch-popup{
|
||||||
|
padding-top: 56px;
|
||||||
|
}
|
||||||
|
.footer-popup .van-search-box{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.footer-popup .van-search-box .van-field{
|
||||||
|
border: 0;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.seasrch-popup .search-val-box{
|
||||||
|
padding: 0 12px;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.seasrch-popup .search-val-box .search-host{
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
margin-left: -12px;
|
||||||
|
}
|
||||||
|
.seasrch-popup .search-val-box .search-host-list{
|
||||||
|
height: 5rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
text-align: center;
|
||||||
|
background-position: 50%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
margin-bottom: 0.625rem;
|
||||||
|
position: relative;
|
||||||
|
margin-left: 12px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 1024px) {
|
||||||
|
.seasrch-popup .search-val-box .search-host-list{
|
||||||
|
width: 46.6%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 1024px) {
|
||||||
|
.seasrch-popup .search-val-box .search-host-list{
|
||||||
|
width: 13.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.seasrch-popup .search-val-box .search-host-list .bg{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgb(0, 0, 0, .3);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.seasrch-popup .search-val-box .search-host-list .text{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-weight: 700;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.seasrch-popup .search-val-box .highlight{
|
||||||
|
color: var(--header-active);
|
||||||
|
}
|
||||||
|
.sort-popup .van-popup__close-icon--top-right,
|
||||||
|
.screen-popup .van-popup__close-icon--top-right {
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
}
|
||||||
|
/* .sort-popup .van-tree-select{
|
||||||
|
height: calc(100% - 41px) !important;
|
||||||
|
height: -moz-calc(100% - 41px) !important;
|
||||||
|
height: -webkit-calc(100% - 41px) !important;
|
||||||
|
} */
|
||||||
|
.screen-popup .van-tree-select{
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select .van-sidebar{
|
||||||
|
width: 6rem;
|
||||||
|
-webkit-box-flex: initial;
|
||||||
|
-webkit-flex: initial;
|
||||||
|
flex: initial;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content{
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.van-popup .van-tree-select__content .screen-item-box{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-top: 56px;
|
||||||
|
}
|
||||||
|
.van-popup .van-tree-select__content .screen-item .screen-item-option-box{
|
||||||
|
padding: 0px 8px;
|
||||||
|
}
|
||||||
|
.van-popup .van-tree-select__content .screen-item .screen-item-option-box .screen-item-option{
|
||||||
|
padding: 10px 16px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.van-popup .van-tree-select__content .screen-item .screen-item-option-box .screen-item-option.active{
|
||||||
|
background: var(--bg-poperHover);
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item{
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 0px 10px;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .swip-row{
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
border-radius: 18px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .swip-row .swip{
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: var(--bg-input);
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .swip-row .swip.active{
|
||||||
|
background: var(--color-primary);
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.van-popup .van-tree-select__content .screen-item .van-cell-group .van-cell.van-cell-tag{
|
||||||
|
margin-bottom: 6px;
|
||||||
|
border-radius: 999px;
|
||||||
|
}
|
||||||
|
.van-popup .van-tree-select__content .screen-item .van-cell-group .van-cell.van-cell-tag.active{
|
||||||
|
background-color: var(--bg-poperHover);
|
||||||
|
}
|
||||||
|
.sort-popup .van-tree-select__content .screen-item .van-cell-group,
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .van-cell-group{
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.sort-popup .van-tree-select__content .screen-item .van-cell-group .van-cell,
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .van-cell-group .van-cell{
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-calendar__day--end, .van-calendar__day--multiple-middle, .van-calendar__day--multiple-selected, .van-calendar__day--start, .van-calendar__day--start-end{
|
||||||
|
background-color: var(--color-primary);
|
||||||
|
}
|
||||||
|
.screen-popup .van-hairline--top-bottom::after, .screen-popup .van-hairline-unset--top-bottom::after {
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
.sort-popup .van-hairline--top-bottom::after, .sort-popup .van-hairline-unset--top-bottom::after {
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .quick{
|
||||||
|
overflow: hidden;
|
||||||
|
/* margin-left: -10px; */
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list-box{
|
||||||
|
width: 20%;
|
||||||
|
margin-bottom: 0.1875rem;
|
||||||
|
padding: 0 0.1875rem;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list{
|
||||||
|
/* float: left;
|
||||||
|
height: calc(20% / 2);
|
||||||
|
width: 20%;
|
||||||
|
height: 2.5rem;
|
||||||
|
width: 2.5rem;
|
||||||
|
z-index: 1;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-bottom: 0.625rem;
|
||||||
|
margin-left: 0.625rem;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
position: relative; */
|
||||||
|
height: 0;
|
||||||
|
padding: 25% 0;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
|
||||||
|
position: absolute;
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin: auto;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
|
||||||
|
font-size: 18px;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .quick .quick-list .van-icon{
|
||||||
|
font-size: 30px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .color-input{
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 0.9375rem;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field{
|
||||||
|
/* padding: 0; */
|
||||||
|
/* height: 35px; */
|
||||||
|
padding-left: 35px;
|
||||||
|
/* height: 35px; */
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .color-show{
|
||||||
|
position: absolute;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
z-index: 1;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: auto;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 8px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .color-show.border{
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field .van-field__button{
|
||||||
|
padding-left: 8px;
|
||||||
|
line-height: 35px;
|
||||||
|
padding-right: 8px;
|
||||||
|
border-left: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .color-input .van-field .van-field__button img{
|
||||||
|
vertical-align: sub;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .screen-item .color-box .color-slider{
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 15px 0;
|
||||||
|
}
|
||||||
|
.screen-popup .van-calendar__popup .van-button--danger{
|
||||||
|
background-color: var(--color-primary);
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
}
|
||||||
|
.screen-popup .van-calendar__popup .van-calendar__month-mark{
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-popup .van-tree-select__content .van-tabs{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .van-tabs--line .van-tabs__wrap{
|
||||||
|
/* border-bottom: 1px solid var(--slider-line); */
|
||||||
|
padding-right: 8px;
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .van-tabs .van-tabs__content{
|
||||||
|
height: calc(100% - 44px);
|
||||||
|
height: -moz-calc(100% - 44px);
|
||||||
|
height: -webkit-calc(100% - 44px);
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .van-tabs .van-tabs__content .van-tab__pane{
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-popup .van-tree-select__content .van-tabs__nav{
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .van-tabs__nav .van-tab{
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .van-tabs__nav .van-tab.van-tab--active{
|
||||||
|
color: var(--header-active);
|
||||||
|
}
|
||||||
|
.screen-popup .van-tree-select__content .van-cell .num{
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
.sort-popup .van-tree-select__content .van-cell::after,
|
||||||
|
.screen-popup .van-tree-select__content .van-cell::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-popup .screen-classify-collapse .van-cell{
|
||||||
|
background-color: transparent;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
.screen-popup .screen-classify-collapse .van-collapse-item.active>.van-cell{
|
||||||
|
background-color: var(--bg-poperHover);
|
||||||
|
border-radius: 999px;
|
||||||
|
}
|
||||||
|
.screen-popup .screen-classify-collapse .van-hairline--top-bottom::after,
|
||||||
|
.screen-popup .screen-classify-collapse .van-collapse-item--border::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.screen-popup .screen-classify-collapse .van-collapse-item__content{
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0;
|
||||||
|
padding-left: 1rem;
|
||||||
|
}
|
||||||
|
.screen-popup .screen-classify-collapse .van-cell__value{
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
.van-calendar__day--middle{
|
||||||
|
color: var(--header-active);
|
||||||
|
}
|
||||||
|
.van-calendar__day--start{
|
||||||
|
border-radius: 16px 0 0 16px;
|
||||||
|
}
|
||||||
|
.van-calendar__day--end{
|
||||||
|
border-radius: 0 16px 16px 0;
|
||||||
|
}
|
||||||
|
.screen-cell-input{
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.screen-cell-input::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.screen-cell-input .van-field{
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.screen-cell-input .van-field{
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.library-actionsheet .mint-actionsheet-list{
|
||||||
|
max-height: 400px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.pic-logo{
|
||||||
|
height: 40px;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
.pic-logo .h-left{
|
||||||
|
height: 30px;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--header-text);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.pic-logo .h-left img{
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.pic-container{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
}
|
||||||
|
.pic-container .pic-container-scroll{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
|
padding-top: 46px;
|
||||||
|
}
|
||||||
|
.pic-container .img-container{
|
||||||
|
min-height: 100% ;
|
||||||
|
position: relative;
|
||||||
|
padding: 0 4px;
|
||||||
|
}
|
||||||
|
.pic-toolbar{
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
left: 0;
|
||||||
|
padding: 0 8%;
|
||||||
|
transition: all .3s;
|
||||||
|
transition:all .3s;
|
||||||
|
-moz-transition:all .3s; /* Firefox 4 */
|
||||||
|
-webkit-transition:all .3s; /* Safari and Chrome */
|
||||||
|
-o-transition:all .3s; /* Opera */
|
||||||
|
}
|
||||||
|
.pic-toolbar.footershow{
|
||||||
|
bottom: 3%;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.pic-toolbar.footerhide{
|
||||||
|
bottom: -2.9375rem;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.pic-toolbar .tabbar{
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
border-radius: 39px;
|
||||||
|
background: var(--bg-poper);
|
||||||
|
padding: 0.375rem 0;
|
||||||
|
color: var(--header-text);
|
||||||
|
/* box-shadow: 0px 0px 5px 1px var(--bg-poperHover); */
|
||||||
|
}
|
||||||
|
.pic-toolbar .tab-item{
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.pic-toolbar .tab-item .icon{
|
||||||
|
font-size: var(--font-32);
|
||||||
|
}
|
||||||
|
.pic-toolbar .tab-item img{
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 2.1875rem;
|
||||||
|
height: 2.1875rem;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#imgContainer .imgitem .imgbox .bottom-img-message{
|
||||||
|
text-align: center;
|
||||||
|
color: var(--content-text);
|
||||||
|
overflow: hidden;
|
||||||
|
max-height: 65px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .bottom-img-message .name {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 35px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .bottom-img-message .other {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
height: 21px;
|
||||||
|
padding-top: 5px;
|
||||||
|
color: var(--content-textMessage);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .bottom-img-message .other .score{
|
||||||
|
color: var(--stars);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .bottom-img-message .other .score.active{
|
||||||
|
color: var(--starsActive);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .annotation{
|
||||||
|
position: absolute;
|
||||||
|
right: 5px;
|
||||||
|
top: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
border: 2px solid #FFFFFF;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 20px;
|
||||||
|
background: var(--color-primary);
|
||||||
|
}
|
||||||
|
#imgContainer{
|
||||||
|
position: relative;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem{
|
||||||
|
position: absolute;
|
||||||
|
/* transition:all .2s; */
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox {
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: zoom-in;
|
||||||
|
min-height: 120px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border.radius{
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .bck{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: none;
|
||||||
|
background: var(--bg-poper);
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
border-radius: 18px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .img.opacity{
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box{
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box .circular-item{
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: #333;
|
||||||
|
z-index: 100;
|
||||||
|
font-size: 21px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 45px;
|
||||||
|
background: #ffffff;
|
||||||
|
position: absolute;
|
||||||
|
transition: top .3s ease-in-out,left .3s ease-in-out;
|
||||||
|
/* transition: all .3s ease-in-out; */
|
||||||
|
top: -22.5px;
|
||||||
|
left: -22.5px;
|
||||||
|
transform-origin: 0px;
|
||||||
|
/* transition-delay: 0.02s; */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed{
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .bck{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .img{
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
max-width: inherit;
|
||||||
|
max-height: inherit;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .round{
|
||||||
|
position: absolute;
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: transparent;
|
||||||
|
left: 0px;
|
||||||
|
top: 0px;
|
||||||
|
border: 3px solid var(--bg-poper);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .circular-item-box{
|
||||||
|
position: absolute;
|
||||||
|
left: -67.5px;
|
||||||
|
top: -67.5px;
|
||||||
|
border: 90px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.first{
|
||||||
|
top: -22.5px;
|
||||||
|
left: -22.5px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.two{
|
||||||
|
top: 0px;
|
||||||
|
left: -80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top .circular-item.three{
|
||||||
|
top: -22.5px;
|
||||||
|
left: -138.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box .circular-item-box .icon{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.first{
|
||||||
|
transform: rotate(0deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.two{
|
||||||
|
transform: rotate(45deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.two .icon{
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.three{
|
||||||
|
transform: rotate(90deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top .circular-item.three .icon{
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.first{
|
||||||
|
top: -80.5px;
|
||||||
|
left: 1px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.two{
|
||||||
|
top: -22.5px;
|
||||||
|
left: -22.5px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.right .circular-item.three{
|
||||||
|
top: 0px;
|
||||||
|
left: -80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.first{
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.first .icon{
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.two{
|
||||||
|
transform: rotate(0deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.two .icon{
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.three{
|
||||||
|
transform: rotate(45deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.right .circular-item.three .icon{
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.first{
|
||||||
|
top: 0px;
|
||||||
|
left: -80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.two{
|
||||||
|
top: -22.5px;
|
||||||
|
left: -136.5px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black .circular-box.top.left .circular-item.three{
|
||||||
|
left: -160px;
|
||||||
|
top: -80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.first{
|
||||||
|
transform: rotate(45deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.first .icon{
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.two{
|
||||||
|
transform: rotate(90deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.two .icon{
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.three{
|
||||||
|
transform: rotate(135deg);
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
transform-origin: 80px 80px;
|
||||||
|
}
|
||||||
|
#imgContainer .imgitem .imgbox .imgbox-border .div-black.fixed .circular-box.top.left .circular-item.three .icon{
|
||||||
|
transform: rotate(-135deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.#imgContainer .imgitem {
|
||||||
|
width: 33.3333%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 992px) {
|
||||||
|
.#imgContainer .imgitem {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1024px) {
|
||||||
|
.#imgContainer .imgitem {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.van-nav-bar .van-icon{
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
.van-nav-bar .van-nav-bar__title{
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.about-popup,
|
||||||
|
.my-popup{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background: var(--bg-content);
|
||||||
|
color: var(--content-textHover);
|
||||||
|
overflow: hidden;
|
||||||
|
padding-top: 46px;
|
||||||
|
}
|
||||||
|
.about-popup .van-nav-bar,
|
||||||
|
.my-popup .van-nav-bar{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.about-popup .scroll-box,
|
||||||
|
.my-popup .scroll-box{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
padding-top: 0.9375rem;
|
||||||
|
}
|
||||||
|
.my-popup .scroll-box .van-cell-group{
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.my-popup .scroll-box .van-cell {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.my-popup .scroll-box .van-cell::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.my-popup .scroll-box .van-cell .van-cell__right-icon{
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.about-popup .aboutlogo{
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 3.125rem;
|
||||||
|
padding-bottom: 1.875rem;
|
||||||
|
}
|
||||||
|
.about-popup .aboutmessage{
|
||||||
|
padding: 0 2.1875rem;
|
||||||
|
}
|
||||||
|
.about-popup .aboutmessage .aboutlist{
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
.about-popup .aboutmessage .aboutlist .title{
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.about-popup .aboutmessage .aboutlist .address{
|
||||||
|
color: var(--color-primary);
|
||||||
|
font-size: 1rem;
|
||||||
|
vertical-align: sub;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.about-popup .aboutmessage{
|
||||||
|
padding: 0 6.25rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
133
dzz/pichome/css/mobile/personal.css
Normal file
133
dzz/pichome/css/mobile/personal.css
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
body{
|
||||||
|
background: var(--bg-content);
|
||||||
|
}
|
||||||
|
#dzzoffice{
|
||||||
|
padding-top: 46px;
|
||||||
|
padding-bottom: 75px;
|
||||||
|
}
|
||||||
|
.van-nav-bar{
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.van-nav-bar .van-nav-bar__title,
|
||||||
|
.van-nav-bar .van-icon{
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
.scroll-box{
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 0.625rem 1.875rem;
|
||||||
|
}
|
||||||
|
.van-form .van-uploader{
|
||||||
|
padding-top: 0.625rem;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.van-form .van-image{
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.van-form .van-image .not-img{
|
||||||
|
font-size: 1.6875rem;
|
||||||
|
width: 1.6875rem;
|
||||||
|
height: 1.6875rem;
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: auto;
|
||||||
|
color: var(--header-text);
|
||||||
|
}
|
||||||
|
.van-form .van-image .van-image__error{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.van-form .van-field{
|
||||||
|
background-color: transparent !important;
|
||||||
|
border: 0;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.625rem;
|
||||||
|
}
|
||||||
|
.van-form .van-field.van-cell::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.van-form .van-field .van-field__label{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.van-form .van-field .van-field__label .tip{
|
||||||
|
font-size: 0.75rem;
|
||||||
|
margin-left: 0.625rem;
|
||||||
|
color: var(--tip-color);
|
||||||
|
}
|
||||||
|
.van-form .van-field .van-field__value{
|
||||||
|
margin-top: 0.625rem;
|
||||||
|
}
|
||||||
|
.van-form .van-field .van-field__value .van-field__control{
|
||||||
|
padding: 0.625rem;
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
.van-form .van-field .van-field__value .van-field__error-message{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -24px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.van-form .thems{
|
||||||
|
margin-top: 0.625rem;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.van-form .thems .thems-item{
|
||||||
|
width: 14.285%;
|
||||||
|
float: left;
|
||||||
|
padding: 0.1875rem;
|
||||||
|
}
|
||||||
|
.van-form .thems .thems-item .bg{
|
||||||
|
height: 0;
|
||||||
|
padding: 50% 0;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
.van-form .thems .thems-item .bg.active{
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
}
|
||||||
|
.van-form .thems .thems-item .bg .van-icon{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0px;
|
||||||
|
font-size: 1rem;
|
||||||
|
margin: auto;
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.van-form .thems .thems-item .bg.active .van-icon{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.van-form .thems .thems-item .bg .van-icon{
|
||||||
|
font-size: 2rem;
|
||||||
|
width: 2rem;
|
||||||
|
height: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.footer{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px 0;
|
||||||
|
background: var(--bg-content);
|
||||||
|
color: #FFFFFF;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.footer .van-button{
|
||||||
|
padding: 15px 20px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
261
dzz/pichome/css/mobile/share.css
Normal file
261
dzz/pichome/css/mobile/share.css
Normal file
@@ -0,0 +1,261 @@
|
|||||||
|
.detail-popup-box{
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
padding-top: 46px;
|
||||||
|
padding-bottom: 60px;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
background: var(--bg-content);
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
.detail-popup-box.NotFooter{
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
.detail-popup-box .van-nav-bar{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.detail-popup-box .van-nav-bar .van-icon{
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
.pic-logo{
|
||||||
|
height: 40px;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
.pic-logo .h-left{
|
||||||
|
height: 30px;
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--header-text);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.pic-logo .h-left img{
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.detail-popup-box .footer-tabbar{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height:60px;
|
||||||
|
line-height: 60px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.75rem;
|
||||||
|
border-top: 1px solid var(--border-color-base);
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
z-index: 10000;
|
||||||
|
background: var(--bg-content);
|
||||||
|
}
|
||||||
|
.detail-popup-box .footer-tabbar .footer-tabbar-item{
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.detail-popup-box .detail-popup-translate{
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-popup-box .detail-popup-content{
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
.detail-popup-box .van-nav-bar .van-nav-bar__title{
|
||||||
|
color: var(--content-textHover);
|
||||||
|
}
|
||||||
|
.detail-popup-box .detail-popup-content .detail-popup-img{
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.detail-popup-box .detail-popup-content .detail-between{
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.detail-popup-box .detail-popup-content .detail-between .img-box{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.detail-popup-box .detail-popup-content .detail-between .video-box{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: auto;
|
||||||
|
margin-bottom: auto;
|
||||||
|
}
|
||||||
|
.detail-popup-box .detail-popup-content .detail-between .image-viewer__img{
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
top: 0;
|
||||||
|
margin: auto;
|
||||||
|
z-index: 10;
|
||||||
|
transform-origin: 0 0;
|
||||||
|
}
|
||||||
|
.detail-popup-box .detail-popup-content .detail-between .image-viewer__img.opacity{
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.detail-popup-box .detail-popup-content .detail-between .image-viewer__img.thumbnail{
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.detail-popup-message{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--content-textHover);
|
||||||
|
padding-bottom: 60px;
|
||||||
|
}
|
||||||
|
.detail-popup-message.NotFooter{
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
.detail-popup-message .DetailPopup-content{
|
||||||
|
padding: 0 1rem;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.detail-popup-message .name{
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 16px 0;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block{
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .title{
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 0.625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors{
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
margin-left: -0.1875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors .colors{
|
||||||
|
-webkit-box-flex: 1;
|
||||||
|
-webkit-flex: 1;
|
||||||
|
flex: 1;
|
||||||
|
padding-left: 0.1875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors .colors>div{
|
||||||
|
position: relative;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.detail-popup-message .name{
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .title{
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors .colors>div{
|
||||||
|
height: 1.5625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.tag .tag{
|
||||||
|
font-size: 0.875rem;
|
||||||
|
padding:0 0.5rem;
|
||||||
|
height: 1.875rem;
|
||||||
|
line-height: 1.875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link{
|
||||||
|
font-size: 0.875rem;
|
||||||
|
height: 1.25rem;
|
||||||
|
line-height: 1.25rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link i{
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic{
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.detail-popup-message .name{
|
||||||
|
font-size:1.25rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .title{
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.colors .colors>div{
|
||||||
|
height: 1.875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.tag .tag{
|
||||||
|
font-size: 1rem;
|
||||||
|
padding:0 0.625rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
line-height:2.5rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link{
|
||||||
|
font-size: 1rem;
|
||||||
|
height: 1.875rem;
|
||||||
|
line-height:1.875rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link i{
|
||||||
|
font-size: 1.75rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic{
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.tag{
|
||||||
|
overflow: hidden;
|
||||||
|
margin-left: -0.625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.tag .tag{
|
||||||
|
float: left;
|
||||||
|
min-width: 2.8125rem;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid var(--border-color-base);
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
margin-left: 0.625rem;
|
||||||
|
color: var(--content-text);
|
||||||
|
margin-bottom: 0.3125rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link{
|
||||||
|
color: var(--content-text);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
position: relative;
|
||||||
|
padding-right: 1.5625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item.link i{
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic{
|
||||||
|
color: var(--content-text);
|
||||||
|
margin-bottom: 0.625rem;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic .record{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic .record .star{
|
||||||
|
color: var(--stars);
|
||||||
|
}
|
||||||
|
.detail-popup-message .block .block-item .basic .record .star.active{
|
||||||
|
color: var(--starsActive);
|
||||||
|
}
|
||||||
@@ -384,6 +384,14 @@
|
|||||||
background: var(--header-textHover);
|
background: var(--header-textHover);
|
||||||
color: var(--header-active);
|
color: var(--header-active);
|
||||||
}
|
}
|
||||||
|
.screen-box .field-single .screen-show-val{
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 160px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
.screen-box .field-single .icon {
|
.screen-box .field-single .icon {
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
@@ -928,7 +936,6 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
.each-piece .backg.border {
|
.each-piece .backg.border {
|
||||||
border: 1px solid var(--border-color-base);
|
border: 1px solid var(--border-color-base);
|
||||||
background-color: var(--content-imgbg);
|
background-color: var(--content-imgbg);
|
||||||
@@ -1378,6 +1385,11 @@
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
.img-loading.center{
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
.img-loading span{
|
.img-loading span{
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
--radio-line:#797979;/* radio边框颜色 */
|
--radio-line:#797979;/* radio边框颜色 */
|
||||||
|
|
||||||
--tagbg:#454545;/* 标签左侧颜色 */
|
--tagbg:#454545;/* 标签左侧颜色 */
|
||||||
--stars:#E1AF22;/* 评分颜色 */
|
--stars:#515151;/* 选中评分颜色 */
|
||||||
--starsActive:#515151;/* 选中评分颜色 */
|
--starsActive:#E1AF22;/* 评分颜色 */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ if($operation == 'fetch'){
|
|||||||
|
|
||||||
}else{
|
}else{
|
||||||
$theme = GetThemeColor();
|
$theme = GetThemeColor();
|
||||||
|
$ismobile = helper_browser::ismobile();
|
||||||
|
if ($ismobile) {
|
||||||
|
include template('mobile/page/details');
|
||||||
|
} else {
|
||||||
include template('pc/page/details');
|
include template('pc/page/details');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,31 @@
|
|||||||
<?php
|
<?php
|
||||||
|
ignore_user_abort(true);
|
||||||
if (!defined('IN_OAOOA')) {
|
if (!defined('IN_OAOOA')) {
|
||||||
exit('Access Denied');
|
exit('Access Denied');
|
||||||
}
|
}
|
||||||
ignore_user_abort(true);
|
|
||||||
@set_time_limit(0);
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
|
ini_set('memory_limit', -1);
|
||||||
@ini_set('max_execution_time', 0);
|
@ini_set('max_execution_time', 0);
|
||||||
|
|
||||||
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
|
||||||
|
$processname = 'DZZ_EXPORTFILE_LOCK_'.$appid;
|
||||||
|
//dzz_process::unlock($processname);
|
||||||
|
$locked = true;
|
||||||
|
if (!dzz_process::islocked($processname, 60*5)) {
|
||||||
|
$locked=false;
|
||||||
|
}
|
||||||
|
if ($locked) {
|
||||||
|
exit(json_encode( array('error'=>'进程已被锁定请稍后再试')));
|
||||||
|
}
|
||||||
|
// var_dump($locked);die;
|
||||||
$force = isset($_GET['force']) ? intval($_GET['force']):0;
|
$force = isset($_GET['force']) ? intval($_GET['force']):0;
|
||||||
$data = C::t('pichome_vapp')->fetch($appid);
|
$data = C::t('pichome_vapp')->fetch($appid);
|
||||||
if(!$data) exit(json_encode(array('error'=>'no data')));
|
if(!$data) exit(json_encode(array('error'=>'no data')));
|
||||||
if($data['type'] == 0){
|
if($data['type'] == 0 && $data['state'] == 1){
|
||||||
include_once dzz_libfile('eagleexport');
|
include_once dzz_libfile('eagleexport');
|
||||||
$eagleexport = new eagleexport($data);
|
$eagleexport = new eagleexport($data);
|
||||||
$return = $eagleexport->execExport($force);
|
$return = $eagleexport->execExport($force);
|
||||||
print_r($return);
|
|
||||||
}else{
|
}else{
|
||||||
include_once dzz_libfile('oaooaexport');
|
include_once dzz_libfile('oaooaexport');
|
||||||
$oaooaexport = new oaooaexport($data);
|
$oaooaexport = new oaooaexport($data);
|
||||||
@@ -23,6 +33,7 @@
|
|||||||
$oaooaexport->exportTaggroup();
|
$oaooaexport->exportTaggroup();
|
||||||
//执行导入文件
|
//执行导入文件
|
||||||
$return = $oaooaexport->initExport();
|
$return = $oaooaexport->initExport();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
dzz_process::unlock($processname);
|
||||||
|
exit('success');
|
||||||
|
|
||||||
30
dzz/pichome/exportfilecheck.php
Normal file
30
dzz/pichome/exportfilecheck.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?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'){
|
||||||
|
include_once dzz_libfile('eagleexport');
|
||||||
|
$eagleexport = new eagleexport($data);
|
||||||
|
$return = $eagleexport->execCheckFile();
|
||||||
|
}
|
||||||
|
dzz_process::unlock($processname);
|
||||||
|
|
||||||
@@ -120,7 +120,8 @@ if($operation == 'filelist'){
|
|||||||
if(!empty($tagval)){
|
if(!empty($tagval)){
|
||||||
$tagdata=[];
|
$tagdata=[];
|
||||||
if($appid){
|
if($appid){
|
||||||
foreach(DB::fetch_all("select t.tagname,t.tid,tr.cid from %t t left join %t tr on t.tid = tr.tid where t.tid in(%n) and tr.appid=%s",array('pichome_tag','pichome_tagrelation',$tagval,$appid)) as $tv){
|
|
||||||
|
foreach(DB::fetch_all("select t.tagname,t.tid,tr.cid from %t t left join %t tr on t.tid = tr.tid and tr.appid=%s where t.tid in(%n) ",array('pichome_tag','pichome_tagrelation',$appid,$tagval)) as $tv){
|
||||||
$tagdata[] = array('tagname'=>$tv['tagname'],'tid'=>intval($tv['tid']),'cid'=>$tv['cid']);
|
$tagdata[] = array('tagname'=>$tv['tagname'],'tid'=>intval($tv['tid']),'cid'=>$tv['cid']);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@@ -129,10 +130,6 @@ if($operation == 'filelist'){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//print_r($tagdata);die;
|
|
||||||
/* foreach(C::t('pichome_tag')->fetch_all($tagval) as $tv){
|
|
||||||
$tagdata[] = array('tagname'=>$tv['tagname'],'tid'=>intval($tv['tid']));
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
foreach($tagval as $v){
|
foreach($tagval as $v){
|
||||||
$tagwherearr[] = " find_in_set(%d,ra.tag)";
|
$tagwherearr[] = " find_in_set(%d,ra.tag)";
|
||||||
@@ -239,15 +236,7 @@ if($operation == 'filelist'){
|
|||||||
if (isset($_GET['shape'])) {
|
if (isset($_GET['shape'])) {
|
||||||
$shape = trim($_GET['shape']);
|
$shape = trim($_GET['shape']);
|
||||||
$shapes = explode(',', $shape);
|
$shapes = explode(',', $shape);
|
||||||
//指定宽高比
|
|
||||||
// $swidth = 0;
|
|
||||||
// $sheight = 0;
|
|
||||||
// if(isset($_GET['shapesize'])){
|
|
||||||
// $shapesize = trim($_GET['shapesize']);
|
|
||||||
// $shapesizes = explode(':',$shapesize);
|
|
||||||
// $swidth = intval($shapesizes[0]);
|
|
||||||
// $sheight = intval($shapesizes[1]);
|
|
||||||
// }
|
|
||||||
$shapewherearr = [];
|
$shapewherearr = [];
|
||||||
foreach ($shapes as $v) {
|
foreach ($shapes as $v) {
|
||||||
switch ($v) {
|
switch ($v) {
|
||||||
@@ -456,6 +445,7 @@ if($operation == 'filelist'){
|
|||||||
$orderarr[] = ' r.width*r.height '.$asc;
|
$orderarr[] = ' r.width*r.height '.$asc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
||||||
$orderarr[] = ' r.dateline '.$asc;
|
$orderarr[] = ' r.dateline '.$asc;
|
||||||
}
|
}
|
||||||
$ordersql = implode(',',$orderarr);
|
$ordersql = implode(',',$orderarr);
|
||||||
|
|||||||
BIN
dzz/pichome/image/notScreen.png
Normal file
BIN
dzz/pichome/image/notScreen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 871 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 5.4 KiB |
19
dzz/pichome/initexport.php
Normal file
19
dzz/pichome/initexport.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('IN_OAOOA')) {
|
||||||
|
exit('Access Denied');
|
||||||
|
}
|
||||||
|
@set_time_limit(0);
|
||||||
|
@ini_set('memory_limit', -1);
|
||||||
|
@ini_set('max_execution_time', 0);
|
||||||
|
|
||||||
|
$appid = isset($_GET['appid']) ? trim($_GET['appid']):0;
|
||||||
|
$force = isset($_GET['force']) ? intval($_GET['force']):0;
|
||||||
|
$data = C::t('pichome_vapp')->fetch($appid);
|
||||||
|
if(!$data) exit(json_encode(array('error'=>'no data')));
|
||||||
|
if($data['type'] == 0){
|
||||||
|
include_once dzz_libfile('eagleexport');
|
||||||
|
$eagleexport = new eagleexport($data);
|
||||||
|
$return = $eagleexport->initExport();
|
||||||
|
}
|
||||||
|
exit(json_encode(array('success'=>true)));
|
||||||
|
|
||||||
789
dzz/pichome/js/mobile/pinchzoom.js
Normal file
789
dzz/pichome/js/mobile/pinchzoom.js
Normal file
@@ -0,0 +1,789 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) Manuel Stofer 2013 - today, PinchZoom.js
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// polyfills
|
||||||
|
if (typeof Object.assign != 'function') {
|
||||||
|
// Must be writable: true, enumerable: false, configurable: true
|
||||||
|
Object.defineProperty(Object, "assign", {
|
||||||
|
value: function assign(target, varArgs) { // .length of function is 2
|
||||||
|
if (target == null) { // TypeError if undefined or null
|
||||||
|
throw new TypeError('Cannot convert undefined or null to object');
|
||||||
|
}
|
||||||
|
|
||||||
|
var to = Object(target);
|
||||||
|
|
||||||
|
for (var index = 1; index < arguments.length; index++) {
|
||||||
|
var nextSource = arguments[index];
|
||||||
|
|
||||||
|
if (nextSource != null) { // Skip over if undefined or null
|
||||||
|
for (var nextKey in nextSource) {
|
||||||
|
// Avoid bugs when hasOwnProperty is shadowed
|
||||||
|
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
|
||||||
|
to[nextKey] = nextSource[nextKey];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return to;
|
||||||
|
},
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof Array.from != 'function') {
|
||||||
|
Array.from = function (object) {
|
||||||
|
return [].slice.call(object);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// utils
|
||||||
|
var buildElement = function(str) {
|
||||||
|
// empty string as title argument required by IE and Edge
|
||||||
|
var tmp = document.implementation.createHTMLDocument('');
|
||||||
|
tmp.body.innerHTML = str;
|
||||||
|
return Array.from(tmp.body.children)[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
var triggerEvent = function(el, name) {
|
||||||
|
var event = document.createEvent('HTMLEvents');
|
||||||
|
event.initEvent(name, true, false);
|
||||||
|
el.dispatchEvent(event);
|
||||||
|
};
|
||||||
|
|
||||||
|
var definePinchZoom = function () {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pinch zoom
|
||||||
|
* @version 2.0.0
|
||||||
|
* @author Manuel Stofer <mst@rtp.ch>
|
||||||
|
* @param el
|
||||||
|
* @param options
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
var PinchZoom = function (el, options) {
|
||||||
|
this.el = el;
|
||||||
|
this.zoomFactor = 1;
|
||||||
|
this.lastScale = 1;
|
||||||
|
this.offset = {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
};
|
||||||
|
this.options = Object.assign({}, this.defaults, options);
|
||||||
|
this.setupMarkup();
|
||||||
|
this.bindEvents();
|
||||||
|
this.update();
|
||||||
|
// default enable.
|
||||||
|
this.enable();
|
||||||
|
|
||||||
|
},
|
||||||
|
sum = function (a, b) {
|
||||||
|
return a + b;
|
||||||
|
},
|
||||||
|
isCloseTo = function (value, expected) {
|
||||||
|
return value > expected - 0.01 && value < expected + 0.01;
|
||||||
|
};
|
||||||
|
|
||||||
|
PinchZoom.prototype = {
|
||||||
|
|
||||||
|
defaults: {
|
||||||
|
tapZoomFactor: 2,
|
||||||
|
zoomOutFactor: 1.3,
|
||||||
|
animationDuration: 300,
|
||||||
|
maxZoom: 4,
|
||||||
|
minZoom: 0.5,
|
||||||
|
lockDragAxis: false,
|
||||||
|
use2d: true,
|
||||||
|
zoomStartEventName: 'pz_zoomstart',
|
||||||
|
zoomEndEventName: 'pz_zoomend',
|
||||||
|
dragStartEventName: 'pz_dragstart',
|
||||||
|
dragEndEventName: 'pz_dragend',
|
||||||
|
doubleTapEventName: 'pz_doubletap'
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler for 'dragstart'
|
||||||
|
* @param event
|
||||||
|
*/
|
||||||
|
handleDragStart: function (event) {
|
||||||
|
triggerEvent(this.el, this.options.dragStartEventName);
|
||||||
|
this.stopAnimation();
|
||||||
|
this.lastDragPosition = false;
|
||||||
|
this.hasInteraction = true;
|
||||||
|
this.handleDrag(event);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler for 'drag'
|
||||||
|
* @param event
|
||||||
|
*/
|
||||||
|
handleDrag: function (event) {
|
||||||
|
if (this.zoomFactor > 1.0) {
|
||||||
|
var touch = this.getTouches(event)[0];
|
||||||
|
this.drag(touch, this.lastDragPosition);
|
||||||
|
this.offset = this.sanitizeOffset(this.offset);
|
||||||
|
this.lastDragPosition = touch;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDragEnd: function () {
|
||||||
|
triggerEvent(this.el, this.options.dragEndEventName);
|
||||||
|
this.end();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler for 'zoomstart'
|
||||||
|
* @param event
|
||||||
|
*/
|
||||||
|
handleZoomStart: function (event) {
|
||||||
|
triggerEvent(this.el, this.options.zoomStartEventName);
|
||||||
|
this.stopAnimation();
|
||||||
|
this.lastScale = 1;
|
||||||
|
this.nthZoom = 0;
|
||||||
|
this.lastZoomCenter = false;
|
||||||
|
this.hasInteraction = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler for 'zoom'
|
||||||
|
* @param event
|
||||||
|
*/
|
||||||
|
handleZoom: function (event, newScale) {
|
||||||
|
// a relative scale factor is used
|
||||||
|
var touchCenter = this.getTouchCenter(this.getTouches(event)),
|
||||||
|
scale = newScale / this.lastScale;
|
||||||
|
this.lastScale = newScale;
|
||||||
|
|
||||||
|
// the first touch events are thrown away since they are not precise
|
||||||
|
this.nthZoom += 1;
|
||||||
|
if (this.nthZoom > 3) {
|
||||||
|
|
||||||
|
this.scale(scale, touchCenter);
|
||||||
|
this.drag(touchCenter, this.lastZoomCenter);
|
||||||
|
}
|
||||||
|
this.lastZoomCenter = touchCenter;
|
||||||
|
},
|
||||||
|
|
||||||
|
handleZoomEnd: function () {
|
||||||
|
triggerEvent(this.el, this.options.zoomEndEventName);
|
||||||
|
this.end();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler for 'doubletap'
|
||||||
|
* @param event
|
||||||
|
*/
|
||||||
|
handleDoubleTap: function (event) {
|
||||||
|
var center = this.getTouches(event)[0],
|
||||||
|
zoomFactor = this.zoomFactor > 1 ? 1 : this.options.tapZoomFactor,
|
||||||
|
startZoomFactor = this.zoomFactor,
|
||||||
|
updateProgress = (function (progress) {
|
||||||
|
this.scaleTo(startZoomFactor + progress * (zoomFactor - startZoomFactor), center);
|
||||||
|
}).bind(this);
|
||||||
|
|
||||||
|
if (this.hasInteraction) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (startZoomFactor > zoomFactor) {
|
||||||
|
center = this.getCurrentZoomCenter();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.animate(this.options.animationDuration, updateProgress, this.swing);
|
||||||
|
triggerEvent(this.el, this.options.doubleTapEventName);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Max / min values for the offset
|
||||||
|
* @param offset
|
||||||
|
* @return {Object} the sanitized offset
|
||||||
|
*/
|
||||||
|
sanitizeOffset: function (offset) {
|
||||||
|
var maxX = (this.zoomFactor - 1) * this.getContainerX(),
|
||||||
|
maxY = (this.zoomFactor - 1) * this.getContainerY(),
|
||||||
|
maxOffsetX = Math.max(maxX, 0),
|
||||||
|
maxOffsetY = Math.max(maxY, 0),
|
||||||
|
minOffsetX = Math.min(maxX, 0),
|
||||||
|
minOffsetY = Math.min(maxY, 0);
|
||||||
|
|
||||||
|
return {
|
||||||
|
x: Math.min(Math.max(offset.x, minOffsetX), maxOffsetX),
|
||||||
|
y: Math.min(Math.max(offset.y, minOffsetY), maxOffsetY)
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scale to a specific zoom factor (not relative)
|
||||||
|
* @param zoomFactor
|
||||||
|
* @param center
|
||||||
|
*/
|
||||||
|
scaleTo: function (zoomFactor, center) {
|
||||||
|
this.scale(zoomFactor / this.zoomFactor, center);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scales the element from specified center
|
||||||
|
* @param scale
|
||||||
|
* @param center
|
||||||
|
*/
|
||||||
|
scale: function (scale, center) {
|
||||||
|
scale = this.scaleZoomFactor(scale);
|
||||||
|
this.addOffset({
|
||||||
|
x: (scale - 1) * (center.x + this.offset.x),
|
||||||
|
y: (scale - 1) * (center.y + this.offset.y)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scales the zoom factor relative to current state
|
||||||
|
* @param scale
|
||||||
|
* @return the actual scale (can differ because of max min zoom factor)
|
||||||
|
*/
|
||||||
|
scaleZoomFactor: function (scale) {
|
||||||
|
var originalZoomFactor = this.zoomFactor;
|
||||||
|
this.zoomFactor *= scale;
|
||||||
|
this.zoomFactor = Math.min(this.options.maxZoom, Math.max(this.zoomFactor, this.options.minZoom));
|
||||||
|
return this.zoomFactor / originalZoomFactor;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drags the element
|
||||||
|
* @param center
|
||||||
|
* @param lastCenter
|
||||||
|
*/
|
||||||
|
drag: function (center, lastCenter) {
|
||||||
|
if (lastCenter) {
|
||||||
|
if(this.options.lockDragAxis) {
|
||||||
|
// lock scroll to position that was changed the most
|
||||||
|
if(Math.abs(center.x - lastCenter.x) > Math.abs(center.y - lastCenter.y)) {
|
||||||
|
this.addOffset({
|
||||||
|
x: -(center.x - lastCenter.x),
|
||||||
|
y: 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.addOffset({
|
||||||
|
y: -(center.y - lastCenter.y),
|
||||||
|
x: 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.addOffset({
|
||||||
|
y: -(center.y - lastCenter.y),
|
||||||
|
x: -(center.x - lastCenter.x)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the touch center of multiple touches
|
||||||
|
* @param touches
|
||||||
|
* @return {Object}
|
||||||
|
*/
|
||||||
|
getTouchCenter: function (touches) {
|
||||||
|
return this.getVectorAvg(touches);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the average of multiple vectors (x, y values)
|
||||||
|
*/
|
||||||
|
getVectorAvg: function (vectors) {
|
||||||
|
return {
|
||||||
|
x: vectors.map(function (v) { return v.x; }).reduce(sum) / vectors.length,
|
||||||
|
y: vectors.map(function (v) { return v.y; }).reduce(sum) / vectors.length
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an offset
|
||||||
|
* @param offset the offset to add
|
||||||
|
* @return return true when the offset change was accepted
|
||||||
|
*/
|
||||||
|
addOffset: function (offset) {
|
||||||
|
this.offset = {
|
||||||
|
x: this.offset.x + offset.x,
|
||||||
|
y: this.offset.y + offset.y
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
sanitize: function () {
|
||||||
|
if (this.zoomFactor < this.options.zoomOutFactor) {
|
||||||
|
this.zoomOutAnimation();
|
||||||
|
} else if (this.isInsaneOffset(this.offset)) {
|
||||||
|
this.sanitizeOffsetAnimation();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the offset is ok with the current zoom factor
|
||||||
|
* @param offset
|
||||||
|
* @return {Boolean}
|
||||||
|
*/
|
||||||
|
isInsaneOffset: function (offset) {
|
||||||
|
var sanitizedOffset = this.sanitizeOffset(offset);
|
||||||
|
return sanitizedOffset.x !== offset.x ||
|
||||||
|
sanitizedOffset.y !== offset.y;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an animation moving to a sane offset
|
||||||
|
*/
|
||||||
|
sanitizeOffsetAnimation: function () {
|
||||||
|
var targetOffset = this.sanitizeOffset(this.offset),
|
||||||
|
startOffset = {
|
||||||
|
x: this.offset.x,
|
||||||
|
y: this.offset.y
|
||||||
|
},
|
||||||
|
updateProgress = (function (progress) {
|
||||||
|
this.offset.x = startOffset.x + progress * (targetOffset.x - startOffset.x);
|
||||||
|
this.offset.y = startOffset.y + progress * (targetOffset.y - startOffset.y);
|
||||||
|
this.update();
|
||||||
|
}).bind(this);
|
||||||
|
|
||||||
|
this.animate(
|
||||||
|
this.options.animationDuration,
|
||||||
|
updateProgress,
|
||||||
|
this.swing
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zooms back to the original position,
|
||||||
|
* (no offset and zoom factor 1)
|
||||||
|
*/
|
||||||
|
zoomOutAnimation: function () {
|
||||||
|
var startZoomFactor = this.zoomFactor,
|
||||||
|
zoomFactor = 1,
|
||||||
|
center = this.getCurrentZoomCenter(),
|
||||||
|
updateProgress = (function (progress) {
|
||||||
|
this.scaleTo(startZoomFactor + progress * (zoomFactor - startZoomFactor), center);
|
||||||
|
}).bind(this);
|
||||||
|
|
||||||
|
this.animate(
|
||||||
|
this.options.animationDuration,
|
||||||
|
updateProgress,
|
||||||
|
this.swing
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the aspect ratio
|
||||||
|
*/
|
||||||
|
updateAspectRatio: function () {
|
||||||
|
this.setContainerY(this.getContainerX() / this.getAspectRatio());
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the initial zoom factor (for the element to fit into the container)
|
||||||
|
* @return the initial zoom factor
|
||||||
|
*/
|
||||||
|
getInitialZoomFactor: function () {
|
||||||
|
return this.container.offsetWidth / this.el.offsetWidth;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the aspect ratio of the element
|
||||||
|
* @return the aspect ratio
|
||||||
|
*/
|
||||||
|
getAspectRatio: function () {
|
||||||
|
return this.el.offsetWidth / this.el.offsetHeight;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculates the virtual zoom center for the current offset and zoom factor
|
||||||
|
* (used for reverse zoom)
|
||||||
|
* @return {Object} the current zoom center
|
||||||
|
*/
|
||||||
|
getCurrentZoomCenter: function () {
|
||||||
|
|
||||||
|
// uses following formula to calculate the zoom center x value
|
||||||
|
// offset_left / offset_right = zoomcenter_x / (container_x - zoomcenter_x)
|
||||||
|
var length = this.container.offsetWidth * this.zoomFactor,
|
||||||
|
offsetLeft = this.offset.x,
|
||||||
|
offsetRight = length - offsetLeft - this.container.offsetWidth,
|
||||||
|
widthOffsetRatio = offsetLeft / offsetRight,
|
||||||
|
centerX = widthOffsetRatio * this.container.offsetWidth / (widthOffsetRatio + 1),
|
||||||
|
|
||||||
|
// the same for the zoomcenter y
|
||||||
|
height = this.container.offsetHeight * this.zoomFactor,
|
||||||
|
offsetTop = this.offset.y,
|
||||||
|
offsetBottom = height - offsetTop - this.container.offsetHeight,
|
||||||
|
heightOffsetRatio = offsetTop / offsetBottom,
|
||||||
|
centerY = heightOffsetRatio * this.container.offsetHeight / (heightOffsetRatio + 1);
|
||||||
|
|
||||||
|
// prevents division by zero
|
||||||
|
if (offsetRight === 0) { centerX = this.container.offsetWidth; }
|
||||||
|
if (offsetBottom === 0) { centerY = this.container.offsetHeight; }
|
||||||
|
|
||||||
|
return {
|
||||||
|
x: centerX,
|
||||||
|
y: centerY
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
canDrag: function () {
|
||||||
|
return !isCloseTo(this.zoomFactor, 1);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the touches of an event relative to the container offset
|
||||||
|
* @param event
|
||||||
|
* @return array touches
|
||||||
|
*/
|
||||||
|
getTouches: function (event) {
|
||||||
|
var rect = this.container.getBoundingClientRect();
|
||||||
|
var posTop = rect.top + document.body.scrollTop;
|
||||||
|
var posLeft = rect.left + document.body.scrollLeft;
|
||||||
|
|
||||||
|
return Array.prototype.slice.call(event.touches).map(function (touch) {
|
||||||
|
return {
|
||||||
|
x: touch.pageX - posLeft,
|
||||||
|
y: touch.pageY - posTop,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Animation loop
|
||||||
|
* does not support simultaneous animations
|
||||||
|
* @param duration
|
||||||
|
* @param framefn
|
||||||
|
* @param timefn
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
animate: function (duration, framefn, timefn, callback) {
|
||||||
|
var startTime = new Date().getTime(),
|
||||||
|
renderFrame = (function () {
|
||||||
|
if (!this.inAnimation) { return; }
|
||||||
|
var frameTime = new Date().getTime() - startTime,
|
||||||
|
progress = frameTime / duration;
|
||||||
|
if (frameTime >= duration) {
|
||||||
|
framefn(1);
|
||||||
|
if (callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
this.update();
|
||||||
|
this.stopAnimation();
|
||||||
|
this.update();
|
||||||
|
} else {
|
||||||
|
if (timefn) {
|
||||||
|
progress = timefn(progress);
|
||||||
|
}
|
||||||
|
framefn(progress);
|
||||||
|
this.update();
|
||||||
|
requestAnimationFrame(renderFrame);
|
||||||
|
}
|
||||||
|
}).bind(this);
|
||||||
|
this.inAnimation = true;
|
||||||
|
requestAnimationFrame(renderFrame);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops the animation
|
||||||
|
*/
|
||||||
|
stopAnimation: function () {
|
||||||
|
this.inAnimation = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Swing timing function for animations
|
||||||
|
* @param p
|
||||||
|
* @return {Number}
|
||||||
|
*/
|
||||||
|
swing: function (p) {
|
||||||
|
return -Math.cos(p * Math.PI) / 2 + 0.5;
|
||||||
|
},
|
||||||
|
|
||||||
|
getContainerX: function () {
|
||||||
|
return this.container.offsetWidth;
|
||||||
|
},
|
||||||
|
|
||||||
|
getContainerY: function () {
|
||||||
|
return this.container.offsetHeight;
|
||||||
|
},
|
||||||
|
|
||||||
|
setContainerY: function (y) {
|
||||||
|
return this.container.style.height = y + 'px';
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the expected html structure
|
||||||
|
*/
|
||||||
|
setupMarkup: function () {
|
||||||
|
this.container = buildElement('<div class="pinch-zoom-container"></div>');
|
||||||
|
this.el.parentNode.insertBefore(this.container, this.el);
|
||||||
|
this.container.appendChild(this.el);
|
||||||
|
|
||||||
|
this.container.style.overflow = 'hidden';
|
||||||
|
this.container.style.position = 'relative';
|
||||||
|
|
||||||
|
this.el.style.webkitTransformOrigin = '0% 0%';
|
||||||
|
this.el.style.mozTransformOrigin = '0% 0%';
|
||||||
|
this.el.style.msTransformOrigin = '0% 0%';
|
||||||
|
this.el.style.oTransformOrigin = '0% 0%';
|
||||||
|
this.el.style.transformOrigin = '0% 0%';
|
||||||
|
|
||||||
|
this.el.style.position = 'absolute';
|
||||||
|
},
|
||||||
|
|
||||||
|
end: function () {
|
||||||
|
this.hasInteraction = false;
|
||||||
|
this.sanitize();
|
||||||
|
this.update();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Binds all required event listeners
|
||||||
|
*/
|
||||||
|
bindEvents: function () {
|
||||||
|
var self = this;
|
||||||
|
detectGestures(this.container, this);
|
||||||
|
|
||||||
|
window.addEventListener('resize', this.update.bind(this));
|
||||||
|
Array.from(this.el.querySelectorAll('img')).forEach(function(imgEl) {
|
||||||
|
imgEl.addEventListener('load', self.update.bind(self));
|
||||||
|
});
|
||||||
|
|
||||||
|
if (this.el.nodeName === 'IMG') {
|
||||||
|
this.el.addEventListener('load', this.update.bind(this));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the css values according to the current zoom factor and offset
|
||||||
|
*/
|
||||||
|
update: function () {
|
||||||
|
if (this.updatePlaned) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.updatePlaned = true;
|
||||||
|
|
||||||
|
window.setTimeout((function () {
|
||||||
|
this.updatePlaned = false;
|
||||||
|
this.updateAspectRatio();
|
||||||
|
|
||||||
|
var zoomFactor = this.getInitialZoomFactor() * this.zoomFactor,
|
||||||
|
offsetX = -this.offset.x / zoomFactor,
|
||||||
|
offsetY = -this.offset.y / zoomFactor,
|
||||||
|
transform3d = 'scale3d(' + zoomFactor + ', ' + zoomFactor + ',1) ' +
|
||||||
|
'translate3d(' + offsetX + 'px,' + offsetY + 'px,0px)',
|
||||||
|
transform2d = 'scale(' + zoomFactor + ', ' + zoomFactor + ') ' +
|
||||||
|
'translate(' + offsetX + 'px,' + offsetY + 'px)',
|
||||||
|
removeClone = (function () {
|
||||||
|
if (this.clone) {
|
||||||
|
this.clone.parentNode.removeChild(this.clone);
|
||||||
|
delete this.clone;
|
||||||
|
}
|
||||||
|
}).bind(this);
|
||||||
|
|
||||||
|
// Scale 3d and translate3d are faster (at least on ios)
|
||||||
|
// but they also reduce the quality.
|
||||||
|
// PinchZoom uses the 3d transformations during interactions
|
||||||
|
// after interactions it falls back to 2d transformations
|
||||||
|
if (!this.options.use2d || this.hasInteraction || this.inAnimation) {
|
||||||
|
this.is3d = true;
|
||||||
|
removeClone();
|
||||||
|
|
||||||
|
this.el.style.webkitTransform = transform3d;
|
||||||
|
this.el.style.mozTransform = transform2d;
|
||||||
|
this.el.style.msTransform = transform2d;
|
||||||
|
this.el.style.oTransform = transform2d;
|
||||||
|
this.el.style.transform = transform3d;
|
||||||
|
} else {
|
||||||
|
// When changing from 3d to 2d transform webkit has some glitches.
|
||||||
|
// To avoid this, a copy of the 3d transformed element is displayed in the
|
||||||
|
// foreground while the element is converted from 3d to 2d transform
|
||||||
|
if (this.is3d) {
|
||||||
|
this.clone = this.el.cloneNode(true);
|
||||||
|
this.clone.style.pointerEvents = 'none';
|
||||||
|
this.container.appendChild(this.clone);
|
||||||
|
window.setTimeout(removeClone, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.el.style.webkitTransform = transform2d;
|
||||||
|
this.el.style.mozTransform = transform2d;
|
||||||
|
this.el.style.msTransform = transform2d;
|
||||||
|
this.el.style.oTransform = transform2d;
|
||||||
|
this.el.style.transform = transform2d;
|
||||||
|
|
||||||
|
this.is3d = false;
|
||||||
|
}
|
||||||
|
}).bind(this), 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables event handling for gestures
|
||||||
|
*/
|
||||||
|
enable: function() {
|
||||||
|
this.enabled = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disables event handling for gestures
|
||||||
|
*/
|
||||||
|
disable: function() {
|
||||||
|
this.enabled = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var detectGestures = function (el, target) {
|
||||||
|
var interaction = null,
|
||||||
|
fingers = 0,
|
||||||
|
lastTouchStart = null,
|
||||||
|
startTouches = null,
|
||||||
|
|
||||||
|
setInteraction = function (newInteraction, event) {
|
||||||
|
if (interaction !== newInteraction) {
|
||||||
|
|
||||||
|
if (interaction && !newInteraction) {
|
||||||
|
switch (interaction) {
|
||||||
|
case "zoom":
|
||||||
|
target.handleZoomEnd(event);
|
||||||
|
break;
|
||||||
|
case 'drag':
|
||||||
|
target.handleDragEnd(event);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (newInteraction) {
|
||||||
|
case 'zoom':
|
||||||
|
target.handleZoomStart(event);
|
||||||
|
break;
|
||||||
|
case 'drag':
|
||||||
|
target.handleDragStart(event);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
interaction = newInteraction;
|
||||||
|
},
|
||||||
|
|
||||||
|
updateInteraction = function (event) {
|
||||||
|
if (fingers === 2) {
|
||||||
|
setInteraction('zoom');
|
||||||
|
} else if (fingers === 1 && target.canDrag()) {
|
||||||
|
setInteraction('drag', event);
|
||||||
|
} else {
|
||||||
|
setInteraction(null, event);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
targetTouches = function (touches) {
|
||||||
|
return Array.from(touches).map(function (touch) {
|
||||||
|
return {
|
||||||
|
x: touch.pageX,
|
||||||
|
y: touch.pageY
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getDistance = function (a, b) {
|
||||||
|
var x, y;
|
||||||
|
x = a.x - b.x;
|
||||||
|
y = a.y - b.y;
|
||||||
|
return Math.sqrt(x * x + y * y);
|
||||||
|
},
|
||||||
|
|
||||||
|
calculateScale = function (startTouches, endTouches) {
|
||||||
|
var startDistance = getDistance(startTouches[0], startTouches[1]),
|
||||||
|
endDistance = getDistance(endTouches[0], endTouches[1]);
|
||||||
|
return endDistance / startDistance;
|
||||||
|
},
|
||||||
|
|
||||||
|
cancelEvent = function (event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
},
|
||||||
|
|
||||||
|
detectDoubleTap = function (event) {
|
||||||
|
var time = (new Date()).getTime();
|
||||||
|
|
||||||
|
if (fingers > 1) {
|
||||||
|
lastTouchStart = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (time - lastTouchStart < 300) {
|
||||||
|
cancelEvent(event);
|
||||||
|
|
||||||
|
target.handleDoubleTap(event);
|
||||||
|
switch (interaction) {
|
||||||
|
case "zoom":
|
||||||
|
target.handleZoomEnd(event);
|
||||||
|
break;
|
||||||
|
case 'drag':
|
||||||
|
target.handleDragEnd(event);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fingers === 1) {
|
||||||
|
lastTouchStart = time;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
firstMove = true;
|
||||||
|
|
||||||
|
el.addEventListener('touchstart', function (event) {
|
||||||
|
if(target.enabled) {
|
||||||
|
firstMove = true;
|
||||||
|
fingers = event.touches.length;
|
||||||
|
detectDoubleTap(event);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
el.addEventListener('touchmove', function (event) {
|
||||||
|
if(target.enabled) {
|
||||||
|
if (firstMove) {
|
||||||
|
updateInteraction(event);
|
||||||
|
if (interaction) {
|
||||||
|
cancelEvent(event);
|
||||||
|
}
|
||||||
|
startTouches = targetTouches(event.touches);
|
||||||
|
} else {
|
||||||
|
switch (interaction) {
|
||||||
|
case 'zoom':
|
||||||
|
target.handleZoom(event, calculateScale(startTouches, targetTouches(event.touches)));
|
||||||
|
break;
|
||||||
|
case 'drag':
|
||||||
|
target.handleDrag(event);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (interaction) {
|
||||||
|
cancelEvent(event);
|
||||||
|
target.update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
firstMove = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
el.addEventListener('touchend', function (event) {
|
||||||
|
if(target.enabled) {
|
||||||
|
fingers = event.touches.length;
|
||||||
|
updateInteraction(event);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return PinchZoom;
|
||||||
|
};
|
||||||
|
|
||||||
|
var PinchZoom = definePinchZoom();
|
||||||
|
|
||||||
245
dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.css
Normal file
245
dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.css
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
.minicolors {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-swatch {
|
||||||
|
position: absolute;
|
||||||
|
vertical-align: middle;
|
||||||
|
background: url(jquery.minicolors.png) -80px 0;
|
||||||
|
border: solid 1px #ccc;
|
||||||
|
cursor: text;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-swatch-color {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors input[type=hidden] + .minicolors-swatch {
|
||||||
|
width: 28px;
|
||||||
|
position: static;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Panel */
|
||||||
|
.minicolors-panel {
|
||||||
|
position: absolute;
|
||||||
|
width: 173px;
|
||||||
|
height: 152px;
|
||||||
|
background: white;
|
||||||
|
border: solid 1px #CCC;
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
|
||||||
|
z-index: 99999;
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
-webkit-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-panel.minicolors-visible {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Panel positioning */
|
||||||
|
.minicolors-position-top .minicolors-panel {
|
||||||
|
top: -154px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-position-right .minicolors-panel {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-position-bottom .minicolors-panel {
|
||||||
|
top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-position-left .minicolors-panel {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-with-opacity .minicolors-panel {
|
||||||
|
width: 194px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors .minicolors-grid {
|
||||||
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
left: 1px;
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
background: url(jquery.minicolors.png) -120px 0;
|
||||||
|
cursor: crosshair;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors .minicolors-grid-inner {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider-saturation .minicolors-grid {
|
||||||
|
background-position: -420px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider-saturation .minicolors-grid-inner {
|
||||||
|
background: url(jquery.minicolors.png) -270px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider-brightness .minicolors-grid {
|
||||||
|
background-position: -570px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider-brightness .minicolors-grid-inner {
|
||||||
|
background: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider-wheel .minicolors-grid {
|
||||||
|
background-position: -720px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider,
|
||||||
|
.minicolors-opacity-slider {
|
||||||
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
left: 152px;
|
||||||
|
width: 20px;
|
||||||
|
height: 150px;
|
||||||
|
background: white url(jquery.minicolors.png) 0 0;
|
||||||
|
cursor: row-resize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider-saturation .minicolors-slider {
|
||||||
|
background-position: -60px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider-brightness .minicolors-slider {
|
||||||
|
background-position: -20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-slider-wheel .minicolors-slider {
|
||||||
|
background-position: -20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-opacity-slider {
|
||||||
|
left: 173px;
|
||||||
|
background-position: -40px 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-with-opacity .minicolors-opacity-slider {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pickers */
|
||||||
|
.minicolors-grid .minicolors-picker {
|
||||||
|
position: absolute;
|
||||||
|
top: 70px;
|
||||||
|
left: 70px;
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
border: solid 1px black;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-top: -6px;
|
||||||
|
margin-left: -6px;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-grid .minicolors-picker > div {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: solid 2px white;
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
-webkit-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-picker {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 18px;
|
||||||
|
height: 2px;
|
||||||
|
background: white;
|
||||||
|
border: solid 1px black;
|
||||||
|
margin-top: -2px;
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
-webkit-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inline controls */
|
||||||
|
.minicolors-inline {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-inline .minicolors-input {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minicolors-inline .minicolors-panel {
|
||||||
|
position: relative;
|
||||||
|
top: auto;
|
||||||
|
left: auto;
|
||||||
|
box-shadow: none;
|
||||||
|
z-index: auto;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Default theme */
|
||||||
|
.minicolors-theme-default .minicolors-swatch {
|
||||||
|
top: 5px;
|
||||||
|
left: 5px;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
.minicolors-theme-default.minicolors-position-right .minicolors-swatch {
|
||||||
|
left: auto;
|
||||||
|
right: 5px;
|
||||||
|
}
|
||||||
|
.minicolors-theme-default.minicolors {
|
||||||
|
width: auto;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.minicolors-theme-default .minicolors-input {
|
||||||
|
height: 20px;
|
||||||
|
width: auto;
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 26px;
|
||||||
|
}
|
||||||
|
.minicolors-theme-default.minicolors-position-right .minicolors-input {
|
||||||
|
padding-right: 26px;
|
||||||
|
padding-left: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bootstrap theme */
|
||||||
|
.minicolors-theme-bootstrap .minicolors-swatch {
|
||||||
|
top: 3px;
|
||||||
|
left: 3px;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-swatch {
|
||||||
|
left: auto;
|
||||||
|
right: 3px;
|
||||||
|
}
|
||||||
|
.minicolors-theme-bootstrap .minicolors-input {
|
||||||
|
padding-left: 44px;
|
||||||
|
}
|
||||||
|
.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
|
||||||
|
padding-right: 44px;
|
||||||
|
padding-left: 12px;
|
||||||
|
}
|
||||||
8
dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.min.js
vendored
Normal file
8
dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.png
Normal file
BIN
dzz/pichome/js/mobile/plug/colorPicker/jquery.minicolors.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
7814
dzz/pichome/js/mobile/plug/vant/index.css
Normal file
7814
dzz/pichome/js/mobile/plug/vant/index.css
Normal file
File diff suppressed because one or more lines are too long
7
dzz/pichome/js/mobile/plug/vant/vant.min.js
vendored
Normal file
7
dzz/pichome/js/mobile/plug/vant/vant.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -194,40 +194,66 @@ var headerMethods = {
|
|||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.fname.indexOf(value) !== -1;
|
return data.fname.indexOf(value) !== -1;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleCheck(Node,data){//分类点击操作
|
handleCheck(Node,data){//分类点击操作
|
||||||
if(data.checkedKeys && data.checkedKeys.length){
|
var self = this;
|
||||||
|
var status = true;
|
||||||
|
|
||||||
|
if(data.checkedKeys.indexOf(Node.fid)>-1){
|
||||||
|
status = true;
|
||||||
|
}else{
|
||||||
|
status = false;
|
||||||
|
}
|
||||||
|
if(Node.children){
|
||||||
|
this.classify.childFids = [];
|
||||||
|
this.handleClassifyForEach(Node.children);
|
||||||
|
for(var f in this.classify.childFids){
|
||||||
|
self.$refs.tree[0].setChecked(this.classify.childFids[f],status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var itemNode = self.$refs.tree[0].getCheckedNodes();
|
||||||
|
var checkedFids = [];
|
||||||
|
var checkedTexts = [];
|
||||||
|
if(itemNode.length){
|
||||||
|
for(var i in itemNode){
|
||||||
|
checkedFids.push(itemNode[i].fid);
|
||||||
|
checkedTexts.push(itemNode[i].fname);
|
||||||
|
}
|
||||||
var str = {
|
var str = {
|
||||||
key:'classify',
|
key:'classify',
|
||||||
val:data.checkedKeys.join(',')
|
val:checkedFids.join(',')
|
||||||
};
|
};
|
||||||
var texts = [];
|
this.classify.text = checkedTexts.join(',');
|
||||||
for(var i in data.checkedNodes){
|
|
||||||
texts.push(data.checkedNodes[i].fname);
|
|
||||||
}
|
|
||||||
this.classify.text = texts.join(',');
|
|
||||||
VuexStore.commit('SetParams', str);
|
VuexStore.commit('SetParams', str);
|
||||||
VuexStore.dispatch('handleHash');
|
VuexStore.dispatch('handleHash');
|
||||||
}else{
|
}else{
|
||||||
this.handleClickDelete('classify');
|
this.handleClickDelete('classify');
|
||||||
}
|
}
|
||||||
|
if(data.checkedKeys.length && data.checkedKeys.indexOf(Node.fid)>-1){
|
||||||
// if(data.checkedKeys.length && data.checkedKeys.indexOf(Node.fid)>-1){
|
this.Addkeyword(this.GetAppid,Node.fname,2);
|
||||||
// this.Addkeyword(this.GetAppid,Node.fname,2);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
handleShowclassify(){//分类打开时设置默认选中项
|
handleClassifyForEach(item){//分类寻找子节点
|
||||||
var self = this;
|
for(var i in item){
|
||||||
if(this.GetParams.classify){
|
this.classify.childFids.push(item[i].fid);
|
||||||
self.$refs.tree[0].setCheckedKeys(this.GetParams.classify.split(','));
|
if(item[i].children){
|
||||||
|
this.handleClassifyForEach(item[i].children);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleShowafteclassify(){//分类打开时设置默认选中项
|
||||||
|
var self = this;
|
||||||
|
self.classify.loading=true
|
||||||
|
self.classify.DefaultFids = this.GetParams.classify.split(',');
|
||||||
var params = {};
|
var params = {};
|
||||||
if(this.GetAppid){
|
if(this.GetAppid){
|
||||||
params['appid'] = this.GetAppid;
|
params['appid'] = this.GetAppid;
|
||||||
}
|
}
|
||||||
jQuery.post(MOD_URL+'&op=ajax&operation=getsearchfolder',params,function(data){
|
jQuery.post(MOD_URL+'&op=ajax&operation=getsearchfolder',params,function(data){
|
||||||
self.classify.folderdatanum = data.folderdatanum;
|
self.classify.folderdatanum = data.folderdatanum;
|
||||||
|
self.classify.loading=false;
|
||||||
},'json')
|
},'json')
|
||||||
},
|
},
|
||||||
handlehotsearchnum(item){//分类点击历史搜索文字
|
handlehotsearchnum(item){//分类点击历史搜索文字
|
||||||
@@ -242,50 +268,6 @@ var headerMethods = {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// GetHashParams(){
|
|
||||||
// var arr = (location.hash || "").replace(/^\?/,'').split("&");
|
|
||||||
// var params = {};
|
|
||||||
// var appid = '';
|
|
||||||
// for(var i=0; i<arr.length; i++){
|
|
||||||
// var data = arr[i].split("=");
|
|
||||||
// if(data.length == 2){
|
|
||||||
// if(i==0){
|
|
||||||
// data[0]=data[0].replace("#","");
|
|
||||||
// }
|
|
||||||
// switch(data[0]){
|
|
||||||
// case 'keyword':
|
|
||||||
// this.keyword = decodeURI(data[1]);
|
|
||||||
// break;
|
|
||||||
// case 'appid':
|
|
||||||
// appid = data[1];
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if(appid){
|
|
||||||
// if(this.librarys && this.librarys.length){
|
|
||||||
// var appname = '全部库';
|
|
||||||
// for(var i in this.librarys){
|
|
||||||
// if(this.librarys[i].appid == appid){
|
|
||||||
// appname = this.librarys[i].appname;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// this.librarysName = appname;
|
|
||||||
// }else{
|
|
||||||
// this.librarysName = '全部库';
|
|
||||||
// }
|
|
||||||
// VuexStore.dispatch('GetHashParams');
|
|
||||||
// this.GetClassify(appid);
|
|
||||||
// }else{
|
|
||||||
// if(this.librarys && this.librarys.length == 1){
|
|
||||||
// VuexStore.commit('SetAppid',this.librarys[0].appid);
|
|
||||||
// this.GetClassify(this.librarys[0].appid);
|
|
||||||
// }
|
|
||||||
// this.librarysName = '全部库';
|
|
||||||
// VuexStore.dispatch('GetHashParams');
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
handleavatar(type) {//头像点击
|
handleavatar(type) {//头像点击
|
||||||
switch(type){
|
switch(type){
|
||||||
case 'personal':
|
case 'personal':
|
||||||
@@ -340,11 +322,6 @@ var headerMethods = {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleScreenTime(type,val){
|
handleScreenTime(type,val){
|
||||||
if(type=='btime'){
|
if(type=='btime'){
|
||||||
if(this.btime.btime == val){
|
if(this.btime.btime == val){
|
||||||
@@ -383,18 +360,30 @@ var headerMethods = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClickLeftTag(fid){//标签左侧点击
|
handleClickLeftTag(fid){//标签左侧点击
|
||||||
this.tagData.checkedsFid = fid;
|
var self = this;
|
||||||
|
if(this.tagData.checkedsFid == fid){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$('.scrollbarTag .el-scrollbar__wrap')[0].scrollTop = 0;
|
||||||
window.sessionStorage.setItem("tagfid",fid);
|
window.sessionStorage.setItem("tagfid",fid);
|
||||||
if(fid == 'all'){
|
this.tagData.checkedsFid = fid;
|
||||||
this.tagData.Rightdata = this.tagData.alltagdata.alltagdata;
|
this.tagData.alltagdata.catdata[fid].loading = true;
|
||||||
}else{
|
this.tagData.alltagdata.catdata[fid].finish = false;
|
||||||
if(this.tagData.alltagdata.catdata && this.tagData.alltagdata.catdata[fid]){
|
this.tagData.alltagdata.catdata[fid].page = 1;
|
||||||
this.tagData.Rightdata = this.tagData.alltagdata.catdata[fid].tdatas;
|
var data = this.GetScreenData('tag');
|
||||||
}else{
|
var alltagdata = data.alltagdata;
|
||||||
this.tagData.Rightdata = [];
|
var tagval = [];
|
||||||
|
for(var g in alltagdata){
|
||||||
|
tagval.push({
|
||||||
|
num:alltagdata[g].num,
|
||||||
|
tagname:alltagdata[g].tagname,
|
||||||
|
tid:parseInt(g),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
this.tagData.alltagdata.catdata[fid].tdatas = tagval;
|
||||||
|
this.tagData.alltagdata.catdata[fid].loading = false;
|
||||||
|
this.tagData.alltagdata.catdata[fid].finish = data.finish;
|
||||||
},
|
},
|
||||||
handleClickLeftlogic(value){//标签右侧逻辑点击
|
handleClickLeftlogic(value){//标签右侧逻辑点击
|
||||||
if(this.tagData.checkedsId.length){
|
if(this.tagData.checkedsId.length){
|
||||||
@@ -405,25 +394,25 @@ var headerMethods = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleClickRightTag(val){//标签右侧点击
|
handleClickRightTag(val){//标签右侧点击
|
||||||
if(this.tagData.checkedsId.length){
|
if(val.length){
|
||||||
var newVal = [];
|
var newVal = [];
|
||||||
var keyword = '';
|
var keyword = '';
|
||||||
var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.alltagdata));
|
var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.catdata[this.tagData.checkedsFid].tdatas));
|
||||||
for(var i in data){
|
for(var i in data){
|
||||||
var item = data[i];
|
var item = data[i];
|
||||||
if(this.tagData.checkedsId.indexOf(item.tid)>-1){
|
if(val.indexOf(item.tid)>-1){
|
||||||
newVal.push(item.tagname);
|
newVal.push(item.tagname);
|
||||||
}
|
}
|
||||||
if(val==data[i].tid){
|
if(val==data[i].tid){
|
||||||
keyword = item.tagname;
|
keyword = item.tagname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VuexStore.commit('SetParams',{key:'tag',val:this.tagData.checkedsId.join(',')});
|
VuexStore.commit('SetParams',{key:'tag',val:val.join(',')});
|
||||||
VuexStore.commit('SetParams',{key:'tagrelative',val:this.tagData.tagrelative});
|
VuexStore.commit('SetParams',{key:'tagrelative',val:this.tagData.tagrelative});
|
||||||
VuexStore.dispatch('handleHash');
|
VuexStore.dispatch('handleHash');
|
||||||
this.tagData.checkedstxt = newVal.join(',');
|
this.tagData.checkedstxt = newVal.join(',');
|
||||||
var self = this;
|
var self = this;
|
||||||
if(this.tagData.checkedsId.indexOf(val)>-1 && keyword){
|
if(val.indexOf(val)>-1 && keyword){
|
||||||
$.post(MOD_URL+'&op=ajax&operation=addsearch',{
|
$.post(MOD_URL+'&op=ajax&operation=addsearch',{
|
||||||
appid:self.GetAppid,
|
appid:self.GetAppid,
|
||||||
keyword:keyword,
|
keyword:keyword,
|
||||||
@@ -435,64 +424,81 @@ var headerMethods = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClickRightGroupTag(cid,tid){//标签右侧点击
|
handleClickRightGroupTag(cid,tid){//标签右侧点击
|
||||||
if(this.modelParamsTag[cid].data.length){
|
var findex = this.tagData.checkedsId.indexOf(tid);
|
||||||
|
if(findex>-1){
|
||||||
|
this.tagData.checkedsId.splice(findex,1);
|
||||||
|
}else{
|
||||||
|
this.tagData.checkedsId.push(tid);
|
||||||
|
}
|
||||||
|
if(this.modelParamsTag[cid].value.length){
|
||||||
var arr = [];
|
var arr = [];
|
||||||
var texts = [];
|
var texts = [];
|
||||||
for(var i in this.modelParamsTag){
|
for(var x in this.modelParamsTag[cid].data){
|
||||||
arr.push.apply(arr,this.modelParamsTag[i].data);
|
var val = this.modelParamsTag[cid].data[x];
|
||||||
}
|
if(this.modelParamsTag[cid].value.indexOf(val.tid)>-1){
|
||||||
for(var x in this.paramsTag[cid].oldVal){
|
|
||||||
var val = this.paramsTag[cid].oldVal[x];
|
|
||||||
if(this.modelParamsTag[cid].data.indexOf(val.tid)>-1){
|
|
||||||
texts.push(val.tagname);
|
texts.push(val.tagname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.modelParamsTag[cid].text = texts.join(',');
|
this.modelParamsTag[cid].text = texts.join(',');
|
||||||
VuexStore.commit('SetParams',{key:'tag',val:arr.join(',')});
|
VuexStore.commit('SetParams',{key:'tag',val:this.tagData.checkedsId.join(',')});
|
||||||
VuexStore.dispatch('handleHash');
|
VuexStore.dispatch('handleHash');
|
||||||
}else{
|
}else{
|
||||||
this.handleClickDelete('grouptag',cid);
|
this.handleClickDelete('grouptag',cid);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleRightTagSearch(val){//标签右侧搜索
|
handleRightTagSearch(val){//标签右侧搜索
|
||||||
var tagfid = window.sessionStorage.getItem("tagfid");
|
$('.scrollbarTag .el-scrollbar__wrap')[0].scrollTop = 0;
|
||||||
if(tagfid == 'all'){
|
var tagfid = this.tagData.checkedsFid;
|
||||||
var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.alltagdata));
|
this.tagData.alltagdata.catdata[tagfid].finish = false;
|
||||||
}else{
|
this.tagData.alltagdata.catdata[tagfid].page = 1;
|
||||||
if(this.tagData.alltagdata.catdata && this.tagData.alltagdata.catdata[tagfid]){
|
this.tagData.alltagdata.catdata[tagfid].loading = true;
|
||||||
var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.catdata[tagfid].tdatas));
|
var data = this.GetScreenData('tag');
|
||||||
}else{
|
|
||||||
var data = [];
|
var alltagdata = data.alltagdata;
|
||||||
}
|
var tagval = [];
|
||||||
}
|
for(var g in alltagdata){
|
||||||
if(val){
|
tagval.push({
|
||||||
var newObj = [];
|
num:alltagdata[g].num,
|
||||||
for(var i in data){
|
tagname:alltagdata[g].tagname,
|
||||||
var item = data[i];
|
tid:parseInt(g),
|
||||||
if(item.tagname.indexOf(val)>-1){
|
})
|
||||||
newObj.push(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.tagData.Rightdata = newObj;
|
|
||||||
}else{
|
|
||||||
this.tagData.Rightdata = data;
|
|
||||||
}
|
}
|
||||||
|
this.tagData.alltagdata.catdata[tagfid].finish = data.finish;
|
||||||
|
this.tagData.alltagdata.catdata[tagfid].tdatas = tagval;
|
||||||
|
this.tagData.alltagdata.catdata[tagfid].loading = false;
|
||||||
},
|
},
|
||||||
handleRightGroupTagSearch(cid){//标签右侧搜索
|
handleRightGroupTagSearch(cid,index){//标签组右侧搜索
|
||||||
var keyword = this.modelParamsTag[cid].search;
|
var keyword = this.modelParamsTag[cid].search;
|
||||||
var data = JSON.parse(JSON.stringify(this.paramsTag[cid].oldVal));
|
this.$refs['scrollbarTag'+cid][0].wrap.scrollTop = 0;
|
||||||
if(keyword){
|
this.modelParamsTag[cid].finish = false;
|
||||||
var newObj = [];
|
this.modelParamsTag[cid].page = 1;
|
||||||
for(var i in data){
|
this.modelParamsTag[cid].loading = true;
|
||||||
var item = data[i];
|
var data = this.GetScreenData('grouptag',cid);
|
||||||
if(item.tagname.indexOf(keyword)>-1){
|
var str = {
|
||||||
newObj.push(item);
|
index:index,
|
||||||
|
val:true
|
||||||
|
};
|
||||||
|
VuexStore.commit('SetParamsTagDataLoading',str);
|
||||||
|
this.modelParamsTag[cid].data = [];
|
||||||
|
var arr = [];index
|
||||||
|
var alltagdata = JSON.parse(JSON.stringify(data.alltagdata));
|
||||||
|
for(var g in alltagdata){
|
||||||
|
var tstr = {
|
||||||
|
num:alltagdata[g].num,
|
||||||
|
tagname:alltagdata[g].tagname,
|
||||||
|
tid:parseInt(g),
|
||||||
}
|
}
|
||||||
|
arr.push(tstr);
|
||||||
}
|
}
|
||||||
this.paramsTag[cid].newVal = newObj;
|
this.modelParamsTag[cid].data = arr;
|
||||||
}else{
|
this.modelParamsTag[cid].finish = data.finish;
|
||||||
this.paramsTag[cid].newVal = data;
|
this.modelParamsTag[cid].loading = false;
|
||||||
}
|
var str = {
|
||||||
|
index:index,
|
||||||
|
val:false
|
||||||
|
};
|
||||||
|
VuexStore.commit('SetParamsTagDataLoading',str);
|
||||||
|
|
||||||
},
|
},
|
||||||
handleLink(type){//链接改变
|
handleLink(type){//链接改变
|
||||||
if(type != this.link.link){
|
if(type != this.link.link){
|
||||||
@@ -596,49 +602,108 @@ var headerMethods = {
|
|||||||
VuexStore.commit('SetParams',{key:'dunit',val:value});
|
VuexStore.commit('SetParams',{key:'dunit',val:value});
|
||||||
VuexStore.dispatch('handleHash');
|
VuexStore.dispatch('handleHash');
|
||||||
},
|
},
|
||||||
handleShowPopover(type,cid){//弹窗显示
|
handleShowPopover(type,index){
|
||||||
if(type == 'grouptag'){
|
if(type == 'grouptag'){
|
||||||
|
var str = {
|
||||||
|
index:index,
|
||||||
|
val:true
|
||||||
|
};
|
||||||
|
VuexStore.commit('SetParamsTagDataLoading',str);
|
||||||
|
}else if(type == 'tag'){
|
||||||
|
this.tagData.loading = true;
|
||||||
|
}else{
|
||||||
|
this[type].loading = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
handleHideafterPopover(type){
|
||||||
|
if(type == 'tag'){
|
||||||
|
this.tagData.alltagdata.catdata = {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleShowafterPopover(type,cid,index,newdata){//弹窗显示
|
||||||
|
var self = this;
|
||||||
|
if(type == 'tag' && !$.isEmptyObject(this.tagData.alltagdata.catdata) && self.tagData.alltagdata.catdata[self.tagData.checkedsFid]){
|
||||||
|
self.tagData.alltagdata.catdata[self.tagData.checkedsFid].page = 1;
|
||||||
|
}
|
||||||
|
if(!newdata){
|
||||||
|
if(type == 'grouptag'){
|
||||||
|
self.modelParamsTag[cid].page = 1;
|
||||||
var data = this.GetScreenData(type,cid);
|
var data = this.GetScreenData(type,cid);
|
||||||
}else{
|
}else{
|
||||||
var data = this.GetScreenData(type);
|
var data = this.GetScreenData(type);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
var data = newdata;
|
||||||
|
}
|
||||||
|
if(!data){
|
||||||
|
if(this.$refs.ScreenPopoverRef && this.$refs.ScreenPopoverRef.length){
|
||||||
|
for(var s in this.$refs.ScreenPopoverRef){
|
||||||
|
if(this.$refs.ScreenPopoverRef[s].showPopper){
|
||||||
|
this.$refs.ScreenPopoverRef[s].showPopper = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$message.error('获取数据失败');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
switch(type){
|
switch(type){
|
||||||
case 'grouptag'://标签弹窗显示
|
case 'grouptag'://标签弹窗显示
|
||||||
if(this.paramsTag[cid]){
|
if(this.modelParamsTag[cid]){
|
||||||
this.paramsTag[cid] = [];
|
this.modelParamsTag[cid].data = [];
|
||||||
var arr = [];
|
var arr = [];
|
||||||
var arr1 = [];
|
var alltagdata = JSON.parse(JSON.stringify(data.alltagdata));
|
||||||
for(var i in data){
|
for(var g in alltagdata){
|
||||||
arr.push(data[i]);
|
var tstr = {
|
||||||
arr1.push(data[i]);
|
num:alltagdata[g].num,
|
||||||
|
tagname:alltagdata[g].tagname,
|
||||||
|
tid:parseInt(g),
|
||||||
}
|
}
|
||||||
this.paramsTag[cid].newVal = arr;
|
arr.push(tstr);
|
||||||
this.paramsTag[cid].oldVal = arr1;
|
}
|
||||||
|
this.modelParamsTag[cid].data = arr;
|
||||||
|
this.modelParamsTag[cid].finish = data.finish;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'tag'://标签弹窗显示
|
case 'tag'://标签弹窗显示
|
||||||
var alltagdata = JSON.parse(JSON.stringify(data.alltagdata));
|
var alltagdata = JSON.parse(JSON.stringify(data.alltagdata));
|
||||||
var catdata = JSON.parse(JSON.stringify(data.catdata));
|
var catdata = JSON.parse(JSON.stringify(data.catdata));
|
||||||
this.tagData.alltagdata = {
|
var fcatdata = {};
|
||||||
alltagdata:alltagdata,
|
var tagval = [];
|
||||||
catdata:catdata
|
for(var g in alltagdata){
|
||||||
|
tagval.push({
|
||||||
|
num:alltagdata[g].num,
|
||||||
|
tagname:alltagdata[g].tagname,
|
||||||
|
tid:parseInt(g),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fcatdata['all'] = {
|
||||||
|
catname:'全部',
|
||||||
|
num :'',
|
||||||
|
page:1,
|
||||||
|
loading:true,
|
||||||
|
valloading:false,
|
||||||
|
finish:self.tagData.checkedsFid == 'all'?data.finish:false,
|
||||||
|
tdatas:self.tagData.checkedsFid == 'all'?tagval:[],
|
||||||
};
|
};
|
||||||
if(this.GetAppid){
|
if(catdata){
|
||||||
var tagfid = window.sessionStorage.getItem("tagfid");
|
for(var t in catdata){
|
||||||
if(tagfid){
|
fcatdata[catdata[t].cid]= {
|
||||||
if(tagfid == 'all'){
|
catname:catdata[t].catname,
|
||||||
this.tagData.Rightdata = alltagdata;
|
num :catdata[t].num,
|
||||||
}else{
|
page:1,
|
||||||
if(catdata && catdata[tagfid]){
|
loading:true,
|
||||||
this.tagData.Rightdata = catdata[tagfid].tdatas;
|
valloading:false,
|
||||||
}else{
|
finish:self.tagData.checkedsFid == catdata[t].cid?data.finish:false,
|
||||||
this.tagData.Rightdata = [];
|
tdatas: self.tagData.checkedsFid == catdata[t].cid?tagval:[],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.GetScreenDatanum();
|
||||||
}
|
}
|
||||||
}else{
|
this.tagData.alltagdata.catdata = fcatdata;
|
||||||
this.tagData.Rightdata = alltagdata;
|
self.tagData.alltagdata.catdata[self.tagData.checkedsFid].loading = false;
|
||||||
}
|
this.handleScrollbarTag();
|
||||||
break;
|
break;
|
||||||
case 'ext'://类型弹窗显示
|
case 'ext'://类型弹窗显示
|
||||||
if(data){
|
if(data){
|
||||||
@@ -696,6 +761,73 @@ var headerMethods = {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if(!newdata){
|
||||||
|
if(type == 'grouptag'){
|
||||||
|
var str = {
|
||||||
|
index:index,
|
||||||
|
val:false
|
||||||
|
};
|
||||||
|
VuexStore.commit('SetParamsTagDataLoading',str);
|
||||||
|
this.handleScrollbarTag(cid);
|
||||||
|
}else if(type == 'tag'){
|
||||||
|
this.tagData.loading = false;
|
||||||
|
}else{
|
||||||
|
this[type].loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
handleScrollbarTag(cid){
|
||||||
|
var self = this;
|
||||||
|
if(cid){
|
||||||
|
$(this.$refs['scrollbarTag'+cid][0].wrap).unbind('scroll');
|
||||||
|
$(this.$refs['scrollbarTag'+cid][0].wrap).bind('scroll',function(){
|
||||||
|
var loading = self.modelParamsTag[cid].loading;
|
||||||
|
var finish = self.modelParamsTag[cid].finish;
|
||||||
|
if(!finish && !loading && this.scrollHeight-100 < $(this).scrollTop()+this.clientHeight){
|
||||||
|
self.modelParamsTag[cid].loading = true;
|
||||||
|
self.modelParamsTag[cid].page += 1;
|
||||||
|
var json = self.GetScreenData('grouptag',cid);
|
||||||
|
var alltagdata = JSON.parse(JSON.stringify(json.alltagdata));
|
||||||
|
for(var g in alltagdata){
|
||||||
|
self.modelParamsTag[cid].data.push({
|
||||||
|
num:alltagdata[g].num,
|
||||||
|
tagname:alltagdata[g].tagname,
|
||||||
|
tid:parseInt(g),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
self.modelParamsTag[cid].loading = false;
|
||||||
|
self.modelParamsTag[cid].finish = json.finish;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
if(this.$refs.scrollbarTag && this.$refs.scrollbarTag.length){
|
||||||
|
$('.scrollbarTag .el-scrollbar__wrap')[0].scrollTop = 0;
|
||||||
|
$('.scrollbarTag .el-scrollbar__wrap').unbind('scroll');
|
||||||
|
$('.scrollbarTag .el-scrollbar__wrap').bind('scroll',function(){
|
||||||
|
var valloading = self.tagData.alltagdata.catdata[self.tagData.checkedsFid].valloading;
|
||||||
|
var finish = self.tagData.alltagdata.catdata[self.tagData.checkedsFid].finish;
|
||||||
|
if(!finish && !valloading && this.scrollHeight-100 < $(this).scrollTop()+this.clientHeight){
|
||||||
|
self.tagData.alltagdata.catdata[self.tagData.checkedsFid].valloading = true;
|
||||||
|
self.tagData.alltagdata.catdata[self.tagData.checkedsFid].page += 1;
|
||||||
|
var json = self.GetScreenData('tag');
|
||||||
|
var alltagdata = JSON.parse(JSON.stringify(json.alltagdata));
|
||||||
|
for(var g in alltagdata){
|
||||||
|
self.tagData.alltagdata.catdata[self.tagData.checkedsFid].tdatas.push({
|
||||||
|
num:alltagdata[g].num,
|
||||||
|
tagname:alltagdata[g].tagname,
|
||||||
|
tid:parseInt(g),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
self.tagData.alltagdata.catdata[self.tagData.checkedsFid].valloading = false;
|
||||||
|
self.tagData.alltagdata.catdata[self.tagData.checkedsFid].finish = json.finish;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handleClickDelete(type,cid){//清除标签选项
|
handleClickDelete(type,cid){//清除标签选项
|
||||||
var self = this;
|
var self = this;
|
||||||
@@ -715,7 +847,9 @@ var headerMethods = {
|
|||||||
}
|
}
|
||||||
if(this.classify.text){
|
if(this.classify.text){
|
||||||
this.classify.text = '';
|
this.classify.text = '';
|
||||||
this.$refs.tree[0].setCheckedKeys([])
|
if(this.$refs.tree && this.$refs.tree.length){
|
||||||
|
this.$refs.tree[0].setCheckedKeys([]);
|
||||||
|
}
|
||||||
VuexStore.commit('SetParams',{key:'classify',val:''});
|
VuexStore.commit('SetParams',{key:'classify',val:''});
|
||||||
}
|
}
|
||||||
if(this.colors.color){
|
if(this.colors.color){
|
||||||
@@ -774,6 +908,7 @@ var headerMethods = {
|
|||||||
val:[],
|
val:[],
|
||||||
height:this.ext.height,
|
height:this.ext.height,
|
||||||
data:this.ext.data,
|
data:this.ext.data,
|
||||||
|
loading:true
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'ext',val:''});
|
VuexStore.commit('SetParams',{key:'ext',val:''});
|
||||||
}
|
}
|
||||||
@@ -784,7 +919,8 @@ var headerMethods = {
|
|||||||
width:this.shape.width,
|
width:this.shape.width,
|
||||||
height:this.shape.height,
|
height:this.shape.height,
|
||||||
txt:'',
|
txt:'',
|
||||||
data:this.shape.data
|
data:this.shape.data,
|
||||||
|
loading:true
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'shape',val:''});
|
VuexStore.commit('SetParams',{key:'shape',val:''});
|
||||||
VuexStore.commit('SetParams',{key:'shapesize',val:''});
|
VuexStore.commit('SetParams',{key:'shapesize',val:''});
|
||||||
@@ -794,6 +930,7 @@ var headerMethods = {
|
|||||||
this.grade = {
|
this.grade = {
|
||||||
grade:[],
|
grade:[],
|
||||||
data:this.grade.data,
|
data:this.grade.data,
|
||||||
|
loading:true
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'grade',val:''});
|
VuexStore.commit('SetParams',{key:'grade',val:''});
|
||||||
}
|
}
|
||||||
@@ -802,7 +939,8 @@ var headerMethods = {
|
|||||||
this.btime = {
|
this.btime = {
|
||||||
btime:'',
|
btime:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:this.btime.data
|
data:this.btime.data,
|
||||||
|
loading:true
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'btime',val:''});
|
VuexStore.commit('SetParams',{key:'btime',val:''});
|
||||||
}
|
}
|
||||||
@@ -811,7 +949,8 @@ var headerMethods = {
|
|||||||
this.dateline = {
|
this.dateline = {
|
||||||
dateline:'',
|
dateline:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:this.dateline.data
|
data:this.dateline.data,
|
||||||
|
loading:true
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'dateline',val:''});
|
VuexStore.commit('SetParams',{key:'dateline',val:''});
|
||||||
}
|
}
|
||||||
@@ -820,7 +959,8 @@ var headerMethods = {
|
|||||||
this.mtime = {
|
this.mtime = {
|
||||||
mtime:'',
|
mtime:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:this.mtime.data
|
data:this.mtime.data,
|
||||||
|
loading:true
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'mtime',val:''});
|
VuexStore.commit('SetParams',{key:'mtime',val:''});
|
||||||
}
|
}
|
||||||
@@ -832,26 +972,22 @@ var headerMethods = {
|
|||||||
this.tagData.tagrelative = '1';
|
this.tagData.tagrelative = '1';
|
||||||
VuexStore.commit('SetParams',{key:'tag',val:''});
|
VuexStore.commit('SetParams',{key:'tag',val:''});
|
||||||
VuexStore.commit('SetParams',{key:'tagrelative',val:''});
|
VuexStore.commit('SetParams',{key:'tagrelative',val:''});
|
||||||
if(this.tagData.checkedsFid == 'all'){
|
// if(this.tagData.checkedsFid == 'all'){
|
||||||
var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.alltagdata));
|
// var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.alltagdata));
|
||||||
this.tagData.Rightdata = data;
|
// this.tagData.Rightdata = data;
|
||||||
}else{
|
// }else{
|
||||||
var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.catdata[this.tagData.checkedsFid].tdatas));
|
// var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.catdata[this.tagData.checkedsFid].tdatas));
|
||||||
|
|
||||||
this.tagData.Rightdata = data;
|
// this.tagData.Rightdata = data;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(!$.isEmptyObject(this.modelParamsTag)){
|
if(!$.isEmptyObject(this.modelParamsTag)){
|
||||||
for(var t in this.modelParamsTag){
|
for(var t in this.modelParamsTag){
|
||||||
this.modelParamsTag[t] = {
|
this.modelParamsTag[t].search = '';
|
||||||
search:'',
|
this.modelParamsTag[t].text = '';
|
||||||
text:'',
|
this.modelParamsTag[t].value = [];
|
||||||
data:[]
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
var fata = JSON.parse(JSON.stringify(this.paramsTag[t].oldVal));
|
this.tagData.checkedsId = [];
|
||||||
this.paramsTag[t].newVal = fata;
|
|
||||||
VuexStore.commit('SetParams',{key:'tag',val:''});
|
VuexStore.commit('SetParams',{key:'tag',val:''});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -871,13 +1007,13 @@ var headerMethods = {
|
|||||||
VuexStore.commit('SetParams',{key:'tag',val:''});
|
VuexStore.commit('SetParams',{key:'tag',val:''});
|
||||||
VuexStore.commit('SetParams',{key:'tagrelative',val:''});
|
VuexStore.commit('SetParams',{key:'tagrelative',val:''});
|
||||||
|
|
||||||
if(this.tagData.checkedsFid == 'all'){
|
// if(this.tagData.checkedsFid == 'all'){
|
||||||
var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.alltagdata));
|
// var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.alltagdata));
|
||||||
this.tagData.Rightdata = data;
|
// this.tagData.Rightdata = data;
|
||||||
}else{
|
// }else{
|
||||||
var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.catdata[this.tagData.checkedsFid].tdatas));
|
// var data = JSON.parse(JSON.stringify(this.tagData.alltagdata.catdata[this.tagData.checkedsFid].tdatas));
|
||||||
this.tagData.Rightdata = data;
|
// this.tagData.Rightdata = data;
|
||||||
}
|
// }
|
||||||
break;
|
break;
|
||||||
case 'color':
|
case 'color':
|
||||||
var colors = {
|
var colors = {
|
||||||
@@ -890,7 +1026,10 @@ var headerMethods = {
|
|||||||
break;
|
break;
|
||||||
case 'classify':
|
case 'classify':
|
||||||
this.classify.text = '';
|
this.classify.text = '';
|
||||||
this.$refs.tree[0].setCheckedKeys([])
|
if(this.$refs.tree && this.$refs.tree.length){
|
||||||
|
this.$refs.tree[0].setCheckedKeys([]);
|
||||||
|
}
|
||||||
|
|
||||||
VuexStore.commit('SetParams',{key:'classify',val:''});
|
VuexStore.commit('SetParams',{key:'classify',val:''});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -935,7 +1074,8 @@ var headerMethods = {
|
|||||||
this.ext = {
|
this.ext = {
|
||||||
val:[],
|
val:[],
|
||||||
height:this.ext.height,
|
height:this.ext.height,
|
||||||
data:this.ext.data
|
data:this.ext.data,
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'ext',val:''});
|
VuexStore.commit('SetParams',{key:'ext',val:''});
|
||||||
break;
|
break;
|
||||||
@@ -945,7 +1085,8 @@ var headerMethods = {
|
|||||||
width:this.shape.width,
|
width:this.shape.width,
|
||||||
height:this.shape.height,
|
height:this.shape.height,
|
||||||
txt:'',
|
txt:'',
|
||||||
data:this.shape.data
|
data:this.shape.data,
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'shape',val:''});
|
VuexStore.commit('SetParams',{key:'shape',val:''});
|
||||||
VuexStore.commit('SetParams',{key:'shapesize',val:''});
|
VuexStore.commit('SetParams',{key:'shapesize',val:''});
|
||||||
@@ -953,7 +1094,8 @@ var headerMethods = {
|
|||||||
case 'grade':
|
case 'grade':
|
||||||
this.grade = {
|
this.grade = {
|
||||||
grade:[],
|
grade:[],
|
||||||
data:this.grade.data
|
data:this.grade.data,
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'grade',val:''});
|
VuexStore.commit('SetParams',{key:'grade',val:''});
|
||||||
break;
|
break;
|
||||||
@@ -961,7 +1103,8 @@ var headerMethods = {
|
|||||||
this.btime = {
|
this.btime = {
|
||||||
btime:'',
|
btime:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:this.btime.data
|
data:this.btime.data,
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'btime',val:''});
|
VuexStore.commit('SetParams',{key:'btime',val:''});
|
||||||
break;
|
break;
|
||||||
@@ -969,7 +1112,8 @@ var headerMethods = {
|
|||||||
this.mtime = {
|
this.mtime = {
|
||||||
mtime:'',
|
mtime:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:this.mtime.data
|
data:this.mtime.data,
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'mtime',val:''});
|
VuexStore.commit('SetParams',{key:'mtime',val:''});
|
||||||
break;
|
break;
|
||||||
@@ -977,7 +1121,8 @@ var headerMethods = {
|
|||||||
this.dateline = {
|
this.dateline = {
|
||||||
dateline:'',
|
dateline:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:this.dateline.data
|
data:this.dateline.data,
|
||||||
|
loading:false
|
||||||
};
|
};
|
||||||
VuexStore.commit('SetParams',{key:'dateline',val:''});
|
VuexStore.commit('SetParams',{key:'dateline',val:''});
|
||||||
break;
|
break;
|
||||||
@@ -985,17 +1130,13 @@ var headerMethods = {
|
|||||||
var tags = [];
|
var tags = [];
|
||||||
for(var t in this.modelParamsTag){
|
for(var t in this.modelParamsTag){
|
||||||
if(t!=cid){
|
if(t!=cid){
|
||||||
tags.push.apply(tags,this.modelParamsTag[t].data);
|
tags.push.apply(tags,this.modelParamsTag[t].value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VuexStore.commit('SetParams',{key:'tag',val:tags.join(',')});
|
VuexStore.commit('SetParams',{key:'tag',val:tags.join(',')});
|
||||||
this.modelParamsTag[cid] = {
|
this.modelParamsTag[cid].search = '';
|
||||||
search:'',
|
this.modelParamsTag[cid].text = '';
|
||||||
text:'',
|
this.modelParamsTag[cid].value = [];
|
||||||
data:[]
|
|
||||||
};
|
|
||||||
var fata = JSON.parse(JSON.stringify(this.paramsTag[cid].oldVal));
|
|
||||||
this.paramsTag[cid].newVal = fata;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1016,8 +1157,29 @@ var headerMethods = {
|
|||||||
var str = {
|
var str = {
|
||||||
skey:type
|
skey:type
|
||||||
};
|
};
|
||||||
|
|
||||||
if(type == 'grouptag'){
|
if(type == 'grouptag'){
|
||||||
|
str['skey']='tag';
|
||||||
str['cid']=cid;
|
str['cid']=cid;
|
||||||
|
str['page'] = self.modelParamsTag[cid].page;
|
||||||
|
|
||||||
|
if(self.modelParamsTag[cid].search){
|
||||||
|
str['tagkeyword'] = self.modelParamsTag[cid].search;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(type == 'tag'){
|
||||||
|
if(self.tagData.checkedsFid == 'all'){
|
||||||
|
str['cid'] =0;
|
||||||
|
}else{
|
||||||
|
str['cid'] = self.tagData.checkedsFid;
|
||||||
|
}
|
||||||
|
if(self.tagData.alltagdata.catdata[self.tagData.checkedsFid]){
|
||||||
|
str['page'] = self.tagData.alltagdata.catdata[self.tagData.checkedsFid].page;
|
||||||
|
}
|
||||||
|
if(self.tagData.search){
|
||||||
|
str['tagkeyword'] = self.tagData.search;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(this.GetAppid){
|
if(this.GetAppid){
|
||||||
str['appid'] = this.GetAppid;
|
str['appid'] = this.GetAppid;
|
||||||
@@ -1076,24 +1238,116 @@ var headerMethods = {
|
|||||||
var vtag = [];
|
var vtag = [];
|
||||||
for(var t in this.modelParamsTag){
|
for(var t in this.modelParamsTag){
|
||||||
if(t!=cid){
|
if(t!=cid){
|
||||||
vtag.push.apply(vtag,this.modelParamsTag[t].data);
|
vtag.push.apply(vtag,this.modelParamsTag[t].value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(vtag.length){
|
if(vtag.length){
|
||||||
str['tag'] = vtag.join(',');
|
str['tag'] = vtag.join(',');
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : MOD_URL+'&op=ajax&operation=searchmenu_num',
|
'url' : MOD_URL+'&op=ajax&operation=searchmenu_num',
|
||||||
type : "post",
|
'type' : "post",
|
||||||
data : str,
|
'data' : str,
|
||||||
async : false,
|
'async' : false,
|
||||||
dataType: "json",
|
'dataType': "json",
|
||||||
success : function(data) {
|
'success' : function(data) {
|
||||||
param = data;
|
param = data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return param;
|
return param;
|
||||||
},
|
},
|
||||||
|
GetScreenDatanum(){
|
||||||
|
var self = this;
|
||||||
|
var type = 'tag';
|
||||||
|
var str = {
|
||||||
|
skey:'tag'
|
||||||
|
};
|
||||||
|
|
||||||
|
if(this.GetAppid){
|
||||||
|
str['appid'] = this.GetAppid;
|
||||||
|
}
|
||||||
|
if(this.GetimgParameter && this.GetimgParameter.keyword){
|
||||||
|
str['keyword'] = this.GetimgParameter.keyword;
|
||||||
|
}
|
||||||
|
var Params = this.GetParams;
|
||||||
|
for(var p in Params){
|
||||||
|
if(p==type){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(type == 'shape' && p =='shapesize'){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(Params[p]){
|
||||||
|
if(p=='classify'){
|
||||||
|
str['fids'] = Params[p];
|
||||||
|
}else if(p=='grade'){
|
||||||
|
if(Params[p].indexOf('未评分')>-1){
|
||||||
|
var farr = Params[p].split(',');
|
||||||
|
if(farr.length){
|
||||||
|
farr.splice(farr.indexOf('未评分'),1);
|
||||||
|
}
|
||||||
|
farr.push(0);
|
||||||
|
str[p] = farr.join(',');
|
||||||
|
}else{
|
||||||
|
str[p] = Params[p];
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if(p=='shape'){
|
||||||
|
var shape = [];
|
||||||
|
var fshape = Params[p].split(',');
|
||||||
|
var shapeData = this.shapeData;
|
||||||
|
for(var s in fshape){
|
||||||
|
for(var b in shapeData){
|
||||||
|
if(fshape[s] == shapeData[b].name){
|
||||||
|
shape.push(shapeData[b].val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
str[p] = shape.join(',');
|
||||||
|
}else if(p=='btime' || p=='mtime' || p=='dateline'){
|
||||||
|
var len = Params[p].split('_');
|
||||||
|
if(len.length>1){
|
||||||
|
str[p] = Params[p];
|
||||||
|
}else{
|
||||||
|
str[p] = GetDateVal(Params[p]);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
str[p] = Params[p];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
var vtag = [];
|
||||||
|
for(var t in this.modelParamsTag){
|
||||||
|
if(t!=cid){
|
||||||
|
vtag.push.apply(vtag,this.modelParamsTag[t].value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(vtag.length){
|
||||||
|
str['tag'] = vtag.join(',');
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
'url' : MOD_URL+'&op=ajax&operation=search_menu',
|
||||||
|
'type' : "post",
|
||||||
|
'data' : str,
|
||||||
|
'dataType': "json",
|
||||||
|
'success' : function(data) {
|
||||||
|
if(data.catdata){
|
||||||
|
var catdata = data.catdata;
|
||||||
|
for(var g in catdata){
|
||||||
|
var item = catdata[g];
|
||||||
|
if(parseInt(item.cid) == 0){
|
||||||
|
self.tagData.alltagdata.catdata['all']['num'] = item.num;
|
||||||
|
}else if(parseInt(item.cid) == -1){
|
||||||
|
self.tagData.alltagdata.catdata[-1]['num'] = item.num;
|
||||||
|
}else{
|
||||||
|
self.tagData.alltagdata.catdata[item.cid]['num'] = item.num;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
GetHashParams(){
|
GetHashParams(){
|
||||||
var arr = (location.hash || "").replace(/^\?/,'').split("&");
|
var arr = (location.hash || "").replace(/^\?/,'').split("&");
|
||||||
var params = {};
|
var params = {};
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ var headerWatch = {
|
|||||||
self.$refs.tree[0].filter(val);
|
self.$refs.tree[0].filter(val);
|
||||||
},
|
},
|
||||||
ParamsTagData(val){
|
ParamsTagData(val){
|
||||||
var str = {};
|
|
||||||
var fstr = {};
|
var fstr = {};
|
||||||
var str1 = {};
|
var str1 = {};
|
||||||
if(this.GetParamsInit.tag.length){
|
if(this.GetParamsInit.tag.length){
|
||||||
@@ -12,12 +11,16 @@ var headerWatch = {
|
|||||||
var p = this.GetParamsInit.tag[x];
|
var p = this.GetParamsInit.tag[x];
|
||||||
if(fstr[p.cid]){
|
if(fstr[p.cid]){
|
||||||
fstr[p.cid].text.push(p.tagname);
|
fstr[p.cid].text.push(p.tagname);
|
||||||
fstr[p.cid].data.push(p.tid);
|
fstr[p.cid].value.push(p.tid);
|
||||||
}else{
|
}else{
|
||||||
fstr[p.cid] = {
|
fstr[p.cid] = {
|
||||||
search:'',
|
search:'',
|
||||||
text:[p.tagname],
|
text:[p.tagname],
|
||||||
data:[p.tid]
|
data:[],
|
||||||
|
value:[p.tid],
|
||||||
|
page:1,
|
||||||
|
finish:false,
|
||||||
|
loading:false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -25,10 +28,6 @@ var headerWatch = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(var i in val){
|
for(var i in val){
|
||||||
str[val[i].cid] = {
|
|
||||||
newVal:[],
|
|
||||||
oldVal:[]
|
|
||||||
};
|
|
||||||
if(fstr[val[i].cid]){
|
if(fstr[val[i].cid]){
|
||||||
fstr[val[i].cid].text = fstr[val[i].cid].text.join(',');
|
fstr[val[i].cid].text = fstr[val[i].cid].text.join(',');
|
||||||
str1[val[i].cid] = fstr[val[i].cid];
|
str1[val[i].cid] = fstr[val[i].cid];
|
||||||
@@ -37,13 +36,16 @@ var headerWatch = {
|
|||||||
search:'',
|
search:'',
|
||||||
text:'',
|
text:'',
|
||||||
data:[],
|
data:[],
|
||||||
|
page:1,
|
||||||
|
finish:false,
|
||||||
|
loading:false,
|
||||||
|
value:[],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
this.modelParamsTag = str1;
|
this.modelParamsTag = str1;
|
||||||
this.paramsTag = str;
|
|
||||||
},
|
},
|
||||||
GetParamsInit:{
|
GetParamsInit:{
|
||||||
handler(item){
|
handler(item){
|
||||||
|
|||||||
197
dzz/pichome/js/pc/row-grid.js
Normal file
197
dzz/pichome/js/pc/row-grid.js
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
var ImgRowGrid = {
|
||||||
|
ImgRowGridInit(type){
|
||||||
|
var self = this;
|
||||||
|
if(type == 'append') {
|
||||||
|
self.ImgRowGridCompute(type);
|
||||||
|
}else if(type == 'refresh'){
|
||||||
|
|
||||||
|
self.ImgRowGridCompute();
|
||||||
|
}else{
|
||||||
|
self.ImgRowGridCompute();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ImgRowGridCompute(type){
|
||||||
|
var self = this;
|
||||||
|
var Margin = self.RowgridParam.Margin
|
||||||
|
if(type == 'append'){
|
||||||
|
// self.RowgridParam.perpage += self.GetimgParameter.perpage;
|
||||||
|
}else{
|
||||||
|
self.RowgridParam.maxNewtop = 0;
|
||||||
|
self.RowgridParam.maxNewLeft = 0;
|
||||||
|
self.RowgridParam.rowElems = [];
|
||||||
|
self.RowgridParam.rowWidth = 0;
|
||||||
|
self.RowgridParam.perpage = 0;
|
||||||
|
self.SurplusImgdatas = [];
|
||||||
|
var OtherHeight = 0
|
||||||
|
if(self.InformationShow.indexOf('name')>-1 || self.InformationShow.indexOf('extension')>-1){
|
||||||
|
OtherHeight += 45;
|
||||||
|
}
|
||||||
|
if(self.InformationShow.indexOf('other')>-1){
|
||||||
|
OtherHeight += 20;
|
||||||
|
}
|
||||||
|
self.RowgridParam.OtherHeight = OtherHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
var arr = {};
|
||||||
|
if(Object.keys(self.SurplusImgdatas).length){
|
||||||
|
for(var s in self.SurplusImgdatas){
|
||||||
|
arr[s] = JSON.parse(JSON.stringify(self.SurplusImgdatas[s]));
|
||||||
|
}
|
||||||
|
self.RowgridParam.rowWidth = 0;
|
||||||
|
self.RowgridParam.rowElems = [];
|
||||||
|
self.RowgridParam.maxNewLeft = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = self.RowgridParam.perpage; i < self.imgdatas.length; ++i) {
|
||||||
|
var str = JSON.parse(JSON.stringify(self.imgdatas[i]));
|
||||||
|
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 containerWidth = $('.rowGrids-box').width();
|
||||||
|
|
||||||
|
|
||||||
|
var count = Object.keys(arr).length-Object.keys(self.SurplusImgdatas).length;
|
||||||
|
|
||||||
|
self.RowgridParam.perpage += count;
|
||||||
|
for(var index in arr){
|
||||||
|
var item = arr[index];
|
||||||
|
self.RowgridParam.rowWidth += item['pwidth'];
|
||||||
|
self.RowgridParam.rowElems.push(index);
|
||||||
|
var fdiiff = self.RowgridParam.rowWidth + Margin * (self.RowgridParam.rowElems.length - 1);
|
||||||
|
var diff = fdiiff - containerWidth;//多出来的宽度
|
||||||
|
var nrOfElems = self.RowgridParam.rowElems.length;//一行的个数
|
||||||
|
if (fdiiff > containerWidth){
|
||||||
|
var widthDiff = 0,maxNewHeight = 0;
|
||||||
|
for(var rowElemIndex in self.RowgridParam.rowElems){
|
||||||
|
var rid = self.RowgridParam.rowElems[rowElemIndex];
|
||||||
|
// if(arr[rid]){
|
||||||
|
var rowElemWidth = arr[rid]['pwidth'];//获取一行每个都宽度
|
||||||
|
var rowElemHeight = arr[rid]['pheight'];//获取一行每个都宽度
|
||||||
|
// }else{
|
||||||
|
|
||||||
|
// var rowElemWidth = self.SurplusImgdatas[rid]['pwidth'];//获取一行每个都宽度
|
||||||
|
// var rowElemHeight = self.SurplusImgdatas[rid]['pheight'];//获取一行每个都宽度
|
||||||
|
// }
|
||||||
|
var newWidth = rowElemWidth - (rowElemWidth / self.RowgridParam.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'] = self.RowgridParam.maxNewtop;
|
||||||
|
arr[rid]['pbottom'] = self.RowgridParam.maxNewtop+maxNewHeight+self.RowgridParam.OtherHeight;
|
||||||
|
if(rowElemIndex > 0){
|
||||||
|
arr[rid]['pleft'] = self.RowgridParam.maxNewLeft;
|
||||||
|
}else{
|
||||||
|
arr[rid]['pleft'] = 0;
|
||||||
|
}
|
||||||
|
self.RowgridParam.maxNewLeft += newWidth + Margin;
|
||||||
|
|
||||||
|
}
|
||||||
|
for(var frowElemIndex in self.RowgridParam.rowElems){
|
||||||
|
var rowElem = self.RowgridParam.rowElems[frowElemIndex];
|
||||||
|
var height = arr[rowElem]['pheight'];//获取一行每个都宽度
|
||||||
|
if(height<maxNewHeight){
|
||||||
|
// arr[rowElem]['pbottom'] = self.RowgridParam.maxNewtop+maxNewHeight+self.RowgridParam.OtherHeight;
|
||||||
|
arr[rowElem]['pbottom'] += maxNewHeight-height;
|
||||||
|
arr[rowElem]['pheight'] = maxNewHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.RowgridParam.maxNewtop += maxNewHeight + Margin +self.RowgridParam.OtherHeight
|
||||||
|
self.RowgridParam.rowElems = [];
|
||||||
|
self.RowgridParam.rowWidth = 0;
|
||||||
|
self.RowgridParam.maxNewLeft = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
var surplusheight = 0;
|
||||||
|
self.SurplusImgdatas = {};
|
||||||
|
if (self.RowgridParam.rowElems.length) {
|
||||||
|
var maxNewHeight = 0;
|
||||||
|
for(var f in self.RowgridParam.rowElems){
|
||||||
|
var rowElem = self.RowgridParam.rowElems[f];
|
||||||
|
var rowElemWidth = arr[rowElem].pwidth;//获取一行每个都宽度
|
||||||
|
var rowElemHeight = arr[rowElem].pheight;//获取一行每个都宽度
|
||||||
|
arr[rowElem]['pwidth'] = rowElemWidth;
|
||||||
|
arr[rowElem]['pheight'] = rowElemHeight;
|
||||||
|
arr[rowElem]['ptop'] = self.RowgridParam.maxNewtop;
|
||||||
|
arr[rowElem]['pbottom'] = self.RowgridParam.maxNewtop+rowElemHeight+self.RowgridParam.OtherHeight;
|
||||||
|
if (rowElemHeight > maxNewHeight){
|
||||||
|
maxNewHeight = rowElemHeight;
|
||||||
|
}
|
||||||
|
if(f > 0){
|
||||||
|
arr[rowElem]['pleft'] = self.RowgridParam.maxNewLeft;
|
||||||
|
}else{
|
||||||
|
arr[rowElem]['pleft'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.RowgridParam.maxNewLeft += rowElemWidth + Margin;
|
||||||
|
}
|
||||||
|
for(var ff in self.RowgridParam.rowElems){
|
||||||
|
var rowElem = self.RowgridParam.rowElems[ff];
|
||||||
|
var height = arr[rowElem]['pheight'];//获取一行每个都宽度
|
||||||
|
if(height<maxNewHeight){
|
||||||
|
arr[rowElem]['pbottom'] += maxNewHeight-height;
|
||||||
|
arr[rowElem]['pheight'] = maxNewHeight;
|
||||||
|
}
|
||||||
|
self.SurplusImgdatas[rowElem] = arr[rowElem];
|
||||||
|
}
|
||||||
|
surplusheight = maxNewHeight+self.RowgridParam.OtherHeight+Margin;
|
||||||
|
self.RowgridParam.maxNewLeft = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.rowGrids-box').height(self.RowgridParam.maxNewtop+40+surplusheight);
|
||||||
|
if(self.GetScrollAppend){
|
||||||
|
for(var st in arr){
|
||||||
|
if(self.StoreImgdatas[st]){
|
||||||
|
self.StoreImgdatas[st] = JSON.parse(JSON.stringify(arr[st]));
|
||||||
|
delete arr[st];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var StoreImgdatas = JSON.parse(JSON.stringify(self.StoreImgdatas));
|
||||||
|
var result = $.extend(StoreImgdatas, arr);
|
||||||
|
self.StoreImgdatas = result;
|
||||||
|
}else{
|
||||||
|
self.StoreImgdatas = arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.ImgRowGridhandleScroll();
|
||||||
|
},
|
||||||
|
ImgRowGridhandleScroll(){
|
||||||
|
var self = this;
|
||||||
|
var H = jQuery('.body_scroll>.el-scrollbar__wrap')[0].clientHeight;//获取可视区域高度
|
||||||
|
var S = jQuery('.body_scroll>.el-scrollbar__wrap')[0].scrollTop;
|
||||||
|
self.NewImgdatas = {};
|
||||||
|
for(var o in self.StoreImgdatas){
|
||||||
|
var item = JSON.parse(JSON.stringify(self.StoreImgdatas[o]));
|
||||||
|
if ((H+S) >= item.ptop && S<item.pbottom) {
|
||||||
|
self.NewImgdatas[item.rid] = item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
106
dzz/pichome/js/pc/waterfall.js
Normal file
106
dzz/pichome/js/pc/waterfall.js
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
var ImgWaterfall = {
|
||||||
|
WaterfallInit(type){
|
||||||
|
var self = this;
|
||||||
|
if(type == 'append'){
|
||||||
|
self.WaterfallImgCompute(type);
|
||||||
|
}else if(type == 'refresh'){
|
||||||
|
self.WaterfallParam.imgArr = [];
|
||||||
|
self.WaterfallImgCompute();
|
||||||
|
}else{
|
||||||
|
self.WaterfallImgCompute();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WaterfallImgCompute(type){
|
||||||
|
var self = this;
|
||||||
|
if(type == 'append'){
|
||||||
|
// self.WaterfallParam.perpage += self.GetimgParameter.perpage;
|
||||||
|
}else{
|
||||||
|
self.WaterfallParam.perpage = 0;
|
||||||
|
var boxWidth = $('#waterfallCenter').width();
|
||||||
|
self.WaterfallParam.columns = parseInt(boxWidth/self.WaterfallParam.imgWidth);
|
||||||
|
var OtherHeight = 0
|
||||||
|
if(self.InformationShow.indexOf('name')>-1 || self.InformationShow.indexOf('extension')>-1){
|
||||||
|
OtherHeight += 45;
|
||||||
|
}
|
||||||
|
if(self.InformationShow.indexOf('other')>-1){
|
||||||
|
OtherHeight += 20;
|
||||||
|
}
|
||||||
|
self.WaterfallParam.OtherHeight = OtherHeight;
|
||||||
|
}
|
||||||
|
var arr = {};
|
||||||
|
for (var o = self.WaterfallParam.perpage; o < self.imgdatas.length; o++){
|
||||||
|
var rid = self.imgdatas[o]['rid'];
|
||||||
|
arr[rid] = JSON.parse(JSON.stringify(self.imgdatas[o]));
|
||||||
|
|
||||||
|
var h = 236/parseInt(arr[rid].width)*parseInt(arr[rid].height)>120?236/parseInt(arr[rid].width)*parseInt(arr[rid].height):120;
|
||||||
|
arr[rid]['pheight'] = h;
|
||||||
|
arr[rid]['pwidth'] = 252;
|
||||||
|
|
||||||
|
if (o < self.WaterfallParam.columns) {
|
||||||
|
arr[rid]['ptop'] = 0;
|
||||||
|
arr[rid]['pleft'] = self.WaterfallParam.imgWidth*o;
|
||||||
|
arr[rid]['pbottom'] = arr[rid]['ptop']+arr[rid]['pheight']+self.WaterfallParam.Margin+self.WaterfallParam.OtherHeight;
|
||||||
|
var imgArr = JSON.parse(JSON.stringify(arr[rid]));
|
||||||
|
self.WaterfallParam.imgArr.push(imgArr);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
var minHeight = self.WaterfallParam.imgArr[0]['pbottom'];
|
||||||
|
var index = 0;
|
||||||
|
for (var j = 0; j < self.WaterfallParam.imgArr.length; j++) {
|
||||||
|
if (minHeight > self.WaterfallParam.imgArr[j]['pbottom']) {
|
||||||
|
minHeight = self.WaterfallParam.imgArr[j]['pbottom'];
|
||||||
|
index = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr[rid]['ptop'] = JSON.parse(JSON.stringify(self.WaterfallParam.imgArr[index]['pbottom']));
|
||||||
|
arr[rid]['pleft'] = JSON.parse(JSON.stringify(self.WaterfallParam.imgArr[index]['pleft']));
|
||||||
|
arr[rid]['pbottom'] = arr[rid]['ptop']+arr[rid]['pheight']+self.WaterfallParam.Margin+self.WaterfallParam.OtherHeight;
|
||||||
|
|
||||||
|
var imgArr = JSON.parse(JSON.stringify(arr[rid]));
|
||||||
|
self.WaterfallParam.imgArr[index] = imgArr;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var count = Object.keys(arr).length
|
||||||
|
self.WaterfallParam.perpage += count;
|
||||||
|
if(self.GetScrollAppend){
|
||||||
|
var StoreImgdatas = JSON.parse(JSON.stringify(self.StoreImgdatas));
|
||||||
|
var result = $.extend(StoreImgdatas, arr);
|
||||||
|
self.StoreImgdatas = result;
|
||||||
|
}else{
|
||||||
|
self.StoreImgdatas = arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.WaterfallhandleScroll();
|
||||||
|
var fminHeight = self.WaterfallParam.imgArr[0]['pbottom'];
|
||||||
|
for (var j = 0; j < self.WaterfallParam.imgArr.length; j++) {
|
||||||
|
if (fminHeight < self.WaterfallParam.imgArr[j]['pbottom']) {
|
||||||
|
fminHeight = self.WaterfallParam.imgArr[j]['pbottom'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.WaterfallParam.boxHeight = fminHeight+40;
|
||||||
|
$('#waterfallCenter').css({
|
||||||
|
height:self.WaterfallParam.boxHeight+'px'
|
||||||
|
});
|
||||||
|
$('.imgmargin').css({
|
||||||
|
height:self.WaterfallParam.boxHeight+'px'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
WaterfallhandleScroll(){
|
||||||
|
var self = this;
|
||||||
|
var H = jQuery('.body_scroll>.el-scrollbar__wrap')[0].clientHeight;//获取可视区域高度
|
||||||
|
var S = jQuery('.body_scroll>.el-scrollbar__wrap')[0].scrollTop;
|
||||||
|
// var data = JSON.parse(JSON.stringify(self.NewImgdatas));
|
||||||
|
var arr = [];
|
||||||
|
|
||||||
|
self.NewImgdatas = {};
|
||||||
|
for(var o in self.StoreImgdatas){
|
||||||
|
var item = JSON.parse(JSON.stringify(self.StoreImgdatas[o]));
|
||||||
|
if ((H+S) >= item.ptop && S<item.pbottom) {
|
||||||
|
self.NewImgdatas[item.rid] = item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -21,6 +21,11 @@
|
|||||||
$data['path'] = urlencode($data['path']);
|
$data['path'] = urlencode($data['path']);
|
||||||
$data['filter'] = unserialize($data['filter']);
|
$data['filter'] = unserialize($data['filter']);
|
||||||
$catdata = C::t('pichome_taggroup')->fetch_by_appid($appid);
|
$catdata = C::t('pichome_taggroup')->fetch_by_appid($appid);
|
||||||
|
if(($data['state'] ==1)) {
|
||||||
|
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfile&appid='.$appid,0, '', '', false, '', 1);
|
||||||
|
}elseif($data['state'] == 2){
|
||||||
|
dfsockopen(getglobal('localurl'). 'index.php?mod=pichome&op=exportfilecheck&appid='.$appid,0, '', '', false, '', 1);
|
||||||
|
}
|
||||||
exit(json_encode(array('success' => true, 'data' => $data,'catdata'=>$catdata)));
|
exit(json_encode(array('success' => true, 'data' => $data,'catdata'=>$catdata)));
|
||||||
}else{
|
}else{
|
||||||
exit(json_encode(array('error' => true)));
|
exit(json_encode(array('error' => true)));
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ foreach($resourcesdata['foldernames'] as $fval){
|
|||||||
$foldernames[] = $fval;
|
$foldernames[] = $fval;
|
||||||
}
|
}
|
||||||
$resourcesdata['foldernames'] = json_encode($foldernames);
|
$resourcesdata['foldernames'] = json_encode($foldernames);
|
||||||
|
|
||||||
$theme = GetThemeColor();
|
$theme = GetThemeColor();
|
||||||
include template('pc/page/share');
|
$ismobile = helper_browser::ismobile();
|
||||||
|
|
||||||
|
if (($ismobile)) {
|
||||||
|
include template('mobile/page/share');
|
||||||
|
} else {
|
||||||
|
include template('pc/page/share');
|
||||||
|
}
|
||||||
|
|||||||
605
dzz/pichome/template/mobile/components/index/JsCommon.htm
Normal file
605
dzz/pichome/template/mobile/components/index/JsCommon.htm
Normal file
@@ -0,0 +1,605 @@
|
|||||||
|
<script type="text/javascript">
|
||||||
|
var CommonJs = {
|
||||||
|
CommonLibrary(){
|
||||||
|
if(this.ParamLibrary.data.length==0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.ParamLibrary.fdata = [{
|
||||||
|
text: '全部库',
|
||||||
|
value: '',
|
||||||
|
download:0,
|
||||||
|
share:0,
|
||||||
|
}];
|
||||||
|
for(var i in this.ParamLibrary.data){
|
||||||
|
var item = this.ParamLibrary.data[i];
|
||||||
|
var str = {
|
||||||
|
text: item['appname'],
|
||||||
|
value: item['appid'],
|
||||||
|
download:parseInt(item['download']),
|
||||||
|
share:parseInt(item['share']),
|
||||||
|
};
|
||||||
|
this.ParamLibrary.fdata.push(str);
|
||||||
|
}
|
||||||
|
if(this.ParamLibrary.fdata.length == 1){
|
||||||
|
var data = this.ParamLibrary.fdata[0];
|
||||||
|
this.ParamLibrary.activeId = data['appid'];
|
||||||
|
this.ParamLibrary.activeTxt = data['appname'];
|
||||||
|
}
|
||||||
|
this.CommonhandleHash('refresh');
|
||||||
|
},
|
||||||
|
CommonhandleHash(isreload){
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if(isreload=="refresh"){
|
||||||
|
var param = (location.hash || "").replace(/^\?/,'').split("&");
|
||||||
|
for(var i=0; i<param.length; i++){
|
||||||
|
var item = param[i].split("=");
|
||||||
|
if(item.length == 2){
|
||||||
|
if(i==0){
|
||||||
|
item[0]=item[0].replace("#","");
|
||||||
|
}
|
||||||
|
var name = item[0];
|
||||||
|
var value = item[1];
|
||||||
|
var isget = true;
|
||||||
|
// if(self.ParamScreen.data.length == 0 && self.ParamScreen.dataTypes.indexOf(name) > -1){
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
switch(name){
|
||||||
|
case 'appid':
|
||||||
|
self.ParamLibrary.activeId = value;
|
||||||
|
break;
|
||||||
|
case 'keyword':
|
||||||
|
self.ParamSearch.keyword = decodeURI(value);
|
||||||
|
break;
|
||||||
|
case 'asc':
|
||||||
|
self.ParamSort.sortorder.value = value;
|
||||||
|
break;
|
||||||
|
case 'order':
|
||||||
|
self.ParamSort.Sorttype.value = parseInt(value);
|
||||||
|
break;
|
||||||
|
case 'classify':
|
||||||
|
self.ParamScreen.value.classify.value = value.split(',');
|
||||||
|
break;
|
||||||
|
case 'tag':
|
||||||
|
var fval = value.split(',');
|
||||||
|
for(var t in fval){
|
||||||
|
self.ParamScreen.value.tag.value.push(parseInt(fval[t]));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'color':
|
||||||
|
self.ParamScreen.value.color.value = value;
|
||||||
|
break;
|
||||||
|
case 'persion':
|
||||||
|
self.ParamScreen.value.color.persion = value;
|
||||||
|
break;
|
||||||
|
case 'link':
|
||||||
|
self.ParamScreen.value.link.value = value;
|
||||||
|
break;
|
||||||
|
case 'linkval':
|
||||||
|
self.ParamScreen.value.link.input = value;
|
||||||
|
break;
|
||||||
|
case 'desc':
|
||||||
|
self.ParamScreen.value.desc.value = value;
|
||||||
|
break;
|
||||||
|
case 'descval':
|
||||||
|
self.ParamScreen.value.desc.input = value;
|
||||||
|
break;
|
||||||
|
case 'duration':
|
||||||
|
var p = value.split('_');
|
||||||
|
self.ParamScreen.value.duration.start = p[0];
|
||||||
|
self.ParamScreen.value.duration.end = p[1];
|
||||||
|
break;
|
||||||
|
case 'dunit':
|
||||||
|
self.ParamScreen.value.duration.unit = value;
|
||||||
|
break;
|
||||||
|
case 'wsize':
|
||||||
|
var p = value.split('_');
|
||||||
|
self.ParamScreen.value.size.wstart = p[0];
|
||||||
|
self.ParamScreen.value.size.wend = p[1];
|
||||||
|
break;
|
||||||
|
case 'hsize':
|
||||||
|
var p = value.split('_');
|
||||||
|
self.ParamScreen.value.size.hstart = p[0];
|
||||||
|
self.ParamScreen.value.size.hend = p[1];
|
||||||
|
break;
|
||||||
|
case 'ext':
|
||||||
|
self.ParamScreen.value.ext.value = value.split(',');
|
||||||
|
break;
|
||||||
|
case 'shape':
|
||||||
|
var arr = value.split(',');
|
||||||
|
var farr = [];
|
||||||
|
for(var s in arr){
|
||||||
|
for(var ss in self.ParamScreen.value.shape.fdata){
|
||||||
|
var sitem = self.ParamScreen.value.shape.fdata[ss];
|
||||||
|
if(sitem.name == decodeURI(arr[s])){
|
||||||
|
farr.push(parseInt(sitem.val));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.ParamScreen.value.shape.value = farr;
|
||||||
|
break;
|
||||||
|
case 'shapesize':
|
||||||
|
self.ParamScreen.value.shape.value.push('custom');
|
||||||
|
var arr = value.split(':');
|
||||||
|
self.ParamScreen.value.shape.sizemin = arr[0];
|
||||||
|
self.ParamScreen.value.shape.sizemax = arr[1];
|
||||||
|
break;
|
||||||
|
case 'grade':
|
||||||
|
var arr = value.split(',');
|
||||||
|
var farr = [];
|
||||||
|
for(var g in arr){
|
||||||
|
if(decodeURI(arr[g]) == '未评分'){
|
||||||
|
farr.push(0);
|
||||||
|
}else{
|
||||||
|
farr.push(parseInt(arr[g]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.ParamScreen.value.grade.value = farr;
|
||||||
|
break;
|
||||||
|
case 'btime':
|
||||||
|
case 'dateline':
|
||||||
|
case 'mtime':
|
||||||
|
var len = decodeURI(value).split('_');
|
||||||
|
if(len.length>1){
|
||||||
|
self.ParamScreen.value[name].value = '自定义';
|
||||||
|
self.ParamScreen.value[name].customvalue = len[0]+' 至 '+len[1];
|
||||||
|
var start = len[0].split('-');
|
||||||
|
var end = len[1].split('-');
|
||||||
|
var defaulttime = [new Date(start[0], start[1], start[2]) ,new Date(end[0], end[1], end[2])];
|
||||||
|
self.ParamScreen.value[name].defaultdate = defaulttime;
|
||||||
|
}else{
|
||||||
|
self.ParamScreen.value[name].value = decodeURI(value);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isreload!="scroll"){
|
||||||
|
if(jQuery('.pic-container-scroll').length){
|
||||||
|
jQuery('.pic-container-scroll')[0].scrollTop = 0;
|
||||||
|
}
|
||||||
|
self.ParamImages.type = 'refresh';
|
||||||
|
self.ParamBasic.page = 1;
|
||||||
|
self.ParamBasic.total = 0;
|
||||||
|
self.ParamBasic.totalpage = 0;
|
||||||
|
self.ParamImages.loading = true;
|
||||||
|
}else{
|
||||||
|
self.ParamImages.valloading = true;
|
||||||
|
}
|
||||||
|
var hash = '';
|
||||||
|
self.ParamData = {};
|
||||||
|
for(var x in self.ParamDataInit){
|
||||||
|
var value = self.ParamDataInit[x];
|
||||||
|
switch(x){
|
||||||
|
case 'appid':
|
||||||
|
if(self.ParamLibrary.activeId){
|
||||||
|
self.ParamData['appid'] = self.ParamLibrary.activeId;
|
||||||
|
hash += 'appid='+ self.ParamLibrary.activeId;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'keyword':
|
||||||
|
if(value != self.ParamSearch.keyword){
|
||||||
|
self.ParamData['keyword'] = self.ParamSearch.keyword;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'keyword='+ self.ParamSearch.keyword;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'classify':
|
||||||
|
if(self.ParamScreen.value.classify.value && self.ParamScreen.value.classify.value.length){
|
||||||
|
self.ParamData['fids'] = self.ParamScreen.value.classify.value.join(',');
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'classify='+ self.ParamScreen.value.classify.value.join(',');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'tag':
|
||||||
|
if(self.ParamScreen.value.tag.value && self.ParamScreen.value.tag.value.length){
|
||||||
|
self.ParamData['tag'] = self.ParamScreen.value.tag.value.join(',');
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'tag='+ self.ParamScreen.value.tag.value.join(',');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'color':
|
||||||
|
if(self.ParamScreen.value.color.value){
|
||||||
|
self.ParamData['color'] = self.ParamScreen.value.color.value;
|
||||||
|
self.ParamData['persion'] = self.ParamScreen.value.color.persion;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'color='+ self.ParamScreen.value.color.value;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'persion='+ self.ParamScreen.value.color.persion;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'link':
|
||||||
|
if(value != self.ParamScreen.value.link.value){
|
||||||
|
self.ParamData['link'] = self.ParamScreen.value.link.value;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'link='+ self.ParamScreen.value.link.value;
|
||||||
|
if(parseInt(self.ParamScreen.value.link.value)>0 && self.ParamScreen.value.link.input){
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'linkval='+ self.ParamScreen.value.link.input;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'desc':
|
||||||
|
if(value != self.ParamScreen.value.desc.value){
|
||||||
|
self.ParamData['desc'] = self.ParamScreen.value.desc.value;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'desc='+ self.ParamScreen.value.desc.value;
|
||||||
|
if(parseInt(self.ParamScreen.value.desc.value)>0 && self.ParamScreen.value.desc.input){
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'descval='+ self.ParamScreen.value.desc.input;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'duration':
|
||||||
|
var start = self.ParamScreen.value.duration.start;
|
||||||
|
var end = self.ParamScreen.value.duration.end;
|
||||||
|
var fval = '';
|
||||||
|
if(start || end){
|
||||||
|
fval = start+'_'+end;
|
||||||
|
}
|
||||||
|
if(value != fval){
|
||||||
|
self.ParamData['duration'] = fval;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'duration='+ fval;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'dunit='+ self.ParamScreen.value.duration.unit;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'wsize':
|
||||||
|
var start = self.ParamScreen.value.size.wstart;
|
||||||
|
var end = self.ParamScreen.value.size.wend;
|
||||||
|
var fval = '';
|
||||||
|
if(start || end){
|
||||||
|
fval = start+'_'+end;
|
||||||
|
}
|
||||||
|
if(value != fval){
|
||||||
|
self.ParamData['wsize'] = fval;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'wsize='+ fval;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'hsize':
|
||||||
|
var start = self.ParamScreen.value.size.hstart;
|
||||||
|
var end = self.ParamScreen.value.size.hend;
|
||||||
|
var fval = '';
|
||||||
|
if(start || end){
|
||||||
|
fval = start+'_'+end;
|
||||||
|
}
|
||||||
|
if(value != fval){
|
||||||
|
self.ParamData['hsize'] = fval;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'hsize='+ fval;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'ext':
|
||||||
|
var fval = self.ParamScreen.value.ext.value.join(',');
|
||||||
|
if(fval){
|
||||||
|
self.ParamData['ext'] = fval;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'ext='+ fval;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'shape':
|
||||||
|
var index = self.ParamScreen.value.shape.value.indexOf('custom');
|
||||||
|
var newval = JSON.parse(JSON.stringify(self.ParamScreen.value.shape.value));
|
||||||
|
if(index > -1){
|
||||||
|
newval.splice(index,1);
|
||||||
|
}
|
||||||
|
var fval = newval.join(',');
|
||||||
|
if(fval){
|
||||||
|
self.ParamData['shape'] = fval;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
var farr = [];
|
||||||
|
for(var s in self.ParamScreen.value.shape.value){
|
||||||
|
var sitem = self.ParamScreen.value.shape.value[s];
|
||||||
|
if(sitem == 'custom'){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for(var ss in self.ParamScreen.value.shape.fdata){
|
||||||
|
var ssitem = self.ParamScreen.value.shape.fdata[ss];
|
||||||
|
if(parseInt(ssitem.val) == parseInt(sitem)){
|
||||||
|
farr.push(ssitem.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hash += 'shape='+ farr.join(',');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'shapesize':
|
||||||
|
var index = self.ParamScreen.value.shape.value.indexOf('custom');
|
||||||
|
var sizemin = self.ParamScreen.value.shape.sizemin;
|
||||||
|
var sizemax = self.ParamScreen.value.shape.sizemax;
|
||||||
|
if(index>-1 && sizemin && sizemax){
|
||||||
|
self.ParamData['shapesize'] = sizemin+':'+sizemax;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'shapesize='+ sizemin+':'+sizemax;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'grade':
|
||||||
|
var fval = self.ParamScreen.value.grade.value.join(',');
|
||||||
|
var index = self.ParamScreen.value.grade.value.indexOf(0);
|
||||||
|
var newval = JSON.parse(JSON.stringify(self.ParamScreen.value.grade.value));
|
||||||
|
|
||||||
|
if(index > -1){
|
||||||
|
newval.splice(index,1,'未评分');
|
||||||
|
}
|
||||||
|
if(fval){
|
||||||
|
self.ParamData['grade'] = fval;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'grade='+ newval.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'btime':
|
||||||
|
case 'dateline':
|
||||||
|
case 'mtime':
|
||||||
|
var fval = self.ParamScreen.value[x];
|
||||||
|
if(fval.value){
|
||||||
|
if(fval.value == '自定义'){
|
||||||
|
if(fval.customvalue){
|
||||||
|
var time = fval.customvalue.split('至');
|
||||||
|
var ftime = $.trim(time[0])+'_'+$.trim(time[1]);
|
||||||
|
self.ParamData[x] = ftime;
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += x+'='+ ftime;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += x+'='+ fval.value;
|
||||||
|
self.ParamData[x] = GetDateVal(fval.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'order':
|
||||||
|
self.ParamData['order'] = self.ParamSort.Sorttype.value;
|
||||||
|
if(value != self.ParamSort.Sorttype.value){
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'order='+ self.ParamSort.Sorttype.value;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'asc':
|
||||||
|
self.ParamData['asc'] = self.ParamSort.sortorder.value;
|
||||||
|
if(value != self.ParamSort.sortorder.value){
|
||||||
|
if(hash) hash += '&';
|
||||||
|
hash += 'asc='+ self.ParamSort.sortorder.value;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'page':
|
||||||
|
if(isreload=='scroll'){
|
||||||
|
self.ParamBasic.page += 1;
|
||||||
|
}
|
||||||
|
self.ParamData[x] = self.ParamBasic[x];
|
||||||
|
// if(value != self.ParamBasic[x]){
|
||||||
|
// if(hash) hash += '&';
|
||||||
|
// hash += x+'='+ self.ParamBasic[x];
|
||||||
|
// }
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.ParamData['perpage'] = self.ParamBasic['perpage'];
|
||||||
|
if(isreload != 'refresh'){
|
||||||
|
window.location.hash = hash;
|
||||||
|
}
|
||||||
|
this.CommonGetData(isreload);
|
||||||
|
|
||||||
|
},
|
||||||
|
CommonSetBadge(){
|
||||||
|
var self = this;
|
||||||
|
for(var i in self.ParamScreen.data){
|
||||||
|
var item = self.ParamScreen.data[i];
|
||||||
|
var type = item.type;
|
||||||
|
switch(type){
|
||||||
|
case 'classify':
|
||||||
|
case 'ext':
|
||||||
|
case 'shape':
|
||||||
|
case 'grade':
|
||||||
|
var fitem = self.ParamScreen.value[type];
|
||||||
|
if(fitem.value.length){
|
||||||
|
item.badge = fitem.value.length;
|
||||||
|
}else{
|
||||||
|
item.badge = '';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'tag':
|
||||||
|
if(item.grouptag){
|
||||||
|
item.badge = item.value.length || '';
|
||||||
|
}else{
|
||||||
|
item.badge = self.ParamScreen.value[type].value.length || '';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'color':
|
||||||
|
case 'link':
|
||||||
|
case 'desc':
|
||||||
|
item.dot = self.ParamScreen.value[type].value?true:false;
|
||||||
|
break;
|
||||||
|
case 'duration':
|
||||||
|
if(self.ParamScreen.value[type].start || self.ParamScreen.value[type].end){
|
||||||
|
item.dot = true;
|
||||||
|
}else{
|
||||||
|
item.dot = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'size':
|
||||||
|
var fitem = self.ParamScreen.value[type];
|
||||||
|
if(fitem.wstart || fitem.wend || fitem.hstart || fitem.hend){
|
||||||
|
item.dot = true;
|
||||||
|
}else{
|
||||||
|
item.dot = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'btime':
|
||||||
|
case 'dateline':
|
||||||
|
case 'mtime':
|
||||||
|
if(self.ParamScreen.value[type].value || self.ParamScreen.value[type].customvalue){
|
||||||
|
item.dot = true;
|
||||||
|
}else{
|
||||||
|
item.dot = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.CommonSetFooterBadge();
|
||||||
|
},
|
||||||
|
CommonSetFooterBadge(){
|
||||||
|
var self = this;
|
||||||
|
var num = 0;
|
||||||
|
for(var i in self.ParamScreen.data){
|
||||||
|
var item = self.ParamScreen.data[i];
|
||||||
|
switch(item.type){
|
||||||
|
case 'classify':
|
||||||
|
case 'tag':
|
||||||
|
case 'ext':
|
||||||
|
case 'shape':
|
||||||
|
case 'grade':
|
||||||
|
if(item.badge && parseInt(item.badge)){
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'color':
|
||||||
|
case 'link':
|
||||||
|
case 'desc':
|
||||||
|
case 'duration':
|
||||||
|
case 'size':
|
||||||
|
case 'btime':
|
||||||
|
case 'dateline':
|
||||||
|
case 'mtime':
|
||||||
|
if(item.dot){
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.ParamScreen.ActiveNum = num || '';
|
||||||
|
if(self.ParamSearch.keyword || self.ParamScreen.ActiveNum){
|
||||||
|
self.ParamFooter.data.clear.show = true;
|
||||||
|
}else{
|
||||||
|
self.ParamFooter.data.clear.show = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
CommonGetData(isreload){
|
||||||
|
var self = this;
|
||||||
|
if(self.ParamSearch.keyword || self.ParamScreen.ActiveNum){
|
||||||
|
self.ParamFooter.data.clear.show = true;
|
||||||
|
}else{
|
||||||
|
self.ParamFooter.data.clear.show = false;
|
||||||
|
}
|
||||||
|
$.post(MOD_URL+'&op=filelist&operation=filelist',self.ParamData,function(data){
|
||||||
|
var information = data.data;
|
||||||
|
var ftotal = Math.ceil(information.param.total / information.param.perpage);
|
||||||
|
if(isreload=='scroll'){
|
||||||
|
self.ParamImages.type = 'append';
|
||||||
|
self.ParamImages.data.push.apply(self.ParamImages.data,information.data);
|
||||||
|
self.ParamBasic.totalpage = ftotal;
|
||||||
|
}else{
|
||||||
|
self.ParamImages.type = 'refresh';
|
||||||
|
self.ParamImages.data = information.data;
|
||||||
|
self.ParamBasic.totalpage = ftotal<1?1:ftotal;
|
||||||
|
}
|
||||||
|
self.ParamBasic.total = information.param.total;
|
||||||
|
if(isreload == 'refresh'){
|
||||||
|
if(information.param.tagdata){
|
||||||
|
var tstr = {};
|
||||||
|
for(var t in information.param.tagdata){
|
||||||
|
var titem = information.param.tagdata[t];
|
||||||
|
if(!tstr[titem.cid]){
|
||||||
|
tstr[titem.cid] = [];
|
||||||
|
}
|
||||||
|
tstr[titem.cid].push(titem.tid);
|
||||||
|
}
|
||||||
|
self.ParamScreen.value.tag.refreshval = tstr;
|
||||||
|
}
|
||||||
|
self.CommonGetScreenData();
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
CommonAddkeyword(keyword,ktype){//添加关键词次数
|
||||||
|
var self = this;
|
||||||
|
jQuery.post(MOD_URL+'&op=ajax&operation=addsearch',{
|
||||||
|
appid:self.ParamLibrary.activeId,
|
||||||
|
keyword:keyword,
|
||||||
|
ktype:ktype
|
||||||
|
});
|
||||||
|
},
|
||||||
|
CommonGetScreenData(){
|
||||||
|
var self = this;
|
||||||
|
$.post(MOD_URL+'&op=ajax&operation=getscreen',{
|
||||||
|
appid:self.ParamLibrary.activeId
|
||||||
|
},function(data){
|
||||||
|
if(data.success){
|
||||||
|
var fdata = data.data;
|
||||||
|
var arr = [];
|
||||||
|
var grouparr = {};
|
||||||
|
var index = 0;
|
||||||
|
|
||||||
|
for(var i in fdata){
|
||||||
|
var item = fdata[i];
|
||||||
|
if(parseInt(item.checked)){
|
||||||
|
if(item.key == 'tag' && parseInt(item.showtype)){
|
||||||
|
for(var g in item.group){
|
||||||
|
var gitem = item.group[g];
|
||||||
|
if(parseInt(gitem.checked)){
|
||||||
|
var str = {
|
||||||
|
text:gitem.catname,
|
||||||
|
type:'tag',
|
||||||
|
appid:gitem.appid,
|
||||||
|
cid:gitem.cid,
|
||||||
|
grouptag:true,
|
||||||
|
badge:'',
|
||||||
|
value: self.ParamScreen.value.tag.refreshval[gitem.cid] || [],
|
||||||
|
page:1,
|
||||||
|
keyword:'',
|
||||||
|
loading:true,
|
||||||
|
scrollloading:false,
|
||||||
|
searchloading:false,
|
||||||
|
data:[],
|
||||||
|
finish:false
|
||||||
|
};
|
||||||
|
grouparr[gitem.cid] = {
|
||||||
|
loading:true,
|
||||||
|
data:[]
|
||||||
|
};
|
||||||
|
arr.push(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
var str = {
|
||||||
|
text:item.text,
|
||||||
|
type:item.key,
|
||||||
|
};
|
||||||
|
if(self.ParamScreen.dataBadge.indexOf(item.key)>-1){
|
||||||
|
str['badge'] = '';
|
||||||
|
}else{
|
||||||
|
str['dot'] = false;
|
||||||
|
}
|
||||||
|
arr.push(str);
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.ParamScreen.groupdata = grouparr;
|
||||||
|
self.ParamScreen.data = arr;
|
||||||
|
if(arr.length){
|
||||||
|
self.ParamFooter.data.screen.show = true;
|
||||||
|
self.CommonSetBadge();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
CommonCopyTxt(text){
|
||||||
|
var self = this;
|
||||||
|
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
|
||||||
|
input.setAttribute('value', text);
|
||||||
|
document.getElementsByTagName('body')[0].appendChild(input);
|
||||||
|
document.getElementById('copyInput').select();
|
||||||
|
document.execCommand('copy');
|
||||||
|
document.getElementById('copyInput').remove();
|
||||||
|
self.$toast.success('复制成功');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
117
dzz/pichome/template/mobile/components/index/JsDetailMessage.htm
Normal file
117
dzz/pichome/template/mobile/components/index/JsDetailMessage.htm
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<van-popup
|
||||||
|
v-model="InformationPopup"
|
||||||
|
class="detail-popup-message"
|
||||||
|
:class="showdata[rid] && !showdata[rid].data.footer?'noPadding':''"
|
||||||
|
position="right"
|
||||||
|
:overlay="false"
|
||||||
|
get-container="#DetailPopup">
|
||||||
|
<van-nav-bar class="header-top" title="详情信息" left-arrow @click-left="InformationPopup=false"></van-nav-bar>
|
||||||
|
<div style="position: relative;height: 100%;background: var(--bg-content);padding-top: 46px;" v-cloak>
|
||||||
|
|
||||||
|
<div class="DetailPopup-content" style="padding: 0 16px;">
|
||||||
|
<!-- <template v-if="ParamDetail.messageloading">
|
||||||
|
<van-loading class="custom-load" size="24px" type="spinner" color="var(--header-text)" vertical>加载中...</van-loading>
|
||||||
|
</template>
|
||||||
|
<template v-else> -->
|
||||||
|
<div class="name">{{showdata[rid].data.name}}.{{showdata[rid].data.ext}}</div>
|
||||||
|
<div class="block" v-if="showdata[rid].data.colors && showdata[rid].data.colors.length">
|
||||||
|
<div class="title">颜色</div>
|
||||||
|
<div class="block-item colors">
|
||||||
|
<div class="colors" v-for="item in showdata[rid].data.colors" @click="DetailMessageSearch('color',item)">
|
||||||
|
<div :style="{background: '#'+item}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block" v-if="showdata[rid].data.tag && showdata[rid].data.tag.length">
|
||||||
|
<div class="title">标签</div>
|
||||||
|
<div class="block-item tag">
|
||||||
|
<div class="tag" v-for="item in showdata[rid].data.tag" @click="DetailMessageSearch('tag',item.key)">{{item.val}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block" v-if="showdata[rid].data.link">
|
||||||
|
<div class="title">链接</div>
|
||||||
|
<div class="block-item link">
|
||||||
|
<span @click="DetailMessageSearch('link',showdata[rid].data.link)">{{showdata[rid].data.link}}</span>
|
||||||
|
<i class="ri-file-copy-line" @click="DetailMessageSearch('copy',showdata[rid].data.link)"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block" v-if="showdata[rid].data.foldernames && showdata[rid].data.foldernames.length">
|
||||||
|
<div class="title">分类</div>
|
||||||
|
<div class="block-item tag">
|
||||||
|
<div class="tag" v-for="item in showdata[rid].data.foldernames" @click="DetailMessageSearch('classify',item.key)">{{item.val}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block">
|
||||||
|
<div class="title">基本信息</div>
|
||||||
|
<div class="block-item">
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">评分</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">
|
||||||
|
<van-icon v-for="item in showdata[rid].data.grade" name="star" class="star active"></van-icon><van-icon v-for="item in showdata[rid].data.fgrade" name="star" class="star"></van-icon>
|
||||||
|
</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">尺寸</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{showdata[rid].data.width}}×{{showdata[rid].data.height}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">文件大小</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{showdata[rid].data.fsize}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">类型</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{showdata[rid].data.ext}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">创建时间</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{showdata[rid].data.mtime}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">添加时间</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{showdata[rid].data.btime}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">修改时间</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{showdata[rid].data.dateline}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- </template> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</van-popup>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var DetailMessageJs = {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
757
dzz/pichome/template/mobile/components/index/JsImages.htm
Normal file
757
dzz/pichome/template/mobile/components/index/JsImages.htm
Normal file
@@ -0,0 +1,757 @@
|
|||||||
|
<div class="pic-container-scroll">
|
||||||
|
<div class="img-container">
|
||||||
|
<div id="imgContainer" :class="ParamSort.layout.value=='imageList'?'imagelist':''">
|
||||||
|
<div
|
||||||
|
class="imgitem"
|
||||||
|
v-for="item in ParamImages.Newdatas"
|
||||||
|
:style="{top:item.ptop+'px',left:item.pleft+'px',width:item.pwidth+'px'}"
|
||||||
|
:key="item.rid"
|
||||||
|
:rid="item.rid"
|
||||||
|
@click="ImagesDetailClick(item.rid,item.index)">
|
||||||
|
<div class="imgbox">
|
||||||
|
<div
|
||||||
|
class="imgbox-border radius"
|
||||||
|
:style="{height: item.pheight+'px',width: (item.pwidth-8)+'px',background:'#'+item.color}"
|
||||||
|
v-bind:class="item.opentype=='video'||item.opentype=='audio'?'border':''">
|
||||||
|
<div class="div-black" :data-rid="item.rid">
|
||||||
|
<div class="bck"></div>
|
||||||
|
<img
|
||||||
|
class="img el-image__inner opacity"
|
||||||
|
:ref="'ref_'+item.rid"
|
||||||
|
@load="ImagesImgload(item.rid)"
|
||||||
|
:src="item.icondata"
|
||||||
|
alt="" />
|
||||||
|
<!-- <img
|
||||||
|
class="img el-image__inner opacity"
|
||||||
|
:ref="'ref_'+item.rid"
|
||||||
|
@load="ImagesImgload(item.rid)"
|
||||||
|
:src="item.icondata"
|
||||||
|
@touchevent="ImagesTouchEvent"
|
||||||
|
@touchstart="ImagesTouchStart"
|
||||||
|
@touchmove="ImagesTouchMove"
|
||||||
|
@touchend="ImagesTouchEnd"
|
||||||
|
alt="" /> -->
|
||||||
|
<div class="circular-box">
|
||||||
|
<div class="circular-item-box">
|
||||||
|
<div class="circular-item first"><i class="ri-file-search-line icon"></i></div>
|
||||||
|
<div class="circular-item two"><i class="ri-share-line icon"></i></div>
|
||||||
|
<div class="circular-item three"><i class="ri-download-2-line icon"></i></div>
|
||||||
|
</div>
|
||||||
|
<div class="round"></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="ParamSort.showinformation.value.indexOf('tagging')>-1&&parseInt(item.annonationnum)>0" class="annotation">{{item.annonationnum}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-img-message">
|
||||||
|
<div class="name" v-if="ParamSort.showinformation.value.indexOf('name')>-1 || ParamSort.showinformation.value.indexOf('extension')>-1">
|
||||||
|
<span v-if="ParamSort.showinformation.value.indexOf('name')>-1" v-cloak>{{item.name}}</span>
|
||||||
|
<span v-if="ParamSort.showinformation.value.indexOf('extension')>-1" class="suffix" v-cloak>.{{item.ext}}</span>
|
||||||
|
</div>
|
||||||
|
<template v-if="ParamSort.showinformation.value.indexOf('other')>-1">
|
||||||
|
<div class="other" v-if="ParamSort.otherinformation.value=='size'">
|
||||||
|
<span>{{item.width}} × {{item.height}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="other" v-else-if="ParamSort.otherinformation.value=='filesize'">
|
||||||
|
<span>{{item.fsize}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="other" v-else-if="ParamSort.otherinformation.value=='tag'">
|
||||||
|
<span v-if="!item.tags" class="label">-</span>
|
||||||
|
<span v-else class="label" v-for="tg in item.tags">•{{tg}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="other" v-else-if="ParamSort.otherinformation.value=='grade'">
|
||||||
|
<van-icon v-for="item in parseInt(item.grade)" class="score active" name="star"></van-icon><van-icon v-for="item in 5-parseInt(item.grade)" class="score" name="star"></van-icon>
|
||||||
|
</div>
|
||||||
|
<div class="other" v-else-if="ParamSort.otherinformation.value=='btime'">
|
||||||
|
<span>{{item.btime}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="other" v-else-if="ParamSort.otherinformation.value=='dateline'">
|
||||||
|
<span>{{item.dateline}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="other" v-else-if="ParamSort.otherinformation.value=='mtime'">
|
||||||
|
<span>{{item.mtime}}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<template v-if="ParamImages.data.length&&ParamBasic.page>=ParamBasic.totalpage&&!ParamImages.loading&&!ParamImages.valloading">
|
||||||
|
<div style="position: absolute;bottom: 0;left: 0;width: 100%;line-height: 40px;text-align: center;color: var(--content-text);font-size: 14px;">没有更多了</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="ParamImages.valloading">
|
||||||
|
<div style="position: absolute;bottom: 0;left: 0;width: 100%;line-height: 40px;text-align: center;color: var(--content-text);font-size: 14px;">
|
||||||
|
<van-loading type="spinner" size="24px">加载中...</van-loading>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<template v-if="ParamImages.data.length==0&&!ParamImages.loading&&!ParamImages.valloading">
|
||||||
|
<van-empty
|
||||||
|
class="custom-image"
|
||||||
|
image="dzz/pichome/image/nodata.svg"
|
||||||
|
description="暂无数据"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<van-overlay :show="ParamImages.loading" :z-index="5000" />
|
||||||
|
<script type="text/javascript">
|
||||||
|
var ImagesData = {
|
||||||
|
ParamImages:{
|
||||||
|
resize:0,
|
||||||
|
data:[],
|
||||||
|
Newdatas:{},
|
||||||
|
type:'refresh',
|
||||||
|
operation:{
|
||||||
|
time:'',
|
||||||
|
istouch:false,
|
||||||
|
target:'',
|
||||||
|
click:true,
|
||||||
|
details:{
|
||||||
|
touchMinw:0,
|
||||||
|
touchMaxw:0,
|
||||||
|
touchMinh:0,
|
||||||
|
touchMaxh:0,
|
||||||
|
},
|
||||||
|
share:{
|
||||||
|
touchMinw:0,
|
||||||
|
touchMaxw:0,
|
||||||
|
touchMinh:0,
|
||||||
|
touchMaxh:0,
|
||||||
|
},
|
||||||
|
down:{
|
||||||
|
touchMinw:0,
|
||||||
|
touchMaxw:0,
|
||||||
|
touchMinh:0,
|
||||||
|
touchMaxh:0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
imageList:{
|
||||||
|
maxNewtop:0,
|
||||||
|
maxNewLeft:0,
|
||||||
|
perpage : 0,
|
||||||
|
Margin:4,
|
||||||
|
columns:0,
|
||||||
|
fcolumns:1,
|
||||||
|
newWidth:0,//图片宽度
|
||||||
|
newHeight:0,//图片高度
|
||||||
|
boxHeight:0,//总体高度
|
||||||
|
OtherHeight:0,//底部信息
|
||||||
|
StoreImgdatas:[],
|
||||||
|
},
|
||||||
|
imgageWaterfall:{
|
||||||
|
imgWidth : 252,
|
||||||
|
imgArr : [],
|
||||||
|
ImgAll : [],
|
||||||
|
total : 0,
|
||||||
|
columns:0,
|
||||||
|
boxHeight:0,
|
||||||
|
OtherHeight:0,
|
||||||
|
perpage:0,
|
||||||
|
Margin:8,
|
||||||
|
isMax:false,
|
||||||
|
StoreImgdatas:[],
|
||||||
|
},
|
||||||
|
imagerowGrid:{
|
||||||
|
maxNewtop:0,
|
||||||
|
maxNewLeft:0,
|
||||||
|
rowElems:[],
|
||||||
|
perpage : 0,
|
||||||
|
Margin:4,
|
||||||
|
rowWidth:0,
|
||||||
|
OtherHeight:0,
|
||||||
|
SurplusImgdatas:[],
|
||||||
|
StoreImgdatas:[],
|
||||||
|
},
|
||||||
|
loading:true,
|
||||||
|
valloading:false
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var ImagesWatchJs = {
|
||||||
|
'ParamImages.resize':debounce(function(val){
|
||||||
|
var self = this;
|
||||||
|
self.ImagesLayoutInit();
|
||||||
|
},500),
|
||||||
|
'ParamImages.data':{
|
||||||
|
handler(val){
|
||||||
|
var self = this;
|
||||||
|
self.ImagesLayoutInit();
|
||||||
|
if(self.ParamImages.type == 'append'){
|
||||||
|
self.ParamImages.valloading = false;
|
||||||
|
}else{
|
||||||
|
self.ParamImages.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep:true,
|
||||||
|
// immediate:true
|
||||||
|
},
|
||||||
|
'ParamImages.loading':{
|
||||||
|
handler(val){
|
||||||
|
var self = this;
|
||||||
|
if(val){
|
||||||
|
self.$toast.loading({
|
||||||
|
message: '加载中...',
|
||||||
|
className:'conter-toast',
|
||||||
|
duration: 0,
|
||||||
|
forbidClick: true,
|
||||||
|
loadingType: 'spinner',
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
self.$toast.clear();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep:true,
|
||||||
|
immediate:true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var ImagesJs = {
|
||||||
|
ImagesTouchEvent(){
|
||||||
|
console.log(1111)
|
||||||
|
},
|
||||||
|
ImagesTouchStart(e){
|
||||||
|
console.log(e)
|
||||||
|
// var self = this;
|
||||||
|
// self.ParamImages.operation.click = false;
|
||||||
|
// self.ParamImages.operation.time = setTimeout(function(){
|
||||||
|
// self.asdfasdfdsf(e);
|
||||||
|
// },600);
|
||||||
|
},
|
||||||
|
ImagesTouchStartLongpress(e){
|
||||||
|
var self = this;
|
||||||
|
var img = $(e.target);
|
||||||
|
self.ParamImages.operation.target = img.closest('.div-black');
|
||||||
|
var circular = img.siblings('.circular-box');
|
||||||
|
var style = {
|
||||||
|
width:img.width()+'px',
|
||||||
|
height:img.height()+'px',
|
||||||
|
top:img.offset().top+'px',
|
||||||
|
left:img.offset().left+'px',
|
||||||
|
}
|
||||||
|
var box = $(document).width();
|
||||||
|
|
||||||
|
var touch = e.touches[0];
|
||||||
|
var pageR = touch.pageX+22.5+62;
|
||||||
|
var pageT = 22.5+70;
|
||||||
|
var pageL = 62+22.5;
|
||||||
|
var pageB = touch.pageX+22.5+62;
|
||||||
|
circular.addClass('top');
|
||||||
|
if(pageR>box){
|
||||||
|
circular.addClass('right')
|
||||||
|
}
|
||||||
|
if(pageL>touch.pageX){
|
||||||
|
circular.addClass('left')
|
||||||
|
}
|
||||||
|
self.ParamImages.operation.istouch = true;
|
||||||
|
circular.css({
|
||||||
|
top:touch.pageY-((circular.width()+6)/2),
|
||||||
|
left:touch.pageX-((circular.height()+6)/2),
|
||||||
|
});
|
||||||
|
img.css(style);
|
||||||
|
img.closest('.div-black').addClass('fixed');
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
var first = circular.find('.circular-item.first');
|
||||||
|
self.ParamImages.operation.details = {
|
||||||
|
touchMinw:first.offset().left,
|
||||||
|
touchMaxw:first.offset().left+45,
|
||||||
|
touchMinh:first.offset().top,
|
||||||
|
touchMaxh:first.offset().top+45,
|
||||||
|
};
|
||||||
|
var two = circular.find('.circular-item.two');
|
||||||
|
self.ParamImages.operation.share = {
|
||||||
|
touchMinw:two.offset().left,
|
||||||
|
touchMaxw:two.offset().left+45,
|
||||||
|
touchMinh:two.offset().top,
|
||||||
|
touchMaxh:two.offset().top+45,
|
||||||
|
};
|
||||||
|
var three = circular.find('.circular-item.three');
|
||||||
|
self.ParamImages.operation.share = {
|
||||||
|
touchMinw:three.offset().left,
|
||||||
|
touchMaxw:three.offset().left+45,
|
||||||
|
touchMinh:three.offset().top,
|
||||||
|
touchMaxh:three.offset().top+45,
|
||||||
|
};
|
||||||
|
},500)
|
||||||
|
|
||||||
|
},
|
||||||
|
ImagesTouchMove(e){
|
||||||
|
var self = this;
|
||||||
|
var touch = e.touches[0];
|
||||||
|
var x = touch.pageX;
|
||||||
|
var y = touch.pageY;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
ImagesTouchEnd(e){
|
||||||
|
var self = this;
|
||||||
|
// e.preventDefault();
|
||||||
|
clearTimeout(self.ParamImages.operation.time);
|
||||||
|
self.ParamImages.operation.click = true;
|
||||||
|
if(self.ParamImages.operation.istouch){
|
||||||
|
self.ParamImages.operation.target.removeClass('fixed');
|
||||||
|
self.ParamImages.operation.target.find('.circular-box').removeClass('top left right');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ImagesDetailClick(rid,index){
|
||||||
|
var self = this;
|
||||||
|
// this.ParamDetail.ridIndex = index;
|
||||||
|
// this.ParamDetail.rid = rid;
|
||||||
|
// this.ParamDetail.PopupVisible = true;
|
||||||
|
|
||||||
|
var arr = [];
|
||||||
|
for(var i in self.ParamImages.data){
|
||||||
|
arr.push(self.ParamImages.data[i].rid);
|
||||||
|
}
|
||||||
|
arr = arr.join(',');
|
||||||
|
window.localStorage.setItem('imgs',arr);
|
||||||
|
window.location.href = SITEURL+MOD_URL+'&op=details#rid='+rid;
|
||||||
|
},
|
||||||
|
ImagesMounted(){
|
||||||
|
var self = this;
|
||||||
|
var ParamBasic = self.ParamBasic;
|
||||||
|
var beforeScrollTop = document.body.scrollTop,fn = fn || function() {};
|
||||||
|
$('.pic-container-scroll').scroll(function(e){
|
||||||
|
var afterScrollTop = $(this).scrollTop(),
|
||||||
|
updown = afterScrollTop - beforeScrollTop;
|
||||||
|
if( updown === 0 ) return false;
|
||||||
|
beforeScrollTop = afterScrollTop;
|
||||||
|
self.ParamFooter.IsShow = updown > 0 ? "down" : "up"; //判断往上还是往下
|
||||||
|
self.ImagesLayoutScrollShow();
|
||||||
|
if($(this).scrollTop()+$(this).height()>=this.scrollHeight-80){
|
||||||
|
if(ParamBasic.page>=ParamBasic.totalpage || self.ParamImages.loading || self.ParamImages.valloading){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
self.CommonhandleHash('scroll');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('.div-black').click(function(){
|
||||||
|
})
|
||||||
|
window.addEventListener('resize',function(){
|
||||||
|
self.ParamImages.resize += 1;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
ImagesImgload(rid){
|
||||||
|
var self = this;
|
||||||
|
var item = $(self.$refs['ref_'+rid]);
|
||||||
|
item.removeClass('opacity');
|
||||||
|
item.parents('.imgbox-border').css('background','').removeClass('radius');
|
||||||
|
self.ParamImages.operation.click = 0;
|
||||||
|
// item[0].addEventListener("touchstart",function(e){
|
||||||
|
// var touch = e.touches[0];
|
||||||
|
// self.ParamImages.operation.click = touch.clientY;
|
||||||
|
// self.ParamImages.operation.time = setTimeout(function(){
|
||||||
|
// self.ParamImages.operation.click = true;
|
||||||
|
// self.ImagesTouchStartLongpress(e);
|
||||||
|
// },600);
|
||||||
|
|
||||||
|
|
||||||
|
// },false);
|
||||||
|
|
||||||
|
// item[0].addEventListener("touchmove",function(e){
|
||||||
|
// var touch = e.touches[0];
|
||||||
|
// console.log(Math.abs(touch.clientY - self.ParamImages.operation.click))
|
||||||
|
// if(Math.abs(touch.clientY - self.ParamImages.operation.click) < 10){
|
||||||
|
// e.preventDefault();
|
||||||
|
// }
|
||||||
|
// clearTimeout(self.ParamImages.operation.time);
|
||||||
|
|
||||||
|
// },false);
|
||||||
|
// item[0].addEventListener("touchend",function(e){
|
||||||
|
// clearTimeout(self.ParamImages.operation.time);
|
||||||
|
// // if(self.ParamImages.operation.istouch){
|
||||||
|
// self.ParamImages.operation.target.removeClass('fixed');
|
||||||
|
// self.ParamImages.operation.target.find('.circular-box').removeClass('top left right');
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// },false)
|
||||||
|
},
|
||||||
|
ImagesLayoutInit(){
|
||||||
|
var self = this;
|
||||||
|
if(self.ParamSort.layout.value == 'waterFall'){
|
||||||
|
self.ImagesWaterfalllayoutCompute();
|
||||||
|
}else if(self.ParamSort.layout.value == 'rowGrid'){
|
||||||
|
self.ImagesRowGridtlayoutCompute();
|
||||||
|
}else{
|
||||||
|
self.ImagesListlayoutCompute();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ImagesRowGridtlayoutCompute(){
|
||||||
|
var self = this;
|
||||||
|
var imagerowGrid = self.ParamImages.imagerowGrid;
|
||||||
|
if(self.ParamImages.type == 'refresh' || !self.ParamImages.data.length){
|
||||||
|
imagerowGrid.maxNewtop = 0;
|
||||||
|
imagerowGrid.rowWidth = 0;
|
||||||
|
imagerowGrid.rowElems = [];
|
||||||
|
imagerowGrid.maxNewLeft = 0;
|
||||||
|
imagerowGrid.perpage = 0;
|
||||||
|
imagerowGrid.SurplusImgdatas = [];
|
||||||
|
imagerowGrid.StoreImgdatas = [];
|
||||||
|
this.ParamImages.Newdatas = {};
|
||||||
|
}
|
||||||
|
if(!self.ParamImages.data.length){
|
||||||
|
$('#imgContainer').height(0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var OtherHeight = 0
|
||||||
|
if(self.ParamSort.showinformation.value.indexOf('name')>-1 || self.ParamSort.showinformation.value.indexOf('extension')>-1){
|
||||||
|
OtherHeight += 45;
|
||||||
|
}
|
||||||
|
if(self.ParamSort.showinformation.value.indexOf('other')>-1){
|
||||||
|
OtherHeight += 20;
|
||||||
|
}
|
||||||
|
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.ParamImages.data.length;++findex){
|
||||||
|
var str = JSON.parse(JSON.stringify(self.ParamImages.data[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 > 260) {
|
||||||
|
h = 260;
|
||||||
|
w = r * h;
|
||||||
|
} else if (w < 260) {
|
||||||
|
w = 260;
|
||||||
|
h = 260;
|
||||||
|
}
|
||||||
|
arr[rid]['pwidth'] = w;
|
||||||
|
arr[rid]['pheight'] = h;
|
||||||
|
}
|
||||||
|
var documentW = document.body.clientWidth;
|
||||||
|
var boxWidth = documentW-8;
|
||||||
|
$('#imgContainer').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 = [];
|
||||||
|
}
|
||||||
|
$('#imgContainer').height(imagerowGrid.maxNewtop+surplusheight+60);
|
||||||
|
|
||||||
|
imagerowGrid.perpage = self.ParamImages.data.length;
|
||||||
|
var newarr = [];
|
||||||
|
for(var n in arr){
|
||||||
|
newarr.push(arr[n]);
|
||||||
|
}
|
||||||
|
if(self.ParamImages.type == 'append'){
|
||||||
|
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.ImagesLayoutScrollShow()
|
||||||
|
},
|
||||||
|
ImagesListlayoutCompute(){
|
||||||
|
var self = this;
|
||||||
|
if(self.ParamImages.type == 'refresh' || !self.ParamImages.data.length){
|
||||||
|
self.ParamImages.imageList.perpage = 0;
|
||||||
|
var documentW = document.body.clientWidth;
|
||||||
|
var boxWidth = documentW-8;
|
||||||
|
$('#imgContainer').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.ParamImages.imageList.maxNewLeft = 0;
|
||||||
|
self.ParamImages.imageList.maxNewtop = 0;
|
||||||
|
self.ParamImages.imageList.fcolumns = 1;
|
||||||
|
self.ParamImages.imageList.boxHeight = 0;
|
||||||
|
self.ParamImages.imageList.StoreImgdatas = [];
|
||||||
|
self.ParamImages.Newdatas = {};
|
||||||
|
self.ParamImages.imageList.columns = columns;
|
||||||
|
self.ParamImages.imageList.newWidth = (boxWidth-(columns*self.ParamImages.imageList.Margin-self.ParamImages.imageList.Margin)) / columns;
|
||||||
|
self.ParamImages.imageList.newHeight = 2 / 3 * self.ParamImages.imageList.newWidth;
|
||||||
|
|
||||||
|
var OtherHeight = 0
|
||||||
|
if(self.ParamSort.showinformation.value.indexOf('name')>-1 || self.ParamSort.showinformation.value.indexOf('extension')>-1){
|
||||||
|
OtherHeight += 45;
|
||||||
|
}
|
||||||
|
if(self.ParamSort.showinformation.value.indexOf('other')>-1){
|
||||||
|
OtherHeight += 20;
|
||||||
|
}
|
||||||
|
self.ParamImages.imageList.OtherHeight = OtherHeight;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!self.ParamImages.data.length){
|
||||||
|
$('#imgContainer').height(0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var arr = [];
|
||||||
|
var i = 0;
|
||||||
|
for(var index = self.ParamImages.imageList.perpage; index < self.ParamImages.data.length;++index){
|
||||||
|
var item = JSON.parse(JSON.stringify(self.ParamImages.data[index]));
|
||||||
|
arr[i] = item;
|
||||||
|
arr[i]['pwidth'] = self.ParamImages.imageList.newWidth;
|
||||||
|
arr[i]['pheight'] = self.ParamImages.imageList.newHeight;
|
||||||
|
arr[i]['ptop'] = self.ParamImages.imageList.maxNewtop;
|
||||||
|
arr[i]['pleft'] = self.ParamImages.imageList.maxNewLeft;
|
||||||
|
arr[i]['pbottom'] = self.ParamImages.imageList.maxNewtop + self.ParamImages.imageList.newHeight+self.ParamImages.imageList.OtherHeight;
|
||||||
|
self.ParamImages.imageList.maxNewLeft += self.ParamImages.imageList.newWidth+self.ParamImages.imageList.Margin;
|
||||||
|
self.ParamImages.imageList.fcolumns++;
|
||||||
|
if(self.ParamImages.imageList.fcolumns > self.ParamImages.imageList.columns){
|
||||||
|
self.ParamImages.imageList.maxNewLeft = 0;
|
||||||
|
self.ParamImages.imageList.maxNewtop += self.ParamImages.imageList.newHeight+self.ParamImages.imageList.Margin+self.ParamImages.imageList.OtherHeight;
|
||||||
|
self.ParamImages.imageList.fcolumns = 1;
|
||||||
|
self.ParamImages.imageList.boxHeight = self.ParamImages.imageList.maxNewtop;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
self.ParamImages.imageList.perpage = self.ParamImages.data.length;
|
||||||
|
if(self.ParamImages.type == 'append'){
|
||||||
|
self.ParamImages.imageList.StoreImgdatas.push.apply(self.ParamImages.imageList.StoreImgdatas,arr);
|
||||||
|
}else{
|
||||||
|
self.ParamImages.imageList.StoreImgdatas = arr;
|
||||||
|
}
|
||||||
|
if(self.ParamImages.imageList.fcolumns>1&&self.ParamImages.imageList.fcolumns<self.ParamImages.imageList.columns+1){
|
||||||
|
self.ParamImages.imageList.boxHeight += self.ParamImages.imageList.newHeight+self.ParamImages.imageList.OtherHeight;
|
||||||
|
}
|
||||||
|
$('#imgContainer').height(self.ParamImages.imageList.boxHeight+60);
|
||||||
|
self.ImagesLayoutScrollShow()
|
||||||
|
},
|
||||||
|
ImagesWaterfalllayoutCompute(){
|
||||||
|
var self = this;
|
||||||
|
var boxWidth = $('.img-container').width()-8;
|
||||||
|
if(self.ParamImages.type == 'refresh' || !self.ParamImages.data.length){
|
||||||
|
self.ParamImages.imgageWaterfall.imgArr = [];
|
||||||
|
self.ParamImages.imgageWaterfall.perpage = 0;
|
||||||
|
self.ParamImages.imgageWaterfall.StoreImgdatas = [];
|
||||||
|
self.ParamImages.Newdatas = {};
|
||||||
|
var documentW = document.body.clientWidth;
|
||||||
|
if(documentW<768){
|
||||||
|
self.ParamImages.imgageWaterfall.isMax = false;
|
||||||
|
self.ParamImages.imgageWaterfall.columns = 2;
|
||||||
|
self.ParamImages.imgageWaterfall.imgWidth = boxWidth/2;
|
||||||
|
}else{
|
||||||
|
self.ParamImages.imgageWaterfall.isMax = true;
|
||||||
|
self.ParamImages.imgageWaterfall.imgWidth = 252;
|
||||||
|
self.ParamImages.imgageWaterfall.columns = parseInt(boxWidth/self.ParamImages.imgageWaterfall.imgWidth);
|
||||||
|
}
|
||||||
|
var OtherHeight = 0
|
||||||
|
if(self.ParamSort.showinformation.value.indexOf('name')>-1 || self.ParamSort.showinformation.value.indexOf('extension')>-1){
|
||||||
|
OtherHeight += 45;
|
||||||
|
}
|
||||||
|
if(self.ParamSort.showinformation.value.indexOf('other')>-1){
|
||||||
|
OtherHeight += 20;
|
||||||
|
}
|
||||||
|
self.ParamImages.imgageWaterfall.OtherHeight = OtherHeight;
|
||||||
|
}
|
||||||
|
if(!self.ParamImages.data.length){
|
||||||
|
$('#imgContainer').height(0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var pwidth = self.ParamImages.imgageWaterfall.imgWidth;
|
||||||
|
var arr = [];
|
||||||
|
var i = 0;
|
||||||
|
for (var index = self.ParamImages.imgageWaterfall.perpage; index < self.ParamImages.data.length; index++){
|
||||||
|
arr[i] = JSON.parse(JSON.stringify(self.ParamImages.data[index]));
|
||||||
|
var ppwidth = pwidth-8;
|
||||||
|
if(self.ParamImages.imgageWaterfall.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.ParamImages.imgageWaterfall.columns) {
|
||||||
|
arr[i]['ptop'] = 0;
|
||||||
|
arr[i]['pleft'] = pwidth*index;
|
||||||
|
arr[i]['pbottom'] = arr[i]['ptop']+arr[i]['pheight']+self.ParamImages.imgageWaterfall.Margin+self.ParamImages.imgageWaterfall.OtherHeight;
|
||||||
|
var imgArr = JSON.parse(JSON.stringify(arr[i]));
|
||||||
|
self.ParamImages.imgageWaterfall.imgArr.push(imgArr);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
var minHeight = self.ParamImages.imgageWaterfall.imgArr[0]['pbottom'];
|
||||||
|
var findex = 0;
|
||||||
|
for (var j = 0; j < self.ParamImages.imgageWaterfall.imgArr.length; j++) {
|
||||||
|
if (minHeight > self.ParamImages.imgageWaterfall.imgArr[j]['pbottom']) {
|
||||||
|
minHeight = self.ParamImages.imgageWaterfall.imgArr[j]['pbottom'];
|
||||||
|
findex = j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr[i]['ptop'] = JSON.parse(JSON.stringify(self.ParamImages.imgageWaterfall.imgArr[findex]['pbottom']));
|
||||||
|
arr[i]['pleft'] = JSON.parse(JSON.stringify(self.ParamImages.imgageWaterfall.imgArr[findex]['pleft']));
|
||||||
|
arr[i]['pbottom'] = arr[i]['ptop']+arr[i]['pheight']+self.ParamImages.imgageWaterfall.Margin+self.ParamImages.imgageWaterfall.OtherHeight;
|
||||||
|
|
||||||
|
var imgArr = JSON.parse(JSON.stringify(arr[i]));
|
||||||
|
self.ParamImages.imgageWaterfall.imgArr[findex] = imgArr;
|
||||||
|
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
self.ParamImages.imgageWaterfall.perpage = self.ParamImages.data.length;
|
||||||
|
if(self.ParamImages.type == 'append'){
|
||||||
|
self.ParamImages.imgageWaterfall.StoreImgdatas.push.apply(self.ParamImages.imgageWaterfall.StoreImgdatas,arr);
|
||||||
|
}else{
|
||||||
|
self.ParamImages.imgageWaterfall.StoreImgdatas = arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
var fminHeight = self.ParamImages.imgageWaterfall.imgArr[0]['pbottom'];
|
||||||
|
for (var j = 0; j < self.ParamImages.imgageWaterfall.imgArr.length; j++) {
|
||||||
|
if (fminHeight < self.ParamImages.imgageWaterfall.imgArr[j]['pbottom']) {
|
||||||
|
fminHeight = self.ParamImages.imgageWaterfall.imgArr[j]['pbottom'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.ParamImages.imgageWaterfall.boxHeight = fminHeight;
|
||||||
|
$('#imgContainer').css({
|
||||||
|
height:self.ParamImages.imgageWaterfall.boxHeight+60+'px',
|
||||||
|
width:self.ParamImages.imgageWaterfall.columns*pwidth+'px'
|
||||||
|
});
|
||||||
|
self.ImagesLayoutScrollShow();
|
||||||
|
|
||||||
|
},
|
||||||
|
ImagesLayoutScrollShow(){
|
||||||
|
var self = this;
|
||||||
|
var H = jQuery('.pic-container-scroll')[0].clientHeight;//获取可视区域高度
|
||||||
|
var S = jQuery('.pic-container-scroll')[0].scrollTop;
|
||||||
|
var arr = [];
|
||||||
|
|
||||||
|
if(self.ParamSort.layout.value == 'waterFall'){
|
||||||
|
var StoreImgdatas = JSON.parse(JSON.stringify(self.ParamImages.imgageWaterfall.StoreImgdatas));
|
||||||
|
}else if(self.ParamSort.layout.value == 'rowGrid'){
|
||||||
|
var StoreImgdatas = JSON.parse(JSON.stringify(self.ParamImages.imagerowGrid.StoreImgdatas));
|
||||||
|
}else{
|
||||||
|
var StoreImgdatas = JSON.parse(JSON.stringify(self.ParamImages.imageList.StoreImgdatas));
|
||||||
|
}
|
||||||
|
self.ParamImages.Newdatas = {};
|
||||||
|
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.ParamImages.Newdatas[item.rid] = item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
272
dzz/pichome/template/mobile/components/index/JsIndex.htm
Normal file
272
dzz/pichome/template/mobile/components/index/JsIndex.htm
Normal file
@@ -0,0 +1,272 @@
|
|||||||
|
<van-nav-bar class="header-top" :class="ParamFooter.IsShow=='up'?'':'headerhide'" title="" left-text="" left-arrow>
|
||||||
|
<template #left>
|
||||||
|
<div class="pic-logo" slot="left">
|
||||||
|
<a class="h-left" href="$_G[siteurl]">
|
||||||
|
<img src="data/attachment/sitelogo/sitelogo.png?{VERHASH}" alt="">
|
||||||
|
<span class="text">$_G['setting'][sitename]</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<van-dropdown-menu>
|
||||||
|
<van-dropdown-item @change="ChangeLibrary" v-model="ParamLibrary.activeId" :options="ParamLibrary.fdata" />
|
||||||
|
</van-dropdown-menu>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</van-nav-bar>
|
||||||
|
<div class="pic-container">
|
||||||
|
<!--{template mobile/components/index/JsImages}-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="pic-toolbar" :class="ParamFooter.IsShow=='up'?'footershow':'footerhide'">
|
||||||
|
<div class="tabbar">
|
||||||
|
<template v-for="item in ParamFooter.data">
|
||||||
|
<template v-if="item.show">
|
||||||
|
<template v-if="item.type == 'user'">
|
||||||
|
<div class="tab-item" @click="MyPopupVisible=true">
|
||||||
|
<div id="dzz_avatar_img">{eval echo avatar_block($_G[uid]);} </div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="tab-item" @click="handleFooterClick(item.type)">
|
||||||
|
<i :class="item.icon" style="position: relative;">
|
||||||
|
<template v-if="item.type == 'search'">
|
||||||
|
<div v-if="ParamSearch.keyword" class="van-info van-info--dot van-sidebar-item__info"></div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="item.type == 'screen'">
|
||||||
|
<div v-if="ParamScreen.ActiveNum" class="van-info van-info--dot van-sidebar-item__info"></div>
|
||||||
|
</template>
|
||||||
|
</i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<!--{template mobile/components/index/JsCommon}-->
|
||||||
|
<!--{template mobile/components/index/JsSearch}-->
|
||||||
|
<!--{template mobile/components/index/JsSort}-->
|
||||||
|
<!--{template mobile/components/index/JsScreen}-->
|
||||||
|
<!--{template mobile/components/index/JsMy}-->
|
||||||
|
<script type="text/javascript">
|
||||||
|
Vue.component('screenclassify', {
|
||||||
|
template: `<van-collapse v-model="parammodel.activeNames" :border="false">
|
||||||
|
<van-collapse-item v-for="item in paramdata" :key="item.fid" :name="item.fid" disabled :class="{'active':parammodel.value.indexOf(item.fid)>-1}" :ref="'collapse_'+item.fid">
|
||||||
|
<template #title>
|
||||||
|
<div @click.stop="ScreenClassifyClick(item)">
|
||||||
|
{{item.fname}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #right-icon>
|
||||||
|
<template v-if="item.children && item.children.length">
|
||||||
|
<i @click.stop="ScreenClassifyToggle(item.fid)" class="van-icon van-icon-arrow van-cell__right-icon"></i>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div style="width: 20px;"></div>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.children && item.children.length">
|
||||||
|
<screenclassify :parammodel="parammodel" :paramdata="item.children" @screenclassifychange="screenclassifychange"></screenclassify>
|
||||||
|
</template>
|
||||||
|
</van-collapse-item>
|
||||||
|
</van-collapse>`,
|
||||||
|
props:['paramdata','parammodel'],
|
||||||
|
data: function() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
ScreenClassifyClick(item){
|
||||||
|
var self = this;
|
||||||
|
var index = this.parammodel.value.indexOf(item.fid);
|
||||||
|
if(index> -1){
|
||||||
|
this.parammodel.value.splice(index,1);
|
||||||
|
this.ScreenClassifyChild(item.children,'del');
|
||||||
|
}else{
|
||||||
|
this.parammodel.value.push(item.fid);
|
||||||
|
this.ScreenClassifyChild(item.children,'add');
|
||||||
|
}
|
||||||
|
self.$emit('screenclassifychange');
|
||||||
|
},
|
||||||
|
ScreenClassifyChild(item,type){
|
||||||
|
var classify = this.parammodel.value;
|
||||||
|
for(var i in item){
|
||||||
|
var fitem = item[i];
|
||||||
|
var index = classify.indexOf(fitem.fid);
|
||||||
|
if(type == 'add'){
|
||||||
|
if(index<0){
|
||||||
|
classify.push(fitem.fid)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(index>-1){
|
||||||
|
classify.splice(index,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(fitem.children && fitem.children.length){
|
||||||
|
this.ScreenClassifyChild(fitem.children,type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
screenclassifychange(){
|
||||||
|
var self = this;
|
||||||
|
self.$emit('screenclassifychange');
|
||||||
|
},
|
||||||
|
ScreenClassifyToggle(fid){
|
||||||
|
var self = this;
|
||||||
|
if(self.$refs['collapse_'+fid] && self.$refs['collapse_'+fid].length){
|
||||||
|
self.$refs['collapse_'+fid][0].toggle();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
el: '#dzzoffice',
|
||||||
|
data: function() {
|
||||||
|
return $.extend({},MyData,SearchData,SortData,ImagesData,ScreenData,{
|
||||||
|
ParamFooter:{
|
||||||
|
IsShow:'up',
|
||||||
|
data:{
|
||||||
|
clear:{type:'clear',icon:'icon ri-brush-3-line',show:false},
|
||||||
|
search:{type:'search',icon:'icon ri-search-line',show:true},
|
||||||
|
screen:{type:'screen',icon:'icon ri-filter-2-fill',show:false},
|
||||||
|
sort:{type:'sort',icon:'icon ri-arrow-up-down-fill',show:true},
|
||||||
|
user:{type:'user',icon:'',show:true}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ParamDataInit:{
|
||||||
|
appid:'',
|
||||||
|
keyword:'',
|
||||||
|
asc: "desc",
|
||||||
|
order: 1,
|
||||||
|
page: 1,
|
||||||
|
classify:'',
|
||||||
|
tag:'',
|
||||||
|
color:'',
|
||||||
|
link:'',
|
||||||
|
desc:'',
|
||||||
|
duration:'',
|
||||||
|
wsize:'',
|
||||||
|
hsize:'',
|
||||||
|
ext:'',
|
||||||
|
shape:'',
|
||||||
|
shapesize:'',
|
||||||
|
grade:'',
|
||||||
|
btime:'',
|
||||||
|
dateline:'',
|
||||||
|
mtime:''
|
||||||
|
},
|
||||||
|
ParamData:{},
|
||||||
|
ParamBasic:{
|
||||||
|
page: 1,
|
||||||
|
perpage: 50,
|
||||||
|
total: 0,
|
||||||
|
totalpage:0,
|
||||||
|
},
|
||||||
|
ParamLibrary:{
|
||||||
|
activeId:'',
|
||||||
|
data:$apps || [],
|
||||||
|
fdata:[]
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
watch: $.extend({},ImagesWatchJs,{
|
||||||
|
|
||||||
|
}),
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
var pagesetting = $pagesetting;
|
||||||
|
console.log(pagesetting)
|
||||||
|
if(pagesetting){
|
||||||
|
var show = [];
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
if(pagesetting.show){
|
||||||
|
show = pagesetting.show.split(',');
|
||||||
|
}
|
||||||
|
<!--{else}-->
|
||||||
|
var fshow = sessionStorage.getItem('InformationShow');
|
||||||
|
if(fshow){
|
||||||
|
show = fshow.split(',');
|
||||||
|
}else{
|
||||||
|
if(pagesetting.show){
|
||||||
|
show = pagesetting.show.split(',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<!--{/if}-->
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
var other = pagesetting.other;
|
||||||
|
var Layout = pagesetting.layout;
|
||||||
|
var order = parseInt(pagesetting.sort);
|
||||||
|
var asc = pagesetting.desc;
|
||||||
|
<!--{else}-->
|
||||||
|
var other = sessionStorage.getItem('InformationOther');
|
||||||
|
if(!other){
|
||||||
|
other = pagesetting.other;
|
||||||
|
}
|
||||||
|
var Layout = sessionStorage.getItem('Layout');
|
||||||
|
if(!Layout){
|
||||||
|
Layout = pagesetting.layout;
|
||||||
|
}
|
||||||
|
|
||||||
|
var order = sessionStorage.getItem('order');
|
||||||
|
if(!order){
|
||||||
|
order = parseInt(pagesetting.sort);
|
||||||
|
}
|
||||||
|
var asc = sessionStorage.getItem('asc');
|
||||||
|
if(!asc){
|
||||||
|
asc = pagesetting.desc;
|
||||||
|
}
|
||||||
|
<!--{/if}-->
|
||||||
|
this.ParamSort.showinformation.value = show;
|
||||||
|
this.ParamSort.otherinformation.value = other || 'btime';
|
||||||
|
this.ParamSort.layout.value = Layout || 'waterFall';
|
||||||
|
this.ParamSort.Sorttype.value = order || 1;
|
||||||
|
this.ParamSort.sortorder.value = asc || 'desc';
|
||||||
|
|
||||||
|
this.ParamDataInit.order = order || 1;
|
||||||
|
this.ParamDataInit.asc = asc || 'desc';
|
||||||
|
}
|
||||||
|
this.StartData();
|
||||||
|
},
|
||||||
|
methods:$.extend({},CommonJs,SearchJs,MyJs,ScreenJs,SortJs,ImagesJs,{
|
||||||
|
StartData(){
|
||||||
|
this.CommonLibrary();
|
||||||
|
},
|
||||||
|
ChangeLibrary(val){//库改变
|
||||||
|
if(val){
|
||||||
|
window.location.hash = '#appid='+val;
|
||||||
|
}else{
|
||||||
|
window.location.hash = '';
|
||||||
|
}
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
|
handleFooterClick(type){
|
||||||
|
if(type == 'search'){
|
||||||
|
this.ParamSearch.PopupVisible = true;
|
||||||
|
}else if(type == 'screen'){
|
||||||
|
this.ParamScreen.PopupVisible = true;
|
||||||
|
}else if(type == 'sort'){
|
||||||
|
this.ParamSort.PopupVisible = true;
|
||||||
|
}else if(type == 'clear'){
|
||||||
|
this.ParamSearch.keyword = '';
|
||||||
|
this.ScreenReset();
|
||||||
|
this.CommonSetFooterBadge();
|
||||||
|
this.CommonhandleHash();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}),
|
||||||
|
mounted() {
|
||||||
|
this.ImagesMounted();
|
||||||
|
// this.DetailMounted();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
100
dzz/pichome/template/mobile/components/index/JsMy.htm
Normal file
100
dzz/pichome/template/mobile/components/index/JsMy.htm
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<van-popup v-model="MyPopupVisible" class="my-popup" position="right">
|
||||||
|
<van-nav-bar title="我的设置" left-arrow @click-left="MyNavbarLeftClick"></van-nav-bar>
|
||||||
|
<div class="scroll-box">
|
||||||
|
<van-cell-group>
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
<van-cell clickable title="个人设置" is-link @click="MyClick('person')"></van-cell>
|
||||||
|
<!--{/if}-->
|
||||||
|
<van-cell clickable title="帮助文档" @click="MyClick('help')">
|
||||||
|
<template #right-icon>
|
||||||
|
<i class="ri-arrow-right-up-line"></i>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
<van-cell clickable title="问题反馈" @click="MyClick('question')">
|
||||||
|
<template #right-icon>
|
||||||
|
<i class="ri-arrow-right-up-line"></i>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
<van-cell clickable title="关于PicHome" is-link @click="MyClick('about')"></van-cell>
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
<van-cell clickable title="退出登录" @click="MyClick('out')">
|
||||||
|
<template #right-icon>
|
||||||
|
<i class="ri-logout-box-r-line"></i>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
<!--{else}-->
|
||||||
|
<van-cell clickable title="登录PicHome" @click="MyClick('login')" is-link></van-cell>
|
||||||
|
<!--{/if}-->
|
||||||
|
|
||||||
|
</van-cell-group>
|
||||||
|
</div>
|
||||||
|
</van-popup>
|
||||||
|
<van-popup v-model="AboutPopupVisible" class="about-popup" position="right">
|
||||||
|
<van-nav-bar title="关于PicHome" left-arrow @click-left="AboutNavbarLeftClick"></van-nav-bar>
|
||||||
|
<div class="scroll-box">
|
||||||
|
<div class="aboutlogo">
|
||||||
|
<img src="dzz/pichome/image/phlogo.png" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="aboutmessage">
|
||||||
|
<div class="aboutlist">
|
||||||
|
<span class="title">软件名称:</span><span class="mes">欧奥PicHome</span>
|
||||||
|
</div>
|
||||||
|
<div class="aboutlist">
|
||||||
|
<span class="title">版本信息:</span><span class="mes">$_G[setting][version]</span>
|
||||||
|
</div>
|
||||||
|
<div class="aboutlist">
|
||||||
|
<span class="title">版权信息:</span><span class="mes">Powered By oaooa PicHome © 2020-2021 欧奥图文</span>
|
||||||
|
</div>
|
||||||
|
<div class="aboutlist">
|
||||||
|
<span class="title">网站地址:</span><span class="mes"><a class="address" href="https://oaooa.com/" target="_blank">oaooa.com</a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</van-popup>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var MyData = {
|
||||||
|
MyPopupVisible:false,
|
||||||
|
AboutPopupVisible:false,
|
||||||
|
};
|
||||||
|
var MyJs = {
|
||||||
|
MyNavbarLeftClick(){
|
||||||
|
this.MyPopupVisible = false;
|
||||||
|
},
|
||||||
|
AboutNavbarLeftClick(){
|
||||||
|
this.AboutPopupVisible = false;
|
||||||
|
},
|
||||||
|
MyClick(type){
|
||||||
|
var self = this;
|
||||||
|
switch(type){
|
||||||
|
case 'person':
|
||||||
|
window.location.href = MOD_URL + '&op=user&do=personal';
|
||||||
|
break;
|
||||||
|
case 'help':
|
||||||
|
window.location.href = "https://www.yuque.com/pichome";
|
||||||
|
break;
|
||||||
|
case 'question':
|
||||||
|
window.location.href = "https://support.qq.com/products/340252";
|
||||||
|
break;
|
||||||
|
case 'about':
|
||||||
|
this.AboutPopupVisible = true;
|
||||||
|
break;
|
||||||
|
case 'out':
|
||||||
|
self.$dialog.confirm({
|
||||||
|
title: '提示',
|
||||||
|
message: '您确定要注销登录?',
|
||||||
|
}).then(() => {
|
||||||
|
// on confirm
|
||||||
|
jQuery.get('user.php?mod=login&op=logging&action=logout&formhash={FORMHASH}&t='+new Date().getTime(),function(data){
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
// on cancel
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'login':
|
||||||
|
window.location.href = SITEURL+'user.php?mod=login';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
1603
dzz/pichome/template/mobile/components/index/JsScreen.htm
Normal file
1603
dzz/pichome/template/mobile/components/index/JsScreen.htm
Normal file
File diff suppressed because it is too large
Load Diff
161
dzz/pichome/template/mobile/components/index/JsSearch.htm
Normal file
161
dzz/pichome/template/mobile/components/index/JsSearch.htm
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
<van-popup class="seasrch-popup footer-popup" v-model="ParamSearch.PopupVisible" round position="bottom" :style="{ height: '90%' }" @open="SearchPopupOpen" @close="SearchPopupClose">
|
||||||
|
<div class="vam-popup-title" @click="ParamSearch.PopupVisible=false">搜索</div>
|
||||||
|
<div class="van-search-box">
|
||||||
|
<van-search class="popup-search-input" v-model.trim="ParamSearch.keyword" shape="round" placeholder="输入关键词" @input="SearchInputKeyword" maxlength="50" :clearable="false">
|
||||||
|
<template #right-icon>
|
||||||
|
<van-icon v-show="ParamSearch.keyword" @click="SearchClearKeyword" name="cross" />
|
||||||
|
</template>
|
||||||
|
</van-search>
|
||||||
|
</div>
|
||||||
|
<div class="search-val-box">
|
||||||
|
<template v-if="ParamSearch.keyword">
|
||||||
|
<template v-if="ParamSearch.likeloading">
|
||||||
|
<van-loading class="custom-load" size="24px" type="spinner" color="var(--color-primary)" vertical>加载中...</van-loading>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<van-list>
|
||||||
|
<van-cell v-for="(item,index) in ParamSearch.likedata" :key="index" @click="SearchClickLike(item.text)">
|
||||||
|
<template #title>
|
||||||
|
<div v-html="item.highlight"></div>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
</van-list>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<template v-if="ParamSearch.hostloading">
|
||||||
|
<van-loading class="custom-load" size="24px" type="spinner" color="var(--color-primary)" vertical>加载中...</van-loading>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="search-host">
|
||||||
|
<div class="search-host-list" v-for="item in ParamSearch.hostdata" :style="{backgroundImage: 'url('+item.icondata+')'}" @click="SearchClickLike(item.keyword)">
|
||||||
|
<div class="bg"></div>
|
||||||
|
<div class="text">{{item.keyword}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<div class="btn-bottom">
|
||||||
|
<van-row gutter="20">
|
||||||
|
<van-col span="12" style="text-align: center;">
|
||||||
|
<van-button round plain type="primary" size="large" @click="SearchClearKeyword">重置</van-button>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12" style="text-align: center;">
|
||||||
|
<van-button round type="info" size="large" @click="SearchConfirmval">确定</van-button>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</van-popup>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var SearchData = {
|
||||||
|
ParamSearch:{
|
||||||
|
PopupVisible:false,
|
||||||
|
keyword: '',
|
||||||
|
keywordDefault:'',
|
||||||
|
hostloading:true,
|
||||||
|
hostdata:[],
|
||||||
|
likeloading:true,
|
||||||
|
likedata:[]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var SearchJs = {
|
||||||
|
SearchPopupOpen() {
|
||||||
|
var self = this;
|
||||||
|
if(self.ParamSearch.keyword){
|
||||||
|
self.SearchLikeword();
|
||||||
|
}else{
|
||||||
|
self.SearchHottag();
|
||||||
|
}
|
||||||
|
self.ParamSearch.keywordDefault = self.ParamSearch.keyword;
|
||||||
|
},
|
||||||
|
SearchPopupClose(){
|
||||||
|
var self = this;
|
||||||
|
if(self.ParamSearch.keywordDefault == self.ParamSearch.keyword){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
self.CommonhandleHash();
|
||||||
|
self.CommonAddkeyword(self.ParamSearch.keyword,0);
|
||||||
|
},
|
||||||
|
SearchClearKeyword(){
|
||||||
|
this.ParamSearch.keyword = '';
|
||||||
|
if(this.ParamSearch.hostloading){
|
||||||
|
this.SearchHottag();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SearchInputKeyword(val){
|
||||||
|
if(val){
|
||||||
|
this.SearchLikeword();
|
||||||
|
}else{
|
||||||
|
if(this.ParamSearch.hostloading){
|
||||||
|
this.SearchHottag();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SearchConfirmval(){
|
||||||
|
this.ParamSearch.PopupVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
SearchHottag(){
|
||||||
|
var self = this;
|
||||||
|
self.ParamSearch.hostloading = true;
|
||||||
|
$.post(MOD_URL+'&op=ajax&operation=getsearchtag',{
|
||||||
|
appid:self.ParamLibrary.activeId
|
||||||
|
},function(data){
|
||||||
|
self.ParamSearch.hostdata = data.hottags?data.hottags:[];
|
||||||
|
self.ParamSearch.hostloading = false;
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
SearchLikeword(){
|
||||||
|
var self = this;
|
||||||
|
this.ParamSearch.likeloading = true;
|
||||||
|
$.post(MOD_URL+'&op=ajax&operation=likewords',{
|
||||||
|
keyword:self.ParamSearch.keyword,
|
||||||
|
appid:self.ParamLibrary.activeId
|
||||||
|
},function(data){
|
||||||
|
self.ParamSearch.likedata = [];
|
||||||
|
if(data && data.likewords){
|
||||||
|
for(var i in data.likewords){
|
||||||
|
var text = data.likewords[i];
|
||||||
|
var highlight = self.SearchHighlight(text,self.ParamSearch.keyword);
|
||||||
|
self.ParamSearch.likedata.push({
|
||||||
|
text:text,
|
||||||
|
highlight:highlight
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
self.ParamSearch.likeloading = false;
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
SearchHighlight(text,words){
|
||||||
|
// 默认的标签,如果没有指定,使用span
|
||||||
|
var i, len = words.length,
|
||||||
|
re;
|
||||||
|
//匹配每一个特殊字符 ,进行转义
|
||||||
|
var specialStr = ["*", ".", "?", "+", "$", "^", "[", "]", "{", "}", "|", "\\", "(", ")", "/", "%"];
|
||||||
|
$.each(specialStr, function(i, item) {
|
||||||
|
if(words.indexOf(item) != -1) {
|
||||||
|
words = words.replace(new RegExp("\\" + item, 'g'), "\\" + item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//匹配整个关键词
|
||||||
|
re = new RegExp(words, 'g');
|
||||||
|
if(re.test(text)) {
|
||||||
|
text = text.replace(re, '<span class="highlight">$&</span>');
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
},
|
||||||
|
SearchClickLike(val){
|
||||||
|
var self = this;
|
||||||
|
if(self.ParamSearch.keyword != val){
|
||||||
|
self.ParamSearch.keyword = val;
|
||||||
|
self.ParamSearch.PopupVisible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
270
dzz/pichome/template/mobile/components/index/JsSort.htm
Normal file
270
dzz/pichome/template/mobile/components/index/JsSort.htm
Normal file
@@ -0,0 +1,270 @@
|
|||||||
|
<van-popup class="sort-popup footer-popup" v-model="ParamSort.PopupVisible" round position="bottom" style="height: 90%;padding-top: 10px;" @open="sortpopupopen">
|
||||||
|
<div class="vam-popup-title" v-if="ParamSort.data[ParamSort.labelActive]" @click="SortPopupTitleClick">{{ParamSort.data[ParamSort.labelActive].text}}</div>
|
||||||
|
<van-tree-select
|
||||||
|
height="100%"
|
||||||
|
:items="ParamSort.data"
|
||||||
|
:main-active-index.sync="ParamSort.labelActive">
|
||||||
|
<template #content>
|
||||||
|
<template v-if="ParamSort.data[ParamSort.labelActive]['type'] == 'showinformation'">
|
||||||
|
<div class="screen-item" style="padding: 0;">
|
||||||
|
<van-checkbox-group v-model="ParamSort.showinformation.value" @change="SortShowinformationChange">
|
||||||
|
<van-cell-group>
|
||||||
|
<van-cell v-for="(item,index) in ParamSort.showinformation.data" clickable :title="item.val" @click="SortShowinformationClick(index)">
|
||||||
|
<template #right-icon>
|
||||||
|
<van-checkbox shape="square" :name="item.key" ref="showinformation" />
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
</van-checkbox-group>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="ParamSort.data[ParamSort.labelActive]['type'] == 'otherinformation'">
|
||||||
|
<div class="screen-item" style="padding: 0;">
|
||||||
|
<van-radio-group v-model="ParamSort.otherinformation.value">
|
||||||
|
<van-cell-group>
|
||||||
|
<van-cell v-for="item in ParamSort.otherinformation.data" :title="item.val" clickable @click="SortotherinformationChange(item.key)">
|
||||||
|
<template #right-icon>
|
||||||
|
<van-radio :name="item.key"></van-radio>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
</van-radio-group>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="ParamSort.data[ParamSort.labelActive]['type'] == 'Sorttype'">
|
||||||
|
<div class="screen-item" style="padding: 0;">
|
||||||
|
<van-radio-group v-model="ParamSort.Sorttype.value">
|
||||||
|
<van-cell-group>
|
||||||
|
<van-cell v-for="item in ParamSort.Sorttype.data" :title="item.val" clickable @click="SortSorttypeChange (item.key)">
|
||||||
|
<template #right-icon>
|
||||||
|
<van-radio :name="item.key"></van-radio>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
</van-radio-group>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="ParamSort.data[ParamSort.labelActive]['type'] == 'sortorder'">
|
||||||
|
<div class="screen-item" style="padding: 0;">
|
||||||
|
<van-radio-group v-model="ParamSort.sortorder.value">
|
||||||
|
<van-cell-group>
|
||||||
|
<van-cell v-for="item in ParamSort.sortorder.data" :title="item.val" clickable @click="SortsortorderChange(item.key)">
|
||||||
|
<template #right-icon>
|
||||||
|
<van-radio :name="item.key"></van-radio>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
</van-radio-group>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-if="ParamSort.data[ParamSort.labelActive]['type'] == 'layout'">
|
||||||
|
<div class="screen-item" style="padding: 0;">
|
||||||
|
<van-radio-group v-model="ParamSort.layout.value">
|
||||||
|
<van-cell-group>
|
||||||
|
<van-cell v-for="item in ParamSort.layout.data" :title="item.val" clickable @click="SortlayoutChange(item.key)">
|
||||||
|
<template #right-icon>
|
||||||
|
<van-radio :name="item.key"></van-radio>
|
||||||
|
</template>
|
||||||
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
|
</van-radio-group>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</van-tree-select>
|
||||||
|
<div class="btn-bottom">
|
||||||
|
<van-row>
|
||||||
|
<van-col span="24" style="text-align: center;">
|
||||||
|
<van-button round plain type="primary" size="large" @click="ParamSort.PopupVisible=false">关闭</van-button>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</van-popup>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var SortData = {
|
||||||
|
ParamSort:{
|
||||||
|
PopupVisible:false,
|
||||||
|
labelActive:0,
|
||||||
|
data:[
|
||||||
|
{text:'显示信息',type:'showinformation'},
|
||||||
|
{text:'排序类型',type:'Sorttype'},
|
||||||
|
{text:'排序方式',type:'sortorder'},
|
||||||
|
{text:'布局',type:'layout',},
|
||||||
|
],
|
||||||
|
showinformation:{
|
||||||
|
value:[],
|
||||||
|
data:[{key:'name',val:'名称'},
|
||||||
|
{key:'tagging',val:'标注数'},
|
||||||
|
{key:'extension',val:'扩展名'},
|
||||||
|
{key:'other',val:'其它信息'}]
|
||||||
|
},
|
||||||
|
otherinformation:{
|
||||||
|
value:'btime',
|
||||||
|
data:[{key:'size',val:'尺寸'},
|
||||||
|
{key:'filesize',val:'文件大小'},
|
||||||
|
{key:'tag',val:'标签'},
|
||||||
|
{key:'grade',val:'评分'},
|
||||||
|
{key:'btime',val:'添加时间'},
|
||||||
|
{key:'dateline',val:'修改时间'},
|
||||||
|
{key:'mtime',val:'创建日期'}]
|
||||||
|
},
|
||||||
|
Sorttype:{
|
||||||
|
value:1,
|
||||||
|
data:[{key:1,val:'添加时间',field:'btime'},
|
||||||
|
{key:3,val:'修改时间',field:'dateline'},
|
||||||
|
{key:2,val:'创建日期',field:'mtime'},
|
||||||
|
{key:4,val:'标题',field:'name'},
|
||||||
|
{key:8,val:'文件大小',field:'filesize'},
|
||||||
|
{key:5,val:'尺寸',field:'size'},
|
||||||
|
{key:6,val:'评分',field:'grade'},
|
||||||
|
{key:7,val:'时长',field:'duration'}]
|
||||||
|
},
|
||||||
|
sortorder:{
|
||||||
|
value:'desc',
|
||||||
|
data:[{key:'desc',val:'降序'},{key:'asc',val:'升序'}]
|
||||||
|
},
|
||||||
|
layout:{
|
||||||
|
value:'waterFall',
|
||||||
|
data:[{key:'waterFall',val:'瀑布流'},{key:'rowGrid',val:'自适应'},{key:'imageList',val:'网格'}]
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var SortJs = {
|
||||||
|
sortpopupopen(){
|
||||||
|
if(this.ParamSort.showinformation.value.indexOf('other')>-1){
|
||||||
|
var status = true;
|
||||||
|
for(var i in this.ParamSort.data){
|
||||||
|
var item = this.ParamSort.data[i];
|
||||||
|
if(item.type == 'otherinformation'){
|
||||||
|
status = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(status){
|
||||||
|
var str = {text:'其它信息',type:'otherinformation'};
|
||||||
|
this.ParamSort.data.splice(1,0,str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SortPopupTitleClick(){
|
||||||
|
this.ParamSort.PopupVisible = false;
|
||||||
|
},
|
||||||
|
SortShowinformationClick(index){
|
||||||
|
var self = this;
|
||||||
|
self.$refs.showinformation[index].toggle();
|
||||||
|
},
|
||||||
|
SortShowinformationChange(val){
|
||||||
|
if(val.indexOf('other')>-1){
|
||||||
|
var status = true;
|
||||||
|
for(var i in this.ParamSort.data){
|
||||||
|
var item = this.ParamSort.data[i];
|
||||||
|
if(item.type == 'otherinformation'){
|
||||||
|
status = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(status){
|
||||||
|
var str = {text:'其它信息',type:'otherinformation'};
|
||||||
|
this.ParamSort.data.splice(1,0,str);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(this.ParamSort.data.length==5){
|
||||||
|
this.ParamSort.data.splice(1,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
this.ParamImages.type = 'refresh';
|
||||||
|
this.ImagesLayoutInit();
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
this.SortSaveinformation();
|
||||||
|
<!--{else}-->
|
||||||
|
sessionStorage.setItem('InformationShow',val.join(','));
|
||||||
|
<!--{/if}-->
|
||||||
|
},
|
||||||
|
SortotherinformationChange(val){
|
||||||
|
this.ParamSort.otherinformation.value = val;
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
this.SortSaveinformation();
|
||||||
|
<!--{else}-->
|
||||||
|
sessionStorage.setItem('InformationOther',val);
|
||||||
|
<!--{/if}-->
|
||||||
|
},
|
||||||
|
|
||||||
|
SortSorttypeChange(val){
|
||||||
|
if(val != this.ParamSort.Sorttype.value){
|
||||||
|
this.ParamSort.Sorttype.value = val;
|
||||||
|
this.CommonhandleHash();
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
this.SortSaveSorttype();
|
||||||
|
<!--{else}-->
|
||||||
|
sessionStorage.setItem('order',val);
|
||||||
|
<!--{/if}-->
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SortsortorderChange(val){
|
||||||
|
if(val != this.ParamSort.sortorder.value){
|
||||||
|
this.ParamSort.sortorder.value = val;
|
||||||
|
this.CommonhandleHash();
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
this.SortSaveSorttype();
|
||||||
|
<!--{else}-->
|
||||||
|
sessionStorage.setItem('asc',val);
|
||||||
|
<!--{/if}-->
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SortSaveSorttype(){//保存排序方式
|
||||||
|
var self = this;
|
||||||
|
var sortfiles = '';
|
||||||
|
for(var x in self.ParamSort.Sorttype.data){
|
||||||
|
var item = self.ParamSort.Sorttype.data[x];
|
||||||
|
if(item.key == parseInt(self.ParamSort.Sorttype.value)){
|
||||||
|
sortfiles = item.field;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var param = {
|
||||||
|
sortfiled:sortfiles,
|
||||||
|
sort:self.ParamSort.sortorder.value
|
||||||
|
};
|
||||||
|
$.post(MOD_URL+'&op=ajax&operation=setsort',param,function(json){
|
||||||
|
if(json.success){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
self.$toast.fail('排序数据保存失败')
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
SortSaveinformation(){//保存显示信息
|
||||||
|
var self = this;
|
||||||
|
var param = {
|
||||||
|
showfileds:self.ParamSort.showinformation.value.join(','),
|
||||||
|
other:self.ParamSort.otherinformation.value
|
||||||
|
};
|
||||||
|
$.post(MOD_URL+'&op=ajax&operation=setshow',param,function(json){
|
||||||
|
if(json.success){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
self.$toast.fail('显示信息数据保存失败')
|
||||||
|
}
|
||||||
|
},'json')
|
||||||
|
},
|
||||||
|
SortlayoutChange(val){
|
||||||
|
this.ParamSort.layout.value = val;
|
||||||
|
this.ParamImages.type = 'refresh';
|
||||||
|
this.ImagesLayoutInit();
|
||||||
|
<!--{if $_G[uid]}-->
|
||||||
|
$.post('{MOD_URL}&op=ajax&operation=setlayout',{
|
||||||
|
layout:val
|
||||||
|
},function(json){
|
||||||
|
if(json.success){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
self.$toast.fail('布局数据保存失败')
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
<!--{else}-->
|
||||||
|
sessionStorage.setItem('Layout',val);
|
||||||
|
<!--{/if}-->
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
21
dzz/pichome/template/mobile/frame/footer_simple.htm
Normal file
21
dzz/pichome/template/mobile/frame/footer_simple.htm
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!--{if $_G[uid] && $_G['adminid'] == 1}-->
|
||||||
|
<!--{if !isset($_G['cookie']['checkupgrade'])}-->
|
||||||
|
<script type="text/javascript">jQuery.getScript('misc.php?mod=upgrade&action=checkupgrade&rand=$_G[timestamp]');</script>
|
||||||
|
<!--{/if}-->
|
||||||
|
<!--{if !isset($_G['cookie']['checkappupgrade'])}-->
|
||||||
|
<script type="text/javascript">jQuery.getScript('misc.php?mod=upgrade&action=checkappupgrade&rand=$_G[timestamp]');</script>
|
||||||
|
<!--{/if}-->
|
||||||
|
<!--{if !isset($_G['cookie']['upgradenotice'] )}-->
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function(){
|
||||||
|
try{jQuery('#systemNotice').load('misc.php?mod=upgrade&action=upgradenotice');}catch(e){};
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div id="systemNotice" class="systemNotice" style="position: fixed;right:10px;bottom:10px;max-width:50%;box-shadow:0px 5px 10px RGBA(0,0,0,0.3);z-index:999999"></div>
|
||||||
|
<!--{/if}-->
|
||||||
|
<!--{/if}-->
|
||||||
|
<!--{if $_G['setting']['statcode']}-->
|
||||||
|
$_G['setting']['statcode']
|
||||||
|
<!--{/if}-->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2
dzz/pichome/template/mobile/frame/header_simple_end.htm
Normal file
2
dzz/pichome/template/mobile/frame/header_simple_end.htm
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
</head>
|
||||||
|
<body>
|
||||||
28
dzz/pichome/template/mobile/frame/header_simple_start.htm
Normal file
28
dzz/pichome/template/mobile/frame/header_simple_start.htm
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<title><!--{if !empty($navtitle)}-->$navtitle - <!--{/if}-->$_G[setting][sitename] </title>
|
||||||
|
<meta name="keywords" content="{if !empty($_G[setting][metakeywords])}{echo htmlspecialchars($_G[setting][metakeywords])}{/if}" />
|
||||||
|
<meta name="description" content="{if !empty($_G[setting][metadescription])}{echo htmlspecialchars($_G[setting][metadescription])} {/if}" />
|
||||||
|
<meta name="generator" content="oaooa" />
|
||||||
|
<meta name="author" content="oaooa" />
|
||||||
|
<meta name="copyright" content="2012-{eval echo dgmdate(TIMESTAMP,'Y-m-d');} www.oaooa.com" />
|
||||||
|
<meta name="MSSmartTagsPreventParsing" content="True" />
|
||||||
|
<meta http-equiv="MSThemeCompatible" content="Yes" />
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<base href="{$_G['siteurl']}" />
|
||||||
|
|
||||||
|
|
||||||
|
<script src="{MOD_PATH}/js/vue/vue.js?{VERHASH}"></script>
|
||||||
|
<link rel="stylesheet" href="{MOD_PATH}/css/theme/$theme/root.css?{VERHASH}">
|
||||||
|
<link rel="stylesheet" href="{MOD_PATH}/js/mobile/plug/vant/index.css?{VERHASH}">
|
||||||
|
<link rel="stylesheet" href="{MOD_PATH}/css/mobile/common.css?{VERHASH}">
|
||||||
|
<script type="text/javascript" src="{MOD_PATH}/js/mobile/plug/vant/vant.min.js?{VERHASH}"></script>
|
||||||
|
<script type="text/javascript" src="static/jquery/jquery.min.js?{VERHASH}"></script>
|
||||||
|
<script type="text/javascript" src="static/jquery/jquery.json-2.4.min.js?{VERHASH}"></script>
|
||||||
|
<script type="text/javascript" src="{MOD_PATH}/js/common.js?{VERHASH}"></script>
|
||||||
|
<link rel="stylesheet" href="{MOD_PATH}/css/fonts/remixicon.css?{VERHASH}">
|
||||||
|
<script type="text/javascript">var DZZSCRIPT='{DZZSCRIPT}',LANG='{$_G[language]}', STATICURL = 'static/', IMGDIR = '{$_G[setting][imgdir]}', VERHASH = '{VERHASH}', charset = '{CHARSET}', dzz_uid = '$_G[uid]', cookiepre = '{$_G[config][cookie][cookiepre]}', cookiedomain = '{$_G[config][cookie][cookiedomain]}', cookiepath = '{$_G[config][cookie][cookiepath]}',attackevasive = '{$_G[config][security][attackevasive]}', disallowfloat = '{$_G[setting][disallowfloat]}', REPORTURL = '$_G[currenturl_encode]', SITEURL = '$_G[siteurl]', JSPATH = '$_G[setting][jspath]',MOD_PATH='{MOD_PATH}',APP_URL='{MOD_URL}',MOD_URL='{MOD_URL}';</script>
|
||||||
593
dzz/pichome/template/mobile/page/details.htm
Normal file
593
dzz/pichome/template/mobile/page/details.htm
Normal file
@@ -0,0 +1,593 @@
|
|||||||
|
<!--{template mobile/frame/header_simple_start}-->
|
||||||
|
<script src="{MOD_PATH}/js/mobile/pinchzoom.js?{VERHASH}" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/details.css?{VERHASH}" />
|
||||||
|
<!--{template mobile/frame/header_simple_end}-->
|
||||||
|
<div id="dzzoffice">
|
||||||
|
<div
|
||||||
|
id="DetailPopup"
|
||||||
|
class="detail-popup"
|
||||||
|
:class="{'NotFooter':showdata[rid]&&!showdata[rid].data.footer,'full':full}"
|
||||||
|
@touchstart="DetailPageTouchStart"
|
||||||
|
@touchmove="DetailPageTouchMove"
|
||||||
|
@touchend="DetailPageTouchEnd">
|
||||||
|
<!--{template mobile/components/index/JsDetailMessage}-->
|
||||||
|
<van-nav-bar class="header-top" :title="rids.indexOf(rid)+1+'/'+rids.length">
|
||||||
|
<template #left>
|
||||||
|
<div style="width: 25px;text-align: center;height: 25px;line-height: 25px;" @click.stop="DetailNavbarLeftClick">
|
||||||
|
<van-icon name="arrow-left" size="18" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<div style="width: 25px;text-align: center;height: 25px;line-height: 25px;" @click.stop="InformationPopup=true">
|
||||||
|
<van-icon name="warning-o" size="18" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</van-nav-bar>
|
||||||
|
<div class="detail-popup-translate" ref="detail_popup_translate" @click="DetailImageFulloverlay">
|
||||||
|
<div
|
||||||
|
class="detail-popup-content"
|
||||||
|
v-for="item in showdata"
|
||||||
|
:class="{'prev':item.type=='left','next':item.type=='right','center':item.type=='center','opacity':item.loading}"
|
||||||
|
:key="item.data.opentype!='video'?item.data.rid:''"
|
||||||
|
:ref="'Detail_'+item.data.rid">
|
||||||
|
<template v-if="item.loading">
|
||||||
|
<van-loading class="custom-load" size="24px" type="spinner" color="var(--header-text)" vertical>加载中...</van-loading>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="detail-popup-img">
|
||||||
|
<template v-if="item.data.opentype=='video'">
|
||||||
|
<div class="video-box" :style="{'height':item.data.fheight+'px'}">
|
||||||
|
<iframe
|
||||||
|
style="border: 0px;"
|
||||||
|
:src="'index.php?mod=xgplayer&src='+item.data.realpath"
|
||||||
|
width="100%"
|
||||||
|
height="100%"></iframe>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="item.data.opentype=='pdf'">
|
||||||
|
<iframe
|
||||||
|
style="border: 0px;"
|
||||||
|
:src="'index.php?mod=pdf&src='+item.data.realpath"
|
||||||
|
width="100%"
|
||||||
|
height="100%"></iframe>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="item.data.opentype=='text'">
|
||||||
|
<div style="padding: 10px;height: 100%;">
|
||||||
|
<iframe
|
||||||
|
style="border: 0px;border-radius: 18px;"
|
||||||
|
:src="'index.php?mod=textviewer&src='+item.data.realpath"
|
||||||
|
width="100%"
|
||||||
|
height="100%"></iframe>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="item.data.opentype=='other'">
|
||||||
|
<div class="img-box" :ref="'BoxImg_'+item.data.rid">
|
||||||
|
<img
|
||||||
|
@load="DetailImgload"
|
||||||
|
:src="item.data.icondata"
|
||||||
|
:data-rid="item.data.rid"
|
||||||
|
class="image-viewer__img" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="img-box" :ref="'BoxImg_'+item.data.rid">
|
||||||
|
<img :src="item.data.icondata" class="image-viewer__img thumbnail" />
|
||||||
|
<img
|
||||||
|
@load="DetailImgload"
|
||||||
|
:data-rid="item.data.rid"
|
||||||
|
:src="item.data.realpath"
|
||||||
|
class="image-viewer__img opacity" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="footer-tabbar" v-if="showdata[rid] && showdata[rid].data.footer">
|
||||||
|
<div class="footer-tabbar-item" v-if="showdata[rid].data.link" @click="DetailFooterClick('link')">
|
||||||
|
<i class="ri-links-line"></i>
|
||||||
|
</div>
|
||||||
|
<div class="footer-tabbar-item" v-if="showdata[rid].data.download" @click="DetailFooterClick('download')">
|
||||||
|
<i class="ri-download-2-line"></i>
|
||||||
|
</div>
|
||||||
|
<div class="footer-tabbar-item" v-if="showdata[rid].data.share" @click="DetailFooterClick('share')">
|
||||||
|
<i class="ri-share-line"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
new Vue({
|
||||||
|
el: '#dzzoffice',
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
rids:[],
|
||||||
|
rid:'',
|
||||||
|
ridIndex:0,
|
||||||
|
dataList:{},
|
||||||
|
showdata:{},
|
||||||
|
showdataIndex:[],
|
||||||
|
PinchZoom:{},
|
||||||
|
TouchPage:{
|
||||||
|
clickX:0,
|
||||||
|
distance:0,
|
||||||
|
move:true
|
||||||
|
},
|
||||||
|
TouchImg:{
|
||||||
|
move:false,
|
||||||
|
},
|
||||||
|
full:false,
|
||||||
|
InformationPopup:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
full:{
|
||||||
|
handler(val){
|
||||||
|
var self = this;
|
||||||
|
for(var i in this.PinchZoom){
|
||||||
|
var item = this.PinchZoom[i];
|
||||||
|
if(val){
|
||||||
|
item.enable();
|
||||||
|
}else{
|
||||||
|
item.disable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.$nextTick(function(){
|
||||||
|
var boxH = $('.detail-popup-content').height();
|
||||||
|
$('.img-box').height(boxH);
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
deep:true
|
||||||
|
},
|
||||||
|
showdata:{
|
||||||
|
handler(val){
|
||||||
|
var self = this;
|
||||||
|
self.$nextTick(function(){
|
||||||
|
for(var i in val){
|
||||||
|
var item = val[i];
|
||||||
|
var rid = item.data.rid;
|
||||||
|
if(!item.loading && (item.data.opentype == 'image' || item.data.opentype == 'other')){
|
||||||
|
if(self.PinchZoom[rid]){
|
||||||
|
if(!self.full){
|
||||||
|
self.PinchZoom[rid].disable()
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(self.$refs['BoxImg_'+rid]){
|
||||||
|
var dom = $(self.$refs['BoxImg_'+rid][0]);
|
||||||
|
dom.height($('.detail-popup-content').height());
|
||||||
|
self.PinchZoom[rid] = new PinchZoom(self.$refs['BoxImg_'+rid][0]);
|
||||||
|
if(!self.full){
|
||||||
|
self.PinchZoom[rid].disable()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
deep:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
var arr = (location.hash || "").replace(/^\?/,'').split("&");
|
||||||
|
if(arr.length){
|
||||||
|
rid=arr[0].replace("#","").split('=')[1];
|
||||||
|
this.rid = rid;
|
||||||
|
}
|
||||||
|
var rids = window.localStorage.getItem('imgs');
|
||||||
|
if(rids && rids.indexOf(this.rid)>-1){
|
||||||
|
this.rids = rids.split(',');
|
||||||
|
}
|
||||||
|
this.handleRidsOrder();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
DetailImgload(event){
|
||||||
|
var self = this;
|
||||||
|
$(event.target).removeClass('opacity').siblings('.thumbnail').remove();
|
||||||
|
},
|
||||||
|
DetailImageFulloverlay(){
|
||||||
|
if(this.full){
|
||||||
|
if(this.PinchZoom[this.rid]){
|
||||||
|
if(this.PinchZoom[this.rid].zoomFactor>1){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.full = false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.full = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.full = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
DetailPageTouchStart(event){
|
||||||
|
var self = this;
|
||||||
|
if(self.showdata[self.rid].loading || self.TouchImg.move || self.InformationPopup){
|
||||||
|
self.TouchPage.move = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
self.TouchPage.clickX = event.touches[0].pageX;
|
||||||
|
self.TouchPage.distance = 0;
|
||||||
|
self.TouchPage.move = true;
|
||||||
|
},
|
||||||
|
DetailPageTouchMove(event){
|
||||||
|
var self = this;
|
||||||
|
if(self.showdata[self.rid].loading || self.TouchImg.move || self.InformationPopup){
|
||||||
|
self.TouchPage.move = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
event.preventDefault();
|
||||||
|
var sectouch = event.touches[0];
|
||||||
|
self.TouchPage.distance = sectouch.pageX - self.TouchPage.clickX;
|
||||||
|
var Index = self.showdataIndex.indexOf(self.rid);
|
||||||
|
if(self.TouchPage.distance>0){
|
||||||
|
if(self.ridIndex == 0){
|
||||||
|
self.$toast('已经是第一张');
|
||||||
|
self.TouchPage.move = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var firstrid = self.showdataIndex[Index-1];
|
||||||
|
if(self.showdata[firstrid] && self.showdata[firstrid].loading){
|
||||||
|
self.TouchPage.move = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(self.TouchPage.distance<0){
|
||||||
|
if(self.ridIndex == self.rids.length-1){
|
||||||
|
self.$toast('已经是最后一张');
|
||||||
|
self.TouchPage.move = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var tworid = self.showdataIndex[Index+1];
|
||||||
|
if(self.showdata[tworid] && self.showdata[tworid].loading){
|
||||||
|
self.TouchPage.move = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
self.TouchPage.move = true;
|
||||||
|
$(self.$refs['detail_popup_translate']).css("transform","translate3d("+self.TouchPage.distance+"px,0,0)");
|
||||||
|
},
|
||||||
|
DetailPageTouchEnd(event){
|
||||||
|
var self = this;
|
||||||
|
if(!self.TouchPage.move || self.InformationPopup){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var dom = self.$refs['detail_popup_translate'];
|
||||||
|
var screenWidth = document.body.clientWidth+10;
|
||||||
|
$(dom).css("transition","transform 0.2s cubic-bezier(0,0,0.4,1) 0s,-webkit-transform 0.2s");
|
||||||
|
if(Math.abs(self.TouchPage.distance)>100){
|
||||||
|
var Index = self.showdataIndex.indexOf(self.rid);
|
||||||
|
if(self.TouchPage.distance>0){
|
||||||
|
$(self.$refs['detail_popup_translate']).css("transform","translate3d("+(screenWidth)+"px,0,0)");
|
||||||
|
self.rid = self.showdataIndex[Index-1];
|
||||||
|
self.ridIndex -= 1;
|
||||||
|
}else{
|
||||||
|
self.rid = self.showdataIndex[Index+1];
|
||||||
|
self.ridIndex += 1;
|
||||||
|
$(dom).css("transform","translate3d("+(-screenWidth)+"px,0,0)");
|
||||||
|
}
|
||||||
|
setTimeout(function(){
|
||||||
|
$(dom).css({
|
||||||
|
transform:"none",
|
||||||
|
transition:''
|
||||||
|
});
|
||||||
|
self.handleRidsOrder();
|
||||||
|
},300);
|
||||||
|
}else{
|
||||||
|
$(dom).css("transform","translate3d(0,0,0)");
|
||||||
|
setTimeout(function(){
|
||||||
|
$(dom).css({
|
||||||
|
transform:"none",
|
||||||
|
transition:''
|
||||||
|
});
|
||||||
|
},300);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
handleRidsOrder(){
|
||||||
|
var self = this;
|
||||||
|
var str = {};
|
||||||
|
var index = self.rids.indexOf(self.rid);
|
||||||
|
// var Oldshowdata = JSON.parse(JSON.stringify(self.showdata));
|
||||||
|
var NewShowData = {};
|
||||||
|
var showdataIndex = [];
|
||||||
|
self.ridIndex = index;
|
||||||
|
showdataIndex = [self.rid];
|
||||||
|
// self.showdata = {};
|
||||||
|
|
||||||
|
|
||||||
|
if(self.dataList[self.rid]){
|
||||||
|
NewShowData[self.rid] = {
|
||||||
|
type:'center',
|
||||||
|
loading:false,
|
||||||
|
data:self.dataList[self.rid]
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
NewShowData[self.rid] = {
|
||||||
|
type:'center',
|
||||||
|
loading:true,
|
||||||
|
data:{}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if(self.rids[index-1]){
|
||||||
|
var first = self.rids[index-1];
|
||||||
|
|
||||||
|
showdataIndex.unshift(first);
|
||||||
|
if(self.dataList[first]){
|
||||||
|
NewShowData[first] = {
|
||||||
|
type:'left',
|
||||||
|
loading:false,
|
||||||
|
data:self.dataList[first]
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
NewShowData[first] = {
|
||||||
|
type:'left',
|
||||||
|
loading:true,
|
||||||
|
data:{}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(self.rids[index+1]){
|
||||||
|
var two = self.rids[index+1];
|
||||||
|
showdataIndex.push(two);
|
||||||
|
if(self.dataList[two]){
|
||||||
|
NewShowData[two] = {
|
||||||
|
type:'right',
|
||||||
|
loading:false,
|
||||||
|
data:self.dataList[two]
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
NewShowData[two] = {
|
||||||
|
type:'right',
|
||||||
|
loading:true,
|
||||||
|
data:{}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.showdataIndex = showdataIndex;
|
||||||
|
self.showdata = NewShowData;
|
||||||
|
var dels = [];
|
||||||
|
for(var s in self.PinchZoom){
|
||||||
|
if(showdataIndex.indexOf(s)<0){
|
||||||
|
dels.push(s)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(dels.length){
|
||||||
|
for(var h in dels){
|
||||||
|
if(self.PinchZoom[h]){
|
||||||
|
delete self.PinchZoom[h];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(var i in NewShowData){
|
||||||
|
if(NewShowData[i].loading){
|
||||||
|
this.GetData(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
GetData(rid){
|
||||||
|
var self = this;
|
||||||
|
$.post(MOD_URL+'&op=details&operation=fetch',{
|
||||||
|
rid:rid
|
||||||
|
},function(json){
|
||||||
|
var item = json.resourcesdata;
|
||||||
|
// document.title = item.name+'-$_G[setting][sitename]';
|
||||||
|
var colors = [];
|
||||||
|
|
||||||
|
if(item.colors){
|
||||||
|
for(var c in item.colors){
|
||||||
|
colors.push(item.colors[c]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.colors = colors;
|
||||||
|
var tags = [];
|
||||||
|
if(item.tag){
|
||||||
|
for(var t in item.tag){
|
||||||
|
var tstr = {
|
||||||
|
key:t,
|
||||||
|
val:item.tag[t]
|
||||||
|
};
|
||||||
|
tags.push(tstr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.tag = tags;
|
||||||
|
|
||||||
|
var foldernames = [];
|
||||||
|
if(item.foldernames){
|
||||||
|
for(var f in item.foldernames){
|
||||||
|
var fstr = {
|
||||||
|
key:f,
|
||||||
|
val:item.foldernames[f]
|
||||||
|
};
|
||||||
|
foldernames.push(fstr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.foldernames = foldernames;
|
||||||
|
item.download = parseInt(item.download);
|
||||||
|
item.share = parseInt(item.share);
|
||||||
|
if(item.link || item.share || item.download){
|
||||||
|
item['footer'] = true;
|
||||||
|
}else{
|
||||||
|
item['footer'] = false;
|
||||||
|
}
|
||||||
|
// if(item.opentype == 'other' || item.opentype == 'image'){
|
||||||
|
// var size = self.DetailImgSize(item);
|
||||||
|
// item['width'] = size['width'];
|
||||||
|
// item['height'] = size['height'];
|
||||||
|
// item['left'] = size['left'];
|
||||||
|
// item['top'] = size['top'];
|
||||||
|
// }
|
||||||
|
if(item.opentype == 'video'){
|
||||||
|
var boxW = document.body.clientWidth;
|
||||||
|
var ra = boxW/parseFloat(item['width'])
|
||||||
|
item['fwidth'] = boxW;
|
||||||
|
item['fheight'] = ra*parseFloat(item['height']);
|
||||||
|
}
|
||||||
|
self.showdata[rid].loading = false;
|
||||||
|
self.showdata[rid].data = item;
|
||||||
|
self.dataList[item.rid] = item;
|
||||||
|
self.$forceUpdate();
|
||||||
|
|
||||||
|
},'json');
|
||||||
|
},
|
||||||
|
DetailImgSize(item){
|
||||||
|
var str = {
|
||||||
|
width:0,
|
||||||
|
height:0,
|
||||||
|
left:0,
|
||||||
|
top:0
|
||||||
|
};
|
||||||
|
var boxW = document.body.clientWidth;
|
||||||
|
var boxH = document.body.clientHeight
|
||||||
|
if(!this.full){
|
||||||
|
if(item.footer){
|
||||||
|
boxH -= 106;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var imgW = parseFloat(item.width);
|
||||||
|
var imgH = parseFloat(item.height);
|
||||||
|
|
||||||
|
var ra1 = boxW/boxH;
|
||||||
|
var ra2 = imgW/imgH;
|
||||||
|
|
||||||
|
|
||||||
|
if(ra2 > ra1){
|
||||||
|
if(imgW>boxW){
|
||||||
|
str.width = boxW;
|
||||||
|
var ratio = boxW/imgW;
|
||||||
|
str.height = ratio*imgH;
|
||||||
|
}else{
|
||||||
|
str.width = imgW;
|
||||||
|
str.height = imgH;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if(imgH>boxH){
|
||||||
|
str.height = boxH;
|
||||||
|
var ratio = boxH/imgH;
|
||||||
|
str.width = ratio*imgW;
|
||||||
|
}else{
|
||||||
|
str.width = imgW;
|
||||||
|
str.height = imgH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
str.left = (boxW-str.width)/2;
|
||||||
|
str.top = (boxH-str.height)/2;
|
||||||
|
return str;
|
||||||
|
},
|
||||||
|
DetailFooterClick(type){
|
||||||
|
var self = this;
|
||||||
|
var rid = self.rid;
|
||||||
|
if(!self.showdata[rid]){
|
||||||
|
self.$toast({
|
||||||
|
message: '参数错误',
|
||||||
|
icon: 'cross',
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(type == 'link'){
|
||||||
|
window.open(self.showdata[rid].data.link);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(type == 'download'){
|
||||||
|
if (self.showdata[rid].data.dpath) {
|
||||||
|
window.open(SITEURL + MOD_URL + '&op=download&dpath=' + self.showdata[rid].data.dpath)
|
||||||
|
} else {
|
||||||
|
self.$toast({
|
||||||
|
message: '数据错误',
|
||||||
|
icon: 'cross',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(type == 'share'){
|
||||||
|
if (self.showdata[rid].data.rid) {
|
||||||
|
$.post('{MOD_URL}&op=ajax&operation=createshare', {
|
||||||
|
rid: rid
|
||||||
|
}, function(data) {
|
||||||
|
if (data.success) {
|
||||||
|
self.$dialog.confirm({
|
||||||
|
title: '分享成功',
|
||||||
|
message: data.success,
|
||||||
|
confirmButtonText:'复制地址',
|
||||||
|
cancelButtonText:'关闭'
|
||||||
|
}).then(() => {
|
||||||
|
self.CommonCopyTxt(data.success);
|
||||||
|
}).catch(() => {
|
||||||
|
// on cancel
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
self.$toast({
|
||||||
|
message: '分享失败',
|
||||||
|
icon: 'cross',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 'json')
|
||||||
|
} else {
|
||||||
|
self.$toast({
|
||||||
|
message: '数据错误',
|
||||||
|
icon: 'cross',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
DetailMessageSearch(type,val){
|
||||||
|
var self = this;
|
||||||
|
var item = self.showdata[self.rid].data;
|
||||||
|
switch(type){
|
||||||
|
case 'color':
|
||||||
|
window.location.href = SITEURL+'#appid=' + item.appid + '&color=#' + val;
|
||||||
|
// window.location.reload();
|
||||||
|
break;
|
||||||
|
case 'tag':
|
||||||
|
window.location.href = SITEURL+'#appid=' + item.appid + '&tag=' + val;
|
||||||
|
// window.location.reload();
|
||||||
|
break;
|
||||||
|
case 'link':
|
||||||
|
window.open(val);
|
||||||
|
break;
|
||||||
|
case 'classify':
|
||||||
|
window.location.href = SITEURL+'#appid=' + item.appid + '&classify=' + val;
|
||||||
|
// window.location.reload();
|
||||||
|
break;
|
||||||
|
case 'copy':
|
||||||
|
self.CommonCopyTxt(val);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
DetailNavbarLeftClick(){
|
||||||
|
window.history.go(-1);
|
||||||
|
},
|
||||||
|
CommonCopyTxt(text){
|
||||||
|
var self = this;
|
||||||
|
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
|
||||||
|
input.setAttribute('value', text);
|
||||||
|
document.getElementsByTagName('body')[0].appendChild(input);
|
||||||
|
document.getElementById('copyInput').select();
|
||||||
|
document.execCommand('copy');
|
||||||
|
document.getElementById('copyInput').remove();
|
||||||
|
self.$toast.success('复制成功');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!--{template mobile/frame/footer_simple}-->
|
||||||
7
dzz/pichome/template/mobile/page/index.htm
Normal file
7
dzz/pichome/template/mobile/page/index.htm
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<!--{template mobile/frame/header_simple_start}-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/index.css?{VERHASH}" />
|
||||||
|
<!--{template mobile/frame/header_simple_end}-->
|
||||||
|
<div id="dzzoffice">
|
||||||
|
<!--{template mobile/components/index/JsIndex}-->
|
||||||
|
</div>
|
||||||
|
<!--{template mobile/frame/footer_simple}-->
|
||||||
163
dzz/pichome/template/mobile/page/personal.htm
Normal file
163
dzz/pichome/template/mobile/page/personal.htm
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
<!--{template mobile/frame/header_simple_start}-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/personal.css?{VERHASH}" />
|
||||||
|
<!--{template mobile/frame/header_simple_end}-->
|
||||||
|
<div id="dzzoffice">
|
||||||
|
<van-nav-bar title="个人设置" left-arrow @click-left="NavbarLeftClick"></van-nav-bar>
|
||||||
|
<div class="scroll-box">
|
||||||
|
<van-form @submit="handleSubmit">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<div>
|
||||||
|
<van-image
|
||||||
|
width="100px"
|
||||||
|
height="100px"
|
||||||
|
fit="contain"
|
||||||
|
:src="avatarstatus&&ruleForm.imgpath?ruleForm.imgpath:'avatar.php?uid=1&random='+Math.ceil(Math.random()*100)">
|
||||||
|
<template v-slot:default >
|
||||||
|
<template v-if="parseInt(avatarstatus)==0">
|
||||||
|
<van-icon class="not-img" name="photograph" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</van-image>
|
||||||
|
</div>
|
||||||
|
<van-uploader
|
||||||
|
:after-read="ImageafterRead"
|
||||||
|
:max-size="1024*1024*2"
|
||||||
|
@oversize="ImageOversize"
|
||||||
|
accept="image/png,image/jpg,image/jpeg,image/gif">
|
||||||
|
<van-button type="primary" size="small">修改头像</van-button>
|
||||||
|
</van-uploader>
|
||||||
|
</div>
|
||||||
|
<van-field
|
||||||
|
v-model.trim="ruleForm.email"
|
||||||
|
type="email"
|
||||||
|
required
|
||||||
|
:rules="[{ required: true, message: '请填写邮箱' }]">
|
||||||
|
<template #label>
|
||||||
|
邮箱:<span class="tip">(用于登录)</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
<van-field
|
||||||
|
v-model.trim="ruleForm.nickname"
|
||||||
|
required
|
||||||
|
:rules="[{ required: true, message: '请填写用户名' }]">
|
||||||
|
<template #label>
|
||||||
|
用户名:<span class="tip">(用于登录,站点中不显示)</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
<van-field
|
||||||
|
v-model.trim="ruleForm.username"
|
||||||
|
required
|
||||||
|
:rules="[{ required: true, message: '请填写姓名' }]">
|
||||||
|
<template #label>
|
||||||
|
姓名:<span class="tip">(用于登录,站点中不显示)</span>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
|
<van-field v-model.number="ruleForm.phone" type="tel" label="手机号:"></van-field>
|
||||||
|
<van-field v-model.trim="ruleForm.weixinid" label="微信号:"></van-field>
|
||||||
|
<van-field v-model.trim="ruleForm.password" label="新密码:"></van-field>
|
||||||
|
<van-field style="overflow: unset;" v-model.trim="ruleForm.password2" label="确认新密码:" :error-message="passwordMessage"></van-field>
|
||||||
|
<div class="van-cell van-field">
|
||||||
|
<div>主题色</div>
|
||||||
|
<ul class="thems">
|
||||||
|
<li class="thems-item" v-for="item in themes">
|
||||||
|
<div class="bg" :style="item.color" :class="item.val==ruleForm.themecolor?'active':''" @click="handleChangeThemes(item.val)">
|
||||||
|
<van-icon name="success" />
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
<van-button round type="info" size="large" native-type="submit">提交</van-button>
|
||||||
|
</div>
|
||||||
|
</van-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
new Vue({
|
||||||
|
el: '#dzzoffice',
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
avatarstatus:$userdata[avatarstatus],
|
||||||
|
ruleForm: {
|
||||||
|
imgpath:'',
|
||||||
|
email:'$userdata[email]',
|
||||||
|
nickname:'$userdata[nickname]',
|
||||||
|
username:'$userdata[username]',
|
||||||
|
phone:'$userdata[phone]',
|
||||||
|
weixinid:'$userdata[weixinid]',
|
||||||
|
password:'',
|
||||||
|
password2:'',
|
||||||
|
themecolor:'$theme'
|
||||||
|
},
|
||||||
|
themes:[
|
||||||
|
{txt:'自动(依系统设置)',color:'',val:''},
|
||||||
|
{txt:'白色',color:'background:#D0D0D0',val:'white'},
|
||||||
|
{txt:'浅灰色',color:'background:#808080',val:'lightgrey'},
|
||||||
|
{txt:'深灰色',color:'background:#444444',val:'darkgrey'},
|
||||||
|
{txt:'黑色',color:'background:#333333',val:'black'},
|
||||||
|
{txt:'深蓝色',color:'background:#2A356D',val:'navyblue'},
|
||||||
|
{txt:'紫色',color:'background:#463275',val:'purple'},
|
||||||
|
],
|
||||||
|
passwordMessage:'',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
ImageafterRead(file){
|
||||||
|
this.ruleForm.imgpath = file.content;
|
||||||
|
this.avatarstatus = 1;
|
||||||
|
},
|
||||||
|
ImageOversize(file){
|
||||||
|
var self = this;
|
||||||
|
self.$toast.fail('图片大小不能超过 2MB!');
|
||||||
|
},
|
||||||
|
NavbarLeftClick(){
|
||||||
|
window.location.href="{MOD_URL}"
|
||||||
|
},
|
||||||
|
handleChangeThemes(val){
|
||||||
|
this.ruleForm.themecolor = val;
|
||||||
|
},
|
||||||
|
handleSubmit(){
|
||||||
|
self = this;
|
||||||
|
if((self.ruleForm.password || self.ruleForm.password2) && self.ruleForm.password != self.ruleForm.password2){
|
||||||
|
self.passwordMessage = '两次输入密码不一致';
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
self.passwordMessage = '';
|
||||||
|
}
|
||||||
|
var params = {
|
||||||
|
'accountedit':true,
|
||||||
|
'formhash':'{FORMHASH}',
|
||||||
|
'uid':'$uid',
|
||||||
|
'email':self.ruleForm.email,
|
||||||
|
'nickname':self.ruleForm.nickname,
|
||||||
|
'username':self.ruleForm.username,
|
||||||
|
'phone':self.ruleForm.phone,
|
||||||
|
'weixinid':self.ruleForm.weixinid,
|
||||||
|
'password':self.ruleForm.password,
|
||||||
|
'password2':self.ruleForm.password2,
|
||||||
|
'themecolor':self.ruleForm.themecolor,
|
||||||
|
};
|
||||||
|
if(self.ruleForm.imgpath){
|
||||||
|
params['imgpath'] = self.ruleForm.imgpath;
|
||||||
|
}
|
||||||
|
$.post(MOD_URL+"&op=user&do=personal",params,function(res){
|
||||||
|
if(res.success){
|
||||||
|
self.$toast.success('提交成功');
|
||||||
|
}else{
|
||||||
|
self.$toast.fail('提交失败');
|
||||||
|
}
|
||||||
|
},'json');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!--{template mobile/frame/footer_simple}-->
|
||||||
315
dzz/pichome/template/mobile/page/share.htm
Normal file
315
dzz/pichome/template/mobile/page/share.htm
Normal file
@@ -0,0 +1,315 @@
|
|||||||
|
<!--{template mobile/frame/header_simple_start}-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/mobile/share.css?{VERHASH}" />
|
||||||
|
<!--{template mobile/frame/header_simple_end}-->
|
||||||
|
<div id="dzzoffice">
|
||||||
|
<div
|
||||||
|
id="DetailPopup"
|
||||||
|
class="detail-popup-box"
|
||||||
|
:class="imagesData.footer?'':'NotFooter'">
|
||||||
|
<van-nav-bar>
|
||||||
|
<template #left>
|
||||||
|
<div class="pic-logo" slot="left">
|
||||||
|
<a class="h-left" href="{MOD_URL}">
|
||||||
|
<img src="data/attachment/sitelogo/sitelogo.png?{VERHASH}" alt="">
|
||||||
|
<span class="text">$_G['setting'][sitename]</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<div style="width: 25px;text-align: center;height: 25px;line-height: 25px;" @click.stop="PopupInformation=true">
|
||||||
|
<van-icon name="warning-o" size="18" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</van-nav-bar>
|
||||||
|
<div class="detail-popup-translate">
|
||||||
|
<div class="detail-popup-content">
|
||||||
|
<div class="detail-popup-img">
|
||||||
|
<div class="detail-between">
|
||||||
|
<template v-if="imagesData.opentype=='video'">
|
||||||
|
<div class="video-box" :style="{'height':imagesData.videoH+'px'}">
|
||||||
|
<iframe
|
||||||
|
style="border: 0px;"
|
||||||
|
:src="'index.php?mod=xgplayer&src='+imagesData.realpath"
|
||||||
|
width="100%"
|
||||||
|
height="100%"></iframe>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="imagesData.opentype=='pdf'">
|
||||||
|
<iframe
|
||||||
|
style="border: 0px;"
|
||||||
|
:src="'index.php?mod=pdf&src='+imagesData.realpath"
|
||||||
|
width="100%"
|
||||||
|
height="100%"></iframe>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="imagesData.opentype=='text'">
|
||||||
|
<div style="padding: 10px;height: 100%;">
|
||||||
|
<iframe
|
||||||
|
style="border: 0px;border-radius: 18px;"
|
||||||
|
:src="'index.php?mod=textviewer&src='+imagesData.realpath"
|
||||||
|
width="100%"
|
||||||
|
height="100%"></iframe>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="imagesData.opentype=='other'">
|
||||||
|
<div class="img-box">
|
||||||
|
<img
|
||||||
|
@load="DetailImgload"
|
||||||
|
:src="imagesData.icondata"
|
||||||
|
class="image-viewer__img opacity" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="img-box">
|
||||||
|
<img :src="imagesData.icondata" class="image-viewer__img thumbnail" />
|
||||||
|
<img
|
||||||
|
@load="DetailImgload"
|
||||||
|
:src="imagesData.realpath"
|
||||||
|
class="image-viewer__img opacity" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="footer-tabbar" v-if="imagesData.footer">
|
||||||
|
<div class="footer-tabbar-item" v-if="imagesData.link" @click="DetailFooterClick('link')">
|
||||||
|
<i class="ri-links-line"></i>
|
||||||
|
</div>
|
||||||
|
<div class="footer-tabbar-item" v-if="imagesData.download" @click="DetailFooterClick('download')">
|
||||||
|
<i class="ri-download-2-line"></i>
|
||||||
|
</div>
|
||||||
|
<div class="footer-tabbar-item" v-if="imagesData.share" @click="DetailFooterClick('share')">
|
||||||
|
<i class="ri-share-line"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<van-popup
|
||||||
|
v-model="PopupInformation"
|
||||||
|
class="detail-popup-message"
|
||||||
|
:class="imagesData.footer?'':'NotFooter'"
|
||||||
|
position="right"
|
||||||
|
:overlay="false"
|
||||||
|
get-container="#DetailPopup">
|
||||||
|
<div style="position: relative;height: 100%;background: var(--bg-content);padding-top: 2.875rem;">
|
||||||
|
<van-nav-bar title="详情信息" left-arrow @click-left="PopupInformation=false"></van-nav-bar>
|
||||||
|
<div class="DetailPopup-content" style="padding: 0 16px;">
|
||||||
|
<div class="name">{{imagesData.name}}.{{imagesData.ext}}</div>
|
||||||
|
<div class="block" v-if="imagesData.colors && imagesData.colors.length">
|
||||||
|
<div class="title">颜色</div>
|
||||||
|
<div class="block-item colors">
|
||||||
|
<div class="colors" v-for="item in imagesData.colors">
|
||||||
|
<div :style="{background: '#'+item}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block" v-if="imagesData.tag && imagesData.tag.length">
|
||||||
|
<div class="title">标签</div>
|
||||||
|
<div class="block-item tag">
|
||||||
|
<div class="tag" v-for="item in imagesData.tag">{{item}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block" v-if="imagesData.link">
|
||||||
|
<div class="title">链接</div>
|
||||||
|
<div class="block-item link">
|
||||||
|
<span>{{imagesData.link}}</span>
|
||||||
|
<i class="ri-file-copy-line" @click="CommonCopyTxt(imagesData.link)"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block" v-if="imagesData.foldernames && imagesData.foldernames.length">
|
||||||
|
<div class="title">分类</div>
|
||||||
|
<div class="block-item tag">
|
||||||
|
<div class="tag" v-for="item in imagesData.foldernames">{{item}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block">
|
||||||
|
<div class="title">基本信息</div>
|
||||||
|
<div class="block-item">
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">评分</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">
|
||||||
|
<van-icon v-for="item in imagesData.grade" name="star" class="star active"></van-icon><van-icon v-for="item in imagesData.fgrade" name="star" class="star"></van-icon>
|
||||||
|
</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">尺寸</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{imagesData.width}}×{{imagesData.height}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">文件大小</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{imagesData.fsize}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">类型</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{imagesData.ext}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">创建时间</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{imagesData.mtime}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">添加时间</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{imagesData.btime}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="basic">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="label">修改时间</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="record">{{imagesData.dateline}}</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</van-popup>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
new Vue({
|
||||||
|
el: '#dzzoffice',
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
imagesData: {
|
||||||
|
rid : '$resourcesdata[rid]',
|
||||||
|
appid : '$resourcesdata[appid]',
|
||||||
|
name : '$resourcesdata[name]',
|
||||||
|
type : '$resourcesdata[type]',
|
||||||
|
ext : '$resourcesdata[ext]',
|
||||||
|
height : $resourcesdata[height],
|
||||||
|
width : $resourcesdata[width],
|
||||||
|
dateline : '$resourcesdata[dateline]',
|
||||||
|
grade : $resourcesdata[grade],
|
||||||
|
mtime : '$resourcesdata[mtime]',
|
||||||
|
btime : '$resourcesdata[btime]',
|
||||||
|
colors : $resourcesdata[colors],
|
||||||
|
desc : '$resourcesdata[desc]',
|
||||||
|
link : '$resourcesdata[link]',
|
||||||
|
tag :$resourcesdata[tag],
|
||||||
|
opentype : '$resourcesdata[opentype]',
|
||||||
|
icondata:'$resourcesdata[icondata]',
|
||||||
|
iconwidth : $resourcesdata[iconwidth],
|
||||||
|
iconheight : $resourcesdata[iconheight],
|
||||||
|
share : $resourcesdata[share],
|
||||||
|
download : $resourcesdata[download],
|
||||||
|
originalimg : '$resourcesdata[originalimg]',
|
||||||
|
realpath : '$resourcesdata[realpath]',
|
||||||
|
fsize : '$resourcesdata[fsize]',
|
||||||
|
foldernames :$resourcesdata[foldernames],
|
||||||
|
dpath:'$resourcesdata[dpath]',
|
||||||
|
footer:false
|
||||||
|
},
|
||||||
|
PopupInformation:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if(this.imagesData.link ||this.imagesData.share || this.imagesData.download){
|
||||||
|
this.imagesData['footer'] = true;
|
||||||
|
}else{
|
||||||
|
this.imagesData['footer'] = false;
|
||||||
|
}
|
||||||
|
if(this.imagesData.opentype=='video'){
|
||||||
|
var ratio = parseFloat(this.imagesData.width)/document.body.clientWidth;
|
||||||
|
var h = parseFloat(this.imagesData.height)/ratio;
|
||||||
|
this.imagesData['videoH'] = h;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
DetailImgload(event){
|
||||||
|
$(event.target).removeClass('opacity').siblings('.thumbnail').remove();
|
||||||
|
},
|
||||||
|
DetailFooterClick(type){
|
||||||
|
var self = this;
|
||||||
|
var rid = self.imagesData.rid;
|
||||||
|
if(type == 'link'){
|
||||||
|
window.open(self.imagesData.link);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(type == 'download'){
|
||||||
|
if (self.imagesData.dpath) {
|
||||||
|
window.open(SITEURL + MOD_URL + '&op=download&dpath=' + self.imagesData.dpath)
|
||||||
|
} else {
|
||||||
|
self.$toast({
|
||||||
|
message: '数据错误',
|
||||||
|
icon: 'cross',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(type == 'share'){
|
||||||
|
if (self.imagesData.rid) {
|
||||||
|
$.post('{MOD_URL}&op=ajax&operation=createshare', {
|
||||||
|
rid: self.imagesData.rid
|
||||||
|
}, function(data) {
|
||||||
|
if (data.success) {
|
||||||
|
self.$dialog.confirm({
|
||||||
|
title: '分享成功',
|
||||||
|
message: data.success,
|
||||||
|
confirmButtonText:'复制地址',
|
||||||
|
cancelButtonText:'关闭'
|
||||||
|
}).then(() => {
|
||||||
|
self.CommonCopyTxt(data.success);
|
||||||
|
}).catch(() => {
|
||||||
|
// on cancel
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
self.$toast({
|
||||||
|
message: '分享失败',
|
||||||
|
icon: 'cross',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 'json')
|
||||||
|
} else {
|
||||||
|
self.$toast({
|
||||||
|
message: '数据错误',
|
||||||
|
icon: 'cross',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
CommonCopyTxt(text){
|
||||||
|
var self = this;
|
||||||
|
var input = document.createElement('input'); input.setAttribute('id', 'copyInput');
|
||||||
|
input.setAttribute('value', text);
|
||||||
|
document.getElementsByTagName('body')[0].appendChild(input);
|
||||||
|
document.getElementById('copyInput').select();
|
||||||
|
document.execCommand('copy');
|
||||||
|
document.getElementById('copyInput').remove();
|
||||||
|
self.$toast.success('复制成功');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!--{template mobile/frame/footer_simple}-->
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<div class="input-box" :class="librarys.length<2?'radius':''">
|
<div class="input-box" :class="librarys.length<2?'radius':''">
|
||||||
<div class="InputKeyword" @click="ShowPopoverSearch">
|
<div class="InputKeyword" @click="ShowPopoverSearch">
|
||||||
<div class="el-popover-search">
|
<div class="el-popover-search">
|
||||||
<el-input class="search-keyword" @input="handleKeywordInput" v-model="keyword" clearable></el-input>
|
<el-input class="search-keyword" @input="handleKeywordInput" v-model="keyword" clearable placeholder=""></el-input>
|
||||||
<div style="padding: 0px 15px;">
|
<div style="padding: 0px 15px;">
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
</div>
|
</div>
|
||||||
@@ -195,9 +195,12 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
classify:{
|
classify:{
|
||||||
|
childFids:[],
|
||||||
|
DefaultFids:[],
|
||||||
folderdatanum:[],
|
folderdatanum:[],
|
||||||
hotsearchnum:[],
|
hotsearchnum:[],
|
||||||
text:'',
|
text:'',
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
tagData:{//标签数据
|
tagData:{//标签数据
|
||||||
alltagdata:{
|
alltagdata:{
|
||||||
@@ -209,7 +212,8 @@
|
|||||||
checkedsId:[],
|
checkedsId:[],
|
||||||
checkedstxt:'',
|
checkedstxt:'',
|
||||||
tagrelative:'1',
|
tagrelative:'1',
|
||||||
search:''
|
search:'',
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
paramsTag:{},
|
paramsTag:{},
|
||||||
modelParamsTag:{},
|
modelParamsTag:{},
|
||||||
@@ -241,7 +245,8 @@
|
|||||||
ext:{
|
ext:{
|
||||||
val:[],
|
val:[],
|
||||||
height:0,
|
height:0,
|
||||||
data:[]
|
data:[],
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
shape:{
|
shape:{
|
||||||
shape:[],
|
shape:[],
|
||||||
@@ -250,25 +255,30 @@
|
|||||||
height:'',
|
height:'',
|
||||||
txt:'',
|
txt:'',
|
||||||
data:[],
|
data:[],
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
grade:{
|
grade:{
|
||||||
grade:[],
|
grade:[],
|
||||||
data:[]
|
data:[],
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
btime:{
|
btime:{
|
||||||
btime:'',
|
btime:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:[],
|
data:[],
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
mtime:{
|
mtime:{
|
||||||
mtime:'',
|
mtime:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:[],
|
data:[],
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
dateline:{
|
dateline:{
|
||||||
dateline:'',
|
dateline:'',
|
||||||
datelinepicker:[],
|
datelinepicker:[],
|
||||||
data:[],
|
data:[],
|
||||||
|
loading:true
|
||||||
},
|
},
|
||||||
FirstLoad:true
|
FirstLoad:true
|
||||||
}
|
}
|
||||||
@@ -310,6 +320,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
var tagfid = window.sessionStorage.getItem("tagfid");
|
||||||
|
if(tagfid){
|
||||||
|
this.tagData.checkedsFid = tagfid;
|
||||||
|
}else{
|
||||||
|
this.tagData.checkedsFid = 'all';
|
||||||
|
}
|
||||||
this.GetHashParams();
|
this.GetHashParams();
|
||||||
this.handleSearchresize();
|
this.handleSearchresize();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,13 @@
|
|||||||
<template v-for="sitem in ScreenData">
|
<template v-for="sitem in ScreenData">
|
||||||
<template v-if="sitem.key=='classify'&&GetAppid">
|
<template v-if="sitem.key=='classify'&&GetAppid">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-popover placement="bottom" width="auto" trigger="click" ref="ScreenPopoverRef" @show="handleShowclassify">
|
<el-popover placement="bottom" width="auto" trigger="click" ref="ScreenPopoverRef" @show="handleShowafteclassify">
|
||||||
|
<template v-if="classify.loading">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<div class="classification-box">
|
<div class="classification-box">
|
||||||
<el-input v-model="filterText" size="mini" clearable placeholder="输入关键字进行过滤"></el-input>
|
<el-input v-model="filterText" size="mini" clearable placeholder="输入关键字进行过滤"></el-input>
|
||||||
<div class="classification-all-box">
|
<div class="classification-all-box">
|
||||||
@@ -19,15 +25,18 @@
|
|||||||
@check="handleCheck"
|
@check="handleCheck"
|
||||||
:filter-node-method="filterClassify"
|
:filter-node-method="filterClassify"
|
||||||
:data="classify.folderdatanum"
|
:data="classify.folderdatanum"
|
||||||
|
:default-checked-keys="classify.DefaultFids"
|
||||||
:props="defaultProps">
|
:props="defaultProps">
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<div class="field-single" :class="classify.text?'active':''" slot="reference">
|
<div class="field-single" :class="classify.text?'active':''" slot="reference">
|
||||||
分类
|
分类
|
||||||
<span v-if="classify.text">:{{classify.text}}</span>
|
<span class="screen-show-val" v-if="classify.text">:{{classify.text}}</span>
|
||||||
<i class="ri-arrow-down-s-fill icon"></i>
|
<i class="ri-arrow-down-s-fill icon"></i>
|
||||||
<span v-if="classify.text" class="delBtn el-icon-close" @click.stop="handleClickDelete('classify')"></span>
|
<span v-if="classify.text" class="delBtn el-icon-close" @click.stop="handleClickDelete('classify')"></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,7 +60,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="slider" v-if="colors.color">
|
<div class="slider" v-if="colors.color">
|
||||||
<span class="txt">精确的</span>
|
<span class="txt">精确度</span>
|
||||||
<el-slider v-model="colors.persion" @change="handleColoSlider"></el-slider>
|
<el-slider v-model="colors.persion" @change="handleColoSlider"></el-slider>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -192,10 +201,16 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="sitem.key=='ext'">
|
<template v-else-if="sitem.key=='ext'">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-popover popper-class="PopoverNotPadding" placement="bottom" width="225" trigger="click" @show="handleShowPopover('ext')" ref="ScreenPopoverRef">
|
<el-popover popper-class="PopoverNotPadding" placement="bottom" width="225" trigger="click" @show="handleShowPopover('ext')" @after-enter="handleShowafterPopover('ext')" ref="ScreenPopoverRef">
|
||||||
<div class="field-select-box dzz-dropdown-menu scroll" :style="{height: ext.height+'px'}">
|
<div class="field-select-box dzz-dropdown-menu scroll" :style="{height: ext.height+'px'}">
|
||||||
<el-scrollbar class="page-component__scroll">
|
<el-scrollbar class="page-component__scroll">
|
||||||
<div style="padding: 12px;">
|
<div style="padding: 12px;">
|
||||||
|
<template v-if="ext.loading">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<template v-if="ext.data && ext.data.length">
|
<template v-if="ext.data && ext.data.length">
|
||||||
<div class="dzz-dropdown-menu__item single" v-for="item in ext.data">
|
<div class="dzz-dropdown-menu__item single" v-for="item in ext.data">
|
||||||
<el-checkbox v-model="ext.val" :label="item.ext" @change="handleChangeExt"></el-checkbox>
|
<el-checkbox v-model="ext.val" :label="item.ext" @change="handleChangeExt"></el-checkbox>
|
||||||
@@ -205,6 +220,8 @@
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="dzz-dropdown-menu__item single screen-notdata">没有找到相关项目</div>
|
<div class="dzz-dropdown-menu__item single screen-notdata">没有找到相关项目</div>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
@@ -218,9 +235,15 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="sitem.key=='shape'">
|
<template v-else-if="sitem.key=='shape'">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-popover popper-class="PopoverNotPadding" placement="bottom" width="225" trigger="click" @show="handleShowPopover('shape')" ref="ScreenPopoverRef">
|
<el-popover popper-class="PopoverNotPadding" placement="bottom" width="225" trigger="click" @show="handleShowPopover('shape')" @after-enter="handleShowafterPopover('shape')" ref="ScreenPopoverRef">
|
||||||
<div class="field-select-box dzz-dropdown-menu">
|
<div class="field-select-box dzz-dropdown-menu">
|
||||||
<div style="padding:12px;">
|
<div style="padding:12px;">
|
||||||
|
<template v-if="shape.loading">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<div class="dzz-dropdown-menu__item single" v-for="item in shape.data">
|
<div class="dzz-dropdown-menu__item single" v-for="item in shape.data">
|
||||||
<el-checkbox v-model="shape.shape" :label="item.lablename" @change="handleChangeShape"></el-checkbox>
|
<el-checkbox v-model="shape.shape" :label="item.lablename" @change="handleChangeShape"></el-checkbox>
|
||||||
<span class="quantity">{{item.num}}</span>
|
<span class="quantity">{{item.num}}</span>
|
||||||
@@ -239,6 +262,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-single" :class="GetParams.shape||GetParams.shapesize?'active':''" slot="reference">
|
<div class="field-single" :class="GetParams.shape||GetParams.shapesize?'active':''" slot="reference">
|
||||||
@@ -254,7 +278,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="sitem.key=='grade'">
|
<template v-else-if="sitem.key=='grade'">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-popover placement="bottom" width="225" trigger="click" @show="handleShowPopover('grade')" ref="ScreenPopoverRef">
|
<el-popover placement="bottom" width="225" trigger="click" @show="handleShowPopover('grade')" @after-enter="handleShowafterPopover('grade')" ref="ScreenPopoverRef">
|
||||||
|
<template v-if="grade.loading">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<ul class="field-select-box dzz-dropdown-menu">
|
<ul class="field-select-box dzz-dropdown-menu">
|
||||||
<li class="dzz-dropdown-menu__item single" v-for="item in grade.data">
|
<li class="dzz-dropdown-menu__item single" v-for="item in grade.data">
|
||||||
<el-checkbox v-if="item.grade == 0" v-model="grade.grade" label="未评分" @change="handleChangeGrade">未评分</el-checkbox>
|
<el-checkbox v-if="item.grade == 0" v-model="grade.grade" label="未评分" @change="handleChangeGrade">未评分</el-checkbox>
|
||||||
@@ -264,6 +294,7 @@
|
|||||||
<span class="quantity">{{item.num}}</span>
|
<span class="quantity">{{item.num}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</template>
|
||||||
<div class="field-single" :class="GetParams.grade?'active':''" slot="reference">
|
<div class="field-single" :class="GetParams.grade?'active':''" slot="reference">
|
||||||
<span>评分<template v-if="GetParams.grade">:{{GetParams.grade}}</template></span>
|
<span>评分<template v-if="GetParams.grade">:{{GetParams.grade}}</template></span>
|
||||||
<i class="ri-arrow-down-s-fill icon"></i>
|
<i class="ri-arrow-down-s-fill icon"></i>
|
||||||
@@ -274,7 +305,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="sitem.key=='btime'">
|
<template v-else-if="sitem.key=='btime'">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-popover placement="bottom" width="225" trigger="click" @show="handleShowPopover('btime')" ref="ScreenPopoverRef">
|
<el-popover placement="bottom" width="225" trigger="click" @show="handleShowPopover('btime')" @after-enter="handleShowafterPopover('btime')" ref="ScreenPopoverRef">
|
||||||
|
<template v-if="btime.loading">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<ul class="field-select-box dzz-dropdown-menu">
|
<ul class="field-select-box dzz-dropdown-menu">
|
||||||
<li class="dzz-dropdown-menu__item single" v-for="item in btime.data">
|
<li class="dzz-dropdown-menu__item single" v-for="item in btime.data">
|
||||||
<el-radio v-model="btime.btime" :label="item.label" @click.native.prevent="handleScreenTime('btime',item.label)"></el-radio>
|
<el-radio v-model="btime.btime" :label="item.label" @click.native.prevent="handleScreenTime('btime',item.label)"></el-radio>
|
||||||
@@ -298,6 +335,7 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</template>
|
||||||
<div class="field-single" :class="GetParams.btime?'active':''" slot="reference">
|
<div class="field-single" :class="GetParams.btime?'active':''" slot="reference">
|
||||||
<span>添加时间<template v-if="GetParams.btime">:{{GetParams.btime}}</template></span>
|
<span>添加时间<template v-if="GetParams.btime">:{{GetParams.btime}}</template></span>
|
||||||
<i class="ri-arrow-down-s-fill icon"></i>
|
<i class="ri-arrow-down-s-fill icon"></i>
|
||||||
@@ -308,7 +346,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="sitem.key=='dateline'">
|
<template v-else-if="sitem.key=='dateline'">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-popover placement="bottom" width="225" trigger="click" @show="handleShowPopover('dateline')" ref="ScreenPopoverRef">
|
<el-popover placement="bottom" width="225" trigger="click" @show="handleShowPopover('dateline')" @after-enter="handleShowafterPopover('dateline')" ref="ScreenPopoverRef">
|
||||||
|
<template v-if="dateline.loading">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<ul class="field-select-box dzz-dropdown-menu">
|
<ul class="field-select-box dzz-dropdown-menu">
|
||||||
<li class="dzz-dropdown-menu__item single" v-for="item in dateline.data">
|
<li class="dzz-dropdown-menu__item single" v-for="item in dateline.data">
|
||||||
<el-radio v-model="dateline.dateline" :label="item.label" @click.native.prevent="handleScreenTime('dateline',item.label)"></el-radio>
|
<el-radio v-model="dateline.dateline" :label="item.label" @click.native.prevent="handleScreenTime('dateline',item.label)"></el-radio>
|
||||||
@@ -332,6 +376,8 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
<div class="field-single" :class="GetParams.dateline?'active':''" slot="reference">
|
<div class="field-single" :class="GetParams.dateline?'active':''" slot="reference">
|
||||||
<span>修改时间<template v-if="GetParams.dateline">:{{GetParams.dateline}}</template></span>
|
<span>修改时间<template v-if="GetParams.dateline">:{{GetParams.dateline}}</template></span>
|
||||||
<i class="ri-arrow-down-s-fill icon"></i>
|
<i class="ri-arrow-down-s-fill icon"></i>
|
||||||
@@ -342,7 +388,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="sitem.key=='mtime'">
|
<template v-else-if="sitem.key=='mtime'">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-popover placement="bottom" width="225" trigger="click" @show="handleShowPopover('mtime')" ref="ScreenPopoverRef">
|
<el-popover placement="bottom" width="225" trigger="click" @show="handleShowPopover('mtime')" @after-enter="handleShowafterPopover('mtime')" ref="ScreenPopoverRef">
|
||||||
|
<template v-if="mtime.loading">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<ul class="field-select-box dzz-dropdown-menu">
|
<ul class="field-select-box dzz-dropdown-menu">
|
||||||
<li class="dzz-dropdown-menu__item single" v-for="item in mtime.data">
|
<li class="dzz-dropdown-menu__item single" v-for="item in mtime.data">
|
||||||
<el-radio v-model="mtime.mtime" :label="item.label" @click.native.prevent="handleScreenTime('mtime',item.label)"></el-radio>
|
<el-radio v-model="mtime.mtime" :label="item.label" @click.native.prevent="handleScreenTime('mtime',item.label)"></el-radio>
|
||||||
@@ -366,6 +418,8 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
<div class="field-single" :class="GetParams.mtime?'active':''" slot="reference">
|
<div class="field-single" :class="GetParams.mtime?'active':''" slot="reference">
|
||||||
<span><span>创建时间</span><template v-if="GetParams.mtime">:{{GetParams.mtime}}</template></span>
|
<span><span>创建时间</span><template v-if="GetParams.mtime">:{{GetParams.mtime}}</template></span>
|
||||||
<i class="ri-arrow-down-s-fill icon"></i>
|
<i class="ri-arrow-down-s-fill icon"></i>
|
||||||
@@ -376,27 +430,44 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="sitem.key=='tag'">
|
<template v-else-if="sitem.key=='tag'">
|
||||||
<template v-if="sitem.showtype">
|
<template v-if="sitem.showtype">
|
||||||
<template v-for="bitem in ParamsTagData">
|
<template v-for="(bitem,index) in ParamsTagData">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-popover popper-class="PopoverNotPadding" placement="bottom" @show="handleShowPopover('grouptag',bitem.cid)" width="255" trigger="click" ref="ScreenPopoverRef">
|
<el-popover popper-class="PopoverNotPadding" placement="bottom" @show="handleShowPopover('grouptag',index)" @after-enter="handleShowafterPopover('grouptag',bitem.cid,index)" width="255" trigger="click" ref="ScreenPopoverRef">
|
||||||
|
|
||||||
|
|
||||||
<div class="field-select-box">
|
<div class="field-select-box">
|
||||||
<div class="tags-box clearfix">
|
<div class="tags-box clearfix">
|
||||||
<div class="right">
|
<div class="right">
|
||||||
|
<template v-if="!bitem.loading">
|
||||||
<div style="padding: 0 12px;margin-bottom: 8px;">
|
<div style="padding: 0 12px;margin-bottom: 8px;">
|
||||||
<el-input size="small" placeholder="请输入内容" prefix-icon="el-icon-search" v-model.trim="modelParamsTag[bitem.cid].search" clearable @input="handleRightGroupTagSearch(bitem.cid)"></el-input>
|
<el-input size="small" placeholder="请输入内容" prefix-icon="el-icon-search" v-model.trim="modelParamsTag[bitem.cid].search" clearable @input="handleRightGroupTagSearch(bitem.cid,index)"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar class="page-component__scroll" style="height: 357px;">
|
</template>
|
||||||
|
<el-scrollbar class="page-component__scroll scrollbarTag" style="height: 357px;" :ref="'scrollbarTag'+bitem.cid">
|
||||||
|
<template v-if="bitem.loading">
|
||||||
|
<div style="padding:12px;">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<ul class="el-popper">
|
<ul class="el-popper">
|
||||||
<li class="el-dropdown-menu__item" v-for="vitem in paramsTag[bitem.cid].newVal">
|
<!-- <el-checkbox-group v-model="tagData.checkedsId"> -->
|
||||||
<el-checkbox class="txt" v-model="modelParamsTag[bitem.cid].data" :label="vitem.tid" @change="handleClickRightGroupTag(bitem.cid,vitem.tid)">{{vitem.tagname}}</el-checkbox>
|
<li class="el-dropdown-menu__item" v-for="vitem in modelParamsTag[bitem.cid].data">
|
||||||
|
<el-checkbox class="txt" v-model="modelParamsTag[bitem.cid].value" :label="vitem.tid" @change="handleClickRightGroupTag(bitem.cid,vitem.tid)">{{vitem.tagname}}</el-checkbox>
|
||||||
<span class="num">{{vitem.num}}</span>
|
<span class="num">{{vitem.num}}</span>
|
||||||
</li>
|
</li>
|
||||||
|
<!-- </el-checkbox-group> -->
|
||||||
</ul>
|
</ul>
|
||||||
|
</template>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="field-single" :class="modelParamsTag[bitem.cid].text?'active':''" slot="reference">
|
<div class="field-single" :class="modelParamsTag[bitem.cid].text?'active':''" slot="reference">
|
||||||
<span>{{bitem.catname}} <span v-if="modelParamsTag[bitem.cid].text">:{{modelParamsTag[bitem.cid].text}}</span> </span>
|
<span>{{bitem.catname}} <span v-if="modelParamsTag[bitem.cid].text">:{{modelParamsTag[bitem.cid].text}}</span> </span>
|
||||||
<i class="ri-arrow-down-s-fill icon"></i>
|
<i class="ri-arrow-down-s-fill icon"></i>
|
||||||
@@ -408,21 +479,25 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="block alltag-block">
|
<div class="block alltag-block">
|
||||||
<el-popover popper-class="PopoverNotPadding" placement="bottom" @show="handleShowPopover('tag')" :width="GetAppid?508:255" trigger="click" ref="ScreenPopoverRef">
|
<el-popover popper-class="PopoverNotPadding" placement="bottom" @show="handleShowPopover('tag')" @after-enter="handleShowafterPopover('tag')" :width="GetAppid?508:255" trigger="click" @after-leave="handleHideafterPopover('tag')" ref="ScreenPopoverRef">
|
||||||
<div class="field-select-box">
|
<div class="field-select-box">
|
||||||
<div class="tags-box clearfix">
|
<div class="tags-box clearfix">
|
||||||
<div class="left" v-if="GetAppid">
|
<div class="left" v-if="GetAppid">
|
||||||
<p class="title">标签分类</p>
|
<p class="title">标签分类</p>
|
||||||
<el-scrollbar class="page-component__scroll" style="height: 308px;">
|
<el-scrollbar class="page-component__scroll" style="height: 308px;">
|
||||||
|
<template v-if="tagData.loading">
|
||||||
|
<div class="img-loading center">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<ul class="el-popper">
|
<ul class="el-popper">
|
||||||
<li class="el-dropdown-menu__item" :class="tagData.checkedsFid=='all'?'active':''" @click="handleClickLeftTag('all')">
|
<li class="el-dropdown-menu__item" v-for="(item,index) in tagData.alltagdata.catdata" :class="tagData.checkedsFid==index?'active':''" @click="handleClickLeftTag(index)" v-key="index">
|
||||||
<div class="txt">全部</div>
|
|
||||||
</li>
|
|
||||||
<li class="el-dropdown-menu__item" v-for="(item,index) in tagData.alltagdata.catdata" :class="tagData.checkedsFid==index?'active':''" @click="handleClickLeftTag(index)">
|
|
||||||
<div class="txt">{{item.catname}}</div>
|
<div class="txt">{{item.catname}}</div>
|
||||||
<span class="num">{{item.num}}</span>
|
<span class="num">{{item.num}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</template>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<div class="logic">
|
<div class="logic">
|
||||||
<span>逻辑:</span>
|
<span>逻辑:</span>
|
||||||
@@ -447,21 +522,42 @@
|
|||||||
<div style="padding: 0 12px;margin-bottom: 8px;">
|
<div style="padding: 0 12px;margin-bottom: 8px;">
|
||||||
<el-input size="small" placeholder="请输入内容" prefix-icon="el-icon-search" v-model.trim="tagData.search" clearable @input="handleRightTagSearch"></el-input>
|
<el-input size="small" placeholder="请输入内容" prefix-icon="el-icon-search" v-model.trim="tagData.search" clearable @input="handleRightTagSearch"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar class="page-component__scroll" style="height: 357px;">
|
<el-scrollbar class="page-component__scroll scrollbarTag" style="height: 357px;" ref="scrollbarTag">
|
||||||
|
<template v-if="tagData.alltagdata.catdata[tagData.checkedsFid]">
|
||||||
|
<template v-if="tagData.alltagdata.catdata[tagData.checkedsFid].loading">
|
||||||
|
<div class="img-loading center">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-checkbox-group v-model="tagData.checkedsId" @change="handleClickRightTag">
|
||||||
<ul class="el-popper">
|
<ul class="el-popper">
|
||||||
<li class="el-dropdown-menu__item" v-for="item in tagData.Rightdata">
|
<li class="el-dropdown-menu__item" v-for="item in tagData.alltagdata.catdata[tagData.checkedsFid].tdatas" v-key="item.tid">
|
||||||
<el-checkbox class="txt" v-model="tagData.checkedsId" :label="item.tid" @change="handleClickRightTag(item.tid)">{{item.tagname}}</el-checkbox>
|
<el-checkbox class="txt" :label="item.tid">{{item.tagname}}</el-checkbox>
|
||||||
<span class="num">{{item.num}}</span>
|
<span class="num">{{item.num}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<template v-if="tagData.alltagdata.catdata[tagData.checkedsFid].valloading">
|
||||||
|
<div class="img-loading" style="position: relative;">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="img-loading center">
|
||||||
|
<span class="el-icon-loading"></span>加载中...
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="field-single" :class="tagData.checkedstxt?'active':''" slot="reference">
|
<div class="field-single" :class="tagData.checkedstxt?'active':''" slot="reference">
|
||||||
<span v-if="tagData.checkedstxt">标签:{{tagData.checkedstxt}}</span>
|
标签
|
||||||
<span v-else>标签</span>
|
<span class="screen-show-val" v-if="tagData.checkedstxt">:{{tagData.checkedstxt}}</span>
|
||||||
<i class="ri-arrow-down-s-fill icon"></i>
|
<i class="ri-arrow-down-s-fill icon"></i>
|
||||||
<span v-if="tagData.checkedstxt" class="delBtn el-icon-close" @click.stop="handleClickDelete('tag')"></span>
|
<span v-if="tagData.checkedstxt" class="delBtn el-icon-close" @click.stop="handleClickDelete('tag')"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="img-loading" v-if="imageLoading">
|
<div class="img-loading" v-if="imageLoading">
|
||||||
<span class="el-icon-loading"></span>拼命加载中...
|
<span class="el-icon-loading"></span>加载中...
|
||||||
</div>
|
</div>
|
||||||
<div class="img-loading" v-if="imgdatas.length&&Parameter.page>=Parameter.totalpage&&!GetFirstLoading&&!imageLoading">没有更多了</div>
|
<div class="img-loading" v-if="imgdatas.length&&Parameter.page>=Parameter.totalpage&&!GetFirstLoading&&!imageLoading">没有更多了</div>
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
str.push(val[i].rid);
|
str.push(val[i].rid);
|
||||||
}
|
}
|
||||||
str = str.join(',');
|
str = str.join(',');
|
||||||
window.localStorage.setItem('imgs',str)
|
window.localStorage.setItem('imgs',str);
|
||||||
},
|
},
|
||||||
deep:true,
|
deep:true,
|
||||||
immediate:true
|
immediate:true
|
||||||
@@ -437,7 +437,7 @@
|
|||||||
maxNewtop:0,
|
maxNewtop:0,
|
||||||
maxNewLeft:0,
|
maxNewLeft:0,
|
||||||
perpage : 0,
|
perpage : 0,
|
||||||
Margin:10,
|
Margin:8,
|
||||||
columns:0,
|
columns:0,
|
||||||
fcolumns:1,
|
fcolumns:1,
|
||||||
newWidth:0,//图片宽度
|
newWidth:0,//图片宽度
|
||||||
|
|||||||
@@ -94,6 +94,9 @@
|
|||||||
SetParamsTagData(state,val){//设置标签分类筛选值
|
SetParamsTagData(state,val){//设置标签分类筛选值
|
||||||
state.ParamsTagData = val;
|
state.ParamsTagData = val;
|
||||||
},
|
},
|
||||||
|
SetParamsTagDataLoading(state,val){//设置标签分类loading
|
||||||
|
state.ParamsTagData[val.index]['loading'] = val.val;
|
||||||
|
},
|
||||||
SetimageLoading(state,val){//设置图片时的loading
|
SetimageLoading(state,val){//设置图片时的loading
|
||||||
state.imageLoading = val;
|
state.imageLoading = val;
|
||||||
},
|
},
|
||||||
@@ -286,12 +289,13 @@
|
|||||||
// commit('SetAppid',value.appid);
|
// commit('SetAppid',value.appid);
|
||||||
for(var i in value.param){
|
for(var i in value.param){
|
||||||
if(i == 'tagdata'){
|
if(i == 'tagdata'){
|
||||||
|
if(state.FirstLoading){
|
||||||
if(state.ParamsInit.tag && state.ParamsInit.tag.length == 0){
|
if(state.ParamsInit.tag && state.ParamsInit.tag.length == 0){
|
||||||
if(value.param[i] && value.param[i].length){
|
if(value.param[i] && value.param[i].length){
|
||||||
commit('SetParamsInit',{key:'tag',val:value.param[i]});
|
commit('SetParamsInit',{key:'tag',val:value.param[i]});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else if(i == 'folderdata'){
|
}else if(i == 'folderdata'){
|
||||||
if(!state.classifyInit){
|
if(!state.classifyInit){
|
||||||
var txts = [];
|
var txts = [];
|
||||||
@@ -418,7 +422,7 @@
|
|||||||
if(type == 'scroll'){
|
if(type == 'scroll'){
|
||||||
commit('SetimgParameter',{key:'page',val:parseInt(search.page)+1});
|
commit('SetimgParameter',{key:'page',val:parseInt(search.page)+1});
|
||||||
}else{
|
}else{
|
||||||
$('.el-scrollbar__wrap').scrollTop(0)
|
jQuery('.body_scroll>.el-scrollbar__wrap').scrollTop(0)
|
||||||
commit('SetimgParameter',{key:'page',val:1});
|
commit('SetimgParameter',{key:'page',val:1});
|
||||||
}
|
}
|
||||||
var imgParameterInit = state.imgParameterInit;
|
var imgParameterInit = state.imgParameterInit;
|
||||||
@@ -465,6 +469,7 @@
|
|||||||
var group = [];
|
var group = [];
|
||||||
for(var t in item.group){
|
for(var t in item.group){
|
||||||
if(parseInt(item.group[t].checked)){
|
if(parseInt(item.group[t].checked)){
|
||||||
|
item.group[t]['loading'] = true;
|
||||||
group.push(item.group[t]);
|
group.push(item.group[t]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -494,7 +499,7 @@
|
|||||||
if(json.success){
|
if(json.success){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
self.$message.error('数据失败')
|
self.$message.error('显示信息数据保存失败')
|
||||||
}
|
}
|
||||||
},'json')
|
},'json')
|
||||||
},
|
},
|
||||||
@@ -519,7 +524,6 @@
|
|||||||
sortfiled:sortfiles,
|
sortfiled:sortfiles,
|
||||||
sort:state.imgParameter.asc
|
sort:state.imgParameter.asc
|
||||||
};
|
};
|
||||||
var self = pvue;
|
|
||||||
$.post(MOD_URL+'&op=ajax&operation=setsort',param,function(json){
|
$.post(MOD_URL+'&op=ajax&operation=setsort',param,function(json){
|
||||||
if(json.success){
|
if(json.success){
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
formhash:'{FORMHASH}',
|
formhash:'{FORMHASH}',
|
||||||
settingnew:self.formdata,
|
settingnew:self.formdata,
|
||||||
},function(data){
|
},function(data){
|
||||||
console.log(data)
|
// console.log(data)
|
||||||
if(data){
|
if(data){
|
||||||
self.$message({
|
self.$message({
|
||||||
type:'success',
|
type:'success',
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<!--{template pc/frame/header_simple_start}-->
|
<!--{template pc/frame/header_simple_start}-->
|
||||||
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/index.css?{VERHASH}"/>
|
<link rel="stylesheet" type="text/css" href="{MOD_PATH}/css/pc/index.css?{VERHASH}"/>
|
||||||
<script type="text/javascript" src="{MOD_PATH}/js/vue/vuex.js?{VERHASH}"></script>
|
<script type="text/javascript" src="{MOD_PATH}/js/vue/vuex.js?{VERHASH}"></script>
|
||||||
<script type="text/javascript" src="{MOD_PATH}/js/row-grid.js?{VERHASH}"></script>
|
<script type="text/javascript" src="{MOD_PATH}/js/pc/row-grid.js?{VERHASH}"></script>
|
||||||
<script type="text/javascript" src="{MOD_PATH}/js/waterfall.js?{VERHASH}"></script>
|
<script type="text/javascript" src="{MOD_PATH}/js/pc/waterfall.js?{VERHASH}"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="{MOD_PATH}/js/pc/plug/wavesurfer.js?{VERHASH}"></script>
|
<script type="text/javascript" src="{MOD_PATH}/js/pc/plug/wavesurfer.js?{VERHASH}"></script>
|
||||||
<script type="text/javascript" src="{MOD_PATH}/js/pc/audioPlay.js?{VERHASH}"></script>
|
<script type="text/javascript" src="{MOD_PATH}/js/pc/audioPlay.js?{VERHASH}"></script>
|
||||||
@@ -105,14 +105,14 @@
|
|||||||
if(other){
|
if(other){
|
||||||
VuexStore.commit('seTHeader_Information_other', other);
|
VuexStore.commit('seTHeader_Information_other', other);
|
||||||
}else{
|
}else{
|
||||||
VuexStore.commit('seTHeader_Information_other', 'btime');
|
VuexStore.commit('seTHeader_Information_other', pagesetting.other);
|
||||||
}
|
}
|
||||||
|
|
||||||
var Layout = sessionStorage.getItem('Layout');
|
var Layout = sessionStorage.getItem('Layout');
|
||||||
if(Layout){
|
if(Layout){
|
||||||
VuexStore.commit('seTHeader_Information_Layout', Layout);
|
VuexStore.commit('seTHeader_Information_Layout', Layout);
|
||||||
}else{
|
}else{
|
||||||
VuexStore.commit('seTHeader_Information_Layout', 'waterFall');
|
VuexStore.commit('seTHeader_Information_Layout', pagesetting.layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
var order = sessionStorage.getItem('order');
|
var order = sessionStorage.getItem('order');
|
||||||
@@ -120,8 +120,8 @@
|
|||||||
VuexStore.commit('SetimgParameter', {key:'order',val:parseInt(order)});
|
VuexStore.commit('SetimgParameter', {key:'order',val:parseInt(order)});
|
||||||
VuexStore.commit('SetimgParameterInit', {key:'order',val:parseInt(order)});
|
VuexStore.commit('SetimgParameterInit', {key:'order',val:parseInt(order)});
|
||||||
}else{
|
}else{
|
||||||
VuexStore.commit('SetimgParameter', {key:'order',val:'1'});
|
VuexStore.commit('SetimgParameter', {key:'order',val:parseInt(pagesetting.sort)});
|
||||||
VuexStore.commit('SetimgParameterInit', {key:'order',val:'1'});
|
VuexStore.commit('SetimgParameterInit', {key:'order',val:parseInt(pagesetting.sort)});
|
||||||
}
|
}
|
||||||
|
|
||||||
var asc = sessionStorage.getItem('asc');
|
var asc = sessionStorage.getItem('asc');
|
||||||
@@ -129,8 +129,8 @@
|
|||||||
VuexStore.commit('SetimgParameter', {key:'asc',val:asc});
|
VuexStore.commit('SetimgParameter', {key:'asc',val:asc});
|
||||||
VuexStore.commit('SetimgParameterInit', {key:'asc',val:asc});
|
VuexStore.commit('SetimgParameterInit', {key:'asc',val:asc});
|
||||||
}else{
|
}else{
|
||||||
VuexStore.commit('SetimgParameter', {key:'asc',val:'desc'});
|
VuexStore.commit('SetimgParameter', {key:'asc',val:pagesetting.desc});
|
||||||
VuexStore.commit('SetimgParameterInit', {key:'asc',val:'desc'});
|
VuexStore.commit('SetimgParameterInit', {key:'asc',val:pagesetting.desc});
|
||||||
}
|
}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if $_G[uid]}-->
|
<!--{if $_G[uid]}-->
|
||||||
@@ -140,15 +140,11 @@
|
|||||||
var ShowScreen = sessionStorage.getItem('showscreen_'+GetAppid)? sessionStorage.getItem('showscreen_'+GetAppid):0;
|
var ShowScreen = sessionStorage.getItem('showscreen_'+GetAppid)? sessionStorage.getItem('showscreen_'+GetAppid):0;
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
<!--{if $_G[uid]}-->
|
|
||||||
if(pagesetting.opentype){
|
if(pagesetting.opentype){
|
||||||
VuexStore.commit('seTHeader_Information_Opentype', pagesetting.opentype);
|
VuexStore.commit('seTHeader_Information_Opentype', pagesetting.opentype);
|
||||||
}else{
|
}else{
|
||||||
VuexStore.commit('seTHeader_Information_Opentype', 'new');
|
VuexStore.commit('seTHeader_Information_Opentype', 'new');
|
||||||
}
|
}
|
||||||
<!--{else}-->
|
|
||||||
VuexStore.commit('seTHeader_Information_Opentype', 'new');
|
|
||||||
<!--{/if}-->
|
|
||||||
|
|
||||||
VuexStore.commit('SetShowScreen',ShowScreen);
|
VuexStore.commit('SetShowScreen',ShowScreen);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -431,7 +431,7 @@
|
|||||||
handleRefresh(index,appid){
|
handleRefresh(index,appid){
|
||||||
var self = this;
|
var self = this;
|
||||||
// if(!self.dataList[index]['time']){
|
// if(!self.dataList[index]['time']){
|
||||||
$.post(MOD_URL+'&op=exportfile&appid='+appid);
|
$.post(MOD_URL+'&op=initexport&appid='+appid);
|
||||||
self.dataList[index].state = 1;
|
self.dataList[index].state = 1;
|
||||||
self.dataList[index].percent = 0;
|
self.dataList[index].percent = 0;
|
||||||
self.handleRefreshLoading(index,appid);
|
self.handleRefreshLoading(index,appid);
|
||||||
@@ -441,7 +441,7 @@
|
|||||||
handleimplement(index,appid){
|
handleimplement(index,appid){
|
||||||
var self = this;
|
var self = this;
|
||||||
if(!self.dataList[index]['time']){
|
if(!self.dataList[index]['time']){
|
||||||
$.post(MOD_URL+'&op=exportfile&appid='+appid);
|
$.post(MOD_URL+'&op=initexport&appid='+appid);
|
||||||
self.dataList[index].state = 1;
|
self.dataList[index].state = 1;
|
||||||
self.handleRefreshLoading(index,appid);
|
self.handleRefreshLoading(index,appid);
|
||||||
}
|
}
|
||||||
@@ -475,10 +475,10 @@
|
|||||||
self.dataList[index].filenum = data.data.filenum;
|
self.dataList[index].filenum = data.data.filenum;
|
||||||
self.dataList[index].percent = parseInt(data.data.percent);
|
self.dataList[index].percent = parseInt(data.data.percent);
|
||||||
self.dataList[index].state = parseInt(data.data.state);
|
self.dataList[index].state = parseInt(data.data.state);
|
||||||
if(self.dataList[index].state==0){
|
/*if(self.dataList[index].state==0){
|
||||||
clearInterval(self.dataList[index]['time']);
|
clearInterval(self.dataList[index]['time']);
|
||||||
self.$message.error('更新中断,请刷新重试');
|
self.$message.error('更新中断,请刷新重试');
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
clearInterval(self.dataList[index]['time']);
|
clearInterval(self.dataList[index]['time']);
|
||||||
@@ -495,7 +495,7 @@
|
|||||||
$.post(MOD_URL+'&op=library&operation=getdata',function(data){
|
$.post(MOD_URL+'&op=library&operation=getdata',function(data){
|
||||||
self.dataList = data.data;
|
self.dataList = data.data;
|
||||||
for(var i in self.dataList){
|
for(var i in self.dataList){
|
||||||
if(parseInt(self.dataList[i].state) == 1){
|
if(parseInt(self.dataList[i].state) == 1 || parseInt(self.dataList[i].state) == 2){
|
||||||
self.handleimplement(i,self.dataList[i].appid)
|
self.handleimplement(i,self.dataList[i].appid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
$do = isset($_GET['do']) ? trim($_GET['do']) : '';
|
$do = isset($_GET['do']) ? trim($_GET['do']) : '';
|
||||||
require_once libfile('function/user', '', 'user');
|
require_once libfile('function/user', '', 'user');
|
||||||
$user = C::t('user')->get_user_by_uid($uid);
|
$user = C::t('user')->get_user_by_uid($uid);
|
||||||
|
$ismobile = helper_browser::ismobile();
|
||||||
if(empty($user['avatarstatus']) && dzz_check_avatar($_G['uid'], 'middle')) {
|
if(empty($user['avatarstatus']) && dzz_check_avatar($_G['uid'], 'middle')) {
|
||||||
C::t('user')->update($_G['uid'], array('avatarstatus'=>'1'));
|
C::t('user')->update($_G['uid'], array('avatarstatus'=>'1'));
|
||||||
}
|
}
|
||||||
@@ -17,11 +18,17 @@
|
|||||||
$user = C::t('user')->fetch_by_uid($uid);
|
$user = C::t('user')->fetch_by_uid($uid);
|
||||||
if (!$uid) exit(json_encode(array('error' => true, 'msg' => '用户不存在')));
|
if (!$uid) exit(json_encode(array('error' => true, 'msg' => '用户不存在')));
|
||||||
if(isset($_GET['imgpath'])){
|
if(isset($_GET['imgpath'])){
|
||||||
|
if($ismobile){
|
||||||
|
upbase64(trim($_GET['imgpath']),$uid);
|
||||||
|
}else{
|
||||||
$base64img = base64EncodeImage($_GET['imgpath']);
|
$base64img = base64EncodeImage($_GET['imgpath']);
|
||||||
if(upbase64($base64img,$uid)){
|
if(upbase64($base64img,$uid)){
|
||||||
@unlink($_GET['imgpath']);
|
@unlink($_GET['imgpath']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//用户名验证
|
//用户名验证
|
||||||
$username = trim($_GET['username']);
|
$username = trim($_GET['username']);
|
||||||
if (empty($username)) {
|
if (empty($username)) {
|
||||||
@@ -112,8 +119,14 @@
|
|||||||
$uid = getglobal('uid');
|
$uid = getglobal('uid');
|
||||||
$userdata = C::t('user')->fetch($uid);
|
$userdata = C::t('user')->fetch($uid);
|
||||||
$theme = GetThemeColor();
|
$theme = GetThemeColor();
|
||||||
|
|
||||||
|
if ($ismobile) {
|
||||||
|
include template('mobile/page/personal');
|
||||||
|
} else {
|
||||||
include template('pc/page/adminPersonal');
|
include template('pc/page/adminPersonal');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif ($do == 'uploadimg') {//上传用户头像
|
elseif ($do == 'uploadimg') {//上传用户头像
|
||||||
$uid = getglobal('uid');
|
$uid = getglobal('uid');
|
||||||
@@ -172,13 +185,12 @@
|
|||||||
}
|
}
|
||||||
function upBase64($base64Data, $uid)
|
function upBase64($base64Data, $uid)
|
||||||
{
|
{
|
||||||
$img = base64_decode(str_replace('data:image/png;base64,', '', $base64Data));
|
$img = base64_decode(str_replace(array('data:image/png;base64,','data:image/jpeg;base64,','data:image/gif;base64,','data:image/jpg;base64,'), '', $base64Data));
|
||||||
$temp = getglobal('setting/attachdir') . 'cache/' . random(5) . '.png';
|
$temp = getglobal('setting/attachdir') . 'cache/' . random(5) . '.png';
|
||||||
//移动文件
|
//移动文件
|
||||||
if (!(file_put_contents($temp, $img))) { //移动失败
|
if (!(file_put_contents($temp, $img))) { //移动失败
|
||||||
return false;
|
return false;
|
||||||
} else { //移动成功,生成3种尺寸头像
|
} else { //移动成功,生成3种尺寸头像
|
||||||
|
|
||||||
$home = get_home($uid);
|
$home = get_home($uid);
|
||||||
if (!is_dir(DZZ_ROOT . './data/avatar/' . $home)) {
|
if (!is_dir(DZZ_ROOT . './data/avatar/' . $home)) {
|
||||||
set_home($uid, DZZ_ROOT . './data/avatar/');
|
set_home($uid, DZZ_ROOT . './data/avatar/');
|
||||||
|
|||||||
Reference in New Issue
Block a user