增加前端文件

This commit is contained in:
fang 2025-03-24 21:52:49 +08:00
parent 3a1d4dec4f
commit 1308b192aa
182 changed files with 21836 additions and 0 deletions

38
.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
nginx-1.18.0/nginx.exe
nginx-1.18.0/logs/
nginx-1.18.0/temp
nginx-1.18.0/docs

View File

@ -0,0 +1,26 @@
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

View File

@ -0,0 +1,25 @@
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

109
nginx-1.18.0/conf/koi-utf Normal file
View File

@ -0,0 +1,109 @@
# This map is not a full koi8-r <> utf8 map: it does not contain
# box-drawing and some other characters. Besides this map contains
# several koi8-u and Byelorussian letters which are not in koi8-r.
# If you need a full and standard map, use contrib/unicode2nginx/koi-utf
# map instead.
charset_map koi8-r utf-8 {
80 E282AC ; # euro
95 E280A2 ; # bullet
9A C2A0 ; # &nbsp;
9E C2B7 ; # &middot;
A3 D191 ; # small yo
A4 D194 ; # small Ukrainian ye
A6 D196 ; # small Ukrainian i
A7 D197 ; # small Ukrainian yi
AD D291 ; # small Ukrainian soft g
AE D19E ; # small Byelorussian short u
B0 C2B0 ; # &deg;
B3 D081 ; # capital YO
B4 D084 ; # capital Ukrainian YE
B6 D086 ; # capital Ukrainian I
B7 D087 ; # capital Ukrainian YI
B9 E28496 ; # numero sign
BD D290 ; # capital Ukrainian soft G
BE D18E ; # capital Byelorussian short U
BF C2A9 ; # (C)
C0 D18E ; # small yu
C1 D0B0 ; # small a
C2 D0B1 ; # small b
C3 D186 ; # small ts
C4 D0B4 ; # small d
C5 D0B5 ; # small ye
C6 D184 ; # small f
C7 D0B3 ; # small g
C8 D185 ; # small kh
C9 D0B8 ; # small i
CA D0B9 ; # small j
CB D0BA ; # small k
CC D0BB ; # small l
CD D0BC ; # small m
CE D0BD ; # small n
CF D0BE ; # small o
D0 D0BF ; # small p
D1 D18F ; # small ya
D2 D180 ; # small r
D3 D181 ; # small s
D4 D182 ; # small t
D5 D183 ; # small u
D6 D0B6 ; # small zh
D7 D0B2 ; # small v
D8 D18C ; # small soft sign
D9 D18B ; # small y
DA D0B7 ; # small z
DB D188 ; # small sh
DC D18D ; # small e
DD D189 ; # small shch
DE D187 ; # small ch
DF D18A ; # small hard sign
E0 D0AE ; # capital YU
E1 D090 ; # capital A
E2 D091 ; # capital B
E3 D0A6 ; # capital TS
E4 D094 ; # capital D
E5 D095 ; # capital YE
E6 D0A4 ; # capital F
E7 D093 ; # capital G
E8 D0A5 ; # capital KH
E9 D098 ; # capital I
EA D099 ; # capital J
EB D09A ; # capital K
EC D09B ; # capital L
ED D09C ; # capital M
EE D09D ; # capital N
EF D09E ; # capital O
F0 D09F ; # capital P
F1 D0AF ; # capital YA
F2 D0A0 ; # capital R
F3 D0A1 ; # capital S
F4 D0A2 ; # capital T
F5 D0A3 ; # capital U
F6 D096 ; # capital ZH
F7 D092 ; # capital V
F8 D0AC ; # capital soft sign
F9 D0AB ; # capital Y
FA D097 ; # capital Z
FB D0A8 ; # capital SH
FC D0AD ; # capital E
FD D0A9 ; # capital SHCH
FE D0A7 ; # capital CH
FF D0AA ; # capital hard sign
}

103
nginx-1.18.0/conf/koi-win Normal file
View File

@ -0,0 +1,103 @@
charset_map koi8-r windows-1251 {
80 88 ; # euro
95 95 ; # bullet
9A A0 ; # &nbsp;
9E B7 ; # &middot;
A3 B8 ; # small yo
A4 BA ; # small Ukrainian ye
A6 B3 ; # small Ukrainian i
A7 BF ; # small Ukrainian yi
AD B4 ; # small Ukrainian soft g
AE A2 ; # small Byelorussian short u
B0 B0 ; # &deg;
B3 A8 ; # capital YO
B4 AA ; # capital Ukrainian YE
B6 B2 ; # capital Ukrainian I
B7 AF ; # capital Ukrainian YI
B9 B9 ; # numero sign
BD A5 ; # capital Ukrainian soft G
BE A1 ; # capital Byelorussian short U
BF A9 ; # (C)
C0 FE ; # small yu
C1 E0 ; # small a
C2 E1 ; # small b
C3 F6 ; # small ts
C4 E4 ; # small d
C5 E5 ; # small ye
C6 F4 ; # small f
C7 E3 ; # small g
C8 F5 ; # small kh
C9 E8 ; # small i
CA E9 ; # small j
CB EA ; # small k
CC EB ; # small l
CD EC ; # small m
CE ED ; # small n
CF EE ; # small o
D0 EF ; # small p
D1 FF ; # small ya
D2 F0 ; # small r
D3 F1 ; # small s
D4 F2 ; # small t
D5 F3 ; # small u
D6 E6 ; # small zh
D7 E2 ; # small v
D8 FC ; # small soft sign
D9 FB ; # small y
DA E7 ; # small z
DB F8 ; # small sh
DC FD ; # small e
DD F9 ; # small shch
DE F7 ; # small ch
DF FA ; # small hard sign
E0 DE ; # capital YU
E1 C0 ; # capital A
E2 C1 ; # capital B
E3 D6 ; # capital TS
E4 C4 ; # capital D
E5 C5 ; # capital YE
E6 D4 ; # capital F
E7 C3 ; # capital G
E8 D5 ; # capital KH
E9 C8 ; # capital I
EA C9 ; # capital J
EB CA ; # capital K
EC CB ; # capital L
ED CC ; # capital M
EE CD ; # capital N
EF CE ; # capital O
F0 CF ; # capital P
F1 DF ; # capital YA
F2 D0 ; # capital R
F3 D1 ; # capital S
F4 D2 ; # capital T
F5 D3 ; # capital U
F6 C6 ; # capital ZH
F7 C2 ; # capital V
F8 DC ; # capital soft sign
F9 DB ; # capital Y
FA C7 ; # capital Z
FB D8 ; # capital SH
FC DD ; # capital E
FD D9 ; # capital SHCH
FE D7 ; # capital CH
FF DA ; # capital hard sign
}

View File

@ -0,0 +1,97 @@
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/png png;
image/svg+xml svg svgz;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/webp webp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
font/woff woff;
font/woff2 woff2;
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
application/vnd.oasis.opendocument.graphics odg;
application/vnd.oasis.opendocument.presentation odp;
application/vnd.oasis.opendocument.spreadsheet ods;
application/vnd.oasis.opendocument.text odt;
application/vnd.openxmlformats-officedocument.presentationml.presentation
pptx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xlsx;
application/vnd.openxmlformats-officedocument.wordprocessingml.document
docx;
application/vnd.wap.wmlc wmlc;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/xspf+xml xspf;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp2t ts;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}

View File

@ -0,0 +1,51 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/json;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
# 指定前端项目所在的位置
location / {
root html/hmdp;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /api {
default_type application/json;
#internal;
keepalive_timeout 30s;
keepalive_requests 1000;
#支持keep-alive
proxy_http_version 1.1;
rewrite /api(/.*) $1 break;
proxy_pass_request_headers on;
#more_clear_input_headers Accept-Encoding;
proxy_next_upstream error timeout;
proxy_pass http://127.0.0.1:8081;
#proxy_pass http://backend;
}
}
upstream backend {
server 127.0.0.1:8081 max_fails=5 fail_timeout=10s weight=1;
#server 127.0.0.1:8082 max_fails=5 fail_timeout=10s weight=1;
}
}

View File

@ -0,0 +1,17 @@
scgi_param REQUEST_METHOD $request_method;
scgi_param REQUEST_URI $request_uri;
scgi_param QUERY_STRING $query_string;
scgi_param CONTENT_TYPE $content_type;
scgi_param DOCUMENT_URI $document_uri;
scgi_param DOCUMENT_ROOT $document_root;
scgi_param SCGI 1;
scgi_param SERVER_PROTOCOL $server_protocol;
scgi_param REQUEST_SCHEME $scheme;
scgi_param HTTPS $https if_not_empty;
scgi_param REMOTE_ADDR $remote_addr;
scgi_param REMOTE_PORT $remote_port;
scgi_param SERVER_PORT $server_port;
scgi_param SERVER_NAME $server_name;

View File

@ -0,0 +1,17 @@
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param REQUEST_SCHEME $scheme;
uwsgi_param HTTPS $https if_not_empty;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;

126
nginx-1.18.0/conf/win-utf Normal file
View File

@ -0,0 +1,126 @@
# This map is not a full windows-1251 <> utf8 map: it does not
# contain Serbian and Macedonian letters. If you need a full map,
# use contrib/unicode2nginx/win-utf map instead.
charset_map windows-1251 utf-8 {
82 E2809A ; # single low-9 quotation mark
84 E2809E ; # double low-9 quotation mark
85 E280A6 ; # ellipsis
86 E280A0 ; # dagger
87 E280A1 ; # double dagger
88 E282AC ; # euro
89 E280B0 ; # per mille
91 E28098 ; # left single quotation mark
92 E28099 ; # right single quotation mark
93 E2809C ; # left double quotation mark
94 E2809D ; # right double quotation mark
95 E280A2 ; # bullet
96 E28093 ; # en dash
97 E28094 ; # em dash
99 E284A2 ; # trade mark sign
A0 C2A0 ; # &nbsp;
A1 D18E ; # capital Byelorussian short U
A2 D19E ; # small Byelorussian short u
A4 C2A4 ; # currency sign
A5 D290 ; # capital Ukrainian soft G
A6 C2A6 ; # borken bar
A7 C2A7 ; # section sign
A8 D081 ; # capital YO
A9 C2A9 ; # (C)
AA D084 ; # capital Ukrainian YE
AB C2AB ; # left-pointing double angle quotation mark
AC C2AC ; # not sign
AD C2AD ; # soft hypen
AE C2AE ; # (R)
AF D087 ; # capital Ukrainian YI
B0 C2B0 ; # &deg;
B1 C2B1 ; # plus-minus sign
B2 D086 ; # capital Ukrainian I
B3 D196 ; # small Ukrainian i
B4 D291 ; # small Ukrainian soft g
B5 C2B5 ; # micro sign
B6 C2B6 ; # pilcrow sign
B7 C2B7 ; # &middot;
B8 D191 ; # small yo
B9 E28496 ; # numero sign
BA D194 ; # small Ukrainian ye
BB C2BB ; # right-pointing double angle quotation mark
BF D197 ; # small Ukrainian yi
C0 D090 ; # capital A
C1 D091 ; # capital B
C2 D092 ; # capital V
C3 D093 ; # capital G
C4 D094 ; # capital D
C5 D095 ; # capital YE
C6 D096 ; # capital ZH
C7 D097 ; # capital Z
C8 D098 ; # capital I
C9 D099 ; # capital J
CA D09A ; # capital K
CB D09B ; # capital L
CC D09C ; # capital M
CD D09D ; # capital N
CE D09E ; # capital O
CF D09F ; # capital P
D0 D0A0 ; # capital R
D1 D0A1 ; # capital S
D2 D0A2 ; # capital T
D3 D0A3 ; # capital U
D4 D0A4 ; # capital F
D5 D0A5 ; # capital KH
D6 D0A6 ; # capital TS
D7 D0A7 ; # capital CH
D8 D0A8 ; # capital SH
D9 D0A9 ; # capital SHCH
DA D0AA ; # capital hard sign
DB D0AB ; # capital Y
DC D0AC ; # capital soft sign
DD D0AD ; # capital E
DE D0AE ; # capital YU
DF D0AF ; # capital YA
E0 D0B0 ; # small a
E1 D0B1 ; # small b
E2 D0B2 ; # small v
E3 D0B3 ; # small g
E4 D0B4 ; # small d
E5 D0B5 ; # small ye
E6 D0B6 ; # small zh
E7 D0B7 ; # small z
E8 D0B8 ; # small i
E9 D0B9 ; # small j
EA D0BA ; # small k
EB D0BB ; # small l
EC D0BC ; # small m
ED D0BD ; # small n
EE D0BE ; # small o
EF D0BF ; # small p
F0 D180 ; # small r
F1 D181 ; # small s
F2 D182 ; # small t
F3 D183 ; # small u
F4 D184 ; # small f
F5 D185 ; # small kh
F6 D186 ; # small ts
F7 D187 ; # small ch
F8 D188 ; # small sh
F9 D189 ; # small shch
FA D18A ; # small hard sign
FB D18B ; # small y
FC D18C ; # small soft sign
FD D18D ; # small e
FE D18E ; # small yu
FF D18F ; # small ya
}

