├── README.md
├── app.js
├── app.json
├── app.wxss
├── kawa.js
├── pages
├── chat
│ ├── chat.js
│ ├── chat.json
│ ├── chat.wxml
│ ├── chat.wxss
│ ├── comps
│ │ ├── chat-item.wxml
│ │ └── chat-item.wxss
│ └── controller.js
├── enroll
│ ├── enroll.js
│ ├── enroll.json
│ ├── enroll.wxml
│ ├── enroll.wxss
│ ├── info
│ │ ├── info.js
│ │ ├── info.json
│ │ ├── info.wxml
│ │ └── info.wxss
│ ├── join
│ │ ├── join.js
│ │ ├── join.json
│ │ ├── join.wxml
│ │ └── join.wxss
│ └── user
│ │ ├── user.js
│ │ ├── user.json
│ │ ├── user.wxml
│ │ └── user.wxss
├── exp
│ ├── controller.js
│ ├── exp.js
│ ├── exp.json
│ ├── exp.wxml
│ └── exp.wxss
├── form
│ ├── comps
│ │ ├── ckbox
│ │ │ ├── checkbox.js
│ │ │ ├── checkbox.json
│ │ │ ├── checkbox.wxml
│ │ │ └── checkbox.wxss
│ │ ├── comp.wxss
│ │ ├── input
│ │ │ ├── input.js
│ │ │ ├── input.json
│ │ │ ├── input.wxml
│ │ │ └── input.wxss
│ │ └── radio
│ │ │ ├── radio.js
│ │ │ ├── radio.json
│ │ │ ├── radio.wxml
│ │ │ └── radio.wxss
│ ├── form.js
│ ├── form.json
│ ├── form.wxml
│ └── form.wxss
├── home
│ ├── comps
│ │ ├── bulletin
│ │ │ ├── bulletin.js
│ │ │ ├── bulletin.json
│ │ │ ├── bulletin.wxml
│ │ │ └── bulletin.wxss
│ │ ├── chacard
│ │ │ ├── channel.js
│ │ │ ├── channel.json
│ │ │ ├── channel.wxml
│ │ │ └── channel.wxss
│ │ ├── hotcard
│ │ │ ├── hotcard.js
│ │ │ ├── hotcard.json
│ │ │ ├── hotcard.wxml
│ │ │ └── hotcard.wxss
│ │ ├── postlist
│ │ │ ├── controller.js
│ │ │ ├── postlist.js
│ │ │ ├── postlist.json
│ │ │ ├── postlist.wxml
│ │ │ └── postlist.wxss
│ │ ├── toplist
│ │ │ ├── toplist.js
│ │ │ ├── toplist.json
│ │ │ ├── toplist.wxml
│ │ │ └── toplist.wxss
│ │ └── userlist
│ │ │ ├── controller.js
│ │ │ ├── userlist.js
│ │ │ ├── userlist.json
│ │ │ ├── userlist.wxml
│ │ │ └── userlist.wxss
│ ├── controller.js
│ ├── home.js
│ ├── home.json
│ ├── home.wxml
│ └── home.wxss
├── join
│ ├── join.js
│ ├── join.json
│ ├── join.wxml
│ └── join.wxss
├── login
│ ├── login.js
│ ├── login.json
│ ├── login.wxml
│ └── login.wxss
├── logs
│ ├── logs.js
│ ├── logs.json
│ ├── logs.wxml
│ └── logs.wxss
├── me
│ ├── controller.js
│ ├── edit.js
│ ├── edit.json
│ ├── edit.wxml
│ ├── edit.wxss
│ ├── me.js
│ ├── me.json
│ ├── me.wxml
│ └── me.wxss
├── message
│ ├── controller.js
│ ├── list
│ │ ├── comment.js
│ │ ├── comment.json
│ │ ├── comment.wxml
│ │ ├── comment.wxss
│ │ ├── comment_ctr.js
│ │ ├── favor.js
│ │ ├── favor.json
│ │ ├── favor.wxml
│ │ ├── favor.wxss
│ │ ├── favor_ctr.js
│ │ └── shared.wxss
│ ├── message.js
│ ├── message.json
│ ├── message.wxml
│ └── message.wxss
├── point
│ ├── controller.js
│ ├── history
│ │ ├── history.js
│ │ ├── history.json
│ │ ├── history.wxml
│ │ └── history.wxss
│ ├── point.js
│ ├── point.json
│ ├── point.wxml
│ └── point.wxss
├── poll
│ ├── comps
│ │ ├── detail.js
│ │ ├── detail.json
│ │ ├── detail.wxml
│ │ └── detail.wxss
│ ├── poll.js
│ ├── poll.json
│ ├── poll.wxml
│ └── poll.wxss
├── poster
│ ├── poster.js
│ ├── poster.json
│ ├── poster.wxml
│ └── poster.wxss
├── search
│ ├── controller.js
│ ├── search.js
│ ├── search.json
│ ├── search.wxml
│ └── search.wxss
├── signin
│ ├── controller.js
│ ├── signin.js
│ ├── signin.json
│ ├── signin.wxml
│ └── signin.wxss
├── thread
│ ├── controller.js
│ ├── sublist
│ │ ├── sublist.js
│ │ ├── sublist.json
│ │ ├── sublist.wxml
│ │ └── sublist.wxss
│ ├── thread.js
│ ├── thread.json
│ ├── thread.wxml
│ ├── thread.wxss
│ └── xinput
│ │ ├── xinput.js
│ │ ├── xinput.json
│ │ ├── xinput.wxml
│ │ └── xinput.wxss
├── tmpl
│ ├── adver
│ │ ├── adunit.js
│ │ ├── adunit.json
│ │ ├── adunit.wxml
│ │ └── adunit.wxss
│ ├── cmmt
│ │ ├── kw-comment.js
│ │ ├── kw-comment.json
│ │ ├── kw-comment.wxml
│ │ └── kw-comment.wxss
│ ├── draw
│ │ ├── controller.js
│ │ ├── drawer.js
│ │ ├── drawer.json
│ │ ├── drawer.wxml
│ │ └── drawer.wxss
│ ├── goods
│ │ ├── goods.js
│ │ ├── goods.json
│ │ ├── goods.wxml
│ │ └── goods.wxss
│ ├── img-grid
│ │ ├── img-grid.js
│ │ ├── img-grid.json
│ │ ├── img-grid.wxml
│ │ └── img-grid.wxss
│ ├── input
│ │ ├── kw-input.js
│ │ ├── kw-input.json
│ │ ├── kw-input.wxml
│ │ └── kw-input.wxss
│ ├── like
│ │ ├── kw-like.js
│ │ ├── kw-like.json
│ │ ├── kw-like.wxml
│ │ └── kw-like.wxss
│ ├── link
│ │ ├── kw-link.js
│ │ ├── kw-link.json
│ │ ├── kw-link.wxml
│ │ └── kw-link.wxss
│ ├── loading
│ │ ├── loading.js
│ │ ├── loading.json
│ │ ├── loading.wxml
│ │ └── loading.wxss
│ ├── location
│ │ ├── location.js
│ │ ├── location.json
│ │ ├── location.wxml
│ │ └── location.wxss
│ ├── login
│ │ ├── dialog.js
│ │ ├── dialog.json
│ │ ├── dialog.wxml
│ │ └── dialog.wxss
│ ├── poll
│ │ ├── poll.js
│ │ ├── poll.json
│ │ ├── poll.wxml
│ │ └── poll.wxss
│ ├── post
│ │ ├── kw-post.js
│ │ ├── kw-post.json
│ │ ├── kw-post.wxml
│ │ └── kw-post.wxss
│ ├── tab
│ │ ├── kw-tab.js
│ │ ├── kw-tab.json
│ │ ├── kw-tab.wxml
│ │ └── kw-tab.wxss
│ ├── text
│ │ ├── kw-text.js
│ │ ├── kw-text.json
│ │ ├── kw-text.wxml
│ │ └── kw-text.wxss
│ └── video
│ │ ├── kw-video.js
│ │ ├── kw-video.json
│ │ ├── kw-video.wxml
│ │ └── kw-video.wxss
├── user
│ ├── cmmt
│ │ ├── comment.js
│ │ ├── comment.json
│ │ ├── comment.wxml
│ │ ├── comment.wxss
│ │ └── controller.js
│ ├── favor
│ │ ├── controller.js
│ │ ├── favor.js
│ │ ├── favor.json
│ │ ├── favor.wxml
│ │ └── favor.wxss
│ ├── favorite
│ │ ├── controller.js
│ │ ├── favorite.js
│ │ ├── favorite.json
│ │ ├── favorite.wxml
│ │ └── favorite.wxss
│ ├── friend
│ │ ├── friend.js
│ │ ├── friend.json
│ │ ├── friend.wxml
│ │ └── friend.wxss
│ ├── post
│ │ ├── controller.js
│ │ ├── post.js
│ │ ├── post.json
│ │ ├── post.wxml
│ │ └── post.wxss
│ └── user
│ │ ├── controller.js
│ │ ├── user.js
│ │ ├── user.json
│ │ ├── user.wxml
│ │ └── user.wxss
├── webview
│ ├── webview.js
│ ├── webview.json
│ ├── webview.wxml
│ └── webview.wxss
└── writer
│ ├── comps
│ └── link
│ │ ├── linkeditor.js
│ │ ├── linkeditor.json
│ │ ├── linkeditor.wxml
│ │ └── linkeditor.wxss
│ ├── controller.js
│ ├── writer.js
│ ├── writer.json
│ ├── writer.wxml
│ └── writer.wxss
├── project.config.json
├── res
├── 555.png
├── act.png
├── act2.png
├── arrow_right.png
├── auditing.png
├── blue
│ ├── arrow_left.png
│ ├── arrow_right.png
│ ├── clear.png
│ ├── comment.png
│ ├── erweima.png
│ ├── home.png
│ ├── home_focus.png
│ ├── like.png
│ ├── liked.png
│ ├── me.png
│ ├── me_focus.png
│ ├── msg.png
│ ├── msg_at.png
│ ├── msg_cmt.png
│ ├── msg_focus.png
│ ├── msg_like.png
│ ├── my_cmt.png
│ ├── my_favor.png
│ ├── my_follow.png
│ ├── my_like.png
│ ├── my_point.png
│ ├── my_post.png
│ ├── share.png
│ ├── share_to.png
│ ├── signin.png
│ ├── speaker.png
│ └── write.png
├── circle_mask.png
├── cyan
│ ├── arrow_left.png
│ ├── arrow_right.png
│ ├── clear.png
│ ├── comment.png
│ ├── erweima.png
│ ├── home.png
│ ├── home_focus.png
│ ├── like.png
│ ├── liked.png
│ ├── me.png
│ ├── me_focus.png
│ ├── msg.png
│ ├── msg_at.png
│ ├── msg_cmt.png
│ ├── msg_focus.png
│ ├── msg_like.png
│ ├── my_cmt.png
│ ├── my_favor.png
│ ├── my_follow.png
│ ├── my_like.png
│ ├── my_point.png
│ ├── my_post.png
│ ├── share.png
│ ├── share_to.png
│ ├── signin.png
│ ├── speaker.png
│ └── write.png
├── default
│ ├── arrow_left.png
│ ├── arrow_right.png
│ ├── clear.png
│ ├── comment.png
│ ├── erweima.png
│ ├── home.png
│ ├── home_focus.png
│ ├── like.png
│ ├── liked.png
│ ├── me.png
│ ├── me_focus.png
│ ├── msg.png
│ ├── msg_at.png
│ ├── msg_cmt.png
│ ├── msg_done.png
│ ├── msg_focus.png
│ ├── msg_like.png
│ ├── my_cmt.png
│ ├── my_favor.png
│ ├── my_follow.png
│ ├── my_like.png
│ ├── my_point.png
│ ├── my_post.png
│ ├── profile_setting.png
│ ├── share.png
│ ├── share_to.png
│ ├── signin.png
│ ├── speaker.png
│ └── write.png
├── del.png
├── down.png
├── empty.png
├── enroll.png
├── form.png
├── group.png
├── kefu.png
├── link.png
├── link_dark.png
├── loading.png
├── location.png
├── location1.png
├── menu.png
├── nav_msg.png
├── photo.png
├── placeholder.png
├── plus.png
├── rank_1.png
├── rank_2.png
├── rank_3.png
├── refresh.png
├── richtext.png
├── right.png
├── search.png
├── stop.png
├── time.png
├── verified.png
├── video.png
├── video_play.png
├── wechat.png
└── wx_moment.png
├── sitemap.json
├── style
├── icon.wxss
└── weui.wxss
└── utils
├── api.js
├── b64.js
├── biz.js
├── h2j
├── discode.js
├── html2json.js
├── htmlparser.js
└── parser.js
├── meu.js
└── util.js
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/login/login",
4 | "pages/home/home",
5 | "pages/message/message",
6 | "pages/me/me",
7 | "pages/thread/thread",
8 | "pages/writer/writer",
9 | "pages/message/list/favor",
10 | "pages/message/list/comment",
11 | "pages/user/post/post",
12 | "pages/user/cmmt/comment",
13 | "pages/user/favor/favor",
14 | "pages/user/favorite/favorite",
15 | "pages/user/user/user",
16 | "pages/user/friend/friend",
17 | "pages/webview/webview",
18 | "pages/chat/chat",
19 | "pages/exp/exp",
20 | "pages/signin/signin",
21 | "pages/me/edit",
22 | "pages/poster/poster",
23 | "pages/poll/poll",
24 | "pages/join/join",
25 | "pages/point/point",
26 | "pages/point/history/history",
27 | "pages/search/search",
28 | "pages/enroll/enroll",
29 | "pages/enroll/user/user",
30 | "pages/form/form"
31 | ],
32 | "permission": {
33 | "scope.userLocation": {
34 | "desc": "显示发帖的位置"
35 | }
36 | },
37 | "tabBar": {
38 | "list": [
39 | {
40 | "pagePath": "pages/home/home",
41 | "text": "首页"
42 | },
43 | {
44 | "pagePath": "pages/message/message",
45 | "text": "消息"
46 | },
47 | {
48 | "pagePath": "pages/me/me",
49 | "text": "我的"
50 | }
51 | ],
52 | "color": "#b5b5b5",
53 | "selectedColor": "#b5b5b5"
54 | },
55 | "window": {
56 | "backgroundTextStyle": "light",
57 | "navigationBarBackgroundColor": "#fff",
58 | "navigationBarTextStyle": "black",
59 | "backgroundColor": "#eee"
60 | },
61 | "sitemapLocation": "sitemap.json"
62 | }
--------------------------------------------------------------------------------
/kawa.js:
--------------------------------------------------------------------------------
1 | const theme_default = {
2 | Image: '/res/default',
3 | MainColor: '#A7B1B3',
4 | FavorColor: '#ff325A',
5 | TabSelectedColor: '#333',
6 | }
7 |
8 | const theme_blue = {
9 | Image: '/res/blue',
10 | MainColor: '#1890FF',
11 | }
12 |
13 | const theme_cyan = {
14 | Image: '/res/cyan',
15 | MainColor: '#20ACAB',
16 | }
17 |
18 | module.exports = {
19 | AppKey: "J3PDS76SH6JASQHX2QAY5VQ3QINXIYLEMVIREFADB7Z2BHCWC3VA====",
20 | Theme: theme_blue,
21 | }
22 |
--------------------------------------------------------------------------------
/pages/chat/chat.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "私信",
3 | "backgroundTextStyle": "dark",
4 | "usingComponents": {
5 | "kw-loading": "../tmpl/loading/loading",
6 | "kw-input": "../tmpl/input/kw-input"
7 | }
8 | }
--------------------------------------------------------------------------------
/pages/chat/chat.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/pages/chat/chat.wxss:
--------------------------------------------------------------------------------
1 | /* pages/message/list/chat.wxss */
2 | @import "./comps/chat-item.wxss";
3 |
4 | page {
5 | background-color: #EFEFEF;
6 | }
7 |
8 | ::-webkit-scrollbar {
9 | width: 0;
10 | height: 0;
11 | color: transparent;
12 | }
13 |
14 | .list {
15 | width: 100%;
16 | display: flex;
17 | flex-direction: column;
18 | }
19 |
20 | .chat-page-status-style{
21 | width: 100%;
22 | height: 54rpx;
23 | display: flex;
24 | justify-content: center;
25 | align-items: center;
26 | font-size: 26rpx;
27 | color: white;
28 | position: fixed;
29 | top:0;
30 | left:0;
31 | z-index: 20;
32 | }
33 |
34 | .refresh {
35 | position: fixed;
36 | bottom: 160rpx;
37 | right: 20rpx;
38 | width: 64rpx;
39 | height: 64rpx;
40 | }
--------------------------------------------------------------------------------
/pages/chat/comps/chat-item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item.time}}
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{item.content}}
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/pages/chat/comps/chat-item.wxss:
--------------------------------------------------------------------------------
1 | .time-style {
2 | margin-top: 30rpx;
3 | color:#ababab;
4 | padding: 8rpx 10rpx 6rpx 10rpx;
5 | border-radius: 6rpx;
6 | width: auto;
7 | font-size: 24rpx;
8 | line-height: 22rpx;
9 | text-align: center;
10 | }
11 |
12 | .chat-avatar {
13 | width: 70rpx;
14 | height: 70rpx;
15 | border-radius: 50%;
16 | margin-left: 15rpx;
17 | margin-right: 15rpx;
18 | }
19 |
20 | .isMyWordStyle {
21 | background-color: #a7d5f6;
22 | color: #213d52;
23 | margin-right: -1rpx;
24 | margin-left: 14rpx;
25 | word-wrap: break-word;
26 | }
27 |
28 | .isOtherWordStyle {
29 | background-color: white;
30 | color: #333333;
31 | margin-right: 14rpx;
32 | margin-left: -1rpx;
33 | word-wrap: break-word;
34 | }
35 |
36 | .chat-list-pic-style {
37 | border-radius: 10rpx;
38 | margin-left: 5rpx;
39 | width: 150rpx;
40 | height: 280rpx;
41 | }
42 |
43 | .voice-duration-style {
44 | color: #666666;
45 | font-size: 26rpx;
46 | align-self: center;
47 | margin-top: 3rpx;
48 | margin-left: 5rpx;
49 | }
50 |
51 | .chat-list-arrow-style {
52 | width: 11rpx;
53 | height: 20rpx;
54 | margin-top: 25rpx
55 | }
56 |
57 | .arrow-right {
58 | margin-top: 16rpx;
59 | width:0;
60 | height:0;
61 |
62 | border-top: 16rpx solid transparent;
63 | border-left: 20rpx solid #a7d5f6;
64 | border-bottom: 16rpx solid transparent;
65 | }
66 |
67 | .arrow-left {
68 | margin-top: 16rpx;
69 | width:0;
70 | height:0;
71 |
72 | border-top: 16rpx solid transparent;
73 | border-right: 20rpx solid white;
74 | border-bottom: 16rpx solid transparent;
75 | }
--------------------------------------------------------------------------------
/pages/enroll/enroll.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "活动报名",
3 | "usingComponents": {
4 | "info": "./info/info",
5 | "join": "./join/join",
6 | "kw-login": "../tmpl/login/dialog"
7 | }
8 | }
--------------------------------------------------------------------------------
/pages/enroll/enroll.wxss:
--------------------------------------------------------------------------------
1 |
2 | .title {
3 | font-size: 38rpx;
4 | font-weight: bold;
5 | margin-bottom: 16rpx;
6 | }
7 |
8 | .poster {
9 | border-radius: 24rpx;
10 | width: 100%;
11 | }
12 |
13 | .lefttime {
14 | margin-left: auto;
15 | padding: 32rpx 0px;
16 | display: flex;
17 | align-items: center;
18 | color: #666;
19 | }
20 |
21 | .number {
22 | background: #f8f8f8;
23 | padding: 12rpx 24rpx;
24 | color: #1890ff;
25 | margin: 0px 16rpx;
26 | border-radius: 8rpx;
27 | font-weight: bold;
28 | }
29 |
30 | .arrow_right {
31 | margin-left: auto;
32 | }
33 |
34 | .arrow_right image {
35 | width: 36rpx;
36 | height: 36rpx;
37 | opacity: .8;
38 | }
39 |
40 | .item {
41 | padding: 12rpx;
42 | display: flex;
43 | align-items: center;
44 | color: #333;
45 | }
46 |
47 | .item image {
48 | opacity: .8;
49 | width: 34rpx;
50 | height: 34rpx;
51 | margin-right: 32rpx;
52 | }
53 |
54 | .item text {
55 | font-size: 28rpx;
56 | }
57 |
58 | .h1 {
59 | font-size: 36rpx;
60 | font-weight: bold;
61 | margin-bottom: 16rpx;
62 | }
63 |
64 | .actionbar {
65 | background: white;
66 | position: fixed;
67 | bottom: 0;
68 | left: 0;
69 | width: 100%;
70 | padding: 20rpx;
71 | }
72 |
73 | .actionbar button {
74 | width: 60%;
75 | color:white;
76 | font-size: 32rpx;
77 | opacity: 1;
78 | background: #1890ff;
79 | }
80 |
81 |
--------------------------------------------------------------------------------
/pages/enroll/info/info.js:
--------------------------------------------------------------------------------
1 | // pages/poll/comps/detail.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | enroll: {
8 | type: Object,
9 | value: {},
10 | },
11 | data: {
12 | type: Object,
13 | value: {},
14 | },
15 | show: {
16 | type: Boolean,
17 | value: false,
18 | }
19 | },
20 |
21 | /**
22 | * 组件的初始数据
23 | */
24 | data: {
25 | title: "投票细则"
26 | },
27 |
28 | /**
29 | * 组件的方法列表
30 | */
31 | methods: {
32 | clickClose: function() {
33 | this.triggerEvent('onRequestClose')
34 | },
35 | clickCancel: function() {
36 | this.triggerEvent('onClickCancel')
37 | }
38 | }
39 | })
40 |
--------------------------------------------------------------------------------
/pages/enroll/info/info.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/enroll/info/info.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{enroll.title}}
6 |
7 | 活动时间:
8 | {{enroll.startend}}
9 | 活动细则:
10 |
11 | {{enroll.detail}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/pages/enroll/info/info.wxss:
--------------------------------------------------------------------------------
1 | .-title {
2 | font-size: 32rpx;
3 | color: gray;
4 | padding: 24rpx 28rpx;
5 | }
6 |
7 | .mask {
8 | position: fixed;
9 | top: 0px; left: 0px; right: 0px; bottom: -1000px;
10 | z-index: 1999;
11 | background-color: rgba(0, 0, 0, .6);
12 | }
13 |
14 | .dialog {
15 | position: fixed;
16 | top: 20vh; left: 96rpx; right: 96rpx;
17 | z-index: 999;
18 | background: white;
19 | border-radius: 12rpx;
20 | display: flex;
21 | flex-direction: column;
22 | align-items: center;
23 | padding: 12rpx 0rpx;
24 | }
25 |
26 | .close {
27 | top: 12rpx;
28 | right: 18rpx;
29 | position: absolute;
30 | width: 38rpx;
31 | height: 38rpx;
32 | z-index: 999;
33 | }
34 |
35 | .detail {
36 | width: 100%;
37 | box-sizing: border-box;
38 | padding: 32rpx;
39 | border-radius: 24rpx;
40 | font-size: 28rpx;
41 | color: #666;
42 | }
43 |
44 | .body {
45 | min-height: 200px;
46 | max-height: 300px;
47 | overflow: auto;
48 | }
49 |
50 | .cancel {
51 | outline: none;
52 | background: #f8f8f8;
53 | color: #1890ff;
54 | }
55 | .cancel::after{ border: none; }
56 | .cancel:hover {
57 | background: #eee;
58 | }
--------------------------------------------------------------------------------
/pages/enroll/join/join.js:
--------------------------------------------------------------------------------
1 | // pages/enroll/join/join.js
2 | Component({
3 | /* 组件的属性列表 */
4 | properties: {
5 | user_data: {
6 | type: Object,
7 | value: {},
8 | },
9 | show: {
10 | type: Boolean,
11 | value: false,
12 | }
13 | },
14 |
15 | /* 组件的初始数据 */
16 | data: {
17 | name: '',
18 | copr: '',
19 | phone: '',
20 | wxid: '',
21 | },
22 |
23 | /* 组件的方法列表 */
24 | methods: {
25 | clickClose: function() {
26 | this.triggerEvent('onRequestClose')
27 | },
28 | clickSubmit: function() {
29 | // validate
30 | var { user_data, name, corp, phone, wxid }= this.data
31 | if (user_data.name && !name) {
32 | wx.showToast({ title: '姓名没有填写哦', icon: 'none'},)
33 | return
34 | }
35 | if (user_data.corp && !corp) {
36 | wx.showToast({ title: '公司没有填写哦', icon: 'none'})
37 | return
38 | }
39 | if (user_data.phone && !phone) {
40 | wx.showToast({ title: '电话没有填写哦', icon: 'none'})
41 | return
42 | }
43 | if (user_data.wx && !wxid) {
44 | wx.showToast({ title: '微信没有填写哦', icon: 'none'})
45 | return
46 | }
47 |
48 | // submit
49 | this.triggerEvent('onSubmit', {name, corp, phone, wx: wxid})
50 | },
51 |
52 | // input bind
53 | inputName: function(e) {
54 | this.setData({name: e.detail.value })
55 | },
56 | inputCorp: function(e) {
57 | this.setData({corp: e.detail.value })
58 | },
59 | inputPhone: function(e) {
60 | this.setData({phone: e.detail.value })
61 | },
62 | inputWx: function(e) {
63 | this.setData({wxid: e.detail.value })
64 | }
65 | }
66 | })
67 |
--------------------------------------------------------------------------------
/pages/enroll/join/join.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/enroll/join/join.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 报名
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/pages/enroll/join/join.wxss:
--------------------------------------------------------------------------------
1 | .-title {
2 | font-size: 32rpx;
3 | color: gray;
4 | padding: 24rpx 28rpx;
5 | }
6 |
7 | .mask {
8 | position: fixed;
9 | top: 0px; left: 0px; right: 0px; bottom: -1000px;
10 | z-index: 1999;
11 | background-color: rgba(0, 0, 0, .6);
12 | }
13 |
14 | .dialog {
15 | position: fixed;
16 | top: 20vh; left: 96rpx; right: 96rpx;
17 | z-index: 999;
18 | background: white;
19 | border-radius: 12rpx;
20 | display: flex;
21 | flex-direction: column;
22 | align-items: center;
23 | padding: 12rpx 0rpx;
24 | }
25 |
26 | .close {
27 | top: 12rpx;
28 | right: 18rpx;
29 | position: absolute;
30 | width: 38rpx;
31 | height: 38rpx;
32 | z-index: 999;
33 | }
34 |
35 | .join_btn {
36 | font-size: 32rpx;
37 | width: 60%;
38 | color: white;
39 | background: #1890ff;
40 | margin: 32rpx auto;
41 | }
42 |
43 | .join_list {
44 | width: 100%;
45 | box-sizing: border-box;
46 | padding: 0rpx 12rpx;
47 | font-size: 28rpx;
48 | color: #666;
49 | }
50 |
51 | .join_item {
52 | background: #f8f8f8;
53 | margin: 16rpx 12rpx;
54 | padding: 18rpx;
55 | height: 96rpx;
56 | box-sizing: border-box;
57 | }
--------------------------------------------------------------------------------
/pages/enroll/user/user.js:
--------------------------------------------------------------------------------
1 | const api = require('../../../utils/api.js')
2 | const util = require('../../../utils/util.js')
3 |
4 | const PageSize = 20
5 |
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | id: 0,
13 | users: [],
14 | page: 1,
15 | loading: false,
16 | hasmore: false,
17 | },
18 |
19 | /* 生命周期函数--监听页面加载 */
20 | onLoad: function (options) {
21 | firsLoad(this, options.id)
22 | },
23 |
24 |
25 | /* 页面相关事件处理函数--监听用户下拉动作 */
26 | onPullDownRefresh: function () {
27 | firsLoad(this, this.data.id)
28 | },
29 |
30 | /* 页面上拉触底事件的处理函数 */
31 | onReachBottom: function () {
32 | loadMore(this)
33 | },
34 | })
35 |
36 | function firsLoad(view, id) {
37 | api.getEnrollUserList(id, 1, PageSize).then( resp => {
38 | var users = resp.data
39 | users.map( user => {
40 | user.joinTime = util.prettyTime(new Date(user.created_at*1000))
41 | })
42 | var hasmore = users.length == PageSize
43 | view.setData({ users: users, id: id, page: 1, hasmore })
44 | }).catch( err => {
45 | console.log("get enroll user:", err)
46 | })
47 | }
48 |
49 | function loadMore(view) {
50 | var { id, page, users = [] } = view.data
51 | view.setData({ loading: true })
52 | api.getEnrollUserList(id, page + 1, PageSize).then( resp => {
53 | var others = resp.data
54 | var hasmore = true
55 | if (others) {
56 | others.map( user => {
57 | user.joinTime = util.prettyTime(new Date(user.created_at*1000))
58 | })
59 | hasmore = others.length == PageSize
60 | }
61 | view.setData({ users: users.concat(others), id: id, page: page+1, hasmore, loading: false})
62 | }).catch( err => {
63 | view.setData({ loading: false})
64 | console.log("get enroll user:", err)
65 | })
66 | }
--------------------------------------------------------------------------------
/pages/enroll/user/user.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "参与人",
3 | "usingComponents": {
4 | "kw-loading": "../../tmpl/loading/loading"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/enroll/user/user.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{item.user.nickname}}
9 |
10 | {{item.joinTime}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/pages/enroll/user/user.wxss:
--------------------------------------------------------------------------------
1 | /* pages/enroll/user/user.wxss */
2 | .user {
3 | background: white;
4 | padding: 24rpx 16rpx;
5 | display: flex;
6 | align-items: center;
7 | border-bottom: 1rpx solid #f8f8f8;
8 | }
9 |
10 | .timearrow {
11 | margin-left: auto;
12 | display: flex;
13 | align-items: center;
14 | }
15 |
16 | .timearrow image {
17 | width: 42rpx;
18 | height: 42rpx;
19 | opacity: .7;
20 | margin-left: 16rpx;
21 | }
--------------------------------------------------------------------------------
/pages/exp/controller.js:
--------------------------------------------------------------------------------
1 | const api = require('../../utils/api.js')
2 | const util = require('../../utils/util.js')
3 | const biz = require('../../utils/biz.js')
4 |
5 | const app = getApp()
6 |
7 | var view = undefined
8 | function setup(_view) {
9 | view = _view
10 | }
11 | function onUnload() {
12 | view = undefined
13 | }
14 |
15 | function onLoad(options) {
16 | var theme = view.data.theme
17 | wx.setNavigationBarColor({
18 | frontColor: theme.fgColor,
19 | backgroundColor: theme.bgColor,
20 | })
21 |
22 | var user = app.globalData.userInfo
23 | user.joinDays = util.getDaysFromNow(user.created_at)
24 | view.setData({ user: user })
25 |
26 | var grades = app.globalData.grades
27 | var i = getGrade(grades, user.exp_count)
28 | view.setData({ usrGrade: grades[i]})
29 | view.setData({ grades: grades })
30 |
31 | var next = {}
32 | if (i+1 >= grades.length) {
33 | next.percent = 100
34 | next.label = '已达最高级'
35 | } else {
36 | next.percent = (user.exp_count - grades[i].need_exp) * 100 /grades[i+1].need_exp
37 | next.percent = Math.round(next.percent)
38 | next.label = '下一个等级,' + 'Lv' + grades[i+1].level + ' ' + grades[i+1].show_name
39 | }
40 | view.setData({
41 | next: next,
42 | })
43 |
44 | // 加载类型列表
45 | api.getExpKindList().then(resp => {
46 | view.setData({kinds: resp.data})
47 | }).catch(err => {
48 | console.log(err)
49 | })
50 | }
51 |
52 |
53 | function onReachBottom() {
54 |
55 | }
56 |
57 | // 最低级别需要经验应该为 0
58 | // 否则初始的时候无法获得等级
59 | function getGrade(grades, exp) {
60 | if (!grades || grades.length == 0) {
61 | return
62 | }
63 |
64 | // 从小到大排列
65 | grades.sort((a, b) => {
66 | return a.level > b.level
67 | })
68 |
69 | // 遇到第一个满足条件的等级时退出
70 | // 得到当前对应的等级
71 | for (var i = grades.length-1; i >= 0; i--) {
72 | if (exp >= grades[i].need_exp) {
73 | return i
74 | }
75 | }
76 | return
77 | }
78 |
79 | module.exports = {
80 | setup: setup,
81 | onLoad: onLoad,
82 | onUnload: onUnload,
83 | onReachBottom: onReachBottom,
84 | }
--------------------------------------------------------------------------------
/pages/exp/exp.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../kawa.js')
3 | const util = require('../../utils/util.js')
4 |
5 | var bgColor = util.lightenColor(kawa.Theme.MainColor, 10)
6 | var fgColor = util.invertColor(bgColor, true)
7 |
8 | // pages/signin/signin.js
9 | Page({
10 |
11 | /**
12 | * 页面的初始数据
13 | */
14 | data: {
15 | theme: {
16 | bgColor: bgColor,
17 | fgColor: fgColor,
18 | },
19 | user: {
20 | joinDays: 0,
21 | },
22 | grades:[
23 | ],
24 | kinds: [
25 | ],
26 | usrGrade: {
27 | },
28 | next: {
29 | grade: {},
30 | percent: 0,
31 | }
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面加载
36 | */
37 | onLoad: function (options) {
38 | ctr.setup(this)
39 | ctr.onLoad(options)
40 | },
41 |
42 | onUnload: function() {
43 | ctr.onUnload()
44 | },
45 |
46 | /**
47 | * 页面上拉触底事件的处理函数
48 | */
49 | onReachBottom: function () {
50 |
51 | },
52 | })
--------------------------------------------------------------------------------
/pages/exp/exp.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "经验等级",
3 | "backgroundColor": "#fff"
4 | }
--------------------------------------------------------------------------------
/pages/exp/exp.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Lv{{usrGrade.level}}
7 |
8 | {{usrGrade.show_name}}
9 | 经验值:{{user.exp_count}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | {{user.nickname}}
21 | 你已经加入社区 {{user.joinDays}} 天啦
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 升级进度
33 | {{next.label}}
34 |
35 |
36 |
37 |
38 |
39 |
40 | 等级说明
41 |
42 |
43 |
44 |
45 |
46 |
47 | Lv{{item.level}}
48 | {{item.show_name}}
49 | {{ ' ' + item.need_exp + ' '}}
50 | 点经验
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/pages/exp/exp.wxss:
--------------------------------------------------------------------------------
1 | /* pages/signin/signin.wxss */
2 | page {
3 | background-color: #fff;
4 | }
5 |
6 | .bg {
7 | height: 380rpx;
8 | }
9 |
10 | .exp {
11 | padding-top: 8%;
12 | display: flex;
13 | align-items: center;
14 | justify-content: center;
15 | }
16 |
17 | .exp .level {
18 | font-size: 128rpx;
19 | font-weight: 400;
20 | }
21 |
22 | .exp .show_name {
23 | font-size: 48rpx;
24 | font-weight: 400;
25 | }
26 |
27 | .exp .value {
28 | font-size: 32rpx;
29 | }
30 |
31 |
32 | .user-card {
33 | position: absolute;
34 | top: 300rpx;
35 | right: 32rpx;
36 | left: 32rpx;
37 | background-color: white;
38 | box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
39 | border-radius: 8rpx;
40 | padding: 24rpx 16rpx;
41 | z-index: 1999;
42 | }
43 |
44 | .user-card .avatar {
45 | width: 128rpx;
46 | height: 128rpx;
47 | border-radius: 50%;
48 | }
49 |
50 | .user-card .title {
51 | font-size: 38rpx;
52 | font-weight: 800;
53 | margin-left: 8rpx;
54 | }
55 |
56 | .exp-title {
57 | font-size: 38rpx;
58 | font-weight: 800;
59 | margin-bottom: 20rpx;
60 | }
61 |
62 | .next {
63 | padding: 0 32rpx;
64 | margin-bottom: 12rpx;
65 | }
66 |
67 | .next .label {
68 | font-size: 28rpx;
69 | font-weight: 800;
70 | color: gray;
71 | margin-left: 18rpx;
72 | }
73 |
74 | .ranks {
75 | padding: 0 32rpx;
76 | }
77 |
78 | .ranks .item {
79 | margin-top: 16rpx;
80 | margin-bottom: 16rpx;
81 | display: flex;
82 | flex-direction: row;
83 | align-items: center;
84 | }
85 |
86 | .ranks .item .index {
87 | color: #333;
88 | font-size: 32rpx;
89 | font-weight: 800;
90 | margin-right: 32rpx;
91 | }
92 |
93 | .ranks .item .circle {
94 | margin-right: 24rpx;
95 | width: 22rpx;
96 | height: 22rpx;
97 | border-radius: 50%;
98 | border: 1px solid transparent;
99 | }
100 |
101 | .ranks .item .level {
102 | margin-right:12rpx;
103 | color: #444;
104 | font-weight:bold;
105 | font-size: 30rpx;
106 | }
107 |
108 |
--------------------------------------------------------------------------------
/pages/form/comps/ckbox/checkbox.js:
--------------------------------------------------------------------------------
1 | // pages/form/comps/ckbox/checkbox.js
2 | Component({
3 | /* 组件的属性列表 */
4 | properties: {
5 | attrs: {
6 | type: Object,
7 | value: {},
8 | },
9 | value: {
10 | type: Object,
11 | value: undefined,
12 | },
13 | index: {
14 | type: Number,
15 | value: 0,
16 | },
17 | disable: {
18 | type: Boolean,
19 | value: false,
20 | }
21 | },
22 |
23 | /* 组件的初始数据 */
24 | data: {
25 |
26 | },
27 |
28 | observers: {
29 | 'value': function (value) {
30 | const { attrs = { options: []}} = this.data
31 | if (value) {
32 | var kv = {}
33 | value.value.map( v => {
34 | kv[v.id] = v
35 | })
36 | attrs.options.map( opt => {
37 | opt.checked = kv[opt.id] && kv[opt.id].checked
38 | })
39 | this.setData({ attrs })
40 | }
41 | }
42 | },
43 |
44 | /* 组件的方法列表 */
45 | methods: {
46 | click: function(e) {
47 | if (!this.data.disable) {
48 | var index = e.currentTarget.dataset.index
49 | var item = this.data.attrs.options[index]
50 | item.checked = item.checked? false:true
51 | this.setData({ attrs: this.data.attrs })
52 | }
53 | },
54 |
55 | getResult: function(e) {
56 | var { options } = this.data.attrs
57 | var result = options.filter( opt => opt.checked )
58 | if (result.length == 0 ) {
59 | return undefined
60 | }
61 | return {type:"checkbox", value: result}
62 | }
63 | }
64 | })
65 |
--------------------------------------------------------------------------------
/pages/form/comps/ckbox/checkbox.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/form/comps/ckbox/checkbox.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | *
4 | {{index+1}}.
5 | 多选
6 | {{attrs.title}}
7 |
8 |
9 |
10 |
11 | {{item.name}}
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/form/comps/ckbox/checkbox.wxss:
--------------------------------------------------------------------------------
1 | @import "../comp.wxss";
2 |
3 | .checkbox {
4 | display: flex;
5 | align-items: center;
6 | background: #f8f8f8;
7 | margin: 16rpx 12rpx;
8 | padding: 28rpx;
9 | }
10 |
11 | .icon-normal {
12 | margin-left: auto;
13 | width: 42rpx;
14 | height: 42rpx;
15 | border: 1px solid gray;
16 | border-radius: 4rpx;
17 | }
18 |
19 | .icon-check {
20 | background: #1890ff;
21 | border-color: #1890ff;
22 | color: white;
23 | display: flex;
24 | justify-content: center;
25 | align-items: center;
26 | }
27 |
28 | .icon-check::after {
29 | font-family: "cuIcon";
30 | content: "\e645";
31 | color: var(--white) !important;
32 | right: 5px;
33 | font-size: 32rpx;
34 | line-height: 16px;
35 | }
--------------------------------------------------------------------------------
/pages/form/comps/comp.wxss:
--------------------------------------------------------------------------------
1 | .title {
2 | margin-bottom: 24rpx;
3 | }
4 |
5 | .require {
6 | color: red;
7 | margin-right: 6rpx;
8 | }
9 |
10 | .type {
11 | border-radius: 2rpx;
12 | border: 1rpx solid #1890ff;
13 | padding: 4rpx 8rpx;
14 | color: #1890ff;
15 | font-size: 28rpx;
16 | margin: 0px 16rpx;
17 | }
18 |
19 | .card {
20 | margin: 16rpx 0rpx;
21 | background: white;
22 | padding: 24rpx;
23 | }
--------------------------------------------------------------------------------
/pages/form/comps/input/input.js:
--------------------------------------------------------------------------------
1 | // pages/form/comps/input/input.js
2 | Component({
3 | /* 组件的属性列表 */
4 | properties: {
5 | attrs: {
6 | type: Object,
7 | value: {},
8 | },
9 | value: {
10 | type: Object,
11 | value: undefined,
12 | },
13 | disable: {
14 | type: Boolean,
15 | value: false,
16 | },
17 | index: {
18 | type: Number,
19 | value: 0,
20 | }
21 | },
22 |
23 | /* 组件的初始数据 */
24 | data: {
25 | text: '',
26 | },
27 |
28 | observers: {
29 | 'value': function (value) {
30 | if (value) {
31 | this.setData({text: value.value })
32 | }
33 | }
34 | },
35 |
36 | /* 组件的方法列表 */
37 | methods: {
38 | bindInput: function(e) {
39 | this.setData({text: e.detail.value })
40 | },
41 | getResult: function(e) {
42 | if (!this.data.text) {
43 | return undefined
44 | }
45 | return {type:"text", value: this.data.text}
46 | }
47 | }
48 | })
49 |
--------------------------------------------------------------------------------
/pages/form/comps/input/input.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/form/comps/input/input.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | *
4 | {{index+1}}.
5 | 填空
6 | {{attrs.title}}
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/pages/form/comps/input/input.wxss:
--------------------------------------------------------------------------------
1 | @import "../comp.wxss";
2 |
3 | .input {
4 | background: #f8f8f8;
5 | margin: 16rpx 12rpx;
6 | padding: 24rpx;
7 | height: 128rpx;
8 | width: 680rpx;
9 | box-sizing: border-box;
10 | }
--------------------------------------------------------------------------------
/pages/form/comps/radio/radio.js:
--------------------------------------------------------------------------------
1 | // pages/form/comps/radio/radio.js
2 | Component({
3 | /* 组件的属性列表 */
4 | properties: {
5 | attrs: {
6 | type: Object,
7 | value: {},
8 | },
9 | value: {
10 | type: Object,
11 | value: undefined,
12 | },
13 | disable: {
14 | type: Boolean,
15 | value: false,
16 | },
17 | index: {
18 | type: Number,
19 | value: 0,
20 | }
21 | },
22 |
23 | /* 组件的初始数据 */
24 | data: {
25 | checkedIndex: -1,
26 | },
27 |
28 | observers: {
29 | 'value': function (value) {
30 | const { attrs = { options: [] } } = this.data
31 | if (value) {
32 | attrs.options.map( (attr, i) => {
33 | if (attr.id === value.value.id) {
34 | this.setData({ checkedIndex: i})
35 | }
36 | })
37 | }
38 | }
39 | },
40 |
41 | /* 组件的方法列表 */
42 | methods: {
43 | click: function(e) {
44 | if (!this.data.disable) {
45 | var index = e.currentTarget.dataset.index
46 | this.setData({ checkedIndex: index })
47 | }
48 | },
49 | getResult: function(e) {
50 | var { checkedIndex, attrs } = this.data
51 | if (checkedIndex < 0) {
52 | return undefined
53 | }
54 | return {
55 | type: "radio",
56 | value: attrs.options[checkedIndex]
57 | }
58 | }
59 | }
60 | })
61 |
--------------------------------------------------------------------------------
/pages/form/comps/radio/radio.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/form/comps/radio/radio.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | *
4 | {{index+1}}.
5 | 单选
6 | {{attrs.title}}
7 |
8 |
9 |
10 |
11 | {{item.name}}
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/form/comps/radio/radio.wxss:
--------------------------------------------------------------------------------
1 | @import "../comp.wxss";
2 |
3 | .radio {
4 | display: flex;
5 | align-items: center;
6 | background: #f8f8f8;
7 | margin: 16rpx 12rpx;
8 | padding: 24rpx;
9 | }
10 |
11 | .icon-normal {
12 | margin-left: auto;
13 | width: 42rpx;
14 | height: 42rpx;
15 | border: 1px solid gray;
16 | border-radius: 50%;
17 | }
18 |
19 | .icon-check {
20 | background: #1890ff;
21 | border-color: #1890ff;
22 | color: white;
23 | display: flex;
24 | justify-content: center;
25 | align-items: center;
26 | }
27 |
28 | .icon-check::after {
29 | font-family: "cuIcon";
30 | content: "\e645";
31 | color: var(--white) !important;
32 | right: 5px;
33 | font-size: 32rpx;
34 | line-height: 16px;
35 | }
--------------------------------------------------------------------------------
/pages/form/form.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "问卷调查",
3 | "usingComponents": {
4 | "form-input": "./comps/input/input",
5 | "form-radio": "./comps/radio/radio",
6 | "form-checkbox": "./comps/ckbox/checkbox",
7 | "kw-login": "../tmpl/login/dialog"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/form/form.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{form.title}}
3 | {{form.detail}}
4 |
5 | 共 {{form.count}} 题, {{form.expiredTime}} 结束
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/pages/form/form.wxss:
--------------------------------------------------------------------------------
1 | .h1 {
2 | font-size: 42rpx;
3 | font-weight: bold;
4 | margin-bottom: 18rpx;
5 | }
6 |
7 | .date {
8 | color: gray;
9 | }
10 |
11 | .actionbar {
12 | border-top: 1rpx solid #f8f8f8;
13 | position: fixed;
14 | bottom: 0;
15 | left: 0; width: 100%;
16 | background: white;
17 | padding: 24rpx 0px;
18 | }
19 |
20 | .actionbar .blue {
21 | width: 60%;
22 | color:white;
23 | font-size: 32rpx;
24 | background: #1890ff;
25 | }
26 |
27 | .actionbar .gray {
28 | width: 60%;
29 | font-size: 32rpx;
30 | }
31 |
--------------------------------------------------------------------------------
/pages/home/comps/bulletin/bulletin.js:
--------------------------------------------------------------------------------
1 | const kawa = require('../../../../kawa.js')
2 |
3 | Component({
4 | /* 组件的属性列表 */
5 | properties: {
6 | value: {
7 | type: Object,
8 | value: {},
9 | }
10 | },
11 |
12 | /* 组件的初始数据 */
13 | data: {
14 | theme: { images: kawa.Theme.Image },
15 |
16 | },
17 |
18 | /* 组件的方法列表 */
19 | methods: {
20 | clickSpeaker: function () {
21 | var url = this.data.value.link
22 | if (url) {
23 | wx.navigateTo({
24 | url: '/pages/webview/webview?q=' + encodeURIComponent(url),
25 | })
26 | }
27 | }
28 | }
29 | })
--------------------------------------------------------------------------------
/pages/home/comps/bulletin/bulletin.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/home/comps/bulletin/bulletin.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 公告:
5 | {{ value.title }}
6 |
7 |
--------------------------------------------------------------------------------
/pages/home/comps/bulletin/bulletin.wxss:
--------------------------------------------------------------------------------
1 | .card {
2 | background-color: #fff;
3 | margin-bottom: 16rpx;
4 | position: relative;
5 | padding: 18rpx 24rpx;
6 | }
7 |
8 | .speaker {
9 | width: 720rpx;
10 | font-size: 28rpx;
11 | }
12 |
13 | .speaker_image {
14 | width: 30rpx;
15 | height: 30rpx;
16 | margin-right: 16rpx;
17 | vertical-align: middle;
18 | margin-top: -5rpx;
19 | }
20 |
21 | .line1 {
22 | text-overflow: ellipsis;
23 | overflow: hidden;
24 | white-space: nowrap;
25 | }
26 |
--------------------------------------------------------------------------------
/pages/home/comps/chacard/channel.js:
--------------------------------------------------------------------------------
1 | const api = require('../../../../utils/api.js')
2 |
3 | Component({
4 | /* 组件的属性列表 */
5 | properties: {
6 |
7 | },
8 |
9 | lifetimes: {
10 | attached: function() {
11 | firstLoad(this)
12 | }
13 | },
14 |
15 | /* 组件的初始数据 */
16 | data: {
17 | items: [
18 | {
19 | name: "今日签到",
20 | url: "/pages/signin/signin",
21 | color: "#69be51",
22 | image: "/res/academy_icon.png",
23 | },
24 | {
25 | name: "报名活动",
26 | url: "/pages/enroll/list/list",
27 | color: "#f49c44",
28 | image: "/res/hot_icon.png",
29 | },
30 | {
31 | name: "问卷调查",
32 | url: "/pages/form/list/list",
33 | color: "#e14162",
34 | image: "/res/selection_icon.png",
35 | },
36 | {
37 | name: "投票活动",
38 | url: "/pages/poll/list/list",
39 | color: "#5f7ef6",
40 | image: "/res/hashtag.png",
41 | },
42 | {
43 | name: "积分商城",
44 | url: "/pages/point/point",
45 | color: "#5f7ef6",
46 | image: "/res/hashtag.png",
47 | },
48 | ],
49 | kv: {}, // url => hot?
50 | },
51 |
52 | /**
53 | * 组件的方法列表
54 | */
55 | methods: {
56 | click: function(e) {
57 | var item = e.currentTarget.dataset.item
58 | var kv = this.data.kv
59 | kv[item.url] = false
60 | this.setData({ kv })
61 | }
62 | }
63 | })
64 |
65 | // 显示小红点的逻辑
66 | // 签到:记录
67 | // 活动、问卷、投票记录最后进入时间,和最新的活动创建时间做比较如果早于活动
68 | // 创建时间则提示,如果晚于则说明刚刚看过了
69 | function firstLoad(view) {
70 | var viewlog = wx.getStorageSync('viewlog') || {}
71 | api.getHotList().then( resp => {
72 | var hots = resp.data
73 | var kv = {}
74 | hots && hots.map( hot => {
75 | if (hot.value.created_at > (viewlog[hot.key] || 0)) {
76 | kv[`/pages/${hot.key}/list/list`] = true
77 | }
78 | })
79 | view.setData({ kv })
80 | }).catch( err => {
81 | console.log("get hots err", err)
82 | })
83 | }
84 |
--------------------------------------------------------------------------------
/pages/home/comps/chacard/channel.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/home/comps/chacard/channel.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{item.name}}
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/pages/home/comps/chacard/channel.wxss:
--------------------------------------------------------------------------------
1 | .card {
2 | background-color: #ffffff;
3 | margin-bottom: 16rpx;
4 | position: relative;
5 | padding: 18rpx 24rpx;
6 | }
7 |
8 | .card .h1 {
9 | font-size: 32rpx;
10 | font-weight: bold;
11 | margin-bottom: 12rpx;
12 | }
13 |
14 | .list {
15 | padding: 10rpx 0;
16 | display: flex;
17 | align-items: center;
18 | flex-wrap: wrap;
19 | }
20 |
21 | .item {
22 | width: 20%;
23 | display: flex;
24 | justify-content: center;
25 | align-items: center;
26 | }
27 |
28 | .item .inner {
29 | padding: 8rpx 0rpx;
30 | position: relative;
31 | display: flex;
32 | flex-direction: column;
33 | align-items: center;
34 | }
35 |
36 | .item .hot {
37 | position: absolute;
38 | top: 0;right: 0;
39 | width: 16rpx;
40 | height: 16rpx;
41 | background: red;
42 | border-radius: 50%;
43 | }
44 |
45 | .item .img {
46 | box-shadow: 0px 0px 12rpx 0px rgba(0,0,0,0.1);
47 | border-radius: 40%;
48 | width: 72rpx;
49 | height: 72rpx;
50 | padding: 18rpx;
51 | box-sizing: border-box;
52 | }
53 |
54 | .item .txt {
55 | color: #444;
56 | margin-top: 12rpx;
57 | font-size: 24rpx;
58 | word-break: keep-all;
59 | }
--------------------------------------------------------------------------------
/pages/home/comps/hotcard/hotcard.js:
--------------------------------------------------------------------------------
1 | const api = require('../../../../utils/api.js')
2 |
3 | Component({
4 | /* 组件的属性列表 */
5 | properties: {
6 |
7 | },
8 |
9 | lifetimes: {
10 | attached: function() {
11 | firstLoad(this)
12 | }
13 | },
14 |
15 | /* 组件的初始数据 */
16 | data: {
17 | items: [],
18 | },
19 |
20 | /**
21 | * 组件的方法列表
22 | */
23 | methods: {
24 |
25 | }
26 | })
27 |
28 | function firstLoad(view) {
29 | api.getHotList().then( resp => {
30 | var items = resp.data
31 | items && items.map( item => {
32 | item.typeStr = TypeNameMap[item.key] || ''
33 | if (item.key == 'form') {
34 | item.value_image = item.value.image || '/res/act2.png'
35 | } else {
36 | item.value_image = item.value.image || item.value.poster
37 | }
38 | item.url = `/pages/${item.key}/${item.key}?id=${item.value.id}`
39 | })
40 | view.setData({ items: resp.data })
41 | }).catch( err => {
42 | console.log("get hots err", err)
43 | })
44 | }
45 |
46 | const TypeNameMap = {
47 | poll: "投票",
48 | enroll: "报名",
49 | form: "问卷"
50 | }
51 |
--------------------------------------------------------------------------------
/pages/home/comps/hotcard/hotcard.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/home/comps/hotcard/hotcard.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.typeStr}} {{item.value.title}}
10 |
11 | {{item.value.detail}}
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/pages/home/comps/hotcard/hotcard.wxss:
--------------------------------------------------------------------------------
1 | /* pages/home/comps/hotcard/hotcard.wxss */
2 | .card {
3 | background-color: #ffffff;
4 | position: relative;
5 | margin-bottom: 18rpx;
6 | }
7 |
8 | .swiper {
9 | height: 180rpx;
10 | width: 100%;
11 | }
12 |
13 | .item {
14 | display: flex;
15 | }
16 |
17 | .inner {
18 | width: 100%;
19 | position: relative;
20 | overflow: hidden;
21 | padding: 24rpx;
22 | display: flex;
23 | align-items: center;
24 | box-sizing: border-box;
25 | margin-top: -12rpx;
26 | }
27 |
28 | .item .img {
29 | border-radius: 12rpx;
30 | width: 110rpx;
31 | height: 110rpx;
32 | margin-right: 24rpx;
33 | }
34 |
35 | .item .h2 {
36 | font-size: 30rpx;
37 | margin-bottom: 8rpx;
38 | display: flex;
39 | align-items: center;
40 | width: 100%;
41 |
42 | /* single line */
43 | text-overflow: ellipsis;
44 | overflow: hidden;
45 | white-space: nowrap;
46 | }
47 |
48 | .item .type {
49 | font-size: 24rpx;
50 | color: #1890ff;
51 | line-height: 32rpx;
52 | padding: 0rpx 8rpx;
53 | margin-right: 8rpx;
54 | border-radius: 4rpx;
55 | border: 1px solid #1890ff;
56 | }
57 |
58 | .item .txt {
59 | font-size: 26rpx;
60 | color: gray;
61 | overflow: hidden;
62 | text-overflow: ellipsis;
63 | display: -webkit-box;
64 | -webkit-line-clamp: 2;
65 | -webkit-box-orient: vertical;
66 | }
--------------------------------------------------------------------------------
/pages/home/comps/postlist/postlist.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "kw-loading": "../../../tmpl/loading/loading",
5 | "kw-post": "../../../tmpl/post/kw-post",
6 | "kw-like": "../../../tmpl/like/kw-like",
7 | "comment": "../../../tmpl/cmmt/kw-comment",
8 | "kw-adver": "../../../tmpl/adver/adunit"
9 | }
10 | }
--------------------------------------------------------------------------------
/pages/home/comps/postlist/postlist.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../../app.wxss";
2 |
3 | .tag-list {
4 | margin-left: -14rpx;
5 | margin-right: -14rpx;
6 | display: flex;
7 | overflow: auto;
8 | }
9 |
10 | .tag-list::-webkit-scrollbar {
11 | display: none;
12 | }
13 |
14 | .tag {
15 | background: #f8f8f8;
16 | border-radius: 8rpx;
17 | font-size: 30rpx;
18 | color: #888;
19 | padding: 4rpx 24rpx;
20 | margin: 6rpx 12rpx;
21 | word-break: keep-all;
22 | }
23 |
24 | .ph {
25 | padding: 0px 16rpx;
26 | height: 1rpx;
27 | background:white;
28 | }
29 |
30 | .more {
31 | background: linear-gradient(90deg, rgba(255,255,255,0) 40%, white 60%);
32 | position: absolute;
33 | right: 0px; top: 0px;
34 | height: 100%;
35 | width: 100rpx;
36 | }
37 |
38 | .menu {
39 | opacity: .7;
40 | margin-left: auto;
41 | width: 48rpx;
42 | height: 48rpx;
43 | align-self: flex-start;
44 | margin-top: 8rpx;
45 | }
46 |
47 | .infogroup {
48 | position: absolute;
49 | right: 82rpx;
50 | top: 0px;
51 | display: flex;
52 | }
53 |
54 | .infotag {
55 | background: #1890ff;
56 | color: white;
57 | font-size: 24rpx;
58 | padding: 2rpx 6rpx;
59 | margin-left: 12rpx;
60 | }
61 |
62 | .verified {
63 | display: flex;
64 | align-items: center;
65 | }
66 |
67 | .verified_img {
68 | width: 28rpx;
69 | height: 28rpx;
70 | margin-right: 4rpx;
71 | opacity: .9;
72 | }
73 |
--------------------------------------------------------------------------------
/pages/home/comps/toplist/toplist.js:
--------------------------------------------------------------------------------
1 | // pages/home/comps/toplist/toplist.js
2 | Component({
3 | /* 组件的属性列表 */
4 | properties: {
5 | value: {
6 | type: Array,
7 | value:[],
8 | }
9 | },
10 |
11 | /* 组件的初始数据 */
12 | data: {
13 |
14 | },
15 |
16 | /* 组件的方法列表 */
17 | methods: {
18 |
19 | }
20 | })
21 |
--------------------------------------------------------------------------------
/pages/home/comps/toplist/toplist.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/home/comps/toplist/toplist.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 顶 {{item.title}}
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/pages/home/comps/toplist/toplist.wxss:
--------------------------------------------------------------------------------
1 | .card {
2 | background-color: #fff;
3 | margin-bottom: 16rpx;
4 | position: relative;
5 | padding: 18rpx 24rpx;
6 | }
7 |
8 | .top-post {
9 | font-size: 28rpx;
10 | }
11 |
12 | .top-post .top {
13 | width: 30rpx;
14 | height: 30rpx;
15 | padding: 0 4rpx;
16 | vertical-align: middle;
17 | border-radius: 4rpx;
18 | text-align: center;
19 | font-size: 24rpx;
20 | color: white;
21 | background-color: red;
22 | margin-right: 16rpx;
23 | position: relative;
24 | top: -2rpx;
25 | }
26 |
27 | .line1 {
28 | text-overflow: ellipsis;
29 | overflow: hidden;
30 | white-space: nowrap;
31 | }
--------------------------------------------------------------------------------
/pages/home/comps/userlist/controller.js:
--------------------------------------------------------------------------------
1 | const api = require('../../../../utils/api.js')
2 | const util = require('../../../../utils/util.js')
3 | const biz = require('../../../../utils/biz.js')
4 |
5 | const app = getApp()
6 | const PAGE_SIZE = 20
7 |
8 | var view = undefined
9 |
10 | // Home Controller
11 | function setup(_view) {
12 | view = _view
13 | }
14 |
15 | function onUnload() {
16 | view = undefined
17 | }
18 |
19 | // First Load
20 | function onLoad(opt) {
21 | fetchUserList()
22 | }
23 |
24 | function onPullDownRefresh() {
25 | fetchUserList()
26 | }
27 |
28 | function onReachBottom() {
29 | var { loading, hasmore } = view.data
30 | if (loading || !hasmore) {
31 | return
32 | }
33 |
34 | var page = view.data.page + 1
35 | view.setData({ loading: true })
36 | var users = view.data.users
37 |
38 | api.getUserList("active", page, PAGE_SIZE).then(resp => {
39 | var hasmore = resp.data && resp.data.length === PAGE_SIZE
40 | view.setData({ page: page })
41 | view.setData({ loading: false, hasmore: hasmore})
42 | view.setData({ users: users.concat(massage(resp.data))})
43 | }).catch(err => {
44 | console.log(err)
45 | view.setData({loading: false})
46 | })
47 | }
48 |
49 | function fetchUserList() {
50 | if (view.data.loading) {
51 | return
52 | }
53 |
54 | view.setData({loading: true, hasmore: true, page: 1 })
55 | api.getUserList("active", 1, PAGE_SIZE).then(resp => {
56 | wx.stopPullDownRefresh()
57 | var hasmore = resp.data && resp.data.length === PAGE_SIZE
58 | view.setData({ loading: false, hasmore: hasmore })
59 | view.setData({ users: massage(resp.data) })
60 | }).catch(err => {
61 | wx.stopPullDownRefresh()
62 | console.log(err)
63 | view.setData({ loading: false })
64 | wx.showToast({
65 | title: '刷新失败', icon: 'none'
66 | })
67 | })
68 | }
69 |
70 | function fetchMoreUser(view) {
71 |
72 | }
73 |
74 | function massage(users) {
75 | return users.map( user => {
76 | return biz.parseUser(user)
77 | })
78 | }
79 |
80 | module.exports = {
81 | setup: setup,
82 | onLoad: onLoad,
83 | onUnload: onUnload,
84 | onPullDownRefresh: onPullDownRefresh,
85 | onReachBottom: onReachBottom,
86 | }
87 |
88 |
--------------------------------------------------------------------------------
/pages/home/comps/userlist/userlist.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../../../kawa.js')
3 | const util = require('../../../../utils/util.js')
4 |
5 |
6 | // pages/home/comps/userlist.js
7 | Component({
8 | /**
9 | * 组件的属性列表
10 | */
11 | properties: {
12 |
13 | },
14 |
15 | lifetimes: {
16 | attached: function () {
17 | ctr.setup(this)
18 | ctr.onLoad()
19 | },
20 | },
21 |
22 | // 以下是旧式的定义方式,可以保持对 <2.2.3 版本基础库的兼容
23 | attached: function () {
24 | ctr.setup(this)
25 | ctr.onLoad()
26 | },
27 |
28 | /**
29 | * 组件的初始数据
30 | */
31 | data: {
32 | theme: {
33 | images: kawa.Theme.Image,
34 | levelColor: util.lightenColor(kawa.Theme.MainColor, 30),
35 | adminColor: kawa.Theme.MainColor,
36 | },
37 | loading: false,
38 | hasmore: true,
39 | users: [],
40 | page: 1,
41 | size: 20,
42 | },
43 |
44 | /**
45 | * 组件的方法列表
46 | */
47 | methods: {
48 | onPullDownRefresh: function () {
49 | ctr.onPullDownRefresh()
50 | },
51 |
52 | onReachBottom: function () {
53 | ctr.onReachBottom()
54 | },
55 | }
56 | })
57 |
--------------------------------------------------------------------------------
/pages/home/comps/userlist/userlist.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "kw-loading": "../../../tmpl/loading/loading"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/home/comps/userlist/userlist.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{index+1}}
9 |
10 |
11 | {{item.nickname}}
12 | 管理员
16 | {{item.level_label}}
20 |
21 | {{item.role_name}}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/pages/home/comps/userlist/userlist.wxss:
--------------------------------------------------------------------------------
1 | .item {
2 | padding: 36rpx 24rpx;
3 | display: flex;
4 | flex-direction: row;
5 | align-items: center;
6 | }
7 |
8 | .item_txt {
9 | width: 100%;
10 | vertical-align: middle;
11 |
12 | /* single-line */
13 | text-overflow: ellipsis;
14 | overflow: hidden;
15 | white-space: nowrap;
16 | }
17 |
18 | .item .ranking {
19 | width: 72rpx;
20 | height: 72rpx;
21 | flex-shrink: 0;
22 | }
23 |
24 | .item .index {
25 | width: 72rpx;
26 | text-align: center;
27 | color: #333;
28 | font-size: 32rpx;
29 | font-weight: 800;
30 | }
31 |
32 | .item .avatar {
33 | width: 80rpx;
34 | height: 80rpx;
35 | margin-right: 16rpx;
36 | margin-left: 24rpx;
37 | border-radius: 50%;
38 | flex-shrink: 0;
39 | }
40 |
41 | .item .name {
42 | font-size: 32rpx;
43 | }
44 |
45 | .item .times {
46 | font-size: 64rpx;
47 | margin-left: auto;
48 | font-weight: 600;
49 | color:#777;
50 | }
51 |
52 | .item .unit {
53 | font-size:28rpx;
54 | color:#999;
55 | margin-left: 14rpx;
56 | }
57 |
58 | .card {
59 | background-color: #ffffff;
60 | margin-bottom: 18.72rpx;
61 | position: relative;
62 | padding: 18rpx 24rpx;
63 | }
64 |
65 | .line {
66 | height: 1px;
67 | background-color: #f8f8f8;
68 | margin: 18.72rpx 0;
69 | }
70 |
71 | .user-label {
72 | padding: 0px 4rpx;
73 | line-height: 28rpx;
74 | vertical-align: middle;
75 | text-align: center;
76 | font-size: 22rpx;
77 | color: white;
78 | position: relative;
79 | top: -2rpx;
80 | margin-left: 16rpx;
81 | border-radius: 2rpx;
82 | }
83 |
84 | .verified_txt {
85 | font-size: 28rpx;
86 | color: #888888;
87 | margin-top: -4rpx;
88 | }
89 |
90 | .verified_img {
91 | width: 32rpx;
92 | height: 32rpx;
93 | margin-right: 4rpx;
94 | margin-left: 12rpx;
95 | margin-bottom: -4rpx;
96 | opacity: .9;
97 | }
--------------------------------------------------------------------------------
/pages/home/home.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": true,
3 | "backgroundTextStyle": "dark",
4 | "usingComponents": {
5 | "userlist": "./comps/userlist/userlist",
6 | "postlist": "./comps/postlist/postlist",
7 | "hotcard": "./comps/hotcard/hotcard",
8 | "chacard": "./comps/chacard/channel",
9 | "bulletin": "./comps/bulletin/bulletin",
10 | "toplist": "./comps/toplist/toplist",
11 |
12 | "kw-tab": "../tmpl/tab/kw-tab",
13 | "kw-login": "../tmpl/login/dialog",
14 | "kw-adver": "../tmpl/adver/adunit",
15 | "kw-poll": "../tmpl/poll/poll"
16 | }
17 | }
--------------------------------------------------------------------------------
/pages/home/home.wxss:
--------------------------------------------------------------------------------
1 |
2 | .brand {
3 | padding: 24rpx 18rpx;
4 | background-color: rgba(0, 0, 0, .3);
5 | }
6 |
7 | .logo {
8 | border: 6rpx solid white;
9 | border-radius: 16rpx;
10 | width: 144rpx;
11 | height: 144rpx;
12 | }
13 |
14 | .app-name {
15 | font-size: 32rpx;
16 | color: white;
17 | font-weight:600;
18 | }
19 |
20 | .btn-home {
21 | background-color: transparent;
22 | border: 2rpx solid white;
23 | border-radius: 10rpx;
24 | font-size: 24rpx;
25 | color: white;
26 | padding: 8rpx 10rpx;
27 | line-height: 24rpx;
28 | }
29 |
30 | .btn-home image {
31 | width: 26rpx;
32 | height: 24rpx;
33 | margin-right: 8rpx;
34 | }
35 |
36 | .h-bottom {
37 | display: flex;
38 | align-items:flex-end;
39 | }
40 |
41 | .v-right {
42 | display: flex;
43 | flex-direction:column;
44 | align-items: flex-end;
45 | }
46 |
47 | .btn-normal {
48 | border: 1px solid white;
49 | border-radius: 14rpx;
50 | color: white;
51 | }
52 |
53 | .tablayout {
54 | position: sticky;
55 | top: 0;
56 | z-index: 998;
57 | display:flex;
58 | align-items:center;
59 | background:white;
60 | border-bottom: 1px solid #eee;
61 | }
62 |
63 | .tablayout .search {
64 | width:42rpx;
65 | height:42rpx;
66 | opacity: 0.4;
67 | margin-left: 32rpx;
68 | margin-bottom:-4rpx;
69 | }
70 |
71 | .new-topic {
72 | position: fixed;
73 | bottom: 30rpx;
74 | right: 30rpx;
75 | width: 128rpx;
76 | height: 128rpx;
77 | z-index: 9999;
78 | }
79 |
--------------------------------------------------------------------------------
/pages/join/join.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "申请加入社区"
3 | }
--------------------------------------------------------------------------------
/pages/login/login.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": ""
3 | }
--------------------------------------------------------------------------------
/pages/login/login.wxml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pages/login/login.wxss:
--------------------------------------------------------------------------------
1 | /* pages/login/login.wxss */
2 | page {
3 | background-color:#fff;
4 | }
5 |
6 | .login-view {
7 | width: 50%;
8 | margin: 50% auto;
9 | }
10 |
11 | .login-button-normal {
12 | color:white;
13 | font-size: 32rpx;
14 | opacity: 1;
15 | }
16 |
17 | .login-button-hover {
18 | opacity: .7
19 | }
20 |
21 | .lds-ripple {
22 | display: inline-block;
23 | position: relative;
24 | width: 64px;
25 | height: 64px;
26 | }
27 | .lds-ripple view {
28 | position: absolute;
29 | border: 4px solid #ABABAB;
30 | opacity: 1;
31 | border-radius: 50%;
32 | animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
33 | }
34 | .lds-ripple view:nth-child(2) {
35 | animation-delay: -0.5s;
36 | }
37 | @keyframes lds-ripple {
38 | 0% {
39 | top: 28px;
40 | left: 28px;
41 | width: 0;
42 | height: 0;
43 | opacity: 1;
44 | }
45 | 100% {
46 | top: -1px;
47 | left: -1px;
48 | width: 58px;
49 | height: 58px;
50 | opacity: 0;
51 | }
52 | }
--------------------------------------------------------------------------------
/pages/logs/logs.js:
--------------------------------------------------------------------------------
1 | //logs.js
2 | const util = require('../../utils/util.js')
3 |
4 | Page({
5 | data: {
6 | logs: []
7 | },
8 | onLoad: function () {
9 | this.setData({
10 | logs: (wx.getStorageSync('logs') || []).map(log => {
11 | return util.formatTime(new Date(log))
12 | })
13 | })
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志"
3 | }
--------------------------------------------------------------------------------
/pages/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/logs/logs.wxss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | display: flex;
3 | flex-direction: column;
4 | padding: 40rpx;
5 | }
6 | .log-item {
7 | margin: 10rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/pages/me/edit.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarTitleText": "编辑"
4 | }
--------------------------------------------------------------------------------
/pages/me/edit.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/edit.wxss */
2 | .-title {
3 | font-size: 28rpx;
4 | color: gray;
5 | padding: 24rpx 28rpx;
6 | }
7 |
8 | .flow-right {
9 | margin-left: auto;
10 | }
11 |
12 | .avatar {
13 | width: 72rpx;
14 | height: 72rpx;
15 | border-radius: 50%;
16 | }
17 |
18 | .arrow {
19 | width: 46rpx;
20 | height: 46rpx;
21 | margin-left: 12rpx;
22 | }
23 |
24 | .content {
25 | font-size: 32rpx;
26 | color: #555;
27 | }
28 |
29 | .mask {
30 | position: fixed;
31 | top: 0px; left: 0px; right: 0px; bottom: -1000px;
32 | z-index: 998;
33 | background-color: rgba(0, 0, 0, .6);
34 | }
35 |
36 | .dialog {
37 | position: fixed;
38 | top: 30vh; left: 96rpx; right: 96rpx;
39 | z-index: 999;
40 | background: white;
41 | border-radius: 12rpx;
42 | display: flex;
43 | flex-direction: column;
44 | align-items: center;
45 | }
46 |
47 | .dialog .input {
48 | box-sizing: border-box;
49 | width: 100%;
50 | padding: 32rpx 32rpx;
51 | font-size: 28rpx;
52 | color: #555;
53 | }
54 |
55 | .dialog .input input {
56 | padding: 12rpx 24rpx;
57 | background: #f8f8f8;
58 | }
59 |
60 |
61 | .dialog .-title {
62 | padding: 12rpx 0;
63 | font-size: 32rpx;
64 | }
65 |
66 | .btn-wrapper {
67 | width: 50%;
68 | padding: 16rpx 32rpx;
69 | font-size: 32rpx;
70 | }
71 |
72 | .btn-cancel {
73 | width: 100%;
74 | background-color: #f8f8f8;
75 | color:gray;
76 | font-size: 32rpx;
77 | }
78 |
79 | .btn-cancel-hover {
80 | opacity: .6;
81 | }
82 |
83 | .btn-submit {
84 | font-size: 32rpx;
85 | width: 100%;
86 | color: white;
87 | }
88 |
89 | .btn-submit-hover {
90 | opacity: .6;
91 | }
--------------------------------------------------------------------------------
/pages/me/me.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../kawa.js')
3 | const util = require('../../utils/util.js')
4 |
5 | // pages/me/me.js
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | theme: {
13 | images: kawa.Theme.Image,
14 | color: kawa.Theme.MainColor,
15 | gradeColor: util.lightenColor(kawa.Theme.MainColor, 0),
16 | },
17 | user: {
18 | avatar: '',
19 | nickname: '小虾米',
20 | summary: '啦啦啦 我是卖报的小行家',
21 | },
22 | expLabel: '',
23 | copyright: "",
24 | support: true,
25 | metadata: {
26 | user_mode: 0, // 0, 1, 2
27 | }
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面加载
32 | */
33 | onLoad: function (options) {
34 | ctr.setup(this)
35 | ctr.onLoad(options)
36 | },
37 |
38 | onUnload: function() {
39 | ctr.onUnload()
40 | },
41 | onShow: function () {
42 | ctr.onShow()
43 | },
44 | // 从其它页面返回数据
45 | onResult: function (data) {
46 | ctr.onResult(data)
47 | },
48 | bindUserInfo: function (e) {
49 | ctr.bindUserInfo(e)
50 | },
51 | getPhoneNumber: function (e) {
52 | ctr.getPhoneNumber(e)
53 | },
54 |
55 | clickBindProfile: function(e) {
56 | var comp = this.selectComponent(".login")
57 | if (comp) {
58 | comp.show()
59 | } else {
60 | console.log("fatal:can't find login dialog")
61 | }
62 | },
63 |
64 | clickExp: function(e) {
65 | wx.navigateTo({
66 | url: '/pages/exp/exp',
67 | })
68 | },
69 |
70 | onOk: function(e) {
71 | const user = e.detail
72 | this.setData({ user: user })
73 | }
74 | })
--------------------------------------------------------------------------------
/pages/me/me.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的",
3 | "usingComponents": {
4 | "kw-login": "../tmpl/login/dialog"
5 | }
6 |
7 | }
--------------------------------------------------------------------------------
/pages/me/me.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/me.wxss */
2 | .px0 {
3 | padding: 8rpx 0 !important;
4 | }
5 |
6 | .item {
7 | padding: 24rpx 24rpx;
8 | }
9 |
10 | .line {
11 | margin: 0 0 0 112rpx !important;
12 | }
13 |
14 | .avatar {
15 | margin: 8rpx 0px;
16 | width: 96rpx;
17 | height: 96rpx;
18 | max-height: 96rpx;
19 | max-width: 96rpx;
20 | border-radius: 50%;
21 | }
22 |
23 | .verified {
24 | display: flex;
25 | align-items: center;
26 | font-size: 28rpx;
27 | color: #888888;
28 | margin-left: 12rpx;
29 | }
30 |
31 | .verified_img {
32 | width: 32rpx;
33 | height: 32rpx;
34 | margin-right: 4rpx;
35 | opacity: .9;
36 | }
37 |
38 | .icon-small {
39 | width: 72rpx;
40 | height: 72rpx;
41 | max-height: 72rpx;
42 | max-width: 72rpx;
43 | }
44 |
45 | .setting {
46 | margin-left: auto;
47 | padding: 6rpx 0px 6rpx 18rpx;
48 | }
49 |
50 | .setting image {
51 | width: 46rpx;
52 | height: 46rpx;
53 | vertical-align: middle;
54 | }
55 |
56 | .arrow-right {
57 | opacity: .7;
58 | width: 46rpx;
59 | height: 46rpx;
60 | max-height: 46rpx;
61 | max-width: 46rpx;
62 | }
63 |
64 | .btn {
65 | background: transparent;
66 | color: #1890FF;
67 | font-size: 32rpx;
68 | }
69 |
70 | .btn-hover {
71 | color: #fff;
72 | opacity: .6;
73 | }
74 |
75 | .info {
76 | position: fixed;
77 | bottom: 30rpx;
78 | width: 100%;
79 | }
80 |
81 | .info text {
82 | display: block;
83 | text-align: center;
84 | font-size: 26rpx;
85 | color: #9c9b9b;
86 | opacity: .6;
87 | }
88 |
89 | .bind {
90 | position: fixed;
91 | top: 0px;
92 | left: 0px;
93 | width: 100%;
94 | display: flex;
95 | flex-flow: row;
96 | justify-items: center;
97 | justify-content: center;
98 | align-items: center;
99 | box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
100 | }
101 |
102 | .grade {
103 | padding: 0rpx 8rpx;
104 | color: white;
105 | text-align: center;
106 | font-size: 22rpx;
107 | margin-left: 12rpx;
108 | border-radius: 2rpx;
109 | position: relative;
110 | top: -2rpx;
111 | font-weight: bold;
112 | }
--------------------------------------------------------------------------------
/pages/message/list/comment.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./comment_ctr.js')
2 | const kawa = require('../../../kawa.js')
3 |
4 | // pages/message/list/comment.js
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | theme: {
12 | images: kawa.Theme.Image,
13 | },
14 | messages: [],
15 | loading: false,
16 | hasmore: true,
17 | unread: 0,
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面加载
22 | */
23 | onLoad: function (options) {
24 | ctr.setup(this)
25 | ctr.onLoad(options)
26 | },
27 |
28 | onUnload: function() {
29 | ctr.onUnload()
30 | },
31 |
32 | /**
33 | * 页面相关事件处理函数--监听用户下拉动作
34 | */
35 | onPullDownRefresh: function () {
36 | ctr.onPullDownRefresh()
37 | },
38 |
39 | /**
40 | * 页面上拉触底事件的处理函数
41 | */
42 | onReachBottom: function () {
43 | ctr.onReachBottom()
44 | },
45 | })
46 |
47 |
--------------------------------------------------------------------------------
/pages/message/list/comment.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "评论",
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "backgroundColor": "#fff",
6 | "usingComponents": {
7 | "kw-loading": "../../tmpl/loading/loading"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/message/list/comment.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 | {{item.from.nickname || '匿名'}} 评论了你
12 |
13 | {{item.comment}}
14 | {{item.time}}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/pages/message/list/comment.wxss:
--------------------------------------------------------------------------------
1 | /* pages/message/list/comment.wxss */
2 | @import "./shared.wxss";
3 |
4 | page {
5 | background-color:#fff;
6 | }
7 |
8 | .h-top {
9 | display: flex;
10 | align-items: top;
11 | }
12 |
13 | .unread {
14 | background-color:rgba(30, 144, 255, .1);
15 | }
16 |
17 | .thin-line {
18 | height: 1px;
19 | background-color: #f8f8f8;
20 | }
21 |
--------------------------------------------------------------------------------
/pages/message/list/favor.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./favor_ctr.js')
2 | const kawa = require('../../../kawa.js')
3 |
4 | // pages/message/list/favor.js
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | theme: {
12 | images: kawa.Theme.Image,
13 | },
14 | messages: [],
15 | loading: false,
16 | hasmore: true,
17 | },
18 |
19 | /**
20 | * 生命周期函数--监听页面加载
21 | */
22 | onLoad: function (options) {
23 | ctr.setup(this)
24 | ctr.onLoad(options)
25 | },
26 |
27 | onUnload: function () {
28 | ctr.onUnload()
29 | },
30 |
31 | /**
32 | * 页面相关事件处理函数--监听用户下拉动作
33 | */
34 | onPullDownRefresh: function () {
35 | ctr.onPullDownRefresh()
36 | },
37 |
38 | /**
39 | * 页面上拉触底事件的处理函数
40 | */
41 | onReachBottom: function () {
42 | ctr.onReachBottom()
43 | },
44 | })
45 |
46 |
--------------------------------------------------------------------------------
/pages/message/list/favor.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "赞",
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "backgroundColor": "#fff",
6 | "usingComponents": {
7 | "kw-loading": "../../tmpl/loading/loading"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/message/list/favor.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 | {{item.from.nickname || '匿名'}} 赞了你
13 |
14 | {{item.subject}}
15 | {{item.time}}
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/pages/message/list/favor.wxss:
--------------------------------------------------------------------------------
1 | /* pages/message/list/favor.wxss */
2 | @import "./shared.wxss";
3 |
4 | page {
5 | background-color:#fff;
6 | }
7 |
8 | .h-top {
9 | display: flex;
10 | align-items: top;
11 | }
12 |
13 | .unread {
14 | background-color:rgba(30, 144, 255, .1);
15 | }
16 |
17 | .thin-line {
18 | height: 1px;
19 | background-color: #f8f8f8;
20 | }
--------------------------------------------------------------------------------
/pages/message/list/shared.wxss:
--------------------------------------------------------------------------------
1 |
2 | .bg {
3 | background-color: transparent;
4 | transition: background-color 1s;
5 | }
6 |
7 | .top-bar {
8 | background: white;
9 | position: fixed;
10 | top: 0;right: 0;left: 0;
11 | height: 80rpx;
12 | font-size: 28rpx;
13 | font-weight: bold;
14 | padding: 0 28rpx;
15 | border-top: 1px solid #f0f0f0;
16 | border-bottom: 1px solid #f0f0f0;
17 | }
18 |
19 | .top-bar .-title {
20 | padding-top: 8rpx;
21 | color: gray;
22 | line-height: 0;
23 | vertical-align: middle;
24 | }
25 |
26 | .top-bar .-action {
27 | padding-top: 8rpx;
28 | color:#555;
29 | margin-left: auto;
30 | margin-right: 8rpx;
31 | }
32 |
33 | .top-bar image {
34 | width: 38rpx;
35 | height: 38rpx;
36 | }
--------------------------------------------------------------------------------
/pages/message/message.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../kawa.js')
3 | const biz = require('../../utils/biz.js')
4 |
5 | // pages/message/message.js
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | theme: {
13 | images: kawa.Theme.Image,
14 | },
15 | count: {
16 | favors: 0,
17 | comments: 0,
18 | },
19 | chats:[],
20 | loading: false,
21 | hasmore: true,
22 | timer: 0,
23 | showSub: false,
24 | },
25 |
26 | onLoad: function(options) {
27 | biz.applyTheme(kawa.Theme)
28 | ctr.setup(this)
29 | ctr.onLoad(options)
30 | },
31 |
32 | onUnload: function () {
33 | ctr.onUnload()
34 | },
35 |
36 | /**
37 | * 生命周期函数--监听页面显示
38 | */
39 | onShow: function () {
40 | ctr.refreshMessage()
41 | },
42 |
43 | onHide: function() {
44 | ctr.refreshMessage()
45 | },
46 |
47 | /**
48 | * 页面相关事件处理函数--监听用户下拉动作
49 | */
50 | onPullDownRefresh: function () {
51 | ctr.refreshMessage()
52 | },
53 |
54 | /**
55 | * 页面上拉触底事件的处理函数
56 | */
57 | onReachBottom: function () {
58 | ctr.onReachBottom()
59 | },
60 |
61 | // 点击点赞消息按钮
62 | favorClick: function() {
63 | wx.navigateTo({
64 | url: '/pages/message/list/favor',
65 | })
66 | },
67 |
68 | // 点击评论消息按钮
69 | commentClick: function() {
70 | wx.navigateTo({
71 | url: '/pages/message/list/comment',
72 | })
73 | },
74 |
75 | clickItem: function(e) {
76 | ctr.onClickItem(e)
77 | },
78 |
79 | // 消息订阅
80 | clickSubscribe: function(e) {
81 | ctr.onClickSubscribe(e)
82 | }
83 | })
84 |
--------------------------------------------------------------------------------
/pages/message/message.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": true,
3 | "navigationBarTitleText": "消息",
4 | "usingComponents": {
5 | "kw-loading": "../tmpl/loading/loading"
6 | }
7 | }
--------------------------------------------------------------------------------
/pages/message/message.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 未订阅消息通知,点击订阅可及时获得最新消息
4 |
5 |
6 |
7 |
8 |
9 |
12 |
13 | 点赞
14 |
15 |
16 |
17 | {{count.favors}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
30 |
31 | 评论
32 |
33 |
34 |
35 | {{count.comments}}
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
47 |
48 | {{item.other.nickname || '用户已删除'}}
49 | {{item.content}}
50 |
51 |
52 | {{item.date}}
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/pages/message/message.wxss:
--------------------------------------------------------------------------------
1 | .warn {
2 | text-align: center;
3 | font-size: 24rpx;
4 | padding: 14rpx 0;
5 | background: #faf0cc;
6 | color: #ee9243;
7 | }
8 |
9 | .arrow_right {
10 | width: 56rpx;
11 | height: 56rpx;
12 | min-width: 56rpx;
13 | max-width: 56rpx;
14 | }
15 |
16 | .icon-m {
17 | width: 94rpx;
18 | height: 94rpx;
19 | }
20 |
21 | .avatar {
22 | width: 82rpx;
23 | height: 82rpx;
24 | border-radius: 50%;
25 | }
26 |
27 | .body {
28 | max-width: 500rpx;
29 | }
30 |
31 | .red-tag {
32 | border-radius: .8em;
33 | background: #FF4444;
34 | color: #fff;
35 | text-align: center;
36 | min-width: 1.6em;
37 | font-size: 1em;
38 | }
39 |
40 | .circle {
41 | border-radius: 50%;
42 | background: #FF4444;
43 | width: 16rpx;
44 | height: 16rpx;
45 | }
--------------------------------------------------------------------------------
/pages/point/controller.js:
--------------------------------------------------------------------------------
1 | const api = require('../../utils/api.js')
2 | const util = require('../../utils/util.js')
3 |
4 | const app = getApp()
5 |
6 | var view = undefined
7 | function setup(_view) {
8 | view = _view
9 | }
10 |
11 | function onLoad() {
12 | api.getPointKindList().then( resp => {
13 | view.setData({ kinds: resp.data })
14 | }).catch( err => {
15 | console.log("get pt-type err", err)
16 | })
17 | api.getPointItemList().then( resp => {
18 | view.setData({ items: resp.data })
19 | }).catch( err => {
20 | console.log("get pt-item err", err)
21 | })
22 |
23 | const user = app.globalData.userInfo
24 | if (user) {
25 | view.setData({ user: user })
26 | }
27 |
28 | // get latest point value
29 | api.getSelf().then((resp) => {
30 | if (resp.data) {
31 | app.globalData.userInfo.point_count = resp.data.point_count
32 | view.setData({ user: resp.data })
33 | }
34 | })
35 | }
36 |
37 | function onUnload() {
38 | view = undefined
39 | }
40 |
41 | function exchange(target) {
42 | api.pointExchange(target.item.id).then( resp => {
43 | view.setData({ show: false, target: {}})
44 | view.setData({ user: resp.data.user || {}})
45 | wx.showToast({ title: '兑换成功!' })
46 | }).catch( err => {
47 | console.log(err)
48 | wx.showToast({ title: mapErr(err, target.item), icon: 'none'})
49 | })
50 | }
51 |
52 | function mapErr(err, item) {
53 | if (err.code == 403) {
54 | if (err.err === "points:not enough points") {
55 | return "兑换失败,积分不够!"
56 | } else if (err.err == "points:not enough items") {
57 | return "兑换失败, 商品售罄!"
58 | } else if (err.err == "points:reach max quota") {
59 | return "兑换失败,每人最多兑换" + item.max_num + "次"
60 | }
61 | }
62 | return "兑换失败!"
63 | }
64 |
65 | module.exports = {
66 | setup: setup,
67 | onLoad: onLoad,
68 | onUnload: onUnload,
69 | exchange: exchange,
70 | }
--------------------------------------------------------------------------------
/pages/point/history/history.js:
--------------------------------------------------------------------------------
1 | const api = require('../../../utils/api.js')
2 | const util = require('../../../utils/util.js')
3 |
4 | Page({
5 |
6 | // 页面的初始数据
7 | data: {
8 | orders: [],
9 | show: false,
10 | item: {},
11 | },
12 |
13 | // 生命周期函数--监听页面加载
14 | onLoad: function (options) {
15 | setup(this)
16 | },
17 |
18 | clickItem : function(e) {
19 | const item = e.currentTarget.dataset.item
20 | this.setData({ show: true, item: item})
21 | },
22 |
23 | clickClose: function(e) {
24 | this.setData({ show: false, item: {}})
25 | }
26 | })
27 |
28 | function setup(view) {
29 | api.getPointOrderList().then( resp => {
30 | view.setData({ orders: massage(resp.data)})
31 | }).catch( err => {
32 | console.log("get order err:", err)
33 | })
34 | }
35 |
36 | function massage(items) {
37 | return items.map( item => {
38 | item.user || (item.user = {})
39 | item.item || (item.item = {})
40 | const utcTime = new Date(item.created_at * 1000)
41 | item.date = util.prettyTimeYMD(utcTime)
42 | return item
43 | })
44 | }
--------------------------------------------------------------------------------
/pages/point/history/history.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "兑换记录",
3 | "backgroundColor": "#fff",
4 | "usingComponents": {}
5 | }
--------------------------------------------------------------------------------
/pages/point/history/history.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{item.item.title}}
6 | {{item.status? "兑换成功":"正在发货"}}/{{item.date}}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{item.item.title}}
19 |
20 | 积分消耗: {{item.item.value}}
21 | {{item.status? '已兑换':'正在发货'}}
22 |
23 | 商品详情
24 |
25 | {{item.item.detail}}
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/pages/point/point.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../kawa.js')
3 | const util = require('../../utils/util.js')
4 |
5 | const app = getApp()
6 |
7 | var bgColor = util.lightenColor(kawa.Theme.MainColor, 10)
8 | var fgColor = util.invertColor(bgColor, true)
9 |
10 | Page({
11 |
12 | /**
13 | * 页面的初始数据
14 | */
15 | data: {
16 | theme: {
17 | bgColor: bgColor,
18 | fgColor: fgColor,
19 | },
20 | user: {},
21 | items: [],
22 | target: {
23 | index: -1,
24 | item: {},
25 | },
26 | kinds: [],
27 | show: false,
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面加载
32 | */
33 | onLoad: function (options) {
34 | ctr.setup(this)
35 | ctr.onLoad(options)
36 | },
37 |
38 | clickHistory: function() {
39 | wx.navigateTo({
40 | url: "/pages/point/history/history",
41 | })
42 | },
43 |
44 | clickBuy: function(e) {
45 | var idx = e.currentTarget.dataset.idx
46 | this.setData({ show: true, target: {
47 | index: idx,
48 | item: this.data.items[idx]
49 | }})
50 | },
51 |
52 | clickClose: function() {
53 | this.setData({ show: false, target: {} })
54 | },
55 |
56 | clickExch: function() {
57 | ctr.exchange(this.data.target)
58 | }
59 | })
--------------------------------------------------------------------------------
/pages/point/point.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "积分兑换",
3 | "backgroundColor": "#fff",
4 | "usingComponents": {}
5 | }
--------------------------------------------------------------------------------
/pages/poll/comps/detail.js:
--------------------------------------------------------------------------------
1 | // pages/poll/comps/detail.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | poll: {
8 | type: Object,
9 | value: {},
10 | },
11 | show: {
12 | type: Boolean,
13 | value: false,
14 | }
15 | },
16 |
17 | /**
18 | * 组件的初始数据
19 | */
20 | data: {
21 | title: "投票细则"
22 | },
23 |
24 | /**
25 | * 组件的方法列表
26 | */
27 | methods: {
28 | clickClose: function() {
29 | this.triggerEvent('onRequestClose')
30 | }
31 | }
32 | })
33 |
--------------------------------------------------------------------------------
/pages/poll/comps/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/poll/comps/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{title}}
6 |
7 | 活动时间:{{poll.start}} - {{poll.expire}}
8 | 活动细则:
9 |
10 | {{poll.detail}}
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pages/poll/comps/detail.wxss:
--------------------------------------------------------------------------------
1 | .-title {
2 | font-size: 32rpx;
3 | color: gray;
4 | padding: 24rpx 28rpx;
5 | }
6 |
7 | .mask {
8 | position: fixed;
9 | top: 0px; left: 0px; right: 0px; bottom: -1000px;
10 | z-index: 1999;
11 | background-color: rgba(0, 0, 0, .6);
12 | }
13 |
14 | .dialog {
15 | position: fixed;
16 | top: 20vh; left: 96rpx; right: 96rpx;
17 | z-index: 999;
18 | background: white;
19 | border-radius: 12rpx;
20 | display: flex;
21 | flex-direction: column;
22 | align-items: center;
23 | padding: 12rpx 0rpx;
24 | }
25 |
26 | .close {
27 | top: 12rpx;
28 | right: 18rpx;
29 | position: absolute;
30 | width: 38rpx;
31 | height: 38rpx;
32 | z-index: 999;
33 | }
34 |
35 | .detail {
36 | width: 100%;
37 | box-sizing: border-box;
38 | padding: 32rpx;
39 | border-radius: 24rpx;
40 | font-size: 28rpx;
41 | color: #666;
42 | }
43 |
44 | .body {
45 | min-height: 200px;
46 | max-height: 300px;
47 | overflow: auto;
48 | }
--------------------------------------------------------------------------------
/pages/poll/poll.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "投票详情",
3 | "backgroundColor": "#fff",
4 | "usingComponents": {
5 | "kw-detail": "./comps/detail"
6 | }
7 | }
--------------------------------------------------------------------------------
/pages/poll/poll.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{poll.title}}
3 |
4 |
5 |
6 |
7 | 参与人数
8 | {{ poll.user_count}}
9 |
10 |
11 | 投票数量
12 | {{poll.vote_count}}
13 |
14 |
15 |
16 |
17 | 活动时间:{{poll.start}} - {{poll.expire}}
18 | 活动细则:
19 |
20 | {{poll.detail}}
21 | 详情
22 |
23 |
24 |
25 | {{poll.secret && !poll.voted ? '结果投票后可见':''}}
26 | {{poll.voted ? '您已经投过票了':''}}
27 |
28 | 参与投票[{{poll.multiple? "多选":"单选"}}]
29 |
30 |
31 |
32 |
33 | {{item.title}}
34 |
35 |
36 |
43 |
44 |
45 | {{item.count}}
46 | 票
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/pages/poll/poll.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | background-color:#fff;
3 | }
4 |
5 | .title {
6 | font-size: 38rpx;
7 | font-weight: bold;
8 | margin-bottom: 16rpx;
9 | }
10 |
11 | .poster {
12 | border-radius: 24rpx;
13 | width: 100%;
14 | }
15 |
16 | .count {
17 | display: flex;
18 | align-items: center;
19 | justify-content: space-around;
20 | }
21 |
22 | .count .v {
23 | margin-top: 24rpx;
24 | display: flex;
25 | flex-direction: column;
26 | align-items: center;
27 | }
28 |
29 | .count view {
30 | font-weight: bold;
31 | font-size: 32rpx;
32 | }
33 |
34 | .count text {
35 | font-size: 28rpx;
36 | }
37 |
38 | .detail {
39 | margin: 24rpx 0px;
40 | padding: 32rpx;
41 | box-shadow: 0 0 6px 0px rgba(0, 0, 0, 0.1);
42 | border-radius: 24rpx;
43 | font-size: 28rpx;
44 | color: #666;
45 | }
46 |
47 | .tip {
48 | text-align: center;
49 | font-size: 30rpx;
50 | color:gray;
51 | }
52 |
53 | .vote-title {
54 | margin: 12rpx 0px;
55 | font-size: 32rpx;
56 | font-weight: bold;
57 | }
58 |
59 | .vote {
60 | padding: 12rpx 0px;
61 | display: flex;
62 | align-items: flex-end;
63 | }
64 |
65 | .vote .image {
66 | width: 128rpx;
67 | height: 128rpx;
68 | border-radius: 24rpx;
69 | min-width: 128rpx;
70 | margin-right: 12rpx;
71 | }
72 |
73 | .vote .body {
74 | margin-top: 24rpx;
75 | width: 600rpx;
76 | }
77 |
78 | .body .title {
79 | display: flex;
80 | align-items: center;
81 | font-size: 32rpx;
82 | font-weight: bold;
83 | margin-bottom: 16rpx;
84 | }
85 |
86 | .body .img64 {
87 | margin-left: 12rpx;
88 | width: 48rpx;
89 | height: 48rpx;
90 | }
91 |
92 | .vote .number {
93 | margin-left: auto;
94 | vertical-align: bottom;
95 | height: 50rpx;
96 | text-align: right;
97 | min-width: 80rpx;
98 | }
99 |
100 | .number .num {
101 | line-height: 38rx;
102 | font-size: 38rpx;
103 | font-weight: bold;
104 | color:#ff4d00;
105 | }
106 |
107 | .number .piao {
108 | font-size: 26rpx;
109 | color: gray;
110 | }
111 |
112 |
--------------------------------------------------------------------------------
/pages/poster/poster.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "drawer": "../tmpl/draw/drawer"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/poster/poster.wxml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/pages/poster/poster.wxss:
--------------------------------------------------------------------------------
1 | /* pages/poster/poster.wxss */
2 | .body {
3 | height: 100vh;
4 | background: rgba(0, 0, 0, .3);
5 | display: flex;
6 | align-items: center;
7 | justify-content: center;
8 | }
9 |
10 | .body image {
11 | width: 80%;
12 | height: 80%;
13 | max-width: 80vw;
14 | max-height: 100vh;
15 | z-index: 999;
16 | }
17 |
18 | .body view {
19 | position: absolute;
20 | background: #f8f8f8;
21 | width: 80%;
22 | height: 80%;
23 | max-width: 80vw;
24 | max-height: 100vh;
25 | transition: all 1s;
26 | }
27 |
28 | .body .hide {
29 | height: 0px;
30 | width: 120px;
31 | opacity: 0;
32 | }
33 |
34 | .footer {
35 | z-index: 999;
36 | position: fixed;
37 | bottom: 0px; left: 0px; right: 0px;
38 | background: white;
39 |
40 | text-align: center;
41 | padding: 4rpx 8rpx;
42 | }
43 |
44 | .footer .-title {
45 | font-size: 36rpx;
46 | }
--------------------------------------------------------------------------------
/pages/search/search.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 |
3 | // pages/search/search.js
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | query:"",
11 | page: 1,
12 | posts: [],
13 | loading: false,
14 | hasmore: true,
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: function (options) {
21 | ctr.setup(this)
22 | ctr.onLoad(options)
23 | },
24 |
25 | /**
26 | * 页面相关事件处理函数--监听用户下拉动作
27 | */
28 | onPullDownRefresh: function () {
29 |
30 | },
31 |
32 | /**
33 | * 页面上拉触底事件的处理函数
34 | */
35 | onReachBottom: function () {
36 | ctr.onReachBottom()
37 | },
38 |
39 | clickCancel: function(e) {
40 | ctr.onClickCancel(e)
41 | },
42 |
43 | bindInput: function(e) {
44 | this.setData({ query: e.detail.value })
45 | },
46 |
47 | clickSubmit: function(e) {
48 | ctr.onClickSearch(e)
49 | },
50 |
51 | clickItem: function(e) {
52 | ctr.onClickItem(e)
53 | }
54 | })
--------------------------------------------------------------------------------
/pages/search/search.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "帖子搜索",
3 | "usingComponents": {
4 | "kw-loading": "../tmpl/loading/loading",
5 | "kw-post": "../tmpl/post/kw-post"
6 | }
7 | }
--------------------------------------------------------------------------------
/pages/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
15 |
16 | 取消
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
28 |
29 | {{item.author.nickname || '匿名'}}
30 | {{item.time}}
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | 什么也没找到,呜呜呜
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/pages/search/search.wxss:
--------------------------------------------------------------------------------
1 | .search {
2 | background: white;
3 | padding: 16rpx;
4 | }
5 |
6 | .search .inner {
7 | background: #f8f8f8;
8 | border-radius: 38rpx;
9 | padding: 12rpx;
10 | width: 100%;
11 | display: flex;
12 | align-items: center;
13 | }
14 |
15 | .search .inner image {
16 | opacity: .4;
17 | width: 42rpx;
18 | height: 42rpx;
19 | margin: auto 12rpx;
20 | }
21 |
22 | .search .cancel {
23 | min-width: 120rpx;
24 | width: 50rpx;
25 | text-align: center;
26 | font-size: 30rpx;
27 | }
28 |
29 | /* list **/
30 | .avatar {
31 | width: 82rpx;
32 | height: 82rpx;
33 | border-radius: 50%;
34 | }
35 |
36 | .empty {
37 | margin-top: 30%;
38 | font-size: 30rpx;
39 | opacity: .3;
40 | display: flex;
41 | flex-direction: column;
42 | align-items: center;
43 | }
44 |
45 | .empty image {
46 | margin-bottom: 8rpx;
47 | width: 96rpx;
48 | height: 96rpx;
49 | }
--------------------------------------------------------------------------------
/pages/signin/signin.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../kawa.js')
3 | const util = require('../../utils/util.js')
4 |
5 | // pages/signin/signin.js
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | theme: {
13 | images: kawa.Theme.Image,
14 | signColor: util.lightenColor(kawa.Theme.MainColor, 20),
15 | },
16 | user: {
17 | },
18 | sign: {
19 | days:[
20 | ],
21 | today: {
22 | },
23 | seqCount: 0,
24 | },
25 | exp: {
26 | sign: 1,
27 | seq: 2,
28 | },
29 | ranks: [
30 | ],
31 | loading: false,
32 | hasmore: true,
33 | pager: {
34 | index: 1,
35 | size: 20,
36 | }
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面加载
41 | */
42 | onLoad: function (options) {
43 | ctr.setup(this)
44 | ctr.onLoad(options)
45 | },
46 |
47 | onUnload: function() {
48 | ctr.onUnload()
49 | },
50 |
51 | /**
52 | * 页面上拉触底事件的处理函数
53 | */
54 | onReachBottom: function () {
55 | ctr.onReachBottom()
56 | },
57 |
58 | clickSign: function() {
59 | ctr.onClickSign()
60 | }
61 | })
--------------------------------------------------------------------------------
/pages/signin/signin.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "签到",
3 | "backgroundColor": "#fff",
4 | "usingComponents": {
5 | "kw-loading": "../tmpl/loading/loading"
6 | }
7 | }
--------------------------------------------------------------------------------
/pages/signin/signin.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 已连续签到 {{sign.seqCount}} 天
10 |
11 |
12 | {{item.checked && !item.today ? '已签到': item.date}}
13 |
14 | {{item.checked? '✔': '+'+item.value}}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 签到榜
30 |
31 |
32 |
33 | {{index+1}}
34 |
35 | {{item.nickname}}
36 | {{item.sign_count}}
37 | 天
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/pages/thread/sublist/sublist.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/thread/sublist/sublist.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item.author.nickname}}
4 | 回复
5 | {{item.replier.nickname}}
6 | : {{item.content}}
7 |
8 |
--------------------------------------------------------------------------------
/pages/thread/sublist/sublist.wxss:
--------------------------------------------------------------------------------
1 | .reply {
2 | padding: 14rpx 20rpx;
3 | margin-top: 8rpx;
4 | font-size: 30rpx;
5 | }
6 |
7 | .reply .nickname {
8 | color:#576b95;
9 | font-weight: 650;
10 | }
11 |
12 | .reply .detail {
13 | color:#333;
14 | font-size: 30rpx;
15 | }
--------------------------------------------------------------------------------
/pages/thread/thread.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "帖子详情",
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "usingComponents": {
6 | "sublist": "./sublist/sublist",
7 | "xinput": "./xinput/xinput",
8 | "location": "../tmpl/location/location",
9 | "kw-loading": "../tmpl/loading/loading",
10 | "kw-text": "../tmpl/text/kw-text",
11 | "kw-link": "../tmpl/link/kw-link",
12 | "kw-like": "../tmpl/like/kw-like",
13 | "kw-login": "../tmpl/login/dialog",
14 | "kw-adver": "../tmpl/adver/adunit"
15 | }
16 | }
--------------------------------------------------------------------------------
/pages/thread/xinput/xinput.js:
--------------------------------------------------------------------------------
1 | const kawa = require('../../../kawa.js')
2 | const util = require('../../../utils/util.js')
3 | const biz = require('../../../utils/biz.js')
4 |
5 | Component({
6 | /* 组件的属性列表 */
7 | properties: {
8 | },
9 |
10 | /* 组件的初始数据 */
11 | data: {
12 | color: kawa.Theme.MainColor,
13 | show: false,
14 | text: '',
15 | image: '',
16 | },
17 |
18 | /* 组件的方法列表 */
19 | methods: {
20 | show: function(params) {
21 | this.setData({ show: true, params: params, text: '', image: '' })
22 | },
23 |
24 | hide: function() {
25 | this.setData({ show: false })
26 | },
27 |
28 | dummy: function(params) {
29 | // ingore
30 | },
31 |
32 | clickMask: function(){
33 | this.hide()
34 | },
35 |
36 | bindInput: function(e) {
37 | this.setData({ text: e.detail.value })
38 | },
39 |
40 | chooseImage: function(e) {
41 | if (this.data.hint) {
42 | return
43 | }
44 | var view = this
45 | wx.chooseImage({
46 | count: 1,
47 | sizeType: ['compressed'],
48 | sourceType: ['album', 'camera'],
49 | success: function (res) {
50 | if (res.tempFilePaths.length > 0) {
51 | view.setData({ image: res.tempFilePaths[0] })
52 | }
53 | },
54 | })
55 | },
56 |
57 | deleteImage: function(e) {
58 | this.setData({image: ''})
59 | },
60 |
61 | sendComment: function(e) {
62 | var { text, image, params } = this.data
63 | if (util.isWhiteSpace(text) && !image) {
64 | wx.showToast({
65 | title: '输入内容为空!', icon: "none"
66 | })
67 | return
68 | }
69 | biz.subscribe("new-comment", () => {
70 | if (params && params.success) {
71 | params.success({ text, image })
72 | }
73 | this.hide()
74 | })
75 | }
76 | }
77 | })
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/pages/thread/xinput/xinput.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/thread/xinput/xinput.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 回复 {{params.hint? params.hint: '作者'}}
8 |
9 |
21 |
22 |
23 |
25 |
26 |
28 | 回复
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/pages/thread/xinput/xinput.wxss:
--------------------------------------------------------------------------------
1 | .bg-mask {
2 | position: fixed;
3 | top: 0px; left: 0px; right: 0px; bottom: -1000px;
4 | z-index: 998;
5 | /*background-color: #777;
6 | opacity:0.5;
7 | -moz-opacity:0.5;*/
8 | background-color: rgba(0, 0, 0, .6);
9 | }
10 |
11 | .input {
12 | box-sizing: border-box;
13 | position: fixed;
14 | bottom: 0;
15 | left: 0; right: 0;
16 | z-index: 1000;
17 | background: #fff;
18 | padding: 12rpx 30rpx;
19 | }
20 |
21 | .input .hint {
22 | font-size: 24rpx;
23 | color: #959595;
24 | }
25 |
26 | .input .hint text {
27 | font-size: 26rpx;
28 | color: #333;
29 | font-weight: 500;
30 | }
31 |
32 | .input input {
33 | margin: 12rpx 0rpx;
34 | width: 650rpx;
35 | /* 使用padding与预期留白不一致,故使用border */
36 | border-width: 15rpx 20rpx;
37 | border-style: solid;
38 | border-color: #f8f8f8;
39 | font-size: 30rpx;
40 | background-color: #f8f8f8;
41 | border-radius: 6rpx;
42 | }
43 |
44 | .input .send {
45 | margin-top: 6rpx;
46 | width: 100%;
47 | display: flex;
48 | align-items: center;
49 | height: 64rpx;
50 | }
51 |
52 | .input .send_image {
53 | width: 48rpx;
54 | height: 48rpx;
55 | margin-right: 32rpx;
56 | }
57 |
58 | .input .send .del {
59 | background: #ccc;
60 | border-radius: 50%;
61 | padding: 6rpx;
62 | width: 32rpx;
63 | height: 32rpx;
64 | }
65 |
66 | .input .send_button {
67 | margin-left: auto;
68 | margin-right: 0px;
69 | color: #1890ff;
70 | font-size: 32rpx;
71 | padding: 6rpx 4rpx;
72 | }
73 |
74 |
--------------------------------------------------------------------------------
/pages/tmpl/adver/adunit.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/adver/adunit.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/pages/tmpl/adver/adunit.wxss:
--------------------------------------------------------------------------------
1 | /* Banner */
2 | .wxad {
3 | margin-bottom: 16rpx;
4 | }
5 |
6 | .banner {
7 | padding: 0px 0rpx;
8 | margin-bottom: 16rpx;
9 | position: relative;
10 | }
11 |
12 | .banner .swiper {
13 | height: 220rpx;
14 | }
15 |
16 | .banner .item {
17 | width: 100%;
18 | height: 220rpx;
19 | box-sizing: border-box;
20 | }
21 |
22 | .banner .img {
23 | width: 100%;
24 | height: 100%;
25 | /* border-radius: 6rpx; */
26 | }
27 |
28 | /* 插屏 */
29 | .inters {
30 | position: fixed;
31 | top: 0px; left: 0px; right: 0px; bottom: -1000px;
32 | z-index: 999999;
33 | background-color: rgba(0, 0, 0, .6);
34 | }
35 |
36 | .box {
37 | position: fixed;
38 | top: 20vh; left: 96rpx; right: 96rpx;
39 | z-index: 999;
40 | }
41 |
42 | .box .image {
43 | width: 100%;
44 | }
45 |
46 | .box .close {
47 | width: 48rpx;
48 | height: 48rpx;
49 | background: rgba(0, 0, 0, .6);
50 | border-radius: 50%;
51 | padding: 8rpx;
52 | margin-left: auto;
53 | margin-bottom: 16rpx;
54 | }
--------------------------------------------------------------------------------
/pages/tmpl/cmmt/kw-comment.js:
--------------------------------------------------------------------------------
1 | const kawa = require('../../../kawa.js')
2 |
3 | Component({
4 | properties: {
5 | comments: {
6 | type: Number,
7 | value: 0,
8 | }
9 | },
10 | data: {
11 | theme: {
12 | images: kawa.Theme.Image,
13 | }
14 | },
15 |
16 | methods: {}
17 | })
18 |
--------------------------------------------------------------------------------
/pages/tmpl/cmmt/kw-comment.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/cmmt/kw-comment.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/tmpl/cmmt/kw-comment.wxss:
--------------------------------------------------------------------------------
1 | .comment {
2 | display: flex;
3 | align-items: center;
4 | margin-right: 18rpx;
5 | }
6 |
7 | .comment .image{
8 | height: 42rpx;
9 | width: 42rpx;
10 | margin-left: 9.36rpx;
11 | }
12 |
13 | .comment .text {
14 | text-align: center;
15 | width: 86rpx;
16 | font-size: 28rpx;
17 | color: #888888;
18 | word-break: keep-all;
19 | }
--------------------------------------------------------------------------------
/pages/tmpl/draw/drawer.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 |
3 | Component({
4 | properties: {
5 | painting: {
6 | type: Object,
7 | value: {view: []},
8 | observer (newVal, oldVal) {
9 | if (!this.data.isPainting) {
10 | if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
11 | if (newVal && newVal.width) {
12 | this.setData({
13 | showCanvas: true,
14 | isPainting: true
15 | })
16 | this.readyPigment()
17 | }
18 | } else {
19 | if (newVal && newVal.mode !== 'same') {
20 | this.triggerEvent('getImage', {errMsg: 'canvasdrawer:samme params'})
21 | }
22 | }
23 | }
24 | }
25 | }
26 | },
27 | data: {
28 | showCanvas: false,
29 |
30 | width: 375,
31 | height: 650,
32 |
33 | tempFileList: [],
34 |
35 | isPainting: false
36 | },
37 | ctx: null,
38 | cache: {},
39 | ready () {
40 | this.ctx = wx.createCanvasContext('canvasdrawer', this)
41 | },
42 |
43 | lifetimes: {
44 | attached: function () {
45 | ctr.setup(this)
46 | },
47 | },
48 |
49 | attached: function () {
50 | ctr.setup(this)
51 | },
52 |
53 | methods: {
54 | readyPigment () {
55 | const inter = setInterval(() => {
56 | if (this.ctx) {
57 | clearInterval(inter)
58 | this.ctx.clearActions()
59 | this.ctx.save()
60 | ctr.start()
61 | }
62 | }, 100)
63 | },
64 |
65 | sizeChanged(width, height) {
66 | this.triggerEvent('sizeChanged', { width: width, height: height})
67 | }
68 | }
69 | })
--------------------------------------------------------------------------------
/pages/tmpl/draw/drawer.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/pages/tmpl/draw/drawer.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/tmpl/draw/drawer.wxss:
--------------------------------------------------------------------------------
1 | .board {
2 | position: fixed;
3 | top: 2000rpx;
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/goods/goods.js:
--------------------------------------------------------------------------------
1 | import biz from '../../../utils/biz.js'
2 |
3 | // pages/tmpl/goods/goods.js
4 | Component({
5 | /**
6 | * 组件的属性列表
7 | */
8 | properties: {
9 | goods: {
10 | type: Object,
11 | value: {}
12 | },
13 | content: {
14 | type: String,
15 | value: ""
16 | }
17 | },
18 |
19 | /**
20 | * 组件的初始数据
21 | */
22 | data: {
23 | },
24 |
25 | /**
26 | * 组件的方法列表
27 | */
28 | methods: {
29 | clickGoods: function() {
30 | biz.openLink(this.data.goods)
31 | }
32 | }
33 | })
34 |
--------------------------------------------------------------------------------
/pages/tmpl/goods/goods.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/goods/goods.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{goods.title}}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{content}}
13 |
14 |
15 |
16 | 推广
17 |
18 |
--------------------------------------------------------------------------------
/pages/tmpl/goods/goods.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tmpl/goods/goods.wxss */
2 | .ad_title {
3 | font-weight: 450;
4 | font-size: 36rpx;
5 | margin-bottom: 16rpx;
6 | }
7 |
8 | .ad_swiper {
9 | width: 100%;
10 | height: 395rpx;
11 | }
12 |
13 | .ad_item {
14 | border-top-left-radius: 12rpx;
15 | border-top-right-radius: 12rpx;
16 | overflow: hidden;
17 | }
18 |
19 | .ad_img {
20 | width: 100%;
21 | }
22 |
23 | .ad_link {
24 | background: #f8f8f8;
25 | padding: 20rpx;
26 | font-size: 28rpx;
27 | color: #576b95;
28 | }
29 |
30 | .ad_hint {
31 | font-size: 28rpx;
32 | color: #ccc;
33 | margin-top: 16rpx;
34 | margin-bottom: -4px;
35 | text-align: right;
36 | }
37 |
38 | .ad_l2 {
39 | text-overflow: -o-ellipsis-lastline;
40 | overflow: hidden;
41 | text-overflow: ellipsis;
42 | display: -webkit-box;
43 | -webkit-line-clamp: 2;
44 | -webkit-box-orient: vertical;
45 | }
--------------------------------------------------------------------------------
/pages/tmpl/img-grid/img-grid.js:
--------------------------------------------------------------------------------
1 | // pages/tmpl/img-grid/img-grid.js
2 | const ratio = getApp().globalData.ratio
3 | const resize = {
4 | r1: `?x-oss-process=image/resize,w_${450 * ratio}`,
5 | r4: `?x-oss-process=image/resize,w_${300 * ratio}`,
6 | r9: `?x-oss-process=image/resize,w_${250 * ratio}`,
7 | }
8 |
9 | Component({
10 | /**
11 | * 组件的属性列表
12 | */
13 | properties: {
14 | fill: {
15 | type: Boolean,
16 | value: false,
17 | },
18 | images: {
19 | type: Object,
20 | value: [],
21 | },
22 | mr: {
23 | type: String,
24 | value: '0px'
25 | }
26 | },
27 |
28 | lifetimes: {
29 | attached: function () {
30 | if (!this.data.fill) {
31 | this.setData({ images: fitImages(this) })
32 | }
33 | },
34 | },
35 | // 对 <2.2.3 版本基础库的兼容
36 | attached: function () {
37 | if (!this.data.fill) {
38 | this.setData({ images: fitImages(this) })
39 | }
40 | },
41 |
42 | /**
43 | * 组件的初始数据
44 | */
45 | data: {
46 | images: [
47 | "https://images.kawaapp.com/img_bjkk50cdbfdqfm68t540.jpg",
48 | ],
49 | },
50 |
51 | /**
52 | * 组件的方法列表
53 | */
54 | methods: {
55 | clickImage: function(e) {
56 | onClickImage(this, e)
57 | },
58 | }
59 | })
60 |
61 | function onClickImage(view, e) {
62 | var index = e.target.dataset.idx
63 | var images = getOriginImages(view.data.images)
64 | wx.previewImage({
65 | urls: images,
66 | current: images[index],
67 | })
68 | }
69 |
70 | function fitImages(view) {
71 | var images = view.data.images
72 | var suffix = ''
73 | if (images.length === 1) {
74 | suffix = resize.r1
75 | } else if (images.length === 4) {
76 | suffix = resize.r4
77 | } else {
78 | suffix = resize.r9
79 | }
80 | return images.map( item => {
81 | return item + suffix
82 | })
83 | }
84 |
85 | function getOriginImages(images) {
86 | var array = []
87 | images.map( item => {
88 | var i = item.indexOf('?')
89 | if (i > 0) {
90 | array.push(item.substring(0, i))
91 | } else {
92 | array.push(item)
93 | }
94 | })
95 | return array
96 | }
97 |
--------------------------------------------------------------------------------
/pages/tmpl/img-grid/img-grid.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/img-grid/img-grid.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/pages/tmpl/img-grid/img-grid.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tmpl/img-grid/img-grid.wxss */
2 | .grid {
3 | display: flex;
4 | flex-wrap: wrap;
5 | flex-direction: row;
6 | }
7 |
8 | .cell1 {
9 | padding: 6rpx;
10 | position: relative;
11 | width: 60%;
12 | height: 0;
13 | padding-bottom: 60%;
14 | }
15 |
16 | .cell2 {
17 | position: relative;
18 | width: 36%;
19 | height: 0;
20 | padding-bottom: 36%;
21 | }
22 |
23 | .cell3 {
24 | position: relative;
25 | width: 33.33%;
26 | height: 0;
27 | padding-bottom: 33.33%;
28 | }
29 |
30 | .inner {
31 | position: absolute;
32 | padding: 6rpx;
33 | top: 0;
34 | left: 0;
35 | right: 0;
36 | bottom: 0;
37 | }
38 |
39 | .inner .image {
40 | border-radius: 6rpx;
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/pages/tmpl/input/kw-input.js:
--------------------------------------------------------------------------------
1 | // pages/tmpl/input/input.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | hint: {
8 | type: String,
9 | value: "",
10 | }
11 | },
12 |
13 | /**
14 | * 组件的初始数据
15 | */
16 | data: {
17 | reply: {
18 | text: "",
19 | enable: false,
20 | },
21 | textMessage: "",
22 | },
23 |
24 | /**
25 | * 组件的方法列表
26 | */
27 | methods: {
28 | bindInput: function (e) {
29 | var reply = this.data.reply
30 | reply.text = e.detail.value
31 |
32 | if (e.detail.value && !reply.enable) {
33 | reply.enable = true
34 | this.setData({ reply: reply })
35 | } else if (!e.detail.value && reply.enable) {
36 | reply.enable = false
37 | this.setData({ reply: reply })
38 | }
39 | },
40 | sendComment: function(e) {
41 | var myEventDetail = {
42 | value: this.data.reply.text
43 | } // detail对象,提供给事件监听函数
44 | var myEventOption = {} // 触发事件的选项
45 | this.triggerEvent('sendComment', myEventDetail, myEventOption)
46 |
47 | // clear input
48 | this.setData({
49 | textMessage: "", reply: { text: "", enable: false}
50 | })
51 | },
52 | }
53 | })
--------------------------------------------------------------------------------
/pages/tmpl/input/kw-input.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/input/kw-input.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 |
16 |
17 |
18 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/pages/tmpl/input/kw-input.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tmpl/input/input.wxss */
2 |
3 | .release {
4 | display: flex;
5 | align-items: flex-start; /*底部对齐*/
6 | justify-content: space-between; /*两端对齐*/
7 | box-sizing: border-box;
8 | position: fixed;
9 | left: 0;
10 | bottom: 0;
11 | width: 100%;
12 | padding: 18rpx 0 18rpx 30rpx;
13 | background-color: #F7F8F7;
14 | font-size: 28rpx;
15 | z-index: 1000;
16 | }
17 |
18 | .release .text{
19 | width: 604rpx;
20 | border-width: 15rpx 20rpx; /*使用padding与预期留白不一致,故使用border*/
21 | border-style: solid;
22 | border-color: #ffffff;
23 | line-height: 34rpx;
24 | font-size: 30rpx;
25 | background-color: #ffffff;
26 | border-radius: 4rpx;
27 | }
28 |
29 | .release .submit{
30 | width: 116rpx;
31 | line-height: 64rpx;
32 | text-align: center;
33 | color: #66CC00;
34 | z-index: 1001;
35 | }
36 |
37 | .submit .button {
38 | height: 100%;
39 | font-size: 32rpx;
40 | padding-left: 0px;
41 | padding-right: 0px;
42 | color: #66CC00;
43 |
44 | }
45 | .submit .button::after{ border: none; }
46 |
--------------------------------------------------------------------------------
/pages/tmpl/like/kw-like.js:
--------------------------------------------------------------------------------
1 | const kawa = require('../../../kawa.js')
2 |
3 | // pages/tmpl/like/kw-like.js
4 | Component({
5 | /**
6 | * 组件的属性列表
7 | */
8 | properties: {
9 | favored: {
10 | type: Number,
11 | value: 0,
12 | },
13 | favors: {
14 | type: Number,
15 | value: 0,
16 | }
17 | },
18 |
19 | /**
20 | * 组件的初始数据
21 | */
22 | data: {
23 | theme: {
24 | images: kawa.Theme.Image,
25 | favorColor: kawa.Theme.FavorColor || kawa.Theme.MainColor,
26 | }
27 | },
28 |
29 | /**
30 | * 组件的方法列表
31 | */
32 | methods: {
33 | }
34 | })
35 |
--------------------------------------------------------------------------------
/pages/tmpl/like/kw-like.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/like/kw-like.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{favors? favors: "赞" }}
4 |
--------------------------------------------------------------------------------
/pages/tmpl/like/kw-like.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tmpl/like/kw-like.wxss */
2 | .img-text {
3 | display: flex;
4 | align-items: center;
5 | }
6 |
7 | .img-text .image{
8 | height: 42rpx;
9 | width: 42rpx;
10 | margin-left: 9.36rpx;
11 | }
12 |
13 | .img-text .text {
14 | text-align: center;
15 | width: 86rpx;
16 | font-size: 28rpx;
17 | color: #888888;
18 | }
--------------------------------------------------------------------------------
/pages/tmpl/link/kw-link.js:
--------------------------------------------------------------------------------
1 | // pages/tmpl/link/kw-link.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | link: {
8 | type: Object,
9 | value: {}
10 | }
11 | },
12 |
13 | /**
14 | * 组件的初始数据
15 | */
16 | data: {
17 |
18 | },
19 |
20 | /**
21 | * 组件的方法列表
22 | */
23 | methods: {
24 | openlink: function() {
25 | var url = this.data.link.url
26 | if (url) {
27 | wx.navigateTo({
28 | url: '/pages/webview/webview?q=' + encodeURIComponent(url),
29 | })
30 | }
31 | }
32 | }
33 | })
34 |
--------------------------------------------------------------------------------
/pages/tmpl/link/kw-link.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/link/kw-link.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{link.title}}
4 |
--------------------------------------------------------------------------------
/pages/tmpl/link/kw-link.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tmpl/link/kw-link.wxss */
2 | .link {
3 | box-sizing: border-box;
4 | background: #f8f8f8;
5 | display: flex;
6 | align-items: center;
7 | padding: 8rpx;
8 | width: 100%;
9 | }
10 |
11 | .link .image {
12 | box-sizing: border-box;
13 | min-width: 80rpx;
14 | width: 80rpx;
15 | height: 80rpx;
16 | margin-right: 8rpx;
17 | padding: 14rpx;
18 | }
19 |
20 | .link .text {
21 | color: #333;
22 | font-size: 30rpx;
23 | line-height: 32rpx;
24 |
25 | overflow: hidden;
26 | text-overflow: ellipsis;
27 | display: -webkit-box;
28 | -webkit-line-clamp: 2;
29 | -webkit-box-orient: vertical;
30 | }
--------------------------------------------------------------------------------
/pages/tmpl/loading/loading.js:
--------------------------------------------------------------------------------
1 | // pages/tmpl/loading/loading.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | loading: {
8 | type: Boolean,
9 | value: false,
10 | },
11 | hasmore: {
12 | type: Boolean,
13 | value: true,
14 | },
15 | },
16 |
17 | /**
18 | * 组件的初始数据
19 | */
20 | data: {
21 |
22 | },
23 |
24 | /**
25 | * 组件的方法列表
26 | */
27 | methods: {
28 |
29 | }
30 | })
31 |
--------------------------------------------------------------------------------
/pages/tmpl/loading/loading.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/loading/loading.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 加载中...
4 |
5 |
6 | — 没有更多数据了 —
7 |
8 |
9 |
--------------------------------------------------------------------------------
/pages/tmpl/loading/loading.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tmpl/loading/loading.wxss */
2 | .fade-title {
3 | font-size: 28rpx;
4 | color: #888888;
5 | }
6 |
7 | .loading {
8 | margin: 0px auto;
9 | width: 240rpx;
10 | padding: 12rpx 0px;
11 | display: flex;
12 | justify-items: center;
13 | }
14 |
15 | .loading .image {
16 | width: 48rpx;
17 | height: 48rpx;
18 | -webkit-animation:rotating 1s linear infinite;
19 | animation:rotating 1s linear infinite;
20 | }
21 |
22 | .loading .text {
23 | line-height: 48rpx;
24 | color: gray;
25 | margin-left: 18rpx;
26 | font-size: 32rpx;
27 | }
28 |
29 | @-webkit-keyframes rotating {
30 | 0% { -webkit-transform: rotate(0deg);}
31 | 100% { -webkit-transform: rotate(360deg);}
32 | }
33 | @keyframes rotating {
34 | 0% { -webkit-transform: rotate(0deg);}
35 | 100% { -webkit-transform: rotate(360deg);}
36 | }
--------------------------------------------------------------------------------
/pages/tmpl/location/location.js:
--------------------------------------------------------------------------------
1 | // pages/tmpl/location/location.js
2 | const kawa = require('../../../kawa.js')
3 |
4 | Component({
5 | /**
6 | * 组件的属性列表
7 | */
8 | properties: {
9 | location: {
10 | type: Object,
11 | value: "",
12 | }
13 | },
14 |
15 | /**
16 | * 组件的初始数据
17 | */
18 | data: {
19 | theme: kawa.Theme.Image,
20 | },
21 |
22 | /**
23 | * 组件的方法列表
24 | */
25 | methods: {
26 | clickLocation: function(e) {
27 | var location = this.data.location
28 | if (location) {
29 | wx.openLocation({
30 | latitude: location.lat, longitude: location.lng, name: location.name,
31 | })
32 | }
33 | }
34 | }
35 | })
36 |
--------------------------------------------------------------------------------
/pages/tmpl/location/location.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/location/location.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{location.name}}
5 |
6 |
--------------------------------------------------------------------------------
/pages/tmpl/location/location.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tmpl/location/location.wxss */
2 |
3 | .location {
4 | font-size: 28rpx;
5 | color: #576b95;
6 | display: flex;
7 | align-items:center;
8 | }
9 |
10 | .location .image {
11 | width: 32rpx;
12 | height: 32rpx;
13 | min-width: 32rpx;
14 | margin-right: 6rpx;
15 | }
16 |
17 | .line1 {
18 | text-overflow: ellipsis;
19 | overflow: hidden;
20 | white-space: nowrap;
21 | }
--------------------------------------------------------------------------------
/pages/tmpl/login/dialog.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/login/dialog.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 提示
8 | 在社区中发言时,需要绑定微信昵称{{mode==2?'和手机号':''}}才能进行。
9 |
10 |
11 |
12 | 昵称:
13 |
19 |
20 |
21 |
22 | 手机:
23 |
29 |
30 |
31 |
37 |
38 |
--------------------------------------------------------------------------------
/pages/tmpl/login/dialog.wxss:
--------------------------------------------------------------------------------
1 | @import '/app.wxss';
2 |
3 | .-title {
4 | font-size: 28rpx;
5 | color: gray;
6 | padding: 24rpx 28rpx;
7 | }
8 |
9 | .mask {
10 | position: fixed;
11 | top: 0px; left: 0px; right: 0px; bottom: -1000px;
12 | z-index: 1999;
13 | background-color: rgba(0, 0, 0, .6);
14 | }
15 |
16 | .dialog {
17 | position: fixed;
18 | top: 10vh; left: 96rpx; right: 96rpx;
19 | z-index: 999;
20 | background: white;
21 | border-radius: 12rpx;
22 | display: flex;
23 | flex-direction: column;
24 | padding: 86rpx 64rpx 64rpx 64rpx;
25 | }
26 |
27 | .close {
28 | position: absolute;
29 | top: 32rpx;
30 | right: 32rpx;
31 | width:42rpx;
32 | height:42rpx;
33 | }
34 |
35 | .dialog .-title {
36 | padding: 12rpx 0;
37 | font-size: 32rpx;
38 | }
39 |
40 | .dialog .note {
41 | margin-top: 24rpx;
42 | font-size: 28rpx;
43 | color: gray;
44 | }
45 |
46 | .input {
47 | width: 100%;
48 | display: flex;
49 | align-items: center;
50 | font-size: 32rpx;
51 | }
52 |
53 | .circle {
54 | margin-right: 16rpx;
55 | width: 32rpx;
56 | height: 32rpx;
57 | border-radius: 50%;
58 | border: 1px solid gainsboro;
59 | }
60 |
61 | .name {
62 | color: #666;
63 | font-weight: 500;
64 | margin-right: 12rpx;
65 | }
66 |
67 | .btn {
68 | position: relative;
69 | margin-left: 32rpx;
70 | text-align: center;
71 | }
72 |
73 | .underline {
74 | width: 100%;
75 | height: 1px;
76 | background: #1890FF;
77 | opacity: 1;
78 | position: absolute;
79 | z-index: 0;
80 | bottom: 7rpx;
81 | }
82 |
83 | .btn-submit {
84 | background-color: #f8f8f8;
85 | color:white;
86 | font-size: 32rpx;
87 | margin-top:128rpx;
88 | width:256rpx;
89 | }
90 |
91 | .btn-submit-hover {
92 | opacity: .6;
93 | }
--------------------------------------------------------------------------------
/pages/tmpl/poll/poll.js:
--------------------------------------------------------------------------------
1 | const api = require('../../../utils/api.js')
2 | const util = require('../../../utils/util.js')
3 | const app = getApp()
4 |
5 | Component({
6 | properties: {
7 |
8 | },
9 |
10 | lifetimes: {
11 | attached: function () {
12 | setup(this)
13 | },
14 | },
15 |
16 | //组件的初始数据
17 | data: {
18 | polls: [],
19 | },
20 |
21 | //组件的方法列表
22 | methods: {
23 | clickPoll: function(e) {
24 | const poll = e.currentTarget.dataset.item
25 | onClickPoll(this, poll)
26 | }
27 | }
28 | })
29 |
30 | function setup(view) {
31 | api.getPollList().then( resp => {
32 | const polls = massage(resp.data)
33 | view.setData({ polls: polls })
34 | }).catch( err => {
35 | console.log("get poll err:", err)
36 | })
37 | }
38 |
39 | function onClickPoll(view, p) {
40 | wx.navigateTo({
41 | url: `/pages/poll/poll?id=${p.id}`,
42 | })
43 | }
44 |
45 | function massage(polls) {
46 | var polls = polls.slice(0, 3)
47 | polls.map( item => {
48 | item.expire = format(item.expired_at)
49 | })
50 | return polls
51 | }
52 |
53 | const format = function (ts) {
54 | return util.prettyTimeYMD(new Date(ts * 1000))
55 | }
--------------------------------------------------------------------------------
/pages/tmpl/poll/poll.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/poll/poll.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{item.title}}
3 |
8 |
9 | 截止时间: {{item.expire}}
10 | 投票数: {{item.vote_count}}次
11 |
12 | 投票
13 |
--------------------------------------------------------------------------------
/pages/tmpl/poll/poll.wxss:
--------------------------------------------------------------------------------
1 | .poll {
2 | background-color: #ffffff;
3 | margin-bottom: 16rpx;
4 | position: relative;
5 | padding: 18rpx 24rpx;
6 | }
7 |
8 | .poll .item {
9 | display: flex;
10 | align-items: center;
11 | color: gray;
12 | }
13 |
14 | .poll .image {
15 | margin: 8rpx 0;
16 | width: 100%;
17 | height: 252rpx;
18 | border-radius: 6rpx;
19 | }
20 |
21 | .h {
22 | font-size: 32rpx;
23 | font-weight: 500;
24 | }
25 |
26 | .p {
27 | font-size: 28rpx;
28 | margin-right: 36rpx;
29 | }
30 |
31 | .tag {
32 | background: #ff4d00;
33 | color: white;
34 | right: 24rpx; top: 0;
35 | position: absolute;
36 | font-size: 28rpx;
37 | padding: 0 16rpx;
38 | z-index: 999;
39 | margin-right: 12rpx;
40 | }
--------------------------------------------------------------------------------
/pages/tmpl/post/kw-post.js:
--------------------------------------------------------------------------------
1 | // pages/tmpl/post/kw-post.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | item: {
8 | type: Object,
9 | value: {}
10 | },
11 | mr: {
12 | type: String,
13 | value: "0rpx"
14 | }
15 | },
16 |
17 | /**
18 | * 组件的初始数据
19 | */
20 | data: {
21 | },
22 |
23 | /**
24 | * 组件的方法列表
25 | */
26 | methods: {
27 |
28 | }
29 | })
30 |
31 |
--------------------------------------------------------------------------------
/pages/tmpl/post/kw-post.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "img-grid": "../../tmpl/img-grid/img-grid",
5 | "location": "../../tmpl/location/location",
6 | "kw-text": "../../tmpl/text/kw-text",
7 | "kw-video": "../../tmpl/video/kw-video",
8 | "kw-link": "../../tmpl/link/kw-link",
9 | "kw-goods": "../../tmpl/goods/goods"
10 | }
11 | }
--------------------------------------------------------------------------------
/pages/tmpl/post/kw-post.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{item.title}}
12 | {{item.excerpt}}...
13 | 全文
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/pages/tmpl/post/kw-post.wxss:
--------------------------------------------------------------------------------
1 | .hl {
2 | color:dodgerblue;
3 | }
4 |
5 | .rich {
6 | box-sizing: border-box;
7 |
8 | }
9 |
10 | .itemwrapper {
11 | margin-bottom: 16rpx;
12 | }
13 |
14 | .rich .view {
15 | font-weight: 500;
16 | font-size: 42rpx;
17 | margin-bottom: 16rpx;
18 | }
19 |
20 | .rich .text {
21 | color: #333;
22 | font-size: 30rpx;
23 | line-height: 32rpx;
24 | }
--------------------------------------------------------------------------------
/pages/tmpl/tab/kw-tab.js:
--------------------------------------------------------------------------------
1 | const kawa = require('../../../kawa.js')
2 |
3 | // pages/tmpl/tab/kw-tab.js
4 | Component({
5 | /**
6 | * 组件的属性列表
7 | */
8 | properties: {
9 | items: {
10 | type: Array,
11 | value: [],
12 | }
13 | },
14 |
15 | /**
16 | * 组件的初始数据
17 | */
18 | data: {
19 | theme: {
20 | mainColor: kawa.Theme.MainColor,
21 | tabColor: kawa.Theme.TabSelectedColor || kawa.Theme.MainColor,
22 | },
23 | current: 0, //预设默认选中的栏目
24 | },
25 |
26 | /**
27 | * 组件的方法列表
28 | */
29 | methods: {
30 | clickTab: function(e) {
31 | var idx = e.target.dataset.idx;
32 | var current = this.data.current
33 | if (current != idx) {
34 | this.setData({ current: idx })
35 | }
36 | this.triggerEvent('onTabChanged', idx)
37 | }
38 | }
39 | })
40 |
--------------------------------------------------------------------------------
/pages/tmpl/tab/kw-tab.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/tab/kw-tab.wxml:
--------------------------------------------------------------------------------
1 |
2 |
5 | {{item}}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/pages/tmpl/tab/kw-tab.wxss:
--------------------------------------------------------------------------------
1 | .tab-h {
2 | display: flex;
3 | align-items: flex-start;
4 | padding-top: 16rpx;
5 | width: 100%;
6 | box-sizing: border-box;
7 | background: #fff;
8 | font-size: 16px;
9 | white-space: nowrap;
10 | }
11 |
12 | .tab-item {
13 | margin: 0 32rpx;
14 | font-size: 32rpx;
15 | opacity: .4;
16 | font-weight: 500;
17 | display: flex;
18 | flex-direction: column;
19 | align-items: center;
20 | }
21 |
22 | .tab-item.active {
23 | opacity: 1;
24 | }
25 |
26 | .tab-item .indicator {
27 | display: none;
28 | height: 4rpx;
29 | width: 36rpx;
30 | border-radius: 2rpx;
31 | margin-top: 8rpx;
32 | }
33 |
34 | .tab-item.active .indicator {
35 | display: block;
36 | }
--------------------------------------------------------------------------------
/pages/tmpl/text/kw-text.js:
--------------------------------------------------------------------------------
1 | // pages/tmpl/fulltext/fulltext.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | text: {
8 | type: String,
9 | value: ''
10 | },
11 | limit: {
12 | type: Number,
13 | value: 70
14 | },
15 | selectable: {
16 | type: Boolean,
17 | value: false,
18 | }
19 | },
20 |
21 | /**
22 | * 组件的初始数据
23 | */
24 | data: {
25 | showList: [],
26 | showAll: false,
27 | },
28 |
29 | /**
30 | * 组件的方法列表
31 | */
32 | methods: {
33 |
34 | },
35 |
36 | observers: {
37 | 'text, limit': function (field) {
38 | var text = this.data.text, limit = this.data.limit
39 | var showAll = text.length > limit
40 | var showList = getShowList(text, limit)
41 | this.setData({ showList, showAll })
42 | },
43 | },
44 | })
45 |
46 | function getShowList(text, limit) {
47 | var show = text.length > limit? text.substring(0, limit): text
48 | return decorateText(show)
49 | }
50 |
51 | // "123 #456# 789" => {{text:'123'}, {tag:true, text:'#456#'}, {text:'789'}}
52 | // 算法: 以 ‘#’ 分割字符串,偶数段为普通文本,奇数段为 ‘#’ 环绕的文本
53 | // 如果该段为最后一段说名只包围了左边,放弃.
54 | function decorateText(text) {
55 | var styled = []
56 | if (text) {
57 | var array = text.split('#')
58 | for(var i = 0; i < array.length; i++) {
59 | if (i%2 == 0) {
60 | if (array[i]) {
61 | styled.push({ text: array[i] })
62 | }
63 | } else if (i < array.length-1) {
64 | styled.push({tag:true, text: '#' + array[i] + '#'})
65 | } else {
66 | styled.push({text: '#' + array[i]})
67 | }
68 | }
69 | }
70 | return styled
71 | }
72 |
73 | function hashtag(text) {
74 | var regex = /#[^#]+#/g
75 | if (text) {
76 | return text.match(regex)
77 | }
78 | return null
79 | }
80 |
81 | module.exports = {
82 | decorateText: decorateText,
83 | }
--------------------------------------------------------------------------------
/pages/tmpl/text/kw-text.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/text/kw-text.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{text.text}}
6 | ...
7 | 全文
8 |
--------------------------------------------------------------------------------
/pages/tmpl/text/kw-text.wxss:
--------------------------------------------------------------------------------
1 | .highlight {
2 | color:dodgerblue;
3 | }
--------------------------------------------------------------------------------
/pages/tmpl/video/kw-video.js:
--------------------------------------------------------------------------------
1 | // pages/tmpl/video/kw-video.js
2 | const kawa = require('../../../kawa.js')
3 |
4 | Component({
5 | /**
6 | * 组件的属性列表
7 | */
8 | properties: {
9 | video: {
10 | type: Object,
11 | value: "",
12 | },
13 | width: {
14 | type: String,
15 | value: "100%"
16 | }
17 | },
18 |
19 | /**
20 | * 组件的初始数据
21 | */
22 | data: {
23 | theme: kawa.Theme.Image,
24 | showCover: true,
25 | autoplay: false,
26 | },
27 |
28 | ready() {
29 | this.initData();
30 | },
31 |
32 | /**
33 | * 组件的方法列表
34 | */
35 | methods: {
36 | initData() {
37 | },
38 |
39 | subscribePosition() {
40 | var view = this;
41 | wx.createIntersectionObserver(view)
42 | .relativeToViewport()
43 | .observe('#item-video', res => {
44 | if (res && res.intersectionRatio > 0) {
45 | } else {
46 | view.pause()
47 | }
48 | });
49 | },
50 |
51 | clickVideo: function() {
52 | this.play()
53 | },
54 | handleVideoEnded: function() {
55 | this.pause()
56 | },
57 | play() {
58 | this.setData({ showCover: false}, () => {
59 | this.subscribePosition()
60 | })
61 | },
62 | pause() {
63 | this.setData({ showCover: true})
64 | },
65 | }
66 | })
67 |
--------------------------------------------------------------------------------
/pages/tmpl/video/kw-video.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/tmpl/video/kw-video.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/pages/tmpl/video/kw-video.wxss:
--------------------------------------------------------------------------------
1 | /* pages/tmpl/video/kw-video.wxss */
2 | .container {
3 | width: 100%;
4 | height: 54vw;
5 | }
6 |
7 | .cover {
8 | position: relative;
9 | z-index: 999;
10 | width: 100%;
11 | height: 54vw;
12 | background-color: rgba(0, 0, 0, .3);
13 | border-radius: 6rpx;
14 | }
15 |
16 | .snapshot {
17 | width: 100%;
18 | height: 54vw;
19 | border-radius: 6rpx;
20 | }
21 |
22 | .play {
23 | position: absolute;
24 | top: calc(27vw - 50rpx);
25 | left:calc(50% - 50rpx);
26 | width: 100rpx;
27 | height: 100rpx;
28 | }
29 |
30 | .video {
31 | z-index: 998;
32 | width: 100%;
33 | height: 100%;
34 | border-radius: 6rpx;
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/pages/user/cmmt/comment.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../../kawa.js')
3 |
4 | // pages/me/list/comment.js
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | theme: kawa.Theme.Image,
12 | comments: [],
13 | user: {
14 | uid: 0,
15 | },
16 | loading: false,
17 | hasmore: true,
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面加载
22 | */
23 | onLoad: function (options) {
24 | ctr.setup(this)
25 | ctr.onLoad(options)
26 | },
27 |
28 | onUnload: function() {
29 | ctr.onUnload()
30 | },
31 |
32 | /**
33 | * 页面相关事件处理函数--监听用户下拉动作
34 | */
35 | onPullDownRefresh: function () {
36 | ctr.onPullDownRefresh()
37 | },
38 |
39 | /**
40 | * 页面上拉触底事件的处理函数
41 | */
42 | onReachBottom: function () {
43 | ctr.onReachBottom()
44 | },
45 | })
--------------------------------------------------------------------------------
/pages/user/cmmt/comment.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的评论",
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "usingComponents": {
6 | "kw-loading": "../../tmpl/loading/loading"
7 | }
8 | }
--------------------------------------------------------------------------------
/pages/user/cmmt/comment.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
12 |
13 | @{{item.replier.nickname || '匿名'}}
14 |
15 | {{item.subject}}
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/pages/user/cmmt/comment.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/list/comment.wxss */
2 | .my-comment {
3 | margin: 12rpx 0 16rpx 0;
4 | font-size: 30rpx;
5 | line-height: 38rpx;
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/pages/user/cmmt/controller.js:
--------------------------------------------------------------------------------
1 | const api = require('../../../utils/api.js')
2 | const PageSize = 20
3 |
4 | var view = undefined
5 | function setup(_view) {
6 | view = _view
7 | }
8 | function onUnload() {
9 | view = undefined
10 | }
11 |
12 | function onLoad(options) {
13 | if (options && options.uid) {
14 | view.data.user.uid = options.uid
15 | }
16 |
17 | view.setData({loading: true})
18 | api.getUserCommentList(view.data.user.uid, 1, PageSize).then(resp => {
19 | var hasmore = resp.data && resp.data.length == PageSize
20 | view.setData({ loading: false, hasmore: hasmore, page: 1 })
21 | view.setData({ comments: resp.data })
22 | }).catch( err => {
23 | console.log(err)
24 | view.setData({ loading: false })
25 | })
26 | }
27 |
28 | function onPullDownRefresh() {
29 | if (view.data.loading) {
30 | return
31 | }
32 | view.setData({ loading: true })
33 | api.getUserCommentList(view.data.user.uid, 1, PageSize).then(resp => {
34 | var hasmore = resp.data && resp.data.length == PageSize
35 | view.setData({ loading: false, hasmore: hasmore, page: 1})
36 | view.setData({ comments: resp.data })
37 | wx.stopPullDownRefresh()
38 | wx.showToast({
39 | title: '刷新成功',
40 | icon: 'success',
41 | })
42 | }).catch( err => {
43 | view.setData({ loading: false })
44 | wx.stopPullDownRefresh()
45 | wx.showToast({
46 | title: '刷新失败:'+err.code, icon: 'none',
47 | })
48 | })
49 | }
50 |
51 | function onReachBottom() {
52 | if (view.data.loadng || !view.data.hasmore) {
53 | return
54 | }
55 |
56 | var { user, comments, page } = view.data
57 | view.setData({ loading: true})
58 |
59 | api.getUserCommentList(user.uid, page+1, PageSize).then(resp => {
60 | var hasmore = resp.data && resp.data.length == PageSize
61 | view.setData({ hasmore: hasmore, loading: false, page: page+1 })
62 | view.setData({ comments: comments.concat(resp.data) })
63 | }).catch(err => {
64 | view.setData({ loading: false })
65 | wx.showToast({
66 | title: '加载失败:'+err.code, icon: 'none',
67 | })
68 | })
69 | }
70 |
71 | module.exports = {
72 | setup: setup,
73 | onLoad: onLoad,
74 | onUnload: onUnload,
75 | onPullDownRefresh: onPullDownRefresh,
76 | onReachBottom: onReachBottom,
77 | }
--------------------------------------------------------------------------------
/pages/user/favor/favor.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../../kawa.js')
3 |
4 | // pages/me/list/favor.js
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | theme: kawa.Theme.Image,
12 | favors: [],
13 | user: {
14 | uid: 0,
15 | },
16 | loading: false,
17 | hasmore: true,
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面加载
22 | */
23 | onLoad: function (options) {
24 | ctr.setup(this)
25 | ctr.onLoad(options)
26 | },
27 | onUnload: function () {
28 | ctr.onUnload()
29 | },
30 |
31 | /**
32 | * 页面相关事件处理函数--监听用户下拉动作
33 | */
34 | onPullDownRefresh: function () {
35 | ctr.onPullDownRefresh()
36 | },
37 |
38 | /**
39 | * 页面上拉触底事件的处理函数
40 | */
41 | onReachBottom: function () {
42 | ctr.onReachBottom()
43 | },
44 | // 列表点击
45 | clickItem: function (e) {
46 | ctr.onClickItem(e)
47 | },
48 | })
--------------------------------------------------------------------------------
/pages/user/favor/favor.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的点赞",
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "usingComponents": {
6 | "kw-loading": "../../tmpl/loading/loading"
7 | }
8 | }
--------------------------------------------------------------------------------
/pages/user/favor/favor.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{item.entity_type?'赞了此评论':'赞了这篇帖子'}}
5 |
6 |
9 |
10 | {{item.actor.nickname || '匿名'}}
11 |
12 | {{item.subject}}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/pages/user/favor/favor.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/list/favor.wxss */
2 |
--------------------------------------------------------------------------------
/pages/user/favorite/favorite.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../../kawa.js')
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | theme: kawa.Theme.Image,
11 | posts: [],
12 | user: {
13 | uid: 0,
14 | },
15 | loading: false,
16 | hasmore: true,
17 | page: 1,
18 | size: 20,
19 | },
20 |
21 | /**
22 | * 生命周期函数--监听页面加载
23 | */
24 | onLoad: function (options) {
25 | ctr.setup(this)
26 | ctr.onLoad(options)
27 | },
28 |
29 | onUnload: function() {
30 | ctr.onUnload()
31 | },
32 |
33 | /**
34 | * 页面相关事件处理函数--监听用户下拉动作
35 | */
36 | onPullDownRefresh: function () {
37 | ctr.onPullDownRefresh()
38 | },
39 |
40 | /**
41 | * 页面上拉触底事件的处理函数
42 | */
43 | onReachBottom: function () {
44 | ctr.onReachBottom()
45 | },
46 | })
--------------------------------------------------------------------------------
/pages/user/favorite/favorite.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的收藏",
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "usingComponents": {
6 | "kw-loading": "../../tmpl/loading/loading"
7 | }
8 | }
--------------------------------------------------------------------------------
/pages/user/favorite/favorite.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 收藏了这篇帖子
6 |
7 |
10 |
11 | {{item.author.nickname || '匿名'}}
12 |
13 | {{item.content}}
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/pages/user/favorite/favorite.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/favorite.wxss */
--------------------------------------------------------------------------------
/pages/user/friend/friend.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "kw-tab": "../../tmpl/tab/kw-tab",
4 | "kw-loading": "../../tmpl/loading/loading"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/user/friend/friend.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.nickname}}
10 |
11 |
12 | 已关注
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/pages/user/friend/friend.wxss:
--------------------------------------------------------------------------------
1 | .user {
2 | background: white;
3 | padding: 24rpx 16rpx;
4 | display: flex;
5 | align-items: center;
6 | border-bottom: 1rpx solid #f8f8f8;
7 | }
8 |
9 | .user .button {
10 | margin-left: auto;
11 | background: #f8f8f8;
12 | font-size: 28rpx;
13 | color: #333;
14 | padding: 8rpx 24rpx;
15 | border-radius: 30rpx;
16 | }
17 |
18 | .timearrow {
19 | margin-left: auto;
20 | display: flex;
21 | align-items: center;
22 | }
23 |
24 | .timearrow text {
25 | font-size: 28rpx;
26 | color: gray;
27 | margin-right: 12rpx;
28 | }
29 |
30 | .timearrow image {
31 | width: 42rpx;
32 | height: 42rpx;
33 | opacity: .7;
34 | }
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/pages/user/post/post.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../../kawa.js')
3 |
4 | // pages/me/list/post.js
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | theme: kawa.Theme.Image,
12 | posts: [],
13 | user: {
14 | uid: 0,
15 | },
16 | loading: false,
17 | hasmore: true,
18 | page: 1,
19 | },
20 |
21 | /**
22 | * 生命周期函数--监听页面加载
23 | */
24 | onLoad: function (options) {
25 | ctr.setup(this)
26 | ctr.onLoad(options)
27 | },
28 | onUnload: function () {
29 | ctr.onUnload()
30 | },
31 | /**
32 | * 页面相关事件处理函数--监听用户下拉动作
33 | */
34 | onPullDownRefresh: function () {
35 | ctr.onPullDownRefresh()
36 | },
37 |
38 | /**
39 | * 页面上拉触底事件的处理函数
40 | */
41 | onReachBottom: function () {
42 | ctr.onReachBottom()
43 | },
44 | })
--------------------------------------------------------------------------------
/pages/user/post/post.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的帖子",
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "usingComponents": {
6 | "kw-loading": "../../tmpl/loading/loading",
7 | "kw-post": "../../tmpl/post/kw-post"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/user/post/post.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 | {{item.author.nickname || '匿名'}}
11 | {{item.time}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/pages/user/post/post.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/list/post.wxss */
--------------------------------------------------------------------------------
/pages/user/user/user.js:
--------------------------------------------------------------------------------
1 | const ctr = require('./controller.js')
2 | const kawa = require('../../../kawa.js')
3 |
4 | // pages/user/user.js
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | theme: {
12 | images: kawa.Theme.Image,
13 | color: kawa.Theme.MainColor,
14 | },
15 | user: {},
16 | posts: [],
17 | loading: false,
18 | hasmore: true,
19 | follow: false,
20 | },
21 |
22 | /**
23 | * 生命周期函数--监听页面加载
24 | */
25 | onLoad: function (options) {
26 | ctr.setup(this)
27 | ctr.onLoad(options)
28 | },
29 |
30 | onUnload: function() {
31 | ctr.onUnload()
32 | },
33 |
34 | clickSendMessage: function(e) {
35 | ctr.onClickSend(e)
36 | },
37 |
38 | onReachBottom: function(e) {
39 | ctr.onReachBottom()
40 | },
41 |
42 | clickFollow: function(e) {
43 | ctr.onClickFollow(e)
44 | }
45 | })
--------------------------------------------------------------------------------
/pages/user/user/user.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark",
5 | "usingComponents": {
6 | "kw-loading": "../../tmpl/loading/loading",
7 | "kw-post": "../../tmpl/post/kw-post",
8 | "kw-login": "../../tmpl/login/dialog"
9 | }
10 | }
--------------------------------------------------------------------------------
/pages/user/user/user.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{user.nickname}}
6 |
7 |
8 |
9 | {{user.role_name}} ·
10 |
11 | 已加入 {{user.days}} 天
12 |
13 |
14 |
15 |
16 | {{follow? '已关注':'+ 关注' }}
17 |
18 |
19 |
20 |
21 | 发消息
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
39 |
40 | {{item.author.nickname || '匿名'}}
41 | {{item.time}}
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/pages/user/user/user.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/user.wxss */
2 | page {
3 | background-color:#eee;
4 | }
5 |
6 | .vertical {
7 | display: flex;
8 | flex-direction: column;
9 | align-items: center;
10 | background: #fff;
11 | }
12 |
13 | .vertical .avatar {
14 | width: 192rpx;
15 | height: 192rpx;
16 | border-radius: 50%;
17 | background-color: lightgray;
18 | }
19 |
20 | .vertical .nickname {
21 | font-size: 48rpx;
22 | font-weight: 800;
23 | margin-top: 24rpx;
24 | }
25 |
26 | .verified {
27 | display: flex;
28 | align-items: center;
29 | font-size: 28rpx;
30 | color: #444;
31 | }
32 |
33 | .verified_img {
34 | width: 36rpx;
35 | height: 36rpx;
36 | margin-right: 4rpx;
37 | opacity: .9;
38 | }
39 |
40 | .vertical .ts {
41 | font-size: 28rpx;
42 | color: #444;
43 | }
44 |
45 | .msg {
46 | font-size: 32rpx;
47 | color: #333;
48 | display: flex;
49 | align-items: center;
50 | }
51 |
52 | .msg image {
53 | height: 48rpx;
54 | width: 48rpx;
55 | margin-right: 8rpx;
56 | margin-top: -2rpx;
57 | }
58 |
59 | .avatar {
60 | width: 82rpx;
61 | height: 82rpx;
62 | border-radius: 50%;
63 | }
64 |
65 | .gray-bg {
66 | background: #f8f8f8;
67 | font-size: 28rpx;
68 | color: #333;
69 | padding: 8rpx 24rpx;
70 | border-radius: 30rpx;
71 | }
--------------------------------------------------------------------------------
/pages/webview/webview.js:
--------------------------------------------------------------------------------
1 | import api from '../../utils/api.js'
2 | import util from '../../utils/util.js'
3 | import h2j from '../../utils/h2j/parser.js'
4 |
5 | // pages/webview/webview.js
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | link: '',
13 | rich: true,
14 | title: '',
15 | nodes: {},
16 | author: '',
17 | date: '',
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面加载
22 | */
23 | onLoad: function (options) {
24 | const link = decodeURIComponent(options.q) || ""
25 | if (link.includes("kawaapp.com/w/")) {
26 | this.setData({ rich: true, link})
27 | getArticle(this, link)
28 | } else {
29 | this.setData({ rich: false, link})
30 | }
31 | },
32 |
33 | clickCopy: function(e) {
34 | console.log("click cooc")
35 | const link = this.data.link
36 | wx.setClipboardData({
37 | data: link,
38 | success: function (res) {
39 | wx.showToast({ title: '已经复制到剪切板', icon: 'none' })
40 | },
41 | fail: function (err) {
42 | console.log("copy err:", err)
43 | wx.showToast({ title: '复制失败:' + err, icon: 'none'})
44 | }
45 | })
46 | },
47 |
48 | onShareAppMessage: function(res) {
49 | const url = encodeURIComponent(this.data.link)
50 | return {
51 | path: `/pages/webview/webview?q=${url}`,
52 | }
53 | }
54 | })
55 |
56 | // eg: https://kawaapp.com/w/33G5ZCK7YUHO/articles/1517283126
57 | function getArticle(view, link) {
58 | const appKey = link.substring(22, 34)
59 | const id = link.substring(44)
60 | api.getArticle(appKey, id).then( resp => {
61 | const data = resp.data
62 | const json = h2j.getRichTextJson(data.html)
63 | view.setData({
64 | rich: true,
65 | nodes: json.children,
66 | title: data.title,
67 | author: data.author,
68 | date: util.prettyTime(new Date(data.publish_at * 1000))
69 | })
70 | })
71 | }
--------------------------------------------------------------------------------
/pages/webview/webview.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundColor": "#fff",
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/webview/webview.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 | 作者:{{author}}
6 | {{date}}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pages/webview/webview.wxss:
--------------------------------------------------------------------------------
1 | /* pages/webview/webview.wxss */
2 | page {
3 | background-color:#fff;
4 | }
5 |
6 | .rich-img {
7 | max-width: 100%;
8 | margin: 0px auto;
9 | }
10 |
11 | .article {
12 | padding: 24rpx;
13 | }
14 |
15 | .title {
16 | font-weight: 500;
17 | font-size: 42rpx;
18 | }
19 |
20 | .meta {
21 | font-size: 28rpx;
22 | color: gray;
23 | margin-top: 18rpx;
24 | margin-bottom: 42rpx;
25 | }
26 |
27 | .author {
28 | margin-right: 32rpx;
29 | }
30 |
31 | .footer {
32 | margin: 32rpx 0rpx;
33 | font-size: 28rpx;
34 | color: dodgerblue;
35 | }
--------------------------------------------------------------------------------
/pages/writer/comps/link/linkeditor.js:
--------------------------------------------------------------------------------
1 | const kawa = require('../../../../kawa.js')
2 |
3 | // pages/writer/comps/link/linkeditor.js
4 | Component({
5 | /**
6 | * 组件的属性列表
7 | */
8 | properties: {
9 | show: {
10 | type: Boolean,
11 | value: false,
12 | },
13 | title: {
14 | type: String,
15 | value: "",
16 | },
17 | placeholder: {
18 | type: String,
19 | value: "",
20 | }
21 | },
22 |
23 | /**
24 | * 组件的初始数据
25 | */
26 | data: {
27 | theme: {
28 | color: kawa.Theme.MainColor,
29 | },
30 | reply: {
31 | text: "",
32 | enable: false,
33 | },
34 | textMessage: "",
35 | },
36 |
37 | /**
38 | * 组件的方法列表
39 | */
40 | methods: {
41 | bindInput: function (e) {
42 | var reply = this.data.reply
43 | reply.text = e.detail.value
44 | if (e.detail.value && !reply.enable) {
45 | reply.enable = true
46 | this.setData({ reply: reply })
47 | } else if (!e.detail.value && reply.enable) {
48 | reply.enable = false
49 | this.setData({ reply: reply })
50 | }
51 | },
52 | clickSubmit: function (e) {
53 | var myEventDetail = {
54 | value: this.data.reply.text
55 | } // detail对象,提供给事件监听函数
56 | var myEventOption = {} // 触发事件的选项
57 | this.triggerEvent('onSubmit', myEventDetail, myEventOption)
58 | // clear input
59 | // this.setData({
60 | // textMessage: "", reply: { text: "", enable: false }
61 | // })
62 | },
63 |
64 | clickCancel: function(e) {
65 | this.triggerEvent('onRequestClose')
66 | }
67 | }
68 | })
69 |
--------------------------------------------------------------------------------
/pages/writer/comps/link/linkeditor.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/writer/comps/link/linkeditor.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{title}}
7 |
8 |
20 |
21 | 注意:仅支持卡哇文档或关联公众号文章地址
22 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/pages/writer/comps/link/linkeditor.wxss:
--------------------------------------------------------------------------------
1 | .-title {
2 | font-size: 28rpx;
3 | color: gray;
4 | padding: 24rpx 28rpx;
5 | }
6 |
7 | .mask {
8 | position: fixed;
9 | top: 0px; left: 0px; right: 0px; bottom: -1000px;
10 | z-index: 1999;
11 | background-color: rgba(0, 0, 0, .6);
12 | }
13 |
14 | .dialog {
15 | position: fixed;
16 | top: 30vh; left: 48rpx; right: 48rpx;
17 | z-index: 999;
18 | background: white;
19 | border-radius: 12rpx;
20 | display: flex;
21 | flex-direction: column;
22 | align-items: center;
23 | padding: 12rpx 0rpx;
24 | }
25 |
26 | .dialog .input {
27 | box-sizing: border-box;
28 | width: 100%;
29 | padding: 32rpx 32rpx;
30 | font-size: 28rpx;
31 | color: #555;
32 | }
33 |
34 | .dialog .input input {
35 | padding: 12rpx 24rpx;
36 | background: #f8f8f8;
37 | }
38 |
39 |
40 | .dialog .-title {
41 | padding: 12rpx 0;
42 | font-size: 32rpx;
43 | }
44 |
45 | .dialog .note {
46 | margin-top: 8rpx;
47 | font-size: 24rpx;
48 | color: gray;
49 | }
50 |
51 |
52 | .horizontal {
53 | display: flex;
54 | align-items: center;
55 | }
56 |
57 | .btn-wrapper {
58 | width: 50%;
59 | padding: 16rpx 32rpx;
60 | font-size: 32rpx;
61 | }
62 |
63 | .btn-cancel {
64 | width: 100%;
65 | background-color: #f8f8f8;
66 | color:gray;
67 | font-size: 32rpx;
68 | }
69 |
70 | .btn-cancel-hover {
71 | opacity: .6;
72 | }
73 |
74 | .btn-submit {
75 | font-size: 32rpx;
76 | width: 100%;
77 | color: white;
78 | }
79 |
80 | .btn-submit-hover {
81 | opacity: .6;
82 | }
--------------------------------------------------------------------------------
/pages/writer/writer.js:
--------------------------------------------------------------------------------
1 | // pages/writer/writer.js
2 | const ctr = require('./controller.js')
3 | const kawa = require('../../kawa.js')
4 | const biz = require('../../utils/biz.js')
5 |
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | theme: {
13 | images: kawa.Theme.Image,
14 | color: kawa.Theme.MainColor,
15 | tabColor: kawa.Theme.TabSelectedColor || kawa.Theme.MainColor,
16 | },
17 | title: "",
18 | content: "",
19 | location: "",
20 | images: [],
21 | video:{},
22 | link: {},
23 | topic: {
24 | items: [],
25 | selected: -1,
26 | },
27 | showAdd: false,
28 | showDialog: false,
29 | showVideo: false,
30 | },
31 | onLoad(options) {
32 | ctr.setup(this)
33 | ctr.onLoad(options)
34 | },
35 | onUnload: function () {
36 | ctr.onUnload()
37 | },
38 |
39 | bindTitle: function(e) {
40 | this.setData({title: e.detail.value})
41 | },
42 | bindContent: function(e) {
43 | this.setData({content: e.detail.value})
44 | },
45 | writerPublish: function() {
46 | biz.subscribe("new-post", () => {
47 | ctr.onClickSubmit()
48 | })
49 | },
50 | clickVideo: ctr.onClickVideo,
51 | chooseImage: ctr.onChooseImage,
52 | clickImage: ctr.onClickImage,
53 | clickDelete: ctr.onDeleteImage,
54 | clickDeleteVideo: ctr.onClickDeleteVideo,
55 | writerCancel: function() {
56 | wx.navigateBack({
57 | delta: 1
58 | })
59 | },
60 | clickTag: function(e) {
61 | ctr.onClickTag(e)
62 | },
63 | clickLocation: function(e) {
64 | ctr.onClickLocation(e)
65 | },
66 | clickDeleteLocation: function(e) {
67 | ctr.onDeleteLocation(e)
68 | },
69 | chooseImage: ctr.onChooseImage,
70 | chooseVideo: ctr.onChooseVideo,
71 | chooseLink: ctr.onChooseLink,
72 | clickDeleteLink: ctr.onDeleteLink,
73 |
74 | onRequestClose: function() {
75 | this.setData({ showDialog: false})
76 | },
77 |
78 | onDialogSubmit: function(e) {
79 | ctr.onSubmitLink(e)
80 | }
81 | })
--------------------------------------------------------------------------------
/pages/writer/writer.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "发帖",
3 | "usingComponents": {
4 | "linkdialog": "./comps/link/linkeditor"
5 | }
6 | }
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "setting": {
4 | "urlCheck": false,
5 | "es6": true,
6 | "postcss": true,
7 | "minified": true,
8 | "newFeature": true,
9 | "autoAudits": false,
10 | "checkInvalidKey": true
11 | },
12 | "compileType": "miniprogram",
13 | "libVersion": "2.11.0",
14 | "appid": "wx2ac6b4ccbb2aeaa3",
15 | "projectname": "%E4%BA%91%E5%8F%91%E5%B8%96",
16 | "simulatorType": "wechat",
17 | "simulatorPluginLibVersion": {},
18 | "condition": {
19 | "search": {
20 | "current": -1,
21 | "list": []
22 | },
23 | "conversation": {
24 | "current": -1,
25 | "list": []
26 | },
27 | "miniprogram": {
28 | "current": -1,
29 | "list": []
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/res/555.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/555.png
--------------------------------------------------------------------------------
/res/act.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/act.png
--------------------------------------------------------------------------------
/res/act2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/act2.png
--------------------------------------------------------------------------------
/res/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/arrow_right.png
--------------------------------------------------------------------------------
/res/auditing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/auditing.png
--------------------------------------------------------------------------------
/res/blue/arrow_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/arrow_left.png
--------------------------------------------------------------------------------
/res/blue/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/arrow_right.png
--------------------------------------------------------------------------------
/res/blue/clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/clear.png
--------------------------------------------------------------------------------
/res/blue/comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/comment.png
--------------------------------------------------------------------------------
/res/blue/erweima.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/erweima.png
--------------------------------------------------------------------------------
/res/blue/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/home.png
--------------------------------------------------------------------------------
/res/blue/home_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/home_focus.png
--------------------------------------------------------------------------------
/res/blue/like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/like.png
--------------------------------------------------------------------------------
/res/blue/liked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/liked.png
--------------------------------------------------------------------------------
/res/blue/me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/me.png
--------------------------------------------------------------------------------
/res/blue/me_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/me_focus.png
--------------------------------------------------------------------------------
/res/blue/msg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/msg.png
--------------------------------------------------------------------------------
/res/blue/msg_at.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/msg_at.png
--------------------------------------------------------------------------------
/res/blue/msg_cmt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/msg_cmt.png
--------------------------------------------------------------------------------
/res/blue/msg_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/msg_focus.png
--------------------------------------------------------------------------------
/res/blue/msg_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/msg_like.png
--------------------------------------------------------------------------------
/res/blue/my_cmt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/my_cmt.png
--------------------------------------------------------------------------------
/res/blue/my_favor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/my_favor.png
--------------------------------------------------------------------------------
/res/blue/my_follow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/my_follow.png
--------------------------------------------------------------------------------
/res/blue/my_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/my_like.png
--------------------------------------------------------------------------------
/res/blue/my_point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/my_point.png
--------------------------------------------------------------------------------
/res/blue/my_post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/my_post.png
--------------------------------------------------------------------------------
/res/blue/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/share.png
--------------------------------------------------------------------------------
/res/blue/share_to.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/share_to.png
--------------------------------------------------------------------------------
/res/blue/signin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/signin.png
--------------------------------------------------------------------------------
/res/blue/speaker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/speaker.png
--------------------------------------------------------------------------------
/res/blue/write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/blue/write.png
--------------------------------------------------------------------------------
/res/circle_mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/circle_mask.png
--------------------------------------------------------------------------------
/res/cyan/arrow_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/arrow_left.png
--------------------------------------------------------------------------------
/res/cyan/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/arrow_right.png
--------------------------------------------------------------------------------
/res/cyan/clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/clear.png
--------------------------------------------------------------------------------
/res/cyan/comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/comment.png
--------------------------------------------------------------------------------
/res/cyan/erweima.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/erweima.png
--------------------------------------------------------------------------------
/res/cyan/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/home.png
--------------------------------------------------------------------------------
/res/cyan/home_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/home_focus.png
--------------------------------------------------------------------------------
/res/cyan/like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/like.png
--------------------------------------------------------------------------------
/res/cyan/liked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/liked.png
--------------------------------------------------------------------------------
/res/cyan/me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/me.png
--------------------------------------------------------------------------------
/res/cyan/me_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/me_focus.png
--------------------------------------------------------------------------------
/res/cyan/msg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/msg.png
--------------------------------------------------------------------------------
/res/cyan/msg_at.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/msg_at.png
--------------------------------------------------------------------------------
/res/cyan/msg_cmt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/msg_cmt.png
--------------------------------------------------------------------------------
/res/cyan/msg_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/msg_focus.png
--------------------------------------------------------------------------------
/res/cyan/msg_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/msg_like.png
--------------------------------------------------------------------------------
/res/cyan/my_cmt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/my_cmt.png
--------------------------------------------------------------------------------
/res/cyan/my_favor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/my_favor.png
--------------------------------------------------------------------------------
/res/cyan/my_follow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/my_follow.png
--------------------------------------------------------------------------------
/res/cyan/my_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/my_like.png
--------------------------------------------------------------------------------
/res/cyan/my_point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/my_point.png
--------------------------------------------------------------------------------
/res/cyan/my_post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/my_post.png
--------------------------------------------------------------------------------
/res/cyan/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/share.png
--------------------------------------------------------------------------------
/res/cyan/share_to.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/share_to.png
--------------------------------------------------------------------------------
/res/cyan/signin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/signin.png
--------------------------------------------------------------------------------
/res/cyan/speaker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/speaker.png
--------------------------------------------------------------------------------
/res/cyan/write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/cyan/write.png
--------------------------------------------------------------------------------
/res/default/arrow_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/arrow_left.png
--------------------------------------------------------------------------------
/res/default/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/arrow_right.png
--------------------------------------------------------------------------------
/res/default/clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/clear.png
--------------------------------------------------------------------------------
/res/default/comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/comment.png
--------------------------------------------------------------------------------
/res/default/erweima.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/erweima.png
--------------------------------------------------------------------------------
/res/default/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/home.png
--------------------------------------------------------------------------------
/res/default/home_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/home_focus.png
--------------------------------------------------------------------------------
/res/default/like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/like.png
--------------------------------------------------------------------------------
/res/default/liked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/liked.png
--------------------------------------------------------------------------------
/res/default/me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/me.png
--------------------------------------------------------------------------------
/res/default/me_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/me_focus.png
--------------------------------------------------------------------------------
/res/default/msg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/msg.png
--------------------------------------------------------------------------------
/res/default/msg_at.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/msg_at.png
--------------------------------------------------------------------------------
/res/default/msg_cmt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/msg_cmt.png
--------------------------------------------------------------------------------
/res/default/msg_done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/msg_done.png
--------------------------------------------------------------------------------
/res/default/msg_focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/msg_focus.png
--------------------------------------------------------------------------------
/res/default/msg_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/msg_like.png
--------------------------------------------------------------------------------
/res/default/my_cmt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/my_cmt.png
--------------------------------------------------------------------------------
/res/default/my_favor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/my_favor.png
--------------------------------------------------------------------------------
/res/default/my_follow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/my_follow.png
--------------------------------------------------------------------------------
/res/default/my_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/my_like.png
--------------------------------------------------------------------------------
/res/default/my_point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/my_point.png
--------------------------------------------------------------------------------
/res/default/my_post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/my_post.png
--------------------------------------------------------------------------------
/res/default/profile_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/profile_setting.png
--------------------------------------------------------------------------------
/res/default/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/share.png
--------------------------------------------------------------------------------
/res/default/share_to.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/share_to.png
--------------------------------------------------------------------------------
/res/default/signin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/signin.png
--------------------------------------------------------------------------------
/res/default/speaker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/speaker.png
--------------------------------------------------------------------------------
/res/default/write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/default/write.png
--------------------------------------------------------------------------------
/res/del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/del.png
--------------------------------------------------------------------------------
/res/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/down.png
--------------------------------------------------------------------------------
/res/empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/empty.png
--------------------------------------------------------------------------------
/res/enroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/enroll.png
--------------------------------------------------------------------------------
/res/form.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/form.png
--------------------------------------------------------------------------------
/res/group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/group.png
--------------------------------------------------------------------------------
/res/kefu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/kefu.png
--------------------------------------------------------------------------------
/res/link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/link.png
--------------------------------------------------------------------------------
/res/link_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/link_dark.png
--------------------------------------------------------------------------------
/res/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/loading.png
--------------------------------------------------------------------------------
/res/location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/location.png
--------------------------------------------------------------------------------
/res/location1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/location1.png
--------------------------------------------------------------------------------
/res/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/menu.png
--------------------------------------------------------------------------------
/res/nav_msg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/nav_msg.png
--------------------------------------------------------------------------------
/res/photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/photo.png
--------------------------------------------------------------------------------
/res/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/placeholder.png
--------------------------------------------------------------------------------
/res/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/plus.png
--------------------------------------------------------------------------------
/res/rank_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/rank_1.png
--------------------------------------------------------------------------------
/res/rank_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/rank_2.png
--------------------------------------------------------------------------------
/res/rank_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/rank_3.png
--------------------------------------------------------------------------------
/res/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/refresh.png
--------------------------------------------------------------------------------
/res/richtext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/richtext.png
--------------------------------------------------------------------------------
/res/right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/right.png
--------------------------------------------------------------------------------
/res/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/search.png
--------------------------------------------------------------------------------
/res/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/stop.png
--------------------------------------------------------------------------------
/res/time.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/time.png
--------------------------------------------------------------------------------
/res/verified.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/verified.png
--------------------------------------------------------------------------------
/res/video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/video.png
--------------------------------------------------------------------------------
/res/video_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/video_play.png
--------------------------------------------------------------------------------
/res/wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/wechat.png
--------------------------------------------------------------------------------
/res/wx_moment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kawaapp/wsq-xiaochengxu/0f918a3f512f13893514afb1b3a1af8a0067ccdf/res/wx_moment.png
--------------------------------------------------------------------------------
/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/style/icon.wxss:
--------------------------------------------------------------------------------
1 | @keyframes cuIcon-spin {
2 | 0% {
3 | -webkit-transform: rotate(0);
4 | transform: rotate(0);
5 | }
6 |
7 | 100% {
8 | -webkit-transform: rotate(359deg);
9 | transform: rotate(359deg);
10 | }
11 | }
12 |
13 | .iconfont-spin {
14 | -webkit-animation: cuIcon-spin 2s infinite linear;
15 | animation: cuIcon-spin 2s infinite linear;
16 | display: inline-block;
17 | }
18 |
19 | .iconfont-pulse {
20 | -webkit-animation: cuIcon-spin 1s infinite steps(8);
21 | animation: cuIcon-spin 1s infinite steps(8);
22 | display: inline-block;
23 | }
24 |
25 | [class*="cuIcon-"] {
26 | font-family: "cuIcon";
27 | font-size: inherit;
28 | font-style: normal;
29 | }
30 |
31 | @font-face {
32 | font-family: "cuIcon";
33 | src: url('//at.alicdn.com/t/font_533566_yfq2d9wdij.eot?t=1545239985831');
34 | /* IE9*/
35 | src: url('//at.alicdn.com/t/font_533566_yfq2d9wdij.eot?t=1545239985831#iefix') format('embedded-opentype'),
36 | url('//at.alicdn.com/t/font_533566_yfq2d9wdij.ttf?t=1545239985831') format('truetype'),
37 | /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
38 | url('//at.alicdn.com/t/font_533566_yfq2d9wdij.svg?t=1545239985831#iconfont') format('svg');
39 | /* iOS 4.1- */
40 | }
41 |
42 | .cuIcon-check:before {
43 | content: "\e645";
44 | }
45 |
--------------------------------------------------------------------------------
/utils/h2j/parser.js:
--------------------------------------------------------------------------------
1 | // 感谢:
2 | // https://github.com/Chaunjie/rich-text-parser
3 | const ParseJson = require('./html2json')
4 |
5 | function getRichTextJson(html) {
6 | return ParseJson.getHtmlJson(html)
7 | }
8 |
9 | function definedCustomTag(options) {
10 | const newOptions = {}
11 | for (let i in options) {
12 | newOptions[i] = options[i] ? options[i] : 'div'
13 | }
14 | ParseJson.definedCustomTag(newOptions)
15 | }
16 |
17 | // define custom tag
18 | definedCustomTag({ figure: 'div', figcaption: '' })
19 |
20 | module.exports = {
21 | getRichTextJson: getRichTextJson,
22 | definedCustomTag: definedCustomTag
23 | }
--------------------------------------------------------------------------------