├── search
├── search.json
├── search
│ ├── search.json
│ ├── search.wxml
│ ├── search.wxss
│ └── search.js
├── search.wxss
├── search.wxml
└── search.js
├── square
├── square.json
├── question
│ ├── question.json
│ ├── question.wxml
│ ├── question.js
│ └── question.wxss
├── square.wxss
├── square.wxml
└── square.js
├── pages
├── search
│ ├── search.json
│ ├── search
│ │ ├── search.json
│ │ ├── search.wxml
│ │ ├── search.wxss
│ │ └── search.js
│ ├── search.wxss
│ ├── search.wxml
│ └── search.js
├── square
│ ├── square.json
│ ├── question
│ │ ├── question.json
│ │ ├── question.wxml
│ │ ├── question.wxss
│ │ └── question.js
│ ├── square.wxss
│ ├── square.wxml
│ └── square.js
├── user
│ ├── register
│ │ ├── register.json
│ │ ├── register.wxss
│ │ ├── register.wxml
│ │ └── register.js
│ ├── user-index
│ │ ├── user-index.json
│ │ ├── user-index.wxml
│ │ ├── user-index.wxss
│ │ └── user-index.js
│ ├── user.json
│ ├── user.js
│ ├── user.wxss
│ └── user.wxml
└── topics
│ ├── topics.json
│ ├── topics.wxml
│ ├── topics.wxss
│ └── topics.js
├── user
├── register
│ ├── register.json
│ ├── register.wxss
│ ├── register.wxml
│ └── register.js
├── user-index
│ ├── user-index.json
│ ├── user-index.wxml
│ ├── user-index.wxss
│ └── user-index.js
├── user.json
├── user.js
├── user.wxss
└── user.wxml
├── topics
├── topics.json
├── topics.wxml
├── topics.wxss
└── topics.js
├── images
├── head.png
├── image.png
├── user.png
├── 动态码.png
├── message.png
├── search.png
├── square.png
├── topics.png
├── password.png
├── telephone.png
├── username.png
├── checknumber.png
├── search_selected.png
├── square_selected.png
├── topics_selected.png
└── user_selected.png
├── results
├── all.gif
├── square.png
└── topics.png
├── utils
└── util.js
├── app.js
├── app.json
├── app.wxss
├── README.md
└── style
└── weui.wxss
/search/search.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/square/square.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/search/search.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/square/square.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/search/search/search.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/search/search/search.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/square/question/question.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/user/register/register.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/user/user-index/user-index.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/square/question/question.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/user/register/register.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/user/user-index/user-index.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/search/search.wxss:
--------------------------------------------------------------------------------
1 | /* pages/search/search.wxss */
--------------------------------------------------------------------------------
/pages/search/search.wxss:
--------------------------------------------------------------------------------
1 | /* pages/search/search.wxss */
--------------------------------------------------------------------------------
/topics/topics.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "话题列表"
3 | }
--------------------------------------------------------------------------------
/user/user.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "登录沪江账号"
3 | }
--------------------------------------------------------------------------------
/pages/user/user.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "登录沪江账号"
3 | }
--------------------------------------------------------------------------------
/pages/topics/topics.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "话题列表"
3 | }
--------------------------------------------------------------------------------
/images/head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/head.png
--------------------------------------------------------------------------------
/images/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/image.png
--------------------------------------------------------------------------------
/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/user.png
--------------------------------------------------------------------------------
/images/动态码.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/动态码.png
--------------------------------------------------------------------------------
/results/all.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/results/all.gif
--------------------------------------------------------------------------------
/images/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/message.png
--------------------------------------------------------------------------------
/images/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/search.png
--------------------------------------------------------------------------------
/images/square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/square.png
--------------------------------------------------------------------------------
/images/topics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/topics.png
--------------------------------------------------------------------------------
/results/square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/results/square.png
--------------------------------------------------------------------------------
/results/topics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/results/topics.png
--------------------------------------------------------------------------------
/images/password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/password.png
--------------------------------------------------------------------------------
/images/telephone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/telephone.png
--------------------------------------------------------------------------------
/images/username.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/username.png
--------------------------------------------------------------------------------
/images/checknumber.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/checknumber.png
--------------------------------------------------------------------------------
/images/search_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/search_selected.png
--------------------------------------------------------------------------------
/images/square_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/square_selected.png
--------------------------------------------------------------------------------
/images/topics_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/topics_selected.png
--------------------------------------------------------------------------------
/images/user_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SiHao24/HuJiang/HEAD/images/user_selected.png
--------------------------------------------------------------------------------
/search/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 取消
8 |
9 |
10 |
11 | 暂无结果,换个词试试
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/pages/search/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 取消
8 |
9 |
10 |
11 | 暂无结果,换个词试试
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
1 | function formatTime(date) {
2 | var year = date.getFullYear()
3 | var month = date.getMonth() + 1
4 | var day = date.getDate()
5 |
6 | var hour = date.getHours()
7 | var minute = date.getMinutes()
8 | var second = date.getSeconds()
9 |
10 |
11 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
12 | }
13 |
14 | function formatNumber(n) {
15 | n = n.toString()
16 | return n[1] ? n : '0' + n
17 | }
18 |
19 | module.exports = {
20 | formatTime: formatTime
21 | }
22 |
--------------------------------------------------------------------------------
/search/search/search.wxss:
--------------------------------------------------------------------------------
1 | /* pages/search/search/search.wxss */
2 |
3 | .search {
4 | width: 90%;
5 | height: 80rpx;
6 | line-height: 80rpx;
7 | margin: 10rpx auto;
8 | display: flex;
9 | align-items: center;
10 | justify-content: space-between;
11 | }
12 |
13 | .search-input {
14 | display: flex;
15 | border-bottom: 1rpx solid #11CF7E;
16 | flex: 1;
17 | }
18 |
19 | .search-text {
20 | flex: 1;
21 | }
22 |
23 | .search-back {
24 | width: 80rpx;
25 | }
26 |
27 | .search-question {
28 | width: 90%;
29 | margin: 40rpx auto;
30 | background-color: #11CF7E;
31 | }
32 |
33 | .serach-text {
34 | display: block;
35 | text-align: center;
36 | font-size: 28rpx;
37 | color: #e6e6e6;
38 | }
--------------------------------------------------------------------------------
/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 搜索你的问题
8 |
9 |
10 |
11 | 你可以这样问
12 |
13 |
14 | 日语入门那本买教材好?
15 |
16 |
17 | 请问如何高效的记忆英语单词?
18 |
19 |
20 | 如何快速提高韩语阅读能力?
21 |
22 |
--------------------------------------------------------------------------------
/pages/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 搜索你的问题
8 |
9 |
10 |
11 | 你可以这样问
12 |
13 |
14 | 日语入门那本买教材好?
15 |
16 |
17 | 请问如何高效的记忆英语单词?
18 |
19 |
20 | 如何快速提高韩语阅读能力?
21 |
22 |
--------------------------------------------------------------------------------
/pages/search/search/search.wxss:
--------------------------------------------------------------------------------
1 | /* pages/search/search/search.wxss */
2 |
3 | .search {
4 | width: 90%;
5 | height: 80rpx;
6 | line-height: 80rpx;
7 | margin: 10rpx auto;
8 | display: flex;
9 | align-items: center;
10 | justify-content: space-between;
11 | }
12 |
13 | .search-input {
14 | display: flex;
15 | border-bottom: 1rpx solid #11CF7E;
16 | flex: 1;
17 | }
18 |
19 | .search-text {
20 | flex: 1;
21 | }
22 |
23 | .search-back {
24 | width: 80rpx;
25 | }
26 |
27 | .search-question {
28 | width: 90%;
29 | margin: 40rpx auto;
30 | background-color: #11CF7E;
31 | }
32 |
33 | .serach-text {
34 | display: block;
35 | text-align: center;
36 | font-size: 28rpx;
37 | color: #e6e6e6;
38 | }
--------------------------------------------------------------------------------
/user/user-index/user-index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | dreamer
6 |
7 |
8 | {{item}}
9 |
10 |
11 | 你还没有提过问题
12 |
13 |
14 |
15 | 我擦,你还没有回答过问题哦
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/pages/user/user-index/user-index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | dreamer
6 |
7 |
8 | {{item}}
9 |
10 |
11 | 你还没有提过问题
12 |
13 |
14 |
15 | 我擦,你还没有回答过问题哦
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function() {
4 | //调用API从本地缓存中获取数据
5 | var logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 | },
9 |
10 | getUserInfo: function(cb) {
11 | var that = this
12 | if (this.globalData.userInfo) {
13 | typeof cb == "function" && cb(this.globalData.userInfo)
14 | } else {
15 | //调用登录接口
16 | wx.getUserInfo({
17 | withCredentials: false,
18 | success: function(res) {
19 | that.globalData.userInfo = res.userInfo
20 | typeof cb == "function" && cb(that.globalData.userInfo)
21 | }
22 | })
23 | }
24 | },
25 |
26 | globalData: {
27 | userInfo: null
28 | }
29 | })
--------------------------------------------------------------------------------
/user/register/register.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/register/register.wxss */
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 | .register {
8 | margin: auto;
9 | }
10 |
11 | .log-text {
12 | width: 80%;
13 | font-size: 24rpx;
14 | margin: 40rpx auto;
15 | text-align: center;
16 | }
17 |
18 | .log-color-text {
19 | color: green;
20 | }
21 |
22 | .log {
23 | border: 1px solid #e6e6e6;
24 | border-radius: 8rpx;
25 | height: 80rpx;
26 | width: 80%;
27 | display: flex;
28 | align-items: center;
29 | margin: 80rpx auto;
30 | }
31 |
32 | .log-icon {
33 | width: 50rpx;
34 | height: 50rpx;
35 | margin: auto 10rpx;
36 | }
37 |
38 | .log-login {
39 | background-color: green;
40 | width: 80%;
41 | }
42 |
43 | .log-register {
44 | font-size: 28rpx;
45 | width: 80%;
46 | display: inline-block;
47 | margin: 20rpx auto;
48 | text-align: right;
49 | }
--------------------------------------------------------------------------------
/pages/user/register/register.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/register/register.wxss */
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 | .register {
8 | margin: auto;
9 | }
10 |
11 | .log-text {
12 | width: 80%;
13 | font-size: 24rpx;
14 | margin: 40rpx auto;
15 | text-align: center;
16 | }
17 |
18 | .log-color-text {
19 | color: green;
20 | }
21 |
22 | .log {
23 | border: 1px solid #e6e6e6;
24 | border-radius: 8rpx;
25 | height: 80rpx;
26 | width: 80%;
27 | display: flex;
28 | align-items: center;
29 | margin: 80rpx auto;
30 | }
31 |
32 | .log-icon {
33 | width: 50rpx;
34 | height: 50rpx;
35 | margin: auto 10rpx;
36 | }
37 |
38 | .log-login {
39 | background-color: green;
40 | width: 80%;
41 | }
42 |
43 | .log-register {
44 | font-size: 28rpx;
45 | width: 80%;
46 | display: inline-block;
47 | margin: 20rpx auto;
48 | text-align: right;
49 | }
--------------------------------------------------------------------------------
/user/user-index/user-index.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/user-index/user-index.wxss */
2 |
3 | .page {
4 | height: 100%;
5 | }
6 |
7 | .page-user {
8 | display: flex;
9 | align-items: center;
10 | justify-content: space-between;
11 | height: 200rpx;
12 | background-color: #11CF7E;
13 | border-bottom: 30rpx solid #e6e6e6;
14 | }
15 |
16 | .username {
17 | flex: 1;
18 | }
19 |
20 | .index-navbar {
21 | height: 80rpx;
22 | border-bottom: 2rpx solid #e6e6e6;
23 | display: flex;
24 | }
25 |
26 | .item {
27 | flex: 1;
28 | text-align: center;
29 | height: 100%;
30 | line-height: 80rpx;
31 | }
32 |
33 | .active {
34 | color: #11CF7E;
35 | border-bottom: 2rpx solid #11CF7E;
36 | }
37 |
38 | .header {
39 | margin: auto 50rpx;
40 | border-radius: 50%;
41 | width: 100rpx;
42 | height: 100rpx;
43 | }
44 |
45 | .qustion-apply,
46 | .qustion-ask {
47 | margin-top: 100rpx;
48 | text-align: center;
49 | }
--------------------------------------------------------------------------------
/pages/user/user-index/user-index.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/user-index/user-index.wxss */
2 |
3 | .page {
4 | height: 100%;
5 | }
6 |
7 | .page-user {
8 | display: flex;
9 | align-items: center;
10 | justify-content: space-between;
11 | height: 200rpx;
12 | background-color: #11CF7E;
13 | border-bottom: 30rpx solid #e6e6e6;
14 | }
15 |
16 | .username {
17 | flex: 1;
18 | }
19 |
20 | .index-navbar {
21 | height: 80rpx;
22 | border-bottom: 2rpx solid #e6e6e6;
23 | display: flex;
24 | }
25 |
26 | .item {
27 | flex: 1;
28 | text-align: center;
29 | height: 100%;
30 | line-height: 80rpx;
31 | }
32 |
33 | .active {
34 | color: #11CF7E;
35 | border-bottom: 2rpx solid #11CF7E;
36 | }
37 |
38 | .header {
39 | margin: auto 50rpx;
40 | border-radius: 50%;
41 | width: 100rpx;
42 | height: 100rpx;
43 | }
44 |
45 | .qustion-apply,
46 | .qustion-ask {
47 | margin-top: 100rpx;
48 | text-align: center;
49 | }
--------------------------------------------------------------------------------
/user/user-index/user-index.js:
--------------------------------------------------------------------------------
1 | // pages/user/user-index/user-index.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | navbar: ['我的提问', '我的回答'],
9 | currentTab: 0,
10 | },
11 | navbarTap: function(e) {
12 | this.setData({
13 | currentTab: e.currentTarget.dataset.idx
14 | })
15 | },
16 | /**
17 | * 生命周期函数--监听页面加载
18 | */
19 | onLoad: function(options) {
20 |
21 | },
22 |
23 | /**
24 | * 生命周期函数--监听页面初次渲染完成
25 | */
26 | onReady: function() {
27 |
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面显示
32 | */
33 | onShow: function() {
34 |
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面隐藏
39 | */
40 | onHide: function() {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面卸载
46 | */
47 | onUnload: function() {
48 |
49 | },
50 |
51 | /**
52 | * 页面相关事件处理函数--监听用户下拉动作
53 | */
54 | onPullDownRefresh: function() {
55 |
56 | },
57 |
58 | /**
59 | * 页面上拉触底事件的处理函数
60 | */
61 | onReachBottom: function() {
62 |
63 | },
64 |
65 | /**
66 | * 用户点击右上角分享
67 | */
68 | onShareAppMessage: function() {
69 |
70 | }
71 | })
--------------------------------------------------------------------------------
/pages/user/user-index/user-index.js:
--------------------------------------------------------------------------------
1 | // pages/user/user-index/user-index.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | navbar: ['我的提问', '我的回答'],
9 | currentTab: 0,
10 | },
11 | navbarTap: function(e) {
12 | this.setData({
13 | currentTab: e.currentTarget.dataset.idx
14 | })
15 | },
16 | /**
17 | * 生命周期函数--监听页面加载
18 | */
19 | onLoad: function(options) {
20 |
21 | },
22 |
23 | /**
24 | * 生命周期函数--监听页面初次渲染完成
25 | */
26 | onReady: function() {
27 |
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面显示
32 | */
33 | onShow: function() {
34 |
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面隐藏
39 | */
40 | onHide: function() {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面卸载
46 | */
47 | onUnload: function() {
48 |
49 | },
50 |
51 | /**
52 | * 页面相关事件处理函数--监听用户下拉动作
53 | */
54 | onPullDownRefresh: function() {
55 |
56 | },
57 |
58 | /**
59 | * 页面上拉触底事件的处理函数
60 | */
61 | onReachBottom: function() {
62 |
63 | },
64 |
65 | /**
66 | * 用户点击右上角分享
67 | */
68 | onShareAppMessage: function() {
69 |
70 | }
71 | })
--------------------------------------------------------------------------------
/search/search/search.js:
--------------------------------------------------------------------------------
1 | // pages/search/search/search.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 | back: function() {
11 | wx.navigateBack({
12 | url: '/pages/search/search'
13 | })
14 | },
15 | ask: function() {
16 | wx.navigateTo({
17 | url: '/pages/square/question/question'
18 | })
19 | },
20 |
21 | /**
22 | * 生命周期函数--监听页面加载
23 | */
24 | onLoad: function(options) {
25 |
26 | },
27 |
28 | /**
29 | * 生命周期函数--监听页面初次渲染完成
30 | */
31 | onReady: function() {
32 |
33 | },
34 |
35 | /**
36 | * 生命周期函数--监听页面显示
37 | */
38 | onShow: function() {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面隐藏
44 | */
45 | onHide: function() {
46 |
47 | },
48 |
49 | /**
50 | * 生命周期函数--监听页面卸载
51 | */
52 | onUnload: function() {
53 |
54 | },
55 |
56 | /**
57 | * 页面相关事件处理函数--监听用户下拉动作
58 | */
59 | onPullDownRefresh: function() {
60 |
61 | },
62 |
63 | /**
64 | * 页面上拉触底事件的处理函数
65 | */
66 | onReachBottom: function() {
67 |
68 | },
69 |
70 | /**
71 | * 用户点击右上角分享
72 | */
73 | onShareAppMessage: function() {
74 |
75 | }
76 | })
--------------------------------------------------------------------------------
/pages/search/search/search.js:
--------------------------------------------------------------------------------
1 | // pages/search/search/search.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 | back: function() {
11 | wx.navigateBack({
12 | url: '/pages/search/search'
13 | })
14 | },
15 | ask: function() {
16 | wx.navigateTo({
17 | url: '/pages/square/question/question'
18 | })
19 | },
20 |
21 | /**
22 | * 生命周期函数--监听页面加载
23 | */
24 | onLoad: function(options) {
25 |
26 | },
27 |
28 | /**
29 | * 生命周期函数--监听页面初次渲染完成
30 | */
31 | onReady: function() {
32 |
33 | },
34 |
35 | /**
36 | * 生命周期函数--监听页面显示
37 | */
38 | onShow: function() {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面隐藏
44 | */
45 | onHide: function() {
46 |
47 | },
48 |
49 | /**
50 | * 生命周期函数--监听页面卸载
51 | */
52 | onUnload: function() {
53 |
54 | },
55 |
56 | /**
57 | * 页面相关事件处理函数--监听用户下拉动作
58 | */
59 | onPullDownRefresh: function() {
60 |
61 | },
62 |
63 | /**
64 | * 页面上拉触底事件的处理函数
65 | */
66 | onReachBottom: function() {
67 |
68 | },
69 |
70 | /**
71 | * 用户点击右上角分享
72 | */
73 | onShareAppMessage: function() {
74 |
75 | }
76 | })
--------------------------------------------------------------------------------
/user/register/register.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | 注册成功
20 |
21 |
22 |
23 | 注册代表您已经阅读并同意
24 | 《沪江用户协议》
25 | 去登录>>
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/pages/user/register/register.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | 注册成功
20 |
21 |
22 |
23 | 注册代表您已经阅读并同意
24 | 《沪江用户协议》
25 | 去登录>>
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/square/square.wxss:
--------------------------------------------------------------------------------
1 | /* pages/square/square.wxss */
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 |
8 | /* 数据显示 */
9 |
10 | .item-box {
11 | border-bottom: 2rpx solid #e6e6e6;
12 | margin: 0 auto;
13 | padding: 15rpx 20rpx;
14 | font-size: 30rpx;
15 | }
16 |
17 | .user {
18 | display: flex;
19 | align-items: center;
20 | justify-content: space-between;
21 | }
22 |
23 | .user-header {
24 | width: 50rpx;
25 | height: 50rpx;
26 | border-radius: 50%;
27 | margin-right: 30rpx;
28 | }
29 |
30 | .user-name {
31 | flex: 1;
32 | }
33 |
34 | .user-question-type {
35 | display: inline-block;
36 | height: 40rpx;
37 | font-size: 30rpx;
38 | line-height: 40rpx;
39 | margin-right: 20rpx;
40 | padding: 10rpx;
41 | font-size: 26rpx;
42 | border: 2rpx solid #e6e6e6;
43 | }
44 |
45 | .apply-text {
46 | display: block;
47 | margin: 20rpx 0;
48 | }
49 |
50 | .apply-count {
51 | display: block;
52 | font-size: 24rpx;
53 | }
54 |
55 |
56 | /* 提问按妞 */
57 |
58 | .question {
59 | width: 100rpx;
60 | height: 100rpx;
61 | line-height: 100rpx;
62 | border-radius: 50%;
63 | background-color: yellow;
64 | color: #fff;
65 | right: 50rpx;
66 | bottom: 60rpx;
67 | text-align: center;
68 | position: fixed;
69 | }
--------------------------------------------------------------------------------
/search/search.js:
--------------------------------------------------------------------------------
1 | // pages/search/search.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | src: "https://media.ifanrusercontent.com/media/user_files/trochili/ca/b6/cab63881836403cab865417ab0d7d94d099cb309-3b57c70a300404573f849df082c55c5038dafe40.png",
9 | url: '/pages/search/search/search'
10 |
11 | },
12 | toast: function() {
13 | wx.navigateTo({
14 | url: '/pages/search/search/search'
15 | })
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: function(options) {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面初次渲染完成
27 | */
28 | onReady: function() {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面显示
34 | */
35 | onShow: function() {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面隐藏
41 | */
42 | onHide: function() {
43 |
44 | },
45 |
46 | /**
47 | * 生命周期函数--监听页面卸载
48 | */
49 | onUnload: function() {
50 |
51 | },
52 |
53 | /**
54 | * 页面相关事件处理函数--监听用户下拉动作
55 | */
56 | onPullDownRefresh: function() {
57 |
58 | },
59 |
60 | /**
61 | * 页面上拉触底事件的处理函数
62 | */
63 | onReachBottom: function() {
64 |
65 | },
66 |
67 | /**
68 | * 用户点击右上角分享
69 | */
70 | onShareAppMessage: function() {
71 |
72 | }
73 | })
--------------------------------------------------------------------------------
/pages/search/search.js:
--------------------------------------------------------------------------------
1 | // pages/search/search.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | src: "https://media.ifanrusercontent.com/media/user_files/trochili/ca/b6/cab63881836403cab865417ab0d7d94d099cb309-3b57c70a300404573f849df082c55c5038dafe40.png",
9 | url: '/pages/search/search/search'
10 |
11 | },
12 | toast: function() {
13 | wx.navigateTo({
14 | url: '/pages/search/search/search'
15 | })
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: function(options) {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面初次渲染完成
27 | */
28 | onReady: function() {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面显示
34 | */
35 | onShow: function() {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面隐藏
41 | */
42 | onHide: function() {
43 |
44 | },
45 |
46 | /**
47 | * 生命周期函数--监听页面卸载
48 | */
49 | onUnload: function() {
50 |
51 | },
52 |
53 | /**
54 | * 页面相关事件处理函数--监听用户下拉动作
55 | */
56 | onPullDownRefresh: function() {
57 |
58 | },
59 |
60 | /**
61 | * 页面上拉触底事件的处理函数
62 | */
63 | onReachBottom: function() {
64 |
65 | },
66 |
67 | /**
68 | * 用户点击右上角分享
69 | */
70 | onShareAppMessage: function() {
71 |
72 | }
73 | })
--------------------------------------------------------------------------------
/pages/square/square.wxss:
--------------------------------------------------------------------------------
1 | /* pages/square/square.wxss */
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 |
8 | /* 数据显示 */
9 |
10 | .item-box {
11 | border-bottom: 2rpx solid #e6e6e6;
12 | margin: 0 auto;
13 | padding: 15rpx 20rpx;
14 | font-size: 30rpx;
15 | }
16 |
17 | .user {
18 | display: flex;
19 | align-items: center;
20 | justify-content: space-between;
21 | }
22 |
23 | .user-header {
24 | width: 50rpx;
25 | height: 50rpx;
26 | border-radius: 50%;
27 | margin-right: 30rpx;
28 | }
29 |
30 | .user-name {
31 | flex: 1;
32 | }
33 |
34 | .user-question-type {
35 | display: inline-block;
36 | height: 40rpx;
37 | font-size: 30rpx;
38 | line-height: 40rpx;
39 | margin-right: 20rpx;
40 | padding: 10rpx;
41 | font-size: 26rpx;
42 | border: 2rpx solid #e6e6e6;
43 | }
44 |
45 | .apply-text {
46 | display: block;
47 | margin: 20rpx 0;
48 | }
49 |
50 | .apply-count {
51 | display: block;
52 | font-size: 24rpx;
53 | }
54 |
55 |
56 | /* 提问按妞 */
57 |
58 | .question {
59 | width: 100rpx;
60 | height: 100rpx;
61 | line-height: 100rpx;
62 | border-radius: 50%;
63 | background-color: yellow;
64 | color: #fff;
65 | right: 50rpx;
66 | bottom: 60rpx;
67 | text-align: center;
68 | position: fixed;
69 | }
--------------------------------------------------------------------------------
/user/user.js:
--------------------------------------------------------------------------------
1 | // pages/user/user.js
2 | Page({
3 | /**
4 | * 页面的初始数据
5 | */
6 | data: {
7 | // username: '/images/username.png',
8 | navbar: ['普通登录', '手机快速登录'],
9 | currentTab: 0,
10 | url: '/pages/user/register/register'
11 | },
12 |
13 | navbarTap: function(e) {
14 | this.setData({
15 | currentTab: e.currentTarget.dataset.idx
16 | })
17 | },
18 | defaultTap: function() {
19 | wx.navigateTo({
20 | url: '/pages/user/user-index/user-index'
21 | })
22 | },
23 | /**
24 | * 生命周期函数--监听页面加载
25 | */
26 | onLoad: function(options) {
27 |
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面初次渲染完成
32 | */
33 | onReady: function() {
34 |
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面显示
39 | */
40 | onShow: function() {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面隐藏
46 | */
47 | onHide: function() {
48 |
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面卸载
53 | */
54 | onUnload: function() {
55 |
56 | },
57 |
58 | /**
59 | * 页面相关事件处理函数--监听用户下拉动作
60 | */
61 | onPullDownRefresh: function() {
62 |
63 | },
64 |
65 | /**
66 | * 页面上拉触底事件的处理函数
67 | */
68 | onReachBottom: function() {
69 |
70 | },
71 |
72 | /**
73 | * 用户点击右上角分享
74 | */
75 | onShareAppMessage: function() {
76 |
77 | }
78 | })
--------------------------------------------------------------------------------
/pages/user/user.js:
--------------------------------------------------------------------------------
1 | // pages/user/user.js
2 | Page({
3 | /**
4 | * 页面的初始数据
5 | */
6 | data: {
7 | // username: '/images/username.png',
8 | navbar: ['普通登录', '手机快速登录'],
9 | currentTab: 0,
10 | url: '/pages/user/register/register'
11 | },
12 |
13 | navbarTap: function(e) {
14 | this.setData({
15 | currentTab: e.currentTarget.dataset.idx
16 | })
17 | },
18 | defaultTap: function() {
19 | wx.navigateTo({
20 | url: '/pages/user/user-index/user-index'
21 | })
22 | },
23 | /**
24 | * 生命周期函数--监听页面加载
25 | */
26 | onLoad: function(options) {
27 |
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面初次渲染完成
32 | */
33 | onReady: function() {
34 |
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面显示
39 | */
40 | onShow: function() {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面隐藏
46 | */
47 | onHide: function() {
48 |
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面卸载
53 | */
54 | onUnload: function() {
55 |
56 | },
57 |
58 | /**
59 | * 页面相关事件处理函数--监听用户下拉动作
60 | */
61 | onPullDownRefresh: function() {
62 |
63 | },
64 |
65 | /**
66 | * 页面上拉触底事件的处理函数
67 | */
68 | onReachBottom: function() {
69 |
70 | },
71 |
72 | /**
73 | * 用户点击右上角分享
74 | */
75 | onShareAppMessage: function() {
76 |
77 | }
78 | })
--------------------------------------------------------------------------------
/user/user.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/user.wxss */
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 | .user-navbar {
8 | margin-top: 200rpx;
9 | display: flex;
10 | align-items: center;
11 | justify-content: space-between;
12 | background: #fff;
13 | }
14 |
15 | .user-navbar .item {
16 | flex: 1;
17 | text-align: center;
18 | line-height: 80rpx;
19 | }
20 |
21 | .active {
22 | color: #11CF7E;
23 | border-bottom: 2rpx solid #11CF7E;
24 | }
25 |
26 |
27 | /* 登录样式 */
28 |
29 | .log,
30 | .log-number {
31 | border-radius: 8rpx;
32 | height: 80rpx;
33 | width: 80%;
34 | display: flex;
35 | align-items: center;
36 | margin: 80rpx auto;
37 | }
38 |
39 | .log {
40 | border: 1px solid #e6e6e6;
41 | }
42 |
43 | .log-input-text {
44 | flex: 1;
45 | }
46 |
47 | .log-icon {
48 | width: 50rpx;
49 | height: 50rpx;
50 | padding: 15rpx 20rpx;
51 | border: 2rpx solid #e6e6e6;
52 | border-right: none;
53 | }
54 |
55 | .text {
56 | display: inline-block;
57 | height: 100%;
58 | border: 2rpx solid #e6e6e6;
59 | border-left: none;
60 | border-radius: 8rpx;
61 | }
62 |
63 | .log-login {
64 | background-color: green;
65 | width: 80%;
66 | }
67 |
68 | .log-source {
69 | height: 100%;
70 | line-height: 80rpx;
71 | width: 240rpx;
72 | margin-left: 40rpx;
73 | background-color: #eee;
74 | }
75 |
76 | .log-register {
77 | font-size: 28rpx;
78 | width: 80%;
79 | margin: 20rpx auto;
80 | }
81 |
82 | .log-register-text {
83 | float: right;
84 | }
--------------------------------------------------------------------------------
/pages/user/user.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/user.wxss */
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 | .user-navbar {
8 | margin-top: 200rpx;
9 | display: flex;
10 | align-items: center;
11 | justify-content: space-between;
12 | background: #fff;
13 | }
14 |
15 | .user-navbar .item {
16 | flex: 1;
17 | text-align: center;
18 | line-height: 80rpx;
19 | }
20 |
21 | .active {
22 | color: #11CF7E;
23 | border-bottom: 2rpx solid #11CF7E;
24 | }
25 |
26 |
27 | /* 登录样式 */
28 |
29 | .log,
30 | .log-number {
31 | border-radius: 8rpx;
32 | height: 80rpx;
33 | width: 80%;
34 | display: flex;
35 | align-items: center;
36 | margin: 80rpx auto;
37 | }
38 |
39 | .log {
40 | border: 1px solid #e6e6e6;
41 | }
42 |
43 | .log-input-text {
44 | flex: 1;
45 | }
46 |
47 | .log-icon {
48 | width: 50rpx;
49 | height: 50rpx;
50 | padding: 15rpx 20rpx;
51 | border: 2rpx solid #e6e6e6;
52 | border-right: none;
53 | }
54 |
55 | .text {
56 | display: inline-block;
57 | height: 100%;
58 | border: 2rpx solid #e6e6e6;
59 | border-left: none;
60 | border-radius: 8rpx;
61 | }
62 |
63 | .log-login {
64 | background-color: green;
65 | width: 80%;
66 | }
67 |
68 | .log-source {
69 | height: 100%;
70 | line-height: 80rpx;
71 | width: 240rpx;
72 | margin-left: 40rpx;
73 | background-color: #eee;
74 | }
75 |
76 | .log-register {
77 | font-size: 28rpx;
78 | width: 80%;
79 | margin: 20rpx auto;
80 | }
81 |
82 | .log-register-text {
83 | float: right;
84 | }
--------------------------------------------------------------------------------
/topics/topics.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{area[areaIndex]}}
6 |
7 |
8 |
9 |
10 | {{item}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | {{item.topics}}
21 |
22 | {{item.count}}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | {{item.topics}}
38 |
39 | {{item.count}}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/pages/topics/topics.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{area[areaIndex]}}
6 |
7 |
8 |
9 |
10 | {{item}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | {{item.topics}}
21 |
22 | {{item.count}}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | {{item.topics}}
38 |
39 | {{item.count}}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/user/register/register.js:
--------------------------------------------------------------------------------
1 | // pages/user/register/register.js
2 | var status = true;
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {},
9 | login: function() {
10 | wx.navigateBack({
11 | url: '/pages/user/user'
12 | })
13 | },
14 |
15 | toastShow: function(event) {
16 | status = false
17 | console.log('注册成功!');
18 | this.setData({ status: status }) //setData方法可以建立新的data属性,从而起到跟视图实时同步的效果
19 | setTimeout(function() {
20 | wx.navigateBack({
21 | url: '/pages/user/user'
22 | })
23 | }, 3000);
24 | },
25 |
26 | toastHide: function(event) {
27 | status = true
28 | this.setData({ status: status })
29 | },
30 |
31 | data: {
32 | status: status //data里面的属性可以传递到视图
33 | },
34 |
35 | /**
36 | * 生命周期函数--监听页面加载
37 | */
38 | onLoad: function(options) {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面初次渲染完成
44 | */
45 | onReady: function() {
46 |
47 | },
48 |
49 | /**
50 | * 生命周期函数--监听页面显示
51 | */
52 | onShow: function() {
53 |
54 | },
55 |
56 | /**
57 | * 生命周期函数--监听页面隐藏
58 | */
59 | onHide: function() {
60 |
61 | },
62 |
63 | /**
64 | * 生命周期函数--监听页面卸载
65 | */
66 | onUnload: function() {
67 |
68 | },
69 |
70 | /**
71 | * 页面相关事件处理函数--监听用户下拉动作
72 | */
73 | onPullDownRefresh: function() {
74 |
75 | },
76 |
77 | /**
78 | * 页面上拉触底事件的处理函数
79 | */
80 | onReachBottom: function() {
81 |
82 | },
83 |
84 | /**
85 | * 用户点击右上角分享
86 | */
87 | onShareAppMessage: function() {
88 |
89 | }
90 | })
--------------------------------------------------------------------------------
/pages/user/register/register.js:
--------------------------------------------------------------------------------
1 | // pages/user/register/register.js
2 | var status = true;
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {},
9 | login: function() {
10 | wx.navigateBack({
11 | url: '/pages/user/user'
12 | })
13 | },
14 |
15 | toastShow: function(event) {
16 | status = false
17 | console.log('注册成功!');
18 | this.setData({ status: status }) //setData方法可以建立新的data属性,从而起到跟视图实时同步的效果
19 | setTimeout(function() {
20 | wx.navigateBack({
21 | url: '/pages/user/user'
22 | })
23 | }, 3000);
24 | },
25 |
26 | toastHide: function(event) {
27 | status = true
28 | this.setData({ status: status })
29 | },
30 |
31 | data: {
32 | status: status //data里面的属性可以传递到视图
33 | },
34 |
35 | /**
36 | * 生命周期函数--监听页面加载
37 | */
38 | onLoad: function(options) {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面初次渲染完成
44 | */
45 | onReady: function() {
46 |
47 | },
48 |
49 | /**
50 | * 生命周期函数--监听页面显示
51 | */
52 | onShow: function() {
53 |
54 | },
55 |
56 | /**
57 | * 生命周期函数--监听页面隐藏
58 | */
59 | onHide: function() {
60 |
61 | },
62 |
63 | /**
64 | * 生命周期函数--监听页面卸载
65 | */
66 | onUnload: function() {
67 |
68 | },
69 |
70 | /**
71 | * 页面相关事件处理函数--监听用户下拉动作
72 | */
73 | onPullDownRefresh: function() {
74 |
75 | },
76 |
77 | /**
78 | * 页面上拉触底事件的处理函数
79 | */
80 | onReachBottom: function() {
81 |
82 | },
83 |
84 | /**
85 | * 用户点击右上角分享
86 | */
87 | onShareAppMessage: function() {
88 |
89 | }
90 | })
--------------------------------------------------------------------------------
/topics/topics.wxss:
--------------------------------------------------------------------------------
1 | /* pages/topics/topics.wxss */
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 | .navbar {
8 | width: 100%;
9 | height: 80rpx;
10 | display: flex;
11 | align-items: center;
12 | background: #fff;
13 | border-bottom: 2px solid #e6e6e6;
14 | position: fixed;
15 | top: 0;
16 | }
17 |
18 | .picker {
19 | width: 120rpx;
20 | height: 100%;
21 | line-height: 80rpx;
22 | border-right: 2rpx solid #e6e6e6;
23 | }
24 |
25 | .item {
26 | flex: 1;
27 | height: 100%;
28 | line-height: 80rpx;
29 | text-align: center;
30 | }
31 |
32 | .active {
33 | color: #11CF7E;
34 | border-bottom: 2rpx solid #11CF7E;
35 | }
36 |
37 | .picker-text:after {
38 | content: '';
39 | width: 20rpx;
40 | line-height: 20rpx;
41 | margin-top: 30rpx;
42 | height: 20rpx;
43 | border-top: 2px solid #e6e6e6;
44 | border-right: 2px solid #e6e6e6;
45 | position: absolute;
46 | transform: rotate(135deg);
47 | margin-top: 25rpx;
48 | margin-left: 10rpx;
49 | }
50 |
51 |
52 | /* 内容区 */
53 |
54 | .content {
55 | width: 100%;
56 | margin: 20rpx 0;
57 | height: 400rpx;
58 | border: 2rpx solid #000;
59 | }
60 |
61 | .content-image {
62 | width: 100%;
63 | height: 100%;
64 | background-size: cover;
65 | }
66 |
67 | .content-text {
68 | display: block;
69 | width: 300rpx;
70 | height: 86rpx;
71 | color: #000;
72 | margin-top: -300rpx;
73 | margin-left: 30rpx;
74 | }
75 |
76 | .count {
77 | width: 100%;
78 | height: 70rpx;
79 | line-height: 70rpx;
80 | background: #000;
81 | opacity: .5;
82 | margin-top: 142rpx;
83 | }
84 |
85 | .content-count {
86 | color: #fff;
87 | margin-left: 30rpx;
88 | }
--------------------------------------------------------------------------------
/square/question/question.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 问题*
4 |
5 |
6 |
7 | 问题补充
8 | 问题类型*(单选)
9 |
10 |
11 | {{item}}
12 |
13 |
14 |
15 | {{item}}
16 |
17 |
18 | {{item}}
19 |
20 |
21 | {{item}}
22 |
23 |
24 | {{item}}
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/pages/topics/topics.wxss:
--------------------------------------------------------------------------------
1 | /* pages/topics/topics.wxss */
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 | .navbar {
8 | width: 100%;
9 | height: 80rpx;
10 | display: flex;
11 | align-items: center;
12 | background: #fff;
13 | border-bottom: 2px solid #e6e6e6;
14 | position: fixed;
15 | top: 0;
16 | }
17 |
18 | .picker {
19 | width: 120rpx;
20 | height: 100%;
21 | line-height: 80rpx;
22 | border-right: 2rpx solid #e6e6e6;
23 | }
24 |
25 | .item {
26 | flex: 1;
27 | height: 100%;
28 | line-height: 80rpx;
29 | text-align: center;
30 | }
31 |
32 | .active {
33 | color: #11CF7E;
34 | border-bottom: 2rpx solid #11CF7E;
35 | }
36 |
37 | .picker-text:after {
38 | content: '';
39 | width: 20rpx;
40 | line-height: 20rpx;
41 | margin-top: 30rpx;
42 | height: 20rpx;
43 | border-top: 2px solid #e6e6e6;
44 | border-right: 2px solid #e6e6e6;
45 | position: absolute;
46 | transform: rotate(135deg);
47 | margin-top: 25rpx;
48 | margin-left: 10rpx;
49 | }
50 |
51 |
52 | /* 内容区 */
53 |
54 | .content {
55 | width: 100%;
56 | margin: 20rpx 0;
57 | height: 400rpx;
58 | border: 2rpx solid #000;
59 | }
60 |
61 | .content-image {
62 | width: 100%;
63 | height: 100%;
64 | background-size: cover;
65 | }
66 |
67 | .content-text {
68 | display: block;
69 | width: 300rpx;
70 | height: 86rpx;
71 | color: #000;
72 | margin-top: -300rpx;
73 | margin-left: 30rpx;
74 | }
75 |
76 | .count {
77 | width: 100%;
78 | height: 70rpx;
79 | line-height: 70rpx;
80 | background: #000;
81 | opacity: .5;
82 | margin-top: 142rpx;
83 | }
84 |
85 | .content-count {
86 | color: #fff;
87 | margin-left: 30rpx;
88 | }
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/search/search",
4 | "pages/search/search/search",
5 | "pages/square/square",
6 | "pages/square/question/question",
7 | "pages/topics/topics",
8 | "pages/user/user",
9 | "pages/user/register/register",
10 | "pages/user/user-index/user-index"
11 | ],
12 | "window": {
13 | "backgroundTextStyle": "light",
14 | "backgroundColor": "#fff",
15 | "navigationBarBackgroundColor": "#11CF7E",
16 | "navigationBarTitleText": "沪江问答",
17 | "navigationBarTextStyle": "black",
18 | "enablePullDownRefresh": "true"
19 | },
20 | "tabBar": {
21 | "color": "black",
22 | "selectedColor": "#19FA28",
23 | "backgroundColor": "#ffffff",
24 | "borderStyle": "black",
25 | "list": [{
26 | "pagePath": "pages/search/search",
27 | "text": "搜索",
28 | "iconPath": "images/search.png",
29 | "selectedIconPath": "images/search_selected.png"
30 | },
31 | {
32 | "pagePath": "pages/square/square",
33 | "text": "广场",
34 | "iconPath": "images/square.png",
35 | "selectedIconPath": "images/square_selected.png"
36 | },
37 | {
38 | "pagePath": "pages/topics/topics",
39 | "text": "话题",
40 | "iconPath": "images/topics.png",
41 | "selectedIconPath": "images/topics_selected.png"
42 | },
43 | {
44 | "pagePath": "pages/user/user",
45 | "text": "我的",
46 | "iconPath": "images/user.png",
47 | "selectedIconPath": "images/user_selected.png"
48 | }
49 | ]
50 | }
51 | }
--------------------------------------------------------------------------------
/pages/square/question/question.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 问题*
4 |
5 |
6 |
7 | 问题补充
8 | 问题类型*(单选)
9 |
10 |
11 | {{item}}
12 |
13 |
14 |
15 | {{item}}
16 |
17 |
18 | {{item}}
19 |
20 |
21 | {{item}}
22 |
23 |
24 | {{item}}
25 |
26 |
27 |
28 | 提交成功
29 |
30 |
31 |
--------------------------------------------------------------------------------
/square/question/question.js:
--------------------------------------------------------------------------------
1 | // pages/square/question/question.js
2 | var status = true;
3 | Page({
4 | data: {
5 | types: ['英语', '日语', '韩语', '法语'],
6 | English: ['英语词汇', '英语口语', '英语阅读', '综合能力', '四六级', '专四专八', '商务英语', '翻译考试', '考研英语',
7 | '留学考试', '其他考试', '影视娱乐', '原版书', '欧美文化'
8 | ],
9 | Jan: ['初级日语', '日语教材', '日语听说读写', '日语翻译', 'N1', 'N2', 'N3N4N5', '其他日语考试', '日本留学'],
10 | Koa: ['韩语入门', '韩语口语', '韩语翻译', '留学就业', 'TOPIK初级', 'TOPIK中高级', '其他考试', '韩剧韩综'],
11 | France: ['法语语法', '法语考试', '留学法国', '翻译互助', '法国文化', '法国口语', '法语听力', '法语写作', '法语语音',
12 | '法语词汇'
13 | ],
14 | currentTab: 0,
15 | current: 0
16 | },
17 |
18 |
19 |
20 |
21 | /**
22 | * 页面的初始数据
23 | */
24 | navbarTap: function(e) {
25 | this.setData({
26 | currentTab: e.currentTarget.dataset.idx
27 | })
28 | },
29 |
30 | currentTap: function(e) {
31 | this.setData({
32 | current: e.currentTarget.dataset.idx
33 | })
34 | },
35 | /**
36 | * 生命周期函数--监听页面加载
37 | */
38 | onLoad: function(options) {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面初次渲染完成
44 | */
45 | onReady: function() {
46 |
47 | },
48 |
49 | /**
50 | * 生命周期函数--监听页面显示
51 | */
52 | onShow: function() {
53 |
54 | },
55 |
56 | /**
57 | * 生命周期函数--监听页面隐藏
58 | */
59 | onHide: function() {
60 |
61 | },
62 |
63 | /**
64 | * 生命周期函数--监听页面卸载
65 | */
66 | onUnload: function() {
67 |
68 | },
69 |
70 | /**
71 | * 页面相关事件处理函数--监听用户下拉动作
72 | */
73 | onPullDownRefresh: function() {
74 |
75 | },
76 |
77 | /**
78 | * 页面上拉触底事件的处理函数
79 | */
80 | onReachBottom: function() {
81 |
82 | },
83 |
84 | /**
85 | * 用户点击右上角分享
86 | */
87 | onShareAppMessage: function() {
88 |
89 | }
90 | })
91 |
--------------------------------------------------------------------------------
/square/question/question.wxss:
--------------------------------------------------------------------------------
1 | /* pages/square/question/question.wxss */
2 |
3 | .page {
4 | height: 100%;
5 | width: 95%;
6 | margin: 10rpx auto;
7 | font-size: 36rpx;
8 | }
9 |
10 | .question {
11 | display: flex;
12 | margin-top: 10rpx;
13 | height: 60rpx;
14 | line-height: 60rpx;
15 | }
16 |
17 | .star {
18 | color: red;
19 | font-size: 24rpx;
20 | margin-left: 10rpx;
21 | }
22 |
23 | .single-select {
24 | font-size: 24rpx;
25 | }
26 |
27 | .question-text {
28 | margin: 20rpx 0;
29 | padding: 10rpx;
30 | border: 2rpx solid #000;
31 | height: 180rpx;
32 | color: #000;
33 | }
34 |
35 | .question-add {
36 | color: #11CF7E;
37 | float: right;
38 | }
39 |
40 | .question-type {
41 | clear: both;
42 | margin-top: 50rpx;
43 | }
44 |
45 | .quesion-language-type {
46 | width: 90%;
47 | display: flex;
48 | align-items: center;
49 | text-align: center;
50 | justify-content: space-between;
51 | margin: 20rpx auto;
52 | border-bottom: 2rpx solid #e6e6e6;
53 | }
54 |
55 | .item {
56 | flex: 1;
57 | padding: 20rpx 15rpx;
58 | }
59 |
60 | .active {
61 | border-bottom: 1px solid #11CF7E;
62 | font-size: 40rpx;
63 | font-weight: 500;
64 | color: #11CF7E
65 | }
66 |
67 | .normal {
68 | display: inline-block;
69 | padding: 10rpx;
70 | border: 1px solid #e6e6e6;
71 | margin: 15rpx 20rpx;
72 | background: #eee;
73 | }
74 |
75 | .selected {
76 | background: #11CF7E;
77 | }
78 |
79 | .submit {
80 | width: 100%;
81 | margin: 20px auto;
82 | background-color: #e6e6e6;
83 | }
--------------------------------------------------------------------------------
/pages/square/question/question.wxss:
--------------------------------------------------------------------------------
1 | /* pages/square/question/question.wxss */
2 |
3 | .page {
4 | height: 100%;
5 | width: 95%;
6 | margin: 10rpx auto;
7 | font-size: 36rpx;
8 | }
9 |
10 | .question {
11 | display: flex;
12 | margin-top: 10rpx;
13 | height: 60rpx;
14 | line-height: 60rpx;
15 | }
16 |
17 | .star {
18 | color: red;
19 | font-size: 24rpx;
20 | margin-left: 10rpx;
21 | }
22 |
23 | .single-select {
24 | font-size: 24rpx;
25 | }
26 |
27 | .question-text {
28 | margin: 20rpx 0;
29 | padding: 10rpx;
30 | border: 2rpx solid #000;
31 | height: 180rpx;
32 | color: #000;
33 | }
34 |
35 | .question-add {
36 | color: #11CF7E;
37 | float: right;
38 | }
39 |
40 | .question-type {
41 | clear: both;
42 | margin-top: 50rpx;
43 | }
44 |
45 | .quesion-language-type {
46 | width: 90%;
47 | display: flex;
48 | align-items: center;
49 | text-align: center;
50 | justify-content: space-between;
51 | margin: 20rpx auto;
52 | border-bottom: 2rpx solid #e6e6e6;
53 | }
54 |
55 | .item {
56 | flex: 1;
57 | padding: 20rpx 15rpx;
58 | }
59 |
60 | .active {
61 | border-bottom: 1px solid #11CF7E;
62 | font-size: 40rpx;
63 | font-weight: 500;
64 | color: #11CF7E
65 | }
66 |
67 | .normal {
68 | display: inline-block;
69 | padding: 10rpx;
70 | border: 1px solid #e6e6e6;
71 | margin: 15rpx 20rpx;
72 | background: #eee;
73 | }
74 |
75 | .selected {
76 | background: #11CF7E;
77 | }
78 |
79 | .submit {
80 | width: 100%;
81 | margin: 20px auto;
82 | background-color: #e6e6e6;
83 | }
--------------------------------------------------------------------------------
/user/user.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item}}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
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 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/pages/user/user.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item}}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
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 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/square/square.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{area[areaIndex]}}
6 |
7 |
8 |
9 |
10 | {{item}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | {{item.name}}
21 | {{item.type}}
22 |
23 |
24 | {{item.text}}
25 | {{item.apply}}
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | {{item.name}}
42 | {{item.type}}
43 |
44 |
45 | {{item.text}}
46 | {{item.apply}}
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 提问
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/pages/square/square.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{area[areaIndex]}}
6 |
7 |
8 |
9 |
10 | {{item}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | {{item.name}}
21 | {{item.type}}
22 |
23 |
24 | {{item.text}}
25 | {{item.apply}}
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | {{item.name}}
42 | {{item.type}}
43 |
44 |
45 | {{item.text}}
46 | {{item.apply}}
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 提问
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 |
3 | page {
4 | height: 100%;
5 | }
6 |
7 | .container {
8 | height: 100%;
9 | display: flex;
10 | flex-direction: column;
11 | align-items: center;
12 | justify-content: space-between;
13 | padding: 200rpx 0;
14 | box-sizing: border-box;
15 | }
16 |
17 | .image {
18 | width: 120rpx;
19 | height: 120rpx;
20 | border-radius: 50%;
21 | }
22 |
23 | .session-search {
24 | width: 80%;
25 | height: 50rpx;
26 | line-height: 50rpx;
27 | padding: 20rpx 30rpx;
28 | background: #fff;
29 | border: 1px solid #e6e6e6;
30 | border-radius: 5rpx;
31 | display: flex;
32 | flex-direction: row;
33 | align-items: center;
34 | justify-content: space-between;
35 | }
36 |
37 | .search-text {
38 | flex: 1;
39 | font-size: 35rpx;
40 | color: #000;
41 | }
42 |
43 | .search-icon {
44 | width: 40rpx;
45 | height: 40rpx;
46 | }
47 |
48 | .session-question-title {
49 | color: #e6e6e6;
50 | font-size: 30rpx;
51 | }
52 |
53 | .session-study {
54 | margin-top: 20rpx;
55 | font-size: 32rpx;
56 | }
57 |
58 |
59 | /* topics和square样式 */
60 |
61 | .navbar {
62 | width: 100%;
63 | height: 80rpx;
64 | display: flex;
65 | align-items: center;
66 | background: #fff;
67 | border-bottom: 2px solid #e6e6e6;
68 | position: fixed;
69 | top: 0;
70 | }
71 |
72 | .picker {
73 | width: 120rpx;
74 | height: 100%;
75 | line-height: 80rpx;
76 | border-right: 2rpx solid #e6e6e6;
77 | }
78 |
79 | .item {
80 | flex: 1;
81 | height: 100%;
82 | line-height: 80rpx;
83 | text-align: center;
84 | }
85 |
86 | .active {
87 | color: #11CF7E;
88 | border-bottom: 2rpx solid #11CF7E;
89 | }
90 |
91 | .picker-text:after {
92 | content: '';
93 | width: 20rpx;
94 | line-height: 20rpx;
95 | margin-top: 30rpx;
96 | height: 20rpx;
97 | border-top: 2px solid #e6e6e6;
98 | border-right: 2px solid #e6e6e6;
99 | position: absolute;
100 | transform: rotate(135deg);
101 | margin-top: 25rpx;
102 | margin-left: 10rpx;
103 | }
104 |
105 | .space {
106 | margin-top: 100rpx;
107 | }
--------------------------------------------------------------------------------
/pages/square/question/question.js:
--------------------------------------------------------------------------------
1 | // pages/square/question/question.js
2 | var status = true;
3 | Page({
4 | data: {
5 | types: ['英语', '日语', '韩语', '法语'],
6 | English: ['英语词汇', '英语口语', '英语阅读', '综合能力', '四六级', '专四专八', '商务英语', '翻译考试', '考研英语',
7 | '留学考试', '其他考试', '影视娱乐', '原版书', '欧美文化'
8 | ],
9 | Jan: ['初级日语', '日语教材', '日语听说读写', '日语翻译', 'N1', 'N2', 'N3N4N5', '其他日语考试', '日本留学'],
10 | Koa: ['韩语入门', '韩语口语', '韩语翻译', '留学就业', 'TOPIK初级', 'TOPIK中高级', '其他考试', '韩剧韩综'],
11 | France: ['法语语法', '法语考试', '留学法国', '翻译互助', '法国文化', '法国口语', '法语听力', '法语写作', '法语语音',
12 | '法语词汇'
13 | ],
14 | currentTab: 0,
15 | current: 0
16 | },
17 |
18 | toastShow: function(event) {
19 | console.log("提交成功");
20 | status = false
21 | this.setData({ status: status }) //setData方法可以建立新的data属性,从而起到跟视图实时同步的效果
22 | setTimeout(function() {
23 | wx.navigateBack({
24 | url: '/pages/search/search/search'
25 | })
26 | }, 3000);
27 | },
28 |
29 | toastHide: function(event) {
30 | status = true
31 | this.setData({ status: status })
32 | },
33 |
34 |
35 |
36 | /**
37 | * 页面的初始数据
38 | */
39 | navbarTap: function(e) {
40 | this.setData({
41 | currentTab: e.currentTarget.dataset.idx
42 | })
43 | },
44 |
45 | currentTap: function(e) {
46 | this.setData({
47 | current: e.currentTarget.dataset.idx
48 | })
49 | },
50 | /**
51 | * 生命周期函数--监听页面加载
52 | */
53 | onLoad: function(options) {
54 |
55 | },
56 |
57 | /**
58 | * 生命周期函数--监听页面初次渲染完成
59 | */
60 | onReady: function() {
61 |
62 | },
63 |
64 | /**
65 | * 生命周期函数--监听页面显示
66 | */
67 | onShow: function() {
68 |
69 | },
70 |
71 | /**
72 | * 生命周期函数--监听页面隐藏
73 | */
74 | onHide: function() {
75 |
76 | },
77 |
78 | /**
79 | * 生命周期函数--监听页面卸载
80 | */
81 | onUnload: function() {
82 |
83 | },
84 |
85 | /**
86 | * 页面相关事件处理函数--监听用户下拉动作
87 | */
88 | onPullDownRefresh: function() {
89 |
90 | },
91 |
92 | /**
93 | * 页面上拉触底事件的处理函数
94 | */
95 | onReachBottom: function() {
96 |
97 | },
98 |
99 | /**
100 | * 用户点击右上角分享
101 | */
102 | onShareAppMessage: function() {
103 |
104 | }
105 | })
--------------------------------------------------------------------------------
/square/square.js:
--------------------------------------------------------------------------------
1 | // pages/square/square.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | navbar: ['最热', '最新'],
10 | currentTab: 0,
11 | areaIndex: 0,
12 | area: ['英语', '日语', '韩语', '法语'],
13 | hotest: [{
14 | id: 0,
15 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136220&di=9e545f019ff063f2e2d40ff093e69ca4&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcaef76094b36acaf90900d7d76d98d1001e99c3b.jpg',
16 | 'name': '暗香疏影49938',
17 | "type": '综合能力',
18 | "text": '我住在宿舍里,学校宿舍没有网,沪江的课程可以下载到手机里离线听吗?',
19 | "apply": '6人回答'
20 | },
21 | {
22 | id: 1,
23 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136231&di=df09010b54644a6d6de64813e448295a&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F63d0f703918fa0ec7f92ff8c2c9759ee3c6ddbde.jpg',
24 | 'name': '青涩不及当初',
25 | "type": '英语词汇',
26 | "text": '一般英语考什么?',
27 | "apply": '4人回答'
28 | },
29 | {
30 | id: 2,
31 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135857&di=fa29ccd79a69991fed6e61aa53a2636a&imgtype=jpg&src=http%3A%2F%2Ff.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F562c11dfa9ec8a13165ec961fd03918fa1ecc0ef.jpg',
32 | 'name': '暗香疏影49938',
33 | "type": '综合能力',
34 | "text": '我住在宿舍里,学校宿舍没有网,沪江的课程可以下载到手机里离线听吗?',
35 | "apply": '6人回答'
36 | },
37 | {
38 | id: 3,
39 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135905&di=f05bd295743084fe249d3727169d58fb&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F5ab5c9ea15ce36d371ed1db130f33a87e850b142.jpg",
40 | 'name': '老老',
41 | "type": '综合能力',
42 | "text": '王翰怎么说?',
43 | "apply": '4人回答'
44 | },
45 | {
46 | id: 4,
47 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136337&di=3901868532c26c893342ba8746ce3c07&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F94cad1c8a786c9177d1fc8b8c33d70cf3bc75716.jpg",
48 | 'name': '暄翔',
49 | "type": '综合能力',
50 | "text": '我在背单词软件上复习不小心点了标记认识?',
51 | "apply": '4人回答'
52 | },
53 | {
54 | id: 5,
55 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136325&di=b58a79af6074b024887dccba02cdb91d&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fe61190ef76c6a7ef1d0732a7f7faaf51f3de660a.jpg",
56 | 'name': 'uyj85cdaa33',
57 | "type": '英语词汇',
58 | "text": '姜可心张恒哲一直会守候你?',
59 | "apply": '1人回答'
60 | },
61 | {
62 | id: 6,
63 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135997&di=b744bfb0dc901894d893a416377e3f2f&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F03087bf40ad162d99d67fb9d1bdfa9ec8b13cda2.jpg",
64 | 'name': 'uyj85cdaa33',
65 | "type": '英语词汇',
66 | "text": '姜可心张恒哲一直会守候你?',
67 | "apply": '1人回答'
68 | },
69 | {
70 | id: 7,
71 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136022&di=60955fc5afa9f938cfc0d7b45d3c765d&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F8c1001e93901213f7fced75d5ee736d12e2e95b6.jpg",
72 | 'name': 'uyj85cdaa33',
73 | "type": '英语词汇',
74 | "text": '姜可心张恒哲一直会守候你?',
75 | "apply": '1人回答'
76 | },
77 | {
78 | id: 8,
79 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136073&di=09a42cb8dbdf58230fb24b2ff354bc96&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F54fbb2fb43166d22ce538d154c2309f79052d20f.jpg",
80 | 'name': 'uyj85cdaa33',
81 | "type": '英语词汇',
82 | "text": '姜可心张恒哲一直会守候你?',
83 | "apply": '1人回答'
84 | },
85 | ],
86 | newest: [{
87 | id: 0,
88 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136337&di=3901868532c26c893342ba8746ce3c07&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F94cad1c8a786c9177d1fc8b8c33d70cf3bc75716.jpg',
89 | 'name': 'urtv4ihuysk',
90 | "type": '英语口语',
91 | "text": '学口语是不是要词汇量足?基础好?',
92 | "apply": '待回答'
93 | },
94 | {
95 | id: 1,
96 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136325&di=b58a79af6074b024887dccba02cdb91d&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fe61190ef76c6a7ef1d0732a7f7faaf51f3de660a.jpg',
97 | 'name': 'uku6ezbexruk',
98 | "type": '欧美文化',
99 | "text": '有首歌开始是oh~so damn i.got feeling you,i got feeling ah no no no 然后是一段一个男的唱的rap这是什么 ?',
100 | "apply": '待人回答'
101 | },
102 | {
103 | id: 2,
104 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135997&di=b744bfb0dc901894d893a416377e3f2f&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F03087bf40ad162d99d67fb9d1bdfa9ec8b13cda2.jpg',
105 | 'name': '雨亦是泪',
106 | "type": '英语口语',
107 | "text": '2017.07.16的每日一句有个单词发音错了。says应该是发[se-z]不是[sei-z。say原型发[sei],says/said发[se-z]。',
108 | "apply": '6人回答'
109 | },
110 | {
111 | id: 3,
112 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136315&di=0debe0cdc33a5f7997a6a3e9ba682e51&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F77094b36acaf2edd1d88d368871001e939019332.jpg",
113 | 'name': '夜晚星辰79867',
114 | "type": '英语词汇',
115 | "text": '王翰怎么说?',
116 | "apply": '4人回答'
117 | },
118 | {
119 | id: 4,
120 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136604&di=4b5e8e19fac0205881a037292342955b&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F6a63f6246b600c33091c5a49104c510fd8f9a1ce.jpg",
121 | 'name': '暄翔',
122 | "type": '综合能力',
123 | "text": '我在背单词软件上复习不小心点了标记认识?',
124 | "apply": '4人回答'
125 | },
126 | {
127 | id: 5,
128 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136585&di=43d8f7110171943db0c063d67ddddc98&imgtype=jpg&src=http%3A%2F%2Ff.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Ff703738da9773912fe4b01e0f2198618377ae2c6.jpg",
129 | 'name': 'uyj85cdaa33',
130 | "type": '英语词汇',
131 | "text": '姜可心张恒哲一直会守候你?',
132 | "apply": '1人回答'
133 | },
134 | {
135 | id: 6,
136 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136567&di=6ede3efd05b6d6a6c5ae559a94c04b64&imgtype=jpg&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fd058ccbf6c81800ae9ca0d8fbb3533fa828b4700.jpg",
137 | 'name': 'uyj85cdaa33',
138 | "type": '英语词汇',
139 | "text": '姜可心张恒哲一直会守候你?',
140 | "apply": '1人回答'
141 | },
142 | {
143 | id: 7,
144 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136547&di=499ea07c2af253ca03ddc0961b9d9d62&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F9922720e0cf3d7cafc15baf7f81fbe096a63a954.jpg",
145 | 'name': 'uyj85cdaa33',
146 | "type": '英语词汇',
147 | "text": '姜可心张恒哲一直会守候你?',
148 | "apply": '1人回答'
149 | },
150 | {
151 | id: 8,
152 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136661&di=6fe0ad906f268acb4b2cff11c641ee9a&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F79f0f736afc37931349a02a8e1c4b74542a91144.jpg",
153 | 'name': 'uyj85cdaa33',
154 | "type": '英语词汇',
155 | "text": '姜可心张恒哲一直会守候你?',
156 | "apply": '1人回答'
157 | },
158 | ]
159 | },
160 |
161 | navbarTap: function(e) {
162 | this.setData({
163 | currentTab: e.currentTarget.dataset.idx
164 | })
165 | },
166 |
167 | bindPickerChange: function(e) {
168 | this.setData({
169 | areaIndex: e.detail.value
170 | })
171 | },
172 |
173 | /**
174 | * 生命周期函数--监听页面加载
175 | */
176 | onLoad: function(options) {
177 |
178 | },
179 |
180 | /**
181 | * 生命周期函数--监听页面初次渲染完成
182 | */
183 | onReady: function() {
184 |
185 | },
186 |
187 | /**
188 | * 生命周期函数--监听页面显示
189 | */
190 | onShow: function() {
191 |
192 | },
193 |
194 | /**
195 | * 生命周期函数--监听页面隐藏
196 | */
197 | onHide: function() {
198 |
199 | },
200 |
201 | /**
202 | * 生命周期函数--监听页面卸载
203 | */
204 | onUnload: function() {
205 |
206 | },
207 | ask: function() {
208 | wx.navigateTo({
209 | url: '/pages/square/question/question'
210 | })
211 | },
212 |
213 | /**
214 | * 页面相关事件处理函数--监听用户下拉动作
215 | */
216 | onPullDownRefresh: function() {
217 |
218 | },
219 |
220 | /**
221 | * 页面上拉触底事件的处理函数
222 | */
223 | onReachBottom: function() {
224 |
225 | },
226 |
227 | /**
228 | * 用户点击右上角分享
229 | */
230 | onShareAppMessage: function() {
231 |
232 | }
233 | })
--------------------------------------------------------------------------------
/pages/square/square.js:
--------------------------------------------------------------------------------
1 | // pages/square/square.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | navbar: ['最热', '最新'],
10 | currentTab: 0,
11 | areaIndex: 0,
12 | area: ['英语', '日语', '韩语', '法语'],
13 | hotest: [{
14 | id: 0,
15 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136220&di=9e545f019ff063f2e2d40ff093e69ca4&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcaef76094b36acaf90900d7d76d98d1001e99c3b.jpg',
16 | 'name': '暗香疏影49938',
17 | "type": '综合能力',
18 | "text": '我住在宿舍里,学校宿舍没有网,沪江的课程可以下载到手机里离线听吗?',
19 | "apply": '6人回答'
20 | },
21 | {
22 | id: 1,
23 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136231&di=df09010b54644a6d6de64813e448295a&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F63d0f703918fa0ec7f92ff8c2c9759ee3c6ddbde.jpg',
24 | 'name': '青涩不及当初',
25 | "type": '英语词汇',
26 | "text": '一般英语考什么?',
27 | "apply": '4人回答'
28 | },
29 | {
30 | id: 2,
31 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135857&di=fa29ccd79a69991fed6e61aa53a2636a&imgtype=jpg&src=http%3A%2F%2Ff.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F562c11dfa9ec8a13165ec961fd03918fa1ecc0ef.jpg',
32 | 'name': '暗香疏影49938',
33 | "type": '综合能力',
34 | "text": '我住在宿舍里,学校宿舍没有网,沪江的课程可以下载到手机里离线听吗?',
35 | "apply": '6人回答'
36 | },
37 | {
38 | id: 3,
39 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135905&di=f05bd295743084fe249d3727169d58fb&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F5ab5c9ea15ce36d371ed1db130f33a87e850b142.jpg",
40 | 'name': '老老',
41 | "type": '综合能力',
42 | "text": '王翰怎么说?',
43 | "apply": '4人回答'
44 | },
45 | {
46 | id: 4,
47 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136337&di=3901868532c26c893342ba8746ce3c07&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F94cad1c8a786c9177d1fc8b8c33d70cf3bc75716.jpg",
48 | 'name': '暄翔',
49 | "type": '综合能力',
50 | "text": '我在背单词软件上复习不小心点了标记认识?',
51 | "apply": '4人回答'
52 | },
53 | {
54 | id: 5,
55 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136325&di=b58a79af6074b024887dccba02cdb91d&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fe61190ef76c6a7ef1d0732a7f7faaf51f3de660a.jpg",
56 | 'name': 'uyj85cdaa33',
57 | "type": '英语词汇',
58 | "text": '姜可心张恒哲一直会守候你?',
59 | "apply": '1人回答'
60 | },
61 | {
62 | id: 6,
63 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135997&di=b744bfb0dc901894d893a416377e3f2f&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F03087bf40ad162d99d67fb9d1bdfa9ec8b13cda2.jpg",
64 | 'name': 'uyj85cdaa33',
65 | "type": '英语词汇',
66 | "text": '姜可心张恒哲一直会守候你?',
67 | "apply": '1人回答'
68 | },
69 | {
70 | id: 7,
71 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136022&di=60955fc5afa9f938cfc0d7b45d3c765d&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F8c1001e93901213f7fced75d5ee736d12e2e95b6.jpg",
72 | 'name': 'uyj85cdaa33',
73 | "type": '英语词汇',
74 | "text": '姜可心张恒哲一直会守候你?',
75 | "apply": '1人回答'
76 | },
77 | {
78 | id: 8,
79 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136073&di=09a42cb8dbdf58230fb24b2ff354bc96&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F54fbb2fb43166d22ce538d154c2309f79052d20f.jpg",
80 | 'name': 'uyj85cdaa33',
81 | "type": '英语词汇',
82 | "text": '姜可心张恒哲一直会守候你?',
83 | "apply": '1人回答'
84 | },
85 | ],
86 | newest: [{
87 | id: 0,
88 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136337&di=3901868532c26c893342ba8746ce3c07&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F94cad1c8a786c9177d1fc8b8c33d70cf3bc75716.jpg',
89 | 'name': 'urtv4ihuysk',
90 | "type": '英语口语',
91 | "text": '学口语是不是要词汇量足?基础好?',
92 | "apply": '待回答'
93 | },
94 | {
95 | id: 1,
96 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136325&di=b58a79af6074b024887dccba02cdb91d&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fe61190ef76c6a7ef1d0732a7f7faaf51f3de660a.jpg',
97 | 'name': 'uku6ezbexruk',
98 | "type": '欧美文化',
99 | "text": '有首歌开始是oh~so damn i.got feeling you,i got feeling ah no no no 然后是一段一个男的唱的rap这是什么 ?',
100 | "apply": '待人回答'
101 | },
102 | {
103 | id: 2,
104 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135997&di=b744bfb0dc901894d893a416377e3f2f&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F03087bf40ad162d99d67fb9d1bdfa9ec8b13cda2.jpg',
105 | 'name': '雨亦是泪',
106 | "type": '英语口语',
107 | "text": '2017.07.16的每日一句有个单词发音错了。says应该是发[se-z]不是[sei-z。say原型发[sei],says/said发[se-z]。',
108 | "apply": '6人回答'
109 | },
110 | {
111 | id: 3,
112 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136315&di=0debe0cdc33a5f7997a6a3e9ba682e51&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F77094b36acaf2edd1d88d368871001e939019332.jpg",
113 | 'name': '夜晚星辰79867',
114 | "type": '英语词汇',
115 | "text": '王翰怎么说?',
116 | "apply": '4人回答'
117 | },
118 | {
119 | id: 4,
120 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136604&di=4b5e8e19fac0205881a037292342955b&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F6a63f6246b600c33091c5a49104c510fd8f9a1ce.jpg",
121 | 'name': '暄翔',
122 | "type": '综合能力',
123 | "text": '我在背单词软件上复习不小心点了标记认识?',
124 | "apply": '4人回答'
125 | },
126 | {
127 | id: 5,
128 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136585&di=43d8f7110171943db0c063d67ddddc98&imgtype=jpg&src=http%3A%2F%2Ff.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Ff703738da9773912fe4b01e0f2198618377ae2c6.jpg",
129 | 'name': 'uyj85cdaa33',
130 | "type": '英语词汇',
131 | "text": '姜可心张恒哲一直会守候你?',
132 | "apply": '1人回答'
133 | },
134 | {
135 | id: 6,
136 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136567&di=6ede3efd05b6d6a6c5ae559a94c04b64&imgtype=jpg&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fd058ccbf6c81800ae9ca0d8fbb3533fa828b4700.jpg",
137 | 'name': 'uyj85cdaa33',
138 | "type": '英语词汇',
139 | "text": '姜可心张恒哲一直会守候你?',
140 | "apply": '1人回答'
141 | },
142 | {
143 | id: 7,
144 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136547&di=499ea07c2af253ca03ddc0961b9d9d62&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F9922720e0cf3d7cafc15baf7f81fbe096a63a954.jpg",
145 | 'name': 'uyj85cdaa33',
146 | "type": '英语词汇',
147 | "text": '姜可心张恒哲一直会守候你?',
148 | "apply": '1人回答'
149 | },
150 | {
151 | id: 8,
152 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136661&di=6fe0ad906f268acb4b2cff11c641ee9a&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F79f0f736afc37931349a02a8e1c4b74542a91144.jpg",
153 | 'name': 'uyj85cdaa33',
154 | "type": '英语词汇',
155 | "text": '姜可心张恒哲一直会守候你?',
156 | "apply": '1人回答'
157 | },
158 | ]
159 | },
160 |
161 | navbarTap: function(e) {
162 | this.setData({
163 | currentTab: e.currentTarget.dataset.idx
164 | })
165 | },
166 |
167 | bindPickerChange: function(e) {
168 | this.setData({
169 | areaIndex: e.detail.value
170 | })
171 | },
172 |
173 | /**
174 | * 生命周期函数--监听页面加载
175 | */
176 | onLoad: function(options) {
177 |
178 | },
179 |
180 | /**
181 | * 生命周期函数--监听页面初次渲染完成
182 | */
183 | onReady: function() {
184 |
185 | },
186 |
187 | /**
188 | * 生命周期函数--监听页面显示
189 | */
190 | onShow: function() {
191 |
192 | },
193 |
194 | /**
195 | * 生命周期函数--监听页面隐藏
196 | */
197 | onHide: function() {
198 |
199 | },
200 |
201 | /**
202 | * 生命周期函数--监听页面卸载
203 | */
204 | onUnload: function() {
205 |
206 | },
207 | ask: function() {
208 | wx.navigateTo({
209 | url: '/pages/square/question/question'
210 | })
211 | },
212 |
213 | /**
214 | * 页面相关事件处理函数--监听用户下拉动作
215 | */
216 | onPullDownRefresh: function() {
217 |
218 | },
219 |
220 | /**
221 | * 页面上拉触底事件的处理函数
222 | */
223 | onReachBottom: function() {
224 |
225 | },
226 |
227 | /**
228 | * 用户点击右上角分享
229 | */
230 | onShareAppMessage: function() {
231 |
232 | }
233 | })
--------------------------------------------------------------------------------
/topics/topics.js:
--------------------------------------------------------------------------------
1 | // pages/topics/topics.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | dataList: [],
10 | navbar: ['正在进行', '往期回顾'],
11 | currentTab: 0,
12 | areaIndex: 0,
13 | area: ['英语', '日语', '韩语', '法语'],
14 | now: [{
15 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136735&di=b36492c7e2173533f5973e1e167d0e5e&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fd31b0ef41bd5ad6ec7b2e36b8bcb39dbb7fd3ce3.jpg',
16 | 'topics': "HeyJoe助你讲流利英语",
17 | "count": "226个提问 | 8695人参与"
18 | },
19 | {
20 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136746&di=2ecc34592348d5b4ae0e8b10b667d176&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F3c6d55fbb2fb431616fafdfb2aa4462308f7d34e.jpg',
21 | 'topics': "四六级写作名师答疑会",
22 | "count": "45个提问 | 879人参与"
23 | },
24 | {
25 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136756&di=1ae279eba64b0929e02467b5e5053416&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F83025aafa40f4bfbcd5c19d5094f78f0f63618a6.jpg',
26 | 'topics': "#四六级#口语考试答疑区",
27 | "count": "17个回答 | 151人参与"
28 | },
29 | {
30 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136766&di=4781bf001038e937d72a76591b7dd0b1&imgtype=jpg&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F503d269759ee3d6d2d1a004a49166d224e4ade57.jpg',
31 | 'topics': "#四六级#口语考试答疑区",
32 | "count": "17个回答 | 151人参与"
33 | },
34 | {
35 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136777&di=c6c3f92ecff22abc1f72081b6a23ca6f&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcaef76094b36acaf9460117d76d98d1000e99cab.jpg',
36 | 'topics': "英语考试考试答疑区",
37 | "count": "8个提问 | 147人参与"
38 | },
39 | {
40 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136792&di=c340077b9689c90b4379159e5911865a&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F8d5494eef01f3a29f719524f9325bc315d607c5a.jpg',
41 | topics: "#四六级#口语考试答疑区",
42 | "count": "17个回答 | 151人参与"
43 | },
44 | {
45 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136931&di=a8bd44acded1b39b9012675f36fabece&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Ff703738da9773912f93604e0f2198618367ae21b.jpg',
46 | 'topics': "#一个月干掉四六级#问答社区",
47 | "count": "120个问题 | 1077人参与"
48 | },
49 | {
50 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136940&di=82e3233fb54ef5608fe2173a6a8097ee&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fc8ea15ce36d3d5392a318e423087e950352ab027.jpg',
51 | 'topics': "如何高效地学习英语?",
52 | "count": "30个提问 | 970人参与"
53 | },
54 | {
55 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136952&di=7b08807e26b1842a5deb0f7eb101ca0f&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F0ff41bd5ad6eddc4488e357a33dbb6fd536633c1.jpg',
56 | 'topics': "Toto老师教你学语法",
57 | "count": "59个提问 | 634人参与"
58 | },
59 | {
60 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136966&di=33ab4a83659437107a00fc51245adb0f&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F18d8bc3eb13533fa73d212afa2d3fd1f40345bcf.jpg',
61 | 'topics': "我们都爱英美剧",
62 | "count": "25个提问 | 456人参与"
63 | },
64 | {
65 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137086&di=c3e1d488afb6e20e410d9a773fb650b4&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F48540923dd54564e761e64b8b9de9c82d1584f3c.jpg',
66 | 'topics': "#四六级#口语考试答疑区",
67 | "count": "17个回答 | 151人参与"
68 | },
69 | {
70 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137075&di=e5d2cca56ea48b1cc0d19d9df5615dba&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fb3b7d0a20cf431ad78bcc3b84136acaf2fdd98c1.jpg',
71 | 'topics': "四六级考后吐槽狂欢趴",
72 | "count": "118个提问 | 2363人参与"
73 | }
74 | ],
75 | past: [{
76 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137065&di=2a294046043d60dc10ca31470d28b3b2&imgtype=jpg&src=http%3A%2F%2Ff.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcdbf6c81800a19d85102048439fa828ba61e462a.jpg',
77 | 'topics': "四六级备考名师答疑",
78 | "count": "31个提问 | 444人参与"
79 | },
80 | {
81 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137052&di=68a2fccd9eebb68b34919f40360ff660&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fac345982b2b7d0a2bdc3841cc1ef76094b369a2d.jpg',
82 | 'topics': "那年高考,你印象最深刻的回忆",
83 | "count": "10个提问 | 97人参与"
84 | },
85 | {
86 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137037&di=c362066692ba61bd5b752d827667e0f7&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F4b90f603738da97770f907aaba51f8198718e359.jpg',
87 | 'topics': "四六级查分吐槽大会",
88 | "count": "34个提问 | 665人参与"
89 | },
90 | {
91 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136735&di=b36492c7e2173533f5973e1e167d0e5e&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fd31b0ef41bd5ad6ec7b2e36b8bcb39dbb7fd3ce3.jpg',
92 | 'topics': "四六级查分答疑",
93 | "count": "118个提问 | 151人参与"
94 | },
95 | {
96 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137086&di=c3e1d488afb6e20e410d9a773fb650b4&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F48540923dd54564e761e64b8b9de9c82d1584f3c.jpg',
97 | 'topics': "语言学习与难题?快向学霸A+讨经验",
98 | "count": "4个提问 | 28人参与"
99 | },
100 | {
101 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136777&di=c6c3f92ecff22abc1f72081b6a23ca6f&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcaef76094b36acaf9460117d76d98d1000e99cab.jpg',
102 | topics: "干掉英语,就问大魔王!",
103 | "count": "29个提问 | 306人参与"
104 | },
105 | {
106 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136766&di=4781bf001038e937d72a76591b7dd0b1&imgtype=jpg&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F503d269759ee3d6d2d1a004a49166d224e4ade57.jpg',
107 | 'topics': "四六级考后吐槽狂欢趴",
108 | "count": "441个提问 | 2746人参与"
109 | },
110 | {
111 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136766&di=4781bf001038e937d72a76591b7dd0b1&imgtype=jpg&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F503d269759ee3d6d2d1a004a49166d224e4ade57.jpg',
112 | 'topics': "#四六级#翻译写作名师答疑专区",
113 | "count": "24个提问 | 101人参与"
114 | },
115 | {
116 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136756&di=1ae279eba64b0929e02467b5e5053416&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F83025aafa40f4bfbcd5c19d5094f78f0f63618a6.jpg',
117 | 'topics': "#四六级#阅读名师",
118 | "count": "11个提问 | 327人参与"
119 | },
120 | {
121 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136746&di=2ecc34592348d5b4ae0e8b10b667d176&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F3c6d55fbb2fb431616fafdfb2aa4462308f7d34e.jpg',
122 | 'topics': "#四六级#听力名师答疑区",
123 | "count": "16个提问 | 75人参与"
124 | }
125 | ]
126 |
127 | },
128 |
129 | navbarTap: function(e) {
130 | this.setData({
131 | currentTab: e.currentTarget.dataset.idx
132 | })
133 | },
134 |
135 | bindPickerChange: function(e) {
136 | this.setData({
137 | areaIndex: e.detail.value
138 | })
139 | },
140 |
141 | /**
142 | * 生命周期函数--监听页面加载
143 | */
144 | onLoad: function(options) {
145 | wx.request({
146 | url: "https://www.easy-mock.com/project/595f3f139adc231f357b0622",
147 | method: "GET",
148 | success: function(res) {
149 | console.log(res);
150 | }
151 | })
152 | // setTimeout(() => {
153 | // this.setData({
154 | // hidden: true
155 | // })
156 | // }, 3000)
157 | var api_url = 'https://cnodejs.org/api/v1/topics';
158 | api_url += '?tab=all&page=0&limit=10';
159 | console.log(api_url);
160 | var that = this;
161 | wx.request({
162 | url: api_url,
163 | method: "GET",
164 | success: function(res) {
165 | console.log();
166 | that.setData({
167 | hidden: true,
168 | postsList: res.data.data
169 | })
170 | }
171 | })
172 |
173 | },
174 |
175 | /**
176 | * 生命周期函数--监听页面初次渲染完成
177 | */
178 | onReady: function() {
179 |
180 | },
181 |
182 | /**
183 | * 生命周期函数--监听页面显示
184 | */
185 | onShow: function() {
186 |
187 | },
188 |
189 | /**
190 | * 生命周期函数--监听页面隐藏
191 | */
192 | onHide: function() {
193 |
194 | },
195 |
196 | /**
197 | * 生命周期函数--监听页面卸载
198 | */
199 | onUnload: function() {
200 |
201 | },
202 |
203 | /**
204 | * 页面相关事件处理函数--监听用户下拉动作
205 | */
206 | onPullDownRefresh: function() {
207 |
208 | },
209 |
210 | /**
211 | * 页面上拉触底事件的处理函数
212 | */
213 | onReachBottom: function() {
214 |
215 | },
216 |
217 | /**
218 | * 用户点击右上角分享
219 | */
220 | onShareAppMessage: function() {
221 |
222 | }
223 | })
--------------------------------------------------------------------------------
/pages/topics/topics.js:
--------------------------------------------------------------------------------
1 | // pages/topics/topics.js
2 | var app = getApp();
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | dataList: [],
10 | navbar: ['正在进行', '往期回顾'],
11 | currentTab: 0,
12 | areaIndex: 0,
13 | area: ['英语', '日语', '韩语', '法语'],
14 | now: [{
15 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136735&di=b36492c7e2173533f5973e1e167d0e5e&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fd31b0ef41bd5ad6ec7b2e36b8bcb39dbb7fd3ce3.jpg',
16 | 'topics': "HeyJoe助你讲流利英语",
17 | "count": "226个提问 | 8695人参与"
18 | },
19 | {
20 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136746&di=2ecc34592348d5b4ae0e8b10b667d176&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F3c6d55fbb2fb431616fafdfb2aa4462308f7d34e.jpg',
21 | 'topics': "四六级写作名师答疑会",
22 | "count": "45个提问 | 879人参与"
23 | },
24 | {
25 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136756&di=1ae279eba64b0929e02467b5e5053416&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F83025aafa40f4bfbcd5c19d5094f78f0f63618a6.jpg',
26 | 'topics': "#四六级#口语考试答疑区",
27 | "count": "17个回答 | 151人参与"
28 | },
29 | {
30 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136766&di=4781bf001038e937d72a76591b7dd0b1&imgtype=jpg&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F503d269759ee3d6d2d1a004a49166d224e4ade57.jpg',
31 | 'topics': "#四六级#口语考试答疑区",
32 | "count": "17个回答 | 151人参与"
33 | },
34 | {
35 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136777&di=c6c3f92ecff22abc1f72081b6a23ca6f&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcaef76094b36acaf9460117d76d98d1000e99cab.jpg',
36 | 'topics': "英语考试考试答疑区",
37 | "count": "8个提问 | 147人参与"
38 | },
39 | {
40 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136792&di=c340077b9689c90b4379159e5911865a&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F8d5494eef01f3a29f719524f9325bc315d607c5a.jpg',
41 | topics: "#四六级#口语考试答疑区",
42 | "count": "17个回答 | 151人参与"
43 | },
44 | {
45 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136931&di=a8bd44acded1b39b9012675f36fabece&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Ff703738da9773912f93604e0f2198618367ae21b.jpg',
46 | 'topics': "#一个月干掉四六级#问答社区",
47 | "count": "120个问题 | 1077人参与"
48 | },
49 | {
50 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136940&di=82e3233fb54ef5608fe2173a6a8097ee&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fc8ea15ce36d3d5392a318e423087e950352ab027.jpg',
51 | 'topics': "如何高效地学习英语?",
52 | "count": "30个提问 | 970人参与"
53 | },
54 | {
55 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136952&di=7b08807e26b1842a5deb0f7eb101ca0f&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F0ff41bd5ad6eddc4488e357a33dbb6fd536633c1.jpg',
56 | 'topics': "Toto老师教你学语法",
57 | "count": "59个提问 | 634人参与"
58 | },
59 | {
60 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136966&di=33ab4a83659437107a00fc51245adb0f&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F18d8bc3eb13533fa73d212afa2d3fd1f40345bcf.jpg',
61 | 'topics': "我们都爱英美剧",
62 | "count": "25个提问 | 456人参与"
63 | },
64 | {
65 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137086&di=c3e1d488afb6e20e410d9a773fb650b4&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F48540923dd54564e761e64b8b9de9c82d1584f3c.jpg',
66 | 'topics': "#四六级#口语考试答疑区",
67 | "count": "17个回答 | 151人参与"
68 | },
69 | {
70 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137075&di=e5d2cca56ea48b1cc0d19d9df5615dba&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fb3b7d0a20cf431ad78bcc3b84136acaf2fdd98c1.jpg',
71 | 'topics': "四六级考后吐槽狂欢趴",
72 | "count": "118个提问 | 2363人参与"
73 | }
74 | ],
75 | past: [{
76 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137065&di=2a294046043d60dc10ca31470d28b3b2&imgtype=jpg&src=http%3A%2F%2Ff.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcdbf6c81800a19d85102048439fa828ba61e462a.jpg',
77 | 'topics': "四六级备考名师答疑",
78 | "count": "31个提问 | 444人参与"
79 | },
80 | {
81 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137052&di=68a2fccd9eebb68b34919f40360ff660&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fac345982b2b7d0a2bdc3841cc1ef76094b369a2d.jpg',
82 | 'topics': "那年高考,你印象最深刻的回忆",
83 | "count": "10个提问 | 97人参与"
84 | },
85 | {
86 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137037&di=c362066692ba61bd5b752d827667e0f7&imgtype=jpg&src=http%3A%2F%2Fb.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F4b90f603738da97770f907aaba51f8198718e359.jpg',
87 | 'topics': "四六级查分吐槽大会",
88 | "count": "34个提问 | 665人参与"
89 | },
90 | {
91 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136735&di=b36492c7e2173533f5973e1e167d0e5e&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fd31b0ef41bd5ad6ec7b2e36b8bcb39dbb7fd3ce3.jpg',
92 | 'topics': "四六级查分答疑",
93 | "count": "118个提问 | 151人参与"
94 | },
95 | {
96 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501137086&di=c3e1d488afb6e20e410d9a773fb650b4&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F48540923dd54564e761e64b8b9de9c82d1584f3c.jpg',
97 | 'topics': "语言学习与难题?快向学霸A+讨经验",
98 | "count": "4个提问 | 28人参与"
99 | },
100 | {
101 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136777&di=c6c3f92ecff22abc1f72081b6a23ca6f&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcaef76094b36acaf9460117d76d98d1000e99cab.jpg',
102 | topics: "干掉英语,就问大魔王!",
103 | "count": "29个提问 | 306人参与"
104 | },
105 | {
106 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136766&di=4781bf001038e937d72a76591b7dd0b1&imgtype=jpg&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F503d269759ee3d6d2d1a004a49166d224e4ade57.jpg',
107 | 'topics': "四六级考后吐槽狂欢趴",
108 | "count": "441个提问 | 2746人参与"
109 | },
110 | {
111 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136766&di=4781bf001038e937d72a76591b7dd0b1&imgtype=jpg&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F503d269759ee3d6d2d1a004a49166d224e4ade57.jpg',
112 | 'topics': "#四六级#翻译写作名师答疑专区",
113 | "count": "24个提问 | 101人参与"
114 | },
115 | {
116 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136756&di=1ae279eba64b0929e02467b5e5053416&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F83025aafa40f4bfbcd5c19d5094f78f0f63618a6.jpg',
117 | 'topics': "#四六级#阅读名师",
118 | "count": "11个提问 | 327人参与"
119 | },
120 | {
121 | url: 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136746&di=2ecc34592348d5b4ae0e8b10b667d176&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F3c6d55fbb2fb431616fafdfb2aa4462308f7d34e.jpg',
122 | 'topics': "#四六级#听力名师答疑区",
123 | "count": "16个提问 | 75人参与"
124 | }
125 | ]
126 |
127 | },
128 |
129 | navbarTap: function(e) {
130 | this.setData({
131 | currentTab: e.currentTarget.dataset.idx
132 | })
133 | },
134 |
135 | bindPickerChange: function(e) {
136 | this.setData({
137 | areaIndex: e.detail.value
138 | })
139 | },
140 |
141 | /**
142 | * 生命周期函数--监听页面加载
143 | */
144 | onLoad: function(options) {
145 | wx.request({
146 | url: "https://www.easy-mock.com/project/595f3f139adc231f357b0622",
147 | method: "GET",
148 | success: function(res) {
149 | console.log(res);
150 | }
151 | })
152 | // setTimeout(() => {
153 | // this.setData({
154 | // hidden: true
155 | // })
156 | // }, 3000)
157 | var api_url = 'https://cnodejs.org/api/v1/topics';
158 | api_url += '?tab=all&page=0&limit=10';
159 | console.log(api_url);
160 | var that = this;
161 | wx.request({
162 | url: api_url,
163 | method: "GET",
164 | success: function(res) {
165 | console.log();
166 | that.setData({
167 | hidden: true,
168 | postsList: res.data.data
169 | })
170 | }
171 | })
172 |
173 | },
174 |
175 | /**
176 | * 生命周期函数--监听页面初次渲染完成
177 | */
178 | onReady: function() {
179 |
180 | },
181 |
182 | /**
183 | * 生命周期函数--监听页面显示
184 | */
185 | onShow: function() {
186 |
187 | },
188 |
189 | /**
190 | * 生命周期函数--监听页面隐藏
191 | */
192 | onHide: function() {
193 |
194 | },
195 |
196 | /**
197 | * 生命周期函数--监听页面卸载
198 | */
199 | onUnload: function() {
200 |
201 | },
202 |
203 | /**
204 | * 页面相关事件处理函数--监听用户下拉动作
205 | */
206 | onPullDownRefresh: function() {
207 |
208 | },
209 |
210 | /**
211 | * 页面上拉触底事件的处理函数
212 | */
213 | onReachBottom: function() {
214 |
215 | },
216 |
217 | /**
218 | * 用户点击右上角分享
219 | */
220 | onShareAppMessage: function() {
221 |
222 | }
223 | })
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HuJiangTeach
2 | 小程序--沪江问答
3 | ***
4 | ## 初窥
5 | 
6 | 
7 | 
8 |
9 |
10 |
11 | ## 从一个hello world开始
12 | 微信开发者工具生成 目录如下:
13 | ```
14 | .
15 | |-- app.js
16 | |-- app.json
17 | |-- app.wxss
18 | |-- pages
19 | | |-- index # 主页
20 | | | |-- index.js
21 | | | |-- index.json
22 | | | |-- index.wxml
23 | | | `-- index.wxss
24 | | `-- log # 日志页面
25 | | | |-- log.js
26 | | | |-- log.json
27 | | | |-- log.wxml
28 | | | `-- log.wxss
29 | `-- utils # 工具
30 | `-- util.js
31 | ```
32 | 大体为:
33 | 每一个page即是一个页面文件 ,每个页面有一个js/wxml/wxss/json文件 规定:**描述页面的这四个文件必须具有相同的路径与文件名。**
34 | 全局下同路,为公共的逻辑,样式,配置
35 | 与html不同:用`view text navigator` 代替 `div span a`
36 |
37 | ## 开发者文档走马观花
38 | **app.json:** 注册pages window tabBar networkTimeout
39 | [组件说明](https://mp.weixin.qq.com/debug/wxadoc/dev/component/)
40 | ***.js:** 作为逻辑层 与wxml交互 有着丰富的 网络,媒体,文件,数据缓存,位置,设备,界面...的api
41 | [官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/)
42 | ***.wxml:** 数据驱动的视图层 + 微信提供了大量的组件 表单 导航 媒体 ...
43 | ## 一切具备 马上动工
44 | 生成目录
45 | ```
46 | .
47 | |-- app.js
48 | |-- app.json
49 | |-- app.wxss
50 | |-- common.js #公用js
51 | |-- images #存放项目图片
52 | |-- style
53 | | |-- weui.wxss # 引入weui样式 万一你自己不想写css样式呢
54 | |-- pages
55 | | |-- search # 首页
56 | | | |-- search.js
57 | | | |-- search.json
58 | | | |-- search.wxml
59 | | | `-- search.wxss
60 | | | |--search # 搜索
61 | | | | |-- search.js
62 | | | | |-- search.json
63 | | | | |-- search.wxml
64 | | | | `-- search.wxss
65 | | |--square # 广场
66 | | | |-- square.js
67 | | | |-- square.json
68 | | | |-- square.wxml
69 | | | `-- square.wxss
70 | | | |--question # 提问
71 | | | | |-- question.js
72 | | | | |-- question.json
73 | | | | |-- question.wxml
74 | | | | `-- question.wxss
75 | | |--topics # 话题
76 | | | |-- topics.js
77 | | | |-- topics.json
78 | | | |-- topics.wxml
79 | | | `-- topics.wxss
80 | | |--user # 我的
81 | | | |-- user.js
82 | | | |-- user.json
83 | | | |-- user.wxml
84 | | | `-- user.wxss
85 | | | |--register # 注册登录
86 | | | | |-- register.js
87 | | | | |-- register.json
88 | | | | |-- register.wxml
89 | | | | `-- register.wxss
90 | | | |--user-index # 用户
91 | | | | |-- user-index.js
92 | | | | |-- user-index.json
93 | | | | |-- user-index.wxml
94 | | | | `-- user-index.wxss
95 | | `-- log # 日志页面
96 | `-- utils # 工具
97 | `-- util.js
98 | ```
99 | 请先在在app.json中注册页面,设置navigation,配置tabbar
100 | ```js
101 | {
102 | "pages": [
103 | "pages/search/search",
104 | "pages/search/search/search",
105 | "pages/square/square",
106 | "pages/square/question/question",
107 | "pages/topics/topics",
108 | "pages/user/user",
109 | "pages/user/register/register",
110 | "pages/user/user-index/user-index"
111 | ],
112 | "window": {
113 | "backgroundTextStyle": "light",
114 | "backgroundColor": "#fff",
115 | "navigationBarBackgroundColor": "#11CF7E",
116 | "navigationBarTitleText": "沪江问答",
117 | "navigationBarTextStyle": "black",
118 | "enablePullDownRefresh": "true"
119 | },
120 | "tabBar": {
121 | "color": "black",
122 | "selectedColor": "#19FA28",
123 | "backgroundColor": "#ffffff",
124 | "borderStyle": "black",
125 | "list": [{
126 | "pagePath": "pages/search/search",
127 | "text": "搜索",
128 | "iconPath": "images/search.png",
129 | "selectedIconPath": "images/search_selected.png"
130 | },
131 | {
132 | "pagePath": "pages/square/square",
133 | "text": "广场",
134 | "iconPath": "images/square.png",
135 | "selectedIconPath": "images/square_selected.png"
136 | },
137 | {
138 | "pagePath": "pages/topics/topics",
139 | "text": "话题",
140 | "iconPath": "images/topics.png",
141 | "selectedIconPath": "images/topics_selected.png"
142 | },
143 | {
144 | "pagePath": "pages/user/user",
145 | "text": "我的",
146 | "iconPath": "images/user.png",
147 | "selectedIconPath": "images/user_selected.png"
148 | }
149 | ]
150 | }
151 | }
152 | ```
153 | ### 1.**block**对数据的渲染
154 | 
155 | 布局分为搜索框,文本提示区域
156 | 提问模块用block进行渲染三个tabs,以及搜索的类型
157 | ```js
158 | //js
159 | var status = true;
160 | Page({
161 | data: {
162 | types: ['英语', '日语', '韩语', '法语'],
163 | English: ['英语词汇', '英语口语', '英语阅读', '综合能力', '四六级', '专四专八', '商务英语', '翻译考试', '考研英语',
164 | '留学考试', '其他考试', '影视娱乐', '原版书', '欧美文化'
165 | ],
166 | Jan: ['初级日语', '日语教材', '日语听说读写', '日语翻译', 'N1', 'N2', 'N3N4N5', '其他日语考试', '日本留学'],
167 | Koa: ['韩语入门', '韩语口语', '韩语翻译', '留学就业', 'TOPIK初级', 'TOPIK中高级', '其他考试', '韩剧韩综'],
168 | France: ['法语语法', '法语考试', '留学法国', '翻译互助', '法国文化', '法国口语', '法语听力', '法语写作', '法语语音',
169 | '法语词汇'
170 | ],
171 | currentTab: 0,
172 | current: 0
173 | },
174 | toastShow: function(event) {
175 | console.log("提交成功");
176 | status = false
177 | this.setData({ status: status }) //setData方法可以建立新的data属性,从而起到跟视图实时同步的效果
178 | setTimeout(function() {
179 | wx.navigateBack({
180 | url: '/pages/search/search/search'
181 | })
182 | }, 3000);
183 | },
184 |
185 | toastHide: function(event) {
186 | status = true
187 | this.setData({ status: status })
188 | },
189 | navbarTap: function(e) {
190 | this.setData({
191 | currentTab: e.currentTarget.dataset.idx
192 | })
193 | },
194 |
195 | currentTap: function(e) {
196 | this.setData({
197 | current: e.currentTarget.dataset.idx
198 | })
199 | }
200 | })
201 | ```
202 | ### 2.用**flex布局**实现tabbar的布局
203 | 
204 | tips:小程序中`flex`布局基本无兼容性问题 ,可大胆使用
205 | 父元素设置display:flex,对主元素设置flex:1,其他的元素设置宽度,即可实现响应式布局。so easy.
206 | 由于没有接口调用,自己只能在js的data里面自己设置数据来传输了(有点垃圾哈,努力成长中😜
207 | ```js
208 | //js
209 | var app = getApp();
210 | Page({
211 |
212 | /**
213 | * 页面的初始数据
214 | */
215 | data: {
216 | navbar: ['最热', '最新'],
217 | currentTab: 0,
218 | areaIndex: 0,
219 | area: ['英语', '日语', '韩语', '法语'],
220 | hotest: [{
221 | id: 0,
222 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136220&di=9e545f019ff063f2e2d40ff093e69ca4&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fcaef76094b36acaf90900d7d76d98d1001e99c3b.jpg',
223 | 'name': '暗香疏影49938',
224 | "type": '综合能力',
225 | "text": '我住在宿舍里,学校宿舍没有网,沪江的课程可以下载到手机里离线听吗?',
226 | "apply": '6人回答'
227 | },
228 | {
229 | id: 1,
230 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136231&di=df09010b54644a6d6de64813e448295a&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F63d0f703918fa0ec7f92ff8c2c9759ee3c6ddbde.jpg',
231 | 'name': '青涩不及当初',
232 | "type": '英语词汇',
233 | "text": '一般英语考什么?',
234 | "apply": '4人回答'
235 | },
236 | {
237 | id: 2,
238 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135857&di=fa29ccd79a69991fed6e61aa53a2636a&imgtype=jpg&src=http%3A%2F%2Ff.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F562c11dfa9ec8a13165ec961fd03918fa1ecc0ef.jpg',
239 | 'name': '暗香疏影49938',
240 | "type": '综合能力',
241 | "text": '我住在宿舍里,学校宿舍没有网,沪江的课程可以下载到手机里离线听吗?',
242 | "apply": '6人回答'
243 | },
244 | {
245 | id: 3,
246 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135905&di=f05bd295743084fe249d3727169d58fb&imgtype=jpg&src=http%3A%2F%2Fe.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F5ab5c9ea15ce36d371ed1db130f33a87e850b142.jpg",
247 | 'name': '老老',
248 | "type": '综合能力',
249 | "text": '王翰怎么说?',
250 | "apply": '4人回答'
251 | }
252 | ],
253 | newest: [{
254 | id: 0,
255 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136337&di=3901868532c26c893342ba8746ce3c07&imgtype=jpg&src=http%3A%2F%2Fc.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F94cad1c8a786c9177d1fc8b8c33d70cf3bc75716.jpg',
256 | 'name': 'urtv4ihuysk',
257 | "type": '英语口语',
258 | "text": '学口语是不是要词汇量足?基础好?',
259 | "apply": '待回答'
260 | },
261 | {
262 | id: 1,
263 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136325&di=b58a79af6074b024887dccba02cdb91d&imgtype=jpg&src=http%3A%2F%2Fd.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2Fe61190ef76c6a7ef1d0732a7f7faaf51f3de660a.jpg',
264 | 'name': 'uku6ezbexruk',
265 | "type": '欧美文化',
266 | "text": '有首歌开始是oh~so damn i.got feeling you,i got feeling ah no no no 然后是一段一个男的唱的rap这是什么 ?',
267 | "apply": '待人回答'
268 | },
269 | {
270 | id: 2,
271 | 'url': 'https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501135997&di=b744bfb0dc901894d893a416377e3f2f&imgtype=jpg&src=http%3A%2F%2Fh.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F03087bf40ad162d99d67fb9d1bdfa9ec8b13cda2.jpg',
272 | 'name': '雨亦是泪',
273 | "type": '英语口语',
274 | "text": '2017.07.16的每日一句有个单词发音错了。says应该是发[se-z]不是[sei-z。say原型发[sei],says/said发[se-z]。',
275 | "apply": '6人回答'
276 | },
277 | {
278 | id: 3,
279 | 'url': "https://timgsa.baidu.com/timg?image&quality=80&size=b10000_10000&sec=1501136315&di=0debe0cdc33a5f7997a6a3e9ba682e51&imgtype=jpg&src=http%3A%2F%2Fg.hiphotos.baidu.com%2Fimage%2Fpic%2Fitem%2F77094b36acaf2edd1d88d368871001e939019332.jpg",
280 | 'name': '夜晚星辰79867',
281 | "type": '英语词汇',
282 | "text": '王翰怎么说?',
283 | "apply": '4人回答'
284 | }
285 | ]
286 | },
287 |
288 | navbarTap: function(e) {
289 | this.setData({
290 | currentTab: e.currentTarget.dataset.idx
291 | })
292 | },
293 |
294 | bindPickerChange: function(e) {
295 | this.setData({
296 | areaIndex: e.detail.value
297 | })
298 | },
299 | ask: function() {
300 | wx.navigateTo({
301 | url: '/pages/square/question/question'
302 | })
303 | },
304 | })
305 | ```
306 | ## 踩过的坑
307 | 刚接触小程序,讲真,刚开始他一脸懵逼,无从下手啊,在网上找了几个例子,看了下,自己开始照猫画虎。也顺利的完成了一个对自己来说小小的项目吧。
308 | #### 1.flex布局的问题
309 | 刚开始不是很了解,一直得不到想要的效果,看了[flex布局](http://www.cnblogs.com/module/p/5578533.html),自己也对display的几个属性值做了下总结,[来自前端菜鸟对 css display属性的理解](http://www.jianshu.com/p/7bf07a763d83),不足的地方还请老司机们指正。
310 | #### 2.对于数据存储的问题
311 | 这里给自己挖了个超级大的坑,在本地存储了好多图片(自己做数据嘛,好多头像只能自己搞定了),我擦,在上传到github上面的时候,死活上不去,查来查去,数据他多了,好吧,这样的话,老铁们,那就不要存在本地,悲催,还是老老实实写网址吧。
312 | #### 3.navigator的跳转
313 | navigator也就相当于html中的a标签,但是我觉得啊,它们还是有差距的,只要看到跳转,是不是就想到navigator。但是呢,不要在一个页面反复使用它,不然它跳不过去啊。我觉得有必要看一波[navigator](https://mp.weixin.qq.com/debug/wxadoc/dev/component/navigator.html),了。对于有些页面的跳转,没必要全部写navigator,可以在它们的标签里面给它们绑定事件,我觉得这样会更好。wx.navigateTo,wx.redirectTo,wx.switchTab,wx.reLaunch,wx.navigateBack等来实现页面跳转。
314 | ***
315 |
316 |
--------------------------------------------------------------------------------
/style/weui.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | line-height: 1.6;
3 | font-family: -apple-system-font, "Helvetica Neue", sans-serif;
4 | }
5 | icon {
6 | vertical-align: middle;
7 | }
8 | .weui-cells {
9 | position: relative;
10 | margin-top: 1.17647059em;
11 | background-color: #FFFFFF;
12 | line-height: 1.41176471;
13 | font-size: 17px;
14 | }
15 | .weui-cells:before {
16 | content: " ";
17 | position: absolute;
18 | left: 0;
19 | top: 0;
20 | right: 0;
21 | height: 1px;
22 | border-top: 1rpx solid #D9D9D9;
23 | color: #D9D9D9;
24 | }
25 | .weui-cells:after {
26 | content: " ";
27 | position: absolute;
28 | left: 0;
29 | bottom: 0;
30 | right: 0;
31 | height: 1px;
32 | border-bottom: 1rpx solid #D9D9D9;
33 | color: #D9D9D9;
34 | }
35 | .weui-cells__title {
36 | margin-top: .77em;
37 | margin-bottom: .3em;
38 | padding-left: 15px;
39 | padding-right: 15px;
40 | color: #999999;
41 | font-size: 14px;
42 | }
43 | .weui-cells_after-title {
44 | margin-top: 0;
45 | }
46 | .weui-cells__tips {
47 | margin-top: .3em;
48 | color: #999999;
49 | padding-left: 15px;
50 | padding-right: 15px;
51 | font-size: 14px;
52 | }
53 | .weui-cell {
54 | padding: 10px 15px;
55 | position: relative;
56 | display: -webkit-box;
57 | display: -webkit-flex;
58 | display: flex;
59 | -webkit-box-align: center;
60 | -webkit-align-items: center;
61 | align-items: center;
62 | }
63 | .weui-cell:before {
64 | content: " ";
65 | position: absolute;
66 | left: 0;
67 | top: 0;
68 | right: 0;
69 | height: 1px;
70 | border-top: 1rpx solid #D9D9D9;
71 | color: #D9D9D9;
72 | left: 15px;
73 | }
74 | .weui-cell:first-child:before {
75 | display: none;
76 | }
77 | .weui-cell_active {
78 | background-color: #ECECEC;
79 | }
80 | .weui-cell_primary {
81 | -webkit-box-align: start;
82 | -webkit-align-items: flex-start;
83 | align-items: flex-start;
84 | }
85 | .weui-cell__bd {
86 | -webkit-box-flex: 1;
87 | -webkit-flex: 1;
88 | flex: 1;
89 | }
90 | .weui-cell__ft {
91 | text-align: right;
92 | color: #999999;
93 | }
94 | .weui-cell_access {
95 | color: inherit;
96 | }
97 | .weui-cell__ft_in-access {
98 | padding-right: 13px;
99 | position: relative;
100 | }
101 | .weui-cell__ft_in-access:after {
102 | content: " ";
103 | display: inline-block;
104 | height: 6px;
105 | width: 6px;
106 | border-width: 2px 2px 0 0;
107 | border-color: #C8C8CD;
108 | border-style: solid;
109 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
110 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
111 | position: relative;
112 | top: -2px;
113 | position: absolute;
114 | top: 50%;
115 | margin-top: -4px;
116 | right: 2px;
117 | }
118 | .weui-cell_link {
119 | color: #586C94;
120 | font-size: 14px;
121 | }
122 | .weui-cell_link:active {
123 | background-color: #ECECEC;
124 | }
125 | .weui-cell_link:first-child:before {
126 | display: block;
127 | }
128 | .weui-icon-radio {
129 | margin-left: 3.2px;
130 | margin-right: 3.2px;
131 | }
132 | .weui-icon-checkbox_circle,
133 | .weui-icon-checkbox_success {
134 | margin-left: 4.6px;
135 | margin-right: 4.6px;
136 | }
137 | .weui-check__label:active {
138 | background-color: #ECECEC;
139 | }
140 | .weui-check {
141 | position: absolute;
142 | left: -9999px;
143 | }
144 | .weui-check__hd_in-checkbox {
145 | padding-right: 0.35em;
146 | }
147 | .weui-cell__ft_in-radio {
148 | padding-left: 0.35em;
149 | }
150 | .weui-cell_input {
151 | padding-top: 0;
152 | padding-bottom: 0;
153 | }
154 | .weui-label {
155 | width: 105px;
156 | word-wrap: break-word;
157 | word-break: break-all;
158 | }
159 | .weui-input {
160 | height: 2.58823529em;
161 | min-height: 2.58823529em;
162 | line-height: 2.58823529em;
163 | }
164 | .weui-toptips {
165 | position: fixed;
166 | -webkit-transform: translateZ(0);
167 | transform: translateZ(0);
168 | top: 0;
169 | left: 0;
170 | right: 0;
171 | padding: 5px;
172 | font-size: 14px;
173 | text-align: center;
174 | color: #FFFFFF;
175 | z-index: 5000;
176 | word-wrap: break-word;
177 | word-break: break-all;
178 | }
179 | .weui-toptips_warn {
180 | background-color: #E64340;
181 | }
182 | .weui-textarea {
183 | display: block;
184 | width: 100%;
185 | }
186 | .weui-textarea-counter {
187 | color: #B2B2B2;
188 | text-align: right;
189 | }
190 | .weui-textarea-counter_warn {
191 | color: #E64340;
192 | }
193 | .weui-cell_warn {
194 | color: #E64340;
195 | }
196 | .weui-form-preview {
197 | position: relative;
198 | background-color: #FFFFFF;
199 | }
200 | .weui-form-preview:before {
201 | content: " ";
202 | position: absolute;
203 | left: 0;
204 | top: 0;
205 | right: 0;
206 | height: 1px;
207 | border-top: 1rpx solid #D9D9D9;
208 | color: #D9D9D9;
209 | }
210 | .weui-form-preview:after {
211 | content: " ";
212 | position: absolute;
213 | left: 0;
214 | bottom: 0;
215 | right: 0;
216 | height: 1px;
217 | border-bottom: 1rpx solid #D9D9D9;
218 | color: #D9D9D9;
219 | }
220 | .weui-form-preview__value {
221 | font-size: 14px;
222 | }
223 | .weui-form-preview__value_in-hd {
224 | font-size: 26px;
225 | }
226 | .weui-form-preview__hd {
227 | position: relative;
228 | padding: 10px 15px;
229 | text-align: right;
230 | line-height: 2.5em;
231 | }
232 | .weui-form-preview__hd:after {
233 | content: " ";
234 | position: absolute;
235 | left: 0;
236 | bottom: 0;
237 | right: 0;
238 | height: 1px;
239 | border-bottom: 1rpx solid #D9D9D9;
240 | color: #D9D9D9;
241 | left: 15px;
242 | }
243 | .weui-form-preview__bd {
244 | padding: 10px 15px;
245 | font-size: .9em;
246 | text-align: right;
247 | color: #999999;
248 | line-height: 2;
249 | }
250 | .weui-form-preview__ft {
251 | position: relative;
252 | line-height: 50px;
253 | display: -webkit-box;
254 | display: -webkit-flex;
255 | display: flex;
256 | }
257 | .weui-form-preview__ft:after {
258 | content: " ";
259 | position: absolute;
260 | left: 0;
261 | top: 0;
262 | right: 0;
263 | height: 1px;
264 | border-top: 1rpx solid #D5D5D6;
265 | color: #D5D5D6;
266 | }
267 | .weui-form-preview__item {
268 | overflow: hidden;
269 | }
270 | .weui-form-preview__label {
271 | float: left;
272 | margin-right: 1em;
273 | min-width: 4em;
274 | color: #999999;
275 | text-align: justify;
276 | text-align-last: justify;
277 | }
278 | .weui-form-preview__value {
279 | display: block;
280 | overflow: hidden;
281 | word-break: normal;
282 | word-wrap: break-word;
283 | }
284 | .weui-form-preview__btn {
285 | position: relative;
286 | display: block;
287 | -webkit-box-flex: 1;
288 | -webkit-flex: 1;
289 | flex: 1;
290 | color: #3CC51F;
291 | text-align: center;
292 | }
293 | .weui-form-preview__btn:after {
294 | content: " ";
295 | position: absolute;
296 | left: 0;
297 | top: 0;
298 | width: 1px;
299 | bottom: 0;
300 | border-left: 1rpx solid #D5D5D6;
301 | color: #D5D5D6;
302 | }
303 | .weui-form-preview__btn:first-child:after {
304 | display: none;
305 | }
306 | .weui-form-preview__btn_active {
307 | background-color: #EEEEEE;
308 | }
309 | .weui-form-preview__btn_default {
310 | color: #999999;
311 | }
312 | .weui-form-preview__btn_primary {
313 | color: #0BB20C;
314 | }
315 | .weui-cell_select {
316 | padding: 0;
317 | }
318 | .weui-select {
319 | position: relative;
320 | padding-left: 15px;
321 | padding-right: 30px;
322 | height: 2.58823529em;
323 | min-height: 2.58823529em;
324 | line-height: 2.58823529em;
325 | border-right: 1rpx solid #D9D9D9;
326 | }
327 | .weui-select:before {
328 | content: " ";
329 | display: inline-block;
330 | height: 6px;
331 | width: 6px;
332 | border-width: 2px 2px 0 0;
333 | border-color: #C8C8CD;
334 | border-style: solid;
335 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
336 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
337 | position: relative;
338 | top: -2px;
339 | position: absolute;
340 | top: 50%;
341 | right: 15px;
342 | margin-top: -4px;
343 | }
344 | .weui-select_in-select-after {
345 | padding-left: 0;
346 | }
347 | .weui-cell__hd_in-select-after,
348 | .weui-cell__bd_in-select-before {
349 | padding-left: 15px;
350 | }
351 | .weui-cell_vcode {
352 | padding-right: 0;
353 | }
354 | .weui-vcode-img {
355 | margin-left: 5px;
356 | height: 2.58823529em;
357 | vertical-align: middle;
358 | }
359 | .weui-vcode-btn {
360 | display: inline-block;
361 | height: 2.58823529em;
362 | margin-left: 5px;
363 | padding: 0 0.6em 0 0.7em;
364 | border-left: 1px solid #E5E5E5;
365 | line-height: 2.58823529em;
366 | vertical-align: middle;
367 | font-size: 17px;
368 | color: #3CC51F;
369 | white-space: nowrap;
370 | }
371 | .weui-vcode-btn:active {
372 | color: #52a341;
373 | }
374 | .weui-cell_switch {
375 | padding-top: 6px;
376 | padding-bottom: 6px;
377 | }
378 | .weui-uploader__hd {
379 | display: -webkit-box;
380 | display: -webkit-flex;
381 | display: flex;
382 | padding-bottom: 10px;
383 | -webkit-box-align: center;
384 | -webkit-align-items: center;
385 | align-items: center;
386 | }
387 | .weui-uploader__title {
388 | -webkit-box-flex: 1;
389 | -webkit-flex: 1;
390 | flex: 1;
391 | }
392 | .weui-uploader__info {
393 | color: #B2B2B2;
394 | }
395 | .weui-uploader__bd {
396 | margin-bottom: -4px;
397 | margin-right: -9px;
398 | overflow: hidden;
399 | }
400 | .weui-uploader__file {
401 | float: left;
402 | margin-right: 9px;
403 | margin-bottom: 9px;
404 | }
405 | .weui-uploader__img {
406 | display: block;
407 | width: 79px;
408 | height: 79px;
409 | }
410 | .weui-uploader__file_status {
411 | position: relative;
412 | }
413 | .weui-uploader__file_status:before {
414 | content: " ";
415 | position: absolute;
416 | top: 0;
417 | right: 0;
418 | bottom: 0;
419 | left: 0;
420 | background-color: rgba(0, 0, 0, 0.5);
421 | }
422 | .weui-uploader__file-content {
423 | position: absolute;
424 | top: 50%;
425 | left: 50%;
426 | -webkit-transform: translate(-50%, -50%);
427 | transform: translate(-50%, -50%);
428 | color: #FFFFFF;
429 | }
430 | .weui-uploader__input-box {
431 | float: left;
432 | position: relative;
433 | margin-right: 9px;
434 | margin-bottom: 9px;
435 | width: 77px;
436 | height: 77px;
437 | border: 1px solid #D9D9D9;
438 | }
439 | .weui-uploader__input-box:before,
440 | .weui-uploader__input-box:after {
441 | content: " ";
442 | position: absolute;
443 | top: 50%;
444 | left: 50%;
445 | -webkit-transform: translate(-50%, -50%);
446 | transform: translate(-50%, -50%);
447 | background-color: #D9D9D9;
448 | }
449 | .weui-uploader__input-box:before {
450 | width: 2px;
451 | height: 39.5px;
452 | }
453 | .weui-uploader__input-box:after {
454 | width: 39.5px;
455 | height: 2px;
456 | }
457 | .weui-uploader__input-box:active {
458 | border-color: #999999;
459 | }
460 | .weui-uploader__input-box:active:before,
461 | .weui-uploader__input-box:active:after {
462 | background-color: #999999;
463 | }
464 | .weui-uploader__input {
465 | position: absolute;
466 | z-index: 1;
467 | top: 0;
468 | left: 0;
469 | width: 100%;
470 | height: 100%;
471 | opacity: 0;
472 | }
473 | .weui-article {
474 | padding: 20px 15px;
475 | font-size: 15px;
476 | }
477 | .weui-article__section {
478 | margin-bottom: 1.5em;
479 | }
480 | .weui-article__h1 {
481 | font-size: 18px;
482 | font-weight: 400;
483 | margin-bottom: .9em;
484 | }
485 | .weui-article__h2 {
486 | font-size: 16px;
487 | font-weight: 400;
488 | margin-bottom: .34em;
489 | }
490 | .weui-article__h3 {
491 | font-weight: 400;
492 | font-size: 15px;
493 | margin-bottom: .34em;
494 | }
495 | .weui-article__p {
496 | margin: 0 0 .8em;
497 | }
498 | .weui-msg {
499 | padding-top: 36px;
500 | text-align: center;
501 | }
502 | .weui-msg__link {
503 | display: inline;
504 | color: #586C94;
505 | }
506 | .weui-msg__icon-area {
507 | margin-bottom: 30px;
508 | }
509 | .weui-msg__text-area {
510 | margin-bottom: 25px;
511 | padding: 0 20px;
512 | }
513 | .weui-msg__title {
514 | margin-bottom: 5px;
515 | font-weight: 400;
516 | font-size: 20px;
517 | }
518 | .weui-msg__desc {
519 | font-size: 14px;
520 | color: #999999;
521 | }
522 | .weui-msg__opr-area {
523 | margin-bottom: 25px;
524 | }
525 | .weui-msg__extra-area {
526 | margin-bottom: 15px;
527 | font-size: 14px;
528 | color: #999999;
529 | }
530 | @media screen and (min-height: 438px) {
531 | .weui-msg__extra-area {
532 | position: fixed;
533 | left: 0;
534 | bottom: 0;
535 | width: 100%;
536 | text-align: center;
537 | }
538 | }
539 | .weui-flex {
540 | display: -webkit-box;
541 | display: -webkit-flex;
542 | display: flex;
543 | }
544 | .weui-flex__item {
545 | -webkit-box-flex: 1;
546 | -webkit-flex: 1;
547 | flex: 1;
548 | }
549 | .weui-btn {
550 | margin-top: 15px;
551 | }
552 | .weui-btn:first-child {
553 | margin-top: 0;
554 | }
555 | .weui-btn-area {
556 | margin: 1.17647059em 15px 0.3em;
557 | }
558 | .weui-agree {
559 | display: block;
560 | padding: .5em 15px;
561 | font-size: 13px;
562 | }
563 | .weui-agree__text {
564 | color: #999999;
565 | }
566 | .weui-agree__link {
567 | display: inline;
568 | color: #586C94;
569 | }
570 | .weui-agree__checkbox {
571 | position: absolute;
572 | left: -9999px;
573 | }
574 | .weui-agree__checkbox-icon {
575 | position: relative;
576 | top: 2px;
577 | display: inline-block;
578 | border: 1px solid #D1D1D1;
579 | background-color: #FFFFFF;
580 | border-radius: 3px;
581 | width: 11px;
582 | height: 11px;
583 | }
584 | .weui-agree__checkbox-icon-check {
585 | position: absolute;
586 | top: 1px;
587 | left: 1px;
588 | }
589 | .weui-footer {
590 | color: #999999;
591 | font-size: 14px;
592 | text-align: center;
593 | }
594 | .weui-footer_fixed-bottom {
595 | position: fixed;
596 | bottom: .52em;
597 | left: 0;
598 | right: 0;
599 | }
600 | .weui-footer__links {
601 | font-size: 0;
602 | }
603 | .weui-footer__link {
604 | display: inline-block;
605 | vertical-align: top;
606 | margin: 0 .62em;
607 | position: relative;
608 | font-size: 14px;
609 | color: #586C94;
610 | }
611 | .weui-footer__link:before {
612 | content: " ";
613 | position: absolute;
614 | left: 0;
615 | top: 0;
616 | width: 1px;
617 | bottom: 0;
618 | border-left: 1rpx solid #C7C7C7;
619 | color: #C7C7C7;
620 | left: -0.65em;
621 | top: .36em;
622 | bottom: .36em;
623 | }
624 | .weui-footer__link:first-child:before {
625 | display: none;
626 | }
627 | .weui-footer__text {
628 | padding: 0 .34em;
629 | font-size: 12px;
630 | }
631 | .weui-grids {
632 | border-top: 1rpx solid #D9D9D9;
633 | border-left: 1rpx solid #D9D9D9;
634 | overflow: hidden;
635 | }
636 | .weui-grid {
637 | position: relative;
638 | float: left;
639 | padding: 20px 10px;
640 | width: 33.33333333%;
641 | box-sizing: border-box;
642 | border-right: 1rpx solid #D9D9D9;
643 | border-bottom: 1rpx solid #D9D9D9;
644 | }
645 | .weui-grid_active {
646 | background-color: #ECECEC;
647 | }
648 | .weui-grid__icon {
649 | display: block;
650 | width: 28px;
651 | height: 28px;
652 | margin: 0 auto;
653 | }
654 | .weui-grid__label {
655 | margin-top: 5px;
656 | display: block;
657 | text-align: center;
658 | color: #000000;
659 | font-size: 14px;
660 | white-space: nowrap;
661 | text-overflow: ellipsis;
662 | overflow: hidden;
663 | }
664 | .weui-loading {
665 | margin: 0 5px;
666 | width: 20px;
667 | height: 20px;
668 | display: inline-block;
669 | vertical-align: middle;
670 | -webkit-animation: weuiLoading 1s steps(12, end) infinite;
671 | animation: weuiLoading 1s steps(12, end) infinite;
672 | background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;
673 | background-size: 100%;
674 | }
675 | .weui-loading.weui-loading_transparent {
676 | background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E");
677 | }
678 | @-webkit-keyframes weuiLoading {
679 | 0% {
680 | -webkit-transform: rotate3d(0, 0, 1, 0deg);
681 | transform: rotate3d(0, 0, 1, 0deg);
682 | }
683 | 100% {
684 | -webkit-transform: rotate3d(0, 0, 1, 360deg);
685 | transform: rotate3d(0, 0, 1, 360deg);
686 | }
687 | }
688 | @keyframes weuiLoading {
689 | 0% {
690 | -webkit-transform: rotate3d(0, 0, 1, 0deg);
691 | transform: rotate3d(0, 0, 1, 0deg);
692 | }
693 | 100% {
694 | -webkit-transform: rotate3d(0, 0, 1, 360deg);
695 | transform: rotate3d(0, 0, 1, 360deg);
696 | }
697 | }
698 | .weui-badge {
699 | display: inline-block;
700 | padding: .15em .4em;
701 | min-width: 8px;
702 | border-radius: 18px;
703 | background-color: #E64340;
704 | color: #FFFFFF;
705 | line-height: 1.2;
706 | text-align: center;
707 | font-size: 12px;
708 | vertical-align: middle;
709 | }
710 | .weui-badge_dot {
711 | padding: .4em;
712 | min-width: 0;
713 | }
714 | .weui-loadmore {
715 | width: 65%;
716 | margin: 1.5em auto;
717 | line-height: 1.6em;
718 | font-size: 14px;
719 | text-align: center;
720 | }
721 | .weui-loadmore__tips {
722 | display: inline-block;
723 | vertical-align: middle;
724 | }
725 | .weui-loadmore_line {
726 | border-top: 1px solid #E5E5E5;
727 | margin-top: 2.4em;
728 | }
729 | .weui-loadmore__tips_in-line {
730 | position: relative;
731 | top: -0.9em;
732 | padding: 0 .55em;
733 | background-color: #FFFFFF;
734 | color: #999999;
735 | }
736 | .weui-loadmore__tips_in-dot {
737 | position: relative;
738 | padding: 0 .16em;
739 | width: 4px;
740 | height: 1.6em;
741 | }
742 | .weui-loadmore__tips_in-dot:before {
743 | content: " ";
744 | position: absolute;
745 | top: 50%;
746 | left: 50%;
747 | margin-top: -1px;
748 | margin-left: -2px;
749 | width: 4px;
750 | height: 4px;
751 | border-radius: 50%;
752 | background-color: #E5E5E5;
753 | }
754 | .weui-panel {
755 | background-color: #FFFFFF;
756 | margin-top: 10px;
757 | position: relative;
758 | overflow: hidden;
759 | }
760 | .weui-panel:first-child {
761 | margin-top: 0;
762 | }
763 | .weui-panel:before {
764 | content: " ";
765 | position: absolute;
766 | left: 0;
767 | top: 0;
768 | right: 0;
769 | height: 1px;
770 | border-top: 1rpx solid #E5E5E5;
771 | color: #E5E5E5;
772 | }
773 | .weui-panel:after {
774 | content: " ";
775 | position: absolute;
776 | left: 0;
777 | bottom: 0;
778 | right: 0;
779 | height: 1px;
780 | border-bottom: 1rpx solid #E5E5E5;
781 | color: #E5E5E5;
782 | }
783 | .weui-panel__hd {
784 | padding: 14px 15px 10px;
785 | color: #999999;
786 | font-size: 13px;
787 | position: relative;
788 | }
789 | .weui-panel__hd:after {
790 | content: " ";
791 | position: absolute;
792 | left: 0;
793 | bottom: 0;
794 | right: 0;
795 | height: 1px;
796 | border-bottom: 1rpx solid #E5E5E5;
797 | color: #E5E5E5;
798 | left: 15px;
799 | }
800 | .weui-media-box {
801 | padding: 15px;
802 | position: relative;
803 | }
804 | .weui-media-box:before {
805 | content: " ";
806 | position: absolute;
807 | left: 0;
808 | top: 0;
809 | right: 0;
810 | height: 1px;
811 | border-top: 1rpx solid #E5E5E5;
812 | color: #E5E5E5;
813 | left: 15px;
814 | }
815 | .weui-media-box:first-child:before {
816 | display: none;
817 | }
818 | .weui-media-box__title {
819 | font-weight: 400;
820 | font-size: 17px;
821 | width: auto;
822 | overflow: hidden;
823 | text-overflow: ellipsis;
824 | white-space: nowrap;
825 | word-wrap: normal;
826 | word-wrap: break-word;
827 | word-break: break-all;
828 | }
829 | .weui-media-box__desc {
830 | color: #999999;
831 | font-size: 13px;
832 | line-height: 1.2;
833 | overflow: hidden;
834 | text-overflow: ellipsis;
835 | display: -webkit-box;
836 | -webkit-box-orient: vertical;
837 | -webkit-line-clamp: 2;
838 | }
839 | .weui-media-box__info {
840 | margin-top: 15px;
841 | padding-bottom: 5px;
842 | font-size: 13px;
843 | color: #CECECE;
844 | line-height: 1em;
845 | list-style: none;
846 | overflow: hidden;
847 | }
848 | .weui-media-box__info__meta {
849 | float: left;
850 | padding-right: 1em;
851 | }
852 | .weui-media-box__info__meta_extra {
853 | padding-left: 1em;
854 | border-left: 1px solid #CECECE;
855 | }
856 | .weui-media-box__title_in-text {
857 | margin-bottom: 8px;
858 | }
859 | .weui-media-box_appmsg {
860 | display: -webkit-box;
861 | display: -webkit-flex;
862 | display: flex;
863 | -webkit-box-align: center;
864 | -webkit-align-items: center;
865 | align-items: center;
866 | }
867 | .weui-media-box__thumb {
868 | width: 100%;
869 | height: 100%;
870 | vertical-align: top;
871 | }
872 | .weui-media-box__hd_in-appmsg {
873 | margin-right: .8em;
874 | width: 60px;
875 | height: 60px;
876 | line-height: 60px;
877 | text-align: center;
878 | }
879 | .weui-media-box__bd_in-appmsg {
880 | -webkit-box-flex: 1;
881 | -webkit-flex: 1;
882 | flex: 1;
883 | min-width: 0;
884 | }
885 | .weui-media-box_small-appmsg {
886 | padding: 0;
887 | }
888 | .weui-cells_in-small-appmsg {
889 | margin-top: 0;
890 | }
891 | .weui-cells_in-small-appmsg:before {
892 | display: none;
893 | }
894 | .weui-progress {
895 | display: -webkit-box;
896 | display: -webkit-flex;
897 | display: flex;
898 | -webkit-box-align: center;
899 | -webkit-align-items: center;
900 | align-items: center;
901 | }
902 | .weui-progress__bar {
903 | -webkit-box-flex: 1;
904 | -webkit-flex: 1;
905 | flex: 1;
906 | }
907 | .weui-progress__opr {
908 | margin-left: 15px;
909 | font-size: 0;
910 | }
911 | .weui-navbar {
912 | display: -webkit-box;
913 | display: -webkit-flex;
914 | display: flex;
915 | position: absolute;
916 | z-index: 500;
917 | top: 0;
918 | width: 100%;
919 | border-bottom: 1rpx solid #CCCCCC;
920 | }
921 | .weui-navbar__item {
922 | position: relative;
923 | display: block;
924 | -webkit-box-flex: 1;
925 | -webkit-flex: 1;
926 | flex: 1;
927 | padding: 13px 0;
928 | text-align: center;
929 | font-size: 0;
930 | }
931 | .weui-navbar__item.weui-bar__item_on {
932 | color: #1AAD19;
933 | }
934 | .weui-navbar__slider {
935 | position: absolute;
936 | content: " ";
937 | left: 0;
938 | bottom: 0;
939 | width: 6em;
940 | height: 3px;
941 | background-color: #1AAD19;
942 | -webkit-transition: -webkit-transform .3s;
943 | transition: -webkit-transform .3s;
944 | transition: transform .3s;
945 | transition: transform .3s, -webkit-transform .3s;
946 | }
947 | .weui-navbar__title {
948 | display: inline-block;
949 | font-size: 15px;
950 | max-width: 8em;
951 | width: auto;
952 | overflow: hidden;
953 | text-overflow: ellipsis;
954 | white-space: nowrap;
955 | word-wrap: normal;
956 | }
957 | .weui-tab {
958 | position: relative;
959 | height: 100%;
960 | }
961 | .weui-tab__panel {
962 | box-sizing: border-box;
963 | height: 100%;
964 | padding-top: 50px;
965 | overflow: auto;
966 | -webkit-overflow-scrolling: touch;
967 | }
968 | .weui-search-bar {
969 | position: relative;
970 | padding: 8px 10px;
971 | display: -webkit-box;
972 | display: -webkit-flex;
973 | display: flex;
974 | box-sizing: border-box;
975 | background-color: #EFEFF4;
976 | border-top: 1rpx solid #D7D6DC;
977 | border-bottom: 1rpx solid #D7D6DC;
978 | }
979 | .weui-icon-search {
980 | margin-right: 8px;
981 | font-size: inherit;
982 | }
983 | .weui-icon-search_in-box {
984 | position: absolute;
985 | left: 10px;
986 | top: 7px;
987 | }
988 | .weui-search-bar__text {
989 | display: inline-block;
990 | font-size: 14px;
991 | vertical-align: middle;
992 | }
993 | .weui-search-bar__form {
994 | position: relative;
995 | -webkit-box-flex: 1;
996 | -webkit-flex: auto;
997 | flex: auto;
998 | border-radius: 5px;
999 | background: #FFFFFF;
1000 | border: 1rpx solid #E6E6EA;
1001 | }
1002 | .weui-search-bar__box {
1003 | position: relative;
1004 | padding-left: 30px;
1005 | padding-right: 30px;
1006 | width: 100%;
1007 | box-sizing: border-box;
1008 | z-index: 1;
1009 | }
1010 | .weui-search-bar__input {
1011 | height: 28px;
1012 | line-height: 28px;
1013 | font-size: 14px;
1014 | }
1015 | .weui-icon-clear {
1016 | position: absolute;
1017 | top: 0;
1018 | right: 0;
1019 | padding: 7px 8px;
1020 | font-size: 0;
1021 | }
1022 | .weui-search-bar__label {
1023 | position: absolute;
1024 | top: 0;
1025 | right: 0;
1026 | bottom: 0;
1027 | left: 0;
1028 | z-index: 2;
1029 | border-radius: 3px;
1030 | text-align: center;
1031 | color: #9B9B9B;
1032 | background: #FFFFFF;
1033 | line-height: 28px;
1034 | }
1035 | .weui-search-bar__cancel-btn {
1036 | margin-left: 10px;
1037 | line-height: 28px;
1038 | color: #09BB07;
1039 | white-space: nowrap;
1040 | }
1041 |
--------------------------------------------------------------------------------