View File

@ -0,0 +1,21 @@
geo2nginx.pl by Andrei Nigmatulin
The perl script to convert CSV geoip database ( free download
at http://www.maxmind.com/app/geoip_country ) to format, suitable
for use by the ngx_http_geo_module.
unicode2nginx by Maxim Dounin
The perl script to convert unicode mappings ( available
at http://www.unicode.org/Public/MAPPINGS/ ) to the nginx
configuration file format.
Two generated full maps for windows-1251 and koi8-r.
vim by Evan Miller
Syntax highlighting of nginx configuration for vim, to be
placed into ~/.vim/.

View File

@ -0,0 +1,58 @@
#!/usr/bin/perl -w
# (c) Andrei Nigmatulin, 2005
#
# this script provided "as is", without any warranties. use it at your own risk.
#
# special thanx to Andrew Sitnikov for perl port
#
# this script converts CSV geoip database (free download at http://www.maxmind.com/app/geoip_country)
# to format, suitable for use with nginx_http_geo module (http://sysoev.ru/nginx)
#
# for example, line with ip range
#
# "62.16.68.0","62.16.127.255","1041253376","1041268735","RU","Russian Federation"
#
# will be converted to four subnetworks:
#
# 62.16.68.0/22 RU;
# 62.16.72.0/21 RU;
# 62.16.80.0/20 RU;
# 62.16.96.0/19 RU;
use warnings;
use strict;
while( <STDIN> ){
if (/"[^"]+","[^"]+","([^"]+)","([^"]+)","([^"]+)"/){
print_subnets($1, $2, $3);
}
}
sub print_subnets {
my ($a1, $a2, $c) = @_;
my $l;
while ($a1 <= $a2) {
for ($l = 0; ($a1 & (1 << $l)) == 0 && ($a1 + ((1 << ($l + 1)) - 1)) <= $a2; $l++){};
print long2ip($a1) . "/" . (32 - $l) . " " . $c . ";\n";
$a1 += (1 << $l);
}
}
sub long2ip {
my $ip = shift;
my $str = 0;
$str = ($ip & 255);
$ip >>= 8;
$str = ($ip & 255).".$str";
$ip >>= 8;
$str = ($ip & 255).".$str";
$ip >>= 8;
$str = ($ip & 255).".$str";
}

View File

@ -0,0 +1,131 @@
charset_map koi8-r utf-8 {
80 E29480 ; # BOX DRAWINGS LIGHT HORIZONTAL
81 E29482 ; # BOX DRAWINGS LIGHT VERTICAL
82 E2948C ; # BOX DRAWINGS LIGHT DOWN AND RIGHT
83 E29490 ; # BOX DRAWINGS LIGHT DOWN AND LEFT
84 E29494 ; # BOX DRAWINGS LIGHT UP AND RIGHT
85 E29498 ; # BOX DRAWINGS LIGHT UP AND LEFT
86 E2949C ; # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
87 E294A4 ; # BOX DRAWINGS LIGHT VERTICAL AND LEFT
88 E294AC ; # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
89 E294B4 ; # BOX DRAWINGS LIGHT UP AND HORIZONTAL
8A E294BC ; # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
8B E29680 ; # UPPER HALF BLOCK
8C E29684 ; # LOWER HALF BLOCK
8D E29688 ; # FULL BLOCK
8E E2968C ; # LEFT HALF BLOCK
8F E29690 ; # RIGHT HALF BLOCK
90 E29691 ; # LIGHT SHADE
91 E29692 ; # MEDIUM SHADE
92 E29693 ; # DARK SHADE
93 E28CA0 ; # TOP HALF INTEGRAL
94 E296A0 ; # BLACK SQUARE
95 E28899 ; # BULLET OPERATOR
96 E2889A ; # SQUARE ROOT
97 E28988 ; # ALMOST EQUAL TO
98 E289A4 ; # LESS-THAN OR EQUAL TO
99 E289A5 ; # GREATER-THAN OR EQUAL TO
9A C2A0 ; # NO-BREAK SPACE
9B E28CA1 ; # BOTTOM HALF INTEGRAL
9C C2B0 ; # DEGREE SIGN
9D C2B2 ; # SUPERSCRIPT TWO
9E C2B7 ; # MIDDLE DOT
9F C3B7 ; # DIVISION SIGN
A0 E29590 ; # BOX DRAWINGS DOUBLE HORIZONTAL
A1 E29591 ; # BOX DRAWINGS DOUBLE VERTICAL
A2 E29592 ; # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
A3 D191 ; # CYRILLIC SMALL LETTER IO
A4 E29593 ; # BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
A5 E29594 ; # BOX DRAWINGS DOUBLE DOWN AND RIGHT
A6 E29595 ; # BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
A7 E29596 ; # BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
A8 E29597 ; # BOX DRAWINGS DOUBLE DOWN AND LEFT
A9 E29598 ; # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
AA E29599 ; # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
AB E2959A ; # BOX DRAWINGS DOUBLE UP AND RIGHT
AC E2959B ; # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
AD E2959C ; # BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
AE E2959D ; # BOX DRAWINGS DOUBLE UP AND LEFT
AF E2959E ; # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
B0 E2959F ; # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
B1 E295A0 ; # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
B2 E295A1 ; # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
B3 D081 ; # CYRILLIC CAPITAL LETTER IO
B4 E295A2 ; # BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
B5 E295A3 ; # BOX DRAWINGS DOUBLE VERTICAL AND LEFT
B6 E295A4 ; # BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
B7 E295A5 ; # BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
B8 E295A6 ; # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
B9 E295A7 ; # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
BA E295A8 ; # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
BB E295A9 ; # BOX DRAWINGS DOUBLE UP AND HORIZONTAL
BC E295AA ; # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
BD E295AB ; # BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
BE E295AC ; # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
BF C2A9 ; # COPYRIGHT SIGN
C0 D18E ; # CYRILLIC SMALL LETTER YU
C1 D0B0 ; # CYRILLIC SMALL LETTER A
C2 D0B1 ; # CYRILLIC SMALL LETTER BE
C3 D186 ; # CYRILLIC SMALL LETTER TSE
C4 D0B4 ; # CYRILLIC SMALL LETTER DE
C5 D0B5 ; # CYRILLIC SMALL LETTER IE
C6 D184 ; # CYRILLIC SMALL LETTER EF
C7 D0B3 ; # CYRILLIC SMALL LETTER GHE
C8 D185 ; # CYRILLIC SMALL LETTER HA
C9 D0B8 ; # CYRILLIC SMALL LETTER I
CA D0B9 ; # CYRILLIC SMALL LETTER SHORT I
CB D0BA ; # CYRILLIC SMALL LETTER KA
CC D0BB ; # CYRILLIC SMALL LETTER EL
CD D0BC ; # CYRILLIC SMALL LETTER EM
CE D0BD ; # CYRILLIC SMALL LETTER EN
CF D0BE ; # CYRILLIC SMALL LETTER O
D0 D0BF ; # CYRILLIC SMALL LETTER PE
D1 D18F ; # CYRILLIC SMALL LETTER YA
D2 D180 ; # CYRILLIC SMALL LETTER ER
D3 D181 ; # CYRILLIC SMALL LETTER ES
D4 D182 ; # CYRILLIC SMALL LETTER TE
D5 D183 ; # CYRILLIC SMALL LETTER U
D6 D0B6 ; # CYRILLIC SMALL LETTER ZHE
D7 D0B2 ; # CYRILLIC SMALL LETTER VE
D8 D18C ; # CYRILLIC SMALL LETTER SOFT SIGN
D9 D18B ; # CYRILLIC SMALL LETTER YERU
DA D0B7 ; # CYRILLIC SMALL LETTER ZE
DB D188 ; # CYRILLIC SMALL LETTER SHA
DC D18D ; # CYRILLIC SMALL LETTER E
DD D189 ; # CYRILLIC SMALL LETTER SHCHA
DE D187 ; # CYRILLIC SMALL LETTER CHE
DF D18A ; # CYRILLIC SMALL LETTER HARD SIGN
E0 D0AE ; # CYRILLIC CAPITAL LETTER YU
E1 D090 ; # CYRILLIC CAPITAL LETTER A
E2 D091 ; # CYRILLIC CAPITAL LETTER BE
E3 D0A6 ; # CYRILLIC CAPITAL LETTER TSE
E4 D094 ; # CYRILLIC CAPITAL LETTER DE
E5 D095 ; # CYRILLIC CAPITAL LETTER IE
E6 D0A4 ; # CYRILLIC CAPITAL LETTER EF
E7 D093 ; # CYRILLIC CAPITAL LETTER GHE
E8 D0A5 ; # CYRILLIC CAPITAL LETTER HA
E9 D098 ; # CYRILLIC CAPITAL LETTER I
EA D099 ; # CYRILLIC CAPITAL LETTER SHORT I
EB D09A ; # CYRILLIC CAPITAL LETTER KA
EC D09B ; # CYRILLIC CAPITAL LETTER EL
ED D09C ; # CYRILLIC CAPITAL LETTER EM
EE D09D ; # CYRILLIC CAPITAL LETTER EN
EF D09E ; # CYRILLIC CAPITAL LETTER O
F0 D09F ; # CYRILLIC CAPITAL LETTER PE
F1 D0AF ; # CYRILLIC CAPITAL LETTER YA
F2 D0A0 ; # CYRILLIC CAPITAL LETTER ER
F3 D0A1 ; # CYRILLIC CAPITAL LETTER ES
F4 D0A2 ; # CYRILLIC CAPITAL LETTER TE
F5 D0A3 ; # CYRILLIC CAPITAL LETTER U
F6 D096 ; # CYRILLIC CAPITAL LETTER ZHE
F7 D092 ; # CYRILLIC CAPITAL LETTER VE
F8 D0AC ; # CYRILLIC CAPITAL LETTER SOFT SIGN
F9 D0AB ; # CYRILLIC CAPITAL LETTER YERU
FA D097 ; # CYRILLIC CAPITAL LETTER ZE
FB D0A8 ; # CYRILLIC CAPITAL LETTER SHA
FC D0AD ; # CYRILLIC CAPITAL LETTER E
FD D0A9 ; # CYRILLIC CAPITAL LETTER SHCHA
FE D0A7 ; # CYRILLIC CAPITAL LETTER CHE
FF D0AA ; # CYRILLIC CAPITAL LETTER HARD SIGN
}

View File

