Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
feat: 添加"签到"功能
Browse files Browse the repository at this point in the history
1. 新增签到功能;
2. 修改部分功能逻辑;
3. 调整部分页面布局;
4. 修正代码风格.
  • Loading branch information
jsonleex committed Mar 23, 2018
1 parent 0a8071f commit 2a73f51
Show file tree
Hide file tree
Showing 18 changed files with 705 additions and 403 deletions.
22 changes: 19 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
<router-view v-if="!$route.meta.keepAlive"></router-view>
<div>
<svg-icon />

<pswp />
<payfor />
<post-menu />
<actionsheet />
<comment-input />
<payfor />
<check-in v-if="checkin"/>
</div>
</div>
</template>
Expand All @@ -18,15 +21,28 @@ import pswp from "@/components/pswp.vue";
import payfor from "@/components/payfor.vue";
import actionsheet from "@/components/actionsheet.vue";
import commentInput from "@/components/commentInput.vue";
// icons
import SvgIcon from "@/components/common/svgIcon.vue";
// 签到
import CheckIn from "@/page/checkin/CheckIn.vue";
import PostMenu from "@/page/PostMenu.vue";
export default {
name: "app",
components: {
pswp,
payfor,
actionsheet,
commentInput,
svgIcon: () =>
import(/* webpackChunkName: 'svgIcon' */ "@/components/common/svgIcon")
CheckIn,
SvgIcon,
PostMenu
},
computed: {
checkin() {
return this.$store.state.CONFIG.checkin || true;
}
}
};
</script>
Expand Down
73 changes: 45 additions & 28 deletions src/components/FootGuide.vue
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
<template>
<footer id="foot_guide">
<section @click="to('/feed/new')" class="guide_item" :class="{active: isCurPath('/feed')}">
<v-icon type='foot-home' width='.45' height='.45' class='foot_guide_icon' />
<span>首页</span>
</section>
<section @click="to('/discover')" class="guide_item" :class="{active: isCurPath('/discover')}">
<v-icon type='foot-discover' width='.45' height='.45' class='foot_guide_icon' />
<span>发现</span>
</section>
<section @click="showPostMenu" class="guide_item plus">
<v-icon type='foot-plus' height='.6' width='.6' class='foot_guide_icon plus' />
</section>
<section @click="to('/message/msg')" class="guide_item" :class="{active: isCurPath('/message')}">
<v-badge :dot='has_msg'>
<v-icon type='foot-message' width='.45' height='.45' class='foot_guide_icon' />
</v-badge>
<span>消息</span>
</section>
<section @click="to('/profile')" class="guide_item" :class="{active: isCurPath('profile')}">
<v-badge :dot='has_fans'>
<v-icon type='foot-profile' width='.45' height='.45' class='foot_guide_icon' />
</v-badge>
<span>我</span>
</section>
</footer>
<footer id="foot_guide">
<section @click="to('/feed/new')" class="guide_item" :class="{active: isCurPath('/feed')}">
<svg class="m-style-svg m-svg-def foot_guide_icon">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#foot-home"></use>
</svg>
<span>首页</span>
</section>
<section @click="to('/discover')" class="guide_item" :class="{active: isCurPath('/discover')}">
<svg class="m-style-svg m-svg-def foot_guide_icon">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#foot-discover"></use>
</svg>
<span>发现</span>
</section>
<section @click="showPostMenu" class="guide_item plus">
<svg class="m-style-svg m-svg-def foot_guide_icon plus">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#foot-plus"></use>
</svg>
</section>
<section @click="to('/message/msg')" class="guide_item" :class="{active: isCurPath('/message')}">
<v-badge :dot='has_msg'>
<svg class="m-style-svg m-svg-def foot_guide_icon">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#foot-message"></use>
</svg>
</v-badge>
<span>消息</span>
</section>
<section @click="to('/profile')" class="guide_item" :class="{active: isCurPath('profile')}">
<v-badge :dot='has_fans'>
<svg class="m-style-svg m-svg-def foot_guide_icon">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#foot-profile"></use>
</svg>
</v-badge>
<span>我</span>
</section>
</footer>
</template>
<script>
import { mapState } from "vuex";
import showPostMenu from "./postMenu/showPostMenu";
import bus from "@/bus.js";
export default {
name: "FootGuide",
data() {
Expand Down Expand Up @@ -56,7 +66,7 @@ export default {
return this.$route.fullPath.indexOf(path) > -1;
},
showPostMenu() {
showPostMenu.show({});
bus.$emit("post-menu");
}
},
mounted() {
Expand All @@ -66,9 +76,16 @@ export default {
</script>
<style lang="less">
.foot_guide_icon {
width: 45px;
height: 45px;
margin-bottom: 5px;
&.plus {
width: 65px;
height: 65px;
}
+ .v-badge-dot {
top: 0;
box-shadow: 0 0 0 1px #ed3f14;
box-shadow: 0 0 0 1px #ed3f14; /*no*/
}
}
</style>
Expand Down
2 changes: 1 addition & 1 deletion src/components/payfor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default {
this.cancel();
this.onSuccess(data);
})
.catch(err => {
.catch(() => {
this.cancel();
this.$Message.error("支付失败!");
})
Expand Down
86 changes: 0 additions & 86 deletions src/components/postMenu/postMenu.less

This file was deleted.

42 changes: 0 additions & 42 deletions src/components/postMenu/postMenu.vue

This file was deleted.

Loading

0 comments on commit 2a73f51

Please sign in to comment.