├── 01-demo
├── app.js
├── app.json
├── app.wxss
├── components
│ └── MyHeader
│ │ ├── MyHeader.js
│ │ ├── MyHeader.json
│ │ ├── MyHeader.wxml
│ │ └── MyHeader.wxss
├── icons
│ ├── category.png
│ ├── category_active.png
│ ├── index.png
│ └── index_active.png
├── images
│ ├── 1.jpg
│ ├── 2.jpg
│ ├── 3.jpg
│ └── heima.png
├── pages
│ ├── index
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── index10
│ │ ├── index10.js
│ │ ├── index10.json
│ │ ├── index10.wxml
│ │ └── index10.wxss
│ ├── index11
│ │ ├── index11.js
│ │ ├── index11.json
│ │ ├── index11.wxml
│ │ └── index11.wxss
│ ├── index12
│ │ ├── index12.js
│ │ ├── index12.json
│ │ ├── index12.wxml
│ │ └── index12.wxss
│ ├── index13
│ │ ├── index13.js
│ │ ├── index13.json
│ │ ├── index13.wxml
│ │ └── index13.wxss
│ ├── index14
│ │ ├── index14.js
│ │ ├── index14.json
│ │ ├── index14.wxml
│ │ └── index14.wxss
│ ├── index2
│ │ ├── index2.js
│ │ ├── index2.json
│ │ ├── index2.wxml
│ │ └── index2.wxss
│ ├── index3
│ │ ├── index3.js
│ │ ├── index3.json
│ │ ├── index3.wxml
│ │ └── index3.wxss
│ ├── index4
│ │ ├── index4.js
│ │ ├── index4.json
│ │ ├── index4.wxml
│ │ └── index4.wxss
│ ├── index5
│ │ ├── index5.js
│ │ ├── index5.json
│ │ ├── index5.wxml
│ │ └── index5.wxss
│ ├── index6
│ │ ├── index6.js
│ │ ├── index6.json
│ │ ├── index6.wxml
│ │ └── index6.wxss
│ ├── index7
│ │ ├── index7.js
│ │ ├── index7.json
│ │ ├── index7.wxml
│ │ └── index7.wxss
│ ├── index8
│ │ ├── index8.js
│ │ ├── index8.json
│ │ ├── index8.wxml
│ │ └── index8.wxss
│ ├── index9
│ │ ├── index9.js
│ │ ├── index9.json
│ │ ├── index9.wxml
│ │ └── index9.wxss
│ └── logs
│ │ ├── logs.js
│ │ ├── logs.json
│ │ ├── logs.wxml
│ │ └── logs.wxss
├── project.config.json
├── sitemap.json
├── stylues
│ └── box.wxss
└── utils
│ └── util.js
├── 02-bilibiili
├── .vscode
│ └── settings.json
├── app.js
├── app.json
├── app.wxss
├── components
│ └── MyTitle
│ │ ├── MyTitle.js
│ │ ├── MyTitle.json
│ │ ├── MyTitle.wxml
│ │ └── MyTitle.wxss
├── icons
│ ├── logo.png
│ ├── logo2.png
│ ├── search.png
│ └── user.PNG
├── images
│ ├── detail.png
│ └── index.png
├── jsconfig.json
├── pages
│ ├── detail
│ │ ├── detail.js
│ │ ├── detail.json
│ │ ├── detail.wxml
│ │ └── detail.wxss
│ └── index
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
├── project.config.json
├── sitemap.json
├── styles
│ └── fontawesome.wxss
├── typings
│ └── wx.d.ts
└── utils
│ └── util.js
└── README.md
/01-demo/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function () {
4 | // 展示本地存储能力
5 | var logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 |
9 | // 登录
10 | wx.login({
11 | success: res => {
12 | // 发送 res.code 到后台换取 openId, sessionKey, unionId
13 | }
14 | })
15 | // 获取用户信息
16 | wx.getSetting({
17 | success: res => {
18 | if (res.authSetting['scope.userInfo']) {
19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
20 | wx.getUserInfo({
21 | success: res => {
22 | // 可以将 res 发送给后台解码出 unionId
23 | this.globalData.userInfo = res.userInfo
24 |
25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
26 | // 所以此处加入 callback 以防止这种情况
27 | if (this.userInfoReadyCallback) {
28 | this.userInfoReadyCallback(res)
29 | }
30 | }
31 | })
32 | }
33 | }
34 | })
35 | },
36 | globalData: {
37 | userInfo: null
38 | }
39 | })
--------------------------------------------------------------------------------
/01-demo/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index14/index14",
4 | "pages/index13/index13",
5 | "pages/index12/index12",
6 | "pages/index11/index11",
7 | "pages/index10/index10",
8 | "pages/index9/index9",
9 | "pages/index8/index8",
10 | "pages/index7/index7",
11 | "pages/index6/index6",
12 | "pages/index5/index5",
13 | "pages/index4/index4",
14 | "pages/index3/index3",
15 | "pages/index2/index2",
16 | "pages/index/index",
17 | "pages/logs/logs"
18 | ],
19 | "window": {
20 | "backgroundTextStyle": "dark",
21 | "navigationBarBackgroundColor": "#ccc",
22 | "navigationBarTitleText": "全局-首页",
23 | "navigationBarTextStyle": "white",
24 | "enablePullDownRefresh":true
25 | },
26 | "sitemapLocation": "sitemap.json",
27 | "tabBar": {
28 | "color":"#000",
29 | "selectedColor":"#f23030",
30 | "backgroundColor":"#ccc",
31 | "list": [{
32 | "pagePath": "pages/index/index",
33 | "borderStyle":"white",
34 | "text": "首页",
35 | "iconPath": "icons/index.png",
36 | "selectedIconPath": "icons/index_active.png"
37 | },
38 | {
39 | "pagePath": "pages/logs/logs",
40 | "text": "日志",
41 | "iconPath": "icons/category.png",
42 | "selectedIconPath": "icons/category_active.png"
43 | }]
44 | }
45 | }
--------------------------------------------------------------------------------
/01-demo/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 200rpx 0;
9 | box-sizing: border-box;
10 | }
11 |
12 | view{
13 | /* font-size: 100px; */
14 | }
15 |
--------------------------------------------------------------------------------
/01-demo/components/MyHeader/MyHeader.js:
--------------------------------------------------------------------------------
1 | // components/MyHeader/MyHeader.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | cData:{
8 | value:"组件的默认值",
9 | type:String
10 | }
11 | },
12 |
13 | /**
14 | * 组件的初始数据
15 | */
16 | data: {
17 |
18 | },
19 |
20 | /**
21 | * 组件的方法列表
22 | */
23 | methods: {
24 |
25 | }
26 | })
27 |
--------------------------------------------------------------------------------
/01-demo/components/MyHeader/MyHeader.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/01-demo/components/MyHeader/MyHeader.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{cData}}
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/01-demo/components/MyHeader/MyHeader.wxss:
--------------------------------------------------------------------------------
1 | /* components/MyHeader/MyHeader.wxss */
2 | .my_heasder{
3 | font-size: 50px;
4 | background-color: blue;
5 | }
--------------------------------------------------------------------------------
/01-demo/icons/category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/01-demo/icons/category.png
--------------------------------------------------------------------------------
/01-demo/icons/category_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/01-demo/icons/category_active.png
--------------------------------------------------------------------------------
/01-demo/icons/index.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/01-demo/icons/index.png
--------------------------------------------------------------------------------
/01-demo/icons/index_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/01-demo/icons/index_active.png
--------------------------------------------------------------------------------
/01-demo/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/01-demo/images/1.jpg
--------------------------------------------------------------------------------
/01-demo/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/01-demo/images/2.jpg
--------------------------------------------------------------------------------
/01-demo/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/01-demo/images/3.jpg
--------------------------------------------------------------------------------
/01-demo/images/heima.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/01-demo/images/heima.png
--------------------------------------------------------------------------------
/01-demo/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const app = getApp()
4 |
5 | Page({
6 | data: {
7 | motto: 'Hello World',
8 | userInfo: {},
9 | hasUserInfo: false,
10 | canIUse: wx.canIUse('button.open-type.getUserInfo')
11 | },
12 | //事件处理函数
13 | bindViewTap: function() {
14 | wx.navigateTo({
15 | url: '../logs/logs'
16 | })
17 | },
18 | onLoad: function () {
19 | if (app.globalData.userInfo) {
20 | this.setData({
21 | userInfo: app.globalData.userInfo,
22 | hasUserInfo: true
23 | })
24 | } else if (this.data.canIUse){
25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
26 | // 所以此处加入 callback 以防止这种情况
27 | app.userInfoReadyCallback = res => {
28 | this.setData({
29 | userInfo: res.userInfo,
30 | hasUserInfo: true
31 | })
32 | }
33 | } else {
34 | // 在没有 open-type=getUserInfo 版本的兼容处理
35 | wx.getUserInfo({
36 | success: res => {
37 | app.globalData.userInfo = res.userInfo
38 | this.setData({
39 | userInfo: res.userInfo,
40 | hasUserInfo: true
41 | })
42 | }
43 | })
44 | }
45 | },
46 | getUserInfo: function(e) {
47 | console.log(e)
48 | app.globalData.userInfo = e.detail.userInfo
49 | this.setData({
50 | userInfo: e.detail.userInfo,
51 | hasUserInfo: true
52 | })
53 | }
54 | })
55 |
--------------------------------------------------------------------------------
/01-demo/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{userInfo.nickName}}
8 |
9 |
10 |
11 | {{motto}}
12 |
13 |
14 |
--------------------------------------------------------------------------------
/01-demo/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | .userinfo {
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | }
7 |
8 | .userinfo-avatar {
9 | width: 128rpx;
10 | height: 128rpx;
11 | margin: 20rpx;
12 | border-radius: 50%;
13 | }
14 |
15 | .userinfo-nickname {
16 | color: #aaa;
17 | }
18 |
19 | .usermotto {
20 | margin-top: 200px;
21 | }
--------------------------------------------------------------------------------
/01-demo/pages/index10/index10.js:
--------------------------------------------------------------------------------
1 | // pages/index10/index10.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index10/index10.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index10/index10.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/01-demo/pages/index10/index10.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index10/index10.wxss */
2 | image{
3 | width: 100%;
4 | height: 300px;
5 | border:1px solid red
6 | }
--------------------------------------------------------------------------------
/01-demo/pages/index11/index11.js:
--------------------------------------------------------------------------------
1 | // pages/index11/index11.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index11/index11.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index11/index11.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/01-demo/pages/index11/index11.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index11/index11.wxss */
2 | swiper{
3 | width: 100%;
4 | height: 150px;
5 | }
6 | swiper-item{
7 |
8 | }
9 | image{
10 | width: 100%;
11 | }
--------------------------------------------------------------------------------
/01-demo/pages/index12/index12.js:
--------------------------------------------------------------------------------
1 | // pages/index12/index12.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index12/index12.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index12/index12.wxml:
--------------------------------------------------------------------------------
1 |
2 | index11
3 |
4 | index11
5 |
6 | 首页
7 |
8 | index11
9 |
10 |
--------------------------------------------------------------------------------
/01-demo/pages/index12/index12.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index12/index12.wxss */
--------------------------------------------------------------------------------
/01-demo/pages/index13/index13.js:
--------------------------------------------------------------------------------
1 | // pages/index13/index13.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index13/index13.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index13/index13.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/01-demo/pages/index13/index13.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index13/index13.wxss */
--------------------------------------------------------------------------------
/01-demo/pages/index14/index14.js:
--------------------------------------------------------------------------------
1 | // pages/index14/index14.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index14/index14.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "MyHeader": "../../components/MyHeader/MyHeader"
4 | }
5 | }
--------------------------------------------------------------------------------
/01-demo/pages/index14/index14.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/01-demo/pages/index14/index14.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index14/index14.wxss */
--------------------------------------------------------------------------------
/01-demo/pages/index2/index2.js:
--------------------------------------------------------------------------------
1 | // pages/index2/index2.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index2/index2.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarTitleText": "页面2",
4 | "navigationBarBackgroundColor": "#ccc",
5 | "navigationBarTextStyle":"black"
6 | }
--------------------------------------------------------------------------------
/01-demo/pages/index2/index2.wxml:
--------------------------------------------------------------------------------
1 |
2 | pages/index2/index2.wxml
3 |
--------------------------------------------------------------------------------
/01-demo/pages/index2/index2.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index2/index2.wxss */
--------------------------------------------------------------------------------
/01-demo/pages/index3/index3.js:
--------------------------------------------------------------------------------
1 | // pages/index3/index3.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | msg:"你好啊!",
9 | num:1000,
10 | isBoy:true,
11 | person:{
12 | name:"小爱同学",
13 | height:"188"
14 | },
15 | title:"这个是新页面index3"
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 | })
--------------------------------------------------------------------------------
/01-demo/pages/index3/index3.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index3/index3.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{msg}} || {{num}} || {{isBoy}} || {{person.name}} || {{person.height}}
3 | title
4 |
5 |
6 |
--------------------------------------------------------------------------------
/01-demo/pages/index3/index3.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index3/index3.wxss */
--------------------------------------------------------------------------------
/01-demo/pages/index4/index4.js:
--------------------------------------------------------------------------------
1 | // pages/index4/index4.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | isChecked:true,
9 | num1:10,
10 | num2:1000,
11 | num3:2,
12 | str1:"hello",
13 | str2:"world !"
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 | })
--------------------------------------------------------------------------------
/01-demo/pages/index4/index4.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index4/index4.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{num1+num2}} || {{str1+str2}}
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/01-demo/pages/index4/index4.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index4/index4.wxss */
--------------------------------------------------------------------------------
/01-demo/pages/index5/index5.js:
--------------------------------------------------------------------------------
1 | // pages/index5/index5.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | arr:["苹果","香蕉","西瓜"],
9 | person:{
10 | name:"小爱",
11 | height:180
12 | }
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: function (options) {
19 |
20 | },
21 |
22 | /**
23 | * 生命周期函数--监听页面初次渲染完成
24 | */
25 | onReady: function () {
26 |
27 | },
28 |
29 | /**
30 | * 生命周期函数--监听页面显示
31 | */
32 | onShow: function () {
33 |
34 | },
35 |
36 | /**
37 | * 生命周期函数--监听页面隐藏
38 | */
39 | onHide: function () {
40 |
41 | },
42 |
43 | /**
44 | * 生命周期函数--监听页面卸载
45 | */
46 | onUnload: function () {
47 |
48 | },
49 |
50 | /**
51 | * 页面相关事件处理函数--监听用户下拉动作
52 | */
53 | onPullDownRefresh: function () {
54 |
55 | },
56 |
57 | /**
58 | * 页面上拉触底事件的处理函数
59 | */
60 | onReachBottom: function () {
61 |
62 | },
63 |
64 | /**
65 | * 用户点击右上角分享
66 | */
67 | onShareAppMessage: function () {
68 |
69 | }
70 | })
--------------------------------------------------------------------------------
/01-demo/pages/index5/index5.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index5/index5.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{index}}:{{item}}
4 |
5 |
6 | {{index}}:{{item}}
7 |
8 |
9 | {{index}}:{{item}}
10 |
11 |
--------------------------------------------------------------------------------
/01-demo/pages/index5/index5.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index5/index5.wxss */
--------------------------------------------------------------------------------
/01-demo/pages/index6/index6.js:
--------------------------------------------------------------------------------
1 | // pages/index6/index6.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index6/index6.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index6/index6.wxml:
--------------------------------------------------------------------------------
1 | box
--------------------------------------------------------------------------------
/01-demo/pages/index6/index6.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index6/index6.wxss */
2 | .box1{
3 | /* 750px宽度和高度 100px */
4 | /* 375px宽度和高度 50px */
5 |
6 | /* 1rpx=1px */
7 | width: 100rpx;
8 | height:100rpx;
9 | font-size: 100rpx;
10 | background-color: aqua;
11 | }
--------------------------------------------------------------------------------
/01-demo/pages/index7/index7.js:
--------------------------------------------------------------------------------
1 | // pages/index7/index7.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index7/index7.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index7/index7.wxml:
--------------------------------------------------------------------------------
1 |
2 | index7
3 |
--------------------------------------------------------------------------------
/01-demo/pages/index7/index7.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index7/index7.wxss */
2 | /* 导入功能 */
3 | @import "../../stylues/box.wxss"
--------------------------------------------------------------------------------
/01-demo/pages/index8/index8.js:
--------------------------------------------------------------------------------
1 | // pages/index8/index8.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | myColor:"blue",
9 | myClass:"box"
10 | },
11 |
12 | /**
13 | * 生命周期函数--监听页面加载
14 | */
15 | onLoad: function (options) {
16 |
17 | },
18 |
19 | /**
20 | * 生命周期函数--监听页面初次渲染完成
21 | */
22 | onReady: function () {
23 |
24 | },
25 |
26 | /**
27 | * 生命周期函数--监听页面显示
28 | */
29 | onShow: function () {
30 |
31 | },
32 |
33 | /**
34 | * 生命周期函数--监听页面隐藏
35 | */
36 | onHide: function () {
37 |
38 | },
39 |
40 | /**
41 | * 生命周期函数--监听页面卸载
42 | */
43 | onUnload: function () {
44 |
45 | },
46 |
47 | /**
48 | * 页面相关事件处理函数--监听用户下拉动作
49 | */
50 | onPullDownRefresh: function () {
51 |
52 | },
53 |
54 | /**
55 | * 页面上拉触底事件的处理函数
56 | */
57 | onReachBottom: function () {
58 |
59 | },
60 |
61 | /**
62 | * 用户点击右上角分享
63 | */
64 | onShareAppMessage: function () {
65 |
66 | }
67 | })
--------------------------------------------------------------------------------
/01-demo/pages/index8/index8.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index8/index8.wxml:
--------------------------------------------------------------------------------
1 | "pages/index7/index7",
2 |
3 | style
4 |
5 |
6 | class
7 |
--------------------------------------------------------------------------------
/01-demo/pages/index8/index8.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index8/index8.wxss */
2 | .box{
3 | width: 50px;
4 | height: 50px;
5 | background-color: red
6 | }
--------------------------------------------------------------------------------
/01-demo/pages/index9/index9.js:
--------------------------------------------------------------------------------
1 | // pages/index9/index9.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/01-demo/pages/index9/index9.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/01-demo/pages/index9/index9.wxml:
--------------------------------------------------------------------------------
1 | index9
2 |
3 | index9 text
4 | 普 通
5 |
--------------------------------------------------------------------------------
/01-demo/pages/index9/index9.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index9/index9.wxss */
2 | .hover_class{
3 | background-color: aqua;
4 |
5 | }
--------------------------------------------------------------------------------
/01-demo/pages/logs/logs.js:
--------------------------------------------------------------------------------
1 | //logs.js
2 | const util = require('../../utils/util.js')
3 |
4 | Page({
5 | data: {
6 | logs: []
7 | },
8 | onLoad: function () {
9 | this.setData({
10 | logs: (wx.getStorageSync('logs') || []).map(log => {
11 | return util.formatTime(new Date(log))
12 | })
13 | })
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/01-demo/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志",
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/01-demo/pages/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/01-demo/pages/logs/logs.wxss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | display: flex;
3 | flex-direction: column;
4 | padding: 40rpx;
5 | }
6 | .log-item {
7 | margin: 10rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/01-demo/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件",
3 | "packOptions": {
4 | "ignore": []
5 | },
6 | "setting": {
7 | "urlCheck": true,
8 | "es6": true,
9 | "postcss": true,
10 | "minified": true,
11 | "newFeature": true,
12 | "autoAudits": false
13 | },
14 | "compileType": "miniprogram",
15 | "libVersion": "2.0.4",
16 | "appid": "wxf711922254f44b2b",
17 | "projectname": "01-demo",
18 | "debugOptions": {
19 | "hidedInDevtools": []
20 | },
21 | "isGameTourist": false,
22 | "simulatorType": "wechat",
23 | "simulatorPluginLibVersion": {},
24 | "condition": {
25 | "search": {
26 | "current": -1,
27 | "list": []
28 | },
29 | "conversation": {
30 | "current": -1,
31 | "list": []
32 | },
33 | "game": {
34 | "currentL": -1,
35 | "list": []
36 | },
37 | "miniprogram": {
38 | "current": -1,
39 | "list": []
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/01-demo/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/01-demo/stylues/box.wxss:
--------------------------------------------------------------------------------
1 | .lg_box{
2 | width: 200px;
3 | height: 200px;
4 | background-color: aqua;
5 | font-size: 50px;
6 | color: blue;
7 | }
--------------------------------------------------------------------------------
/01-demo/utils/util.js:
--------------------------------------------------------------------------------
1 | const formatTime = date => {
2 | const year = date.getFullYear()
3 | const month = date.getMonth() + 1
4 | const day = date.getDate()
5 | const hour = date.getHours()
6 | const minute = date.getMinutes()
7 | const second = date.getSeconds()
8 |
9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
10 | }
11 |
12 | const formatNumber = n => {
13 | n = n.toString()
14 | return n[1] ? n : '0' + n
15 | }
16 |
17 | module.exports = {
18 | formatTime: formatTime
19 | }
20 |
--------------------------------------------------------------------------------
/02-bilibiili/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.associations": {
3 | "*.wxml": "html",
4 | "*.wxss": "css"
5 | }
6 | }
--------------------------------------------------------------------------------
/02-bilibiili/app.js:
--------------------------------------------------------------------------------
1 | App({
2 |
3 | /**
4 | * 当小程序初始化完成时,会触发 onLaunch(全局只触发一次)
5 | */
6 | onLaunch: function () {
7 |
8 | },
9 |
10 | /**
11 | * 当小程序启动,或从后台进入前台显示,会触发 onShow
12 | */
13 | onShow: function (options) {
14 |
15 | },
16 |
17 | /**
18 | * 当小程序从前台进入后台,会触发 onHide
19 | */
20 | onHide: function () {
21 |
22 | },
23 |
24 | /**
25 | * 当小程序发生脚本错误,或者 api 调用失败时,会触发 onError 并带上错误信息
26 | */
27 | onError: function (msg) {
28 |
29 | }
30 | })
31 |
--------------------------------------------------------------------------------
/02-bilibiili/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/detail/detail"
5 | ],
6 | "window": {
7 | "backgroundTextStyle": "light",
8 | "navigationBarBackgroundColor": "#fff",
9 | "navigationBarTitleText": "WeChat",
10 | "navigationBarTextStyle": "black"
11 | },
12 | "sitemapLocation": "sitemap.json"
13 | }
--------------------------------------------------------------------------------
/02-bilibiili/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | @import "styles/fontawesome";
3 |
4 | page,view,image,swiper,swiper-item,navigator,video{
5 | box-sizing: border-box;
6 | }
--------------------------------------------------------------------------------
/02-bilibiili/components/MyTitle/MyTitle.js:
--------------------------------------------------------------------------------
1 | // components/MyTitle/MyTitle.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 |
8 | },
9 |
10 | /**
11 | * 组件的初始数据
12 | */
13 | data: {
14 |
15 | },
16 |
17 | /**
18 | * 组件的方法列表
19 | */
20 | methods: {
21 |
22 | }
23 | })
24 |
--------------------------------------------------------------------------------
/02-bilibiili/components/MyTitle/MyTitle.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/02-bilibiili/components/MyTitle/MyTitle.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 下载App
17 |
18 |
--------------------------------------------------------------------------------
/02-bilibiili/components/MyTitle/MyTitle.wxss:
--------------------------------------------------------------------------------
1 | /* components/MyTitle/MyTitle.wxss */
2 | .my_title{
3 | display: flex;
4 | align-items: center;
5 | padding:10rpx;
6 | background-color: #fff;
7 | }
8 | .logo{
9 | flex: 7;
10 | }
11 | .search_icon{
12 | flex: 1;
13 | display: flex;
14 | justify-content: center;
15 | align-items: center;
16 | }
17 | .user_icon{
18 | flex: 2;
19 | display: flex;
20 | justify-content: center;
21 | align-items: center;
22 | }
23 | .down_app{
24 | flex: 3;
25 | font-size: 30rpx;
26 | display: flex;
27 | justify-content: center;
28 | align-items: center;
29 | background-color: pink;
30 | color: #fff;
31 | border-radius: 10rpx;
32 | padding: 10rpx;
33 | }
--------------------------------------------------------------------------------
/02-bilibiili/icons/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/02-bilibiili/icons/logo.png
--------------------------------------------------------------------------------
/02-bilibiili/icons/logo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/02-bilibiili/icons/logo2.png
--------------------------------------------------------------------------------
/02-bilibiili/icons/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/02-bilibiili/icons/search.png
--------------------------------------------------------------------------------
/02-bilibiili/icons/user.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/02-bilibiili/icons/user.PNG
--------------------------------------------------------------------------------
/02-bilibiili/images/detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/02-bilibiili/images/detail.png
--------------------------------------------------------------------------------
/02-bilibiili/images/index.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OYZQ/Small-program/03b3a2892ede97a034b5d4f121515036c0ff7f91/02-bilibiili/images/index.png
--------------------------------------------------------------------------------
/02-bilibiili/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2015",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/02-bilibiili/pages/detail/detail.js:
--------------------------------------------------------------------------------
1 | // pages/detail/detail.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | // 视频详情
9 | videoInfo:null,
10 | // 推荐视频
11 | othersList:[],
12 | // 评论数据
13 | commentData:null
14 | },
15 |
16 | /**
17 | * 生命周期函数--监听页面加载
18 | */
19 | onLoad: function (options) {
20 | // console.log(options);
21 | let videoId = options.id;
22 | this.getCurrentVideo(videoId);
23 | this.getOthersList(videoId);
24 | this.getCommentList(videoId);
25 |
26 | },
27 | // 根据视频ID获取视频详情
28 | getCurrentVideo(videoId){
29 | let that = this;
30 | wx.request({
31 | url: 'https://easy-mock.com/mock/5ccc2cc89e5cbc7d96b29785/bili/videoDetail?id='+videoId,
32 | data: {},
33 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
34 | // header: {}, // 设置请求的 header
35 | success: function(res){
36 | // success
37 | // console.log(res);
38 | if(res.data.code===0){
39 | that.setData({
40 | videoInfo:res.data.data.videoInfo
41 | })
42 | }
43 |
44 | },
45 | fail: function() {
46 | // fail
47 | },
48 | complete: function() {
49 | // complete
50 | }
51 | })
52 | },
53 | // 获取推荐视频
54 | getOthersList(videoId){
55 | let that=this;
56 | wx.request({
57 | url: 'https://easy-mock.com/mock/5c1dfd98e8bfa547414a5278/bili/othersList?id='+videoId,
58 | data: {},
59 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
60 | // header: {}, // 设置请求的 header
61 | success: function(res){
62 | // success
63 | // console.log(res);
64 | if(res.data.code===0){
65 | that.setData({
66 | othersList:res.data.data.othersList
67 | })
68 | }
69 |
70 | },
71 | fail: function() {
72 | // fail
73 | },
74 | complete: function() {
75 | // complete
76 | }
77 | })
78 | },
79 | // 获取评论数据
80 | getCommentList(videoId){
81 | let that=this;
82 | wx.request({
83 | url: 'https://easy-mock.com/mock/5c1dfd98e8bfa547414a5278/bili/commentsList?id='+videoId,
84 | data: {},
85 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
86 | // header: {}, // 设置请求的 header
87 | success: function(res){
88 | // success
89 | // console.log(res);
90 | if(res.data.code===0){
91 | that.setData({
92 | commentData:res.data.data.commentData
93 | })
94 | }
95 |
96 | },
97 | fail: function() {
98 | // fail
99 | },
100 | complete: function() {
101 | // complete
102 | }
103 | })
104 | },
105 | /**
106 | * 生命周期函数--监听页面初次渲染完成
107 | */
108 | onReady: function () {
109 |
110 | },
111 |
112 | /**
113 | * 生命周期函数--监听页面显示
114 | */
115 | onShow: function () {
116 |
117 | },
118 |
119 | /**
120 | * 生命周期函数--监听页面隐藏
121 | */
122 | onHide: function () {
123 |
124 | },
125 |
126 | /**
127 | * 生命周期函数--监听页面卸载
128 | */
129 | onUnload: function () {
130 |
131 | },
132 |
133 | /**
134 | * 页面相关事件处理函数--监听用户下拉动作
135 | */
136 | onPullDownRefresh: function () {
137 |
138 | },
139 |
140 | /**
141 | * 页面上拉触底事件的处理函数
142 | */
143 | onReachBottom: function () {
144 |
145 | },
146 |
147 | /**
148 | * 用户点击右上角分享
149 | */
150 | onShareAppMessage: function () {
151 |
152 | }
153 | })
--------------------------------------------------------------------------------
/02-bilibiili/pages/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "视频详情",
3 | "usingComponents": {
4 | "MyTitle":"../../components/MyTitle/MyTitle"
5 | }
6 | }
--------------------------------------------------------------------------------
/02-bilibiili/pages/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{videoInfo.videoTitle}}
11 |
12 |
13 |
14 |
15 |
16 | {{videoInfo.author}}
17 |
18 | {{videoInfo.playCount}}
19 |
20 |
21 |
22 | {{videoInfo.date}}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | {{item.title}}
37 |
38 |
39 |
40 | {{item.playMsg}}
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
71 |
--------------------------------------------------------------------------------
/02-bilibiili/pages/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/detail/detail.wxss */
2 | /* 视频 */
3 | .page{
4 | padding: 10rpx;
5 | color: #666
6 | }
7 | .video_info{
8 | margin-top: 10rpx;
9 | }
10 | .video_info video{
11 | width: 100%;
12 | }
13 | .video_title{
14 | display: flex;
15 | justify-content: space-between;
16 | font-size: 35rpx;
17 | }
18 | .video_detail{
19 | margin-top: 5rpx;
20 | font-size: 28rpx;
21 | }
22 | .video_detail text{
23 | margin-left: 15rpx;
24 | }
25 |
26 | .video_detail .author{
27 | color: #000;
28 | }
29 |
30 | /* 推荐视频 */
31 | .other_list{
32 | margin-top: 10rpx;
33 | }
34 | .item_other{
35 | display: flex;
36 | justify-content: space-between;
37 | margin-bottom: 10rpx;
38 | }
39 | .other_img_wrap{
40 | width: 38%;
41 | display: flex;
42 | justify-content: center;
43 | align-items: center;
44 | }
45 | .other_img_wrap image{
46 | width: 90%;
47 | border-radius: 15rpx;
48 | }
49 | .other_info{
50 | width: 60%;
51 | display: flex;
52 | flex-direction: column;
53 | justify-content: space-around;
54 | }
55 | .other_title{
56 | font-size: 30rpx;
57 | color: #e06f93;
58 | }
59 | .other_detail{
60 | font-size: 26rpx;
61 | color: #666666;
62 | }
63 |
64 | /* 评论列表 */
65 | .comment_wrap{
66 | margin-top: 10rpx;
67 | }
68 | .comment_title{
69 | padding: 10rpx;
70 | font-size: 28rpx;
71 | }
72 | .comment_list{}
73 | .comment_item{
74 | margin-bottom: 10rpx;
75 | padding: 10rpx;
76 | display: flex;
77 | justify-content: space-between;
78 | border-bottom: 1px solid #666
79 | }
80 | .comment_user{
81 | flex: 1;
82 | display: flex;
83 | justify-content: center;
84 | align-content: center;
85 | }
86 | .comment_user image{
87 | width: 60%;
88 | border-radius: 50%;
89 | }
90 | .comment_info{
91 | flex: 5;
92 | display: flex;
93 | flex-direction: column;
94 | justify-content: space-around;
95 | }
96 | .comment_detail{
97 | display: flex;
98 | justify-content: space-between;
99 | }
100 | .comment_detail .author{
101 | font-size: 28rpx;
102 | color: #000;
103 | }
104 | .comment_detail .date{
105 | color: #666666;
106 | font-size: 24rpx;
107 | }
108 | .comment_content{
109 | font-size: 28rpx;
110 | color: #000;
111 | }
--------------------------------------------------------------------------------
/02-bilibiili/pages/index/index.js:
--------------------------------------------------------------------------------
1 | Page({
2 |
3 | /**
4 | * 页面的初始数据
5 | */
6 | data: {
7 | //被点击的首页导航的菜单的索引
8 | currentIndexNav:0,
9 | //首页导航数据
10 | navList:[],
11 | //轮播图数据
12 | swiperList:[],
13 | //视频列表数据
14 | videosList:[]
15 | },
16 | //点击首页导航按钮
17 | activeNav(e){
18 | // console.log(123)
19 | this.setData({
20 | currentIndexNav:e.target.dataset.index
21 | })
22 | },
23 |
24 | //获取首页导航数据
25 | getNavList(){
26 | let that=this;
27 | //利用小程序内置发送请求方法
28 | wx.request({
29 | url: 'https://easy-mock.com/mock/5c1dfd98e8bfa547414a5278/bili/navList',
30 | data: {},
31 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
32 | // header: {}, // 设置请求的 header
33 | success: function(res){
34 | // success
35 | // console.log(res);
36 | if(res.data.code===0){
37 | that.setData({
38 | navList:res.data.data.navList
39 | })
40 | }
41 |
42 | },
43 | fail: function() {
44 | // fail
45 | },
46 | complete: function() {
47 | // complete
48 | }
49 | })
50 | },
51 | // 获取轮播图数据
52 | getSwiperList(){
53 | let that=this;
54 | wx.request({
55 | url: 'https://easy-mock.com/mock/5c1dfd98e8bfa547414a5278/bili/swiperList',
56 | data: {},
57 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
58 | // header: {}, // 设置请求的 header
59 | success: function(res){
60 | // success
61 | // console.log(res);
62 | if(res.data.code===0){
63 | that.setData({
64 | swiperList:res.data.data.swiperList
65 | })
66 | }
67 |
68 | },
69 | fail: function() {
70 | // fail
71 | },
72 | complete: function() {
73 | // complete
74 | }
75 | })
76 | },
77 | // 获取视频列表
78 | getVideosList(){
79 | let that = this;
80 | wx.request({
81 | url: 'https://easy-mock.com/mock/5c1dfd98e8bfa547414a5278/bili/videosList',
82 | data: {},
83 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
84 | // header: {}, // 设置请求的 header
85 | success: function(res){
86 | // success
87 | // console.log(res);
88 | if(res.data.code===0){
89 | that.setData({
90 | videosList:res.data.data.videosList
91 | })
92 | }
93 |
94 | },
95 | fail: function() {
96 | // fail
97 | },
98 | complete: function() {
99 | // complete
100 | }
101 | })
102 | },
103 | /**
104 | * 生命周期函数--监听页面加载
105 | */
106 | onLoad: function (options) {
107 | //1 获取首页导航数据
108 | this.getNavList();
109 | //2 获取轮播图数据
110 | this.getSwiperList();
111 | //3 d调用获取视频列表函数
112 | this.getVideosList();
113 | },
114 |
115 | /**
116 | * 生命周期函数--监听页面初次渲染完成
117 | */
118 | onReady: function () {
119 |
120 | },
121 |
122 | /**
123 | * 生命周期函数--监听页面显示
124 | */
125 | onShow: function () {
126 |
127 | },
128 |
129 | /**
130 | * 生命周期函数--监听页面隐藏
131 | */
132 | onHide: function () {
133 |
134 | },
135 |
136 | /**
137 | * 生命周期函数--监听页面卸载
138 | */
139 | onUnload: function () {
140 |
141 | },
142 |
143 | /**
144 | * 页面相关事件处理函数--监听用户下拉动作
145 | */
146 | onPullDownRefresh: function () {
147 |
148 | },
149 |
150 | /**
151 | * 页面上拉触底事件的处理函数
152 | */
153 | onReachBottom: function () {
154 |
155 | },
156 |
157 | /**
158 | * 用户点击右上角分享
159 | */
160 | onShareAppMessage: function () {
161 |
162 | }
163 | })
--------------------------------------------------------------------------------
/02-bilibiili/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "bilibili",
3 | "usingComponents": {
4 | "MyTitle":"../../components/MyTitle/MyTitle"
5 | }
6 | }
--------------------------------------------------------------------------------
/02-bilibiili/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.text}}
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 | {{item.playCount}}
38 |
39 |
40 |
46 |
47 |
48 |
49 | {{item.desc}}
50 |
51 |
52 |
--------------------------------------------------------------------------------
/02-bilibiili/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /* 首页导航 */
2 | page{
3 | color: #666;
4 | padding: 10rpx;
5 | }
6 | .nav wrap{}
7 | .nav{
8 | white-space: nowrap;
9 | padding: 5rpx 0;
10 | }
11 | .nav_item{
12 | padding:20rpx 45rpx;
13 | font-size: 30rpx;
14 | display: inline-block;
15 | }
16 | .nav_item.active{
17 | border-bottom: 5rpx solid #de688b;
18 | }
19 |
20 | /* 轮播图 */
21 | .slides{
22 | margin-top: 10rpx;
23 | }
24 | .slides swiper{
25 | height: 220rpx;
26 | }
27 | .slides navigator{
28 | width: 100%;
29 | height: 100%;
30 | }
31 | .slides navigator image{
32 | width: 100%;
33 | }
34 |
35 | /* 视频列表 */
36 | .video_wrap{
37 | display: flex;
38 | flex-wrap: wrap;
39 | padding: 5rpx;
40 | justify-content: space-between
41 | }
42 | .video_item{
43 | width: 48%;
44 | margin-bottom: 20rpx;
45 | }
46 | .video_img{
47 | position: relative;
48 | }
49 | .video_img image{
50 | width: 100%;
51 | border-radius: 15rpx;
52 | }
53 | .video_img .video_info{
54 | position: absolute;
55 | bottom: 10rpx;
56 | left: 0;
57 | width: 100%;
58 | display: flex;
59 | justify-content: space-around;
60 | color: #fff;
61 | font-size: 24rpx;
62 | }
63 | .video_title{
64 | font-size: 28rpx;
65 | display: -webkit-box;
66 | overflow: hidden;
67 | white-space: normal;
68 | text-overflow: ellipsis;
69 | word-wrap: break-word;
70 | -webkit-line-clamp: 2;
71 | -webkit-box-orient: vertical;
72 | }
73 |
74 |
--------------------------------------------------------------------------------
/02-bilibiili/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件",
3 | "packOptions": {
4 | "ignore": []
5 | },
6 | "setting": {
7 | "urlCheck": false,
8 | "es6": true,
9 | "postcss": true,
10 | "minified": true,
11 | "newFeature": true,
12 | "autoAudits": false,
13 | "checkInvalidKey": true
14 | },
15 | "compileType": "miniprogram",
16 | "libVersion": "2.7.1",
17 | "appid": "wxf711922254f44b2b",
18 | "projectname": "02-bilibiili",
19 | "debugOptions": {
20 | "hidedInDevtools": []
21 | },
22 | "isGameTourist": false,
23 | "simulatorType": "wechat",
24 | "simulatorPluginLibVersion": {},
25 | "condition": {
26 | "search": {
27 | "current": -1,
28 | "list": []
29 | },
30 | "conversation": {
31 | "current": -1,
32 | "list": []
33 | },
34 | "game": {
35 | "currentL": -1,
36 | "list": []
37 | },
38 | "miniprogram": {
39 | "current": -1,
40 | "list": []
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/02-bilibiili/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/02-bilibiili/styles/fontawesome.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 | /* FONT PATH
6 | * -------------------------- */
7 | @font-face {
8 | font-family: 'FontAwesome';
9 | src: url('https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css');
10 | src:
11 | url('https://cdn.staticfile.org/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2') format('woff2'),
12 | url('https://cdn.staticfile.org/font-awesome/4.7.0/fonts/fontawesome-webfont.woff') format('woff'),
13 | url('https://cdn.staticfile.org/font-awesome/4.7.0/fonts/fontawesome-webfont.svg') format('svg'),
14 | url('https://cdn.staticfile.org/font-awesome/4.7.0/fonts/fontawesome-webfont.eot') format('eot'),
15 | url('https://cdn.staticfile.org/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf') format('ttf');
16 | font-weight: normal;
17 | font-style: normal;
18 | }
19 |
20 | .fa {
21 | display: inline-block;
22 | font: normal normal normal 14px/1 FontAwesome;
23 | font-size: inherit;
24 | text-rendering: auto;
25 | -webkit-font-smoothing: antialiased;
26 | -moz-osx-font-smoothing: grayscale;
27 | }
28 | /* makes the font 33% larger relative to the icon container */
29 | .fa-lg {
30 | font-size: 1.33333333em;
31 | line-height: 0.75em;
32 | vertical-align: -15%;
33 | }
34 | .fa-2x {
35 | font-size: 2em;
36 | }
37 | .fa-3x {
38 | font-size: 3em;
39 | }
40 | .fa-4x {
41 | font-size: 4em;
42 | }
43 | .fa-5x {
44 | font-size: 5em;
45 | }
46 | .fa-fw {
47 | width: 1.28571429em;
48 | text-align: center;
49 | }
50 | .fa-ul {
51 | padding-left: 0;
52 | margin-left: 2.14285714em;
53 | list-style-type: none;
54 | }
55 | .fa-ul > li {
56 | position: relative;
57 | }
58 | .fa-li {
59 | position: absolute;
60 | left: -2.14285714em;
61 | width: 2.14285714em;
62 | top: 0.14285714em;
63 | text-align: center;
64 | }
65 | .fa-li.fa-lg {
66 | left: -1.85714286em;
67 | }
68 | .fa-border {
69 | padding: .2em .25em .15em;
70 | border: solid 0.08em #eeeeee;
71 | border-radius: .1em;
72 | }
73 | .fa-pull-left {
74 | float: left;
75 | }
76 | .fa-pull-right {
77 | float: right;
78 | }
79 | .fa.fa-pull-left {
80 | margin-right: .3em;
81 | }
82 | .fa.fa-pull-right {
83 | margin-left: .3em;
84 | }
85 | /* Deprecated as of 4.4.0 */
86 | .pull-right {
87 | float: right;
88 | }
89 | .pull-left {
90 | float: left;
91 | }
92 | .fa.pull-left {
93 | margin-right: .3em;
94 | }
95 | .fa.pull-right {
96 | margin-left: .3em;
97 | }
98 | .fa-spin {
99 | -webkit-animation: fa-spin 2s infinite linear;
100 | animation: fa-spin 2s infinite linear;
101 | }
102 | .fa-pulse {
103 | -webkit-animation: fa-spin 1s infinite steps(8);
104 | animation: fa-spin 1s infinite steps(8);
105 | }
106 | @-webkit-keyframes fa-spin {
107 | 0% {
108 | -webkit-transform: rotate(0deg);
109 | transform: rotate(0deg);
110 | }
111 | 100% {
112 | -webkit-transform: rotate(359deg);
113 | transform: rotate(359deg);
114 | }
115 | }
116 | @keyframes fa-spin {
117 | 0% {
118 | -webkit-transform: rotate(0deg);
119 | transform: rotate(0deg);
120 | }
121 | 100% {
122 | -webkit-transform: rotate(359deg);
123 | transform: rotate(359deg);
124 | }
125 | }
126 | .fa-rotate-90 {
127 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
128 | -webkit-transform: rotate(90deg);
129 | -ms-transform: rotate(90deg);
130 | transform: rotate(90deg);
131 | }
132 | .fa-rotate-180 {
133 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
134 | -webkit-transform: rotate(180deg);
135 | -ms-transform: rotate(180deg);
136 | transform: rotate(180deg);
137 | }
138 | .fa-rotate-270 {
139 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
140 | -webkit-transform: rotate(270deg);
141 | -ms-transform: rotate(270deg);
142 | transform: rotate(270deg);
143 | }
144 | .fa-flip-horizontal {
145 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
146 | -webkit-transform: scale(-1, 1);
147 | -ms-transform: scale(-1, 1);
148 | transform: scale(-1, 1);
149 | }
150 | .fa-flip-vertical {
151 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
152 | -webkit-transform: scale(1, -1);
153 | -ms-transform: scale(1, -1);
154 | transform: scale(1, -1);
155 | }
156 | :root .fa-rotate-90,
157 | :root .fa-rotate-180,
158 | :root .fa-rotate-270,
159 | :root .fa-flip-horizontal,
160 | :root .fa-flip-vertical {
161 | filter: none;
162 | }
163 | .fa-stack {
164 | position: relative;
165 | display: inline-block;
166 | width: 2em;
167 | height: 2em;
168 | line-height: 2em;
169 | vertical-align: middle;
170 | }
171 | .fa-stack-1x,
172 | .fa-stack-2x {
173 | position: absolute;
174 | left: 0;
175 | width: 100%;
176 | text-align: center;
177 | }
178 | .fa-stack-1x {
179 | line-height: inherit;
180 | }
181 | .fa-stack-2x {
182 | font-size: 2em;
183 | }
184 | .fa-inverse {
185 | color: #ffffff;
186 | }
187 | /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
188 | readers do not read off random characters that represent icons */
189 | .fa-glass:before {
190 | content: "\f000";
191 | }
192 | .fa-music:before {
193 | content: "\f001";
194 | }
195 | .fa-search:before {
196 | content: "\f002";
197 | }
198 | .fa-envelope-o:before {
199 | content: "\f003";
200 | }
201 | .fa-heart:before {
202 | content: "\f004";
203 | }
204 | .fa-star:before {
205 | content: "\f005";
206 | }
207 | .fa-star-o:before {
208 | content: "\f006";
209 | }
210 | .fa-user:before {
211 | content: "\f007";
212 | }
213 | .fa-film:before {
214 | content: "\f008";
215 | }
216 | .fa-th-large:before {
217 | content: "\f009";
218 | }
219 | .fa-th:before {
220 | content: "\f00a";
221 | }
222 | .fa-th-list:before {
223 | content: "\f00b";
224 | }
225 | .fa-check:before {
226 | content: "\f00c";
227 | }
228 | .fa-remove:before,
229 | .fa-close:before,
230 | .fa-times:before {
231 | content: "\f00d";
232 | }
233 | .fa-search-plus:before {
234 | content: "\f00e";
235 | }
236 | .fa-search-minus:before {
237 | content: "\f010";
238 | }
239 | .fa-power-off:before {
240 | content: "\f011";
241 | }
242 | .fa-signal:before {
243 | content: "\f012";
244 | }
245 | .fa-gear:before,
246 | .fa-cog:before {
247 | content: "\f013";
248 | }
249 | .fa-trash-o:before {
250 | content: "\f014";
251 | }
252 | .fa-home:before {
253 | content: "\f015";
254 | }
255 | .fa-file-o:before {
256 | content: "\f016";
257 | }
258 | .fa-clock-o:before {
259 | content: "\f017";
260 | }
261 | .fa-road:before {
262 | content: "\f018";
263 | }
264 | .fa-download:before {
265 | content: "\f019";
266 | }
267 | .fa-arrow-circle-o-down:before {
268 | content: "\f01a";
269 | }
270 | .fa-arrow-circle-o-up:before {
271 | content: "\f01b";
272 | }
273 | .fa-inbox:before {
274 | content: "\f01c";
275 | }
276 | .fa-play-circle-o:before {
277 | content: "\f01d";
278 | }
279 | .fa-rotate-right:before,
280 | .fa-repeat:before {
281 | content: "\f01e";
282 | }
283 | .fa-refresh:before {
284 | content: "\f021";
285 | }
286 | .fa-list-alt:before {
287 | content: "\f022";
288 | }
289 | .fa-lock:before {
290 | content: "\f023";
291 | }
292 | .fa-flag:before {
293 | content: "\f024";
294 | }
295 | .fa-headphones:before {
296 | content: "\f025";
297 | }
298 | .fa-volume-off:before {
299 | content: "\f026";
300 | }
301 | .fa-volume-down:before {
302 | content: "\f027";
303 | }
304 | .fa-volume-up:before {
305 | content: "\f028";
306 | }
307 | .fa-qrcode:before {
308 | content: "\f029";
309 | }
310 | .fa-barcode:before {
311 | content: "\f02a";
312 | }
313 | .fa-tag:before {
314 | content: "\f02b";
315 | }
316 | .fa-tags:before {
317 | content: "\f02c";
318 | }
319 | .fa-book:before {
320 | content: "\f02d";
321 | }
322 | .fa-bookmark:before {
323 | content: "\f02e";
324 | }
325 | .fa-print:before {
326 | content: "\f02f";
327 | }
328 | .fa-camera:before {
329 | content: "\f030";
330 | }
331 | .fa-font:before {
332 | content: "\f031";
333 | }
334 | .fa-bold:before {
335 | content: "\f032";
336 | }
337 | .fa-italic:before {
338 | content: "\f033";
339 | }
340 | .fa-text-height:before {
341 | content: "\f034";
342 | }
343 | .fa-text-width:before {
344 | content: "\f035";
345 | }
346 | .fa-align-left:before {
347 | content: "\f036";
348 | }
349 | .fa-align-center:before {
350 | content: "\f037";
351 | }
352 | .fa-align-right:before {
353 | content: "\f038";
354 | }
355 | .fa-align-justify:before {
356 | content: "\f039";
357 | }
358 | .fa-list:before {
359 | content: "\f03a";
360 | }
361 | .fa-dedent:before,
362 | .fa-outdent:before {
363 | content: "\f03b";
364 | }
365 | .fa-indent:before {
366 | content: "\f03c";
367 | }
368 | .fa-video-camera:before {
369 | content: "\f03d";
370 | }
371 | .fa-photo:before,
372 | .fa-image:before,
373 | .fa-picture-o:before {
374 | content: "\f03e";
375 | }
376 | .fa-pencil:before {
377 | content: "\f040";
378 | }
379 | .fa-map-marker:before {
380 | content: "\f041";
381 | }
382 | .fa-adjust:before {
383 | content: "\f042";
384 | }
385 | .fa-tint:before {
386 | content: "\f043";
387 | }
388 | .fa-edit:before,
389 | .fa-pencil-square-o:before {
390 | content: "\f044";
391 | }
392 | .fa-share-square-o:before {
393 | content: "\f045";
394 | }
395 | .fa-check-square-o:before {
396 | content: "\f046";
397 | }
398 | .fa-arrows:before {
399 | content: "\f047";
400 | }
401 | .fa-step-backward:before {
402 | content: "\f048";
403 | }
404 | .fa-fast-backward:before {
405 | content: "\f049";
406 | }
407 | .fa-backward:before {
408 | content: "\f04a";
409 | }
410 | .fa-play:before {
411 | content: "\f04b";
412 | }
413 | .fa-pause:before {
414 | content: "\f04c";
415 | }
416 | .fa-stop:before {
417 | content: "\f04d";
418 | }
419 | .fa-forward:before {
420 | content: "\f04e";
421 | }
422 | .fa-fast-forward:before {
423 | content: "\f050";
424 | }
425 | .fa-step-forward:before {
426 | content: "\f051";
427 | }
428 | .fa-eject:before {
429 | content: "\f052";
430 | }
431 | .fa-chevron-left:before {
432 | content: "\f053";
433 | }
434 | .fa-chevron-right:before {
435 | content: "\f054";
436 | }
437 | .fa-plus-circle:before {
438 | content: "\f055";
439 | }
440 | .fa-minus-circle:before {
441 | content: "\f056";
442 | }
443 | .fa-times-circle:before {
444 | content: "\f057";
445 | }
446 | .fa-check-circle:before {
447 | content: "\f058";
448 | }
449 | .fa-question-circle:before {
450 | content: "\f059";
451 | }
452 | .fa-info-circle:before {
453 | content: "\f05a";
454 | }
455 | .fa-crosshairs:before {
456 | content: "\f05b";
457 | }
458 | .fa-times-circle-o:before {
459 | content: "\f05c";
460 | }
461 | .fa-check-circle-o:before {
462 | content: "\f05d";
463 | }
464 | .fa-ban:before {
465 | content: "\f05e";
466 | }
467 | .fa-arrow-left:before {
468 | content: "\f060";
469 | }
470 | .fa-arrow-right:before {
471 | content: "\f061";
472 | }
473 | .fa-arrow-up:before {
474 | content: "\f062";
475 | }
476 | .fa-arrow-down:before {
477 | content: "\f063";
478 | }
479 | .fa-mail-forward:before,
480 | .fa-share:before {
481 | content: "\f064";
482 | }
483 | .fa-expand:before {
484 | content: "\f065";
485 | }
486 | .fa-compress:before {
487 | content: "\f066";
488 | }
489 | .fa-plus:before {
490 | content: "\f067";
491 | }
492 | .fa-minus:before {
493 | content: "\f068";
494 | }
495 | .fa-asterisk:before {
496 | content: "\f069";
497 | }
498 | .fa-exclamation-circle:before {
499 | content: "\f06a";
500 | }
501 | .fa-gift:before {
502 | content: "\f06b";
503 | }
504 | .fa-leaf:before {
505 | content: "\f06c";
506 | }
507 | .fa-fire:before {
508 | content: "\f06d";
509 | }
510 | .fa-eye:before {
511 | content: "\f06e";
512 | }
513 | .fa-eye-slash:before {
514 | content: "\f070";
515 | }
516 | .fa-warning:before,
517 | .fa-exclamation-triangle:before {
518 | content: "\f071";
519 | }
520 | .fa-plane:before {
521 | content: "\f072";
522 | }
523 | .fa-calendar:before {
524 | content: "\f073";
525 | }
526 | .fa-random:before {
527 | content: "\f074";
528 | }
529 | .fa-comment:before {
530 | content: "\f075";
531 | }
532 | .fa-magnet:before {
533 | content: "\f076";
534 | }
535 | .fa-chevron-up:before {
536 | content: "\f077";
537 | }
538 | .fa-chevron-down:before {
539 | content: "\f078";
540 | }
541 | .fa-retweet:before {
542 | content: "\f079";
543 | }
544 | .fa-shopping-cart:before {
545 | content: "\f07a";
546 | }
547 | .fa-folder:before {
548 | content: "\f07b";
549 | }
550 | .fa-folder-open:before {
551 | content: "\f07c";
552 | }
553 | .fa-arrows-v:before {
554 | content: "\f07d";
555 | }
556 | .fa-arrows-h:before {
557 | content: "\f07e";
558 | }
559 | .fa-bar-chart-o:before,
560 | .fa-bar-chart:before {
561 | content: "\f080";
562 | }
563 | .fa-twitter-square:before {
564 | content: "\f081";
565 | }
566 | .fa-facebook-square:before {
567 | content: "\f082";
568 | }
569 | .fa-camera-retro:before {
570 | content: "\f083";
571 | }
572 | .fa-key:before {
573 | content: "\f084";
574 | }
575 | .fa-gears:before,
576 | .fa-cogs:before {
577 | content: "\f085";
578 | }
579 | .fa-comments:before {
580 | content: "\f086";
581 | }
582 | .fa-thumbs-o-up:before {
583 | content: "\f087";
584 | }
585 | .fa-thumbs-o-down:before {
586 | content: "\f088";
587 | }
588 | .fa-star-half:before {
589 | content: "\f089";
590 | }
591 | .fa-heart-o:before {
592 | content: "\f08a";
593 | }
594 | .fa-sign-out:before {
595 | content: "\f08b";
596 | }
597 | .fa-linkedin-square:before {
598 | content: "\f08c";
599 | }
600 | .fa-thumb-tack:before {
601 | content: "\f08d";
602 | }
603 | .fa-external-link:before {
604 | content: "\f08e";
605 | }
606 | .fa-sign-in:before {
607 | content: "\f090";
608 | }
609 | .fa-trophy:before {
610 | content: "\f091";
611 | }
612 | .fa-github-square:before {
613 | content: "\f092";
614 | }
615 | .fa-upload:before {
616 | content: "\f093";
617 | }
618 | .fa-lemon-o:before {
619 | content: "\f094";
620 | }
621 | .fa-phone:before {
622 | content: "\f095";
623 | }
624 | .fa-square-o:before {
625 | content: "\f096";
626 | }
627 | .fa-bookmark-o:before {
628 | content: "\f097";
629 | }
630 | .fa-phone-square:before {
631 | content: "\f098";
632 | }
633 | .fa-twitter:before {
634 | content: "\f099";
635 | }
636 | .fa-facebook-f:before,
637 | .fa-facebook:before {
638 | content: "\f09a";
639 | }
640 | .fa-github:before {
641 | content: "\f09b";
642 | }
643 | .fa-unlock:before {
644 | content: "\f09c";
645 | }
646 | .fa-credit-card:before {
647 | content: "\f09d";
648 | }
649 | .fa-feed:before,
650 | .fa-rss:before {
651 | content: "\f09e";
652 | }
653 | .fa-hdd-o:before {
654 | content: "\f0a0";
655 | }
656 | .fa-bullhorn:before {
657 | content: "\f0a1";
658 | }
659 | .fa-bell:before {
660 | content: "\f0f3";
661 | }
662 | .fa-certificate:before {
663 | content: "\f0a3";
664 | }
665 | .fa-hand-o-right:before {
666 | content: "\f0a4";
667 | }
668 | .fa-hand-o-left:before {
669 | content: "\f0a5";
670 | }
671 | .fa-hand-o-up:before {
672 | content: "\f0a6";
673 | }
674 | .fa-hand-o-down:before {
675 | content: "\f0a7";
676 | }
677 | .fa-arrow-circle-left:before {
678 | content: "\f0a8";
679 | }
680 | .fa-arrow-circle-right:before {
681 | content: "\f0a9";
682 | }
683 | .fa-arrow-circle-up:before {
684 | content: "\f0aa";
685 | }
686 | .fa-arrow-circle-down:before {
687 | content: "\f0ab";
688 | }
689 | .fa-globe:before {
690 | content: "\f0ac";
691 | }
692 | .fa-wrench:before {
693 | content: "\f0ad";
694 | }
695 | .fa-tasks:before {
696 | content: "\f0ae";
697 | }
698 | .fa-filter:before {
699 | content: "\f0b0";
700 | }
701 | .fa-briefcase:before {
702 | content: "\f0b1";
703 | }
704 | .fa-arrows-alt:before {
705 | content: "\f0b2";
706 | }
707 | .fa-group:before,
708 | .fa-users:before {
709 | content: "\f0c0";
710 | }
711 | .fa-chain:before,
712 | .fa-link:before {
713 | content: "\f0c1";
714 | }
715 | .fa-cloud:before {
716 | content: "\f0c2";
717 | }
718 | .fa-flask:before {
719 | content: "\f0c3";
720 | }
721 | .fa-cut:before,
722 | .fa-scissors:before {
723 | content: "\f0c4";
724 | }
725 | .fa-copy:before,
726 | .fa-files-o:before {
727 | content: "\f0c5";
728 | }
729 | .fa-paperclip:before {
730 | content: "\f0c6";
731 | }
732 | .fa-save:before,
733 | .fa-floppy-o:before {
734 | content: "\f0c7";
735 | }
736 | .fa-square:before {
737 | content: "\f0c8";
738 | }
739 | .fa-navicon:before,
740 | .fa-reorder:before,
741 | .fa-bars:before {
742 | content: "\f0c9";
743 | }
744 | .fa-list-ul:before {
745 | content: "\f0ca";
746 | }
747 | .fa-list-ol:before {
748 | content: "\f0cb";
749 | }
750 | .fa-strikethrough:before {
751 | content: "\f0cc";
752 | }
753 | .fa-underline:before {
754 | content: "\f0cd";
755 | }
756 | .fa-table:before {
757 | content: "\f0ce";
758 | }
759 | .fa-magic:before {
760 | content: "\f0d0";
761 | }
762 | .fa-truck:before {
763 | content: "\f0d1";
764 | }
765 | .fa-pinterest:before {
766 | content: "\f0d2";
767 | }
768 | .fa-pinterest-square:before {
769 | content: "\f0d3";
770 | }
771 | .fa-google-plus-square:before {
772 | content: "\f0d4";
773 | }
774 | .fa-google-plus:before {
775 | content: "\f0d5";
776 | }
777 | .fa-money:before {
778 | content: "\f0d6";
779 | }
780 | .fa-caret-down:before {
781 | content: "\f0d7";
782 | }
783 | .fa-caret-up:before {
784 | content: "\f0d8";
785 | }
786 | .fa-caret-left:before {
787 | content: "\f0d9";
788 | }
789 | .fa-caret-right:before {
790 | content: "\f0da";
791 | }
792 | .fa-columns:before {
793 | content: "\f0db";
794 | }
795 | .fa-unsorted:before,
796 | .fa-sort:before {
797 | content: "\f0dc";
798 | }
799 | .fa-sort-down:before,
800 | .fa-sort-desc:before {
801 | content: "\f0dd";
802 | }
803 | .fa-sort-up:before,
804 | .fa-sort-asc:before {
805 | content: "\f0de";
806 | }
807 | .fa-envelope:before {
808 | content: "\f0e0";
809 | }
810 | .fa-linkedin:before {
811 | content: "\f0e1";
812 | }
813 | .fa-rotate-left:before,
814 | .fa-undo:before {
815 | content: "\f0e2";
816 | }
817 | .fa-legal:before,
818 | .fa-gavel:before {
819 | content: "\f0e3";
820 | }
821 | .fa-dashboard:before,
822 | .fa-tachometer:before {
823 | content: "\f0e4";
824 | }
825 | .fa-comment-o:before {
826 | content: "\f0e5";
827 | }
828 | .fa-comments-o:before {
829 | content: "\f0e6";
830 | }
831 | .fa-flash:before,
832 | .fa-bolt:before {
833 | content: "\f0e7";
834 | }
835 | .fa-sitemap:before {
836 | content: "\f0e8";
837 | }
838 | .fa-umbrella:before {
839 | content: "\f0e9";
840 | }
841 | .fa-paste:before,
842 | .fa-clipboard:before {
843 | content: "\f0ea";
844 | }
845 | .fa-lightbulb-o:before {
846 | content: "\f0eb";
847 | }
848 | .fa-exchange:before {
849 | content: "\f0ec";
850 | }
851 | .fa-cloud-download:before {
852 | content: "\f0ed";
853 | }
854 | .fa-cloud-upload:before {
855 | content: "\f0ee";
856 | }
857 | .fa-user-md:before {
858 | content: "\f0f0";
859 | }
860 | .fa-stethoscope:before {
861 | content: "\f0f1";
862 | }
863 | .fa-suitcase:before {
864 | content: "\f0f2";
865 | }
866 | .fa-bell-o:before {
867 | content: "\f0a2";
868 | }
869 | .fa-coffee:before {
870 | content: "\f0f4";
871 | }
872 | .fa-cutlery:before {
873 | content: "\f0f5";
874 | }
875 | .fa-file-text-o:before {
876 | content: "\f0f6";
877 | }
878 | .fa-building-o:before {
879 | content: "\f0f7";
880 | }
881 | .fa-hospital-o:before {
882 | content: "\f0f8";
883 | }
884 | .fa-ambulance:before {
885 | content: "\f0f9";
886 | }
887 | .fa-medkit:before {
888 | content: "\f0fa";
889 | }
890 | .fa-fighter-jet:before {
891 | content: "\f0fb";
892 | }
893 | .fa-beer:before {
894 | content: "\f0fc";
895 | }
896 | .fa-h-square:before {
897 | content: "\f0fd";
898 | }
899 | .fa-plus-square:before {
900 | content: "\f0fe";
901 | }
902 | .fa-angle-double-left:before {
903 | content: "\f100";
904 | }
905 | .fa-angle-double-right:before {
906 | content: "\f101";
907 | }
908 | .fa-angle-double-up:before {
909 | content: "\f102";
910 | }
911 | .fa-angle-double-down:before {
912 | content: "\f103";
913 | }
914 | .fa-angle-left:before {
915 | content: "\f104";
916 | }
917 | .fa-angle-right:before {
918 | content: "\f105";
919 | }
920 | .fa-angle-up:before {
921 | content: "\f106";
922 | }
923 | .fa-angle-down:before {
924 | content: "\f107";
925 | }
926 | .fa-desktop:before {
927 | content: "\f108";
928 | }
929 | .fa-laptop:before {
930 | content: "\f109";
931 | }
932 | .fa-tablet:before {
933 | content: "\f10a";
934 | }
935 | .fa-mobile-phone:before,
936 | .fa-mobile:before {
937 | content: "\f10b";
938 | }
939 | .fa-circle-o:before {
940 | content: "\f10c";
941 | }
942 | .fa-quote-left:before {
943 | content: "\f10d";
944 | }
945 | .fa-quote-right:before {
946 | content: "\f10e";
947 | }
948 | .fa-spinner:before {
949 | content: "\f110";
950 | }
951 | .fa-circle:before {
952 | content: "\f111";
953 | }
954 | .fa-mail-reply:before,
955 | .fa-reply:before {
956 | content: "\f112";
957 | }
958 | .fa-github-alt:before {
959 | content: "\f113";
960 | }
961 | .fa-folder-o:before {
962 | content: "\f114";
963 | }
964 | .fa-folder-open-o:before {
965 | content: "\f115";
966 | }
967 | .fa-smile-o:before {
968 | content: "\f118";
969 | }
970 | .fa-frown-o:before {
971 | content: "\f119";
972 | }
973 | .fa-meh-o:before {
974 | content: "\f11a";
975 | }
976 | .fa-gamepad:before {
977 | content: "\f11b";
978 | }
979 | .fa-keyboard-o:before {
980 | content: "\f11c";
981 | }
982 | .fa-flag-o:before {
983 | content: "\f11d";
984 | }
985 | .fa-flag-checkered:before {
986 | content: "\f11e";
987 | }
988 | .fa-terminal:before {
989 | content: "\f120";
990 | }
991 | .fa-code:before {
992 | content: "\f121";
993 | }
994 | .fa-mail-reply-all:before,
995 | .fa-reply-all:before {
996 | content: "\f122";
997 | }
998 | .fa-star-half-empty:before,
999 | .fa-star-half-full:before,
1000 | .fa-star-half-o:before {
1001 | content: "\f123";
1002 | }
1003 | .fa-location-arrow:before {
1004 | content: "\f124";
1005 | }
1006 | .fa-crop:before {
1007 | content: "\f125";
1008 | }
1009 | .fa-code-fork:before {
1010 | content: "\f126";
1011 | }
1012 | .fa-unlink:before,
1013 | .fa-chain-broken:before {
1014 | content: "\f127";
1015 | }
1016 | .fa-question:before {
1017 | content: "\f128";
1018 | }
1019 | .fa-info:before {
1020 | content: "\f129";
1021 | }
1022 | .fa-exclamation:before {
1023 | content: "\f12a";
1024 | }
1025 | .fa-superscript:before {
1026 | content: "\f12b";
1027 | }
1028 | .fa-subscript:before {
1029 | content: "\f12c";
1030 | }
1031 | .fa-eraser:before {
1032 | content: "\f12d";
1033 | }
1034 | .fa-puzzle-piece:before {
1035 | content: "\f12e";
1036 | }
1037 | .fa-microphone:before {
1038 | content: "\f130";
1039 | }
1040 | .fa-microphone-slash:before {
1041 | content: "\f131";
1042 | }
1043 | .fa-shield:before {
1044 | content: "\f132";
1045 | }
1046 | .fa-calendar-o:before {
1047 | content: "\f133";
1048 | }
1049 | .fa-fire-extinguisher:before {
1050 | content: "\f134";
1051 | }
1052 | .fa-rocket:before {
1053 | content: "\f135";
1054 | }
1055 | .fa-maxcdn:before {
1056 | content: "\f136";
1057 | }
1058 | .fa-chevron-circle-left:before {
1059 | content: "\f137";
1060 | }
1061 | .fa-chevron-circle-right:before {
1062 | content: "\f138";
1063 | }
1064 | .fa-chevron-circle-up:before {
1065 | content: "\f139";
1066 | }
1067 | .fa-chevron-circle-down:before {
1068 | content: "\f13a";
1069 | }
1070 | .fa-html5:before {
1071 | content: "\f13b";
1072 | }
1073 | .fa-css3:before {
1074 | content: "\f13c";
1075 | }
1076 | .fa-anchor:before {
1077 | content: "\f13d";
1078 | }
1079 | .fa-unlock-alt:before {
1080 | content: "\f13e";
1081 | }
1082 | .fa-bullseye:before {
1083 | content: "\f140";
1084 | }
1085 | .fa-ellipsis-h:before {
1086 | content: "\f141";
1087 | }
1088 | .fa-ellipsis-v:before {
1089 | content: "\f142";
1090 | }
1091 | .fa-rss-square:before {
1092 | content: "\f143";
1093 | }
1094 | .fa-play-circle:before {
1095 | content: "\f144";
1096 | }
1097 | .fa-ticket:before {
1098 | content: "\f145";
1099 | }
1100 | .fa-minus-square:before {
1101 | content: "\f146";
1102 | }
1103 | .fa-minus-square-o:before {
1104 | content: "\f147";
1105 | }
1106 | .fa-level-up:before {
1107 | content: "\f148";
1108 | }
1109 | .fa-level-down:before {
1110 | content: "\f149";
1111 | }
1112 | .fa-check-square:before {
1113 | content: "\f14a";
1114 | }
1115 | .fa-pencil-square:before {
1116 | content: "\f14b";
1117 | }
1118 | .fa-external-link-square:before {
1119 | content: "\f14c";
1120 | }
1121 | .fa-share-square:before {
1122 | content: "\f14d";
1123 | }
1124 | .fa-compass:before {
1125 | content: "\f14e";
1126 | }
1127 | .fa-toggle-down:before,
1128 | .fa-caret-square-o-down:before {
1129 | content: "\f150";
1130 | }
1131 | .fa-toggle-up:before,
1132 | .fa-caret-square-o-up:before {
1133 | content: "\f151";
1134 | }
1135 | .fa-toggle-right:before,
1136 | .fa-caret-square-o-right:before {
1137 | content: "\f152";
1138 | }
1139 | .fa-euro:before,
1140 | .fa-eur:before {
1141 | content: "\f153";
1142 | }
1143 | .fa-gbp:before {
1144 | content: "\f154";
1145 | }
1146 | .fa-dollar:before,
1147 | .fa-usd:before {
1148 | content: "\f155";
1149 | }
1150 | .fa-rupee:before,
1151 | .fa-inr:before {
1152 | content: "\f156";
1153 | }
1154 | .fa-cny:before,
1155 | .fa-rmb:before,
1156 | .fa-yen:before,
1157 | .fa-jpy:before {
1158 | content: "\f157";
1159 | }
1160 | .fa-ruble:before,
1161 | .fa-rouble:before,
1162 | .fa-rub:before {
1163 | content: "\f158";
1164 | }
1165 | .fa-won:before,
1166 | .fa-krw:before {
1167 | content: "\f159";
1168 | }
1169 | .fa-bitcoin:before,
1170 | .fa-btc:before {
1171 | content: "\f15a";
1172 | }
1173 | .fa-file:before {
1174 | content: "\f15b";
1175 | }
1176 | .fa-file-text:before {
1177 | content: "\f15c";
1178 | }
1179 | .fa-sort-alpha-asc:before {
1180 | content: "\f15d";
1181 | }
1182 | .fa-sort-alpha-desc:before {
1183 | content: "\f15e";
1184 | }
1185 | .fa-sort-amount-asc:before {
1186 | content: "\f160";
1187 | }
1188 | .fa-sort-amount-desc:before {
1189 | content: "\f161";
1190 | }
1191 | .fa-sort-numeric-asc:before {
1192 | content: "\f162";
1193 | }
1194 | .fa-sort-numeric-desc:before {
1195 | content: "\f163";
1196 | }
1197 | .fa-thumbs-up:before {
1198 | content: "\f164";
1199 | }
1200 | .fa-thumbs-down:before {
1201 | content: "\f165";
1202 | }
1203 | .fa-youtube-square:before {
1204 | content: "\f166";
1205 | }
1206 | .fa-youtube:before {
1207 | content: "\f167";
1208 | }
1209 | .fa-xing:before {
1210 | content: "\f168";
1211 | }
1212 | .fa-xing-square:before {
1213 | content: "\f169";
1214 | }
1215 | .fa-youtube-play:before {
1216 | content: "\f16a";
1217 | }
1218 | .fa-dropbox:before {
1219 | content: "\f16b";
1220 | }
1221 | .fa-stack-overflow:before {
1222 | content: "\f16c";
1223 | }
1224 | .fa-instagram:before {
1225 | content: "\f16d";
1226 | }
1227 | .fa-flickr:before {
1228 | content: "\f16e";
1229 | }
1230 | .fa-adn:before {
1231 | content: "\f170";
1232 | }
1233 | .fa-bitbucket:before {
1234 | content: "\f171";
1235 | }
1236 | .fa-bitbucket-square:before {
1237 | content: "\f172";
1238 | }
1239 | .fa-tumblr:before {
1240 | content: "\f173";
1241 | }
1242 | .fa-tumblr-square:before {
1243 | content: "\f174";
1244 | }
1245 | .fa-long-arrow-down:before {
1246 | content: "\f175";
1247 | }
1248 | .fa-long-arrow-up:before {
1249 | content: "\f176";
1250 | }
1251 | .fa-long-arrow-left:before {
1252 | content: "\f177";
1253 | }
1254 | .fa-long-arrow-right:before {
1255 | content: "\f178";
1256 | }
1257 | .fa-apple:before {
1258 | content: "\f179";
1259 | }
1260 | .fa-windows:before {
1261 | content: "\f17a";
1262 | }
1263 | .fa-android:before {
1264 | content: "\f17b";
1265 | }
1266 | .fa-linux:before {
1267 | content: "\f17c";
1268 | }
1269 | .fa-dribbble:before {
1270 | content: "\f17d";
1271 | }
1272 | .fa-skype:before {
1273 | content: "\f17e";
1274 | }
1275 | .fa-foursquare:before {
1276 | content: "\f180";
1277 | }
1278 | .fa-trello:before {
1279 | content: "\f181";
1280 | }
1281 | .fa-female:before {
1282 | content: "\f182";
1283 | }
1284 | .fa-male:before {
1285 | content: "\f183";
1286 | }
1287 | .fa-gittip:before,
1288 | .fa-gratipay:before {
1289 | content: "\f184";
1290 | }
1291 | .fa-sun-o:before {
1292 | content: "\f185";
1293 | }
1294 | .fa-moon-o:before {
1295 | content: "\f186";
1296 | }
1297 | .fa-archive:before {
1298 | content: "\f187";
1299 | }
1300 | .fa-bug:before {
1301 | content: "\f188";
1302 | }
1303 | .fa-vk:before {
1304 | content: "\f189";
1305 | }
1306 | .fa-weibo:before {
1307 | content: "\f18a";
1308 | }
1309 | .fa-renren:before {
1310 | content: "\f18b";
1311 | }
1312 | .fa-pagelines:before {
1313 | content: "\f18c";
1314 | }
1315 | .fa-stack-exchange:before {
1316 | content: "\f18d";
1317 | }
1318 | .fa-arrow-circle-o-right:before {
1319 | content: "\f18e";
1320 | }
1321 | .fa-arrow-circle-o-left:before {
1322 | content: "\f190";
1323 | }
1324 | .fa-toggle-left:before,
1325 | .fa-caret-square-o-left:before {
1326 | content: "\f191";
1327 | }
1328 | .fa-dot-circle-o:before {
1329 | content: "\f192";
1330 | }
1331 | .fa-wheelchair:before {
1332 | content: "\f193";
1333 | }
1334 | .fa-vimeo-square:before {
1335 | content: "\f194";
1336 | }
1337 | .fa-turkish-lira:before,
1338 | .fa-try:before {
1339 | content: "\f195";
1340 | }
1341 | .fa-plus-square-o:before {
1342 | content: "\f196";
1343 | }
1344 | .fa-space-shuttle:before {
1345 | content: "\f197";
1346 | }
1347 | .fa-slack:before {
1348 | content: "\f198";
1349 | }
1350 | .fa-envelope-square:before {
1351 | content: "\f199";
1352 | }
1353 | .fa-wordpress:before {
1354 | content: "\f19a";
1355 | }
1356 | .fa-openid:before {
1357 | content: "\f19b";
1358 | }
1359 | .fa-institution:before,
1360 | .fa-bank:before,
1361 | .fa-university:before {
1362 | content: "\f19c";
1363 | }
1364 | .fa-mortar-board:before,
1365 | .fa-graduation-cap:before {
1366 | content: "\f19d";
1367 | }
1368 | .fa-yahoo:before {
1369 | content: "\f19e";
1370 | }
1371 | .fa-google:before {
1372 | content: "\f1a0";
1373 | }
1374 | .fa-reddit:before {
1375 | content: "\f1a1";
1376 | }
1377 | .fa-reddit-square:before {
1378 | content: "\f1a2";
1379 | }
1380 | .fa-stumbleupon-circle:before {
1381 | content: "\f1a3";
1382 | }
1383 | .fa-stumbleupon:before {
1384 | content: "\f1a4";
1385 | }
1386 | .fa-delicious:before {
1387 | content: "\f1a5";
1388 | }
1389 | .fa-digg:before {
1390 | content: "\f1a6";
1391 | }
1392 | .fa-pied-piper-pp:before {
1393 | content: "\f1a7";
1394 | }
1395 | .fa-pied-piper-alt:before {
1396 | content: "\f1a8";
1397 | }
1398 | .fa-drupal:before {
1399 | content: "\f1a9";
1400 | }
1401 | .fa-joomla:before {
1402 | content: "\f1aa";
1403 | }
1404 | .fa-language:before {
1405 | content: "\f1ab";
1406 | }
1407 | .fa-fax:before {
1408 | content: "\f1ac";
1409 | }
1410 | .fa-building:before {
1411 | content: "\f1ad";
1412 | }
1413 | .fa-child:before {
1414 | content: "\f1ae";
1415 | }
1416 | .fa-paw:before {
1417 | content: "\f1b0";
1418 | }
1419 | .fa-spoon:before {
1420 | content: "\f1b1";
1421 | }
1422 | .fa-cube:before {
1423 | content: "\f1b2";
1424 | }
1425 | .fa-cubes:before {
1426 | content: "\f1b3";
1427 | }
1428 | .fa-behance:before {
1429 | content: "\f1b4";
1430 | }
1431 | .fa-behance-square:before {
1432 | content: "\f1b5";
1433 | }
1434 | .fa-steam:before {
1435 | content: "\f1b6";
1436 | }
1437 | .fa-steam-square:before {
1438 | content: "\f1b7";
1439 | }
1440 | .fa-recycle:before {
1441 | content: "\f1b8";
1442 | }
1443 | .fa-automobile:before,
1444 | .fa-car:before {
1445 | content: "\f1b9";
1446 | }
1447 | .fa-cab:before,
1448 | .fa-taxi:before {
1449 | content: "\f1ba";
1450 | }
1451 | .fa-tree:before {
1452 | content: "\f1bb";
1453 | }
1454 | .fa-spotify:before {
1455 | content: "\f1bc";
1456 | }
1457 | .fa-deviantart:before {
1458 | content: "\f1bd";
1459 | }
1460 | .fa-soundcloud:before {
1461 | content: "\f1be";
1462 | }
1463 | .fa-database:before {
1464 | content: "\f1c0";
1465 | }
1466 | .fa-file-pdf-o:before {
1467 | content: "\f1c1";
1468 | }
1469 | .fa-file-word-o:before {
1470 | content: "\f1c2";
1471 | }
1472 | .fa-file-excel-o:before {
1473 | content: "\f1c3";
1474 | }
1475 | .fa-file-powerpoint-o:before {
1476 | content: "\f1c4";
1477 | }
1478 | .fa-file-photo-o:before,
1479 | .fa-file-picture-o:before,
1480 | .fa-file-image-o:before {
1481 | content: "\f1c5";
1482 | }
1483 | .fa-file-zip-o:before,
1484 | .fa-file-archive-o:before {
1485 | content: "\f1c6";
1486 | }
1487 | .fa-file-sound-o:before,
1488 | .fa-file-audio-o:before {
1489 | content: "\f1c7";
1490 | }
1491 | .fa-file-movie-o:before,
1492 | .fa-file-video-o:before {
1493 | content: "\f1c8";
1494 | }
1495 | .fa-file-code-o:before {
1496 | content: "\f1c9";
1497 | }
1498 | .fa-vine:before {
1499 | content: "\f1ca";
1500 | }
1501 | .fa-codepen:before {
1502 | content: "\f1cb";
1503 | }
1504 | .fa-jsfiddle:before {
1505 | content: "\f1cc";
1506 | }
1507 | .fa-life-bouy:before,
1508 | .fa-life-buoy:before,
1509 | .fa-life-saver:before,
1510 | .fa-support:before,
1511 | .fa-life-ring:before {
1512 | content: "\f1cd";
1513 | }
1514 | .fa-circle-o-notch:before {
1515 | content: "\f1ce";
1516 | }
1517 | .fa-ra:before,
1518 | .fa-resistance:before,
1519 | .fa-rebel:before {
1520 | content: "\f1d0";
1521 | }
1522 | .fa-ge:before,
1523 | .fa-empire:before {
1524 | content: "\f1d1";
1525 | }
1526 | .fa-git-square:before {
1527 | content: "\f1d2";
1528 | }
1529 | .fa-git:before {
1530 | content: "\f1d3";
1531 | }
1532 | .fa-y-combinator-square:before,
1533 | .fa-yc-square:before,
1534 | .fa-hacker-news:before {
1535 | content: "\f1d4";
1536 | }
1537 | .fa-tencent-weibo:before {
1538 | content: "\f1d5";
1539 | }
1540 | .fa-qq:before {
1541 | content: "\f1d6";
1542 | }
1543 | .fa-wechat:before,
1544 | .fa-weixin:before {
1545 | content: "\f1d7";
1546 | }
1547 | .fa-send:before,
1548 | .fa-paper-plane:before {
1549 | content: "\f1d8";
1550 | }
1551 | .fa-send-o:before,
1552 | .fa-paper-plane-o:before {
1553 | content: "\f1d9";
1554 | }
1555 | .fa-history:before {
1556 | content: "\f1da";
1557 | }
1558 | .fa-circle-thin:before {
1559 | content: "\f1db";
1560 | }
1561 | .fa-header:before {
1562 | content: "\f1dc";
1563 | }
1564 | .fa-paragraph:before {
1565 | content: "\f1dd";
1566 | }
1567 | .fa-sliders:before {
1568 | content: "\f1de";
1569 | }
1570 | .fa-share-alt:before {
1571 | content: "\f1e0";
1572 | }
1573 | .fa-share-alt-square:before {
1574 | content: "\f1e1";
1575 | }
1576 | .fa-bomb:before {
1577 | content: "\f1e2";
1578 | }
1579 | .fa-soccer-ball-o:before,
1580 | .fa-futbol-o:before {
1581 | content: "\f1e3";
1582 | }
1583 | .fa-tty:before {
1584 | content: "\f1e4";
1585 | }
1586 | .fa-binoculars:before {
1587 | content: "\f1e5";
1588 | }
1589 | .fa-plug:before {
1590 | content: "\f1e6";
1591 | }
1592 | .fa-slideshare:before {
1593 | content: "\f1e7";
1594 | }
1595 | .fa-twitch:before {
1596 | content: "\f1e8";
1597 | }
1598 | .fa-yelp:before {
1599 | content: "\f1e9";
1600 | }
1601 | .fa-newspaper-o:before {
1602 | content: "\f1ea";
1603 | }
1604 | .fa-wifi:before {
1605 | content: "\f1eb";
1606 | }
1607 | .fa-calculator:before {
1608 | content: "\f1ec";
1609 | }
1610 | .fa-paypal:before {
1611 | content: "\f1ed";
1612 | }
1613 | .fa-google-wallet:before {
1614 | content: "\f1ee";
1615 | }
1616 | .fa-cc-visa:before {
1617 | content: "\f1f0";
1618 | }
1619 | .fa-cc-mastercard:before {
1620 | content: "\f1f1";
1621 | }
1622 | .fa-cc-discover:before {
1623 | content: "\f1f2";
1624 | }
1625 | .fa-cc-amex:before {
1626 | content: "\f1f3";
1627 | }
1628 | .fa-cc-paypal:before {
1629 | content: "\f1f4";
1630 | }
1631 | .fa-cc-stripe:before {
1632 | content: "\f1f5";
1633 | }
1634 | .fa-bell-slash:before {
1635 | content: "\f1f6";
1636 | }
1637 | .fa-bell-slash-o:before {
1638 | content: "\f1f7";
1639 | }
1640 | .fa-trash:before {
1641 | content: "\f1f8";
1642 | }
1643 | .fa-copyright:before {
1644 | content: "\f1f9";
1645 | }
1646 | .fa-at:before {
1647 | content: "\f1fa";
1648 | }
1649 | .fa-eyedropper:before {
1650 | content: "\f1fb";
1651 | }
1652 | .fa-paint-brush:before {
1653 | content: "\f1fc";
1654 | }
1655 | .fa-birthday-cake:before {
1656 | content: "\f1fd";
1657 | }
1658 | .fa-area-chart:before {
1659 | content: "\f1fe";
1660 | }
1661 | .fa-pie-chart:before {
1662 | content: "\f200";
1663 | }
1664 | .fa-line-chart:before {
1665 | content: "\f201";
1666 | }
1667 | .fa-lastfm:before {
1668 | content: "\f202";
1669 | }
1670 | .fa-lastfm-square:before {
1671 | content: "\f203";
1672 | }
1673 | .fa-toggle-off:before {
1674 | content: "\f204";
1675 | }
1676 | .fa-toggle-on:before {
1677 | content: "\f205";
1678 | }
1679 | .fa-bicycle:before {
1680 | content: "\f206";
1681 | }
1682 | .fa-bus:before {
1683 | content: "\f207";
1684 | }
1685 | .fa-ioxhost:before {
1686 | content: "\f208";
1687 | }
1688 | .fa-angellist:before {
1689 | content: "\f209";
1690 | }
1691 | .fa-cc:before {
1692 | content: "\f20a";
1693 | }
1694 | .fa-shekel:before,
1695 | .fa-sheqel:before,
1696 | .fa-ils:before {
1697 | content: "\f20b";
1698 | }
1699 | .fa-meanpath:before {
1700 | content: "\f20c";
1701 | }
1702 | .fa-buysellads:before {
1703 | content: "\f20d";
1704 | }
1705 | .fa-connectdevelop:before {
1706 | content: "\f20e";
1707 | }
1708 | .fa-dashcube:before {
1709 | content: "\f210";
1710 | }
1711 | .fa-forumbee:before {
1712 | content: "\f211";
1713 | }
1714 | .fa-leanpub:before {
1715 | content: "\f212";
1716 | }
1717 | .fa-sellsy:before {
1718 | content: "\f213";
1719 | }
1720 | .fa-shirtsinbulk:before {
1721 | content: "\f214";
1722 | }
1723 | .fa-simplybuilt:before {
1724 | content: "\f215";
1725 | }
1726 | .fa-skyatlas:before {
1727 | content: "\f216";
1728 | }
1729 | .fa-cart-plus:before {
1730 | content: "\f217";
1731 | }
1732 | .fa-cart-arrow-down:before {
1733 | content: "\f218";
1734 | }
1735 | .fa-diamond:before {
1736 | content: "\f219";
1737 | }
1738 | .fa-ship:before {
1739 | content: "\f21a";
1740 | }
1741 | .fa-user-secret:before {
1742 | content: "\f21b";
1743 | }
1744 | .fa-motorcycle:before {
1745 | content: "\f21c";
1746 | }
1747 | .fa-street-view:before {
1748 | content: "\f21d";
1749 | }
1750 | .fa-heartbeat:before {
1751 | content: "\f21e";
1752 | }
1753 | .fa-venus:before {
1754 | content: "\f221";
1755 | }
1756 | .fa-mars:before {
1757 | content: "\f222";
1758 | }
1759 | .fa-mercury:before {
1760 | content: "\f223";
1761 | }
1762 | .fa-intersex:before,
1763 | .fa-transgender:before {
1764 | content: "\f224";
1765 | }
1766 | .fa-transgender-alt:before {
1767 | content: "\f225";
1768 | }
1769 | .fa-venus-double:before {
1770 | content: "\f226";
1771 | }
1772 | .fa-mars-double:before {
1773 | content: "\f227";
1774 | }
1775 | .fa-venus-mars:before {
1776 | content: "\f228";
1777 | }
1778 | .fa-mars-stroke:before {
1779 | content: "\f229";
1780 | }
1781 | .fa-mars-stroke-v:before {
1782 | content: "\f22a";
1783 | }
1784 | .fa-mars-stroke-h:before {
1785 | content: "\f22b";
1786 | }
1787 | .fa-neuter:before {
1788 | content: "\f22c";
1789 | }
1790 | .fa-genderless:before {
1791 | content: "\f22d";
1792 | }
1793 | .fa-facebook-official:before {
1794 | content: "\f230";
1795 | }
1796 | .fa-pinterest-p:before {
1797 | content: "\f231";
1798 | }
1799 | .fa-whatsapp:before {
1800 | content: "\f232";
1801 | }
1802 | .fa-server:before {
1803 | content: "\f233";
1804 | }
1805 | .fa-user-plus:before {
1806 | content: "\f234";
1807 | }
1808 | .fa-user-times:before {
1809 | content: "\f235";
1810 | }
1811 | .fa-hotel:before,
1812 | .fa-bed:before {
1813 | content: "\f236";
1814 | }
1815 | .fa-viacoin:before {
1816 | content: "\f237";
1817 | }
1818 | .fa-train:before {
1819 | content: "\f238";
1820 | }
1821 | .fa-subway:before {
1822 | content: "\f239";
1823 | }
1824 | .fa-medium:before {
1825 | content: "\f23a";
1826 | }
1827 | .fa-yc:before,
1828 | .fa-y-combinator:before {
1829 | content: "\f23b";
1830 | }
1831 | .fa-optin-monster:before {
1832 | content: "\f23c";
1833 | }
1834 | .fa-opencart:before {
1835 | content: "\f23d";
1836 | }
1837 | .fa-expeditedssl:before {
1838 | content: "\f23e";
1839 | }
1840 | .fa-battery-4:before,
1841 | .fa-battery:before,
1842 | .fa-battery-full:before {
1843 | content: "\f240";
1844 | }
1845 | .fa-battery-3:before,
1846 | .fa-battery-three-quarters:before {
1847 | content: "\f241";
1848 | }
1849 | .fa-battery-2:before,
1850 | .fa-battery-half:before {
1851 | content: "\f242";
1852 | }
1853 | .fa-battery-1:before,
1854 | .fa-battery-quarter:before {
1855 | content: "\f243";
1856 | }
1857 | .fa-battery-0:before,
1858 | .fa-battery-empty:before {
1859 | content: "\f244";
1860 | }
1861 | .fa-mouse-pointer:before {
1862 | content: "\f245";
1863 | }
1864 | .fa-i-cursor:before {
1865 | content: "\f246";
1866 | }
1867 | .fa-object-group:before {
1868 | content: "\f247";
1869 | }
1870 | .fa-object-ungroup:before {
1871 | content: "\f248";
1872 | }
1873 | .fa-sticky-note:before {
1874 | content: "\f249";
1875 | }
1876 | .fa-sticky-note-o:before {
1877 | content: "\f24a";
1878 | }
1879 | .fa-cc-jcb:before {
1880 | content: "\f24b";
1881 | }
1882 | .fa-cc-diners-club:before {
1883 | content: "\f24c";
1884 | }
1885 | .fa-clone:before {
1886 | content: "\f24d";
1887 | }
1888 | .fa-balance-scale:before {
1889 | content: "\f24e";
1890 | }
1891 | .fa-hourglass-o:before {
1892 | content: "\f250";
1893 | }
1894 | .fa-hourglass-1:before,
1895 | .fa-hourglass-start:before {
1896 | content: "\f251";
1897 | }
1898 | .fa-hourglass-2:before,
1899 | .fa-hourglass-half:before {
1900 | content: "\f252";
1901 | }
1902 | .fa-hourglass-3:before,
1903 | .fa-hourglass-end:before {
1904 | content: "\f253";
1905 | }
1906 | .fa-hourglass:before {
1907 | content: "\f254";
1908 | }
1909 | .fa-hand-grab-o:before,
1910 | .fa-hand-rock-o:before {
1911 | content: "\f255";
1912 | }
1913 | .fa-hand-stop-o:before,
1914 | .fa-hand-paper-o:before {
1915 | content: "\f256";
1916 | }
1917 | .fa-hand-scissors-o:before {
1918 | content: "\f257";
1919 | }
1920 | .fa-hand-lizard-o:before {
1921 | content: "\f258";
1922 | }
1923 | .fa-hand-spock-o:before {
1924 | content: "\f259";
1925 | }
1926 | .fa-hand-pointer-o:before {
1927 | content: "\f25a";
1928 | }
1929 | .fa-hand-peace-o:before {
1930 | content: "\f25b";
1931 | }
1932 | .fa-trademark:before {
1933 | content: "\f25c";
1934 | }
1935 | .fa-registered:before {
1936 | content: "\f25d";
1937 | }
1938 | .fa-creative-commons:before {
1939 | content: "\f25e";
1940 | }
1941 | .fa-gg:before {
1942 | content: "\f260";
1943 | }
1944 | .fa-gg-circle:before {
1945 | content: "\f261";
1946 | }
1947 | .fa-tripadvisor:before {
1948 | content: "\f262";
1949 | }
1950 | .fa-odnoklassniki:before {
1951 | content: "\f263";
1952 | }
1953 | .fa-odnoklassniki-square:before {
1954 | content: "\f264";
1955 | }
1956 | .fa-get-pocket:before {
1957 | content: "\f265";
1958 | }
1959 | .fa-wikipedia-w:before {
1960 | content: "\f266";
1961 | }
1962 | .fa-safari:before {
1963 | content: "\f267";
1964 | }
1965 | .fa-chrome:before {
1966 | content: "\f268";
1967 | }
1968 | .fa-firefox:before {
1969 | content: "\f269";
1970 | }
1971 | .fa-opera:before {
1972 | content: "\f26a";
1973 | }
1974 | .fa-internet-explorer:before {
1975 | content: "\f26b";
1976 | }
1977 | .fa-tv:before,
1978 | .fa-television:before {
1979 | content: "\f26c";
1980 | }
1981 | .fa-contao:before {
1982 | content: "\f26d";
1983 | }
1984 | .fa-500px:before {
1985 | content: "\f26e";
1986 | }
1987 | .fa-amazon:before {
1988 | content: "\f270";
1989 | }
1990 | .fa-calendar-plus-o:before {
1991 | content: "\f271";
1992 | }
1993 | .fa-calendar-minus-o:before {
1994 | content: "\f272";
1995 | }
1996 | .fa-calendar-times-o:before {
1997 | content: "\f273";
1998 | }
1999 | .fa-calendar-check-o:before {
2000 | content: "\f274";
2001 | }
2002 | .fa-industry:before {
2003 | content: "\f275";
2004 | }
2005 | .fa-map-pin:before {
2006 | content: "\f276";
2007 | }
2008 | .fa-map-signs:before {
2009 | content: "\f277";
2010 | }
2011 | .fa-map-o:before {
2012 | content: "\f278";
2013 | }
2014 | .fa-map:before {
2015 | content: "\f279";
2016 | }
2017 | .fa-commenting:before {
2018 | content: "\f27a";
2019 | }
2020 | .fa-commenting-o:before {
2021 | content: "\f27b";
2022 | }
2023 | .fa-houzz:before {
2024 | content: "\f27c";
2025 | }
2026 | .fa-vimeo:before {
2027 | content: "\f27d";
2028 | }
2029 | .fa-black-tie:before {
2030 | content: "\f27e";
2031 | }
2032 | .fa-fonticons:before {
2033 | content: "\f280";
2034 | }
2035 | .fa-reddit-alien:before {
2036 | content: "\f281";
2037 | }
2038 | .fa-edge:before {
2039 | content: "\f282";
2040 | }
2041 | .fa-credit-card-alt:before {
2042 | content: "\f283";
2043 | }
2044 | .fa-codiepie:before {
2045 | content: "\f284";
2046 | }
2047 | .fa-modx:before {
2048 | content: "\f285";
2049 | }
2050 | .fa-fort-awesome:before {
2051 | content: "\f286";
2052 | }
2053 | .fa-usb:before {
2054 | content: "\f287";
2055 | }
2056 | .fa-product-hunt:before {
2057 | content: "\f288";
2058 | }
2059 | .fa-mixcloud:before {
2060 | content: "\f289";
2061 | }
2062 | .fa-scribd:before {
2063 | content: "\f28a";
2064 | }
2065 | .fa-pause-circle:before {
2066 | content: "\f28b";
2067 | }
2068 | .fa-pause-circle-o:before {
2069 | content: "\f28c";
2070 | }
2071 | .fa-stop-circle:before {
2072 | content: "\f28d";
2073 | }
2074 | .fa-stop-circle-o:before {
2075 | content: "\f28e";
2076 | }
2077 | .fa-shopping-bag:before {
2078 | content: "\f290";
2079 | }
2080 | .fa-shopping-basket:before {
2081 | content: "\f291";
2082 | }
2083 | .fa-hashtag:before {
2084 | content: "\f292";
2085 | }
2086 | .fa-bluetooth:before {
2087 | content: "\f293";
2088 | }
2089 | .fa-bluetooth-b:before {
2090 | content: "\f294";
2091 | }
2092 | .fa-percent:before {
2093 | content: "\f295";
2094 | }
2095 | .fa-gitlab:before {
2096 | content: "\f296";
2097 | }
2098 | .fa-wpbeginner:before {
2099 | content: "\f297";
2100 | }
2101 | .fa-wpforms:before {
2102 | content: "\f298";
2103 | }
2104 | .fa-envira:before {
2105 | content: "\f299";
2106 | }
2107 | .fa-universal-access:before {
2108 | content: "\f29a";
2109 | }
2110 | .fa-wheelchair-alt:before {
2111 | content: "\f29b";
2112 | }
2113 | .fa-question-circle-o:before {
2114 | content: "\f29c";
2115 | }
2116 | .fa-blind:before {
2117 | content: "\f29d";
2118 | }
2119 | .fa-audio-description:before {
2120 | content: "\f29e";
2121 | }
2122 | .fa-volume-control-phone:before {
2123 | content: "\f2a0";
2124 | }
2125 | .fa-braille:before {
2126 | content: "\f2a1";
2127 | }
2128 | .fa-assistive-listening-systems:before {
2129 | content: "\f2a2";
2130 | }
2131 | .fa-asl-interpreting:before,
2132 | .fa-american-sign-language-interpreting:before {
2133 | content: "\f2a3";
2134 | }
2135 | .fa-deafness:before,
2136 | .fa-hard-of-hearing:before,
2137 | .fa-deaf:before {
2138 | content: "\f2a4";
2139 | }
2140 | .fa-glide:before {
2141 | content: "\f2a5";
2142 | }
2143 | .fa-glide-g:before {
2144 | content: "\f2a6";
2145 | }
2146 | .fa-signing:before,
2147 | .fa-sign-language:before {
2148 | content: "\f2a7";
2149 | }
2150 | .fa-low-vision:before {
2151 | content: "\f2a8";
2152 | }
2153 | .fa-viadeo:before {
2154 | content: "\f2a9";
2155 | }
2156 | .fa-viadeo-square:before {
2157 | content: "\f2aa";
2158 | }
2159 | .fa-snapchat:before {
2160 | content: "\f2ab";
2161 | }
2162 | .fa-snapchat-ghost:before {
2163 | content: "\f2ac";
2164 | }
2165 | .fa-snapchat-square:before {
2166 | content: "\f2ad";
2167 | }
2168 | .fa-pied-piper:before {
2169 | content: "\f2ae";
2170 | }
2171 | .fa-first-order:before {
2172 | content: "\f2b0";
2173 | }
2174 | .fa-yoast:before {
2175 | content: "\f2b1";
2176 | }
2177 | .fa-themeisle:before {
2178 | content: "\f2b2";
2179 | }
2180 | .fa-google-plus-circle:before,
2181 | .fa-google-plus-official:before {
2182 | content: "\f2b3";
2183 | }
2184 | .fa-fa:before,
2185 | .fa-font-awesome:before {
2186 | content: "\f2b4";
2187 | }
2188 | .fa-handshake-o:before {
2189 | content: "\f2b5";
2190 | }
2191 | .fa-envelope-open:before {
2192 | content: "\f2b6";
2193 | }
2194 | .fa-envelope-open-o:before {
2195 | content: "\f2b7";
2196 | }
2197 | .fa-linode:before {
2198 | content: "\f2b8";
2199 | }
2200 | .fa-address-book:before {
2201 | content: "\f2b9";
2202 | }
2203 | .fa-address-book-o:before {
2204 | content: "\f2ba";
2205 | }
2206 | .fa-vcard:before,
2207 | .fa-address-card:before {
2208 | content: "\f2bb";
2209 | }
2210 | .fa-vcard-o:before,
2211 | .fa-address-card-o:before {
2212 | content: "\f2bc";
2213 | }
2214 | .fa-user-circle:before {
2215 | content: "\f2bd";
2216 | }
2217 | .fa-user-circle-o:before {
2218 | content: "\f2be";
2219 | }
2220 | .fa-user-o:before {
2221 | content: "\f2c0";
2222 | }
2223 | .fa-id-badge:before {
2224 | content: "\f2c1";
2225 | }
2226 | .fa-drivers-license:before,
2227 | .fa-id-card:before {
2228 | content: "\f2c2";
2229 | }
2230 | .fa-drivers-license-o:before,
2231 | .fa-id-card-o:before {
2232 | content: "\f2c3";
2233 | }
2234 | .fa-quora:before {
2235 | content: "\f2c4";
2236 | }
2237 | .fa-free-code-camp:before {
2238 | content: "\f2c5";
2239 | }
2240 | .fa-telegram:before {
2241 | content: "\f2c6";
2242 | }
2243 | .fa-thermometer-4:before,
2244 | .fa-thermometer:before,
2245 | .fa-thermometer-full:before {
2246 | content: "\f2c7";
2247 | }
2248 | .fa-thermometer-3:before,
2249 | .fa-thermometer-three-quarters:before {
2250 | content: "\f2c8";
2251 | }
2252 | .fa-thermometer-2:before,
2253 | .fa-thermometer-half:before {
2254 | content: "\f2c9";
2255 | }
2256 | .fa-thermometer-1:before,
2257 | .fa-thermometer-quarter:before {
2258 | content: "\f2ca";
2259 | }
2260 | .fa-thermometer-0:before,
2261 | .fa-thermometer-empty:before {
2262 | content: "\f2cb";
2263 | }
2264 | .fa-shower:before {
2265 | content: "\f2cc";
2266 | }
2267 | .fa-bathtub:before,
2268 | .fa-s15:before,
2269 | .fa-bath:before {
2270 | content: "\f2cd";
2271 | }
2272 | .fa-podcast:before {
2273 | content: "\f2ce";
2274 | }
2275 | .fa-window-maximize:before {
2276 | content: "\f2d0";
2277 | }
2278 | .fa-window-minimize:before {
2279 | content: "\f2d1";
2280 | }
2281 | .fa-window-restore:before {
2282 | content: "\f2d2";
2283 | }
2284 | .fa-times-rectangle:before,
2285 | .fa-window-close:before {
2286 | content: "\f2d3";
2287 | }
2288 | .fa-times-rectangle-o:before,
2289 | .fa-window-close-o:before {
2290 | content: "\f2d4";
2291 | }
2292 | .fa-bandcamp:before {
2293 | content: "\f2d5";
2294 | }
2295 | .fa-grav:before {
2296 | content: "\f2d6";
2297 | }
2298 | .fa-etsy:before {
2299 | content: "\f2d7";
2300 | }
2301 | .fa-imdb:before {
2302 | content: "\f2d8";
2303 | }
2304 | .fa-ravelry:before {
2305 | content: "\f2d9";
2306 | }
2307 | .fa-eercast:before {
2308 | content: "\f2da";
2309 | }
2310 | .fa-microchip:before {
2311 | content: "\f2db";
2312 | }
2313 | .fa-snowflake-o:before {
2314 | content: "\f2dc";
2315 | }
2316 | .fa-superpowers:before {
2317 | content: "\f2dd";
2318 | }
2319 | .fa-wpexplorer:before {
2320 | content: "\f2de";
2321 | }
2322 | .fa-meetup:before {
2323 | content: "\f2e0";
2324 | }
2325 | .sr-only {
2326 | position: absolute;
2327 | width: 1px;
2328 | height: 1px;
2329 | padding: 0;
2330 | margin: -1px;
2331 | overflow: hidden;
2332 | clip: rect(0, 0, 0, 0);
2333 | border: 0;
2334 | }
2335 | .sr-only-focusable:active,
2336 | .sr-only-focusable:focus {
2337 | position: static;
2338 | width: auto;
2339 | height: auto;
2340 | margin: 0;
2341 | overflow: visible;
2342 | clip: auto;
2343 | }
2344 |
--------------------------------------------------------------------------------
/02-bilibiili/typings/wx.d.ts:
--------------------------------------------------------------------------------
1 | // generate time:2017-08-23 21:12:06
2 | // Type definitions for wx app
3 | // Definitions by: hellopao
4 |
5 | /************************************************
6 | * *
7 | * 微信小程序 API *
8 | * *
9 | ************************************************/
10 |
11 | interface IAnimation {
12 | /**
13 | * 透明度,参数范围 0~1
14 | */
15 | opacity(value: number): IAnimation;
16 | /**
17 | * 颜色值
18 | */
19 | backgroundColor(color: string): IAnimation;
20 | /**
21 | * 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值
22 | */
23 | width(length: number): IAnimation;
24 | /**
25 | * 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值
26 | */
27 | height(length: number): IAnimation;
28 | /**
29 | * 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值
30 | */
31 | top(length: number): IAnimation;
32 | /**
33 | * 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值
34 | */
35 | left(length: number): IAnimation;
36 | /**
37 | * 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值
38 | */
39 | bottom(length: number): IAnimation;
40 | /**
41 | * 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值
42 | */
43 | right(length: number): IAnimation;
44 | /**
45 | * deg的范围-180~180,从原点顺时针旋转一个deg角度
46 | */
47 | rotate(deg: number): IAnimation;
48 | /**
49 | * deg的范围-180~180,在X轴旋转一个deg角度
50 | */
51 | rotateX(deg: number): IAnimation;
52 | /**
53 | * deg的范围-180~180,在Y轴旋转一个deg角度
54 | */
55 | rotateY(deg: number): IAnimation;
56 | /**
57 | * deg的范围-180~180,在Z轴旋转一个deg角度
58 | */
59 | rotateZ(deg: number): IAnimation;
60 | /**
61 | * 同transform-function rotate3d
62 | */
63 | rotate3d(x: number, y: number, z: number, deg: number): IAnimation;
64 | /**
65 | * 一个参数时,表示在X轴、Y轴同时缩放sx倍数;两个参数时表示在X轴缩放sx倍数,在Y轴缩放sy倍数
66 | */
67 | scale(sx: number, sy?: number): IAnimation;
68 | /**
69 | * 在X轴缩放sx倍数
70 | */
71 | scaleX(sx: number): IAnimation;
72 | /**
73 | * 在Y轴缩放sy倍数
74 | */
75 | scaleY(sy: number): IAnimation;
76 | /**
77 | * 在Z轴缩放sy倍数
78 | */
79 | scaleZ(sz: number): IAnimation;
80 | /**
81 | * 在X轴缩放sx倍数,在Y轴缩放sy倍数,在Z轴缩放sz倍数
82 | */
83 | scale3d(sx: number, sy: number, sz: number): IAnimation;
84 | /**
85 | * 一个参数时,表示在X轴偏移tx,单位px;两个参数时,表示在X轴偏移tx,在Y轴偏移ty,单位px。
86 | */
87 | translate(tx: number, ty?: number): IAnimation;
88 | /**
89 | * 在X轴偏移tx,单位px
90 | */
91 | translateX(tx: number): IAnimation;
92 | /**
93 | * 在Y轴偏移tx,单位px
94 | */
95 | translateY(tx: number): IAnimation;
96 | /**
97 | * 在Z轴偏移tx,单位px
98 | */
99 | translateZ(tx: number): IAnimation;
100 | /**
101 | * 在X轴偏移tx,在Y轴偏移ty,在Z轴偏移tz,单位px
102 | */
103 | translate3d(tx: number, ty: number, tz: number): IAnimation;
104 | /**
105 | * 参数范围-180~180;一个参数时,Y轴坐标不变,X轴坐标延顺时针倾斜ax度;两个参数时,分别在X轴倾斜ax度,在Y轴倾斜ay度
106 | */
107 | skew(ax: number, ay?: number): IAnimation;
108 | /**
109 | * 参数范围-180~180;Y轴坐标不变,X轴坐标延顺时针倾斜ax度
110 | */
111 | skewX(ax: number): IAnimation;
112 | /**
113 | * 参数范围-180~180;X轴坐标不变,Y轴坐标延顺时针倾斜ay度
114 | */
115 | skewY(ay: number): IAnimation;
116 | /**
117 | * 同transform-function matrix
118 | */
119 | matrix(a, b, c, d, tx, ty): IAnimation;
120 | /**
121 | * 同transform-function matrix3d
122 | */
123 | matrix3d(): IAnimation;
124 | }
125 |
126 | interface ICanvasContext {
127 | /**
128 | * 设置填充色, 如果没有设置 fillStyle,默认颜色为 black。
129 | */
130 | setFillStyle(color: string): void;
131 | /**
132 | * 设置边框颜色, 如果没有设置 fillStyle,默认颜色为 black。
133 | */
134 | setStrokeStyle(color: string): void;
135 | /**
136 | * 设置阴影
137 | */
138 | setShadow(offsetX: number, offsetY: number, blur: number, color: string): void;
139 | /**
140 | * 创建一个线性的渐变颜色。需要使用 addColorStop() 来指定渐变点,至少要两个。
141 | */
142 | createLinearGradient(x0: number, y0: number, x1: number, y1: number): void;
143 | /**
144 | * 创建一个圆形的渐变颜色。 起点在圆心,终点在圆环。 需要使用 addColorStop() 来指定渐变点,至少要两个。
145 | */
146 | createCircularGradient(x: number, y: number, r: number): void;
147 | /**
148 | * 创建一个颜色的渐变点。小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染。需要使用 addColorStop() 来指定渐变点,至少要两个。
149 | */
150 | addColorStop(stop: number, color: string): void;
151 | /**
152 | * 设置线条端点的样式
153 | */
154 | setLineCap(lineCap: 'butt' | 'round' | 'square'): void;
155 | /**
156 | * 设置两线相交处的样式
157 | */
158 | setLineJoin(lineJoin: 'bevel' | 'round' | 'miter'): void;
159 | /**
160 | * 设置线条宽度
161 | */
162 | setLineWidth(lineWidth: number): void;
163 | /**
164 | * 设置最大倾斜
165 | */
166 | setMiterLimit(miterLimit: number): void;
167 | /**
168 | * 添加一个矩形路径到当前路径。
169 | */
170 | rect(x: number, y: number, width: number, height: number): void;
171 | /**
172 | * 填充一个矩形。用 setFillStyle() 设置矩形的填充色,如果没设置默认是黑色。
173 | */
174 | fillRect(x: number, y: number, width: number, height: number): void;
175 | /**
176 | * 一个矩形(非填充)。用 setFillStroke() 设置矩形线条的颜色,如果没设置默认是黑色。
177 | */
178 | strokeRect(x: number, y: number, width: number, height: number): void;
179 | /**
180 | * 在给定的矩形区域内,清除画布上的像素
181 | */
182 | clearRect(x: number, y: number, width: number, height: number): void;
183 | /**
184 | * 对当前路径进行填充
185 | */
186 | fill(): void;
187 | /**
188 | * 对当前路径进行描边
189 | */
190 | stroke(): void;
191 | /**
192 | * 开始一个路径
193 | */
194 | beginPath(): void;
195 | /**
196 | * 关闭一个路径
197 | */
198 | closePath(): void;
199 | /**
200 | * 把路径移动到画布中的指定点,但不创建线条。
201 | */
202 | moveTo(x: number, y: number): void;
203 | /**
204 | * 添加一个新点,然后在画布中创建从该点到最后指定点的线条。
205 | */
206 | lineTo(x: number, y: number): void;
207 | /**
208 | * 添加一个弧形路径到当前路径,顺时针绘制。
209 | */
210 | arc(x: number, y: number, radius: number, startAngle: number, sweepAngle: number): void;
211 | /**
212 | * 创建二次方贝塞尔曲线
213 | */
214 | quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
215 | /**
216 | * 创建三次方贝塞尔曲线
217 | */
218 | bezierCurveTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): void;
219 | /**
220 | * 对横纵坐标进行缩放
221 | */
222 | scale(scaleWidth: number/**横坐标缩放的倍数1 = 100%,0.5 = 50%,2 = 200%,依次类 */, scaleHeight: number/** 纵坐标轴缩放的倍数1 = 100%,0.5 = 50%,2 = 200%,依次类 */): void;
223 | /**
224 | * 对坐标轴进行顺时针旋转
225 | */
226 | rotate(deg: number/**degrees * Math.PI/180;degrees范围为0~360;旋转角度,以弧度计 */): void;
227 | /**
228 | * 对坐标原点进行缩放
229 | */
230 | translate(x: number/**水平坐标平移量 */, y: number/**竖直坐标平移量 */): void;
231 | /**
232 | * 在画布上绘制被填充的文本
233 | */
234 | fillText(text: string, x: number, y: number): void;
235 | /**
236 | * 设置字体大小
237 | */
238 | setFontSize(fontSize: number): void;
239 | /**
240 | * 在画布上绘制图像
241 | */
242 | drawImage(imageResource: string, x: number, y: number, width: number, height: number): void;
243 | /**
244 | * 设置全局画笔透明度。
245 | */
246 | setGlobalAlpha(alpha: number): void;
247 | /**
248 | * 保存当前坐标轴的缩放、旋转、平移信息
249 | */
250 | save(): void;
251 | /**
252 | * 恢复之前保存过的坐标轴的缩放、旋转、平移信息
253 | */
254 | restore(): void;
255 | /**
256 | * 进行绘图
257 | */
258 | draw(): void;
259 | }
260 |
261 | interface IAudioContext {
262 | /**
263 | * 播放
264 | */
265 | play: () => void;
266 | /**
267 | * 暂停
268 | */
269 | pause: () => void;
270 | /**
271 | * 跳转到指定位置,单位 s
272 | */
273 | seek: (position: number) => void;
274 | }
275 |
276 | interface IVideoContext {
277 | /**
278 | * 播放
279 | */
280 | play: () => void;
281 | /**
282 | * 暂停
283 | */
284 | pause: () => void;
285 | /**
286 | * 跳转到指定位置,单位 s
287 | */
288 | seek: (position: number) => void;
289 | /**
290 | * 发送弹幕,danmu 包含两个属性 text, color。
291 | */
292 | sendDanmu: (danmu: {text: string; color: string;}) => void;
293 | }
294 |
295 | interface IMapContext {
296 | /**
297 | * 获取当前地图中心的经纬度,返回的是 gcj02 坐标系,可以用于 wx.openLocation
298 | */
299 | getCenterLocation: (obj: {
300 | /**
301 | * 接口调用成功的回调函数 ,res = { longitude: "经度", latitude: "纬度"}
302 | */
303 | success?: (res: {longitude: string; latitude: string}) => void;
304 | /**
305 | * 接口调用失败的回调函数
306 | */
307 | fail?: () => void;
308 | /**
309 | * 接口调用结束的回调函数(调用成功、失败都会执行)
310 | */
311 | complete?: () => void;
312 | }) => void;
313 | /**
314 | * 将地图中心移动到当前定位点,需要配合map组件的show-location使用
315 | */
316 | moveToLocation: () => void;
317 | }
318 |
319 | interface Application {
320 | setData: (obj: any) => void;
321 | }
322 |
323 | interface AppConstructor {
324 | new (): Application;
325 | (opts: {
326 | /**
327 | * 生命周期函数--监听小程序初始化
328 | */
329 | onLaunch?: () => void;
330 | /**
331 | * 生命周期函数--监听小程序显示
332 | */
333 | onShow?: () => void;
334 | /**
335 | * 生命周期函数--监听小程序隐藏
336 | */
337 | onHide?: () => void;
338 |
339 | [key: string]: any;
340 | }): Application;
341 | }
342 |
343 | declare var App: AppConstructor;
344 | declare function getApp(): Application;
345 |
346 | declare function getCurrentPages(): Page[];
347 |
348 | interface Page {
349 | setData: (obj: any) => void;
350 | }
351 |
352 | interface PageConstructor {
353 | new (): Page;
354 | (opts: {
355 | /**
356 | * 页面的初始数据
357 | */
358 | data?: any;
359 | /**
360 | * 页面的初始数据
361 | */
362 | onLoad?: () => void;
363 | /**
364 | * 生命周期函数--监听页面初次渲染完成
365 | */
366 | onReady?: () => void;
367 | /**
368 | * 生命周期函数--监听页面显示
369 | */
370 | onShow?: () => void;
371 | /**
372 | * 生命周期函数--监听页面隐藏
373 | */
374 | onHide?: () => void;
375 | /**
376 | * 生命周期函数--监听页面卸载
377 | */
378 | onUnload?: () => void;
379 | /**
380 | * 页面相关事件处理函数--监听用户下拉动作
381 | */
382 | onPullDownRefreash?: () => void;
383 | /**
384 | * 页面上拉触底事件的处理函数
385 | */
386 | onReachBottom?: () => void;
387 | /**
388 | * 用户点击右上角分享
389 | */
390 | onShareAppMessage?: () => {
391 | /**
392 | * 分享标题, 默认值当前小程序名称
393 | */
394 | title: string;
395 | /**
396 | * 分享描述, 默认值当前小程序名称
397 | */
398 | desc: string;
399 | /**
400 | * 分享路径 默认值当前页面 path ,必须是以 / 开头的完整路径
401 | */
402 | path: string;
403 | };
404 |
405 | [key: string]: any;
406 | }): Page;
407 | }
408 |
409 | declare var Page: PageConstructor;
410 |
411 | declare var wx: {
412 | // # 网络 #
413 |
414 | request(obj: {
415 | /**
416 | * 开发者服务器接口地址
417 | */
418 | url: string;
419 | /**
420 | * 请求的参数
421 | */
422 | data?: any | string;
423 | /**
424 | * 设置请求的 header , header 中不能设置 Referer
425 | */
426 | header?: any;
427 | /**
428 | * 默认为 GET,有效值:OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
429 | */
430 | method?: string;
431 | /**
432 | * 默认为 json。如果设置了 dataType 为 json,则会尝试对响应的数据做一次 JSON.parse
433 | */
434 | dataType?: string;
435 | /**
436 | * 收到开发者服务成功返回的回调函数,res = {data: '开发者服务器返回的内容'}
437 | */
438 | success?: Function;
439 | /**
440 | * 接口调用失败的回调函数
441 | */
442 | fail?: Function;
443 | /**
444 | * 接口调用结束的回调函数(调用成功、失败都会执行)
445 | */
446 | complete?: Function;
447 | }): void;
448 |
449 | /**
450 | * 将本地资源上传到开发者服务器。如页面通过 wx.chooseImage 等接口获取到一个本地资源的临时文件路径后,可通过此接口将本地资源上传到指定服务器。客户端发起一个 HTTPS POST 请求,其中 content-type 为 multipart/form-data 。
451 | */
452 | uploadFile(obj: {
453 | /**
454 | * 开发者服务器 url
455 | */
456 | url: string;
457 | /**
458 | * 要上传文件资源的路径
459 | */
460 | filePath: string;
461 | /**
462 | * 文件对应的 key , 开发者在服务器端通过这个 key 可以获取到文件二进制内容
463 | */
464 | name: string;
465 | /**
466 | * HTTP 请求 Header , header 中不能设置 Referer
467 | */
468 | header?: any;
469 | /**
470 | * HTTP 请求中其他额外的 form data
471 | */
472 | formData?: any;
473 | /**
474 | * 接口调用成功的回调函数
475 | */
476 | success?: Function;
477 | /**
478 | * 接口调用失败的回调函数
479 | */
480 | fail?: Function;
481 | /**
482 | * 接口调用结束的回调函数(调用成功、失败都会执行)
483 | */
484 | complete?: Function;
485 | }): void;
486 |
487 | /**
488 | * 下载文件资源到本地。客户端直接发起一个 HTTP GET 请求,返回文件的本地临时路径。
489 | */
490 | downloadFile(obj: {
491 | /**
492 | * 下载资源的 url
493 | */
494 | url: string;
495 | /**
496 | * HTTP 请求 Header
497 | */
498 | header?: any;
499 | /**
500 | * 下载成功后以 tempFilePath 的形式传给页面,res = {tempFilePath: '文件的临时路径'}
501 | */
502 | success?: Function;
503 | /**
504 | * 接口调用失败的回调函数
505 | */
506 | fail?: Function;
507 | /**
508 | * 接口调用结束的回调函数(调用成功、失败都会执行)
509 | */
510 | complete?: Function;
511 | }): void;
512 |
513 | /**
514 | * 创建一个 WebSocket 连接;一个微信小程序同时只能有一个 WebSocket 连接,如果当前已存在一个 WebSocket 连接,会自动关闭该连接,并重新创建一个 WebSocket 连接。
515 | */
516 | connectSocket(obj: {
517 | /**
518 | * 开发者服务器接口地址,必须是 wss 协议,且域名必须是后台配置的合法域名
519 | */
520 | url: string;
521 | /**
522 | * 请求的数据
523 | */
524 | data?: any;
525 | /**
526 | * HTTP Header , header 中不能设置 Referer
527 | */
528 | header?: any;
529 | /**
530 | * 默认是GET,有效值: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
531 | */
532 | method?: string;
533 | /**
534 | * 子协议数组
535 | */
536 | protocols?: string[];
537 | /**
538 | * 接口调用成功的回调函数
539 | */
540 | success?: Function;
541 | /**
542 | * 接口调用失败的回调函数
543 | */
544 | fail?: Function;
545 | /**
546 | * 接口调用结束的回调函数(调用成功、失败都会执行)
547 | */
548 | complete?: Function;
549 | }): void;
550 |
551 | /**
552 | * 监听WebSocket连接打开事件。
553 | */
554 | onSocketOpen(callback: Function): void;
555 |
556 | /**
557 | * 监听WebSocket错误。
558 | */
559 | onSocketError(callback: Function): void;
560 |
561 | /**
562 | * 通过 WebSocket 连接发送数据,需要先 wx.connectSocket,并在 wx.onSocketOpen 回调之后才能发送。
563 | */
564 | sendSocketMessage(obj: {
565 | /**
566 | * 需要发送的内容
567 | */
568 | data: undefined;
569 | /**
570 | * 接口调用成功的回调函数
571 | */
572 | success?: Function;
573 | /**
574 | * 接口调用失败的回调函数
575 | */
576 | fail?: Function;
577 | /**
578 | * 接口调用结束的回调函数(调用成功、失败都会执行)
579 | */
580 | complete?: Function;
581 | }): void;
582 |
583 | /**
584 | * 监听WebSocket接受到服务器的消息事件。
585 | */
586 | onSocketMessage(callback: Function): void;
587 |
588 | /**
589 | * 关闭WebSocket连接。
590 | */
591 | closeSocket(obj: {
592 | /**
593 | * 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。如果这个参数没有被指定,默认的取值是1000 (表示正常连接关闭)
594 | */
595 | code?: number;
596 | /**
597 | * 一个可读的字符串,表示连接被关闭的原因。这个字符串必须是不长于123字节的UTF-8 文本(不是字符)
598 | */
599 | reason?: string;
600 | /**
601 | * 接口调用成功的回调函数
602 | */
603 | success?: Function;
604 | /**
605 | * 接口调用失败的回调函数
606 | */
607 | fail?: Function;
608 | /**
609 | * 接口调用结束的回调函数(调用成功、失败都会执行)
610 | */
611 | complete?: Function;
612 | }): void;
613 |
614 | /**
615 | * 监听WebSocket关闭。
616 | */
617 | onSocketClose(callback: Function): void;
618 |
619 | // # 媒体 #
620 |
621 | /**
622 | * 从本地相册选择图片或使用相机拍照。
623 | */
624 | chooseImage(obj: {
625 | /**
626 | * 最多可以选择的图片张数,默认9
627 | */
628 | count?: number;
629 | /**
630 | * original 原图,compressed 压缩图,默认二者都有
631 | */
632 | sizeType?: string[];
633 | /**
634 | * album 从相册选图,camera 使用相机,默认二者都有
635 | */
636 | sourceType?: string[];
637 | /**
638 | * 成功则返回图片的本地文件路径列表 tempFilePaths
639 | */
640 | success: Function;
641 | /**
642 | * 接口调用失败的回调函数
643 | */
644 | fail?: Function;
645 | /**
646 | * 接口调用结束的回调函数(调用成功、失败都会执行)
647 | */
648 | complete?: Function;
649 | }): void;
650 |
651 | /**
652 | * 预览图片。
653 | */
654 | previewImage(obj: {
655 | /**
656 | * 当前显示图片的链接,不填则默认为 urls 的第一张
657 | */
658 | current?: string;
659 | /**
660 | * 需要预览的图片链接列表
661 | */
662 | urls: string[];
663 | /**
664 | * 接口调用成功的回调函数
665 | */
666 | success?: Function;
667 | /**
668 | * 接口调用失败的回调函数
669 | */
670 | fail?: Function;
671 | /**
672 | * 接口调用结束的回调函数(调用成功、失败都会执行)
673 | */
674 | complete?: Function;
675 | }): void;
676 |
677 | /**
678 | * 获取图片信息
679 | */
680 | getImageInfo(obj: {
681 | /**
682 | * 图片的路径,可以是相对路径,临时文件路径,存储文件路径,网络图片路径
683 | */
684 | src: string;
685 | /**
686 | * 接口调用成功的回调函数
687 | */
688 | success?: Function;
689 | /**
690 | * 接口调用失败的回调函数
691 | */
692 | fail?: Function;
693 | /**
694 | * 接口调用结束的回调函数(调用成功、失败都会执行)
695 | */
696 | complete?: Function;
697 | }): void;
698 |
699 | saveImageToPhotosAlbum(obj: {
700 | /**
701 | * 图片文件路径,可以是临时文件路径也可以是永久文件路径,不支持网络图片路径
702 | */
703 | filePath: string;
704 | /**
705 | * 接口调用成功的回调函数
706 | */
707 | success?: Function;
708 | /**
709 | * 接口调用失败的回调函数
710 | */
711 | fail?: Function;
712 | /**
713 | * 接口调用结束的回调函数(调用成功、失败都会执行)
714 | */
715 | complete?: Function;
716 | }): void;
717 |
718 | /**
719 | * 开始录音。当主动调用wx.stopRecord,或者录音超过1分钟时自动结束录音,返回录音文件的临时文件路径。当用户离开小程序时,此接口无法调用。
720 | */
721 | startRecord(obj: {
722 | /**
723 | * 录音成功后调用,返回录音文件的临时文件路径,res = {tempFilePath: '录音文件的临时路径'}
724 | */
725 | success?: Function;
726 | /**
727 | * 接口调用失败的回调函数
728 | */
729 | fail?: Function;
730 | /**
731 | * 接口调用结束的回调函数(调用成功、失败都会执行)
732 | */
733 | complete?: Function;
734 | }): void;
735 |
736 | /**
737 | * 主动调用停止录音。
738 | */
739 | stopRecord(): void;
740 |
741 | /**
742 | * 开始播放语音,同时只允许一个语音文件正在播放,如果前一个语音文件还没播放完,将中断前一个语音播放。
743 | */
744 | playVoice(obj: {
745 | /**
746 | * 需要播放的语音文件的文件路径
747 | */
748 | filePath: string;
749 | /**
750 | * 接口调用成功的回调函数
751 | */
752 | success?: Function;
753 | /**
754 | * 接口调用失败的回调函数
755 | */
756 | fail?: Function;
757 | /**
758 | * 接口调用结束的回调函数(调用成功、失败都会执行)
759 | */
760 | complete?: Function;
761 | }): void;
762 |
763 | /**
764 | * 暂停正在播放的语音。再次调用wx.playVoice播放同一个文件时,会从暂停处开始播放。如果想从头开始播放,需要先调用 wx.stopVoice。
765 | */
766 | pauseVoice(): void;
767 |
768 | /**
769 | * 结束播放语音。
770 | */
771 | stopVoice(): void;
772 |
773 | /**
774 | * 获取后台音乐播放状态。
775 | */
776 | getBackgroundAudioPlayerState(obj: {
777 | /**
778 | * 接口调用成功的回调函数
779 | */
780 | success?: Function;
781 | /**
782 | * 接口调用失败的回调函数
783 | */
784 | fail?: Function;
785 | /**
786 | * 接口调用结束的回调函数(调用成功、失败都会执行)
787 | */
788 | complete?: Function;
789 | }): void;
790 |
791 | /**
792 | * 使用后台播放器播放音乐,对于微信客户端来说,只能同时有一个后台音乐在播放。当用户离开小程序后,音乐将暂停播放;当用户点击“显示在聊天顶部”时,音乐不会暂停播放;当用户在其他小程序占用了音乐播放器,原有小程序内的音乐将停止播放。
793 | */
794 | playBackgroundAudio(obj: {
795 | /**
796 | * 音乐链接,目前支持的格式有 m4a, aac, mp3, wav
797 | */
798 | dataUrl: string;
799 | /**
800 | * 音乐标题
801 | */
802 | title?: string;
803 | /**
804 | * 封面URL
805 | */
806 | coverImgUrl?: string;
807 | /**
808 | * 接口调用成功的回调函数
809 | */
810 | success?: Function;
811 | /**
812 | * 接口调用失败的回调函数
813 | */
814 | fail?: Function;
815 | /**
816 | * 接口调用结束的回调函数(调用成功、失败都会执行)
817 | */
818 | complete?: Function;
819 | }): void;
820 |
821 | /**
822 | * 暂停播放音乐。
823 | */
824 | pauseBackgroundAudio(): void;
825 |
826 | /**
827 | * 控制音乐播放进度。
828 | */
829 | seekBackgroundAudio(obj: {
830 | /**
831 | * 音乐位置,单位:秒
832 | */
833 | position: number;
834 | /**
835 | * 接口调用成功的回调函数
836 | */
837 | success?: Function;
838 | /**
839 | * 接口调用失败的回调函数
840 | */
841 | fail?: Function;
842 | /**
843 | * 接口调用结束的回调函数(调用成功、失败都会执行)
844 | */
845 | complete?: Function;
846 | }): void;
847 |
848 | /**
849 | * 停止播放音乐。
850 | */
851 | stopBackgroundAudio(): void;
852 |
853 | /**
854 | * 监听音乐播放。
855 | */
856 | onBackgroundAudioPlay(callback: Function): void;
857 |
858 | /**
859 | * 监听音乐暂停。
860 | */
861 | onBackgroundAudioPause(callback: Function): void;
862 |
863 | /**
864 | * 监听音乐停止。
865 | */
866 | onBackgroundAudioStop(callback: Function): void;
867 |
868 | getBackgroundAudioManager(): void;
869 |
870 | /**
871 | * 创建并返回 audio 上下文 audioContext 对象
872 | */
873 | createAudioContext(audioId: string): IAudioContext;
874 |
875 | /**
876 | * 拍摄视频或从手机相册中选视频,返回视频的临时文件路径。
877 | */
878 | chooseVideo(obj: {
879 | /**
880 | * album 从相册选视频,camera 使用相机拍摄,默认为:['album', 'camera']
881 | */
882 | sourceType?: string[];
883 | /**
884 | * 拍摄视频最长拍摄时间,单位秒。最长支持 60 秒
885 | */
886 | maxDuration?: number;
887 | /**
888 | * 默认调起的为前置还是后置摄像头。front: 前置,back: 后置,默认 back
889 | */
890 | camera?: string;
891 | /**
892 | * 接口调用成功,返回视频文件的临时文件路径,详见返回参数说明
893 | */
894 | success?: Function;
895 | /**
896 | * 接口调用失败的回调函数
897 | */
898 | fail?: Function;
899 | /**
900 | * 接口调用结束的回调函数(调用成功、失败都会执行)
901 | */
902 | complete?: Function;
903 | }): void;
904 |
905 | saveVideoToPhotosAlbum(obj: {
906 | /**
907 | * 视频文件路径,可以是临时文件路径也可以是永久文件路径
908 | */
909 | filePath: string;
910 | /**
911 | * 接口调用成功的回调函数
912 | */
913 | success?: Function;
914 | /**
915 | * 接口调用失败的回调函数
916 | */
917 | fail?: Function;
918 | /**
919 | * 接口调用结束的回调函数(调用成功、失败都会执行)
920 | */
921 | complete?: Function;
922 | }): void;
923 |
924 | /**
925 | * 创建并返回 video 上下文 videoContext 对象
926 | */
927 | createVideoContext(videoId: string): IVideoContext;
928 |
929 | // # 文件 #
930 |
931 | /**
932 | * 保存文件到本地。
933 | */
934 | saveFile(obj: {
935 | /**
936 | * 需要保存的文件的临时路径
937 | */
938 | tempFilePath: string;
939 | /**
940 | * 返回文件的保存路径,res = {savedFilePath: '文件的保存路径'}
941 | */
942 | success?: Function;
943 | /**
944 | * 接口调用失败的回调函数
945 | */
946 | fail?: Function;
947 | /**
948 | * 接口调用结束的回调函数(调用成功、失败都会执行)
949 | */
950 | complete?: Function;
951 | }): void;
952 |
953 | /**
954 | * 获取本地已保存的文件列表
955 | */
956 | getSavedFileList(obj: {
957 | /**
958 | * 接口调用成功的回调函数,返回结果见success返回参数说明
959 | */
960 | success?: Function;
961 | /**
962 | * 接口调用失败的回调函数
963 | */
964 | fail?: Function;
965 | /**
966 | * 接口调用结束的回调函数(调用成功、失败都会执行)
967 | */
968 | complete?: Function;
969 | }): void;
970 |
971 | /**
972 | * 获取本地文件的文件信息。此接口只能用于获取已保存到本地的文件,若需要获取临时文件信息,请使用 wx.getFileInfo 接口。
973 | */
974 | getSavedFileInfo(obj: {
975 | /**
976 | * 文件路径
977 | */
978 | filePath: string;
979 | /**
980 | * 接口调用成功的回调函数,返回结果见success返回参数说明
981 | */
982 | success?: Function;
983 | /**
984 | * 接口调用失败的回调函数
985 | */
986 | fail?: Function;
987 | /**
988 | * 接口调用结束的回调函数(调用成功、失败都会执行)
989 | */
990 | complete?: Function;
991 | }): void;
992 |
993 | /**
994 | * 删除本地存储的文件
995 | */
996 | removeSavedFile(obj: {
997 | /**
998 | * 需要删除的文件路径
999 | */
1000 | filePath: string;
1001 | /**
1002 | * 接口调用成功的回调函数
1003 | */
1004 | success?: Function;
1005 | /**
1006 | * 接口调用失败的回调函数
1007 | */
1008 | fail?: Function;
1009 | /**
1010 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1011 | */
1012 | complete?: Function;
1013 | }): void;
1014 |
1015 | /**
1016 | * 新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx
1017 | */
1018 | openDocument(obj: {
1019 | /**
1020 | * 文件路径,可通过 downFile 获得
1021 | */
1022 | filePath: string;
1023 | /**
1024 | * 文件类型,指定文件类型打开文件,有效值 doc, xls, ppt, pdf, docx, xlsx, pptx
1025 | */
1026 | fileType?: string;
1027 | /**
1028 | * 接口调用成功的回调函数
1029 | */
1030 | success?: Function;
1031 | /**
1032 | * 接口调用失败的回调函数
1033 | */
1034 | fail?: Function;
1035 | /**
1036 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1037 | */
1038 | complete?: Function;
1039 | }): void;
1040 |
1041 | getFileInfo(obj: {
1042 | /**
1043 | * 本地文件路径
1044 | */
1045 | filePath: string;
1046 | /**
1047 | * 计算文件摘要的算法,默认值 md5,有效值:md5,sha1
1048 | */
1049 | digestAlgorithm?: string;
1050 | /**
1051 | * 接口调用成功的回调函数
1052 | */
1053 | success?: Function;
1054 | /**
1055 | * 接口调用失败的回调函数
1056 | */
1057 | fail?: Function;
1058 | /**
1059 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1060 | */
1061 | complete?: Function;
1062 | }): void;
1063 |
1064 | // # 数据缓存 #
1065 |
1066 | /**
1067 | * 将数据存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个异步接口。
1068 | */
1069 | setStorage(obj: {
1070 | /**
1071 | * 本地缓存中的指定的 key
1072 | */
1073 | key: string;
1074 | /**
1075 | * 需要存储的内容
1076 | */
1077 | data: any;
1078 | /**
1079 | * 接口调用成功的回调函数
1080 | */
1081 | success?: Function;
1082 | /**
1083 | * 接口调用失败的回调函数
1084 | */
1085 | fail?: Function;
1086 | /**
1087 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1088 | */
1089 | complete?: Function;
1090 | }): void;
1091 |
1092 | /**
1093 | * 将 data 存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个同步接口。
1094 | */
1095 | setStorageSync(key: string, data: any, ): void;
1096 |
1097 | /**
1098 | * 从本地缓存中异步获取指定 key 对应的内容。
1099 | */
1100 | getStorage(obj: {
1101 | /**
1102 | * 本地缓存中的指定的 key
1103 | */
1104 | key: string;
1105 | /**
1106 | * 接口调用的回调函数,res = {data: key对应的内容}
1107 | */
1108 | success: Function;
1109 | /**
1110 | * 接口调用失败的回调函数
1111 | */
1112 | fail?: Function;
1113 | /**
1114 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1115 | */
1116 | complete?: Function;
1117 | }): void;
1118 |
1119 | /**
1120 | * 从本地缓存中同步获取指定 key 对应的内容。
1121 | */
1122 | getStorageSync(key: string): void;
1123 |
1124 | /**
1125 | * 异步获取当前storage的相关信息
1126 | */
1127 | getStorageInfo(obj: {
1128 | /**
1129 | * 接口调用的回调函数,详见返回参数说明
1130 | */
1131 | success: Function;
1132 | /**
1133 | * 接口调用失败的回调函数
1134 | */
1135 | fail?: Function;
1136 | /**
1137 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1138 | */
1139 | complete?: Function;
1140 | }): void;
1141 |
1142 | /**
1143 | * 同步获取当前storage的相关信息
1144 | */
1145 | getStorageInfoSync(): void;
1146 |
1147 | /**
1148 | * 从本地缓存中异步移除指定 key 。
1149 | */
1150 | removeStorage(obj: {
1151 | /**
1152 | * 本地缓存中的指定的 key
1153 | */
1154 | key: string;
1155 | /**
1156 | * 接口调用的回调函数
1157 | */
1158 | success: Function;
1159 | /**
1160 | * 接口调用失败的回调函数
1161 | */
1162 | fail?: Function;
1163 | /**
1164 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1165 | */
1166 | complete?: Function;
1167 | }): void;
1168 |
1169 | /**
1170 | * 从本地缓存中同步移除指定 key 。
1171 | */
1172 | removeStorageSync(key: string): void;
1173 |
1174 | /**
1175 | * 清理本地数据缓存。
1176 | */
1177 | clearStorage(): void;
1178 |
1179 | /**
1180 | * 同步清理本地数据缓存
1181 | */
1182 | clearStorageSync(): void;
1183 |
1184 | // # 位置 #
1185 |
1186 | /**
1187 | * 获取当前的地理位置、速度。当用户离开小程序后,此接口无法调用;当用户点击“显示在聊天顶部”时,此接口可继续调用。
1188 | */
1189 | getLocation(obj: {
1190 | /**
1191 | * 默认为 wgs84 返回 gps 坐标,gcj02 返回可用于wx.openLocation的坐标
1192 | */
1193 | type?: string;
1194 | /**
1195 | * 接口调用成功的回调函数,返回内容详见返回参数说明。
1196 | */
1197 | success: Function;
1198 | /**
1199 | * 接口调用失败的回调函数
1200 | */
1201 | fail?: Function;
1202 | /**
1203 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1204 | */
1205 | complete?: Function;
1206 | }): void;
1207 |
1208 | /**
1209 | * 打开地图选择位置
1210 | */
1211 | chooseLocation(obj: {
1212 | /**
1213 | * 接口调用成功的回调函数,返回内容详见返回参数说明。
1214 | */
1215 | success: Function;
1216 | /**
1217 | * 用户取消时调用
1218 | */
1219 | cancel?: Function;
1220 | /**
1221 | * 接口调用失败的回调函数
1222 | */
1223 | fail?: Function;
1224 | /**
1225 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1226 | */
1227 | complete?: Function;
1228 | }): void;
1229 |
1230 | /**
1231 | * 使用微信内置地图查看位置
1232 | */
1233 | openLocation(obj: {
1234 | /**
1235 | * 纬度,范围为-90~90,负数表示南纬
1236 | */
1237 | latitude: number;
1238 | /**
1239 | * 经度,范围为-180~180,负数表示西经
1240 | */
1241 | longitude: number;
1242 | /**
1243 | * 缩放比例,范围5~18,默认为18
1244 | */
1245 | scale?: number;
1246 | /**
1247 | * 位置名
1248 | */
1249 | name?: string;
1250 | /**
1251 | * 地址的详细说明
1252 | */
1253 | address?: string;
1254 | /**
1255 | * 接口调用成功的回调函数
1256 | */
1257 | success?: Function;
1258 | /**
1259 | * 接口调用失败的回调函数
1260 | */
1261 | fail?: Function;
1262 | /**
1263 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1264 | */
1265 | complete?: Function;
1266 | }): void;
1267 |
1268 | /**
1269 | * 创建并返回 map 上下文 mapContext 对象
1270 | */
1271 | createMapContext(mapId: string): IMapContext;
1272 |
1273 | // # 设备 #
1274 |
1275 | /**
1276 | * 获取系统信息。
1277 | */
1278 | getSystemInfo(obj: {
1279 | /**
1280 | * 接口调用成功的回调
1281 | */
1282 | success: Function;
1283 | /**
1284 | * 接口调用失败的回调函数
1285 | */
1286 | fail?: Function;
1287 | /**
1288 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1289 | */
1290 | complete?: Function;
1291 | }): void;
1292 |
1293 | /**
1294 | * 获取系统信息同步接口
1295 | */
1296 | getSystemInfoSync(): void;
1297 |
1298 | /**
1299 | * 获取网络类型。
1300 | */
1301 | getNetworkType(obj: {
1302 | /**
1303 | * 接口调用成功,返回网络类型 networkType
1304 | */
1305 | success: Function;
1306 | /**
1307 | * 接口调用失败的回调函数
1308 | */
1309 | fail?: Function;
1310 | /**
1311 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1312 | */
1313 | complete?: Function;
1314 | }): void;
1315 |
1316 | onNetworkStatusChange(callback: Function): void;
1317 |
1318 | setScreenBrightness(obj: {
1319 | /**
1320 | * 屏幕亮度值,范围 0~1,0 最暗,1 最亮
1321 | */
1322 | value: number;
1323 | /**
1324 | * 接口调用成功
1325 | */
1326 | success?: Function;
1327 | /**
1328 | * 接口调用失败的回调函数
1329 | */
1330 | fail?: Function;
1331 | /**
1332 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1333 | */
1334 | complete?: Function;
1335 | }): void;
1336 |
1337 | getScreenBrightness(obj: {
1338 | /**
1339 | * 接口调用成功
1340 | */
1341 | success?: Function;
1342 | /**
1343 | * 接口调用失败的回调函数
1344 | */
1345 | fail?: Function;
1346 | /**
1347 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1348 | */
1349 | complete?: Function;
1350 | }): void;
1351 |
1352 | vibrateLong(obj: {
1353 | /**
1354 | * 接口调用成功的回调函数
1355 | */
1356 | success?: Function;
1357 | /**
1358 | * 接口调用失败的回调函数
1359 | */
1360 | fail?: Function;
1361 | /**
1362 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1363 | */
1364 | complete?: Function;
1365 | }): void;
1366 |
1367 | vibrateShort(obj: {
1368 | /**
1369 | * 接口调用成功的回调函数
1370 | */
1371 | success?: Function;
1372 | /**
1373 | * 接口调用失败的回调函数
1374 | */
1375 | fail?: Function;
1376 | /**
1377 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1378 | */
1379 | complete?: Function;
1380 | }): void;
1381 |
1382 | /**
1383 | * 监听加速度数据,频率:5次/秒,接口调用后会自动开始监听,可使用 wx.stopAccelerometer 停止监听。
1384 | */
1385 | onAccelerometerChange(callback: Function): void;
1386 |
1387 | startAccelerometer(obj: {
1388 | /**
1389 | * 接口调用成功的回调函数
1390 | */
1391 | success?: Function;
1392 | /**
1393 | * 接口调用失败的回调函数
1394 | */
1395 | fail?: Function;
1396 | /**
1397 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1398 | */
1399 | complete?: Function;
1400 | }): void;
1401 |
1402 | stopAccelerometer(obj: {
1403 | /**
1404 | * 接口调用成功的回调函数
1405 | */
1406 | success?: Function;
1407 | /**
1408 | * 接口调用失败的回调函数
1409 | */
1410 | fail?: Function;
1411 | /**
1412 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1413 | */
1414 | complete?: Function;
1415 | }): void;
1416 |
1417 | /**
1418 | * 监听罗盘数据,频率:5次/秒,接口调用后会自动开始监听,可使用wx.stopCompass停止监听。
1419 | */
1420 | onCompassChange(callback: Function): void;
1421 |
1422 | startCompass(obj: {
1423 | /**
1424 | * 接口调用成功的回调函数
1425 | */
1426 | success?: Function;
1427 | /**
1428 | * 接口调用失败的回调函数
1429 | */
1430 | fail?: Function;
1431 | /**
1432 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1433 | */
1434 | complete?: Function;
1435 | }): void;
1436 |
1437 | stopCompass(obj: {
1438 | /**
1439 | * 接口调用成功的回调函数
1440 | */
1441 | success?: Function;
1442 | /**
1443 | * 接口调用失败的回调函数
1444 | */
1445 | fail?: Function;
1446 | /**
1447 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1448 | */
1449 | complete?: Function;
1450 | }): void;
1451 |
1452 | makePhoneCall(obj: {
1453 | /**
1454 | * 需要拨打的电话号码
1455 | */
1456 | phoneNumber: string;
1457 | /**
1458 | * 接口调用成功的回调
1459 | */
1460 | success?: Function;
1461 | /**
1462 | * 接口调用失败的回调函数
1463 | */
1464 | fail?: Function;
1465 | /**
1466 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1467 | */
1468 | complete?: Function;
1469 | }): void;
1470 |
1471 | /**
1472 | * 调起客户端扫码界面,扫码成功后返回对应的结果
1473 | */
1474 | scanCode(obj: {
1475 | /**
1476 | * 是否只能从相机扫码,不允许从相册选择图片
1477 | */
1478 | onlyFromCamera?: boolean;
1479 | /**
1480 | * 接口调用成功的回调函数,返回内容详见返回参数说明。
1481 | */
1482 | success?: Function;
1483 | /**
1484 | * 接口调用失败的回调函数
1485 | */
1486 | fail?: Function;
1487 | /**
1488 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1489 | */
1490 | complete?: Function;
1491 | }): void;
1492 |
1493 | setClipboardData(obj: {
1494 | /**
1495 | * 需要设置的内容
1496 | */
1497 | data: string;
1498 | /**
1499 | * 接口调用成功的回调函数
1500 | */
1501 | success?: Function;
1502 | /**
1503 | * 接口调用失败的回调函数
1504 | */
1505 | fail?: Function;
1506 | /**
1507 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1508 | */
1509 | complete?: Function;
1510 | }): void;
1511 |
1512 | getClipboardData(obj: {
1513 | /**
1514 | * 接口调用成功的回调函数
1515 | */
1516 | success?: Function;
1517 | /**
1518 | * 接口调用失败的回调函数
1519 | */
1520 | fail?: Function;
1521 | /**
1522 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1523 | */
1524 | complete?: Function;
1525 | }): void;
1526 |
1527 | openBluetoothAdapter(obj: {
1528 | /**
1529 | * 成功则返回成功初始化信息
1530 | */
1531 | success: Function;
1532 | /**
1533 | * 接口调用失败的回调函数
1534 | */
1535 | fail?: Function;
1536 | /**
1537 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1538 | */
1539 | complete?: Function;
1540 | }): void;
1541 |
1542 | closeBluetoothAdapter(obj: {
1543 | /**
1544 | * 成功则返回成功关闭模块信息
1545 | */
1546 | success: Function;
1547 | /**
1548 | * 接口调用失败的回调函数
1549 | */
1550 | fail?: Function;
1551 | /**
1552 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1553 | */
1554 | complete?: Function;
1555 | }): void;
1556 |
1557 | getBluetoothAdapterState(obj: {
1558 | /**
1559 | * 成功则返回本机蓝牙适配器状态
1560 | */
1561 | success: Function;
1562 | /**
1563 | * 接口调用失败的回调函数
1564 | */
1565 | fail?: Function;
1566 | /**
1567 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1568 | */
1569 | complete?: Function;
1570 | }): void;
1571 |
1572 | onBluetoothAdapterStateChange(callback: Function): void;
1573 |
1574 | startBluetoothDevicesDiscovery(obj: {
1575 | /**
1576 | * 蓝牙设备主 service 的 uuid 列表
1577 | */
1578 | services?: Array;
1579 | /**
1580 | * 是否允许重复上报同一设备, 如果允许重复上报,则onDeviceFound 方法会多次上报同一设备,但是 RSSI 值会有不同
1581 | */
1582 | allowDuplicatesKey?: boolean;
1583 | /**
1584 | * 上报设备的间隔,默认为0,意思是找到新设备立即上报,否则根据传入的间隔上报
1585 | */
1586 | interval?: number;
1587 | /**
1588 | * 成功则返回本机蓝牙适配器状态
1589 | */
1590 | success: Function;
1591 | /**
1592 | * 接口调用失败的回调函数
1593 | */
1594 | fail?: Function;
1595 | /**
1596 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1597 | */
1598 | complete?: Function;
1599 | }): void;
1600 |
1601 | stopBluetoothDevicesDiscovery(obj: {
1602 | /**
1603 | * 成功则返回本机蓝牙适配器状态
1604 | */
1605 | success: Function;
1606 | /**
1607 | * 接口调用失败的回调函数
1608 | */
1609 | fail?: Function;
1610 | /**
1611 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1612 | */
1613 | complete?: Function;
1614 | }): void;
1615 |
1616 | getBluetoothDevices(obj: {
1617 | /**
1618 | * 成功则返回本机蓝牙适配器状态
1619 | */
1620 | success: Function;
1621 | /**
1622 | * 接口调用失败的回调函数
1623 | */
1624 | fail?: Function;
1625 | /**
1626 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1627 | */
1628 | complete?: Function;
1629 | }): void;
1630 |
1631 | onBluetoothDeviceFound(callback: Function): void;
1632 |
1633 | getConnectedBluetoothDevices(obj: {
1634 | /**
1635 | * 蓝牙设备主 service 的 uuid 列表
1636 | */
1637 | services: Array;
1638 | /**
1639 | * 成功则返回本机蓝牙适配器状态
1640 | */
1641 | success: Function;
1642 | /**
1643 | * 接口调用失败的回调函数
1644 | */
1645 | fail?: Function;
1646 | /**
1647 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1648 | */
1649 | complete?: Function;
1650 | }): void;
1651 |
1652 | createBLEConnection(obj: {
1653 | /**
1654 | * 蓝牙设备 id,参考 getDevices 接口
1655 | */
1656 | deviceId: string;
1657 | /**
1658 | * 成功则返回本机蓝牙适配器状态
1659 | */
1660 | success: Function;
1661 | /**
1662 | * 接口调用失败的回调函数
1663 | */
1664 | fail?: Function;
1665 | /**
1666 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1667 | */
1668 | complete?: Function;
1669 | }): void;
1670 |
1671 | closeBLEConnection(obj: {
1672 | /**
1673 | * 蓝牙设备 id,参考 getDevices 接口
1674 | */
1675 | deviceId: string;
1676 | /**
1677 | * 成功则返回本机蓝牙适配器状态
1678 | */
1679 | success: Function;
1680 | /**
1681 | * 接口调用失败的回调函数
1682 | */
1683 | fail?: Function;
1684 | /**
1685 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1686 | */
1687 | complete?: Function;
1688 | }): void;
1689 |
1690 | getBLEDeviceServices(obj: {
1691 | /**
1692 | * 蓝牙设备 id,参考 getDevices 接口
1693 | */
1694 | deviceId: string;
1695 | /**
1696 | * 成功则返回本机蓝牙适配器状态
1697 | */
1698 | success: Function;
1699 | /**
1700 | * 接口调用失败的回调函数
1701 | */
1702 | fail?: Function;
1703 | /**
1704 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1705 | */
1706 | complete?: Function;
1707 | }): void;
1708 |
1709 | getBLEDeviceCharacteristics(obj: {
1710 | /**
1711 | * 蓝牙设备 id,参考 device 对象
1712 | */
1713 | deviceId: string;
1714 | /**
1715 | * 蓝牙服务 uuid
1716 | */
1717 | serviceId: string;
1718 | /**
1719 | * 成功则返回本机蓝牙适配器状态
1720 | */
1721 | success: Function;
1722 | /**
1723 | * 接口调用失败的回调函数
1724 | */
1725 | fail?: Function;
1726 | /**
1727 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1728 | */
1729 | complete?: Function;
1730 | }): void;
1731 |
1732 | readBLECharacteristicValue(obj: {
1733 | /**
1734 | * 蓝牙设备 id,参考 device 对象
1735 | */
1736 | deviceId: string;
1737 | /**
1738 | * 蓝牙特征值对应服务的 uuid
1739 | */
1740 | serviceId: string;
1741 | /**
1742 | * 蓝牙特征值的 uuid
1743 | */
1744 | characteristicId: string;
1745 | /**
1746 | * 成功则返回本机蓝牙适配器状态
1747 | */
1748 | success: Function;
1749 | /**
1750 | * 接口调用失败的回调函数
1751 | */
1752 | fail?: Function;
1753 | /**
1754 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1755 | */
1756 | complete?: Function;
1757 | }): void;
1758 |
1759 | writeBLECharacteristicValue(obj: {
1760 | /**
1761 | * 蓝牙设备 id,参考 device 对象
1762 | */
1763 | deviceId: string;
1764 | /**
1765 | * 蓝牙特征值对应服务的 uuid
1766 | */
1767 | serviceId: string;
1768 | /**
1769 | * 蓝牙特征值的 uuid
1770 | */
1771 | characteristicId: string;
1772 | /**
1773 | * 蓝牙设备特征值对应的二进制值(注意:vConsole 无法打印出 ArrayBuffer 类型数据)
1774 | */
1775 | value: undefined;
1776 | /**
1777 | * 成功则返回本机蓝牙适配器状态
1778 | */
1779 | success: Function;
1780 | /**
1781 | * 接口调用失败的回调函数
1782 | */
1783 | fail?: Function;
1784 | /**
1785 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1786 | */
1787 | complete?: Function;
1788 | }): void;
1789 |
1790 | notifyBLECharacteristicValueChange(obj: {
1791 | /**
1792 | * 蓝牙设备 id,参考 device 对象
1793 | */
1794 | deviceId: string;
1795 | /**
1796 | * 蓝牙特征值对应服务的 uuid
1797 | */
1798 | serviceId: string;
1799 | /**
1800 | * 蓝牙特征值的 uuid
1801 | */
1802 | characteristicId: string;
1803 | /**
1804 | * true: 启用 notify; false: 停用 notify
1805 | */
1806 | state: boolean;
1807 | /**
1808 | * 成功则返回本机蓝牙适配器状态
1809 | */
1810 | success: Function;
1811 | /**
1812 | * 接口调用失败的回调函数
1813 | */
1814 | fail?: Function;
1815 | /**
1816 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1817 | */
1818 | complete?: Function;
1819 | }): void;
1820 |
1821 | onBLEConnectionStateChange(callback: Function): void;
1822 |
1823 | onBLECharacteristicValueChange(callback: Function): void;
1824 |
1825 | startBeaconDiscovery(obj: {
1826 | /**
1827 | * iBeacon设备广播的 uuids
1828 | */
1829 | uuids: string[];
1830 | /**
1831 | * 接口调用成功的回调函数
1832 | */
1833 | success?: Function;
1834 | /**
1835 | * 接口调用失败的回调函数
1836 | */
1837 | fail?: Function;
1838 | /**
1839 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1840 | */
1841 | complete?: Function;
1842 | }): void;
1843 |
1844 | stopBeaconDiscovery(obj: {
1845 | /**
1846 | * 接口调用成功的回调函数
1847 | */
1848 | success?: Function;
1849 | /**
1850 | * 接口调用失败的回调函数
1851 | */
1852 | fail?: Function;
1853 | /**
1854 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1855 | */
1856 | complete?: Function;
1857 | }): void;
1858 |
1859 | getBeacons(obj: {
1860 | /**
1861 | * 接口调用成功的回调函数
1862 | */
1863 | success?: Function;
1864 | /**
1865 | * 接口调用失败的回调函数
1866 | */
1867 | fail?: Function;
1868 | /**
1869 | * 接口调用结束的回调函数(调用成功、失败都会执行)
1870 | */
1871 | complete?: Function;
1872 | }): void;
1873 |
1874 | onBeaconUpdate(callback: Function): void;
1875 |
1876 | onBeaconServiceChange(callback: Function): void;
1877 |
1878 | onUserCaptureScreen(callback: Function): void;
1879 |
1880 | addPhoneContact(obj: {
1881 | /**
1882 | * 头像本地文件路径
1883 | */
1884 | photoFilePath?: string;
1885 | /**
1886 | * 昵称
1887 | */
1888 | nickName?: string;
1889 | /**
1890 | * 姓氏
1891 | */
1892 | lastName?: string;
1893 | /**
1894 | * 中间名
1895 | */
1896 | middleName?: string;
1897 | /**
1898 | * 名字
1899 | */
1900 | firstName: string;
1901 | /**
1902 | * 备注
1903 | */
1904 | remark?: string;
1905 | /**
1906 | * 手机号
1907 | */
1908 | mobilePhoneNumber?: string;
1909 | /**
1910 | * 微信号
1911 | */
1912 | weChatNumber?: string;
1913 | /**
1914 | * 联系地址国家
1915 | */
1916 | addressCountry?: string;
1917 | /**
1918 | * 联系地址省份
1919 | */
1920 | addressState?: string;
1921 | /**
1922 | * 联系地址城市
1923 | */
1924 | addressCity?: string;
1925 | /**
1926 | * 联系地址街道
1927 | */
1928 | addressStreet?: string;
1929 | /**
1930 | * 联系地址邮政编码
1931 | */
1932 | addressPostalCode?: string;
1933 | /**
1934 | * 公司
1935 | */
1936 | organization?: string;
1937 | /**
1938 | * 职位
1939 | */
1940 | title?: string;
1941 | /**
1942 | * 工作传真
1943 | */
1944 | workFaxNumber?: string;
1945 | /**
1946 | * 工作电话
1947 | */
1948 | workPhoneNumber?: string;
1949 | /**
1950 | * 公司电话
1951 | */
1952 | hostNumber?: string;
1953 | /**
1954 | * 电子邮件
1955 | */
1956 | email?: string;
1957 | /**
1958 | * 网站
1959 | */
1960 | url?: string;
1961 | /**
1962 | * 工作地址国家
1963 | */
1964 | workAddressCountry?: string;
1965 | /**
1966 | * 工作地址省份
1967 | */
1968 | workAddressState?: string;
1969 | /**
1970 | * 工作地址城市
1971 | */
1972 | workAddressCity?: string;
1973 | /**
1974 | * 工作地址街道
1975 | */
1976 | workAddressStreet?: string;
1977 | /**
1978 | * 工作地址邮政编码
1979 | */
1980 | workAddressPostalCode?: string;
1981 | /**
1982 | * 住宅传真
1983 | */
1984 | homeFaxNumber?: string;
1985 | /**
1986 | * 住宅电话
1987 | */
1988 | homePhoneNumber?: string;
1989 | /**
1990 | * 住宅地址国家
1991 | */
1992 | homeAddressCountry?: string;
1993 | /**
1994 | * 住宅地址省份
1995 | */
1996 | homeAddressState?: string;
1997 | /**
1998 | * 住宅地址城市
1999 | */
2000 | homeAddressCity?: string;
2001 | /**
2002 | * 住宅地址街道
2003 | */
2004 | homeAddressStreet?: string;
2005 | /**
2006 | * 住宅地址邮政编码
2007 | */
2008 | homeAddressPostalCode?: string;
2009 | /**
2010 | * 接口调用成功
2011 | */
2012 | success?: Function;
2013 | /**
2014 | * 接口调用失败的回调函数
2015 | */
2016 | fail?: Function;
2017 | /**
2018 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2019 | */
2020 | complete?: Function;
2021 | }): void;
2022 |
2023 | // # 界面 #
2024 |
2025 | /**
2026 | * 显示消息提示框
2027 | */
2028 | showToast(obj: {
2029 | /**
2030 | * 提示的内容
2031 | */
2032 | title: string;
2033 | /**
2034 | * 图标,有效值 "success", "loading"
2035 | */
2036 | icon?: string;
2037 | /**
2038 | * 自定义图标的本地路径,image 的优先级高于 icon
2039 | */
2040 | image?: string;
2041 | /**
2042 | * 提示的延迟时间,单位毫秒,默认:1500
2043 | */
2044 | duration?: number;
2045 | /**
2046 | * 是否显示透明蒙层,防止触摸穿透,默认:false
2047 | */
2048 | mask?: boolean;
2049 | /**
2050 | * 接口调用成功的回调函数
2051 | */
2052 | success?: Function;
2053 | /**
2054 | * 接口调用失败的回调函数
2055 | */
2056 | fail?: Function;
2057 | /**
2058 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2059 | */
2060 | complete?: Function;
2061 | }): void;
2062 |
2063 | showLoading(obj: {
2064 | /**
2065 | * 提示的内容
2066 | */
2067 | title: string;
2068 | /**
2069 | * 是否显示透明蒙层,防止触摸穿透,默认:false
2070 | */
2071 | mask?: boolean;
2072 | /**
2073 | * 接口调用成功的回调函数
2074 | */
2075 | success?: Function;
2076 | /**
2077 | * 接口调用失败的回调函数
2078 | */
2079 | fail?: Function;
2080 | /**
2081 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2082 | */
2083 | complete?: Function;
2084 | }): void;
2085 |
2086 | /**
2087 | * 隐藏消息提示框
2088 | */
2089 | hideToast(): void;
2090 |
2091 | hideLoading(): void;
2092 |
2093 | /**
2094 | * 显示模态弹窗
2095 | */
2096 | showModal(obj: {
2097 | /**
2098 | * 提示的标题
2099 | */
2100 | title: string;
2101 | /**
2102 | * 提示的内容
2103 | */
2104 | content: string;
2105 | /**
2106 | * 是否显示取消按钮,默认为 true
2107 | */
2108 | showCancel?: boolean;
2109 | /**
2110 | * 取消按钮的文字,默认为"取消",最多 4 个字符
2111 | */
2112 | cancelText?: string;
2113 | /**
2114 | * 取消按钮的文字颜色,默认为"#000000"
2115 | */
2116 | cancelColor?: undefined;
2117 | /**
2118 | * 确定按钮的文字,默认为"确定",最多 4 个字符
2119 | */
2120 | confirmText?: string;
2121 | /**
2122 | * 确定按钮的文字颜色,默认为"#3CC51F"
2123 | */
2124 | confirmColor?: undefined;
2125 | /**
2126 | * 接口调用成功的回调函数
2127 | */
2128 | success?: Function;
2129 | /**
2130 | * 接口调用失败的回调函数
2131 | */
2132 | fail?: Function;
2133 | /**
2134 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2135 | */
2136 | complete?: Function;
2137 | }): void;
2138 |
2139 | /**
2140 | * 显示操作菜单
2141 | */
2142 | showActionSheet(obj: {
2143 | /**
2144 | * 按钮的文字数组,数组长度最大为6个
2145 | */
2146 | itemList: undefined;
2147 | /**
2148 | * 按钮的文字颜色,默认为"#000000"
2149 | */
2150 | itemColor?: undefined;
2151 | /**
2152 | * 接口调用成功的回调函数,详见返回参数说明
2153 | */
2154 | success?: Function;
2155 | /**
2156 | * 接口调用失败的回调函数
2157 | */
2158 | fail?: Function;
2159 | /**
2160 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2161 | */
2162 | complete?: Function;
2163 | }): void;
2164 |
2165 | setTopBarText(obj: {
2166 | /**
2167 | * 置顶栏文字内容
2168 | */
2169 | text: string;
2170 | /**
2171 | * 接口调用成功的回调函数
2172 | */
2173 | success?: Function;
2174 | /**
2175 | * 接口调用失败的回调函数
2176 | */
2177 | fail?: Function;
2178 | /**
2179 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2180 | */
2181 | complete?: Function;
2182 | }): void;
2183 |
2184 | /**
2185 | * 动态设置当前页面的标题。
2186 | */
2187 | setNavigationBarTitle(obj: {
2188 | /**
2189 | * 页面标题
2190 | */
2191 | title: string;
2192 | /**
2193 | * 接口调用成功的回调函数
2194 | */
2195 | success?: Function;
2196 | /**
2197 | * 接口调用失败的回调函数
2198 | */
2199 | fail?: Function;
2200 | /**
2201 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2202 | */
2203 | complete?: Function;
2204 | }): void;
2205 |
2206 | /**
2207 | * 在当前页面显示导航条加载动画。
2208 | */
2209 | showNavigationBarLoading(): void;
2210 |
2211 | /**
2212 | * 隐藏导航条加载动画。
2213 | */
2214 | hideNavigationBarLoading(): void;
2215 |
2216 | /**
2217 | * 保留当前页面,跳转到应用内的某个页面,使用wx.navigateBack可以返回到原页面。
2218 | */
2219 | navigateTo(obj: {
2220 | /**
2221 | * 需要跳转的应用内非 tabBar 的页面的路径 , 路径后可以带参数。参数与路径之间使用?分隔,参数键与参数值用=相连,不同参数用&分隔;如 'path?key=value&key2=value2'
2222 | */
2223 | url: string;
2224 | /**
2225 | * 接口调用成功的回调函数
2226 | */
2227 | success?: Function;
2228 | /**
2229 | * 接口调用失败的回调函数
2230 | */
2231 | fail?: Function;
2232 | /**
2233 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2234 | */
2235 | complete?: Function;
2236 | }): void;
2237 |
2238 | /**
2239 | * 关闭当前页面,跳转到应用内的某个页面。
2240 | */
2241 | redirectTo(obj: {
2242 | /**
2243 | * 需要跳转的应用内非 tabBar 的页面的路径,路径后可以带参数。参数与路径之间使用?分隔,参数键与参数值用=相连,不同参数用&分隔;如 'path?key=value&key2=value2'
2244 | */
2245 | url: string;
2246 | /**
2247 | * 接口调用成功的回调函数
2248 | */
2249 | success?: Function;
2250 | /**
2251 | * 接口调用失败的回调函数
2252 | */
2253 | fail?: Function;
2254 | /**
2255 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2256 | */
2257 | complete?: Function;
2258 | }): void;
2259 |
2260 | reLaunch(obj: {
2261 | /**
2262 | * 需要跳转的应用内页面路径 , 路径后可以带参数。参数与路径之间使用?分隔,参数键与参数值用=相连,不同参数用&分隔;如 'path?key=value&key2=value2',如果跳转的页面路径是 tabBar 页面则不能带参数
2263 | */
2264 | url: string;
2265 | /**
2266 | * 接口调用成功的回调函数
2267 | */
2268 | success?: Function;
2269 | /**
2270 | * 接口调用失败的回调函数
2271 | */
2272 | fail?: Function;
2273 | /**
2274 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2275 | */
2276 | complete?: Function;
2277 | }): void;
2278 |
2279 | /**
2280 | * 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面
2281 | */
2282 | switchTab(obj: {
2283 | /**
2284 | * 需要跳转的 tabBar 页面的路径(需在 app.json 的 tabBar 字段定义的页面),路径后不能带参数
2285 | */
2286 | url: string;
2287 | /**
2288 | * 接口调用成功的回调函数
2289 | */
2290 | success?: Function;
2291 | /**
2292 | * 接口调用失败的回调函数
2293 | */
2294 | fail?: Function;
2295 | /**
2296 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2297 | */
2298 | complete?: Function;
2299 | }): void;
2300 |
2301 | /**
2302 | * 关闭当前页面,返回上一页面或多级页面。可通过 getCurrentPages()) 获取当前的页面栈,决定需要返回几层。
2303 | */
2304 | navigateBack(obj: {
2305 | /**
2306 | * 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
2307 | */
2308 | delta?: number;
2309 | }): void;
2310 |
2311 | /**
2312 | * 创建一个动画实例animation。调用实例的方法来描述动画。最后通过动画实例的export方法导出动画数据传递给组件的animation属性。
2313 | */
2314 | createAnimation(obj: {
2315 | /**
2316 | * 400
2317 | */
2318 | duration?: number;
2319 | /**
2320 | * "linear"
2321 | */
2322 | timingFunction?: string;
2323 | /**
2324 | * 0
2325 | */
2326 | delay?: number;
2327 | /**
2328 | * "50% 50% 0"
2329 | */
2330 | transformOrigin?: string;
2331 | }): IAnimation;
2332 |
2333 | pageScrollTo(obj: {
2334 | /**
2335 | * 滚动到页面的目标位置(单位px)
2336 | */
2337 | scrollTop: number;
2338 | }): void;
2339 |
2340 | /**
2341 | * 创建 canvas 绘图上下文(指定 canvasId).Tip: 需要指定 canvasId,该绘图上下文只作用于对应的
2342 | */
2343 | createCanvasContext(canvasId: string): ICanvasContext;
2344 |
2345 | /**
2346 | * 把当前画布的内容导出生成图片,并返回文件路径
2347 | */
2348 | canvasToTempFilePath(canvasId: string): void;
2349 |
2350 | startPullDownRefresh(obj: {
2351 | /**
2352 | * 接口调用成功的回调函数
2353 | */
2354 | success?: Function;
2355 | /**
2356 | * 接口调用失败的回调函数
2357 | */
2358 | fail?: Function;
2359 | /**
2360 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2361 | */
2362 | complete?: Function;
2363 | }): void;
2364 |
2365 | /**
2366 | * 停止当前页面下拉刷新。
2367 | */
2368 | stopPullDownRefresh(): void;
2369 |
2370 | // # WXML节点信息 #
2371 |
2372 | // # 第三方平台 #
2373 |
2374 | getExtConfig(obj: {
2375 | /**
2376 | * 返回第三方平台自定义的数据
2377 | */
2378 | success?: Function;
2379 | /**
2380 | * 接口调用失败的回调函数
2381 | */
2382 | fail?: Function;
2383 | /**
2384 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2385 | */
2386 | complete?: Function;
2387 | }): void;
2388 |
2389 | getExtConfigSync(): void;
2390 |
2391 | // # 开放接口 #
2392 |
2393 | /**
2394 | * 调用接口获取登录凭证(code)进而换取用户登录态信息,包括用户的唯一标识(openid) 及本次登录的 会话密钥(session_key)。用户数据的加解密通讯需要依赖会话密钥完成。
2395 | */
2396 | login(obj: {
2397 | /**
2398 | * 接口调用成功的回调函数
2399 | */
2400 | success?: Function;
2401 | /**
2402 | * 接口调用失败的回调函数
2403 | */
2404 | fail?: Function;
2405 | /**
2406 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2407 | */
2408 | complete?: Function;
2409 | }): void;
2410 |
2411 | /**
2412 | * 通过上述接口获得的用户登录态拥有一定的时效性。用户越久未使用小程序,用户登录态越有可能失效。反之如果用户一直在使用小程序,则用户登录态一直保持有效。具体时效逻辑由微信维护,对开发者透明。开发者只需要调用wx.checkSession接口检测当前用户登录态是否有效。登录态过期后开发者可以再调用wx.login获取新的用户登录态。
2413 | */
2414 | checkSession(obj: {
2415 | /**
2416 | * 接口调用成功的回调函数,登录态未过期
2417 | */
2418 | success?: Function;
2419 | /**
2420 | * 接口调用失败的回调函数,登录态已过期
2421 | */
2422 | fail?: Function;
2423 | /**
2424 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2425 | */
2426 | complete?: Function;
2427 | }): void;
2428 |
2429 | authorize(obj: {
2430 | /**
2431 | * 需要获取权限的scope,详见 scope 列表
2432 | */
2433 | scope: string;
2434 | /**
2435 | * 接口调用成功的回调函数
2436 | */
2437 | success?: Function;
2438 | /**
2439 | * 接口调用失败的回调函数
2440 | */
2441 | fail?: Function;
2442 | /**
2443 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2444 | */
2445 | complete?: Function;
2446 | }): void;
2447 |
2448 | /**
2449 | * 获取用户信息,withCredentials 为 true 时需要先调用 wx.login 接口。
2450 | */
2451 | getUserInfo(obj: {
2452 | /**
2453 | * 是否带上登录态信息
2454 | */
2455 | withCredentials?: boolean;
2456 | /**
2457 | * 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文
2458 | */
2459 | lang?: string;
2460 | /**
2461 | * 接口调用成功的回调函数
2462 | */
2463 | success?: Function;
2464 | /**
2465 | * 接口调用失败的回调函数
2466 | */
2467 | fail?: Function;
2468 | /**
2469 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2470 | */
2471 | complete?: Function;
2472 | }): void;
2473 |
2474 | /**
2475 | * 发起微信支付。
2476 | */
2477 | requestPayment(obj: {
2478 | /**
2479 | * 时间戳从1970年1月1日00:00:00至今的秒数,即当前的时间
2480 | */
2481 | timeStamp: string;
2482 | /**
2483 | * 随机字符串,长度为32个字符以下。
2484 | */
2485 | nonceStr: string;
2486 | /**
2487 | * 统一下单接口返回的 prepay_id 参数值,提交格式如:prepay_id=*
2488 | */
2489 | package: string;
2490 | /**
2491 | * 签名算法,暂支持 MD5
2492 | */
2493 | signType: string;
2494 | /**
2495 | * 签名,具体签名方案参见小程序支付接口文档;
2496 | */
2497 | paySign: string;
2498 | /**
2499 | * 接口调用成功的回调函数
2500 | */
2501 | success?: Function;
2502 | /**
2503 | * 接口调用失败的回调函数
2504 | */
2505 | fail?: Function;
2506 | /**
2507 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2508 | */
2509 | complete?: Function;
2510 | }): void;
2511 |
2512 | chooseAddress(obj: {
2513 | /**
2514 | * 返回用户选择的收货地址信息
2515 | */
2516 | success?: Function;
2517 | /**
2518 | * 接口调用失败的回调函数
2519 | */
2520 | fail?: Function;
2521 | /**
2522 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2523 | */
2524 | complete?: Function;
2525 | }): void;
2526 |
2527 | addCard(obj: {
2528 | /**
2529 | * 需要添加的卡券列表,列表内对象说明请参见请求对象说明
2530 | */
2531 | cardList: undefined;
2532 | /**
2533 | * 接口调用成功的回调函数
2534 | */
2535 | success?: Function;
2536 | /**
2537 | * 接口调用失败的回调函数
2538 | */
2539 | fail?: Function;
2540 | /**
2541 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2542 | */
2543 | complete?: Function;
2544 | }): void;
2545 |
2546 | openCard(obj: {
2547 | /**
2548 | * 需要打开的卡券列表,列表内参数详见openCard 请求对象说明
2549 | */
2550 | cardList: undefined;
2551 | /**
2552 | * 接口调用成功的回调函数
2553 | */
2554 | success?: Function;
2555 | /**
2556 | * 接口调用失败的回调函数
2557 | */
2558 | fail?: Function;
2559 | /**
2560 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2561 | */
2562 | complete?: Function;
2563 | }): void;
2564 |
2565 | openSetting(obj: {
2566 | /**
2567 | * 接口调用成功的回调函数,返回内容详见返回参数说明。
2568 | */
2569 | success?: Function;
2570 | /**
2571 | * 接口调用失败的回调函数
2572 | */
2573 | fail?: Function;
2574 | /**
2575 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2576 | */
2577 | complete?: Function;
2578 | }): void;
2579 |
2580 | getSetting(obj: {
2581 | /**
2582 | * 接口调用成功的回调函数,返回内容详见返回参数说明。
2583 | */
2584 | success?: Function;
2585 | /**
2586 | * 接口调用失败的回调函数
2587 | */
2588 | fail?: Function;
2589 | /**
2590 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2591 | */
2592 | complete?: Function;
2593 | }): void;
2594 |
2595 | getWeRunData(obj: {
2596 | /**
2597 | * 接口调用成功的回调函数
2598 | */
2599 | success?: Function;
2600 | /**
2601 | * 接口调用失败的回调函数
2602 | */
2603 | fail?: Function;
2604 | /**
2605 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2606 | */
2607 | complete?: Function;
2608 | }): void;
2609 |
2610 | navigateToMiniProgram(obj: {
2611 | /**
2612 | * 要打开的小程序 appId
2613 | */
2614 | appId: string;
2615 | /**
2616 | * 打开的页面路径,如果为空则打开首页
2617 | */
2618 | path?: string;
2619 | /**
2620 | * 需要传递给目标小程序的数据,目标小程序可在 App.onLaunch(),App.onShow() 中获取到这份数据。详情
2621 | */
2622 | extraData?: any;
2623 | /**
2624 | * 要打开的小程序版本,有效值 develop(开发版),trial(体验版),release(正式版) ,仅在当前小程序为开发版或体验版时此参数有效;如果当前小程序是体验版或正式版,则打开的小程序必定是正式版。默认值 release
2625 | */
2626 | envVersion?: string;
2627 | /**
2628 | * 接口调用成功的回调函数
2629 | */
2630 | success?: Function;
2631 | /**
2632 | * 接口调用失败的回调函数
2633 | */
2634 | fail?: Function;
2635 | /**
2636 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2637 | */
2638 | complete?: Function;
2639 | }): void;
2640 |
2641 | chooseInvoiceTitle(obj: {
2642 | /**
2643 | * 接口调用成功的回调函数
2644 | */
2645 | success?: Function;
2646 | /**
2647 | * 接口调用失败的回调函数
2648 | */
2649 | fail?: Function;
2650 | /**
2651 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2652 | */
2653 | complete?: Function;
2654 | }): void;
2655 |
2656 | checkIsSupportSoterAuthentication(obj: {
2657 | /**
2658 | * 接口调用成功的回调函数
2659 | */
2660 | success?: Function;
2661 | /**
2662 | * 接口调用失败的回调函数
2663 | */
2664 | fail?: Function;
2665 | /**
2666 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2667 | */
2668 | complete?: Function;
2669 | }): void;
2670 |
2671 | // # 数据 #
2672 |
2673 | /**
2674 | * 自定义分析数据上报接口。使用前,需要在小程序管理后台自定义分析中新建事件,配置好事件名与字段。
2675 | */
2676 | reportAnalytics(eventName: string, data: string, ): void;
2677 |
2678 | // # 拓展接口 #
2679 |
2680 | arrayBufferToBase64(arrayBuffer: string): void;
2681 |
2682 | base64ToArrayBuffer(base64: string): void;
2683 |
2684 | // # 调试接口 #
2685 |
2686 | setEnableDebug(obj: {
2687 | /**
2688 | * 是否打开调试
2689 | */
2690 | enableDebug: boolean;
2691 | /**
2692 | * 接口调用成功的回调函数
2693 | */
2694 | success?: Function;
2695 | /**
2696 | * 接口调用失败的回调函数
2697 | */
2698 | fail?: Function;
2699 | /**
2700 | * 接口调用结束的回调函数(调用成功、失败都会执行)
2701 | */
2702 | complete?: Function;
2703 | }): void;
2704 |
2705 | }
--------------------------------------------------------------------------------
/02-bilibiili/utils/util.js:
--------------------------------------------------------------------------------
1 | const formatTime = date => {
2 | const year = date.getFullYear()
3 | const month = date.getMonth() + 1
4 | const day = date.getDate()
5 | const hour = date.getHours()
6 | const minute = date.getMinutes()
7 | const second = date.getSeconds()
8 |
9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
10 | }
11 |
12 | const formatNumber = n => {
13 | n = n.toString()
14 | return n[1] ? n : '0' + n
15 | }
16 |
17 | module.exports = {
18 | formatTime: formatTime
19 | }
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WX-bilibili-Demo
2 |
3 | ## 久 等 了
4 |
5 | 本Demo成品来自B站教程视频,如想看原视频,请移步:https://www.bilibili.com/video/av40455083/
6 |
7 |
8 | # 新人一定要看使用须知,一定要看使用须知,一定要看使用须知,重要的事情要说三遍
9 |
10 | ## 使用须知及Q&A
11 |
12 | ## **如何解决视频中的font-awesome问题**
13 |
14 | - 使用CSS转wxss功能将整个font-awesome的文件打包成wxss格式(只使用两个图标但导入整个库有点不划算)
15 | - 使用SVG文件的图标,再通过阿里巴巴icon的项目下载功能打包到本地成为字体文件(有点麻烦)
16 | - 使用png图像,并使用image标签代替视频中的i标签或view标签(推荐,记得在wxss中限制大小)
17 | - 使用base64压缩功能将小图片文件转换为base64格式并使用image标签代替i标签或view标签引入(个人使用,优点是不用多放几张图,缺点是会增加wxml的大小以及降低代码可读性)
18 | - 跟黑马的老师py一下把文件要过来
19 |
20 | ### 如何引入到自己的项目中使用
21 |
22 | - 使用命令行,在命令行中输入以下命令将项目Clone至本机中,在微信开发者工具中导入项目即可
23 |
24 | > git clone https://github.com/iMisty/WX-bilibili-Demo.git
25 |
26 | - 点击项目右上角的 Clone or download ,选择 Download ZIP ,将文件下载到本地中,解压缩后使用微信开发者工具导入
27 |
28 | ### 如何在自己的手机上测试
29 |
30 | 没有任何文章比官方文档更权威了:https://developers.weixin.qq.com/miniprogram/dev/
31 |
32 | ### 为什么接口数据非常缓慢
33 |
34 | 接口速度取决于你的网络速度,这个和接口服务器有关
35 |
36 | ### 为什么视频链接只能点开4个
37 |
38 | 可能是为了节省流量(?)吧,接口的视频链接那已经只能读取出4个了
39 |
40 | ### 我想要把这个小程序上线怎么弄?
41 |
42 | 微信小程序的审核麻烦得要死(3分钟内连续拿出5次手机扫码),我已经放弃了,如果你有兴趣和耐心的话可以试试
43 |
44 | ### 这些代码格式怎么看着怪怪的
45 |
46 | 如果你有Vue的基础的话,这个其实很简单就能看懂了的,关于Vue,可以点这里(官方文档):https://cn.vuejs.org
47 |
48 | ### 想要做小程序得要会什么
49 |
50 | HTML/CSS,JavaScript即可.其中JavaScript最好是会ES6的语法,而Vue的话如果打算使用mpvue之类的框架来写小程序的话可以了解,如果只想用原生的话那么看一下就行
51 |
52 | ### 效果图
53 |
54 | 
55 | 
--------------------------------------------------------------------------------