@ -0,0 +1,48 @@
#!/usr/bin/perl -w
# Convert unicode mappings to nginx configuration file format.
# You may find useful mappings in various places, including
# unicode.org official site:
#
# http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT
# http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT
# Needs perl 5.6 or later.
# Written by Maxim Dounin, mdounin@mdounin.ru
###############################################################################
require 5.006;
while (<>) {
# Skip comments and empty lines
next if /^#/;
next if /^\s*$/;
chomp;
# Convert mappings
if (/^\s*0x(..)\s*0x(....)\s*(#.*)/) {
# Mapping <from-code> <unicode-code> "#" <unicode-name>
my $cs_code = $1;
my $un_code = $2;
my $un_name = $3;
# Produce UTF-8 sequence from character code;
my $un_utf8 = join('',
map { sprintf("%02X", $_) }
unpack("U0C*", pack("U", hex($un_code)))
);
print " $cs_code $un_utf8 ; $un_name\n";
} else {
warn "Unrecognized line: '$_'";
}
}
###############################################################################

View File

@ -0,0 +1,130 @@
charset_map windows-1251 utf-8 {
80 D082 ; #CYRILLIC CAPITAL LETTER DJE
81 D083 ; #CYRILLIC CAPITAL LETTER GJE
82 E2809A ; #SINGLE LOW-9 QUOTATION MARK
83 D193 ; #CYRILLIC SMALL LETTER GJE
84 E2809E ; #DOUBLE LOW-9 QUOTATION MARK
85 E280A6 ; #HORIZONTAL ELLIPSIS
86 E280A0 ; #DAGGER
87 E280A1 ; #DOUBLE DAGGER
88 E282AC ; #EURO SIGN
89 E280B0 ; #PER MILLE SIGN
8A D089 ; #CYRILLIC CAPITAL LETTER LJE
8B E280B9 ; #SINGLE LEFT-POINTING ANGLE QUOTATION MARK
8C D08A ; #CYRILLIC CAPITAL LETTER NJE
8D D08C ; #CYRILLIC CAPITAL LETTER KJE
8E D08B ; #CYRILLIC CAPITAL LETTER TSHE
8F D08F ; #CYRILLIC CAPITAL LETTER DZHE
90 D192 ; #CYRILLIC SMALL LETTER DJE
91 E28098 ; #LEFT SINGLE QUOTATION MARK
92 E28099 ; #RIGHT SINGLE QUOTATION MARK
93 E2809C ; #LEFT DOUBLE QUOTATION MARK
94 E2809D ; #RIGHT DOUBLE QUOTATION MARK
95 E280A2 ; #BULLET
96 E28093 ; #EN DASH
97 E28094 ; #EM DASH
99 E284A2 ; #TRADE MARK SIGN
9A D199 ; #CYRILLIC SMALL LETTER LJE
9B E280BA ; #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
9C D19A ; #CYRILLIC SMALL LETTER NJE
9D D19C ; #CYRILLIC SMALL LETTER KJE
9E D19B ; #CYRILLIC SMALL LETTER TSHE
9F D19F ; #CYRILLIC SMALL LETTER DZHE
A0 C2A0 ; #NO-BREAK SPACE
A1 D08E ; #CYRILLIC CAPITAL LETTER SHORT U
A2 D19E ; #CYRILLIC SMALL LETTER SHORT U
A3 D088 ; #CYRILLIC CAPITAL LETTER JE
A4 C2A4 ; #CURRENCY SIGN
A5 D290 ; #CYRILLIC CAPITAL LETTER GHE WITH UPTURN
A6 C2A6 ; #BROKEN BAR
A7 C2A7 ; #SECTION SIGN
A8 D081 ; #CYRILLIC CAPITAL LETTER IO
A9 C2A9 ; #COPYRIGHT SIGN
AA D084 ; #CYRILLIC CAPITAL LETTER UKRAINIAN IE
AB C2AB ; #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
AC C2AC ; #NOT SIGN
AD C2AD ; #SOFT HYPHEN
AE C2AE ; #REGISTERED SIGN
AF D087 ; #CYRILLIC CAPITAL LETTER YI
B0 C2B0 ; #DEGREE SIGN
B1 C2B1 ; #PLUS-MINUS SIGN
B2 D086 ; #CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
B3 D196 ; #CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
B4 D291 ; #CYRILLIC SMALL LETTER GHE WITH UPTURN
B5 C2B5 ; #MICRO SIGN
B6 C2B6 ; #PILCROW SIGN
B7 C2B7 ; #MIDDLE DOT
B8 D191 ; #CYRILLIC SMALL LETTER IO
B9 E28496 ; #NUMERO SIGN
BA D194 ; #CYRILLIC SMALL LETTER UKRAINIAN IE
BB C2BB ; #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
BC D198 ; #CYRILLIC SMALL LETTER JE
BD D085 ; #CYRILLIC CAPITAL LETTER DZE
BE D195 ; #CYRILLIC SMALL LETTER DZE
BF D197 ; #CYRILLIC SMALL LETTER YI
C0 D090 ; #CYRILLIC CAPITAL LETTER A
C1 D091 ; #CYRILLIC CAPITAL LETTER BE
C2 D092 ; #CYRILLIC CAPITAL LETTER VE
C3 D093 ; #CYRILLIC CAPITAL LETTER GHE
C4 D094 ; #CYRILLIC CAPITAL LETTER DE
C5 D095 ; #CYRILLIC CAPITAL LETTER IE
C6 D096 ; #CYRILLIC CAPITAL LETTER ZHE
C7 D097 ; #CYRILLIC CAPITAL LETTER ZE
C8 D098 ; #CYRILLIC CAPITAL LETTER I
C9 D099 ; #CYRILLIC CAPITAL LETTER SHORT I
CA D09A ; #CYRILLIC CAPITAL LETTER KA
CB D09B ; #CYRILLIC CAPITAL LETTER EL
CC D09C ; #CYRILLIC CAPITAL LETTER EM
CD D09D ; #CYRILLIC CAPITAL LETTER EN
CE D09E ; #CYRILLIC CAPITAL LETTER O
CF D09F ; #CYRILLIC CAPITAL LETTER PE
D0 D0A0 ; #CYRILLIC CAPITAL LETTER ER
D1 D0A1 ; #CYRILLIC CAPITAL LETTER ES
D2 D0A2 ; #CYRILLIC CAPITAL LETTER TE
D3 D0A3 ; #CYRILLIC CAPITAL LETTER U
D4 D0A4 ; #CYRILLIC CAPITAL LETTER EF
D5 D0A5 ; #CYRILLIC CAPITAL LETTER HA
D6 D0A6 ; #CYRILLIC CAPITAL LETTER TSE
D7 D0A7 ; #CYRILLIC CAPITAL LETTER CHE
D8 D0A8 ; #CYRILLIC CAPITAL LETTER SHA
D9 D0A9 ; #CYRILLIC CAPITAL LETTER SHCHA
DA D0AA ; #CYRILLIC CAPITAL LETTER HARD SIGN
DB D0AB ; #CYRILLIC CAPITAL LETTER YERU
DC D0AC ; #CYRILLIC CAPITAL LETTER SOFT SIGN
DD D0AD ; #CYRILLIC CAPITAL LETTER E
DE D0AE ; #CYRILLIC CAPITAL LETTER YU
DF D0AF ; #CYRILLIC CAPITAL LETTER YA
E0 D0B0 ; #CYRILLIC SMALL LETTER A
E1 D0B1 ; #CYRILLIC SMALL LETTER BE
E2 D0B2 ; #CYRILLIC SMALL LETTER VE
E3 D0B3 ; #CYRILLIC SMALL LETTER GHE
E4 D0B4 ; #CYRILLIC SMALL LETTER DE
E5 D0B5 ; #CYRILLIC SMALL LETTER IE
E6 D0B6 ; #CYRILLIC SMALL LETTER ZHE
E7 D0B7 ; #CYRILLIC SMALL LETTER ZE
E8 D0B8 ; #CYRILLIC SMALL LETTER I
E9 D0B9 ; #CYRILLIC SMALL LETTER SHORT I
EA D0BA ; #CYRILLIC SMALL LETTER KA
EB D0BB ; #CYRILLIC SMALL LETTER EL
EC D0BC ; #CYRILLIC SMALL LETTER EM
ED D0BD ; #CYRILLIC SMALL LETTER EN
EE D0BE ; #CYRILLIC SMALL LETTER O
EF D0BF ; #CYRILLIC SMALL LETTER PE
F0 D180 ; #CYRILLIC SMALL LETTER ER
F1 D181 ; #CYRILLIC SMALL LETTER ES
F2 D182 ; #CYRILLIC SMALL LETTER TE
F3 D183 ; #CYRILLIC SMALL LETTER U
F4 D184 ; #CYRILLIC SMALL LETTER EF
F5 D185 ; #CYRILLIC SMALL LETTER HA
F6 D186 ; #CYRILLIC SMALL LETTER TSE
F7 D187 ; #CYRILLIC SMALL LETTER CHE
F8 D188 ; #CYRILLIC SMALL LETTER SHA
F9 D189 ; #CYRILLIC SMALL LETTER SHCHA
FA D18A ; #CYRILLIC SMALL LETTER HARD SIGN
FB D18B ; #CYRILLIC SMALL LETTER YERU
FC D18C ; #CYRILLIC SMALL LETTER SOFT SIGN
FD D18D ; #CYRILLIC SMALL LETTER E
FE D18E ; #CYRILLIC SMALL LETTER YU
FF D18F ; #CYRILLIC SMALL LETTER YA
}

View File

@ -0,0 +1,4 @@
au BufRead,BufNewFile *.nginx set ft=nginx
au BufRead,BufNewFile */etc/nginx/* set ft=nginx
au BufRead,BufNewFile */usr/local/nginx/conf/* set ft=nginx
au BufRead,BufNewFile nginx.conf set ft=nginx

View File

@ -0,0 +1 @@
setlocal commentstring=#\ %s

View File

@ -0,0 +1,11 @@
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=
" cindent actually works for nginx' simple file structure
setlocal cindent
" Just make sure that the comments are not reset as defs would be.
setlocal cinkeys-=0#

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
<p>If you are the system administrator of this resource then you should check
the error log for details.</p>
<p><em>Faithfully yours, nginx.</em></p>
</body>
</html>

15
nginx-1.18.0/html/hmdp/.gitignore vendored Normal file
View File

@ -0,0 +1,15 @@
# Created by .ignore support plugin (hsz.mobi)
# Example user template template
# Example user template
# IntelliJ project files
.idea
*.iml
out
gen
target
*.class
*.log
.settings
.project

View File

@ -0,0 +1,388 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>黑马点评</title>
<!-- 引入样式 -->
<link rel="stylesheet" href="./css/element.css">
<link href="./css/blog-detail.css" rel="stylesheet">
<link href="./css/main.css" rel="stylesheet">
<style type="text/css">
.header{
position: relative;
}
.foot-view span{
font-size: 12px;
}
.liked{
}
</style>
</head>
<body>
<div id="app">
<div class="header">
<div class="header-back-btn" @click="goBack"><i class="el-icon-arrow-left"></i></div>
<div class="header-title"></div>
<div class="header-share">...</div>
</div>
<div style="height: 85%; overflow-y: scroll; overflow-x: hidden">
<div class="blog-info-box" ref="swiper"
@touchstart="moveStart"
@touchmove="moving"
@touchend="moveEnd">
<div class="swiper-item" v-for="(img, i) in blog.images" :key="i">
<img :src="img" alt="" style="width: 100%" height="100%">
</div>
</div>
<div class="basic">
<div class="basic-icon" @click="toOtherInfo">
<img :src="blog.icon || '/imgs/icons/default-icon.png'" alt="">
</div>
<div class="basic-info">
<div class="name">{{blog.name}}</div>
<span class="time">{{formatTime(new Date(blog.createTime))}}</span>
</div>
<div style="width: 20%">
<div class="logout-btn" @click="follow" v-show="!user || user.id !== blog.userId ">
{{followed ? '取消关注' : '关注'}}
</div>
</div>
</div>
<div class="blog-text" v-html="blog.content">
</div>
<div class="shop-basic">
<div class="shop-icon">
<img :src="shop.image" alt="">
</div>
<div style="width: 80%">
<div class="name">{{shop.name}}</div>
<div>
<el-rate
v-model="shop.score/10">
</el-rate>
</div>
<div class="shop-avg">¥{{shop.avgPrice}}/人</div>
</div>
</div>
<div class="zan-box">
<div>
<svg t="1646634642977" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2187" width="20" height="20">
<path d="M160 944c0 8.8-7.2 16-16 16h-32c-26.5 0-48-21.5-48-48V528c0-26.5 21.5-48 48-48h32c8.8 0 16 7.2 16 16v448zM96 416c-53 0-96 43-96 96v416c0 53 43 96 96 96h96c17.7 0 32-14.3 32-32V448c0-17.7-14.3-32-32-32H96zM505.6 64c16.2 0 26.4 8.7 31 13.9 4.6 5.2 12.1 16.3 10.3 32.4l-23.5 203.4c-4.9 42.2 8.6 84.6 36.8 116.4 28.3 31.7 68.9 49.9 111.4 49.9h271.2c6.6 0 10.8 3.3 13.2 6.1s5 7.5 4 14l-48 303.4c-6.9 43.6-29.1 83.4-62.7 112C815.8 944.2 773 960 728.9 960h-317c-33.1 0-59.9-26.8-59.9-59.9v-455c0-6.1 1.7-12 5-17.1 69.5-109 106.4-234.2 107-364h41.6z m0-64h-44.9C427.2 0 400 27.2 400 60.7c0 127.1-39.1 251.2-112 355.3v484.1c0 68.4 55.5 123.9 123.9 123.9h317c122.7 0 227.2-89.3 246.3-210.5l47.9-303.4c7.8-49.4-30.4-94.1-80.4-94.1H671.6c-50.9 0-90.5-44.4-84.6-95l23.5-203.4C617.7 55 568.7 0 505.6 0z" p-id="2188" :fill="blog.isLike ? '#ff6633' : '#82848a'"></path>
</svg>
</div>
<div class="zan-list">
<div class="user-icon-mini" v-for="u in likes" :key="u.id">
<img :src="u.icon || '/imgs/icons/default-icon.png'" alt="">
</div>
<div style="margin-left:10px;text-align: center;line-height: 24px;">{{blog.liked}}人点赞</div>
</div>
</div>
<div class="blog-divider"></div>
<div class="blog-comments">
<div class="comments-head">
<div>网友评价 <span>119</span></div>
<div><i class="el-icon-arrow-right"></i></div>
</div>
<div class="comment-list">
<div class="comment-box" v-for="i in 3" :key="i">
<div class="comment-icon">
<img
src="https://p0.meituan.net/userheadpicbackend/57e44d6eba01aad0d8d711788f30a126549507.jpg%4048w_48h_1e_1c_1l%7Cwatermark%3D0"
alt="">
</div>
<div class="comment-info">
<div class="comment-user">叶小乙 <span>Lv5</span></div>
<div style="display: flex;">
打分
<el-rate disabled v-model="4.5"></el-rate>
</div>
<div style="padding: 5px 0; font-size: 14px">
某平台上买的券,价格可以当工作餐吃,虽然价格便宜,但是这家店一点都没有...
</div>
<div class="comment-images">
<img
src="https://qcloud.dpfile.com/pc/6T7MfXzx7USPIkSy7jzm40qZSmlHUF2jd-FZUL6WpjE9byagjLlrseWxnl1LcbuSGybIjx5eX6WNgCPvcASYAw.jpg"
alt="">
<img
src="https://qcloud.dpfile.com/pc/sZ5q-zgglv4VXEWU71xCFjnLM_jUHq-ylq0GKivtrz3JksWQ1f7oBWZsxm1DWgcaGybIjx5eX6WNgCPvcASYAw.jpg"
alt="">
<img
src="https://qcloud.dpfile.com/pc/xZy6W4NwuRFchlOi43DVLPFsx7KWWvPqifE1JTe_jreqdsBYA9CFkeSm2ZlF0OVmGybIjx5eX6WNgCPvcASYAw.jpg"
alt="">
<img
src="https://qcloud.dpfile.com/pc/xZy6W4NwuRFchlOi43DVLPFsx7KWWvPqifE1JTe_jreqdsBYA9CFkeSm2ZlF0OVmGybIjx5eX6WNgCPvcASYAw.jpg"
alt="">
</div>
<div>
浏览641 &nbsp;&nbsp;&nbsp;&nbsp;评论5
</div>
</div>
</div>
<div
style="display: flex; justify-content: space-between;padding: 15px 0; border-top: 1px solid #f1f1f1; margin-top: 10px;">
<div>查看全部119条评价</div>
<div><i class="el-icon-arrow-right"></i></div>
</div>
</div>
</div>
<div class="blog-divider"></div>
</div>
<div class="foot">
<div class="foot-box">
<div class="foot-view" @click="addLike()">
<svg t="1646634642977" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2187" width="26" height="26">
<path d="M160 944c0 8.8-7.2 16-16 16h-32c-26.5 0-48-21.5-48-48V528c0-26.5 21.5-48 48-48h32c8.8 0 16 7.2 16 16v448zM96 416c-53 0-96 43-96 96v416c0 53 43 96 96 96h96c17.7 0 32-14.3 32-32V448c0-17.7-14.3-32-32-32H96zM505.6 64c16.2 0 26.4 8.7 31 13.9 4.6 5.2 12.1 16.3 10.3 32.4l-23.5 203.4c-4.9 42.2 8.6 84.6 36.8 116.4 28.3 31.7 68.9 49.9 111.4 49.9h271.2c6.6 0 10.8 3.3 13.2 6.1s5 7.5 4 14l-48 303.4c-6.9 43.6-29.1 83.4-62.7 112C815.8 944.2 773 960 728.9 960h-317c-33.1 0-59.9-26.8-59.9-59.9v-455c0-6.1 1.7-12 5-17.1 69.5-109 106.4-234.2 107-364h41.6z m0-64h-44.9C427.2 0 400 27.2 400 60.7c0 127.1-39.1 251.2-112 355.3v484.1c0 68.4 55.5 123.9 123.9 123.9h317c122.7 0 227.2-89.3 246.3-210.5l47.9-303.4c7.8-49.4-30.4-94.1-80.4-94.1H671.6c-50.9 0-90.5-44.4-84.6-95l23.5-203.4C617.7 55 568.7 0 505.6 0z" p-id="2188" :fill="blog.isLike ? '#ff6633' : '#82848a'"></path>
</svg>
<span :class="{liked: blog.isLike}">{{blog.liked}}</span>
</div>
</div>
<div style="width: 40%">
</div>
<div class="foot-box">
<div class="foot-view"><i class="el-icon-chat-square"></i></div>
</div>
</div>
</div>
<script src="./js/vue.js"></script>
<script src="./js/axios.min.js"></script>
<!-- 引入组件库 -->
<script src="./js/element.js"></script>
<script src="./js/common.js"></script>
<script>
let each = function (ary, callback) {
for (let i = 0, l = ary.length; i < l; i++) {
if (callback(ary[i], i) === false) break
}
}
const app = new Vue({
el: "#app",
data: {
util,
blog: {},
shop: {},
likes: [],
user: {}, // 登录用户
followed: false, // 是否关注了
_width: 0,
duration: 300,
container: null,
items: [],
active: 0,
start: {
x: 0,
y: 0
},
move: {
x: 0,
y: 0
},
sensitivity: 60,
resistance: 0.3
},
created() {
let id = util.getUrlParam("id");
this.queryBlogById(id);
},
methods: {
init() {
// 获得父容器节点
this.container = this.$refs.swiper
// 获得所有的子节点
this.items = this.container.querySelectorAll('.swiper-item')
this.updateItemWidth()
this.setTransform()
this.setTransition('none')
},
goBack() {
history.back();
},
toOtherInfo(){
if(this.blog.userId === this.user.id){
location.href = "/info.html"
}else{
location.href = "/other-info.html?id=" + this.blog.userId
}
},
queryBlogById(id) {
axios.get("/blog/" + id)
.then(({data}) => {
data.images = data.images.split(",")
this.blog = data;
this.$nextTick(this.init);
this.queryShopById(data.shopId)
this.queryLikeList(id);
this.queryLoginUser();
})
.catch(this.$message.error)
},
queryShopById(shopId) {
axios.get("/shop/" + shopId)
.then(({data}) => {
data.image = data.images.split(",")[0]
this.shop = data
})
.catch(this.$message.error)
},
queryLikeList(id){
axios.get("/blog/likes/" + id)
.then(({data}) => this.likes = data)
.catch(this.$message.error)
},
addLike(){
axios.put("/blog/like/" +this.blog.id)
.then(({data}) => {
axios.get("/blog/" + this.blog.id)
.then(({data}) => {
data.images = data.images.split(",")
this.blog = data;
this.queryLikeList(this.blog.id);
})
.catch(this.$message.error)
})
.catch(err => {
this.$message.error(err)
})
},
isFollowed(){
axios.get("/follow/or/not/" + this.blog.userId)
.then(({data}) => this.followed = data)
.catch(this.$message.error)
},
follow(){
axios.put("/follow/" + this.blog.userId + "/" + !this.followed)
.then(() => {
this.$message.success(this.followed ? "已取消关注" : "已关注")
this.followed = !this.followed
})
.catch(this.$message.error)
},
formatTime(b) {
return b.getFullYear() + "年" + (b.getMonth() + 1) + "月" + b.getDate() + "日 ";
},
formatMinutes(m) {
if (m < 10) m = "0" + m
return m;
},
queryLoginUser(){
// 查询用户信息
axios.get("/user/me")
.then(({ data }) => {
// 保存用户
this.user = data;
if(this.user.id !== this.blog.userId){
this.isFollowed();
}
})
.catch(console.log)
},
// 获取父容器宽度,并且更新所有的子节点宽度,因为我们默认所有子节点的宽高等于父节点的宽高
updateItemWidth() {
this._width = this.container.offsetWidth || document.documentElement.offsetWidth
},
// 根据当前活动子项的下标计算各个子项的X轴位置
// 计算公式(子项的下标 - 当前活动下标) * 子项宽度 + 偏移(手指移动距离)
setTransform(offset) {
offset = offset || 0
each(this.items, (item, i) => {
let distance = (i - this.active) * this._width + offset
let transform = `translate3d(${distance}px, 0, 0)`
item.style.webkitTransform = transform
item.style.transform = transform
})
},
// 给每一个子项添加transition过度动画
setTransition(duration) {
duration = duration || this.duration
duration = typeof duration === 'number' ? (duration + 'ms') : duration
each(this.items, (item) => {
item.style.webkitTransition = duration
item.style.transition = duration
})
},
moveStart(e) {
console.log('moveStart')
this.start.x = e.changedTouches[0].pageX
this.start.y = e.changedTouches[0].pageY
this.setTransition('none')
},
moving(e) {
console.log('moving')
e.preventDefault()
e.stopPropagation()
let distanceX = e.changedTouches[0].pageX - this.start.x
let distanceY = e.changedTouches[0].pageY - this.start.y
if (Math.abs(distanceX) > Math.abs(distanceY)) {
this.isMoving = true
this.move.x = this.start.x + distanceX
this.move.y = this.start.y + distanceY
// 当活动子项为第一项且手指向右滑动或者活动项为最后一项切向左滑动的时候,添加阻力,形成一个拉弹簧的效果
if ((this.active === 0 && distanceX > 0) || (this.active === (this.items.length - 1) && distanceX < 0)) {
distanceX = distanceX * this.resistance
}
this.setTransform(distanceX)
}
},
moveEnd(e) {
console.log('moveEnd')
if (this.isMoving) {
e.preventDefault()
e.stopPropagation()
let distance = this.move.x - this.start.x
if (Math.abs(distance) > this.sensitivity) {
if (distance < 0) {
this.next()
} else {
this.prev()
}
} else {
this.back()
}
this.reset()
this.isMoving = false
}
},
next() {
let index = this.active + 1
// 运用动画切换到指定下标的子项
this.go(index)
},
prev() {
let index = this.active - 1
// 运用动画切换到指定下标的子项
this.go(index)
},
reset() {
this.start.x = 0
this.start.y = 0
this.move.x = 0
this.move.y = 0
},
back() {
this.setTransition()
this.setTransform()
},
destroy() {
this.setTransition('none')
},
// 运用动画切换到指定下标的子项
go(index) {
this.active = index
if (this.active < 0) {
this.active = 0
} else if (this.active > this.items.length - 1) {
this.active = this.items.length - 1
}
this.$emit('change', this.active)
this.setTransition()
this.setTransform()
}
}
})
</script>
</body>
</html>

View File

@ -0,0 +1,161 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>黑马点评</title>
<!-- 引入样式 -->
<link rel="stylesheet" href="./css/element.css">
<link href="./css/main.css" rel="stylesheet">
<link href="./css/blog-edit.css" rel="stylesheet">
<style type="text/css">
</style>
</head>
<body>
<div id="app">
<div class="header">
<div class="header-cancel-btn" @click="goBack">取消</div>
<div class="header-title">&nbsp;&nbsp;发笔记<i class="el-icon-info"></i></div>
<div class="header-commit">
<div class="header-commit-btn" @click="submitBlog">发布</div>
</div>
</div>
<div class="upload-box">
<input type="file" @change="fileSelected" name="file" ref="fileInput" style="display: none">
<div class="upload-btn" @click="openFileDialog">
<i class="el-icon-camera"></i>
<div style="font-size: 12px;line-height: 12px">上传照片</div>
</div>
<div class="pic-list">
<div class="pic-box" v-for="(f,i) in fileList" :key="i">
<img :src="f" alt="">
<i class="el-icon-close" @click="deletePic(i)"></i>
</div>
</div>
</div>
<div class="blog-title">
<input v-model="params.title" type="text" placeholder="填写标题更容易上首页哦~">
</div>
<div class="blog-content">
<textarea v-model="params.content" placeholder="最近打卡了什么地方,有什么新奇体验呢?"></textarea>
</div>
<div class="divider"></div>
<div class="blog-shop" @click="showDialog=true">
<div class="shop-left">关联商户</div>
<div v-if="selectedShop.name">{{selectedShop.name}}</div>
<div v-else>去选择&nbsp;<i class="el-icon-arrow-right"></i></div>
</div>
<div class="mask" v-show="showDialog" @click="showDialog=false"></div>
<transition name="el-zoom-in-bottom">
<div class="shop-dialog" v-show="showDialog">
<div class="blog-shop">
<div class="shop-left">关联商户</div>
</div>
<div class="search-bar">
<div class="city-select">杭州 <i class="el-icon-arrow-down"></i></div>
<div class="search-input">
<i class="el-icon-search" @click="queryShops"></i>
<input v-model="shopName" type="text" placeholder="搜索商户名称">
</div>
</div>
<div class="shop-list">
<div v-for="s in shops" class="shop-item" @click="selectShop(s)">
<div class="shop-name">{{s.name}}</div>
<div>{{s.area}}</div>
</div>
</div>
</div>
</transition>
</div>
<script src="./js/vue.js"></script>
<script src="./js/axios.min.js"></script>
<!-- 引入组件库 -->
<script src="./js/element.js"></script>
<script src="./js/common.js"></script>
<script src="./js/footer.js"></script>
<script>
const app = new Vue({
el: "#app",
data() {
return {
util,
fileList: [], // 文件列表
params: {},
showDialog: false, //
shops: [], // 商户信息
shopName: "", //商户名称
selectedShop: {}, // 选中的商户
}
},
created() {
this.checkLogin();
this.queryShops();
},
methods: {
queryShops() {
axios.get("/shop/of/name?name=" + this.shopName)
.then(({data}) => this.shops = data)
.catch(this.$message.error)
},
selectShop(s) {
this.selectedShop = s;
this.showDialog = false;
},
submitBlog() {
let {...data} = this.params;
data.images = this.fileList.join(",");
data.shopId = this.selectedShop.id;
axios.post("/blog", data)
.then(resp => location.href = "/info.html")
.catch(this.$message.error)
},
openFileDialog() {
this.$refs.fileInput.click();
},
fileSelected() {
let file = this.$refs.fileInput.files[0];
let formData = new FormData();
formData.append("file", file);
const config = {
headers: {"Content-Type": "multipart/form-data;boundary=" + new Date().getTime()}
};
axios
.post("/upload/blog", formData, config)
.then(({data}) => this.fileList.push('/imgs' + data))
.catch(this.$message.error);
},
deletePic(i) {
axios.get("/upload/blog/delete?name=" + this.fileList[i])
.then(() => this.fileList.splice(i, 1))
.catch(this.$message.error)
},
checkLogin() {
// 获取token
let token = sessionStorage.getItem("token");
if (!token) {
location.href = "login.html"
}
// 查询用户信息
axios.get("/user/me")
.then()
.catch(err => {
this.$message.error(err);
setTimeout(() => location.href = "login.html", 200)
})
},
goBack() {
history.back();
},
handleRemove(file) {
console.log(file);
}
},
})
</script>
</body>
</html>

View File

@ -0,0 +1,245 @@
.header {
background-color: #fff;
}
.top-bar {
height: 60px;
}
.header {
width: 100%;
height: 6%;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #ff6633;
position: fixed;
top: 0;
z-index: 500;
}
.shop-avg{
opacity: .4;
}
.header-back-btn {
width: 10%;
color: #ff6633;
font-size: 24px;
font-weight: bold;
}
.header-title {
width: 80%;
text-align: center;
font-size: 18px;
font-family: Hiragino Sans GB, Arial, Helvetica, "\5B8B\4F53", sans-serif;
}
.header-share {
width: 10%;
text-align: center;
font-size: 18px;
color: #82848a;
font-weight: bold;
font-family: Hiragino Sans GB, Arial, Helvetica, "\5B8B\4F53", sans-serif;
}
.blog-divider {
height: 10px;
background-color: #f3f1f1;
}
.blog-info-box{
position: relative;
overflow: hidden;
height: 85%;
width: 100%;
}
.blog-info-box.indicator{
position: absolute;
right: 3vw;
bottom: 3vw;
width: 10vw;
height: 10vw;
line-height: 10vw;
border-radius: 5vw;
text-align: center;
background-color: rgba(0,0,0,.5);
color: #fff;
font-size: 14px;
}
.swiper-item{
position: absolute;
left:0;
top:0;
width: 100%;
height: 100%;
}
.basic{
display: flex;
justify-content: space-between;
padding: 15px 15px 5px 15px;
}
.basic-icon {
width: 40px;
height: 40px;
padding: 1px;
background-color: #fff;
border-radius: 50%;
box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.07);
}
.basic-icon img {
border-radius: 50%;
width: 100%;
height: 100%;
}
.shop-basic{
margin: auto;
width: 80%;
border-radius: 5px;
display: flex;
justify-content: space-between;
padding: 15px 15px 5px 15px;
box-shadow: 0 4px 4px 2px rgba(0, 0, 0, 0.1);
}
.shop-icon {
width: 50px;
height: 50px;
}
.shop-icon img {
width: 100%;
height: 100%;
}
.zan-box{
width: 90%;
margin: auto;
padding: 20px 0 10px;
display: flex;
justify-content: space-between;
}
.zan-list{
width: 88%;
display: flex;
}
.user-icon-mini{
margin-left: -5px;
width: 20px;
height: 20px;
border-radius: 50%;
padding: 1px;
background-color: #fff;
box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.07);
}
.user-icon-mini img {
border-radius: 50%;
width: 100%;
height: 100%;
}
.basic-info {
width: 60%;
}
.basic-info .name{
font-weight: bold;
font-size: 12px;
color: #446889;
}
.basic-info .time{
display: inline-block;
padding: 0 10px;
margin: 5px 0 10px;
border-radius: 2px;
opacity: .4;
}
.logout-btn{
width: 100%;
height: 25px;
line-height: 25px;
border-radius: 12px;
text-align: center;
border: #ff6633 1px solid;
color: #ff6633;
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.04);
}
.blog-text{
width: 90%;
padding: 5px 20px;
}
.copyright {
color: #d1d1d1;
margin-top: 20px;
text-shadow: 0 1px 1px #fff;
text-align: center;
}
.blog-comments {
padding: 10px;
}
.comments-head {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: bold;
}
.comments-head span {
font-size: 12px;
font-weight: normal;
color: #82848a;
}
.comment-tags {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.comment-tags div {
width: 25%;
border: 1px solid #427fc4;
border-radius: 5px;
text-align: center;
color: #427fc4;
padding: 5px 10px;
margin-top: 7px;
}
.comment-list {
margin-top: 15px;
}
.comment-box {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
.comment-icon {
width: 55px;
}
.comment-icon img{
width: 48px;
height: 48px;
border-radius: 50%;
}
.comment-info {
width: 80%;
flex-grow: 1;
}
.comment-user {
font-size: 14px;
}
.comment-user span {
font-size: 10px;
padding: 0 10px;
border-radius: 8px;
background-color: #f7b253;
color: white;
}
.comment-images {
display: flex;
width: 100%;
overflow-x: scroll;
padding: 10px 0;
}
.comment-images img {
height: 94px;
width: 92px;
border-radius: 5px;
margin-right: 5px;
}

View File

@ -0,0 +1,174 @@
.header{
padding: 15px;
line-height: 20px;
display: flex;
justify-content: space-between;
text-align: center;
}
.header-cancel-btn{
font-size: 14px;
font-weight: bold;
}
.header-commit-btn{
color: white;
background-color: #F63;
padding: 0 12px;
border-radius: 15px;
}
.header-title i {
font-size: 14px;
}
.header-title {
text-align: center;
font-size: 18px;
font-family: Hiragino Sans GB,Arial,Helvetica,"\5B8B\4F53",sans-serif;
}
.upload-box {
padding: 15px;
display: flex;
overflow-x: scroll;
}
.upload-btn {
width: 70px;
height: 125px;
line-height: 40px;
text-align: center;
align-items: center;
border: 1px dashed #3a8ee6;
border-radius: 5px;
font-size: 30px;
color: #82848a;
margin-right: 10px;
}
.upload-btn i {
margin-top: 35px;
}
.pic-list {
display: flex;
overflow-x: scroll;
height: 125px;
}
.pic-box{
width: 100px;
height: 120px;
border-radius: 5px;
margin-right: 2px;
border: 1px solid #c0ccda;
position: relative;
}
.pic-box img {
width: 100px;
height: 120px;
border-radius: 5px;
}
.pic-box i {
position: absolute;
z-index: 99;
top: 2px;
right: 2px;
color: gray;
}
.blog-title,.blog-content {
padding: 5px 15px;
}
.blog-title input {
width: 100%;
line-height: 30px;
font-size: 14px;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #e6e6e8;
}
input::placeholder {
font-weight: bold;
color: #cccccc;
}
textarea::placeholder {
color: #cccccc;
}
.blog-content textarea{
width: 100%;
height: 310px;
border: 0;
}
.blog-shop {
color: #82848a;
padding: 15px;
display: flex;
justify-content: space-between;
}
.shop-left {
color: #111111;
font-size: 14px;
font-weight: bold;
}
.divider {
background-color: #f4f4f5;
height: 10px;
}
.end-gray {
background-color: #f4f4f5;
height: 100%;
}
.mask {
height: 100%;
width: 100%;
position: fixed;
z-index: 299;
top: 0;
left: 0;
background: rgba(0,0,0,0.3);
}
.shop-dialog {
position: absolute;
z-index: 999;
bottom: 0;
height: 500px;
width: 100%;
background-color: #fff;
}
.search-bar {
display: flex;
padding: 15px;
line-height: 30px;
justify-content: space-between;
}
.city-select {
font-weight: bold;
font-size: 14px;
margin-right: 10px;
}
.search-input {
width: 50%;
flex-grow: 1;
background-color: #f1f1f1;
line-height: 30px;
align-items: center;
border-radius: 20px;
display: flex;
padding: 0 10px ;
}
.search-input input {
margin-left: 10px;
border: 0;
width: 100%;
background-color: #f1f1f1;
}
input:focus,textarea:focus {
outline: none;
}
.shop-list {
padding: 15px;
overflow-y: scroll;
height: 100%;
}
.shop-item {
border-bottom: 1px solid #eae8e8;
padding: 8px 0;
}
.shop-name {
font-size: 14px;
font-weight: bold;
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,92 @@
/*搜索框*/
.search-bar{
background-color: #ff6633;
color: white;
display: flex;
justify-content: space-around;
height: 7%;
align-items: center;
padding: 0 8px;
}
.header-icon{
/*width: 2%;*/
font-size: 14px;
}
.search-input{
width: 70%;
}
.type-list {
height: 25%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.type-box{
width: 17%;
text-align: center;
}
.type-box img {
width: 100%;
}
.type-text{
color: #111;
font-size: 10px;
margin-top: -8px;
margin-bottom: 10px;
}
/*达人探店列表*/
.blog-list {
background-color: #eee;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
height: 60%;
overflow-y: auto;
}
.blog-box{
width: 48%;
background-color: #fff;
margin: 5px 0;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
border-radius: 3px;
}
.blog-img img{
width: 100%;
border-radius: 3px;
}
.blog-title {
padding: 2px 10px;
height: 36px;
width: 92%;
overflow: hidden;
}
.blog-foot {
display: flex;
justify-content: space-between;
margin: 10px 0 5px 0;
padding: 0 10px;
}
.blog-user-icon {
width: 10%;
margin-right: 3px;
}
.blog-user-name {
width: 65%;
overflow: hidden;
}
.blog-user-icon img{
width: 100%;
}
.blog-liked {
width: 25%;
display: flex;
justify-content: flex-end;
}
.blog-liked img{
width: 30%;
height: 75%;
margin-right: 2px;
}

View File

@ -0,0 +1,232 @@
.header{
width: 100%;
line-height: 40px;
height: 6%;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #ff6633;
}
.header-back-btn{
width: 10%;
color: #ff6633;
font-size: 22px;
}
.header-title {
width: 90%;
text-align: center;
font-size: 18px;
font-family: Hiragino Sans GB,Arial,Helvetica,"\5B8B\4F53",sans-serif;
}
.basic{
height: 15%;
display: flex;
justify-content: space-between;
padding: 15px 15px 5px 15px;
}
.basic-icon {
width: 80px;
height: 80px;
padding: 1px;
background-color: #fff;
border-radius: 50%;
box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.07);
}
.basic-icon img {
border-radius: 50%;
width: 100%;
height: 100%;
}
.basic-info {
width: 54%;
padding: 8px;
}
.basic-info .name{
overflow: hidden;
font-weight: bold;
font-size: 14px;
}
.basic-info span{
display: inline-block;
padding: 0 10px;
background-color: #eeeded;
margin: 5px 0 10px;
border-radius: 2px;
}
.edit-btn{
width: 90%;
line-height: 20px;
border-radius: 12px;
text-align: center;
border: #eeeded 1px solid;
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.04);
}
.logout-btn{
width: 18%;
margin-top: 8px;
height: 20px;
line-height: 20px;
color: white;
padding: 0 2px;
border-radius: 3px;
background-color: #f63;
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.04);
}
.introduce{
padding: 0 15px;
}
.content {
height: 61%;
}
.edit-container{
background-color: #f4f4f4;
}
.divider {
height: 1px;
background-color: #e4e4e4;
}
.info-box {
margin-bottom: 10px;
padding: 5px 15px;
background-color: #fff;
}
.info-item{
display: flex;
justify-content: space-between;
line-height: 40px;
}
.info-btn{
display: flex;
}
.info-btn div {
margin-left: 5px;
}
.blog-item {
display: flex;
padding: 10px;
height: 90px;
width: 90%;
box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.1);
margin-bottom: 10px;
}
.blog-img {
width: 70px;
height: 90px;
margin-right: 10px;
}
.blog-img img {
width: 100%;
height: 100%;
}
.blog-info {
width: 50%;
flex-grow: 1;
}
.blog-title {
line-height: 20px;
}
.blog-liked {
line-height: 16px;
align-items: center;
}
.blog-liked img {
width: 16px;
height: 16px;
}
.blog-comments i {
font-size: 16px;
}
.follow-info{
display: flex;
justify-content: space-between;
padding: 15px 10px 5px 10px;
align-items: center;
}
.follow-info-icon {
width: 15%;
padding: 1px;
background-color: #fff;
border-radius: 50%;
box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.07);
}
.follow-info-icon img {
border-radius: 50%;
width: 100%;
height: 100%;
}
.follow-info-name{
width: 56%;
padding: 8px;
font-size: 14px;
}
.follow-info-btn{
width: 30%;
font-size: 10px;
line-height: 20px;
height: 20px;
border: #ff6633 1px solid;
color: #ff6633;
border-radius: 5px;
text-align: center;
}
/*达人探店列表*/
.blog-list {
height: 100%;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
overflow-y: auto;
}
.blog-box{
width: 90%;
background-color: #fff;
margin: 5px 0;
box-shadow: 0 3px 4px 1px rgba(0, 0, 0, 0.1);
border-radius: 3px;
}
.blog-img2 img{
width: 100%;
border-radius: 3px;
}
.blog-title {
padding: 2px 10px;
line-height: 24px;
width: 92%;
overflow: hidden;
}
.blog-foot {
display: flex;
justify-content: space-between;
margin: 10px 0 5px 0;
padding: 0 10px;
}
.blog-user-icon {
width: 10%;
margin-right: 3px;
}
.blog-user-name {
width: 65%;
overflow: hidden;
}
.blog-user-icon img{
width: 100%;
}
.blog-liked {
width: 25%;
display: flex;
justify-content: flex-end;
}
.blog-liked img{
width: 30%;
height: 75%;
margin-right: 2px;
}

