Skip to content

Commit

Permalink
prof: font-awesome cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
xichi committed Mar 8, 2020
1 parent 3a4cc45 commit 658b638
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 113 deletions.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# API文档

baseUrl: https://www.xichi.xyz/api
baseUrl: https://api.xichi.xyz/movieClub

## 目录

Expand Down
6 changes: 3 additions & 3 deletions src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ export const getEmailCode = (email) => {

//影评
export const getMovieReview = () => {
return request.get('/movieReview');
return request.get('/api/movieReview');
};

//详细影评
export const getMovieReviewDetail = id => {
return request.get(`/movieReview?id=${id}`);
return request.get(`/api/movieReview?id=${id}`);
};

//本周电影
export const getLatestMovies = () => {
return request.get('/latestMovies');
return request.get('/api/latestMovies');
};
22 changes: 8 additions & 14 deletions src/components/common/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<ul class="myHeader simpleHeader" v-if="simpleMode">
<li class="backward" @click="goBack">
<font-awesome-icon :icon="['far', 'caret-square-left']" size="2x" />
<i class="fa fa-chevron-left fa-lg"></i>
</li>
<slot name="title" v-if="titleShow"></slot>
<li class="home">
Expand All @@ -20,12 +20,11 @@
<slot name="write"></slot>
<slot name="submit"></slot>
<div class="mobile-icon">
<font-awesome-icon
:icon="['fas', 'list']"
class="icon"
:color="mobileIcon"
<i
class="fa fa-list icon"
:style="{ color: mobileIcon }"
@click="runMobileShow"
/>
></i>
</div>
<ul class="right">
<li class="weelky-movies dropdown">
Expand Down Expand Up @@ -58,16 +57,10 @@
</li>
<!-- <li class="contact-us"><router-link to="">联系我们</router-link></li> -->
<li class="sign-up">
<router-link :to="this.userLogin? '/profile': '/login'"
<i class="fa fa-user-o user-icon" align="bottom" v-show="userLogin"></i>
<router-link :to="this.userLogin ? '/profile' : '/login'"
>{{ userInfo.username || "Sign In" }}
</router-link>
<font-awesome-icon
:icon="['far', 'user']"
class="user-icon"
color="#fff"
align="bottom"
v-show="userLogin"
/>
</li>
</ul>
</ul>
Expand Down Expand Up @@ -175,6 +168,7 @@ export default {
float right
padding-right 20px
.user-icon
color #fff
font-size 0.4rem
.dropdown
position relative
Expand Down
9 changes: 5 additions & 4 deletions src/components/common/footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
<div class="head">
<div class="welcome">
<div>
<span class="icon">南邮<font-awesome-icon :icon="['fas', 'paper-plane']" /></span>
<span class="icon"
>南邮<i class="fa fa-paper-plane"></i></span>
<span>欢迎加入我们</span>
</div>
<div class="developer">
<div>Developer</div>
<ul>
<li><font-awesome-icon :icon="['fab', 'github']" size="lg" /></li>
<li><font-awesome-icon :icon="['fab', 'qq']" size="lg"/></li>
<li><font-awesome-icon :icon="['fas', 'laptop-code']" size="lg" /></li>
<li><i class="fa fa-github fa-lg"></i></li>
<li><i class="fa fa-qq fa-lg"></i></li>
<li><i class="fa fa-laptop fa-lg"></i></li>
</ul>
</div>
</div>
Expand Down
20 changes: 9 additions & 11 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,25 @@
<p class="title-in" @click="runMovieTodayShow">
<span>{{ movieToday.name }}</span>
<span>
<font-awesome-icon
class="kudos-empty kudos"
:icon="['far', 'heart']"
<i
class="fa fa-heart-o kudos-empty kudos"
v-show="!kudos"
@click.stop="kudosChange"
/>
<font-awesome-icon
class="kudos-full kudos"
:icon="['fas', 'heart']"
></i>
<i
class="fa fa-heart kudos-full kudos"
v-show="kudos"
@click.stop="kudosChange"
/>
></i>
</span>
</p>
<div class="dropdown-menu" v-show="movieTodayShow">
<div class="topbar">
<span>Movie Today</span>
<font-awesome-icon
:icon="['fas', 'angle-down']"
<i
class="fa fa-angle-down"
style="padding-left:5px;"
/>
></i>
</div>
<div class="mainbody">
<div class="right">
Expand Down
92 changes: 31 additions & 61 deletions src/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,11 @@
placeholder="请输入用户名或邮箱"
@focus="textAnime"
/>
<font-awesome-icon
class="icon user"
:icon="['fas', 'user']"
size="xs"
/>
<i class="fa fa-user icon user"></i>
<div class="line"></div>
</div>
<div class="text-input">
<font-awesome-icon
class="icon lock"
:icon="['fas', 'lock']"
size="xs"
/>
<i class="fa fa-lock icon lock"></i>
<input
type="password"
v-model="password"
Expand All @@ -39,20 +31,16 @@
@focus="textAnime"
/>
<div class="line"></div>
<font-awesome-icon
class="icon eye"
:icon="['fas', 'eye-slash']"
<i
class="fa fa-eye-slash icon eye"
v-show="!passwordHidden"
@click="runPasswordHidden"
size="xs"
/>
<font-awesome-icon
class="icon eye"
:icon="['fas', 'eye']"
></i>
<i
class="fa fa-eye icon eye"
v-show="passwordHidden"
@click="runPasswordHidden"
size="xs"
/>
></i>
<div class="options">
<div>忘记密码</div>
<div @click="toggleManageCheck">
Expand All @@ -77,19 +65,11 @@
placeholder="请输入用户名"
@focus="textAnime"
/>
<font-awesome-icon
class="icon user"
:icon="['fas', 'user']"
size="xs"
/>
<i class="fa fa-user icon user"></i>
<div class="line"></div>
</div>
<div class="text-input">
<font-awesome-icon
class="icon lock"
:icon="['fas', 'lock']"
size="xs"
/>
<i class="fa fa-lock icon lock"></i>
<input
type="password"
v-model="password"
Expand All @@ -98,20 +78,16 @@
@focus="textAnime"
/>
<div class="line"></div>
<font-awesome-icon
class="icon eye"
:icon="['fas', 'eye-slash']"
<i
class="fa fa-eye-slash icon eye "
v-show="!passwordHidden"
@click="runPasswordHidden"
size="xs"
/>
<font-awesome-icon
class="icon eye"
:icon="['fas', 'eye']"
></i>
<i
class="fa fa-eye icon eye "
v-show="passwordHidden"
@click="runPasswordHidden"
size="xs"
/>
></i>
</div>
<div class="text-input">
<input
Expand All @@ -121,19 +97,11 @@
placeholder="请输入邮箱"
@focus="textAnime"
/>
<font-awesome-icon
class="icon user"
:icon="['fas', 'envelope']"
size="xs"
/>
<i class="fa fa-envelope icon icon-xs "></i>
<div class="line"></div>
</div>
<div class="text-input">
<font-awesome-icon
class="icon email"
:icon="['fas', 'code']"
size="xs"
/>
<i class="fa fa-code icon icon-xs "></i>
<input
type="text"
ref="firstInput"
Expand Down Expand Up @@ -163,16 +131,16 @@
v-model="userMsg.password"
class="password"
/><span>
<font-awesome-icon
:icon="['fas', 'eye-slash']"
<i
class="fa fa-eye-slash icon eye"
v-show="!passwordHidden"
@click="runPasswordHidden"
/>
<font-awesome-icon
:icon="['fas', 'eye']"
></i>
<i
class="fa fa-eye icon eye"
v-show="passwordHidden"
@click="runPasswordHidden"
/>
></i>
</span>
</div>
<input type="button" value="退出" @click="signOut()" />
Expand Down Expand Up @@ -235,7 +203,7 @@ export default {
if (loginData.status === 1) {
const { data: userData } = await getUserInfo();
this.USER_SIGNIN(userData.data);
this.$router.push('/profile');
this.$router.push("/profile");
} else {
this.$message.error(loginData.message);
}
Expand Down Expand Up @@ -278,9 +246,9 @@ export default {
async sendEmail() {
try {
const { data: codeData } = await getEmailCode(this.email);
if(codeData.status === 1){
if (codeData.status === 1) {
this.$message.success("验证码已发送,请注意查收");
}else{
} else {
this.$message.error(codeData.message);
}
} catch (err) {
Expand All @@ -297,7 +265,7 @@ export default {
if (registerData.status === 1) {
const { data: userData } = await getUserInfo();
this.USER_SIGNIN(userData.data);
this.$router.push('/profile');
this.$router.push("/profile");
} else {
this.$message.error(registerData.message);
}
Expand Down Expand Up @@ -367,8 +335,10 @@ export default {
.icon
position absolute
bottom 9px
left 2px
left -1em
color #c4c4c4
.icon-xs::before
font-size .8em
.eye
left 100%
transform translateX(-120%)
Expand Down
12 changes: 5 additions & 7 deletions src/pages/movieReview/details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@
<div class="post-head">
<div class="title">{{ movieReview.title }}</div>
<div class="author">
<font-awesome-icon :icon="['far', 'user']" />{{
movieReview.author
}}
<i class="fa fa-user"></i>
{{ movieReview.author }}
</div>
<div class="footer">
<div class="postTime">
<font-awesome-icon :icon="['far', 'calendar']" />{{
movieReview.postTime
}}
<i class="fa fa-calendar"></i>
{{ movieReview.postTime }}
</div>
<div class="share">
<font-awesome-icon :icon="['far', 'paper-plane']" />
<i class="fa fa-paper-plane"></i>
Share
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/movieReview/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<my-header class="my-header" :lightMode="false">
<li id="write_btn" slot="write">
<router-link to="/movieReview/write"
>我要撰写 <font-awesome-icon :icon="['far', 'edit']"
/></router-link>
>我要撰写 <i class="fa fa-edit"></i>
</router-link>
</li>
</my-header>
<div id="movie-review-list">
Expand All @@ -23,11 +23,11 @@
</div>
<div slot="detail" class="detail">{{ item.detail }}</div>
<div slot="postTime" class="postTime">
<font-awesome-icon :icon="['far', 'calendar']" />
<i class="fa fa-calendar"></i>
{{ item.postTime }}
</div>
<div slot="author" class="author">
<font-awesome-icon :icon="['far', 'user']" />
<i class="fa fa-user"></i>
{{ item.author }}
</div>
<div slot="pic" class="pic" @click="clickFn('/movieReview/details/' + item.id, item.id)">
Expand Down
Loading

0 comments on commit 658b638

Please sign in to comment.