优化
This commit is contained in:
parent
c0c9ab8c44
commit
7c262f403d
@ -781,172 +781,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"aweme_id": "7344265295055310132",
|
||||
"desc": "“国服柳如烟上线”#如烟#这谁顶得住",
|
||||
"create_time": 1709970027,
|
||||
"music": {
|
||||
"id": 7337886325556727000,
|
||||
"title": "@小欣儿创作的原声",
|
||||
"author": "小欣儿",
|
||||
"cover_medium": {
|
||||
"uri": "720x720/aweme-avatar/tos-cn-avt-0015_a6d8094050c5a9aac6137aae126b7a47",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/aweme/720x720/aweme-avatar/tos-cn-avt-0015_a6d8094050c5a9aac6137aae126b7a47.jpeg?from=116350172"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"cover_thumb": {
|
||||
"uri": "100x100/aweme-avatar/tos-cn-avt-0015_a6d8094050c5a9aac6137aae126b7a47",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_a6d8094050c5a9aac6137aae126b7a47.jpeg?from=116350172"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"play_url": {
|
||||
"uri": "https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/7337886324118031113.mp3",
|
||||
"url_list": [
|
||||
"https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/7337886324118031113.mp3",
|
||||
"https://sf3-cdn-tos.douyinstatic.com/obj/ies-music/7337886324118031113.mp3"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720,
|
||||
"url_key": "7337886325556726565"
|
||||
},
|
||||
"duration": 11,
|
||||
"user_count": 0,
|
||||
"owner_id": "110935171531",
|
||||
"owner_nickname": "小欣儿",
|
||||
"is_original": false
|
||||
},
|
||||
"video": {
|
||||
"play_addr": {
|
||||
"uri": "v0200fg10000cnm149rc77u1u62fpfa0",
|
||||
"url_list": [
|
||||
"https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000cnm149rc77u1u62fpfa0&line=0&file_id=de5d861881cb4c3ba5ba7f73851d1531&sign=593ac30f710cedcdbb5458afe1ae625f&is_play_url=1&source=PackSourceEnum_PUBLISH"
|
||||
],
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"url_key": "v0200fg10000cnm149rc77u1u62fpfa0_h264_1080p_1573778",
|
||||
"data_size": 2219814,
|
||||
"file_hash": "593ac30f710cedcdbb5458afe1ae625f",
|
||||
"file_cs": "c:0-10214-c463|d:0-1109906-c9ec,1109907-2219813-7d47|a:v0200fg10000cnm149rc77u1u62fpfa0"
|
||||
},
|
||||
"cover": {
|
||||
"uri": "tos-cn-i-0813c001/oUAIgDcA9JDElAEbsAf7DBmgcymnACepChkAkp",
|
||||
"url_list": [
|
||||
"6mGGKOOF7psnNoFKnjgVF.png"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"height": 1920,
|
||||
"width": 1080,
|
||||
"ratio": "1080p",
|
||||
"use_static_cover": true,
|
||||
"duration": 11284
|
||||
},
|
||||
"share_url": "https://www.iesdouyin.com/share/video/7344265295055310132/?region=CN&mid=7337886325556726565&u_code=13kgm680k&did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=qLwbH_SIOvxZIUHxEYTsfovxpxr4G1WZXSYaitKR.Zs-&share_version=170400&ts=1710488945&from_aid=6383&from_ssr=1",
|
||||
"statistics": {
|
||||
"admire_count": 4,
|
||||
"comment_count": 105,
|
||||
"digg_count": 24454,
|
||||
"collect_count": 3199,
|
||||
"play_count": 0,
|
||||
"share_count": 2565
|
||||
},
|
||||
"status": {
|
||||
"listen_video_status": 0,
|
||||
"is_delete": false,
|
||||
"allow_share": true,
|
||||
"is_prohibited": false,
|
||||
"in_reviewing": false,
|
||||
"part_see": 0,
|
||||
"private_status": 0,
|
||||
"review_result": {
|
||||
"review_status": 0
|
||||
}
|
||||
},
|
||||
"text_extra": [
|
||||
{
|
||||
"start": 9,
|
||||
"end": 12,
|
||||
"type": 1,
|
||||
"hashtag_name": "如烟",
|
||||
"hashtag_id": "1601875223142424",
|
||||
"is_commerce": false,
|
||||
"caption_start": 9,
|
||||
"caption_end": 12
|
||||
},
|
||||
{
|
||||
"start": 12,
|
||||
"end": 18,
|
||||
"type": 1,
|
||||
"hashtag_name": "这谁顶得住",
|
||||
"hashtag_id": "1620356061458446",
|
||||
"is_commerce": false,
|
||||
"caption_start": 12,
|
||||
"caption_end": 18
|
||||
}
|
||||
],
|
||||
"is_top": 0,
|
||||
"share_info": {
|
||||
"share_url": "https://www.iesdouyin.com/share/video/7344265295055310132/?region=CN&mid=7337886325556726565&u_code=13kgm680k&did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=qLwbH_SIOvxZIUHxEYTsfovxpxr4G1WZXSYaitKR.Zs-&share_version=170400&ts=1710488945&from_aid=6383&from_ssr=1",
|
||||
"share_link_desc": "3.33 PkC:/ 01/17 t@r.eo “国服柳如烟上线”# 如烟# 这谁顶得住 %s 复制此链接,打开Dou音搜索,直接观看视频!"
|
||||
},
|
||||
"duration": 11284,
|
||||
"image_infos": null,
|
||||
"risk_infos": {
|
||||
"vote": false,
|
||||
"warn": false,
|
||||
"risk_sink": false,
|
||||
"type": 0,
|
||||
"content": ""
|
||||
},
|
||||
"position": null,
|
||||
"author_user_id": 2739632844317827,
|
||||
"prevent_download": false,
|
||||
"long_video": null,
|
||||
"aweme_control": {
|
||||
"can_forward": true,
|
||||
"can_share": true,
|
||||
"can_comment": true,
|
||||
"can_show_comment": true
|
||||
},
|
||||
"images": null,
|
||||
"suggest_words": {
|
||||
"suggest_words": [
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "柳如烟扮演者",
|
||||
"word_id": "6595880057841915140",
|
||||
"info": "{\"qrec_for_search\":\"{}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "comment_top_rec",
|
||||
"icon_url": "",
|
||||
"hint_text": "大家都在搜:",
|
||||
"extra_info": "{}"
|
||||
},
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "柳如烟",
|
||||
"word_id": "6538743212901684488",
|
||||
"info": "{\"qrec_for_search\":\"{}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "detail_inbox_rex",
|
||||
"icon_url": "",
|
||||
"hint_text": "",
|
||||
"extra_info": "{}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"aweme_id": "7343597612525767976",
|
||||
"desc": "男生:今天出门遇见一傻子#真实了#心动",
|
||||
@ -1769,172 +1603,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"aweme_id": "7330570097842457871",
|
||||
"desc": "好险~差点就打进了#越南卡点舞#看好了",
|
||||
"create_time": 1706781368,
|
||||
"music": {
|
||||
"id": 7316830999415983000,
|
||||
"title": "@killerGirl Dance创作的原声",
|
||||
"author": "killerGirl Dance",
|
||||
"cover_medium": {
|
||||
"uri": "720x720/aweme-avatar/tos-cn-avt-0015_dda77a5c5ac0eda5fcb9ec522d191fba",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/aweme/720x720/aweme-avatar/tos-cn-avt-0015_dda77a5c5ac0eda5fcb9ec522d191fba.jpeg?from=116350172"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"cover_thumb": {
|
||||
"uri": "100x100/aweme-avatar/tos-cn-avt-0015_dda77a5c5ac0eda5fcb9ec522d191fba",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_dda77a5c5ac0eda5fcb9ec522d191fba.jpeg?from=116350172"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"play_url": {
|
||||
"uri": "https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/7316830969424595721.mp3",
|
||||
"url_list": [
|
||||
"https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/7316830969424595721.mp3",
|
||||
"https://sf3-cdn-tos.douyinstatic.com/obj/ies-music/7316830969424595721.mp3"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720,
|
||||
"url_key": "7316830999415982886"
|
||||
},
|
||||
"duration": 15,
|
||||
"user_count": 0,
|
||||
"owner_id": "2058705326387616",
|
||||
"owner_nickname": "killerGirl Dance",
|
||||
"is_original": false
|
||||
},
|
||||
"video": {
|
||||
"play_addr": {
|
||||
"uri": "v0200fg10000cmtmlbbc77u3fj22iva0",
|
||||
"url_list": [
|
||||
"https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000cmtmlbbc77u3fj22iva0&line=0&file_id=d3c241ed123a4f348f1e54b075f24500&sign=9db49a599aecc07dcfa816e6d50391be&is_play_url=1&source=PackSourceEnum_PUBLISH"
|
||||
],
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"url_key": "v0200fg10000cmtmlbbc77u3fj22iva0_h264_1080p_2001386",
|
||||
"data_size": 2576785,
|
||||
"file_hash": "9db49a599aecc07dcfa816e6d50391be",
|
||||
"file_cs": "c:0-9630-6390|d:0-1288391-8190,1288392-2576784-f302|a:v0200fg10000cmtmlbbc77u3fj22iva0"
|
||||
},
|
||||
"cover": {
|
||||
"uri": "tos-cn-i-0813c001/ocrAbNb78gYezUAIANPhAbCCaA3fEmMNy3V0AC",
|
||||
"url_list": [
|
||||
"NWUFgBo8ObwTjCuyye-Sp.png"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"height": 1920,
|
||||
"width": 1080,
|
||||
"ratio": "1080p",
|
||||
"use_static_cover": true,
|
||||
"duration": 10300
|
||||
},
|
||||
"share_url": "https://www.iesdouyin.com/share/video/7330570097842457871/?region=CN&mid=7316830999415982886&u_code=13kgm680k&did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=QRtsbif6VtGC1e4wmw7wqq.x4F9hAvU5hiSa838fUR4-&share_version=170400&ts=1710488945&from_aid=6383&from_ssr=1",
|
||||
"statistics": {
|
||||
"admire_count": 4,
|
||||
"comment_count": 2198,
|
||||
"digg_count": 126157,
|
||||
"collect_count": 12966,
|
||||
"play_count": 0,
|
||||
"share_count": 89630
|
||||
},
|
||||
"status": {
|
||||
"listen_video_status": 0,
|
||||
"is_delete": false,
|
||||
"allow_share": true,
|
||||
"is_prohibited": false,
|
||||
"in_reviewing": false,
|
||||
"part_see": 0,
|
||||
"private_status": 0,
|
||||
"review_result": {
|
||||
"review_status": 0
|
||||
}
|
||||
},
|
||||
"text_extra": [
|
||||
{
|
||||
"start": 9,
|
||||
"end": 15,
|
||||
"type": 1,
|
||||
"hashtag_name": "越南卡点舞",
|
||||
"hashtag_id": "1695366198798343",
|
||||
"is_commerce": false,
|
||||
"caption_start": 9,
|
||||
"caption_end": 15
|
||||
},
|
||||
{
|
||||
"start": 15,
|
||||
"end": 19,
|
||||
"type": 1,
|
||||
"hashtag_name": "看好了",
|
||||
"hashtag_id": "1576631662196749",
|
||||
"is_commerce": false,
|
||||
"caption_start": 15,
|
||||
"caption_end": 19
|
||||
}
|
||||
],
|
||||
"is_top": 0,
|
||||
"share_info": {
|
||||
"share_url": "https://www.iesdouyin.com/share/video/7330570097842457871/?region=CN&mid=7316830999415982886&u_code=13kgm680k&did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=QRtsbif6VtGC1e4wmw7wqq.x4F9hAvU5hiSa838fUR4-&share_version=170400&ts=1710488945&from_aid=6383&from_ssr=1",
|
||||
"share_link_desc": "5.66 Z@m.qe 02/05 Tyt:/ 好险~差点就打进了# 越南卡点舞# 看好了 %s 复制此链接,打开Dou音搜索,直接观看视频!"
|
||||
},
|
||||
"duration": 10300,
|
||||
"image_infos": null,
|
||||
"risk_infos": {
|
||||
"vote": false,
|
||||
"warn": false,
|
||||
"risk_sink": false,
|
||||
"type": 0,
|
||||
"content": ""
|
||||
},
|
||||
"position": null,
|
||||
"author_user_id": 2739632844317827,
|
||||
"prevent_download": false,
|
||||
"long_video": null,
|
||||
"aweme_control": {
|
||||
"can_forward": true,
|
||||
"can_share": true,
|
||||
"can_comment": true,
|
||||
"can_show_comment": true
|
||||
},
|
||||
"images": null,
|
||||
"suggest_words": {
|
||||
"suggest_words": [
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "无忧传媒",
|
||||
"word_id": "6581780195580089608",
|
||||
"info": "{\"qrec_for_search\":\"{}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "comment_top_rec",
|
||||
"icon_url": "",
|
||||
"hint_text": "大家都在搜:",
|
||||
"extra_info": "{}"
|
||||
},
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "无忧传媒",
|
||||
"word_id": "6581780195580089608",
|
||||
"info": "{\"qrec_for_search\":\"{}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "detail_inbox_rex",
|
||||
"icon_url": "",
|
||||
"hint_text": "",
|
||||
"extra_info": "{}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"aweme_id": "7326149953959628067",
|
||||
"desc": "我知天高任鸟飞 台球必须轻轻推#轻推#杆法",
|
||||
|
||||
@ -30,11 +30,12 @@
|
||||
"@types/lodash-es": "^4.17.9",
|
||||
"@vitejs/plugin-vue": "4.0.0",
|
||||
"@vitejs/plugin-vue-jsx": "3.0.0",
|
||||
"axios-mock-adapter": "^1.22.0",
|
||||
"less": "4.1.3",
|
||||
"rollup-plugin-visualizer": "^5.9.2",
|
||||
"unplugin-vue-define-options": "^1.4.1",
|
||||
"unplugin-vue-macros": "^2.7.10",
|
||||
"vite-plugin-cdn-import": "0.3.5",
|
||||
"vite": "4.5.2"
|
||||
"vite": "4.5.2",
|
||||
"vite-plugin-cdn-import": "0.3.5"
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,6 +67,9 @@ devDependencies:
|
||||
'@vitejs/plugin-vue-jsx':
|
||||
specifier: 3.0.0
|
||||
version: 3.0.0(vite@4.5.2)(vue@3.4.21)
|
||||
axios-mock-adapter:
|
||||
specifier: ^1.22.0
|
||||
version: 1.22.0(axios@1.6.0)
|
||||
less:
|
||||
specifier: 4.1.3
|
||||
version: 4.1.3
|
||||
@ -1280,7 +1283,16 @@ packages:
|
||||
|
||||
/asynckit@0.4.0:
|
||||
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
|
||||
dev: false
|
||||
|
||||
/axios-mock-adapter@1.22.0(axios@1.6.0):
|
||||
resolution: {integrity: sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==}
|
||||
peerDependencies:
|
||||
axios: '>= 0.17.0'
|
||||
dependencies:
|
||||
axios: 1.6.0
|
||||
fast-deep-equal: 3.1.3
|
||||
is-buffer: 2.0.5
|
||||
dev: true
|
||||
|
||||
/axios@1.6.0:
|
||||
resolution: {integrity: sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==}
|
||||
@ -1290,7 +1302,6 @@ packages:
|
||||
proxy-from-env: 1.1.0
|
||||
transitivePeerDependencies:
|
||||
- debug
|
||||
dev: false
|
||||
|
||||
/balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
@ -1412,7 +1423,6 @@ packages:
|
||||
engines: {node: '>= 0.8'}
|
||||
dependencies:
|
||||
delayed-stream: 1.0.0
|
||||
dev: false
|
||||
|
||||
/commander@1.1.1:
|
||||
resolution: {integrity: sha512-71Rod2AhcH3JhkBikVpNd0pA+fWsmAaVoti6OR38T76chA7vE3pSerS0Jor4wDw+tOueD2zLVvFOw5H0Rcj7rA==}
|
||||
@ -1497,7 +1507,6 @@ packages:
|
||||
/delayed-stream@1.0.0:
|
||||
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: false
|
||||
|
||||
/delegates@1.0.0:
|
||||
resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==}
|
||||
@ -1584,6 +1593,10 @@ packages:
|
||||
resolution: {integrity: sha512-ipiDYhdQSCZ4hSbX4rMW+XzNKMD1prg/sTvoVmSLkuQ1MVlwjJQQA+sW8tMYR3BLUr9KjodFV4pvzunvRhd33Q==}
|
||||
dev: false
|
||||
|
||||
/fast-deep-equal@3.1.3:
|
||||
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
||||
dev: true
|
||||
|
||||
/fill-range@7.0.1:
|
||||
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
|
||||
engines: {node: '>=8'}
|
||||
@ -1605,7 +1618,6 @@ packages:
|
||||
peerDependenciesMeta:
|
||||
debug:
|
||||
optional: true
|
||||
dev: false
|
||||
|
||||
/form-data@4.0.0:
|
||||
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
|
||||
@ -1614,7 +1626,6 @@ packages:
|
||||
asynckit: 0.4.0
|
||||
combined-stream: 1.0.8
|
||||
mime-types: 2.1.35
|
||||
dev: false
|
||||
|
||||
/fs-minipass@2.1.0:
|
||||
resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==}
|
||||
@ -1778,6 +1789,11 @@ packages:
|
||||
binary-extensions: 2.2.0
|
||||
dev: true
|
||||
|
||||
/is-buffer@2.0.5:
|
||||
resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==}
|
||||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
/is-docker@2.2.1:
|
||||
resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==}
|
||||
engines: {node: '>=8'}
|
||||
@ -1942,14 +1958,12 @@ packages:
|
||||
/mime-db@1.52.0:
|
||||
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: false
|
||||
|
||||
/mime-types@2.1.35:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
dev: false
|
||||
|
||||
/mime@1.6.0:
|
||||
resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==}
|
||||
@ -2245,7 +2259,6 @@ packages:
|
||||
|
||||
/proxy-from-env@1.1.0:
|
||||
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
|
||||
dev: false
|
||||
|
||||
/prr@1.0.1:
|
||||
resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==}
|
||||
|
||||
@ -1562,7 +1562,7 @@
|
||||
"content": ""
|
||||
},
|
||||
"position": null,
|
||||
"author_user_id": 4283310552125104,
|
||||
"author_user_id": 2739632844317827,
|
||||
"prevent_download": false,
|
||||
"long_video": null,
|
||||
"aweme_control": {
|
||||
|
||||
@ -16,6 +16,9 @@ try {navigator.control.longpressMenu(false);} catch (e) {} //关闭长按弹出
|
||||
import {mapState} from "vuex";
|
||||
import routes from "./router/routes";
|
||||
import Call from "./components/Call";
|
||||
import {useBaseStore} from "@/store/pinia";
|
||||
import {mapActions} from 'pinia'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
@ -49,12 +52,14 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useBaseStore, ['init']),
|
||||
setVh() {
|
||||
let vh = window.innerHeight * 0.01
|
||||
document.documentElement.style.setProperty('--vh', `${vh}px`)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
this.setVh()
|
||||
// 监听resize事件 视图大小发生变化就重新计算1vh的值
|
||||
window.addEventListener('resize', () => {
|
||||
|
||||
@ -3,5 +3,5 @@ import user from './user'
|
||||
|
||||
export default {
|
||||
videos,
|
||||
user,
|
||||
// user,
|
||||
}
|
||||
|
||||
@ -7,4 +7,16 @@ export default {
|
||||
author(params, data) {
|
||||
return request({url: '/user/author', method: 'get', params, data})
|
||||
},
|
||||
}
|
||||
|
||||
export function userinfo(params, data) {
|
||||
return request({url: '/user/userinfo', method: 'get', params, data})
|
||||
}
|
||||
|
||||
export function friends(params, data) {
|
||||
return request({url: '/user/friends', method: 'get', params, data})
|
||||
}
|
||||
|
||||
export function userCollect(params, data) {
|
||||
return request({url: '/user/collect', method: 'get', params, data})
|
||||
}
|
||||
@ -1,22 +1,6 @@
|
||||
import request from "../utils/request";
|
||||
|
||||
export default {
|
||||
me(params, data) {
|
||||
return request({url: '/me', method: 'get', params, data})
|
||||
},
|
||||
my(params, data) {
|
||||
// console.log('api - params',params)
|
||||
return request({url: '/me/my', method: 'get', params, data})
|
||||
},
|
||||
private(params, data) {
|
||||
return request({url: '/me/private1', method: 'get', params, data})
|
||||
},
|
||||
like(params, data) {
|
||||
return request({url: '/me/like', method: 'get', params, data})
|
||||
},
|
||||
collect(params, data) {
|
||||
return request({url: '/me/collect', method: 'get', params, data})
|
||||
},
|
||||
recommended(params, data) {
|
||||
return request({url: '/video/recommended', method: 'get', params, data})
|
||||
},
|
||||
@ -26,4 +10,16 @@ export default {
|
||||
historyOther(params, data) {
|
||||
return request({url: '/video/historyOther', method: 'get', params, data})
|
||||
},
|
||||
}
|
||||
|
||||
export function myVideo(params, data) {
|
||||
return request({url: '/video/my', method: 'get', params, data})
|
||||
}
|
||||
|
||||
export function privateVideo(params, data) {
|
||||
return request({url: '/video/private', method: 'get', params, data})
|
||||
}
|
||||
|
||||
export function likeVideo(params, data) {
|
||||
return request({url: '/video/like', method: 'get', params, data})
|
||||
}
|
||||
@ -1,4 +1,300 @@
|
||||
[
|
||||
{
|
||||
"aweme_id": "7260749400622894336",
|
||||
"desc": "你说爱像云 要自在漂浮才美丽",
|
||||
"create_time": 1690524964,
|
||||
"music": {
|
||||
"id": 7123453673090321000,
|
||||
"title": "禁盗用",
|
||||
"author": "LoveW_",
|
||||
"cover_medium": {
|
||||
"uri": "720x720/aweme-avatar/tos-cn-avt-0015_5374859713808b0007ba979b1f18171c",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/aweme/720x720/aweme-avatar/tos-cn-avt-0015_5374859713808b0007ba979b1f18171c.jpeg?from=116350172"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"cover_thumb": {
|
||||
"uri": "100x100/aweme-avatar/tos-cn-avt-0015_5374859713808b0007ba979b1f18171c",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_5374859713808b0007ba979b1f18171c.jpeg?from=116350172"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"play_url": {
|
||||
"uri": "https://sf5-hl-cdn-tos.douyinstatic.com/obj/ies-music/7123453672335690532.mp3",
|
||||
"url_list": [
|
||||
"https://sf5-hl-cdn-tos.douyinstatic.com/obj/ies-music/7123453672335690532.mp3",
|
||||
"https://sf3-cdn-tos.douyinstatic.com/obj/ies-music/7123453672335690532.mp3"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720,
|
||||
"url_key": "7123453673090321159"
|
||||
},
|
||||
"duration": 17,
|
||||
"user_count": 0,
|
||||
"owner_id": "1711265034548715",
|
||||
"owner_nickname": "LoveW_",
|
||||
"is_original": false
|
||||
},
|
||||
"video": {
|
||||
"play_addr": {
|
||||
"uri": "v0d00fg10000cj1lq4jc77u0ng6s1gt0",
|
||||
"url_list": [
|
||||
"https://www.douyin.com/aweme/v1/play/?video_id=v0d00fg10000cj1lq4jc77u0ng6s1gt0&line=0&file_id=bed51c00899b458cbc5d8280147c22a1&sign=7749aec7bd62a3760065f60e40fc1867&is_play_url=1&source=PackSourceEnum_PUBLISH"
|
||||
],
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"url_key": "v0d00fg10000cj1lq4jc77u0ng6s1gt0_h264_1080p_2053262",
|
||||
"data_size": 3480280,
|
||||
"file_hash": "7749aec7bd62a3760065f60e40fc1867",
|
||||
"file_cs": "c:0-16104-634c|d:0-1740139-1d83,1740140-3480279-e5a6|a:v0d00fg10000cj1lq4jc77u0ng6s1gt0"
|
||||
},
|
||||
"cover": {
|
||||
"uri": "tos-cn-i-0813/oYVDeaFZyENAAAAKXCYfxD6hI4zADNAURgtySl",
|
||||
"url_list": [
|
||||
"jwWCPZVTIA4IKM-8WipLF.png"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"height": 3840,
|
||||
"width": 2160,
|
||||
"ratio": "1080p",
|
||||
"use_static_cover": true,
|
||||
"duration": 13560
|
||||
},
|
||||
"share_url": "https://www.iesdouyin.com/share/video/7260749400622894336/?region=CN&mid=7123453673090321159&u_code=13kgm680k&did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=LF.QuEh0GZk3quR7m.I3KpyKn2XyfNLNYHzuQDgWLpc-&share_version=170400&ts=1710491656&from_aid=6383&from_ssr=1",
|
||||
"statistics": {
|
||||
"admire_count": 0,
|
||||
"comment_count": 21582,
|
||||
"digg_count": 1246636,
|
||||
"collect_count": 64460,
|
||||
"play_count": 0,
|
||||
"share_count": 172803
|
||||
},
|
||||
"status": {
|
||||
"listen_video_status": 0,
|
||||
"is_delete": false,
|
||||
"allow_share": true,
|
||||
"is_prohibited": false,
|
||||
"in_reviewing": false,
|
||||
"part_see": 0,
|
||||
"private_status": 0,
|
||||
"review_result": {
|
||||
"review_status": 0
|
||||
}
|
||||
},
|
||||
"text_extra": [],
|
||||
"is_top": 1,
|
||||
"share_info": {
|
||||
"share_url": "https://www.iesdouyin.com/share/video/7260749400622894336/?region=CN&mid=7123453673090321159&u_code=13kgm680k&did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=LF.QuEh0GZk3quR7m.I3KpyKn2XyfNLNYHzuQDgWLpc-&share_version=170400&ts=1710491656&from_aid=6383&from_ssr=1",
|
||||
"share_link_desc": "7.46 04/12 Duf:/ D@h.ba 你说爱像云 要自在漂浮才美丽 %s 复制此链接,打开Dou音搜索,直接观看视频!"
|
||||
},
|
||||
"duration": 13560,
|
||||
"image_infos": null,
|
||||
"risk_infos": {
|
||||
"vote": false,
|
||||
"warn": false,
|
||||
"risk_sink": false,
|
||||
"type": 0,
|
||||
"content": ""
|
||||
},
|
||||
"position": null,
|
||||
"author_user_id": 59054327754,
|
||||
"prevent_download": false,
|
||||
"long_video": null,
|
||||
"aweme_control": {
|
||||
"can_forward": true,
|
||||
"can_share": true,
|
||||
"can_comment": true,
|
||||
"can_show_comment": true
|
||||
},
|
||||
"images": null,
|
||||
"suggest_words": {
|
||||
"suggest_words": [
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "一只顾",
|
||||
"word_id": "6658760941217256711",
|
||||
"info": "{\"qrec_for_search\":\"{\\\"video_ecom\\\":\\\"1\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "comment_top_rec",
|
||||
"icon_url": "",
|
||||
"hint_text": "大家都在搜:",
|
||||
"extra_info": "{}"
|
||||
},
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "香秀早期照片护士",
|
||||
"word_id": "6999224590481708302",
|
||||
"info": "{\"qrec_for_search\":\"{\\\"video_ecom\\\":\\\"1\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "feed_bottom_rec",
|
||||
"icon_url": "",
|
||||
"hint_text": "相关搜索",
|
||||
"extra_info": "{}"
|
||||
},
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "一只顾",
|
||||
"word_id": "6658760941217256711",
|
||||
"info": "{\"qrec_for_search\":\"{\\\"video_ecom\\\":\\\"1\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "detail_inbox_rex",
|
||||
"icon_url": "",
|
||||
"hint_text": "",
|
||||
"extra_info": "{}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"avatar_168x168": {
|
||||
"height": 720,
|
||||
"uri": "aweme-avatar/mosaic-legacy_20b7700050147c01968f3",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/img/aweme-avatar/mosaic-legacy_20b7700050147c01968f3~c5_168x168.jpeg?from=2956013662"
|
||||
],
|
||||
"width": 720
|
||||
},
|
||||
"avatar_300x300": {
|
||||
"height": 720,
|
||||
"uri": "aweme-avatar/mosaic-legacy_20b7700050147c01968f3",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/img/aweme-avatar/mosaic-legacy_20b7700050147c01968f3~c5_300x300.jpeg?from=2956013662"
|
||||
],
|
||||
"width": 720
|
||||
},
|
||||
"aweme_count": 296,
|
||||
"birthday_hide_level": 1,
|
||||
"can_show_group_card": 1,
|
||||
"card_entries": [
|
||||
{
|
||||
"card_data": "{\"is_order_card\":false,\"has_new\":false,\"is_store\":false,\"shop_id\":\"\",\"product_count\":6,\"store_type\":\"window\",\"icon_is_repeat\":false,\"icon_type\":\"png\",\"is_promotion_icon\":false,\"subtitle_resource_list\":\"\"}",
|
||||
"event_params": "{\"entrance_location\":\"others_homepage\"}",
|
||||
"goto_url": "sslocal://goods/shop?uid=59054327754&sec_uid=MS4wLjABAAAAe_AKPvxBX0C_4vyLj5Wye-_BU8M0S6tZFZUu61FuycU",
|
||||
"icon_dark": {
|
||||
"url_list": [
|
||||
"https://lf3-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-3x.png",
|
||||
"https://lf9-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-3x.png",
|
||||
"https://lf26-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-3x.png",
|
||||
"https://lf3-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-2x.png",
|
||||
"https://lf9-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-2x.png",
|
||||
"https://lf26-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-2x.png"
|
||||
]
|
||||
},
|
||||
"icon_light": {
|
||||
"url_list": [
|
||||
"https://lf3-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-3x.png",
|
||||
"https://lf9-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-3x.png",
|
||||
"https://lf26-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-3x.png",
|
||||
"https://lf3-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-2x.png",
|
||||
"https://lf9-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-2x.png",
|
||||
"https://lf26-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-2x.png"
|
||||
]
|
||||
},
|
||||
"sub_title": "6件好物",
|
||||
"title": "进入橱窗",
|
||||
"type": 1
|
||||
}
|
||||
],
|
||||
"city": "",
|
||||
"commerce_info": {
|
||||
"challenge_list": null,
|
||||
"head_image_list": null,
|
||||
"offline_info_list": [],
|
||||
"smart_phone_list": null,
|
||||
"task_list": null
|
||||
},
|
||||
"commerce_user_info": {
|
||||
"ad_revenue_rits": null,
|
||||
"has_ads_entry": true,
|
||||
"show_star_atlas_cooperation": true,
|
||||
"star_atlas": 1
|
||||
},
|
||||
"commerce_user_level": 0,
|
||||
"country": "",
|
||||
"cover_colour": "#03997706",
|
||||
"cover_url": [
|
||||
{
|
||||
"uri": "douyin-user-image-file/f2196ddaa37f3097932d8a29ff0d0ca5",
|
||||
"url_list": [
|
||||
"AiIEMkIA7Cb3s5c4e7e6g.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uri": "c8510002be9a3a61aad2",
|
||||
"url_list": [
|
||||
"aHzLr77vcdBMUil15rXBa.png"
|
||||
]
|
||||
}
|
||||
],
|
||||
"district": "",
|
||||
"favoriting_count": 0,
|
||||
"follow_status": 0,
|
||||
"follower_count": 7078268,
|
||||
"follower_request_status": 0,
|
||||
"follower_status": 0,
|
||||
"following_count": 88,
|
||||
"forward_count": 79,
|
||||
"gender": 2,
|
||||
"ip_location": "IP属地:天津",
|
||||
"max_follower_count": 7078290,
|
||||
"mplatform_followers_count": 7078268,
|
||||
"nickname": "我是香秀🐂🍺",
|
||||
"province": "",
|
||||
"public_collects_count": 0,
|
||||
"share_info": {
|
||||
"bool_persist": 1,
|
||||
"share_desc": "长按复制此条消息,打开抖音搜索,查看TA的更多作品。",
|
||||
"share_image_url": {
|
||||
"uri": "tos-cn-p-0015/oge0HBDnlBbbZHjeDc4WtAI7AA0xb88gd9Ipjc",
|
||||
"url_list": [
|
||||
"5jTb5yW0_50o6UaLR5hvo.png"
|
||||
]
|
||||
},
|
||||
"share_qrcode_url": {
|
||||
"uri": "216a001823018b74cedd",
|
||||
"url_list": [
|
||||
"https://p3.douyinpic.com/obj/216a001823018b74cedd",
|
||||
"https://p6.douyinpic.com/obj/216a001823018b74cedd",
|
||||
"https://p11.douyinpic.com/obj/216a001823018b74cedd"
|
||||
]
|
||||
},
|
||||
"share_title": "快来加入抖音,让你发现最有趣的我!",
|
||||
"share_url": "www.iesdouyin.com/share/user/MS4wLjABAAAAe_AKPvxBX0C_4vyLj5Wye-_BU8M0S6tZFZUu61FuycU?did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&sec_uid=MS4wLjABAAAAe_AKPvxBX0C_4vyLj5Wye-_BU8M0S6tZFZUu61FuycU&from_ssr=1&from_aid=6383&u_code=13kgm680k",
|
||||
"share_weibo_desc": "长按复制此条消息,打开抖音搜索,查看TA的更多作品。"
|
||||
},
|
||||
"short_id": "8357999",
|
||||
"signature": "合作:X229896(备注品牌 )",
|
||||
"total_favorited": 202309485,
|
||||
"uid": "59054327754",
|
||||
"unique_id": "",
|
||||
"user_age": -1,
|
||||
"white_cover_url": [
|
||||
{
|
||||
"uri": "douyin-user-image-file/f2196ddaa37f3097932d8a29ff0d0ca5",
|
||||
"url_list": [
|
||||
"N_SVO2HXIpaY04hgsXYDI.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uri": "318f1000413827e122102",
|
||||
"url_list": [
|
||||
"Sfz4PgDDqyNYHkFyXub5g.png"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"aweme_id": "7128686458763889956",
|
||||
"desc": "你们爱看的又来了!《黑白战袍 双倍快乐》#战袍 #丢钱摇摆舞",
|
||||
@ -348,302 +644,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"aweme_id": "7260749400622894336",
|
||||
"desc": "你说爱像云 要自在漂浮才美丽",
|
||||
"create_time": 1690524964,
|
||||
"music": {
|
||||
"id": 7123453673090321000,
|
||||
"title": "禁盗用",
|
||||
"author": "LoveW_",
|
||||
"cover_medium": {
|
||||
"uri": "720x720/aweme-avatar/tos-cn-avt-0015_5374859713808b0007ba979b1f18171c",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/aweme/720x720/aweme-avatar/tos-cn-avt-0015_5374859713808b0007ba979b1f18171c.jpeg?from=116350172"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"cover_thumb": {
|
||||
"uri": "100x100/aweme-avatar/tos-cn-avt-0015_5374859713808b0007ba979b1f18171c",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_5374859713808b0007ba979b1f18171c.jpeg?from=116350172"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"play_url": {
|
||||
"uri": "https://sf5-hl-cdn-tos.douyinstatic.com/obj/ies-music/7123453672335690532.mp3",
|
||||
"url_list": [
|
||||
"https://sf5-hl-cdn-tos.douyinstatic.com/obj/ies-music/7123453672335690532.mp3",
|
||||
"https://sf3-cdn-tos.douyinstatic.com/obj/ies-music/7123453672335690532.mp3"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720,
|
||||
"url_key": "7123453673090321159"
|
||||
},
|
||||
"duration": 17,
|
||||
"user_count": 0,
|
||||
"owner_id": "1711265034548715",
|
||||
"owner_nickname": "LoveW_",
|
||||
"is_original": false
|
||||
},
|
||||
"video": {
|
||||
"play_addr": {
|
||||
"uri": "v0d00fg10000cj1lq4jc77u0ng6s1gt0",
|
||||
"url_list": [
|
||||
"https://www.douyin.com/aweme/v1/play/?video_id=v0d00fg10000cj1lq4jc77u0ng6s1gt0&line=0&file_id=bed51c00899b458cbc5d8280147c22a1&sign=7749aec7bd62a3760065f60e40fc1867&is_play_url=1&source=PackSourceEnum_PUBLISH"
|
||||
],
|
||||
"width": 1080,
|
||||
"height": 1920,
|
||||
"url_key": "v0d00fg10000cj1lq4jc77u0ng6s1gt0_h264_1080p_2053262",
|
||||
"data_size": 3480280,
|
||||
"file_hash": "7749aec7bd62a3760065f60e40fc1867",
|
||||
"file_cs": "c:0-16104-634c|d:0-1740139-1d83,1740140-3480279-e5a6|a:v0d00fg10000cj1lq4jc77u0ng6s1gt0"
|
||||
},
|
||||
"cover": {
|
||||
"uri": "tos-cn-i-0813/oYVDeaFZyENAAAAKXCYfxD6hI4zADNAURgtySl",
|
||||
"url_list": [
|
||||
"jwWCPZVTIA4IKM-8WipLF.png"
|
||||
],
|
||||
"width": 720,
|
||||
"height": 720
|
||||
},
|
||||
"height": 3840,
|
||||
"width": 2160,
|
||||
"ratio": "1080p",
|
||||
"use_static_cover": true,
|
||||
"duration": 13560
|
||||
},
|
||||
"share_url": "https://www.iesdouyin.com/share/video/7260749400622894336/?region=CN&mid=7123453673090321159&u_code=13kgm680k&did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=LF.QuEh0GZk3quR7m.I3KpyKn2XyfNLNYHzuQDgWLpc-&share_version=170400&ts=1710491656&from_aid=6383&from_ssr=1",
|
||||
"statistics": {
|
||||
"admire_count": 0,
|
||||
"comment_count": 21582,
|
||||
"digg_count": 1246636,
|
||||
"collect_count": 64460,
|
||||
"play_count": 0,
|
||||
"share_count": 172803
|
||||
},
|
||||
"status": {
|
||||
"listen_video_status": 0,
|
||||
"is_delete": false,
|
||||
"allow_share": true,
|
||||
"is_prohibited": false,
|
||||
"in_reviewing": false,
|
||||
"part_see": 0,
|
||||
"private_status": 0,
|
||||
"review_result": {
|
||||
"review_status": 0
|
||||
}
|
||||
},
|
||||
"text_extra": [],
|
||||
"is_top": 1,
|
||||
"share_info": {
|
||||
"share_url": "https://www.iesdouyin.com/share/video/7260749400622894336/?region=CN&mid=7123453673090321159&u_code=13kgm680k&did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title&share_sign=LF.QuEh0GZk3quR7m.I3KpyKn2XyfNLNYHzuQDgWLpc-&share_version=170400&ts=1710491656&from_aid=6383&from_ssr=1",
|
||||
"share_link_desc": "7.46 04/12 Duf:/ D@h.ba 你说爱像云 要自在漂浮才美丽 %s 复制此链接,打开Dou音搜索,直接观看视频!"
|
||||
},
|
||||
"duration": 13560,
|
||||
"image_infos": null,
|
||||
"risk_infos": {
|
||||
"vote": false,
|
||||
"warn": false,
|
||||
"risk_sink": false,
|
||||
"type": 0,
|
||||
"content": ""
|
||||
},
|
||||
"position": null,
|
||||
"author_user_id": 59054327754,
|
||||
"prevent_download": false,
|
||||
"long_video": null,
|
||||
"aweme_control": {
|
||||
"can_forward": true,
|
||||
"can_share": true,
|
||||
"can_comment": true,
|
||||
"can_show_comment": true
|
||||
},
|
||||
"images": null,
|
||||
"suggest_words": {
|
||||
"suggest_words": [
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "一只顾",
|
||||
"word_id": "6658760941217256711",
|
||||
"info": "{\"qrec_for_search\":\"{\\\"video_ecom\\\":\\\"1\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "comment_top_rec",
|
||||
"icon_url": "",
|
||||
"hint_text": "大家都在搜:",
|
||||
"extra_info": "{}"
|
||||
},
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "香秀早期照片护士",
|
||||
"word_id": "6999224590481708302",
|
||||
"info": "{\"qrec_for_search\":\"{\\\"video_ecom\\\":\\\"1\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "feed_bottom_rec",
|
||||
"icon_url": "",
|
||||
"hint_text": "相关搜索",
|
||||
"extra_info": "{}"
|
||||
},
|
||||
{
|
||||
"words": [
|
||||
{
|
||||
"word": "一只顾",
|
||||
"word_id": "6658760941217256711",
|
||||
"info": "{\"qrec_for_search\":\"{\\\"video_ecom\\\":\\\"1\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"scene": "detail_inbox_rex",
|
||||
"icon_url": "",
|
||||
"hint_text": "",
|
||||
"extra_info": "{}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"avatar_168x168": {
|
||||
"height": 720,
|
||||
"uri": "aweme-avatar/mosaic-legacy_20b7700050147c01968f3",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/img/aweme-avatar/mosaic-legacy_20b7700050147c01968f3~c5_168x168.jpeg?from=2956013662"
|
||||
],
|
||||
"width": 720
|
||||
},
|
||||
"avatar_300x300": {
|
||||
"height": 720,
|
||||
"uri": "aweme-avatar/mosaic-legacy_20b7700050147c01968f3",
|
||||
"url_list": [
|
||||
"https://p3-pc.douyinpic.com/img/aweme-avatar/mosaic-legacy_20b7700050147c01968f3~c5_300x300.jpeg?from=2956013662"
|
||||
],
|
||||
"width": 720
|
||||
},
|
||||
"aweme_count": 296,
|
||||
"birthday_hide_level": 1,
|
||||
"can_show_group_card": 1,
|
||||
"card_entries": [
|
||||
{
|
||||
"card_data": "{\"is_order_card\":false,\"has_new\":false,\"is_store\":false,\"shop_id\":\"\",\"product_count\":6,\"store_type\":\"window\",\"icon_is_repeat\":false,\"icon_type\":\"png\",\"is_promotion_icon\":false,\"subtitle_resource_list\":\"\"}",
|
||||
"event_params": "{\"entrance_location\":\"others_homepage\"}",
|
||||
"goto_url": "sslocal://goods/shop?uid=59054327754&sec_uid=MS4wLjABAAAAe_AKPvxBX0C_4vyLj5Wye-_BU8M0S6tZFZUu61FuycU",
|
||||
"icon_dark": {
|
||||
"url_list": [
|
||||
"https://lf3-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-3x.png",
|
||||
"https://lf9-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-3x.png",
|
||||
"https://lf26-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-3x.png",
|
||||
"https://lf3-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-2x.png",
|
||||
"https://lf9-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-2x.png",
|
||||
"https://lf26-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_dark-2x.png"
|
||||
]
|
||||
},
|
||||
"icon_light": {
|
||||
"url_list": [
|
||||
"https://lf3-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-3x.png",
|
||||
"https://lf9-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-3x.png",
|
||||
"https://lf26-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-3x.png",
|
||||
"https://lf3-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-2x.png",
|
||||
"https://lf9-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-2x.png",
|
||||
"https://lf26-static.bytednsdoc.com/obj/eden-cn/azlylaup_j_tvjl/ljhwZthlaukjlkulzlp/ecom_window/ecom_window_other_light-2x.png"
|
||||
]
|
||||
},
|
||||
"sub_title": "6件好物",
|
||||
"title": "进入橱窗",
|
||||
"type": 1
|
||||
}
|
||||
],
|
||||
"city": "",
|
||||
"commerce_info": {
|
||||
"challenge_list": null,
|
||||
"head_image_list": null,
|
||||
"offline_info_list": [],
|
||||
"smart_phone_list": null,
|
||||
"task_list": null
|
||||
},
|
||||
"commerce_user_info": {
|
||||
"ad_revenue_rits": null,
|
||||
"has_ads_entry": true,
|
||||
"show_star_atlas_cooperation": true,
|
||||
"star_atlas": 1
|
||||
},
|
||||
"commerce_user_level": 0,
|
||||
"country": "",
|
||||
"cover_colour": "#03997706",
|
||||
"cover_url": [
|
||||
{
|
||||
"uri": "douyin-user-image-file/f2196ddaa37f3097932d8a29ff0d0ca5",
|
||||
"url_list": [
|
||||
"AiIEMkIA7Cb3s5c4e7e6g.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uri": "c8510002be9a3a61aad2",
|
||||
"url_list": [
|
||||
"aHzLr77vcdBMUil15rXBa.png"
|
||||
]
|
||||
}
|
||||
],
|
||||
"district": "",
|
||||
"favoriting_count": 0,
|
||||
"follow_status": 0,
|
||||
"follower_count": 7078268,
|
||||
"follower_request_status": 0,
|
||||
"follower_status": 0,
|
||||
"following_count": 88,
|
||||
"forward_count": 79,
|
||||
"gender": 2,
|
||||
"ip_location": "IP属地:天津",
|
||||
"max_follower_count": 7078290,
|
||||
"mplatform_followers_count": 7078268,
|
||||
"nickname": "我是香秀🐂🍺",
|
||||
"province": "",
|
||||
"public_collects_count": 0,
|
||||
"share_info": {
|
||||
"bool_persist": 1,
|
||||
"share_desc": "长按复制此条消息,打开抖音搜索,查看TA的更多作品。",
|
||||
"share_image_url": {
|
||||
"uri": "tos-cn-p-0015/oge0HBDnlBbbZHjeDc4WtAI7AA0xb88gd9Ipjc",
|
||||
"url_list": [
|
||||
"5jTb5yW0_50o6UaLR5hvo.png"
|
||||
]
|
||||
},
|
||||
"share_qrcode_url": {
|
||||
"uri": "216a001823018b74cedd",
|
||||
"url_list": [
|
||||
"https://p3.douyinpic.com/obj/216a001823018b74cedd",
|
||||
"https://p6.douyinpic.com/obj/216a001823018b74cedd",
|
||||
"https://p11.douyinpic.com/obj/216a001823018b74cedd"
|
||||
]
|
||||
},
|
||||
"share_title": "快来加入抖音,让你发现最有趣的我!",
|
||||
"share_url": "www.iesdouyin.com/share/user/MS4wLjABAAAAe_AKPvxBX0C_4vyLj5Wye-_BU8M0S6tZFZUu61FuycU?did=MS4wLjABAAAAiOgYyZm8XbWZMr5o3OvhR-TEOuNygb_hQOwkie-VXJpDYaR4vZfpiIGBfAWKCFHB&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&sec_uid=MS4wLjABAAAAe_AKPvxBX0C_4vyLj5Wye-_BU8M0S6tZFZUu61FuycU&from_ssr=1&from_aid=6383&u_code=13kgm680k",
|
||||
"share_weibo_desc": "长按复制此条消息,打开抖音搜索,查看TA的更多作品。"
|
||||
},
|
||||
"short_id": "8357999",
|
||||
"signature": "合作:X229896(备注品牌 )",
|
||||
"total_favorited": 202309485,
|
||||
"uid": "59054327754",
|
||||
"unique_id": "",
|
||||
"user_age": -1,
|
||||
"white_cover_url": [
|
||||
{
|
||||
"uri": "douyin-user-image-file/f2196ddaa37f3097932d8a29ff0d0ca5",
|
||||
"url_list": [
|
||||
"N_SVO2HXIpaY04hgsXYDI.png"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uri": "318f1000413827e122102",
|
||||
"url_list": [
|
||||
"Sfz4PgDDqyNYHkFyXub5g.png"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"aweme_id": "7293100687989148943",
|
||||
"desc": "",
|
||||
|
||||
@ -6,10 +6,6 @@ export default {
|
||||
],
|
||||
my: [
|
||||
],
|
||||
like: [
|
||||
],
|
||||
private1: [
|
||||
],
|
||||
users:{
|
||||
"all": [
|
||||
{
|
||||
|
||||
@ -35,12 +35,6 @@ const props = defineProps({
|
||||
return []
|
||||
}
|
||||
},
|
||||
author: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'normal'//date,music
|
||||
@ -52,7 +46,7 @@ defineOptions({
|
||||
})
|
||||
|
||||
function goDetail(index) {
|
||||
store.routeData = cloneDeep({list: props.list, author: props.author, index})
|
||||
store.routeData = cloneDeep({list: props.list, index})
|
||||
nav.push({path: '/video-detail'})
|
||||
}
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
<div class="number" v-else>
|
||||
<span>抖音号:{{ _getUserDouyinId(props.currentItem) }}</span>
|
||||
<img src="@/assets/img/icon/me/copy.png" alt=""
|
||||
@click.stop="Utils.copy(props.currentItem.author.unique_id || props.currentItem.author.short_id)">
|
||||
@click.stop="Utils.copy(_getUserDouyinId(props.currentItem))">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -168,7 +168,6 @@
|
||||
<div class="videos">
|
||||
<Posters v-if="props.currentItem.aweme_list.length"
|
||||
:list="props.currentItem.aweme_list"
|
||||
:author="props.currentItem.author"
|
||||
></Posters>
|
||||
<Loading :isFullScreen="false" v-else/>
|
||||
</div>
|
||||
@ -213,66 +212,15 @@ const total = ref(null)
|
||||
const state = reactive({
|
||||
isShowRecommend: false,//是否显示推荐
|
||||
previewImg: '',
|
||||
contentIndex: 0,
|
||||
baseActiveIndex: 0,
|
||||
tabContents: [],
|
||||
floatFixed: false,
|
||||
floatShowName: false,
|
||||
isScroll: false,
|
||||
isMoreFunction: false,
|
||||
showFollowSetting: false,
|
||||
refs: {
|
||||
header: null,
|
||||
headerHeight: 0,
|
||||
descHeight: 0,
|
||||
videoSlideHeight: 0,
|
||||
maxSlideHeight: 0
|
||||
},
|
||||
videoItemHeight: 0,
|
||||
startLocationY: 0,
|
||||
fixedLocationY: 0,
|
||||
lastMoveYDistance: 0,
|
||||
canTransformY: 0,
|
||||
startTime: 0,
|
||||
|
||||
floatHeight: 52,
|
||||
videos: {
|
||||
my: {
|
||||
list: [],
|
||||
total: -1,
|
||||
pageNo: 0
|
||||
},
|
||||
private: {
|
||||
list: [],
|
||||
total: -1
|
||||
},
|
||||
like: {
|
||||
list: [],
|
||||
total: -1
|
||||
},
|
||||
collect: {
|
||||
video: {
|
||||
list: [],
|
||||
total: -1,
|
||||
},
|
||||
audio: {
|
||||
list: [],
|
||||
total: -1,
|
||||
}
|
||||
},
|
||||
},
|
||||
pageSize: 15,
|
||||
initSlideHeight: 0,
|
||||
|
||||
loadings: {
|
||||
loading0: false,
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
loading3: false,
|
||||
showRecommend: false
|
||||
},
|
||||
tempScroll: false,
|
||||
acceleration: 1.2,
|
||||
sprint: 15,
|
||||
canScroll: true,
|
||||
start: {x: 0, y: 0, time: 0},
|
||||
move: {x: 0, y: 0},
|
||||
isTop: false,
|
||||
@ -292,6 +240,10 @@ watch(() => props.active,
|
||||
fetch(`${FILE_URL}user-${id}.json`).then(r => {
|
||||
r.json().then(l => {
|
||||
setTimeout(() => {
|
||||
l = l.map(a => {
|
||||
a.author = props.currentItem.author
|
||||
return a
|
||||
})
|
||||
emit('update:currentItem', merge(props.currentItem, {aweme_list: l}))
|
||||
}, 300)
|
||||
})
|
||||
@ -307,10 +259,6 @@ watch(() => props.currentItem.author.uid,
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
state.videos.my.list = resource.my
|
||||
state.videos.my.total = resource.my.length
|
||||
})
|
||||
|
||||
function stop(e) {
|
||||
e.stopPropagation()
|
||||
@ -379,7 +327,6 @@ function touchEnd(e) {
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
|
||||
.fade1-enter-active,
|
||||
.fade1-leave-active {
|
||||
transition: all 0.3s ease;
|
||||
@ -395,7 +342,6 @@ function touchEnd(e) {
|
||||
left: inherit;
|
||||
}
|
||||
|
||||
|
||||
#UserPanel {
|
||||
position: fixed;
|
||||
background: var(--color-user);
|
||||
@ -966,9 +912,6 @@ function touchEnd(e) {
|
||||
}
|
||||
}
|
||||
|
||||
.videos {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.float {
|
||||
|
||||
@ -7,6 +7,7 @@ import SlideItem from '@/components/slide/SlideItem.vue'
|
||||
import bus, {EVENT_KEY} from "../../utils/bus";
|
||||
import {useStore} from 'vuex'
|
||||
import Loading from "@/components/Loading.vue";
|
||||
import {cloneDeep} from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
index: {
|
||||
@ -189,7 +190,7 @@ function dislike(item) {
|
||||
defineExpose({dislike})
|
||||
|
||||
function getInsEl(item, index, play = false) {
|
||||
// console.log('index', index, play)
|
||||
console.log('index', cloneDeep(item), index, play)
|
||||
let slideVNode = props.render(item, index, play, props.uniqueId)
|
||||
const parent = document.createElement('div')
|
||||
//TODO 打包到线上时用这个,这个在开发时任何修改都会刷新页面
|
||||
|
||||
@ -2,14 +2,10 @@ export default {
|
||||
baseUrl: 'https://dy.ttentau.top/imgs/',
|
||||
imgPath: '/imgs/',
|
||||
filePreview: 'http://192.168.0.103/static/uploads/',
|
||||
|
||||
// baseUrl: 'http://192.168.10.164/index.php/v1',
|
||||
// filePreview:'http://192.168.10.164/static/uploads/'
|
||||
// baseUrl: 'http://localhost/index.php/v1',
|
||||
// filePreview:'http://localhost/static/uploads/'
|
||||
}
|
||||
|
||||
// export const BASE_URL = 'https://dy.ttentau.top'
|
||||
export const BASE_URL = ''
|
||||
// export const BASE_URL = 'https://gitee.com/zyronon/douyin/raw/master/public'
|
||||
export const IMG_URL = BASE_URL + '/images/'
|
||||
export const FILE_URL = BASE_URL + '/data/'
|
||||
|
||||
@ -2,7 +2,7 @@ import * as Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import mitt from 'mitt'
|
||||
import './assets/less/index.less'
|
||||
import './mock'
|
||||
import {startMock} from './mock'
|
||||
import api from './api'
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
@ -10,6 +10,7 @@ import mixin from "./utils/mixin";
|
||||
import VueLazyload from '@jambonn/vue-lazyload'
|
||||
import {VueMasonryPlugin} from "vue-masonry";
|
||||
import {createPinia} from "pinia";
|
||||
|
||||
const pinia = createPinia()
|
||||
|
||||
// const vConsole = new VConsole();
|
||||
@ -32,3 +33,7 @@ app.use(router)
|
||||
app.use(store)
|
||||
app.use(pinia)
|
||||
app.mount('#app')
|
||||
|
||||
//放到最后才可以使用pinia
|
||||
startMock()
|
||||
|
||||
|
||||
@ -2,8 +2,13 @@ import Mock from 'mockjs'
|
||||
import globalMethods from '../utils'
|
||||
import resource from "../assets/data/resource.js";
|
||||
import posts6 from "@/assets/data/posts6.json";
|
||||
import {uniqueId} from "lodash-es";
|
||||
import {cloneDeep, uniqueId} from "lodash-es";
|
||||
import {BASE_URL} from "@/config";
|
||||
import {useBaseStore} from "@/store/pinia";
|
||||
import axiosInstance from "@/utils/request";
|
||||
import MockAdapter from "axios-mock-adapter";
|
||||
|
||||
const mock = new MockAdapter(axiosInstance);
|
||||
|
||||
function getParams(options) {
|
||||
let params = globalMethods.$parseURL(options.url).params
|
||||
@ -19,40 +24,31 @@ function getPage(options) {
|
||||
return {limit, offset, pageNo: params.pageNo}
|
||||
}
|
||||
|
||||
Mock.setup({
|
||||
timeout: '500-1000'
|
||||
// timeout: '5000'
|
||||
})
|
||||
// console.log('posts20',posts20)
|
||||
function getPage2(params) {
|
||||
let offset = params.pageNo * params.pageSize
|
||||
let limit = params.pageNo * params.pageSize + params.pageSize
|
||||
return {limit, offset, pageNo: params.pageNo}
|
||||
}
|
||||
|
||||
let allRecommendVideos = posts6.map(v => {
|
||||
v.type = 'recommend-video'
|
||||
return v
|
||||
})
|
||||
|
||||
// console.log('allRecommendVideos', allRecommendVideos)
|
||||
let t = [
|
||||
{
|
||||
type: 'imgs',
|
||||
src: `https://imgapi.cn/bing.php`,
|
||||
author: {
|
||||
unique_id: uniqueId('list_')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'user',
|
||||
src: `https://imgapi.cn/bing.php`,
|
||||
author: {
|
||||
unique_id: uniqueId('list_')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'img',
|
||||
src: `https://imgapi.cn/bing.php`,
|
||||
author: {
|
||||
unique_id: uniqueId('list_')
|
||||
}
|
||||
},
|
||||
]
|
||||
let t = [{
|
||||
type: 'imgs', src: `https://imgapi.cn/bing.php`, author: {
|
||||
unique_id: uniqueId('list_')
|
||||
}
|
||||
}, {
|
||||
type: 'user', src: `https://imgapi.cn/bing.php`, author: {
|
||||
unique_id: uniqueId('list_')
|
||||
}
|
||||
}, {
|
||||
type: 'img', src: `https://imgapi.cn/bing.php`, author: {
|
||||
unique_id: uniqueId('list_')
|
||||
}
|
||||
},]
|
||||
// allRecommendVideos.unshift(...t)
|
||||
// {
|
||||
// type: 'user-imgs',
|
||||
@ -69,104 +65,132 @@ let t = [
|
||||
// }
|
||||
// },
|
||||
|
||||
function initData() {
|
||||
|
||||
async function fetchData() {
|
||||
const baseStore = useBaseStore()
|
||||
fetch(BASE_URL + '/data/posts.json').then(r => {
|
||||
r.json().then(v => {
|
||||
allRecommendVideos = allRecommendVideos.concat(v)
|
||||
allRecommendVideos = allRecommendVideos.map(w => {
|
||||
let userList = cloneDeep(baseStore.users)
|
||||
v = v.map(w => {
|
||||
w.type = 'recommend-video'
|
||||
if (userList.length) {
|
||||
let item = userList.find(a => String(a.uid) === String(w.author_user_id))
|
||||
if (item) w.author = item
|
||||
}
|
||||
return w
|
||||
})
|
||||
resource.like = allRecommendVideos.slice(0, 15)
|
||||
resource.videos = allRecommendVideos.slice(0, 15)
|
||||
})
|
||||
})
|
||||
|
||||
fetch(BASE_URL + '/data/user-71158770.json').then(r => {
|
||||
r.json().then(v => {
|
||||
resource.my = v
|
||||
allRecommendVideos = allRecommendVideos.concat(v)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
setTimeout(initData, 3000)
|
||||
|
||||
Mock.mock(/recommended/, options => {
|
||||
// console.log('recommended', allRecommendVideos.length)
|
||||
let page = getPage(options)
|
||||
return Mock.mock({
|
||||
data: {
|
||||
total: allRecommendVideos.length,
|
||||
list: allRecommendVideos.slice(page.offset, page.limit),
|
||||
// list: allRecommendVideos.slice(0, 6),
|
||||
}, code: 200, msg: '',
|
||||
export async function startMock() {
|
||||
mock.onGet(/recommended/).reply(async (config) => {
|
||||
let page = getPage2(config.params)
|
||||
return [200, {
|
||||
data: {
|
||||
total: allRecommendVideos.length,
|
||||
list: allRecommendVideos.slice(page.offset, page.limit), // list: allRecommendVideos.slice(0, 6),
|
||||
}, code: 200, msg: '',
|
||||
}]
|
||||
})
|
||||
})
|
||||
|
||||
Mock.mock(/my/, options => {
|
||||
let page = getPage(options)
|
||||
// console.log('mock', page)
|
||||
return Mock.mock({
|
||||
data: {
|
||||
pageNo: page.pageNo, total: resource.my.length, list: resource.my.slice(page.offset, page.limit),
|
||||
}, code: 200, msg: '',
|
||||
mock.onGet(/video\/private/).reply(async (config) => {
|
||||
let page = getPage2(config.params)
|
||||
return [200, {
|
||||
data: {
|
||||
total: 10,
|
||||
list: allRecommendVideos.slice(100, 110).slice(page.offset, page.limit)
|
||||
}, code: 200, msg: '',
|
||||
}]
|
||||
})
|
||||
})
|
||||
|
||||
Mock.mock(/like/, options => {
|
||||
let page = getPage(options)
|
||||
return Mock.mock({
|
||||
data: {
|
||||
pageNo: page.pageNo, total: resource.like.length, list: resource.like.slice(page.offset, page.limit),
|
||||
}, code: 200, msg: '',
|
||||
mock.onGet(/video\/like/).reply(async (config) => {
|
||||
let page = getPage2(config.params)
|
||||
return [200, {
|
||||
data: {
|
||||
total: 150,
|
||||
list: allRecommendVideos.slice(200, 350).slice(page.offset, page.limit)
|
||||
}, code: 200, msg: '',
|
||||
}]
|
||||
})
|
||||
})
|
||||
|
||||
Mock.mock(/private1/, options => {
|
||||
let page = getPage(options)
|
||||
return Mock.mock({
|
||||
data: {
|
||||
pageNo: page.pageNo, total: resource.private1.length, list: resource.private1.slice(page.offset, page.limit),
|
||||
}, code: 200, msg: '',
|
||||
mock.onGet(/user\/collect/).reply(async (config) => {
|
||||
return [200, {
|
||||
data: {
|
||||
video: {
|
||||
total: 50, list: allRecommendVideos.slice(350, 400),
|
||||
}, music: {
|
||||
total: resource.music.length, list: resource.music,
|
||||
},
|
||||
}, code: 200, msg: '',
|
||||
}]
|
||||
})
|
||||
})
|
||||
|
||||
Mock.mock(/collect/, options => {
|
||||
return Mock.mock({
|
||||
data: {
|
||||
video: {
|
||||
total: resource.videos.length,
|
||||
list: resource.videos,
|
||||
},
|
||||
music: {
|
||||
total: resource.music.length,
|
||||
list: resource.music,
|
||||
mock.onGet(/video\/my/).reply(async (config) => {
|
||||
let page = getPage2(config.params)
|
||||
// let r = await fetch(BASE_URL + '/data/user-71158770.json')
|
||||
// let r = await fetch(BASE_URL + '/data/user-8357999.json')
|
||||
let r = await fetch(BASE_URL + '/data/user-12345xiaolaohu.json')
|
||||
let list = await r.json()
|
||||
const baseStore = useBaseStore()
|
||||
let userList = cloneDeep(baseStore.users)
|
||||
|
||||
list = list.map(w => {
|
||||
if (userList.length) {
|
||||
let item = userList.find(a => String(a.uid) === String(w.author_user_id))
|
||||
if (item) w.author = item
|
||||
}
|
||||
}, code: 200, msg: '',
|
||||
})
|
||||
})
|
||||
return w
|
||||
})
|
||||
|
||||
Mock.mock(/historyVideo/, options => {
|
||||
let page = getPage(options)
|
||||
return Mock.mock({
|
||||
data: {
|
||||
pageNo: page.pageNo, // total: resource.my.length,
|
||||
total: 50, list: resource.my.slice(page.offset, page.limit),
|
||||
}, code: 200, msg: '',
|
||||
})
|
||||
})
|
||||
return [200, {
|
||||
data: {
|
||||
pageNo: page.pageNo,
|
||||
total: list.length,
|
||||
list: list.slice(page.offset, page.limit),
|
||||
}, code: 200, msg: '',
|
||||
}]
|
||||
});
|
||||
|
||||
Mock.mock(/historyOther/, options => {
|
||||
let page = getPage(options)
|
||||
return Mock.mock({
|
||||
data: {
|
||||
pageNo: page.pageNo, total: 0, list: [],
|
||||
}, code: 200, msg: '',
|
||||
mock.onGet(/user\/userinfo/).reply(async (config) => {
|
||||
let r2 = await fetch(BASE_URL + '/data/users.json')
|
||||
let v = await r2.json()
|
||||
// let item = v.find(a => a.uid === '68310389333')
|
||||
// let item = v.find(a => a.uid === '59054327754')
|
||||
let item = v.find(a => a.uid === '2739632844317827')
|
||||
if (item) {
|
||||
return [200, {data: item, code: 200}]
|
||||
}
|
||||
return [200, {code: 500}];
|
||||
})
|
||||
})
|
||||
|
||||
Mock.mock(/user\/friends/, options => {
|
||||
return Mock.mock({
|
||||
data: resource.users, code: 200, msg: '',
|
||||
mock.onGet(/user\/friends/).reply(async (config) => {
|
||||
let r2 = await fetch(BASE_URL + '/data/users.json')
|
||||
let v = await r2.json()
|
||||
return [200, {data: v, code: 200}]
|
||||
})
|
||||
})
|
||||
|
||||
mock.onGet(/historyVideo/).reply(async (config) => {
|
||||
let page = getPage2(config.params)
|
||||
return [200, {
|
||||
data: {
|
||||
total: 150,
|
||||
list: allRecommendVideos.slice(200, 350).slice(page.offset, page.limit)
|
||||
}, code: 200, msg: '',
|
||||
}]
|
||||
})
|
||||
|
||||
mock.onGet(/historyOther/).reply(async (config) => {
|
||||
let page = getPage2(config.params)
|
||||
return [200, {
|
||||
data: {
|
||||
pageNo: page.pageNo,
|
||||
total: 0,
|
||||
list: []
|
||||
}, code: 200, msg: '',
|
||||
}]
|
||||
})
|
||||
|
||||
setTimeout(fetchData, 0)
|
||||
}
|
||||
@ -99,6 +99,7 @@ import DouyinCode from "../../components/DouyinCode";
|
||||
import ConfirmDialog from "../../components/dialog/ConfirmDialog";
|
||||
import ShareToFriend from "./components/ShareToFriend";
|
||||
import resource from "../../assets/data/resource";
|
||||
import {myVideo} from "@/api/videos";
|
||||
|
||||
export default {
|
||||
name: "Music",
|
||||
@ -179,7 +180,7 @@ export default {
|
||||
this.pageNo++
|
||||
}
|
||||
this.loading = true
|
||||
let res = await this.$api.videos.my({pageNo: this.pageNo, pageSize: this.pageSize,})
|
||||
let res = await myVideo({pageNo: this.pageNo, pageSize: this.pageSize,})
|
||||
this.loading = false
|
||||
if (res.code === this.SUCCESS) {
|
||||
this.videos = this.videos.concat(res.data.list)
|
||||
|
||||
@ -196,7 +196,7 @@ import SlideItem from '@/components/slide/SlideItem.vue'
|
||||
import Comment from "../../components/Comment.vue";
|
||||
import Share from "../../components/Share.vue";
|
||||
import IndicatorHome from "./components/IndicatorHome.vue";
|
||||
import {computed, onActivated, onDeactivated, onMounted, onUnmounted, reactive} from "vue";
|
||||
import {computed, onMounted, onUnmounted, reactive} from "vue";
|
||||
import bus, {EVENT_KEY} from "../../utils/bus";
|
||||
import {useNav} from "@/utils/hooks/useNav";
|
||||
import {useStore} from "vuex";
|
||||
@ -215,7 +215,7 @@ import Slide0 from "@/pages/home/slide/Slide0.vue";
|
||||
import Slide2 from "@/pages/home/slide/Slide2.vue";
|
||||
import Slide4 from "@/pages/home/slide/Slide4.vue";
|
||||
import {DefaultUser} from "@/utils/const_var";
|
||||
import {$no, _getUserDouyinId} from "@/utils";
|
||||
import {$no} from "@/utils";
|
||||
import LongVideo from "@/pages/home/slide/LongVideo.vue";
|
||||
|
||||
const nav = useNav()
|
||||
|
||||
@ -305,7 +305,7 @@
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 18rem;
|
||||
font-size: 16rem;
|
||||
margin-bottom: 5rem;
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<div class="center" v-if="floatShowName">
|
||||
<p class="name f15 mt1r mb1r">{{ userinfo.nickname }}</p>
|
||||
<p class="name f14 mt1r mb1r">{{ userinfo.nickname }}</p>
|
||||
</div>
|
||||
</transition>
|
||||
<div class="right">
|
||||
@ -43,15 +43,17 @@
|
||||
@touchmove="touchMove($event)"
|
||||
@touchend="touchEnd($event)">
|
||||
<div ref="desc" class="desc">
|
||||
<header ref="header" @click="previewImg = new URL('../../assets/img/header-bg.png')">
|
||||
<header ref="header"
|
||||
:style="{backgroundImage:`url(${_checkImgUrl(userinfo.cover_url[0].url_list[0])})`}"
|
||||
@click="previewImg = _checkImgUrl(userinfo.cover_url[0].url_list[0])">
|
||||
<div class="info">
|
||||
<img :src="$imgPreview(userinfo.avatar)" class="avatar"
|
||||
@click="previewImg = userinfo.avatar">
|
||||
<img :src="_checkImgUrl(userinfo.avatar_168x168.url_list[0])" class="avatar"
|
||||
@click="previewImg = _checkImgUrl(userinfo.avatar_300x300.url_list[0])">
|
||||
<div class="right">
|
||||
<p class="name">{{ userinfo.nickname }}</p>
|
||||
<div class="number mb1r">
|
||||
<span class="mr1r" v-if="userinfo.is_private">私密账号</span>
|
||||
<span>抖音号:{{ userinfo.unique_id }}</span>
|
||||
<span>抖音号:{{ _getUserDouyinId({author: userinfo}) }}</span>
|
||||
<img src="../../assets/img/icon/me/qrcode-gray.png" alt="" @click.stop="$nav('/me/my-card')">
|
||||
</div>
|
||||
</div>
|
||||
@ -61,30 +63,30 @@
|
||||
<div class="head">
|
||||
<div class="heat">
|
||||
<div class="text" @click="isShowStarCount = true">
|
||||
<span class="num">{{ formatNumber(userinfo.aweme_count) }}</span>
|
||||
<span class="num">{{ _formatNumber(userinfo.aweme_count) }}</span>
|
||||
<span>获赞</span>
|
||||
</div>
|
||||
<div class="text" @click="$nav('/people/follow-and-fans',{type:0})">
|
||||
<span class="num">{{ formatNumber(userinfo.following_count) }}</span>
|
||||
<span class="num">{{ _formatNumber(userinfo.following_count) }}</span>
|
||||
<span>朋友</span>
|
||||
</div>
|
||||
<div class="text" @click="$nav('/people/follow-and-fans',{type:0})">
|
||||
<span class="num">{{ formatNumber(userinfo.following_count) }}</span>
|
||||
<span class="num">{{ _formatNumber(userinfo.following_count) }}</span>
|
||||
<span>关注</span>
|
||||
</div>
|
||||
<div class="text" @click="$nav('/people/follow-and-fans',{type:1})">
|
||||
<span class="num">{{ formatNumber(userinfo.follower_count) }}</span>
|
||||
<span class="num">{{ _formatNumber(userinfo.follower_count) }}</span>
|
||||
<span>粉丝</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button" @click="$nav('/people/find-acquaintance')">添加朋友</div>
|
||||
</div>
|
||||
<div class="signature" @click="$nav('/me/edit-userinfo-item',{type:3})">
|
||||
<template v-if="!userinfo.desc">
|
||||
<template v-if="!userinfo.signature">
|
||||
<span>点击添加介绍,让大家认识你...</span>
|
||||
<img src="../../assets/img/icon/me/write-gray.png" alt="">
|
||||
</template>
|
||||
<div v-else class="text" v-html="userinfo.desc"></div>
|
||||
<div v-else class="text" v-html="userinfo.signature"></div>
|
||||
</div>
|
||||
<div class="more" @click="$nav('/me/edit-userinfo')">
|
||||
<div class="age item" v-if="userinfo.birthday">
|
||||
@ -99,7 +101,7 @@
|
||||
</template>
|
||||
{{ userinfo.city }}
|
||||
</div>
|
||||
<div class="item" v-if="userinfo.school.name">
|
||||
<div class="item" v-if="userinfo.school?.name">
|
||||
{{ userinfo.school.name }}
|
||||
</div>
|
||||
</div>
|
||||
@ -182,16 +184,7 @@
|
||||
<dy-back direction="right"></dy-back>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="item"
|
||||
v-for="i in videos.collect.video.list.slice(0,3)">
|
||||
<img class="poster" :src="$imgPreview(i.video+videoPoster)" alt="">
|
||||
<div class="num">
|
||||
<img class="love" src="../../assets/img/icon/love.svg" alt="">
|
||||
<span>{{ formatNumber(i.likeNum) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Posters v-if="videos.collect.video.total !== -1" :list="videos.collect.video.list"></Posters>
|
||||
</div>
|
||||
|
||||
<div class="music" v-if=" videos.collect.music.total !== -1">
|
||||
@ -339,7 +332,7 @@
|
||||
|
||||
<ConfirmDialog
|
||||
v-model:visible="isShowStarCount"
|
||||
:subtitle='`"${userinfo.nickname}"共获得${this.formatNumber(userinfo.aweme_count)}个赞`'
|
||||
:subtitle='`"${userinfo.nickname}"共获得${_formatNumber(userinfo.aweme_count)}个赞`'
|
||||
okText="确认"
|
||||
cancelText="取消"
|
||||
@ok="isShowStarCount = false"
|
||||
@ -356,11 +349,15 @@ import Posters from '../../components/Posters'
|
||||
import Footer from "../../components/Footer";
|
||||
import Indicator from '../../components/slide/Indicator'
|
||||
import {nextTick} from 'vue'
|
||||
import {mapState} from "vuex";
|
||||
import {mapState} from 'pinia'
|
||||
|
||||
import bus from "../../utils/bus";
|
||||
import ConfirmDialog from "../../components/dialog/ConfirmDialog";
|
||||
import {$no} from "@/utils";
|
||||
import {$no, _checkImgUrl, _formatNumber, _getUserDouyinId} from "@/utils";
|
||||
import SlideHorizontal from "@/components/slide/SlideHorizontal.vue";
|
||||
import {likeVideo, myVideo, privateVideo} from "@/api/videos";
|
||||
import {useBaseStore} from "@/store/pinia";
|
||||
import {userCollect} from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "Me",
|
||||
@ -398,11 +395,13 @@ export default {
|
||||
},
|
||||
private: {
|
||||
list: [],
|
||||
total: -1
|
||||
total: -1,
|
||||
pageNo: 0
|
||||
},
|
||||
like: {
|
||||
list: [],
|
||||
total: -1
|
||||
total: -1,
|
||||
pageNo: 0
|
||||
},
|
||||
collect: {
|
||||
video: {
|
||||
@ -444,9 +443,7 @@ export default {
|
||||
if (this.tempScroll || this.isScroll) return {overflow: 'auto'}
|
||||
return {overflow: 'hidden'}
|
||||
},
|
||||
...mapState({
|
||||
userinfo: 'userinfo',
|
||||
})
|
||||
...mapState(useBaseStore, ['userinfo'])
|
||||
},
|
||||
watch: {
|
||||
contentIndex(newVal, oldVal) {
|
||||
@ -468,6 +465,9 @@ export default {
|
||||
bus.on('baseSlide-end', () => this.canScroll = true)
|
||||
},
|
||||
methods: {
|
||||
_getUserDouyinId,
|
||||
_checkImgUrl,
|
||||
_formatNumber,
|
||||
$no,
|
||||
setLoadingFalse() {
|
||||
this.loadings.loading0 = false
|
||||
@ -511,7 +511,8 @@ export default {
|
||||
if (newVal === 3) {
|
||||
if (videoOb.video.total === -1) {
|
||||
this.loadings['loading' + newVal] = true
|
||||
let res = await this.$api.videos.collect()
|
||||
let res = await userCollect()
|
||||
console.log('res',res)
|
||||
if (res.code === this.SUCCESS) this.videos.collect = res.data
|
||||
}
|
||||
} else {
|
||||
@ -520,16 +521,15 @@ export default {
|
||||
let res
|
||||
switch (newVal) {
|
||||
case 0:
|
||||
res = await this.$api.videos.my({pageNo: this.videos.my.pageNo, pageSize: this.pageSize,})
|
||||
console.log(res)
|
||||
res = await myVideo({pageNo: this.videos.my.pageNo, pageSize: this.pageSize,})
|
||||
if (res.code === this.SUCCESS) this.videos.my = res.data
|
||||
break
|
||||
case 1:
|
||||
res = await this.$api.videos.private({pageNo: this.videos.private.pageNo, pageSize: this.pageSize,})
|
||||
res = await privateVideo({pageNo: this.videos.private.pageNo, pageSize: this.pageSize,})
|
||||
if (res.code === this.SUCCESS) this.videos.private = res.data
|
||||
break
|
||||
case 2:
|
||||
res = await this.$api.videos.like({pageNo: this.videos.like.pageNo, pageSize: this.pageSize,})
|
||||
res = await likeVideo({pageNo: this.videos.like.pageNo, pageSize: this.pageSize,})
|
||||
if (res.code === this.SUCCESS) this.videos.like = res.data
|
||||
break
|
||||
}
|
||||
@ -569,16 +569,16 @@ export default {
|
||||
let res
|
||||
switch (this.contentIndex) {
|
||||
case 0:
|
||||
res = await this.$api.videos.my({pageNo: videoOb.pageNo, pageSize: this.pageSize,})
|
||||
res = await myVideo({pageNo: videoOb.pageNo, pageSize: this.pageSize,})
|
||||
break
|
||||
case 1:
|
||||
res = await this.$api.videos.private({pageNo: videoOb.pageNo, pageSize: this.pageSize,})
|
||||
res = await privateVideo({pageNo: videoOb.pageNo, pageSize: this.pageSize,})
|
||||
break
|
||||
case 2:
|
||||
res = await this.$api.videos.like({pageNo: videoOb.pageNo, pageSize: this.pageSize,})
|
||||
res = await likeVideo({pageNo: videoOb.pageNo, pageSize: this.pageSize,})
|
||||
break
|
||||
case 3:
|
||||
res = await this.$api.videos.collect({pageNo: videoOb.pageNo, pageSize: this.pageSize,})
|
||||
res = await userCollect({pageNo: videoOb.pageNo, pageSize: this.pageSize,})
|
||||
break
|
||||
}
|
||||
this.loadings['loading' + this.contentIndex] = false
|
||||
|
||||
@ -120,6 +120,7 @@ import FromBottomDialog from "../../components/dialog/FromBottomDialog";
|
||||
import GuessMusic from "./components/GuessMusic";
|
||||
import CollectMusic from "./components/CollectMusic";
|
||||
import Loading from "../../components/Loading";
|
||||
import {userCollect} from "@/api/user";
|
||||
|
||||
//TODO 两个page页面的播放冲突未做
|
||||
export default {
|
||||
@ -189,7 +190,7 @@ export default {
|
||||
},
|
||||
async getCollectMusic() {
|
||||
this.loading = true
|
||||
let res = await this.$api.videos.collect()
|
||||
let res = await userCollect()
|
||||
this.loading = false
|
||||
if (res.code === this.SUCCESS) {
|
||||
this.collectMusic = res.data.music.list.slice(0, 2)
|
||||
|
||||
@ -111,9 +111,7 @@
|
||||
<script setup>
|
||||
import Search from "../../components/Search";
|
||||
import FromBottomDialog from "../../components/dialog/FromBottomDialog";
|
||||
import SlideList from "@/pages/home/slide/SlideList.vue";
|
||||
import api from "@/api";
|
||||
import {nextTick, onMounted, reactive} from "vue";
|
||||
import {onMounted, reactive} from "vue";
|
||||
import {useBaseStore} from "@/store/pinia";
|
||||
import SlideVerticalInfinite from "@/components/slide/SlideVerticalInfinite.vue";
|
||||
import {uniqueId} from "lodash-es";
|
||||
@ -144,11 +142,9 @@ const render = useSlideListItemRender()
|
||||
onMounted(() => {
|
||||
console.log('s', store.routeData)
|
||||
state.index = store.routeData.index
|
||||
state.list = store.routeData.list.map(v => {
|
||||
v.type = 'recommend-video'
|
||||
v.author = store.routeData.author
|
||||
return v
|
||||
})
|
||||
state.list = store.routeData.list
|
||||
|
||||
console.log('sss', state.list[state.index])
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@ -55,6 +55,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
import {userCollect} from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "MusicCollect",
|
||||
@ -88,7 +89,7 @@ export default {
|
||||
methods: {
|
||||
async getData() {
|
||||
this.loading = true
|
||||
let res = await this.$api.videos.collect()
|
||||
let res = await userCollect()
|
||||
this.loading = false
|
||||
if (res.code === this.SUCCESS) {
|
||||
this.list = res.data.music.list
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
import resource from "../../../assets/data/resource";
|
||||
import Posters from "../../../components/Posters";
|
||||
import Scroll from "../../../components/Scroll";
|
||||
import {myVideo} from "@/api/videos";
|
||||
|
||||
export default {
|
||||
name: "VideoCollect",
|
||||
@ -49,7 +50,7 @@ export default {
|
||||
this.pageNo++
|
||||
}
|
||||
this.loading = true
|
||||
let res = await this.$api.videos.my({pageNo: this.pageNo, pageSize: this.pageSize,})
|
||||
let res = await myVideo({pageNo: this.pageNo, pageSize: this.pageSize,})
|
||||
this.loading = false
|
||||
if (res.code === this.SUCCESS) {
|
||||
this.videos = this.videos.concat(res.data.list)
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
import {nextTick} from "vue";
|
||||
import globalMethods from "../../../utils";
|
||||
import gaobaiqiqiu from "../../../assets/data/lyrics/gaobaiqiqiu.lrc?raw";
|
||||
import {userCollect} from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "SlideItemMusic",
|
||||
@ -183,7 +184,7 @@ export default {
|
||||
},
|
||||
async getCollectMusic() {
|
||||
this.loading = true
|
||||
let res = await this.$api.videos.collect()
|
||||
let res = await userCollect()
|
||||
this.loading = false
|
||||
if (res.code === this.SUCCESS) {
|
||||
this.collectMusic = res.data.music.list.slice(0, 2)
|
||||
|
||||
@ -122,7 +122,6 @@ const routes = [
|
||||
{path: '/message/chat/detail', component: ChatDetail},
|
||||
{path: '/message/chat/red-packet-detail', component: RedPacketDetail},
|
||||
|
||||
|
||||
{path: '/people/find-acquaintance', component: FindAcquaintance},
|
||||
{path: '/people/follow-and-fans', component: FollowAndFans},
|
||||
|
||||
@ -148,7 +147,7 @@ const routes = [
|
||||
{path: '/message/share-to-friend', component: Share2Friend},
|
||||
|
||||
{path: '/video-detail', name: 'video-detail', component: VideoDetail},
|
||||
{path: '/album-detail', name: 'video-detail', component: AlbumDetail},
|
||||
{path: '/album-detail', component: AlbumDetail},
|
||||
|
||||
{path: '/home/search', component: Search},
|
||||
|
||||
|
||||
@ -1,11 +1,46 @@
|
||||
import {defineStore} from "pinia";
|
||||
import {friends, userinfo} from "@/api/user.js";
|
||||
import enums from "@/utils/enums";
|
||||
|
||||
export const useBaseStore = defineStore('base', {
|
||||
state: () => {
|
||||
return {
|
||||
routeData: null
|
||||
routeData: null,
|
||||
users: [],
|
||||
userinfo: {
|
||||
school: {
|
||||
name: '中央戏剧学院',
|
||||
department: null,
|
||||
joinTime: null,
|
||||
education: null,
|
||||
displayType: enums.DISPLAY_TYPE.ALL,
|
||||
},
|
||||
"avatar_168x168": {
|
||||
"url_list": [],
|
||||
},
|
||||
"avatar_300x300": {
|
||||
"url_list": [],
|
||||
},
|
||||
"cover_url": [{
|
||||
"url_list": [],
|
||||
}],
|
||||
"white_cover_url": [{
|
||||
"url_list": [],
|
||||
}],
|
||||
}
|
||||
}
|
||||
},
|
||||
getters: {},
|
||||
actions: {},
|
||||
actions: {
|
||||
async init() {
|
||||
let r = await userinfo()
|
||||
if (r.success) {
|
||||
this.userinfo = r.data
|
||||
}
|
||||
let r2 = await friends()
|
||||
if (r2.success) {
|
||||
this.users = r2.data
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -6,32 +6,33 @@ export function useSlideListItemRender(props) {
|
||||
return function render(item, index, play, uniqueId) {
|
||||
// console.log('item', item)
|
||||
let node
|
||||
if (item.type === 'img') {
|
||||
node = <img src={item.src} style="height:100%;"/>
|
||||
}
|
||||
if (item.type === 'imgs') {
|
||||
node = <SlideAlbum
|
||||
isPlay={play}
|
||||
index={index}
|
||||
position={{uniqueId, index}}
|
||||
{...props}
|
||||
/>
|
||||
}
|
||||
if (item.type === 'user') {
|
||||
node = <SlideUser {...props}/>
|
||||
}
|
||||
if (item.type === 'send-video') {
|
||||
node = <video src={item.src} style="height:100%;"/>
|
||||
}
|
||||
// onGoUserInfo={() => cb('onGoUserInfo')}
|
||||
if (item.type === 'recommend-video') {
|
||||
node = <BVideo
|
||||
switch (item.type) {
|
||||
case 'img':
|
||||
node = <img src={item.src} style="height:100%;"/>
|
||||
break
|
||||
case 'imgs':
|
||||
node = <SlideAlbum
|
||||
isPlay={play}
|
||||
index={index}
|
||||
position={{uniqueId, index}}
|
||||
{...props}
|
||||
/>
|
||||
break
|
||||
case 'user':
|
||||
node = <SlideUser {...props}/>
|
||||
break
|
||||
case 'send-video':
|
||||
node = <video src={item.src} style="height:100%;"/>
|
||||
break
|
||||
default:
|
||||
node = <BVideo
|
||||
isPlay={play}
|
||||
item={item}
|
||||
index={index}
|
||||
position={{uniqueId, index}}
|
||||
{...props}
|
||||
/>
|
||||
/>
|
||||
break
|
||||
}
|
||||
return node
|
||||
}
|
||||
|
||||
@ -2,15 +2,14 @@ import axios from 'axios'
|
||||
import config from '@/config'
|
||||
import store from '../store'
|
||||
import globalMethods from './index'
|
||||
//这里必须使用axios实例,因为已经有一个没有创建实例而直接使用的axio了,
|
||||
// 在request.js,这里如果直接使用axios的话,request.js里面的拦截器也会执行
|
||||
//创建一个实例再去使用这个实例请求,request.js里面的axios配置就不会生效
|
||||
const instance = axios.create({
|
||||
|
||||
const axiosInstance = axios.create({
|
||||
baseURL: config.baseUrl,
|
||||
timeout: 60000,
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
instance.interceptors.request.use((config) => {
|
||||
axiosInstance.interceptors.request.use((config) => {
|
||||
// 如果没有设置Content-Type,默认application/json
|
||||
if (!config.headers['Content-Type']) {
|
||||
config.headers['Content-Type'] = 'application/json'
|
||||
@ -24,7 +23,7 @@ instance.interceptors.request.use((config) => {
|
||||
* 响应拦截器,目前的处理是,无论失败或者成功都会返回{ code: xxx, data: xxx }这种类型的数据,没有reject和抛error。
|
||||
* 如果有问题,拦截器里会进行提示,然后返回{ code: Xxx, data:xxx }这种数据。在then里面总是会接收到
|
||||
* */
|
||||
instance.interceptors.response.use(
|
||||
axiosInstance.interceptors.response.use(
|
||||
response => {
|
||||
// console.log('response',response)
|
||||
/*
|
||||
@ -34,9 +33,9 @@ instance.interceptors.response.use(
|
||||
// console.log(response)
|
||||
if (data === undefined || data === null || data === '') {
|
||||
globalMethods.$notice('请求失败,请稍后重试!')
|
||||
return {code: 500, data: []}
|
||||
return {success: false, code: 500, data: []}
|
||||
} else if (typeof data === 'string') {
|
||||
return {code: 200, data}
|
||||
return {success: true, code: 200, data}
|
||||
} else {
|
||||
if (data.data === undefined || data.data === null) {
|
||||
data.data = {...data}
|
||||
@ -47,46 +46,51 @@ instance.interceptors.response.use(
|
||||
resCode = Number(resCode)
|
||||
} catch (e) {
|
||||
data.code = resCode = 500
|
||||
data.success = false
|
||||
}
|
||||
if (resCode === 0) {
|
||||
data.code = resCode = 200
|
||||
data.success = true
|
||||
}
|
||||
if (resCode !== 200) {
|
||||
globalMethods.$notice(response.data.message || '请求失败,请稍后重试!')
|
||||
} else {
|
||||
data.success = true
|
||||
}
|
||||
} else {
|
||||
data.code = 200
|
||||
data.success = true
|
||||
}
|
||||
return data
|
||||
}
|
||||
},
|
||||
error => {
|
||||
// console.log('error', error)
|
||||
console.log('error', error)
|
||||
// console.log(error.response)
|
||||
// console.log(error.response.status)
|
||||
if (error.response === undefined) {
|
||||
globalMethods.$notice('服务器响应超时')
|
||||
return {code: 500, msg: '服务器响应超时', data: []}
|
||||
return {success: false, code: 500, msg: '服务器响应超时', data: []}
|
||||
}
|
||||
if (error.response.status >= 500) {
|
||||
globalMethods.$notice('服务器出现错误')
|
||||
return {code: 500, msg: '服务器出现错误', data: []}
|
||||
return {success: false, code: 500, msg: '服务器出现错误', data: []}
|
||||
}
|
||||
if (error.response.status === 404) {
|
||||
globalMethods.$notice('接口不存在')
|
||||
return {code: 404, msg: '接口不存在', data: []}
|
||||
return {success: false, code: 404, msg: '接口不存在', data: []}
|
||||
}
|
||||
if (error.response.status === 400) {
|
||||
globalMethods.$notice('接口报错')
|
||||
return {code: 400, msg: '接口报错', data: []}
|
||||
return {success: false, code: 400, msg: '接口报错', data: []}
|
||||
}
|
||||
if (error.response.status === 401) {
|
||||
return {code: 401, msg: '用户名或密码不正确', data: []}
|
||||
return {success: false, code: 401, msg: '用户名或密码不正确', data: []}
|
||||
} else {
|
||||
let {data} = error.response
|
||||
if (data === null || data === undefined) {
|
||||
globalMethods.$notice('请求失败,请稍后重试!')
|
||||
return {code: 200, data: []}
|
||||
return {success: true, code: 200, data: []}
|
||||
} else {
|
||||
let resCode = data.code
|
||||
if (data.data === undefined || data.data === null) {
|
||||
@ -96,12 +100,13 @@ instance.interceptors.response.use(
|
||||
globalMethods.$notice('请求失败,请稍后重试!')
|
||||
} else {
|
||||
data.code = 200
|
||||
data.success = true
|
||||
}
|
||||
return data
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default instance
|
||||
export default axiosInstance
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user