View File

@ -0,0 +1,63 @@
.login-container{
height: 100%;
}
.header{
width: 100%;
height: 7%;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #ff6633;
}
.header-back-btn{
width: 10%;
color: #ff6633;
font-size: 22px;
}
.header-title {
width: 90%;
text-align: center;
font-size: 18px;
font-family: Hiragino Sans GB,Arial,Helvetica,"\5B8B\4F53",sans-serif;
}
.content{
height: 93%;
background-color: #f7f5f5;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.login-form {
height: 85%;
}
.login-radio {
height: 15%;
width: 100%;
display: flex;
align-items: start;
}
input[type="radio"] + label::before {
content: "\a0"; /*不换行空格*/
display: inline-block;
vertical-align: middle;
font-size: 12px;
width: 0.7em;
height: 0.7em;
margin-right: .4em;
border-radius: 50%;
border: 2px solid #F63;
text-indent: .15em;
line-height: 1;
padding: .2em;
}
input[type="radio"]:checked + label::before {
background-color: #F63;
background-clip: content-box;
padding: .2em;
}
input[type="radio"] {
opacity: 0;
}

View File

@ -0,0 +1,59 @@
html {
font-size: 12px;
width: 100%;
}
body{
margin: 0;
}
html,body,#app{
height: 100%;
}
.el-tabs__item {
font-size: 14px;
font-weight: bold;
}
.el-tabs__active-bar {
height: 4px;
background-image: linear-gradient(to right, #F63, #f5b9a2);
}
.foot {
width: 100%;
height: 8%;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 -1px 2px 1px rgba(0, 0, 0, 0.1);
position: absolute;
bottom: 0;
}
.foot .add-btn {
width: 38px;
height: 38px;
box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.1);
border-radius: 18px;
}
.foot-box{
width: 20%;
color: #82848a;
text-align: center;
}
.foot-view {
font-size: 26px;
}
.foot-text{
font-size: 8px;
margin-top: -4px;
}
.foot-text, .foot-view{
text-align: center;
}
.active{
color: #ff6633;
}
/*element-ui的评价星星间隙*/
.el-rate__icon {
margin-right: 0;
}

