视频圈
|
@ -0,0 +1,64 @@
|
|||
const emojiList = [
|
||||
{"url":"0@2x.gif","alt":"[惊讶]"},{"url":"1@2x.gif","alt":"[撇嘴]"},{"url":"2@2x.gif","alt":"[色]"},{"url":"3@2x.gif","alt":"[啊这]"},{"url":"4@2x.gif","alt":"[得意]"},{"url":"5@2x.gif","alt":"[流泪]"},{"url":"6@2x.gif","alt":"[害羞]"},
|
||||
{"url":"7@2x.gif","alt":"[闭嘴]"},{"url":"8@2x.gif","alt":"[睡]"},{"url":"9@2x.gif","alt":"[大哭]"},{"url":"10@2x.gif","alt":"[尴尬]"},{"url":"11@2x.gif","alt":"[发怒]"},{"url":"12@2x.gif","alt":"[调皮]"},{"url":"13@2x.gif","alt":"[呲牙]"},
|
||||
{"url":"14@2x.gif","alt":"[微笑]"},{"url":"15@2x.gif","alt":"[难过]"},{"url":"16@2x.gif","alt":"[酷]"},{"url":"18@2x.gif","alt":"[抓狂]"},{"url":"19@2x.gif","alt":"[吐]"},{"url":"20@2x.gif","alt":"[偷笑]"},{"url":"21@2x.gif","alt":"[可爱]"},
|
||||
{"url":"22@2x.gif","alt":"[白眼]"},{"url":"23@2x.gif","alt":"[傲慢]"},{"url":"24@2x.gif","alt":"[饥饿]"},{"url":"25@2x.gif","alt":"[困]"},{"url":"26@2x.gif","alt":"[惊恐]"},{"url":"27@2x.gif","alt":"[流汗]"},{"url":"28@2x.gif","alt":"[憨笑]"},
|
||||
{"url":"29@2x.gif","alt":"[悠闲]"},{"url":"30@2x.gif","alt":"[奋斗]"},{"url":"31@2x.gif","alt":"[咒骂]"},{"url":"32@2x.gif","alt":"[疑问]"},{"url":"33@2x.gif","alt":"[嘘]"},{"url":"34@2x.gif","alt":"[晕]"},{"url":"35@2x.gif","alt":"[折磨]"},
|
||||
{"url":"36@2x.gif","alt":"[衰]"},{"url":"37@2x.gif","alt":"[骷髅]"},{"url":"38@2x.gif","alt":"[敲打]"},{"url":"39@2x.gif","alt":"[再见]"},{"url":"46@2x.gif","alt":"[猪头]"},{"url":"49@2x.gif","alt":"[抱抱]"},{"url":"53@2x.gif","alt":"[生日]"},
|
||||
{"url":"54@2x.gif","alt":"[闪电]"},{"url":"55@2x.gif","alt":"[炸弹]"},{"url":"56@2x.gif","alt":"[刀]"},{"url":"57@2x.gif","alt":"[足球]"},{"url":"59@2x.gif","alt":"[便便]"},{"url":"60@2x.gif","alt":"[咖啡]"},{"url":"61@2x.gif","alt":"[饭]"},
|
||||
{"url":"62@2x.gif","alt":"[药]"},{"url":"63@2x.gif","alt":"[玫瑰]"},{"url":"64@2x.gif","alt":"[凋谢]"},{"url":"66@2x.gif","alt":"[爱心]"},{"url":"67@2x.gif","alt":"[心碎]"},{"url":"69@2x.gif","alt":"[礼物]"},{"url":"72@2x.gif","alt":"[信封]"},
|
||||
{"url":"74@2x.gif","alt":"[太阳]"},{"url":"75@2x.gif","alt":"[月亮]"},{"url":"76@2x.gif","alt":"[赞]"},{"url":"77@2x.gif","alt":"[踩]"},{"url":"78@2x.gif","alt":"[握手]"},{"url":"79@2x.gif","alt":"[胜利]"},{"url":"89@2x.gif","alt":"[西瓜]"},
|
||||
{"url":"90@2x.gif","alt":"[下雨]"},{"url":"91@2x.gif","alt":"[多云]"},{"url":"96@2x.gif","alt":"[冷汗]"},{"url":"97@2x.gif","alt":"[擦汗]"},{"url":"98@2x.gif","alt":"[抠鼻]"},{"url":"99@2x.gif","alt":"[鼓掌]"},{"url":"100@2x.gif","alt":"[嗅大了]"},
|
||||
{"url":"101@2x.gif","alt":"[坏笑]"},{"url":"102@2x.gif","alt":"[右哼哼]"},{"url":"103@2x.gif","alt":"[左哼哼]"},{"url":"104@2x.gif","alt":"[哈欠]"},{"url":"105@2x.gif","alt":"[鄙视]"},{"url":"106@2x.gif","alt":"[委屈]"},{"url":"107@2x.gif","alt":"[快哭了]"},
|
||||
{"url":"108@2x.gif","alt":"[阴险]"},{"url":"109@2x.gif","alt":"[亲亲]"},{"url":"110@2x.gif","alt":"[吓]"},{"url":"111@2x.gif","alt":"[可怜]"},{"url":"112@2x.gif","alt":"[菜刀]"},{"url":"113@2x.gif","alt":"[啤酒]"},{"url":"114@2x.gif","alt":"[篮球]"},
|
||||
{"url":"115@2x.gif","alt":"[乒乓]"},{"url":"116@2x.gif","alt":"[示爱]"},{"url":"117@2x.gif","alt":"[瓢虫]"},{"url":"118@2x.gif","alt":"[抱拳]"},{"url":"119@2x.gif","alt":"[勾引]"},{"url":"120@2x.gif","alt":"[拳头]"},{"url":"121@2x.gif","alt":"[差劲]"},
|
||||
{"url":"122@2x.gif","alt":"[爱你]"},{"url":"123@2x.gif","alt":"[NO]"},{"url":"124@2x.gif","alt":"[OK]"},{"url":"136@2x.gif","alt":"[双喜]"},{"url":"137@2x.gif","alt":"[鞭炮]"},{"url":"138@2x.gif","alt":"[灯笼]"},{"url":"139@2x.gif","alt":"[麻将]"},
|
||||
{"url":"140@2x.gif","alt":"[唱歌]"},{"url":"141@2x.gif","alt":"[包包]"},{"url":"142@2x.gif","alt":"[信]"},{"url":"143@2x.gif","alt":"[象棋]"},{"url":"144@2x.gif","alt":"[礼物]"},{"url":"145@2x.gif","alt":"[祈祷]"},{"url":"146@2x.gif","alt":"[爆筋]"},
|
||||
{"url":"147@2x.gif","alt":"[棒棒糖]"},{"url":"148@2x.gif","alt":"[喝奶]"},{"url":"149@2x.gif","alt":"[吃面]"},{"url":"150@2x.gif","alt":"[香蕉]"},{"url":"151@2x.gif","alt":"[飞机]"},{"url":"152@2x.gif","alt":"[汽车]"},{"url":"153@2x.gif","alt":"[高铁]"},
|
||||
{"url":"154@2x.gif","alt":"[动车]"},{"url":"155@2x.gif","alt":"[动车头]"},{"url":"156@2x.gif","alt":"[多云]"},{"url":"157@2x.gif","alt":"[下雨]"},{"url":"158@2x.gif","alt":"[钞票]"},{"url":"159@2x.gif","alt":"[熊猫]"},{"url":"160@2x.gif","alt":"[电灯泡]"},
|
||||
{"url":"161@2x.gif","alt":"[七彩]"},{"url":"162@2x.gif","alt":"[闹钟]"},{"url":"163@2x.gif","alt":"[雨伞]"},{"url":"164@2x.gif","alt":"[气球]"},{"url":"165@2x.gif","alt":"[钻戒]"},{"url":"166@2x.gif","alt":"[座椅]"},{"url":"167@2x.gif","alt":"[纸巾]"},
|
||||
{"url":"168@2x.gif","alt":"[药丸]"},{"url":"169@2x.gif","alt":"[手枪]"},{"url":"170@2x.gif","alt":"[青蛙]"},{"url":"171@2x.gif","alt":"[热汤]"},{"url":"172@2x.gif","alt":"[眨眼睛]"},{"url":"173@2x.gif","alt":"[泪奔]"},{"url":"174@2x.gif","alt":"[无奈]"},
|
||||
{"url":"175@2x.gif","alt":"[卖萌]"},{"url":"176@2x.gif","alt":"[小纠结]"},{"url":"177@2x.gif","alt":"[喷血]"},{"url":"178@2x.gif","alt":"[斜眼笑]"},{"url":"179@2x.gif","alt":"[高傲]"},{"url":"180@2x.gif","alt":"[惊喜]"},{"url":"181@2x.gif","alt":"[骚扰]"},
|
||||
{"url":"182@2x.gif","alt":"[笑哭]"},{"url":"183@2x.gif","alt":"[我最美]"},{"url":"184@2x.gif","alt":"[河蟹]"},{"url":"185@2x.gif","alt":"[羊驼]"},{"url":"186@2x.gif","alt":"[板栗]"},{"url":"187@2x.gif","alt":"[幽灵]"},{"url":"188@2x.gif","alt":"[鸡蛋]"},
|
||||
{"url":"189@2x.gif","alt":"[魔方]"},{"url":"190@2x.gif","alt":"[转花圈]"},{"url":"191@2x.gif","alt":"[搓澡]"},{"url":"192@2x.gif","alt":"[红包]"},{"url":"200@2x.gif","alt":"[拜托]"},{"url":"201@2x.gif","alt":"[点赞]"},{"url":"202@2x.gif","alt":"[无聊]"},
|
||||
{"url":"203@2x.gif","alt":"[托脸]"},{"url":"204@2x.gif","alt":"[吃]"},{"url":"205@2x.gif","alt":"[送花]"},{"url":"206@2x.gif","alt":"[害怕]"},{"url":"207@2x.gif","alt":"[花痴]"},{"url":"208@2x.gif","alt":"[小样儿]"},{"url":"210@2x.gif","alt":"[飙泪]"},
|
||||
{"url":"211@2x.gif","alt":"[我不看]"},{"url":"212@2x.gif","alt":"[托腮]"},{"url":"245@2x.gif","alt":"[加油必胜]"},{"url":"246@2x.gif","alt":"[抱抱]"},{"url":"247@2x.gif","alt":"[白条]"},{"url":"260@2x.gif","alt":"[白条]"},{"url":"261@2x.gif","alt":"[搬砖中]"},
|
||||
{"url":"262@2x.gif","alt":"[脑壳疼]"},{"url":"263@2x.gif","alt":"[沧桑]"},{"url":"264@2x.gif","alt":"[捂脸]"},{"url":"265@2x.gif","alt":"[辣眼睛]"},{"url":"266@2x.gif","alt":"[哦呦]"},{"url":"267@2x.gif","alt":"[头秃]"},{"url":"268@2x.gif","alt":"[问号脸]"},
|
||||
{"url":"269@2x.gif","alt":"[暗中观察]"},{"url":"270@2x.gif","alt":"[emm]"},{"url":"271@2x.gif","alt":"[吃瓜]"},{"url":"272@2x.gif","alt":"[呵呵哒]"},{"url":"273@2x.gif","alt":"[白条]"},{"url":"274@2x.gif","alt":"[白条]"},{"url":"newemoji_002.gif","alt":"[好的]"},
|
||||
{"url":"newemoji_003.gif","alt":"[白眼]"},{"url":"newemoji_004.gif","alt":"[鬼脸]"},{"url":"newemoji_005.gif","alt":"[马赛克]"},{"url":"newemoji_006.gif","alt":"[喝茶]"},{"url":"newemoji_007.gif","alt":"[摸鱼]"},{"url":"newemoji_008.gif","alt":"[大笑]"},{"url":"newemoji_009.gif","alt":"[请滚]"},
|
||||
{"url":"newemoji_010.gif","alt":"[睁眼]"},{"url":"newemoji_011.gif","alt":"[儿子乖]"},{"url":"newemoji_012.gif","alt":"[脸疼]"},{"url":"newemoji_013.gif","alt":"[考虑]"},{"url":"newemoji_014.gif","alt":"[惊掉下巴]"},{"url":"newemoji_015.gif","alt":"[遮眼]"},{"url":"newemoji_016.gif","alt":"[比爱心]"},
|
||||
{"url":"newemoji_017.gif","alt":"[喝彩]"}
|
||||
]
|
||||
export default emojiList;
|
||||
// const emojiList = [
|
||||
// {"url":"0@2x.png","alt":"[惊讶]"},{"url":"1@2x.png","alt":"[撇嘴]"},{"url":"2@2x.png","alt":"[色]"},{"url":"3@2x.png","alt":"[啊这]"},{"url":"4@2x.png","alt":"[得意]"},{"url":"5@2x.png","alt":"[流泪]"},{"url":"6@2x.png","alt":"[害羞]"},
|
||||
// {"url":"7@2x.png","alt":"[闭嘴]"},{"url":"8@2x.png","alt":"[睡]"},{"url":"9@2x.png","alt":"[大哭]"},{"url":"10@2x.png","alt":"[尴尬]"},{"url":"11@2x.png","alt":"[发怒]"},{"url":"12@2x.png","alt":"[调皮]"},{"url":"13@2x.png","alt":"[呲牙]"},
|
||||
// {"url":"14@2x.png","alt":"[微笑]"},{"url":"15@2x.png","alt":"[难过]"},{"url":"16@2x.png","alt":"[酷]"},{"url":"18@2x.png","alt":"[抓狂]"},{"url":"19@2x.png","alt":"[吐]"},{"url":"20@2x.png","alt":"[偷笑]"},{"url":"21@2x.png","alt":"[可爱]"},
|
||||
// {"url":"22@2x.png","alt":"[白眼]"},{"url":"23@2x.png","alt":"[傲慢]"},{"url":"24@2x.png","alt":"[饥饿]"},{"url":"25@2x.png","alt":"[困]"},{"url":"26@2x.png","alt":"[惊恐]"},{"url":"27@2x.png","alt":"[流汗]"},{"url":"28@2x.png","alt":"[憨笑]"},
|
||||
// {"url":"29@2x.png","alt":"[悠闲]"},{"url":"30@2x.png","alt":"[奋斗]"},{"url":"31@2x.png","alt":"[咒骂]"},{"url":"32@2x.png","alt":"[疑问]"},{"url":"33@2x.png","alt":"[嘘]"},{"url":"34@2x.png","alt":"[晕]"},{"url":"35@2x.png","alt":"[折磨]"},
|
||||
// {"url":"36@2x.png","alt":"[衰]"},{"url":"37@2x.png","alt":"[骷髅]"},{"url":"38@2x.png","alt":"[敲打]"},{"url":"39@2x.png","alt":"[再见]"},{"url":"46@2x.png","alt":"[猪头]"},{"url":"49@2x.png","alt":"[抱抱]"},{"url":"53@2x.png","alt":"[生日]"},
|
||||
// {"url":"54@2x.png","alt":"[闪电]"},{"url":"55@2x.png","alt":"[炸弹]"},{"url":"56@2x.png","alt":"[刀]"},{"url":"57@2x.png","alt":"[足球]"},{"url":"59@2x.png","alt":"[便便]"},{"url":"60@2x.png","alt":"[咖啡]"},{"url":"61@2x.png","alt":"[饭]"},
|
||||
// {"url":"62@2x.png","alt":"[药]"},{"url":"63@2x.png","alt":"[玫瑰]"},{"url":"64@2x.png","alt":"[凋谢]"},{"url":"66@2x.png","alt":"[爱心]"},{"url":"67@2x.png","alt":"[心碎]"},{"url":"69@2x.png","alt":"[礼物]"},{"url":"72@2x.png","alt":"[信封]"},
|
||||
// {"url":"74@2x.png","alt":"[太阳]"},{"url":"75@2x.png","alt":"[月亮]"},{"url":"76@2x.png","alt":"[赞]"},{"url":"77@2x.png","alt":"[踩]"},{"url":"78@2x.png","alt":"[握手]"},{"url":"79@2x.png","alt":"[胜利]"},{"url":"89@2x.png","alt":"[西瓜]"},
|
||||
// {"url":"90@2x.png","alt":"[下雨]"},{"url":"91@2x.png","alt":"[多云]"},{"url":"96@2x.png","alt":"[冷汗]"},{"url":"97@2x.png","alt":"[擦汗]"},{"url":"98@2x.png","alt":"[抠鼻]"},{"url":"99@2x.png","alt":"[鼓掌]"},{"url":"100@2x.png","alt":"[嗅大了]"},
|
||||
// {"url":"101@2x.png","alt":"[坏笑]"},{"url":"102@2x.png","alt":"[右哼哼]"},{"url":"103@2x.png","alt":"[左哼哼]"},{"url":"104@2x.png","alt":"[哈欠]"},{"url":"105@2x.png","alt":"[鄙视]"},{"url":"106@2x.png","alt":"[委屈]"},{"url":"107@2x.png","alt":"[快哭了]"},
|
||||
// {"url":"108@2x.png","alt":"[阴险]"},{"url":"109@2x.png","alt":"[亲亲]"},{"url":"110@2x.png","alt":"[吓]"},{"url":"111@2x.png","alt":"[可怜]"},{"url":"112@2x.png","alt":"[菜刀]"},{"url":"113@2x.png","alt":"[啤酒]"},{"url":"114@2x.png","alt":"[篮球]"},
|
||||
// {"url":"115@2x.png","alt":"[乒乓]"},{"url":"116@2x.png","alt":"[示爱]"},{"url":"117@2x.png","alt":"[瓢虫]"},{"url":"118@2x.png","alt":"[抱拳]"},{"url":"119@2x.png","alt":"[勾引]"},{"url":"120@2x.png","alt":"[拳头]"},{"url":"121@2x.png","alt":"[差劲]"},
|
||||
// {"url":"122@2x.png","alt":"[爱你]"},{"url":"123@2x.png","alt":"[NO]"},{"url":"124@2x.png","alt":"[OK]"},{"url":"136@2x.png","alt":"[双喜]"},{"url":"137@2x.png","alt":"[鞭炮]"},{"url":"138@2x.png","alt":"[灯笼]"},{"url":"139@2x.png","alt":"[麻将]"},
|
||||
// {"url":"140@2x.png","alt":"[唱歌]"},{"url":"141@2x.png","alt":"[包包]"},{"url":"142@2x.png","alt":"[信]"},{"url":"143@2x.png","alt":"[象棋]"},{"url":"144@2x.png","alt":"[礼物]"},{"url":"145@2x.png","alt":"[祈祷]"},{"url":"146@2x.png","alt":"[爆筋]"},
|
||||
// {"url":"147@2x.png","alt":"[棒棒糖]"},{"url":"148@2x.png","alt":"[喝奶]"},{"url":"149@2x.png","alt":"[吃面]"},{"url":"150@2x.png","alt":"[香蕉]"},{"url":"151@2x.png","alt":"[飞机]"},{"url":"152@2x.png","alt":"[汽车]"},{"url":"153@2x.png","alt":"[高铁]"},
|
||||
// {"url":"154@2x.png","alt":"[动车]"},{"url":"155@2x.png","alt":"[动车头]"},{"url":"156@2x.png","alt":"[多云]"},{"url":"157@2x.png","alt":"[下雨]"},{"url":"158@2x.png","alt":"[钞票]"},{"url":"159@2x.png","alt":"[熊猫]"},{"url":"160@2x.png","alt":"[电灯泡]"},
|
||||
// {"url":"161@2x.png","alt":"[七彩]"},{"url":"162@2x.png","alt":"[闹钟]"},{"url":"163@2x.png","alt":"[雨伞]"},{"url":"164@2x.png","alt":"[气球]"},{"url":"165@2x.png","alt":"[钻戒]"},{"url":"166@2x.png","alt":"[座椅]"},{"url":"167@2x.png","alt":"[纸巾]"},
|
||||
// {"url":"168@2x.png","alt":"[药丸]"},{"url":"169@2x.png","alt":"[手枪]"},{"url":"170@2x.png","alt":"[青蛙]"},{"url":"171@2x.png","alt":"[热汤]"},{"url":"172@2x.png","alt":"[眨眼睛]"},{"url":"173@2x.png","alt":"[泪奔]"},{"url":"174@2x.png","alt":"[无奈]"},
|
||||
// {"url":"175@2x.png","alt":"[卖萌]"},{"url":"176@2x.png","alt":"[小纠结]"},{"url":"177@2x.png","alt":"[喷血]"},{"url":"178@2x.png","alt":"[斜眼笑]"},{"url":"179@2x.png","alt":"[高傲]"},{"url":"180@2x.png","alt":"[惊喜]"},{"url":"181@2x.png","alt":"[骚扰]"},
|
||||
// {"url":"182@2x.png","alt":"[笑哭]"},{"url":"183@2x.png","alt":"[我最美]"},{"url":"184@2x.png","alt":"[河蟹]"},{"url":"185@2x.png","alt":"[羊驼]"},{"url":"186@2x.png","alt":"[板栗]"},{"url":"187@2x.png","alt":"[幽灵]"},{"url":"188@2x.png","alt":"[鸡蛋]"},
|
||||
// {"url":"189@2x.png","alt":"[魔方]"},{"url":"190@2x.png","alt":"[转花圈]"},{"url":"191@2x.png","alt":"[搓澡]"},{"url":"192@2x.png","alt":"[红包]"},{"url":"200@2x.png","alt":"[拜托]"},{"url":"201@2x.png","alt":"[点赞]"},{"url":"202@2x.png","alt":"[无聊]"},
|
||||
// {"url":"203@2x.png","alt":"[托脸]"},{"url":"204@2x.png","alt":"[吃]"},{"url":"205@2x.png","alt":"[送花]"},{"url":"206@2x.png","alt":"[害怕]"},{"url":"207@2x.png","alt":"[花痴]"},{"url":"208@2x.png","alt":"[小样儿]"},{"url":"210@2x.png","alt":"[飙泪]"},
|
||||
// {"url":"211@2x.png","alt":"[我不看]"},{"url":"212@2x.png","alt":"[托腮]"},{"url":"245@2x.png","alt":"[加油必胜]"},{"url":"246@2x.png","alt":"[抱抱]"},{"url":"247@2x.png","alt":"[白条]"},{"url":"260@2x.png","alt":"[白条]"},{"url":"261@2x.png","alt":"[搬砖中]"},
|
||||
// {"url":"262@2x.png","alt":"[脑壳疼]"},{"url":"263@2x.png","alt":"[沧桑]"},{"url":"264@2x.png","alt":"[捂脸]"},{"url":"265@2x.png","alt":"[辣眼睛]"},{"url":"266@2x.png","alt":"[哦呦]"},{"url":"267@2x.png","alt":"[头秃]"},{"url":"268@2x.png","alt":"[问号脸]"},
|
||||
// {"url":"269@2x.png","alt":"[暗中观察]"},{"url":"270@2x.png","alt":"[emm]"},{"url":"271@2x.png","alt":"[吃瓜]"},{"url":"272@2x.png","alt":"[呵呵哒]"},{"url":"273@2x.png","alt":"[白条]"},{"url":"274@2x.png","alt":"[白条]"},{"url":"newemoji_002.png","alt":"[好的]"},
|
||||
// {"url":"newemoji_003.png","alt":"[白眼]"},{"url":"newemoji_004.png","alt":"[鬼脸]"},{"url":"newemoji_005.png","alt":"[马赛克]"},{"url":"newemoji_006.png","alt":"[喝茶]"},{"url":"newemoji_007.png","alt":"[摸鱼]"},{"url":"newemoji_008.png","alt":"[大笑]"},{"url":"newemoji_009.png","alt":"[请滚]"},
|
||||
// {"url":"newemoji_010.png","alt":"[睁眼]"},{"url":"newemoji_011.png","alt":"[儿子乖]"},{"url":"newemoji_012.png","alt":"[脸疼]"},{"url":"newemoji_013.png","alt":"[考虑]"},{"url":"newemoji_014.png","alt":"[惊掉下巴]"},{"url":"newemoji_015.png","alt":"[遮眼]"},{"url":"newemoji_016.png","alt":"[比爱心]"},
|
||||
// {"url":"newemoji_017.png","alt":"[喝彩]"}
|
||||
// ]
|
||||
// export default emojiList;
|
|
@ -0,0 +1,289 @@
|
|||
var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
|
||||
var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
|
||||
var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; // Empty Elements - HTML 5
|
||||
|
||||
var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5
|
||||
// fixed by xxx 将 ins 标签从块级名单中移除
|
||||
|
||||
var block = makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); // Inline Elements - HTML 5
|
||||
|
||||
var inline = makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); // Elements that you can, intentionally, leave open
|
||||
// (and which close themselves)
|
||||
|
||||
var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled"
|
||||
|
||||
var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); // Special Elements (can contain anything)
|
||||
|
||||
var special = makeMap('script,style');
|
||||
function HTMLParser(html, handler) {
|
||||
var index;
|
||||
var chars;
|
||||
var match;
|
||||
var stack = [];
|
||||
var last = html;
|
||||
|
||||
stack.last = function () {
|
||||
return this[this.length - 1];
|
||||
};
|
||||
|
||||
while (html) {
|
||||
chars = true; // Make sure we're not in a script or style element
|
||||
|
||||
if (!stack.last() || !special[stack.last()]) {
|
||||
// Comment
|
||||
if (html.indexOf('<!--') == 0) {
|
||||
index = html.indexOf('-->');
|
||||
|
||||
if (index >= 0) {
|
||||
if (handler.comment) {
|
||||
handler.comment(html.substring(4, index));
|
||||
}
|
||||
|
||||
html = html.substring(index + 3);
|
||||
chars = false;
|
||||
} // end tag
|
||||
|
||||
} else if (html.indexOf('</') == 0) {
|
||||
match = html.match(endTag);
|
||||
|
||||
if (match) {
|
||||
html = html.substring(match[0].length);
|
||||
match[0].replace(endTag, parseEndTag);
|
||||
chars = false;
|
||||
} // start tag
|
||||
|
||||
} else if (html.indexOf('<') == 0) {
|
||||
match = html.match(startTag);
|
||||
|
||||
if (match) {
|
||||
html = html.substring(match[0].length);
|
||||
match[0].replace(startTag, parseStartTag);
|
||||
chars = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (chars) {
|
||||
index = html.indexOf('<');
|
||||
var text = index < 0 ? html : html.substring(0, index);
|
||||
html = index < 0 ? '' : html.substring(index);
|
||||
|
||||
if (handler.chars) {
|
||||
handler.chars(text);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
html = html.replace(new RegExp('([\\s\\S]*?)<\/' + stack.last() + '[^>]*>'), function (all, text) {
|
||||
text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, '$1$2');
|
||||
|
||||
if (handler.chars) {
|
||||
handler.chars(text);
|
||||
}
|
||||
|
||||
return '';
|
||||
});
|
||||
parseEndTag('', stack.last());
|
||||
}
|
||||
|
||||
if (html == last) {
|
||||
throw 'Parse Error: ' + html;
|
||||
}
|
||||
|
||||
last = html;
|
||||
} // Clean up any remaining tags
|
||||
|
||||
|
||||
parseEndTag();
|
||||
|
||||
function parseStartTag(tag, tagName, rest, unary) {
|
||||
tagName = tagName.toLowerCase();
|
||||
|
||||
if (block[tagName]) {
|
||||
while (stack.last() && inline[stack.last()]) {
|
||||
parseEndTag('', stack.last());
|
||||
}
|
||||
}
|
||||
|
||||
if (closeSelf[tagName] && stack.last() == tagName) {
|
||||
parseEndTag('', tagName);
|
||||
}
|
||||
|
||||
unary = empty[tagName] || !!unary;
|
||||
|
||||
if (!unary) {
|
||||
stack.push(tagName);
|
||||
}
|
||||
|
||||
if (handler.start) {
|
||||
var attrs = [];
|
||||
rest.replace(attr, function (match, name) {
|
||||
var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name] ? name : '';
|
||||
attrs.push({
|
||||
name: name,
|
||||
value: value,
|
||||
escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') // "
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
if (handler.start) {
|
||||
handler.start(tagName, attrs, unary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseEndTag(tag, tagName) {
|
||||
// If no tag name is provided, clean shop
|
||||
if (!tagName) {
|
||||
var pos = 0;
|
||||
} // Find the closest opened tag of the same type
|
||||
else {
|
||||
for (var pos = stack.length - 1; pos >= 0; pos--) {
|
||||
if (stack[pos] == tagName) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pos >= 0) {
|
||||
// Close all the open elements, up the stack
|
||||
for (var i = stack.length - 1; i >= pos; i--) {
|
||||
if (handler.end) {
|
||||
handler.end(stack[i]);
|
||||
}
|
||||
} // Remove the open elements from the stack
|
||||
|
||||
|
||||
stack.length = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function makeMap(str) {
|
||||
var obj = {};
|
||||
var items = str.split(',');
|
||||
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
obj[items[i]] = true;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function removeDOCTYPE(html) {
|
||||
return html.replace(/<\?xml.*\?>\n/, '').replace(/<!doctype.*>\n/, '').replace(/<!DOCTYPE.*>\n/, '');
|
||||
}
|
||||
|
||||
function parseAttrs(attrs) {
|
||||
return attrs.reduce(function (pre, attr) {
|
||||
var value = attr.value;
|
||||
var name = attr.name;
|
||||
|
||||
if (pre[name]) {
|
||||
pre[name] = pre[name] + " " + value;
|
||||
} else {
|
||||
pre[name] = value;
|
||||
}
|
||||
|
||||
return pre;
|
||||
}, {});
|
||||
}
|
||||
|
||||
function parseHtml(html) {
|
||||
html = removeDOCTYPE(html);
|
||||
var stacks = [];
|
||||
var results = {
|
||||
node: 'root',
|
||||
children: []
|
||||
};
|
||||
HTMLParser(html, {
|
||||
start: function start(tag, attrs, unary) {
|
||||
var node = {
|
||||
name: tag
|
||||
};
|
||||
|
||||
if (attrs.length !== 0) {
|
||||
node.attrs = parseAttrs(attrs);
|
||||
}
|
||||
|
||||
if (unary) {
|
||||
var parent = stacks[0] || results;
|
||||
|
||||
if (!parent.children) {
|
||||
parent.children = [];
|
||||
}
|
||||
|
||||
parent.children.push(node);
|
||||
} else {
|
||||
stacks.unshift(node);
|
||||
}
|
||||
},
|
||||
end: function end(tag) {
|
||||
var node = stacks.shift();
|
||||
if (node.name !== tag) console.error('invalid state: mismatch end tag');
|
||||
|
||||
if (stacks.length === 0) {
|
||||
results.children.push(node);
|
||||
} else {
|
||||
var parent = stacks[0];
|
||||
|
||||
if (!parent.children) {
|
||||
parent.children = [];
|
||||
}
|
||||
|
||||
parent.children.push(node);
|
||||
}
|
||||
},
|
||||
chars: function chars(text) {
|
||||
|
||||
var str = text
|
||||
var textArray = []
|
||||
for(let i=0;i<str.length;i++){
|
||||
let msg = {
|
||||
name: 'text',
|
||||
type: 'text',
|
||||
text: str[i]
|
||||
}
|
||||
textArray.push(msg);
|
||||
}
|
||||
|
||||
// var node = {
|
||||
// name: 'text',
|
||||
// type: 'text',
|
||||
// text: text
|
||||
// };
|
||||
|
||||
if (stacks.length === 0) {
|
||||
for(let i=0;i<textArray.length;i++){
|
||||
results.children.push(textArray[i]);
|
||||
}
|
||||
// results.children.push(node);
|
||||
} else {
|
||||
var parent = stacks[0];
|
||||
|
||||
if (!parent.children) {
|
||||
parent.children = [];
|
||||
}
|
||||
for(let i=0;i<textArray.length;i++){
|
||||
parent.children.push(textArray[i]);
|
||||
}
|
||||
// parent.children.push(node);
|
||||
}
|
||||
},
|
||||
comment: function comment(text) {
|
||||
var node = {
|
||||
node: 'comment',
|
||||
text: text
|
||||
};
|
||||
var parent = stacks[0];
|
||||
|
||||
if (!parent.children) {
|
||||
parent.children = [];
|
||||
}
|
||||
|
||||
parent.children.push(node);
|
||||
}
|
||||
});
|
||||
return results.children;
|
||||
}
|
||||
|
||||
export default parseHtml;
|
|
@ -0,0 +1,47 @@
|
|||
const getDate = function() {
|
||||
var date = new Date();
|
||||
|
||||
var year = date.getFullYear(); //年 ,从 Date 对象以四位数字返回年份
|
||||
var month = date.getMonth() + 1; //月 ,从 Date 对象返回月份 (0 ~ 11) ,date.getMonth()比实际月份少 1 个月
|
||||
var day = date.getDate(); //日 ,从 Date 对象返回一个月中的某一天 (1 ~ 31)
|
||||
|
||||
var hours = date.getHours(); //小时 ,返回 Date 对象的小时 (0 ~ 23)
|
||||
var minutes = date.getMinutes(); //分钟 ,返回 Date 对象的分钟 (0 ~ 59)
|
||||
var seconds = date.getSeconds(); //秒 ,返回 Date 对象的秒数 (0 ~ 59)
|
||||
|
||||
//获取当前系统时间
|
||||
var currentDate = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
||||
// alert(currentDate);
|
||||
|
||||
//修改月份格式
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
|
||||
//修改日期格式
|
||||
if (day >= 0 && day <= 9) {
|
||||
day = "0" + day;
|
||||
}
|
||||
|
||||
//修改小时格式
|
||||
if (hours >= 0 && hours <= 9) {
|
||||
hours = "0" + hours;
|
||||
}
|
||||
|
||||
//修改分钟格式
|
||||
if (minutes >= 0 && minutes <= 9) {
|
||||
minutes = "0" + minutes;
|
||||
}
|
||||
|
||||
//修改秒格式
|
||||
if (seconds >= 0 && seconds <= 9) {
|
||||
seconds = "0" + seconds;
|
||||
}
|
||||
|
||||
//获取当前系统时间 格式(yyyy-mm-dd hh:mm:ss)
|
||||
var currentFormatDate = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
||||
return currentFormatDate;
|
||||
}
|
||||
export default {
|
||||
getDate
|
||||
}
|
|
@ -0,0 +1,756 @@
|
|||
<template>
|
||||
<view>
|
||||
<!--
|
||||
注意:这是 H5、微信小程序界面,请勿和 new_index.nvue、index.nvue 混用
|
||||
|
||||
1. new_index.nvue、index.nvue这两个是App页面
|
||||
|
||||
2. 另外:data.js 是上一版本留下的假数据,这一版改成了 URL 请求了(如不需要可以删除,也可作为后端请求参考)
|
||||
|
||||
3. 请各位大神多多留手,我已经把请求内存开到最大了
|
||||
|
||||
4. 视频 id 切记是字符串类型 -->
|
||||
<image v-if="isShowAixin" src="@/static/img/index/aixining.png" :style="'position: fixed; margin-left: '+ aixinLeft +'px; margin-top: '+ aixinTop +'px; width: 70px; height: 65px; transform: rotate('+ Rotate +'deg);'"></image>
|
||||
<swiper :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px; background-color: #000000;'" :vertical="true" @animationfinish="animationfinish" @change="change" :current="current" :indicator-dots="false" :duration="duration">
|
||||
<swiper-item v-for="(list,index) in dataList" :key="index" style="height: 98%;">
|
||||
<view v-if="Math.abs(k-index)<=1">
|
||||
<view>
|
||||
<!--
|
||||
1.v-if:用于控制视频在节点的渲染数
|
||||
2.muted的默认值是 false,代表默认是禁音视频的
|
||||
3.http-cache默认开启视频缓存
|
||||
4.poster(封面(方案一)):这里的封面默认处理存储在阿里云的视频
|
||||
5.show-loading:这里默认去掉播放转圈的标志
|
||||
v-if="Math.abs(k-index)<=1"
|
||||
-->
|
||||
<video
|
||||
v-if="isShow"
|
||||
:id="list._id+''+index"
|
||||
:loop="true"
|
||||
:muted="list.isplay"
|
||||
:controls="false"
|
||||
:autoplay="true"
|
||||
:http-cache="f"
|
||||
:page-gesture="false"
|
||||
:show-fullscreen-btn="false"
|
||||
:show-loading="false"
|
||||
:show-center-play-btn="false"
|
||||
:enable-progress-gesture="false"
|
||||
:src="list.src"
|
||||
@ended="ended"
|
||||
@click="tapVideoHover(list.state,$event)"
|
||||
@timeupdate="timeupdate($event,index)"
|
||||
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px; background-color: #000000; z-index: 8;'"
|
||||
:poster="list.src+'?x-oss-process=video/snapshot,t_100,f_jpg'"
|
||||
></video>
|
||||
<!--
|
||||
1.这里是封面(方案二):这里的封面可以自定义。
|
||||
2.也在代码中做了批注,两种方案可以共存,不会相互影响。
|
||||
-->
|
||||
<image
|
||||
v-if="!list.playIng"
|
||||
:src="list.src+'?x-oss-process=video/snapshot,t_100,f_jpg'"
|
||||
:style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px; position: absolute; z-index: 6;'"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
</view>
|
||||
<!-- 播放状态:pause 的时候就会暂停 -->
|
||||
<view class="videoHover" @click="tapVideoHover(list.state,$event)" @touchstart="touchstartHover" :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;z-index:14;'">
|
||||
<image v-if="list.state=='pause'" class="playState" src="@/static/img/index/play.png"></image>
|
||||
</view>
|
||||
<view class="userInfo">
|
||||
<!-- 1.头像 -->
|
||||
<image @click="tozuozhe" class="userAvatar" :src="list.href" mode="aspectFill"></image>
|
||||
<!-- 2.点赞 -->
|
||||
<view class="list-view" @click="cLike(list.like);" style="opacity: 0.9; margin-top: 17px;">
|
||||
<image v-if="list.like" src="@/static/img/index/xin.png" style="width: 40px; height: 40px; position: absolute; right: 6px;"></image>
|
||||
<image v-if="!list.like" src="@/static/img/index/xin-2.png" style="width: 40px; height: 40px; position: absolute; right: 6px;"></image>
|
||||
<text style="color: #FFFFFF; margin-top: 5px; font-size: 14px; text-align: center; margin-top: 40px; font-weight: bold;" :class="{'likeNumActive':list.like}">{{list.like_n}}</text>
|
||||
</view>
|
||||
<!-- 3.评论 -->
|
||||
<view class="comment list-view" @click="toComment(index)" style="opacity: 0.9; margin-top: 17px;">
|
||||
<image src="@/static/img/index/liaotian-2.png" style="width: 35px; height: 35px; position: absolute; right: 7px;"></image>
|
||||
<text style="color: #FFFFFF; margin-top: 5px; font-size: 14px; font-weight: bold; text-align: center; margin-top: 40px;">{{list.sms_n}}</text>
|
||||
</view>
|
||||
<!-- 4.分享 -->
|
||||
<view class="list-view" @click="share" style="opacity: 0.9; margin-top: 17px;">
|
||||
<image src="@/static/img/index/share-fill.png" style="width: 40px; height: 40px; position: absolute; right: 5px;"></image>
|
||||
<text style="color: #FFFFFF; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px;">分享</text>
|
||||
</view>
|
||||
<view class="list-view" @click="dealVoice" style="margin-top: 17px;">
|
||||
<view style="width: 48px; height: 48px; border-radius: 50px; position: absolute; right: 2.5px;">
|
||||
<image :style="'width: 48px; height: 48px; border-radius: 50px; transform: rotate('+ rotates +'deg);'" src="@/static/img/index/bfq.png" mode="aspectFill"></image>
|
||||
<image v-if="showPlay" :style="'width: 30px; height: 30px; margin-top: 9px; margin-left: 9px; position: absolute; border-radius: 50px; transform: rotate('+ rotates +'deg);'" :src="list.href" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 最底下的文字部分 -->
|
||||
<view class="content">
|
||||
<text class="userName" :style="'width: '+ (windowWidth - 90) +'px;'">{{list.title}}</text><!-- i={{i}} -->
|
||||
<text class="words" :style="'width: '+ (windowWidth - 90) +'px;'">{{list.msg}}-{{k+1}}</text><!-- k={{k}} -->
|
||||
</view>
|
||||
<!-- 进度条 -->
|
||||
<view v-if="k === index" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend" :style="'width: '+ (windowWidth - (windowWidth*0.10)) +'px; margin-left: '+ (windowWidth * 0.05) +'px; height: 40px; position: absolute;bottom: 0px;margin-bottom: 6px;z-index: 14;'">
|
||||
<!-- 不拖动情况下 -->
|
||||
<view>
|
||||
<!-- 1.底部背景进度条 -->
|
||||
<view :style="'width: '+ (windowWidth - (windowWidth*0.10)) +'px; margin-top: 18px; height: 5px; border-radius: 10px; background-color: #999999; opacity: 0.6;'"></view>
|
||||
<!-- 2.播放的进度条 -->
|
||||
<view v-if="isTouch==false" :style="'width: '+ ((windowWidth - (windowWidth*0.10)) * progressBarPercent) +'px; position: absolute;top: 0; margin-top: 18px; height: 5px; border-radius: 10px; background-color: #e6e4e7; '"></view>
|
||||
<!-- -->
|
||||
<view v-if="isTouch==true" :style="'width: '+ (videoStartPositon + addPositon) +'px; position: absolute;top: 0; margin-top: 18px; height: 5px; border-radius: 10px; background-color: #e6e4e7; '"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<uni-popup type="bottom" ref="pinglun" @touchmove.stop.prevent="moveHandle">
|
||||
<view :style="'width: '+ windowWidth +'px; height: '+ (boxStyle.height/heightNum) +'px; background-color: #242424; border-top-left-radius: 10px; border-top-right-radius: 10px;'">
|
||||
<!--
|
||||
注意:
|
||||
deleteIOSHeight
|
||||
deleteAndroidHeight
|
||||
这两个参数用于控制评论等的高度
|
||||
-->
|
||||
<douyin-scrollview
|
||||
:Width="windowWidth"
|
||||
:Height="(boxStyle.height/1.23)"
|
||||
:deleteIOSHeight="36"
|
||||
:deleteAndroidHeight="15"
|
||||
@closeScrollview="closeScrollview"
|
||||
></douyin-scrollview>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import userList from '../new_index/data.js'//这个是假数据
|
||||
let audo = uni.createInnerAudioContext()
|
||||
audo.loop = true
|
||||
import douyinScrollview from '../../components/douyin-scrollview/douyin-scrollview.vue'
|
||||
export default {
|
||||
components:{
|
||||
douyinScrollview
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
windowWidth: 0,
|
||||
windowHeight: 0,
|
||||
platform: "",
|
||||
model: "",
|
||||
deleteHeight: 0,
|
||||
dataList: [],
|
||||
k: 0,
|
||||
oldVideo: "",
|
||||
voice: "",
|
||||
timeout: "",
|
||||
current: 0,
|
||||
boxStyle:{//视频,图片封面样式🌟💗
|
||||
'height': 0,
|
||||
'width': 0,
|
||||
},
|
||||
|
||||
videoID: "",
|
||||
isShow: false,
|
||||
|
||||
showPlay: false,//转轮显示控制
|
||||
rotates: 0,//转轮旋转角度
|
||||
rotateTime: "",//转轮递归事件控制
|
||||
xrotats: "",
|
||||
|
||||
mpcleartime: "",
|
||||
|
||||
isClick: false,
|
||||
|
||||
changeTimeout: "",
|
||||
mptime: 0,
|
||||
mpstartTime: 0,
|
||||
|
||||
duration: 500,
|
||||
// -- 进度条相关 -- start
|
||||
videoStartPositon: 0,
|
||||
progressBarPercent: 0,
|
||||
touchStartPosition: 0,
|
||||
addPositon: 0,
|
||||
timeduration: 0,
|
||||
isTouch: false,
|
||||
// -- 进度条相关 -- end
|
||||
// 引入评论 - 参数
|
||||
heightNum: 1.18,
|
||||
|
||||
// 双击点赞参数
|
||||
touchNum: 0,
|
||||
aixinLeft: 0,
|
||||
aixinTop: 0,
|
||||
isShowAixin: false,
|
||||
Rotate: 0,
|
||||
|
||||
isShow1: false,//控制渲染变量1
|
||||
isShow2: false,//控制渲染变量2 : 专门控制 uni-popup
|
||||
currents: 0,//用于左右滑动,0代表视频界面,1代表右滑界面🌟💗
|
||||
}
|
||||
},
|
||||
|
||||
watch:{
|
||||
async k(k,old_k){
|
||||
// console.log(k, old_k)
|
||||
this.progressBarPercent = 0;
|
||||
// #ifndef MP
|
||||
this.clearToTime();
|
||||
// #endif
|
||||
this.isShow = false
|
||||
this.dataList[old_k].playIng = false//如果视频暂停,就加载封面
|
||||
this.dataList[old_k].isplay = true
|
||||
this.dataList[old_k].state = 'pause'
|
||||
console.log('预留第' + (old_k + 1) + '个视频:' + this.dataList[old_k]._id+''+old_k)
|
||||
// 2.0版本已经去掉了下面这一句,视频不用暂停,只需要把声音禁止就行
|
||||
uni.createVideoContext(this.dataList[old_k]._id + '' + old_k,this).stop()//如果视频暂停,那么旧视频停止,这里的this.dataList[old_k]._id + '' + old_k,后面加 old_k 是为了每一个视频的 id 值不同,这样就可以大程度的避免串音问题
|
||||
console.log('已经暂停 --> 第' + (old_k + 1) + '个视频~')//提示
|
||||
this.dataList[k].state = 'play'
|
||||
this.isShow = true
|
||||
this.xrotats = setTimeout(()=>{
|
||||
this.showPlay = true;
|
||||
// #ifndef MP
|
||||
this.rotateX();
|
||||
// #endif
|
||||
},200)
|
||||
// #ifdef MP
|
||||
// 如果是小程序端
|
||||
clearTimeout(this.changeTimeout);
|
||||
this.dataList[k].isplay = false
|
||||
setTimeout(()=>{
|
||||
this.dataList[k].playIng = true
|
||||
},250)
|
||||
if(this.mptime < 0.2){
|
||||
this.changeTimeout = setTimeout(()=>{
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play()
|
||||
},1400)
|
||||
} else {
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play()
|
||||
}
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
this.dataList[k].isplay = true
|
||||
audo.src = this.dataList[k].src
|
||||
if(this.isClick){
|
||||
setTimeout(()=>{
|
||||
if (typeof WeixinJSBridge == "undefined") {
|
||||
setTimeout(()=>{
|
||||
audo.play()
|
||||
uni.createVideoContext(this.dataList[k]._id+''+k,this).seek(0)
|
||||
uni.createVideoContext(this.dataList[k]._id+''+k,this).play()
|
||||
setTimeout(()=>{
|
||||
this.dataList[k].playIng = true
|
||||
},650)
|
||||
},500)
|
||||
} else {
|
||||
WeixinJSBridge.invoke('getNetworkType', {}, e => {
|
||||
setTimeout(()=>{
|
||||
audo.play()
|
||||
uni.createVideoContext(this.dataList[k]._id+''+k,this).seek(0)
|
||||
uni.createVideoContext(this.dataList[k]._id+''+k,this).play()
|
||||
setTimeout(()=>{
|
||||
this.dataList[k].playIng = true
|
||||
},850)
|
||||
},200)
|
||||
})
|
||||
}
|
||||
},200)
|
||||
} else {
|
||||
audo.pause()
|
||||
this.dataList[k].state = 'pause'
|
||||
uni.createVideoContext(this.dataList[k]._id+''+k,this).seek(0)
|
||||
uni.createVideoContext(this.dataList[k]._id+''+k,this).pause()
|
||||
}
|
||||
// #endif
|
||||
var p = k+1;
|
||||
console.log('预加载第' + (p + 1) + '个视频:' + this.dataList[p]._id+''+p)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.platform = uni.getSystemInfoSync().platform
|
||||
this.model = uni.getSystemInfoSync().model
|
||||
var model = this.model
|
||||
if(this.platform == 'ios' && (model !== 'iPhone6' || model !== 'iPhone6s' || model !== 'iPhone7' || model !== 'iPhone8')){
|
||||
this.deleteHeight = 0//有 tabbar的 修改这里可以改变视频高度
|
||||
}
|
||||
this.windowWidth = uni.getSystemInfoSync().windowWidth
|
||||
this.windowHeight = uni.getSystemInfoSync().windowHeight
|
||||
this.boxStyle.width = this.windowWidth + 'px'//给宽度加px
|
||||
this.boxStyle.height = this.windowHeight - this.deleteHeight;//有 tabbar的 修改这里可以改变视频高度
|
||||
this.get() //刚进入页面加载数据
|
||||
// #ifndef MP
|
||||
this.rotateX();
|
||||
// #endif
|
||||
},
|
||||
onShow(){
|
||||
console.log('回到前台');
|
||||
if(this.dataList.length !== 0){
|
||||
// #ifdef MP
|
||||
this.dataList[this.k].state = 'play';
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play()
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
if(this.isClick){
|
||||
this.dataList[this.k].state = 'play';
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play()
|
||||
audo.play()
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
onHide(){
|
||||
// #ifdef MP
|
||||
this.dataList[this.k].state = 'pause';
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).pause()
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
if(this.isClick){
|
||||
this.dataList[this.k].state = 'pause';
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).pause()
|
||||
audo.pause()
|
||||
}
|
||||
// #endif
|
||||
console.log('到后台');
|
||||
},
|
||||
methods: {
|
||||
closeScrollview(){
|
||||
// 点击评论里面的叉叉,就会关闭评论
|
||||
this.$refs.pinglun.close('bottom');
|
||||
},
|
||||
onTabItemTaps() {
|
||||
if (uni.getSystemInfoSync().platform == "ios") {
|
||||
let UIImpactFeedbackGenerator = plus.ios.importClass('UIImpactFeedbackGenerator');
|
||||
let impact = new UIImpactFeedbackGenerator();
|
||||
impact.prepare();
|
||||
impact.init(1);
|
||||
impact.impactOccurred();
|
||||
}
|
||||
if (uni.getSystemInfoSync().platform == "android") {
|
||||
uni.vibrateShort({
|
||||
success: () => {
|
||||
console.log('点击震动');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 双击点赞效果
|
||||
touchstartHover(event){
|
||||
if(this.touchNum >= 1){
|
||||
// console.log('双击 -- X坐标:'+ event.touches[0].screenX);
|
||||
// console.log('双击 -- Y坐标:'+ event.touches[0].screenY);
|
||||
this.aixinLeft = event.touches[0].screenX - 50;
|
||||
this.aixinTop = event.touches[0].screenY - 50;
|
||||
this.isShowAixin = true;
|
||||
let max = 40; let min = -40;
|
||||
this.Rotate = Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
setTimeout(()=>{
|
||||
this.isShowAixin = false;
|
||||
},700)
|
||||
this.onTabItemTaps();
|
||||
}
|
||||
},
|
||||
tozuozhe(){
|
||||
this.currents = 1//点击头像以后就会切换
|
||||
},
|
||||
mpTouchend(){
|
||||
this.mptime = (new Date()/1000) - this.mpstartTime;
|
||||
},
|
||||
mpTouchstart(){
|
||||
this.mpstartTime = (new Date()/1000);
|
||||
},
|
||||
dealVoice(){
|
||||
uni.showToast({
|
||||
title: '处理声音',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
clearToTime(){
|
||||
//清理定时器
|
||||
for(let i=0;i<20;i++){
|
||||
clearTimeout(this.rotateTime);
|
||||
clearTimeout(this.xrotats);
|
||||
this.showPlay = false;
|
||||
this.rotates = 0;
|
||||
}
|
||||
},
|
||||
clearTime(){
|
||||
//清理定时器
|
||||
for(let i=0;i<20;i++){
|
||||
clearTimeout(this.rotateTime);
|
||||
clearTimeout(this.xrotats);
|
||||
}
|
||||
},
|
||||
rotateX(){
|
||||
// clearTimeout(this.rotateTime);
|
||||
this.rotateTime = setTimeout(()=>{
|
||||
this.rotateX();
|
||||
this.showPlay = true;
|
||||
this.rotates += 1;
|
||||
},30)
|
||||
},
|
||||
|
||||
ended(){
|
||||
// 1.播放当前视频结束时触发,自动切换下一个视频
|
||||
// this.current = this.k+1
|
||||
},
|
||||
// ---- 进度条相关 --- start
|
||||
touchstart(e){
|
||||
this.isTouch = true;
|
||||
// #ifdef H5
|
||||
if(this.isTouch == true){
|
||||
this.addPositon = 0;
|
||||
console.log("touchstart",this.windowWidth);
|
||||
this.videoStartPositon = (this.windowWidth - (this.windowWidth*0.10)) * this.progressBarPercent;
|
||||
this.touchStartPosition = e.changedTouches[0].clientX;
|
||||
}
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
this.addPositon = 0;
|
||||
this.videoStartPositon = (this.windowWidth - (this.windowWidth*0.10)) * this.progressBarPercent;
|
||||
this.touchStartPosition = e.changedTouches[0].clientX;
|
||||
// #endif
|
||||
},
|
||||
touchmove(e){
|
||||
console.log("touchmove",e);
|
||||
// #ifdef H5
|
||||
if(this.isTouch == true){
|
||||
let num = e.changedTouches[0].clientX - this.touchStartPosition;
|
||||
if((this.videoStartPositon + num) <= (this.windowWidth - (this.windowWidth*0.10))) {
|
||||
this.addPositon = e.changedTouches[0].clientX - this.touchStartPosition;
|
||||
} else {
|
||||
this.addPositon = 0;
|
||||
this.videoStartPositon = (this.windowWidth - (this.windowWidth*0.10));
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
let num = e.changedTouches[0].clientX - this.touchStartPosition;
|
||||
if((this.videoStartPositon + num) <= (this.windowWidth - (this.windowWidth*0.10))) {
|
||||
this.addPositon = e.changedTouches[0].clientX - this.touchStartPosition;
|
||||
} else {
|
||||
this.addPositon = 0;
|
||||
this.videoStartPositon = (this.windowWidth - (this.windowWidth*0.10));
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
touchend(e){
|
||||
// #ifdef H5
|
||||
if(this.isClick){
|
||||
let per = Number( (this.videoStartPositon+this.addPositon) / (this.windowWidth - (this.windowWidth*0.10)) );
|
||||
let timeSubmit = parseInt( this.timeduration * per )
|
||||
audo.seek(timeSubmit)
|
||||
audo.play()
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).seek(timeSubmit)
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play()
|
||||
this.dataList[this.k].state = 'play'
|
||||
setTimeout(()=>{
|
||||
this.isTouch = false;
|
||||
},500)
|
||||
}
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
let per = Number( (this.videoStartPositon+this.addPositon) / (this.windowWidth - (this.windowWidth*0.10)) );
|
||||
let timeSubmit = parseInt( this.timeduration * per )
|
||||
audo.seek(timeSubmit)
|
||||
audo.play()
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).seek(timeSubmit)
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play()
|
||||
setTimeout(()=>{
|
||||
this.isTouch = false;
|
||||
},500)
|
||||
// #endif
|
||||
},
|
||||
timeupdate(event,index){
|
||||
// 触发进度条更新
|
||||
// console.log(event,index);
|
||||
if(index === this.k){
|
||||
this.timeduration = event.detail.duration;
|
||||
this.progressBarPercent = parseFloat( Number( event.detail.currentTime / event.detail.duration ) );
|
||||
}
|
||||
},
|
||||
// ---- 进度条相关 --- ending
|
||||
doubleLike(){
|
||||
if(this.dataList[this.k].like == false){
|
||||
this.dataList[this.k].like_n += 1;
|
||||
this.dataList[this.k].like = true;
|
||||
}
|
||||
/*
|
||||
点赞
|
||||
*/
|
||||
},
|
||||
//点击播放&&暂停
|
||||
tapVideoHover(state,event){
|
||||
this.dataList[this.k].isShowimage = false
|
||||
this.dataList[this.k].isShowProgressBarTime = false
|
||||
this.ProgressBarOpacity = 0.5
|
||||
this.dotWidth = 0
|
||||
console.log('state--',state);
|
||||
// 1.启用双击点赞 --- start
|
||||
this.touchNum++;
|
||||
setTimeout(()=>{
|
||||
if(this.touchNum == 1){
|
||||
if(state=='play'||state=='continue'){
|
||||
this.dataList[this.k].state = 'pause';
|
||||
}else{
|
||||
this.dataList[this.k].state = 'continue';
|
||||
}
|
||||
if(this.dataList[this.k].state == 'continue'){
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play();//暂停以后继续播放
|
||||
this.clearTime();
|
||||
setTimeout(()=>{
|
||||
this.rotateX();
|
||||
},50)
|
||||
}
|
||||
if(this.dataList[this.k].state == 'pause'){
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).pause();//暂停以后继续播放
|
||||
this.clearTime();
|
||||
}
|
||||
}
|
||||
if(this.touchNum >= 2){
|
||||
this.doubleLike();
|
||||
}
|
||||
this.touchNum = 0;
|
||||
},200)
|
||||
// --------------- ending
|
||||
// 2. 不启用双击点赞 start
|
||||
// if(state=='play'||state=='continue'){
|
||||
// this.dataList[this.k].state = 'pause';
|
||||
// }else{
|
||||
// this.dataList[this.k].state = 'continue';
|
||||
// }
|
||||
// if(this.dataList[this.k].state == 'continue'){
|
||||
// uni.createVideoContext(this.dataList[this.k]._id,this).play();//暂停以后继续播放
|
||||
// }
|
||||
// if(this.dataList[this.k].state == 'pause'){
|
||||
// uni.createVideoContext(this.dataList[this.k]._id,this).pause();//暂停以后继续播放
|
||||
// }
|
||||
// --------------- ending
|
||||
},
|
||||
//点击播放&&暂停
|
||||
tapVideoHovers(state,event){
|
||||
console.log('state--',state);
|
||||
if(state=='play'||state=='continue'){
|
||||
this.dataList[this.k].state = 'pause';
|
||||
}else{
|
||||
this.dataList[this.k].state = 'continue';
|
||||
}
|
||||
if(this.dataList[this.k].state == 'continue'){
|
||||
this.isClick = true;
|
||||
this.dataList[this.k].playIng = true
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play();//暂停以后继续播放
|
||||
// #ifdef MP
|
||||
this.dataList[this.k].isplay = false
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
audo.play()
|
||||
// #endif
|
||||
}
|
||||
if(this.dataList[this.k].state == 'pause'){
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).pause();//暂停以后继续播放
|
||||
// #ifdef MP
|
||||
this.dataList[this.k].isplay = true
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
audo.pause()
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
change(event){
|
||||
this.k = event.detail.current
|
||||
},
|
||||
animationfinish(event){
|
||||
// 1.这里进行判断,如果是最后一个视频就进入 get() 方法加载视频进入列表
|
||||
if(this.k == this.dataList.length - 1){
|
||||
this.GET()
|
||||
}
|
||||
},
|
||||
//每一组结束时新的请求
|
||||
GET(){
|
||||
uni.request({
|
||||
url: 'https://bdb24c6d-8c19-4f80-8e7e-c9c9f037f131.bspapp.com/video',
|
||||
method: 'POST',
|
||||
data:{
|
||||
info: 'get_video'
|
||||
},
|
||||
success: (res) => {
|
||||
var msg = res.data.data
|
||||
// 2.这里把视频添加到视频列表
|
||||
for (let i = 0; i < msg.length; i++) {
|
||||
this.dataList.push(msg[i])
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
get(){
|
||||
// 1.这里引入后端请求数据
|
||||
// var msg = userList
|
||||
uni.request({
|
||||
url: 'https://bdb24c6d-8c19-4f80-8e7e-c9c9f037f131.bspapp.com/video',
|
||||
method: 'POST',
|
||||
data:{
|
||||
info: 'get_video'
|
||||
},
|
||||
success: (res) => {
|
||||
this.isShow = false;
|
||||
var msg = res.data.data
|
||||
// 2.这里把视频添加到视频列表
|
||||
for (let i = 0; i < msg.length; i++) {
|
||||
this.dataList.push(msg[i])
|
||||
}
|
||||
// 3.播放当前视频
|
||||
setTimeout(()=>{
|
||||
this.isShow = true;
|
||||
// #ifdef H5
|
||||
this.dataList[this.k].isplay = true
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
// 如果是小程序端
|
||||
this.dataList[this.k].isplay = false
|
||||
this.dataList[this.k].state = 'play'
|
||||
// #endif
|
||||
this.dataList[this.k].playIng = true
|
||||
setTimeout(()=>{
|
||||
// #ifdef H5
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).seek(0)
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).pause()
|
||||
this.dataList[this.k].state = 'pause';
|
||||
audo.src = this.dataList[this.k].src;
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
uni.createVideoContext(this.dataList[this.k]._id+''+this.k,this).play()
|
||||
// #endif
|
||||
},500)
|
||||
},200)
|
||||
this.videoID = this.dataList[this.k]._id
|
||||
}
|
||||
})
|
||||
},
|
||||
share(){
|
||||
uni.showToast({
|
||||
title: '分享',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
toComment(index){
|
||||
// 注意点击评论之后会执行这里
|
||||
/*
|
||||
(1)先加载缓冲
|
||||
(2)获取当前视频 ID 信息
|
||||
(3)🌟🌟🌟🌟重要🌟🌟🌟🌟
|
||||
- 一定要记得看 index.vue 里面
|
||||
uni.setStorageSync("user",this.peopleList[i]);
|
||||
这个东西,用于存储当前用户信息。在 插件里面会使用到这个东西,
|
||||
记得写一下。
|
||||
|
||||
(4)打开评论
|
||||
*/
|
||||
uni.showToast({
|
||||
title: '加载中...',
|
||||
icon: 'none',
|
||||
position: 'bottom',
|
||||
duration: 300
|
||||
})
|
||||
uni.setStorageSync("videoID",this.dataList[index]._id);
|
||||
this.videoID = this.dataList[index]._id;
|
||||
this.$refs.pinglun.open('bottom')
|
||||
},
|
||||
cLike(sss){
|
||||
this.dataList[this.k].like = !this.dataList[this.k].like
|
||||
const video = this.dataList[this.k];
|
||||
sss?video.like_n -= 1:video.like_n += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.list-view{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.container {background-color: #000000;}
|
||||
.item {
|
||||
/* width : 750rpx; */
|
||||
background-color: #000000;
|
||||
position: relative;
|
||||
}
|
||||
.videoHover{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
flex: 1;
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
/* border-style: dashed;
|
||||
border-color: #DD524D;
|
||||
border-width: 1px; */
|
||||
}
|
||||
.playState{
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
opacity: 0.2;
|
||||
}
|
||||
.userInfo{
|
||||
position: absolute;
|
||||
bottom:110px;
|
||||
right: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 18;
|
||||
}
|
||||
.userAvatar{
|
||||
border-radius: 500%;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: #ffffff;
|
||||
}
|
||||
.userAvatar{
|
||||
width : 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
.likeIco,.shareIco,.commentIco{
|
||||
width : 60rpx;
|
||||
height: 60rpx;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.likeNum,.commentNum,.shareTex{
|
||||
color: #ffffff;
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
margin: 5px;
|
||||
}
|
||||
.likeNumActive{
|
||||
color: red;
|
||||
}
|
||||
.content{
|
||||
width: 620rpx;
|
||||
z-index: 99;
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
/* justify-content: center; */
|
||||
padding: 15rpx;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
color: #ffffff;
|
||||
z-index: 12;
|
||||
/* background-color: aqua; */
|
||||
}
|
||||
.userName {
|
||||
font-size: 30rpx;
|
||||
color: #ffffff;
|
||||
margin-top: 80upx;
|
||||
}
|
||||
.words {
|
||||
margin-top: 10rpx;
|
||||
font-size: 30rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.root{
|
||||
background-color: #000000;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,451 @@
|
|||
<template>
|
||||
<view style="height: 100vh;flex:1;width:100%">
|
||||
<view class="com-line">
|
||||
<image style="width: 380rpx; height: 330rpx;" src="../../static/coming.png" mode=""></image>
|
||||
<view class="com-text">系统建设中,敬请期待!</view>
|
||||
</view>
|
||||
<!-- v-if="videoShow==true" -->
|
||||
<swiper v-if="videoShow==true" @animationfinish="qiehuan" :current="activeIndex" @change="swiper" :circular="index==0?true:false" vertical
|
||||
class="list">
|
||||
<swiper-item disable-programmatic-animation class="item" v-for="(item,index) in list" :key="index">
|
||||
<video @ended="end" @pause='item.active=false' @click="pause(item,index)"
|
||||
@timeupdate="long($event,item,index)" :id="'Video'+index" class="video"
|
||||
:show-center-play-btn='false' :controls="false" object-fit="cover" :autoplay='false' loop
|
||||
src="https://media.w3.org/2010/05/sintel/trailer.mp4">
|
||||
<cover-view class="back" v-if="item.active==false">
|
||||
<cover-image class="pauseIcon" src="../../static/bofang.png"></cover-image>
|
||||
</cover-view>
|
||||
<cover-view class="iconList">
|
||||
<cover-view class="iconListClass">
|
||||
<cover-image class="icon" src="../../static/dituzhaoren3.png"></cover-image>
|
||||
<cover-view>
|
||||
<text class="context">12.5w</text>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="iconListClass">
|
||||
<cover-image class="icon" src="../../static/dituzhaoren4.png"></cover-image>
|
||||
<cover-view>
|
||||
<text class="context">12.5w</text>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="iconListClass">
|
||||
<cover-image class="icon" src="../../static/dituzhaoren4.png"></cover-image>
|
||||
<cover-view style="white-space: nowrap;lines:1;">
|
||||
<text class="context">12.5w</text>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="formation">
|
||||
<cover-view style="display: flex;align-items: center;flex-direction: row;">
|
||||
<cover-image class="header"
|
||||
src="https://i02piccdn.sogoucdn.com/a977a5bc3f44ffcf"></cover-image>
|
||||
<cover-view>
|
||||
<text class="context">作者</text>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<cover-view>
|
||||
<text class="title">标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题</text>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="duration">
|
||||
<cover-view class="long" :style="{width:item.percent+'rpx'}"></cover-view>
|
||||
</cover-view>
|
||||
</video>
|
||||
</swiper-item>
|
||||
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
videoShow:false,
|
||||
// 视频下标,记录播放到第几个
|
||||
index: 0,
|
||||
// 数据
|
||||
allList: [{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 0
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 2
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 3
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 4
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 5
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 6
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 7
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 8
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 9
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 10
|
||||
},
|
||||
],
|
||||
list: [{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 0
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
src: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
||||
active: false,
|
||||
currentTime: 0,
|
||||
duration: 121,
|
||||
percent: 0,
|
||||
id: 2
|
||||
},
|
||||
],
|
||||
// 播放器下标
|
||||
activeIndex: 0,
|
||||
// 记录上一个播放器下标
|
||||
oldActiveIndex: 0,
|
||||
page:1,
|
||||
limit:10,
|
||||
}
|
||||
},
|
||||
onReady() {},
|
||||
onLoad() {
|
||||
this.jiukou()
|
||||
},
|
||||
methods: {
|
||||
jiukou(){
|
||||
var data={
|
||||
page:1,
|
||||
limit:10,
|
||||
// id:'1',
|
||||
shipinquanId:'1'
|
||||
}
|
||||
uni.request({
|
||||
url: 'https://bdb24c6d-8c19-4f80-8e7e-c9c9f037f131.bspapp.com/video',
|
||||
method: 'POST',
|
||||
data:{
|
||||
info: 'get_video'
|
||||
},
|
||||
success: (res) => {
|
||||
var msg = res.data.data
|
||||
}
|
||||
})
|
||||
// this.$Request.getT('/app/shipinquan/list',data).then(res => {
|
||||
// if (res.code == 0) {
|
||||
// }
|
||||
// });
|
||||
// this.$Request.post('/app/shipinquan/add',data).then(res => {
|
||||
// if (res.code == 0) {
|
||||
// }
|
||||
// });
|
||||
// this.$Request.post('/app/shipinquan/delete',data).then(res => {
|
||||
// if (res.code == 0) {
|
||||
// }
|
||||
// });
|
||||
// this.$Request.post('/app/shipinquan/addContent',data).then(res => {
|
||||
// if (res.code == 0) {
|
||||
// }
|
||||
// });
|
||||
// this.$Request.getT('/app/shipinquan/contentlist',data).then(res => {
|
||||
// if (res.code == 0) {
|
||||
// }
|
||||
// });
|
||||
},
|
||||
qiehuan(e) {
|
||||
if (this.oldActiveIndex < e.detail.current) {
|
||||
if (this.oldActiveIndex - e.detail.current != -2) {
|
||||
console.log('上滑');
|
||||
this.index++
|
||||
this.next(e.detail.current)
|
||||
} else {
|
||||
console.log("下滑");
|
||||
this.pre(e.detail.current)
|
||||
this.index--
|
||||
}
|
||||
} else if (this.oldActiveIndex > e.detail.current) {
|
||||
if (this.oldActiveIndex - e.detail.current != 2) {
|
||||
console.log('下滑');
|
||||
this.pre(e.detail.current)
|
||||
this.index--
|
||||
} else {
|
||||
console.log("上滑");
|
||||
this.index++
|
||||
this.next(e.detail.current)
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.oldActiveIndex = e.detail.current
|
||||
})
|
||||
},
|
||||
next(index) {
|
||||
if (Object.is(this.index, 2)) {
|
||||
}
|
||||
if (Object.is(index, 0)) {
|
||||
this.list[1] = this.allList[this.index + 1]
|
||||
}
|
||||
if (Object.is(index, 1)) {
|
||||
this.list[2] = this.allList[this.index + 1]
|
||||
}
|
||||
if (Object.is(index, 2)) {
|
||||
this.list[0] = this.allList[this.index + 1]
|
||||
}
|
||||
this.play(this.activeIndex)
|
||||
},
|
||||
pre(index) {
|
||||
if (Object.is(this.index, 2)) {
|
||||
}
|
||||
if (Object.is(index, 0)) {
|
||||
this.list[2] = this.allList[this.index - 2]
|
||||
}
|
||||
if (Object.is(index, 1)) {
|
||||
this.list[0] = this.allList[this.index - 2]
|
||||
}
|
||||
if (Object.is(index, 2)) {
|
||||
this.list[1] = this.allList[this.index - 2]
|
||||
}
|
||||
this.play(this.activeIndex)
|
||||
},
|
||||
play(index) {
|
||||
for (let i = 0; i < 3; i++) {
|
||||
uni.createVideoContext(`Video${i}`, this).pause()
|
||||
}
|
||||
this.videoContext = uni.createVideoContext('Video' + index, this)
|
||||
this.list[index].active = true
|
||||
this.videoContext.play()
|
||||
},
|
||||
swiper(e) {
|
||||
// console.log(e.detail.current);
|
||||
this.activeIndex = e.detail.current
|
||||
// this.play(e.detail.current)
|
||||
// this.play(this.activeIndex)
|
||||
},
|
||||
end(e) {
|
||||
this.activeIndex++
|
||||
if (Object.is(this.activeIndex, 3)) {
|
||||
this.activeIndex = 0
|
||||
}
|
||||
},
|
||||
long(e, item, index) {
|
||||
item.currentTime = e.detail.currentTime
|
||||
item.percent = (e.detail.currentTime / e.detail.duration) * 750
|
||||
},
|
||||
pause(item, index) {
|
||||
this.videoContext = uni.createVideoContext('Video' + index, this)
|
||||
if (item.active) {
|
||||
this.videoContext.pause()
|
||||
} else {
|
||||
this.videoContext.play()
|
||||
}
|
||||
this.list[index].active = !this.list[index].active
|
||||
},
|
||||
videoClick() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.com-line{
|
||||
width:80%;
|
||||
margin: 45% auto;
|
||||
text-align: center;
|
||||
}
|
||||
.com-text{
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
.list {
|
||||
background-color: black;
|
||||
flex: 1;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.video {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
.back {
|
||||
background-color: rgba(225, 225, 225, 0.3);
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pauseIcon {
|
||||
position: absolute;
|
||||
left: calc(50% - 25px);
|
||||
top: calc(50% - 30px);
|
||||
width: 50px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.duration {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
bottom: 0px;
|
||||
width: 100vw;
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
.long {
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.formation {
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
width: calc(100% - 80px);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.header {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.iconListClass {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.context {
|
||||
white-space: nowrap;
|
||||
width: 100rpx;
|
||||
color: white;
|
||||
margin-left: 5px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 600rpx;
|
||||
margin-top: 10px;
|
||||
color: white;
|
||||
margin-left: 5px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
lines: 1;
|
||||
}
|
||||
|
||||
|
||||
.iconList {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 161px;
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
margin-top: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
/deep/.uni-cover-view{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.context {
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.4 KiB |