View File

@ -0,0 +1,320 @@
.header {
background-color: #fff;
}
.top-bar {
height: 60px;
}
.header {
width: 100%;
line-height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #ff6633;
position: fixed;
top: 0;
z-index: 500;
}
.header-back-btn {
width: 10%;
color: #ff6633;
font-size: 24px;
font-weight: bold;
}
.header-title {
width: 80%;
text-align: center;
font-size: 18px;
font-family: Hiragino Sans GB, Arial, Helvetica, "\5B8B\4F53", sans-serif;
}
.header-share {
width: 10%;
text-align: center;
font-size: 18px;
color: #82848a;
font-weight: bold;
font-family: Hiragino Sans GB, Arial, Helvetica, "\5B8B\4F53", sans-serif;
}
.shop-title {
font-size: 20px;
font-weight: bold;
margin: 5px 0;
}
.shop-rate {
margin: 5px 0;
display: flex;
justify-content: space-between;
}
.shop-rate-info {
margin: 5px 0;
color: #82848a;
}
.shop-info-box {
padding: 0 10px;
}
.shop-rank {
margin: 5px 0;
display: flex;
width: 100%;
}
.shop-rank span {
color: #B15E2C;
font-size: 11px;
background: linear-gradient(
-248deg, #FFEBCF 2%, #FFECDD 61%);
border-radius: 1px;
height: 20px;
line-height: 20px;
padding: 0 6px;
}
.shop-rank div {
color: #5a5b5b;
font-size: 14px;
width: 45%;
text-align: end;
}
.shop-images {
display: flex;
overflow-x: scroll;
padding: 5px 0;
}
.shop-images img {
height: 106px;
width: 145px;
margin-right: 3px;
display: inline-block;
border-radius: 7px;
border: 1px solid #e1e1e1;
}
.shop-address {
font-size: 14px;
color: #82848a;
height: 42px;
display: flex;
align-items: center;
padding: 5px 0;
}
.shop-divider {
height: 10px;
background-color: #f3f1f1;
}
.shop-open-time {
display: flex;
padding: 10px;
font-size: 14px;
}
.shop-open-time div {
margin-right: 10px;
}
.line-right {
width: 40px;
flex-grow: 1;
color: #82848a;
font-size: 12px;
text-align: right;
}
.shop-voucher {
padding: 10px;
}
.voucher-icon {
display: inline-block;
line-height: 16px;
background-color: #f5a966;
color: white;
padding: 0 4px 2px 4px;
}
.voucher-box {
background-color: #fff1f1;
border-radius: 5px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px;
margin: 10px 0;
}
.voucher-circle {
display: flex;
flex-direction: column;
justify-content: space-around;
height: 80px;
}
.voucher-b{
height: 10px;
width: 10px;
background-color: #fff;
border-radius: 50%;
}
.voucher-left {
flex-grow: 1;
margin-left: 15px;
}
.voucher-right {
margin-right: 15px;
}
.voucher-title, .voucher-subtitle, .voucher-price {
padding: 5px 0;
}
.voucher-title {
font-weight: bold;
}
.voucher-subtitle {
color: #82848a;
}
.voucher-price {
color: #F63;
display: flex;
align-items: center;
}
.voucher-price div {
font-weight: bold;
font-size: 14px;
}
.voucher-price span {
margin-left: 10px;
font-size: 10px;
padding: 0 5px;
line-height: 10px;
background-color: #fce5e5;
}
.voucher-btn {
background-color: #ff6633;
color: white;
font-size: 14px;
line-height: 30px;
width: 65px;
text-align: center;
border-radius: 15px;
}
.seckill-box{
display: flex;
flex-direction: column;
align-items: flex-end;
font-size: 12px;
padding: 15px 0 0 0;
}
.seckill-box div{
font-size: 12px;
}
.disable-btn{
background-color: #adacab;
}
.seckill-time{
color: #F63;
}
.seckill-stock {
color: #adacab;
}
.seckill-stock span{
background-color: #fce5e5;
color: rgb(240, 51, 51);
}
.copyright {
color: #d1d1d1;
margin-top: 20px;
text-shadow: 0 1px 1px #fff;
text-align: center;
}
.shop-comments {
padding: 10px;
}
.comments-head {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: bold;
}
.comments-head span {
font-size: 12px;
font-weight: normal;
color: #82848a;
}
.comment-tags {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.comment-tags div {
width: 25%;
border: 1px solid #427fc4;
border-radius: 5px;
text-align: center;
color: #427fc4;
padding: 5px 10px;
margin-top: 7px;
}
.comment-list {
margin-top: 15px;
}
.comment-box {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
.comment-icon {
width: 55px;
}
.comment-icon img{
width: 48px;
height: 48px;
border-radius: 50%;
}
.comment-info {
width: 80%;
flex-grow: 1;
}
.comment-user {
font-size: 14px;
}
.comment-user span {
font-size: 10px;
padding: 0 10px;
border-radius: 8px;
background-color: #f7b253;
color: white;
}
.comment-images {
display: flex;
width: 100%;
overflow-x: scroll;
padding: 10px 0;
}
.comment-images img {
height: 94px;
width: 92px;
border-radius: 5px;
margin-right: 5px;
}

View File

@ -0,0 +1,102 @@
.header,.sort-bar,.shop-list {
background-color: #fff;
}
#app{
background-color: #f1f1f1;
}
.header{
width: 100%;
height: 7%;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #ff6633;
}
.header-back-btn{
width: 10%;
color: #ff6633;
font-size: 24px;
font-weight: bold;
}
.header-title {
width: 80%;
text-align: center;
font-size: 18px;
font-family: Hiragino Sans GB,Arial,Helvetica,"\5B8B\4F53",sans-serif;
}
.header-search {
width: 10%;
text-align: center;
font-size: 18px;
color: #ff6633;
}
.el-dropdown,.el-dropdown-menu__item {
font-size: 12px;
line-height: 20px;
}
.sort-bar {
display: flex;
justify-content: space-around;
height: 6%;
align-items: center;
margin-bottom: 5px;
}
.sort-item {
width: 20%;
text-align: center;
font-size: 12px;
}
.shop-list{
height: 87%;
background-color: #f1f1f1;
overflow-y: auto;
}
.shop-box {
display: flex;
padding: 10px;
margin-bottom: 5px;
border-radius: 3px;
background-color: #fff;
}
.shop-img {
text-align: center;
padding: 5px;
}
.shop-img img{
width: 95px;
height: 95px;
border-radius: 5px;
}
.shop-info {
width: 65%;
}
.shop-title {
font-weight: bold;
font-size: 14px;
}
.shop-rate {
display: flex;
justify-content: space-between;
}
.shop-area {
color: #6f6f71;
display: flex;
justify-content: space-between;
}
.shop-item {
line-height: 20px;
align-items: center;
}
.shop-address{
display: flex;
}
.shop-address i{
color: #6c6767;
}
.shop-address span{
height: 20px;
line-height: 20px;
overflow: hidden;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,139 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>黑马点评</title>
<!-- 引入样式 -->
<link rel="stylesheet" href="./css/element.css">
<link href="./css/index.css" rel="stylesheet">
<link href="./css/main.css" rel="stylesheet">
<style type="text/css">
.el-input__inner {
border-radius: 20px;
}
</style>
</head>
<body>
<div id="app">
<div class="search-bar">
<div class="city-btn">杭州 <i class="el-icon-arrow-down"></i></div>
<div class="search-input">
<el-input size="mini" placeholder="请输入商户名、地点">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
</div>
<div class="header-icon" @click="toPage(4)"><i class="el-icon-user"></i></div>
</div>
<div class="type-list">
<div class="type-box" v-for="t in types" :key="t.id" @click="toShopList(t.id, t.name)">
<div class="type-view"><img :src="'/imgs/' + t.icon" alt=""></div>
<div class="type-text">{{t.name}}</div>
</div>
</div>
<div class="blog-list" @scroll="onScroll">
<div class="blog-box" v-for="b in blogs" :key="b.id">
<div class="blog-img" @click="toBlogDetail(b)"><img :src="b.img" alt=""></div>
<div class="blog-title">{{b.title}}</div>
<div class="blog-foot">
<div class="blog-user-icon"><img :src="b.icon || '/imgs/icons/default-icon.png'" alt=""></div>
<div class="blog-user-name">{{b.name}}</div>
<div class="blog-liked" @click="addLike(b)">
<svg t="1646634642977" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2187" width="14" height="14">
<path d="M160 944c0 8.8-7.2 16-16 16h-32c-26.5 0-48-21.5-48-48V528c0-26.5 21.5-48 48-48h32c8.8 0 16 7.2 16 16v448zM96 416c-53 0-96 43-96 96v416c0 53 43 96 96 96h96c17.7 0 32-14.3 32-32V448c0-17.7-14.3-32-32-32H96zM505.6 64c16.2 0 26.4 8.7 31 13.9 4.6 5.2 12.1 16.3 10.3 32.4l-23.5 203.4c-4.9 42.2 8.6 84.6 36.8 116.4 28.3 31.7 68.9 49.9 111.4 49.9h271.2c6.6 0 10.8 3.3 13.2 6.1s5 7.5 4 14l-48 303.4c-6.9 43.6-29.1 83.4-62.7 112C815.8 944.2 773 960 728.9 960h-317c-33.1 0-59.9-26.8-59.9-59.9v-455c0-6.1 1.7-12 5-17.1 69.5-109 106.4-234.2 107-364h41.6z m0-64h-44.9C427.2 0 400 27.2 400 60.7c0 127.1-39.1 251.2-112 355.3v484.1c0 68.4 55.5 123.9 123.9 123.9h317c122.7 0 227.2-89.3 246.3-210.5l47.9-303.4c7.8-49.4-30.4-94.1-80.4-94.1H671.6c-50.9 0-90.5-44.4-84.6-95l23.5-203.4C617.7 55 568.7 0 505.6 0z" p-id="2188" :fill="b.isLike ? '#ff6633' : '#82848a'"></path>
</svg>
{{b.liked}}
</div>
</div>
</div>
</div>
<foot-bar :active-btn="1"></foot-bar>
</div>
<script src="./js/vue.js"></script>
<script src="./js/axios.min.js"></script>
<!-- 引入组件库 -->
<script src="./js/element.js"></script>
<script src="./js/common.js"></script>
<script src="./js/footer.js"></script>
<script>
const app = new Vue({
el: "#app",
data: {
isReachBottom: false,
types: [], // 类型列表
blogs: [], // 播客列表
current: 1,// blog的页码
},
created() {
// 查询类型
this.queryTypes();
this.queryHotBlogsScroll();
},
methods: {
queryTypes() {
axios.get("/shop-type/list")
.then(({data}) => {
this.types = data;
})
.catch(err => {
this.$message.error(err)
})
},
queryHotBlogsScroll() {
axios.get("/blog/hot?current=" + this.current)
.then(({data}) => {
data.forEach(b => b.img = b.images.split(",")[0]);
this.blogs = this.blogs.concat(data);
})
.catch(err => {
this.$message.error(err)
})
},
addLike(b) {
axios.put("/blog/like/" +b.id)
.then(({data}) => {
this.queryBlogById(b)
})
.catch(err => {
this.$message.error(err)
})
},
queryBlogById(b) {
axios.get("/blog/" + b.id)
.then(({data}) => {
b.liked = data.liked;
b.isLike = data.isLike;
})
.catch(() => {
this.$message.error
b.liked ++;
})
},
onScroll(e) {
let scrollTop = e.target.scrollTop;
let offsetHeight = e.target.offsetHeight;
let scrollHeight = e.target.scrollHeight;
if (scrollTop + offsetHeight > scrollHeight && !this.isReachBottom) {
this.isReachBottom = true
// 再次查询下一页数据
this.current++;
this.queryHotBlogsScroll();
} else {
this.isReachBottom = false
}
},
toShopList(id, name) {
location.href = "/shop-list.html?type=" + id + "&name=" + name
},
toBlogDetail(b) {
location.href = "/blog-detail.html?id=" + b.id
}
}
})
</script>
</body>
</html>

View File

@ -0,0 +1,136 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>黑马点评</title>
<!-- 引入样式 -->
<link rel="stylesheet" href="./css/element.css">
<link href="./css/main.css" rel="stylesheet">
<link href="./css/info.css" rel="stylesheet">
<style type="text/css">
</style>
</head>
<body>
<div id="app">
<div class="header">
<div class="header-back-btn" @click="goBack" ><i class="el-icon-arrow-left"></i></div>
<div class="header-title">资料编辑&nbsp;&nbsp;&nbsp;</div>
</div>
<div class="edit-container">
<div class="info-box">
<div class="info-item">
<div class="info-label">头像</div>
<div class="info-btn">
<img width="35" :src="user.icon || '/imgs/icons/default-icon.png'" alt="">
<div><i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="divider"></div>
<div class="info-item">
<div class="info-label">昵称</div>
<div class="info-btn">
<div>{{user.nickName}}</div>
<div>
<i class="el-icon-arrow-right"></i>
</div>
</div>
</div>
<div class="divider"></div>
<div class="info-item">
<div class="info-label">个人介绍</div>
<div class="info-btn">
<div style="overflow: hidden; width: 150px;text-align: right">{{info.introduce || '介绍一下自己'}}</div>
<div>
<i class="el-icon-arrow-right"></i>
</div>
</div>
</div>
</div>
<div class="info-box">
<div class="info-item">
<div class="info-label">性别</div>
<div class="info-btn">
<div>{{info.gender || '选择'}}</div>
<div><i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="divider"></div>
<div class="info-item">
<div class="info-label">城市</div>
<div class="info-btn">
<div>{{info.city || '选择'}}</div>
<div><i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="divider"></div>
<div class="info-item">
<div class="info-label">生日</div>
<div class="info-btn">
<div>{{info.birthday || '添加'}}</div>
<div><i class="el-icon-arrow-right"></i></div>
</div>
</div>
</div>
<div class="info-box">
<div class="info-item">
<div class="info-label">我的积分</div>
<div class="info-btn">
<div>查看积分</div>
<div><i class="el-icon-arrow-right"></i></div>
</div>
</div>
<div class="divider"></div>
<div class="info-item">
<div class="info-label">会员等级</div>
<div class="info-btn">
<div><a href="javascript:void(0)">成为VIP尊享特权</a></div>
<div><i class="el-icon-arrow-right"></i></div>
</div>
</div>
</div>
</div>
<foot-bar :active-btn="4"></foot-bar>
</div>
<script src="./js/vue.js"></script>
<script src="./js/axios.min.js"></script>
<!-- 引入组件库 -->
<script src="./js/element.js"></script>
<script src="./js/common.js"></script>
<script src="./js/footer.js"></script>
<script>
const app = new Vue({
el: "#app",
data: {
user: "",
info: {},
},
created() {
this.checkLogin();
},
methods: {
checkLogin() {
// 查询用户信息
axios.get("/user/me")
.then(({data}) => {
this.user = data;
this.info = JSON.parse(sessionStorage.getItem("userInfo")) || {}
})
.catch(err => {
this.$message.error(err);
setTimeout(() => location.href = "login.html", 1000)
})
},
goBack(){
history.back();
}
},
})
</script>
</body>
</html>

View File

@ -0,0 +1,243 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>黑马点评</title>
<!-- 引入样式 -->
<link rel="stylesheet" href="./css/element.css">
<link href="./css/main.css" rel="stylesheet">
<link href="./css/info.css" rel="stylesheet">
<style type="text/css">
.el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2), .el-tabs--bottom .el-tabs__item.is-top:nth-child(2), .el-tabs--top .el-tabs__item.is-bottom:nth-child(2), .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
padding-left: 15px;
}
.el-tabs, .el-tab-pane {
height: 100%;
}
.el-tabs__header {
height: 10%;
}
.el-tabs__content {
height: 90%;
}
</style>
</head>
<body>
<div id="app">
<div class="header">
<div class="header-back-btn" @click="goBack"><i class="el-icon-arrow-left"></i></div>
<div class="header-title">个人主页&nbsp;&nbsp;&nbsp;</div>
</div>
<div class="basic">
<div class="basic-icon">
<img :src="user.icon || '/imgs/icons/default-icon.png'" alt="">
</div>
<div class="basic-info">
<div class="name">{{user.nickName}}</div>
<span>杭州</span>
<div class="edit-btn" @click="toEdit">
编辑资料
</div>
</div>
<div class="logout-btn" @click="logout">
退出登录
</div>
</div>
<div class="introduce">
<span v-if="info.introduce"></span>
<span v-else>添加个人简介,让大家更好的认识你 <i class="el-icon-edit"></i></span>
</div>
<div class="content">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="笔记" name="1">
<div v-for="b in blogs" :key="b.id" class="blog-item">
<div class="blog-img"><img :src="b.images.split(',')[0]" alt=""></div>
<div class="blog-info">
<div class="blog-title">{{b.title}}</div>
<div class="blog-liked"><img src="/imgs/thumbup.png" alt=""> {{b.liked}}</div>
<div class="blog-comments"><i class="el-icon-chat-dot-round"></i> {{b.comments}}</div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="评价" name="2">评价</el-tab-pane>
<el-tab-pane label="粉丝(0)" name="3">粉丝(0)</el-tab-pane>
<el-tab-pane label="关注(0)" name="4">
<div class="blog-list" @scroll="onScroll">
<div class="blog-box" v-for="b in blogs2" :key="b.id">
<div class="blog-img2" @click="toBlogDetail(b)"><img :src="b.img" alt=""></div>
<div class="blog-title">{{b.title}}</div>
<div class="blog-foot">
<div class="blog-user-icon"><img :src="b.icon || '/imgs/icons/default-icon.png'" alt=""></div>
<div class="blog-user-name">{{b.name}}</div>
<div class="blog-liked" @click="addLike(b)">
<svg t="1646634642977" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="2187" width="14" height="14">
<path
d="M160 944c0 8.8-7.2 16-16 16h-32c-26.5 0-48-21.5-48-48V528c0-26.5 21.5-48 48-48h32c8.8 0 16 7.2 16 16v448zM96 416c-53 0-96 43-96 96v416c0 53 43 96 96 96h96c17.7 0 32-14.3 32-32V448c0-17.7-14.3-32-32-32H96zM505.6 64c16.2 0 26.4 8.7 31 13.9 4.6 5.2 12.1 16.3 10.3 32.4l-23.5 203.4c-4.9 42.2 8.6 84.6 36.8 116.4 28.3 31.7 68.9 49.9 111.4 49.9h271.2c6.6 0 10.8 3.3 13.2 6.1s5 7.5 4 14l-48 303.4c-6.9 43.6-29.1 83.4-62.7 112C815.8 944.2 773 960 728.9 960h-317c-33.1 0-59.9-26.8-59.9-59.9v-455c0-6.1 1.7-12 5-17.1 69.5-109 106.4-234.2 107-364h41.6z m0-64h-44.9C427.2 0 400 27.2 400 60.7c0 127.1-39.1 251.2-112 355.3v484.1c0 68.4 55.5 123.9 123.9 123.9h317c122.7 0 227.2-89.3 246.3-210.5l47.9-303.4c7.8-49.4-30.4-94.1-80.4-94.1H671.6c-50.9 0-90.5-44.4-84.6-95l23.5-203.4C617.7 55 568.7 0 505.6 0z"
p-id="2188" :fill="b.isLike ? '#ff6633' : '#82848a'"></path>
</svg>
{{b.liked}}
</div>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<foot-bar :active-btn="4"></foot-bar>
</div>
<script src="./js/vue.js"></script>
<script src="./js/axios.min.js"></script>
<!-- 引入组件库 -->
<script src="./js/element.js"></script>
<script src="./js/common.js"></script>
<script src="./js/footer.js"></script>
<script>
const app = new Vue({
el: "#app",
data: {
user: "",
activeName: "1",
info: {},
blogs: [],
blogs2: [], // 关注的人的播客
params: {
minTime: 0, // 上一次拉取到的时间戳
offset: 0, // 偏移量
},
count: 5,
isReachBottom: false,
},
created() {
this.queryUser();
},
methods: {
load() {
this.count += 2;
},
queryBlogs() {
axios.get("/blog/of/me")
.then(({data}) => this.blogs = data)
.catch(this.$message.error)
},
queryBlogsOfFollow(clear) {
if (clear) {
this.params.offset = 0;
this.params.minTime = new Date().getTime() + 1;
}
let {minTime, offset: os} = this.params;
axios.get("/blog/of/follow", {
params: {offset: os, lastId: minTime || new Date().getTime() + 1}
})
.then(({data}) => {
if (!data) {
return;
}
let {list, ...params} = data;
list.forEach(b => b.img = b.images.split(",")[0])
this.blogs2 = clear ? list : this.blogs2.concat(list);
this.params = params;
})
.catch(e => console.log(e))
},
queryUser() {
// 查询用户信息
axios.get("/user/me")
.then(({data}) => {
// 保存用户
this.user = data;
// 查询用户详情
this.queryUserInfo();
// 查询用户笔记
this.queryBlogs();
})
.catch(err => {
location.href = "login.html"
})
},
goBack() {
history.back();
},
queryUserInfo() {
axios.get("/user/info/" + this.user.id)
.then(({data}) => {
if (!data) {
return
}
// 保存用户详情
this.info = data;
// 保存到本地
sessionStorage.setItem("userInfo", JSON.stringify(data))
})
.catch(err => {
this.$message.error(err);
})
},
toEdit() {
location.href = 'info-edit.html'
},
logout() {
axios.post("/user/logout")
.then(() => {
// 清理session
sessionStorage.removeItem("token")
// 跳转
location.href = "/"
})
.catch(this.$message.error)
},
handleClick(r) {
if (r.name === '4') {
this.queryBlogsOfFollow(true);
}
},
addLike(b) {
axios.put("/blog/like/" + b.id)
.then(({data}) => {
this.queryBlogById(b);
})
.catch(err => {
this.$message.error(err)
})
},
queryBlogById(b) {
axios.get("/blog/" + b.id)
.then(({data}) => {
b.liked = data.liked;
b.isLike = data.isLike;
})
.catch(() => {
this.$message.error
b.liked++;
})
},
onScroll(e) {
let scrollTop = e.target.scrollTop;
let offsetHeight = e.target.offsetHeight;
let scrollHeight = e.target.scrollHeight;
if (scrollTop === 0) {
// 到顶部了,查询一次
this.queryBlogsOfFollow(true);
} else if (scrollTop + offsetHeight + 1 > scrollHeight && !this.isReachBottom) {
this.isReachBottom = true
// 再次查询下一页数据
this.queryBlogsOfFollow();
} else {
this.isReachBottom = false
}
}
},
})
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,105 @@
// let commonURL = "http://192.168.50.115:8081";
let commonURL = "/api";
// 设置后台服务地址
axios.defaults.baseURL = commonURL;
axios.defaults.timeout = 2000;
// request拦截器将用户token放入头中
let token = sessionStorage.getItem("token");
axios.interceptors.request.use(
config => {
if(token) config.headers['authorization'] = token
return config
},
error => {
console.log(error)
return Promise.reject(error)
}
)
axios.interceptors.response.use(function (response) {
// 判断执行结果
if (!response.data.success) {
return Promise.reject(response.data.errorMsg)
}
return response.data;
}, function (error) {
// 一般是服务端异常或者网络异常
console.log(error)
if(error.response.status == 401){
// 未登录,跳转
setTimeout(() => {
location.href = "/login.html"
}, 200);
return Promise.reject("请先登录");
}
return Promise.reject("服务器异常");
});
axios.defaults.paramsSerializer = function(params) {
let p = "";
Object.keys(params).forEach(k => {
if(params[k]){
p = p + "&" + k + "=" + params[k]
}
})
return p;
}
const util = {
commonURL,
getUrlParam(name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURI(r[2]);
}
return "";
},
formatPrice(val) {
if (typeof val === 'string') {
if (isNaN(val)) {
return null;
}
// 价格转为整数
const index = val.lastIndexOf(".");
let p = "";
if (index < 0) {
// 无小数
p = val + "00";
} else if (index === p.length - 2) {
// 1位小数
p = val.replace("\.", "") + "0";
} else {
// 2位小数
p = val.replace("\.", "")
}
return parseInt(p);
} else if (typeof val === 'number') {
if (!val) {
return null;
}
const s = val + '';
if (s.length === 0) {
return "0.00";
}
if (s.length === 1) {
return "0.0" + val;
}
if (s.length === 2) {
return "0." + val;
}
const i = s.indexOf(".");
if (i < 0) {
return s.substring(0, s.length - 2) + "." + s.substring(s.length - 2)
}
const num = s.substring(0, i) + s.substring(i + 1);
if (i === 1) {
// 1位整数
return "0.0" + num;
}
if (i === 2) {
return "0." + num;
}
if (i > 2) {
return num.substring(0, i - 2) + "." + num.substring(i - 2)
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,41 @@
Vue.component("footBar", {
template: `
<div class="foot">
<div class="foot-box" :class="{active: activeBtn === 1}" @click="toPage(1)">
<div class="foot-view"><i class="el-icon-s-home"></i></div>
<div class="foot-text">首页</div>
</div>
<div class="foot-box" :class="{active: activeBtn === 2}" @click="toPage(2)">
<div class="foot-view"><i class="el-icon-map-location"></i></div>
<div class="foot-text">地图</div>
</div>
<div class="foot-box" @click="toPage(0)">
<img class="add-btn" src="/imgs/add.png" alt="">
</div>
<div class="foot-box" :class="{active: activeBtn === 3}" @click="toPage(3)">
<div class="foot-view"><i class="el-icon-chat-dot-round"></i></div>
<div class="foot-text">消息</div>
</div>
<div class="foot-box" :class="{active: activeBtn === 4}" @click="toPage(4)">
<div class="foot-view"><i class="el-icon-user"></i></div>
<div class="foot-text">我的</div>
</div>
</div>
`,
data() {
return {
}
},
props: ['activeBtn'],
methods: {
toPage(i) {
if (i === 0) {
location.href = "/blog-edit.html"
} else if (i === 4) {
location.href = "/info.html"
} else if (i === 1){
location.href = "/"
}
}
}
})

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More