├── LICENSE
├── README.md
├── app.js
├── app.json
├── app.wxss
├── biliang
├── .DS_Store
├── res
│ ├── gradient_circle.png
│ └── gradient_dot.png
└── scan
│ ├── scanbar.js
│ ├── scanbar.wxml
│ └── scanbar.wxss
├── components
├── calendar
│ ├── calendar.js
│ ├── calendar.json
│ ├── calendar.wxml
│ └── calendar.wxss
├── calibration-instrument
│ ├── calibration-instrument.js
│ ├── calibration-instrument.json
│ ├── calibration-instrument.wxml
│ ├── calibration-instrument.wxss
│ └── instrument.js
├── call-staticstics-cycle
│ ├── call-staticstics-cycle.js
│ ├── call-staticstics-cycle.json
│ ├── call-staticstics-cycle.wxml
│ └── call-staticstics-cycle.wxss
├── canvasdrawer
│ ├── canvasdrawer.js
│ ├── canvasdrawer.json
│ ├── canvasdrawer.wxml
│ └── canvasdrawer.wxss
├── city-picker
│ ├── city-picker.js
│ ├── city-picker.json
│ ├── city-picker.wxml
│ └── city-picker.wxss
├── column-chart
│ ├── chart.js
│ ├── column-chart.js
│ ├── column-chart.json
│ ├── column-chart.wxml
│ └── column-chart.wxss
├── common-list
│ ├── common-list.js
│ ├── common-list.json
│ ├── common-list.wxml
│ └── common-list.wxss
├── common-search-and-history
│ ├── common-search-and-history.js
│ ├── common-search-and-history.json
│ ├── common-search-and-history.wxml
│ └── common-search-and-history.wxss
├── common-search-history
│ ├── common-search-history.js
│ ├── common-search-history.json
│ ├── common-search-history.wxml
│ └── common-search-history.wxss
├── common-search
│ ├── common-search.js
│ ├── common-search.json
│ ├── common-search.wxml
│ └── common-search.wxss
├── date-picker
│ ├── date-picker.js
│ ├── date-picker.json
│ ├── date-picker.wxml
│ └── date-picker.wxss
├── double-column-chart
│ ├── chart.js
│ ├── double-column-chart.js
│ ├── double-column-chart.json
│ ├── double-column-chart.wxml
│ └── double-column-chart.wxss
├── double-column-chart1
│ ├── chart.js
│ ├── double-column-chart.js
│ ├── double-column-chart.json
│ ├── double-column-chart.wxml
│ └── double-column-chart.wxss
├── double-line-chart
│ ├── chart.js
│ ├── double-line-chart.js
│ ├── double-line-chart.json
│ ├── double-line-chart.wxml
│ └── double-line-chart.wxss
├── float-tab
│ ├── float-tab.js
│ ├── float-tab.json
│ ├── float-tab.wxml
│ ├── float-tab.wxss
│ └── tab-item
│ │ ├── tab-item.wxml
│ │ └── tab-item.wxss
├── line-chart
│ ├── chart.js
│ ├── line-chart.js
│ ├── line-chart.json
│ ├── line-chart.wxml
│ └── line-chart.wxss
├── miniprogram_dist
│ ├── index
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ └── poster
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── poster.js
├── mod-process
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── mode-list-item
│ ├── mode-list-item.js
│ ├── mode-list-item.json
│ ├── mode-list-item.wxml
│ └── mode-list-item.wxss
├── popup
│ ├── popup.js
│ ├── popup.json
│ ├── popup.wxml
│ └── popup.wxss
├── poster
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── poster1
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── poster2
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── progress-bar
│ ├── progress-bar.js
│ ├── progress-bar.json
│ ├── progress-bar.wxml
│ ├── progress-bar.wxss
│ └── progress.js
├── progress
│ ├── progress.js
│ ├── progress.json
│ ├── progress.wxml
│ └── progress.wxss
├── progress2
│ ├── progress2.js
│ ├── progress2.json
│ ├── progress2.wxml
│ └── progress2.wxss
├── record-item
│ ├── record-item.js
│ ├── record-item.json
│ ├── record-item.wxml
│ └── record-item.wxss
├── record-tab-list
│ ├── record-tab-list.js
│ ├── record-tab-list.json
│ ├── record-tab-list.wxml
│ └── record-tab-list.wxss
├── slide-delete
│ ├── slide-delete.css
│ ├── slide-delete.js
│ ├── slide-delete.json
│ └── slide-delete.wxml
├── slideBarChart
│ ├── slideBarChart.js
│ ├── slideBarChart.json
│ ├── slideBarChart.wxml
│ └── slideBarChart.wxss
└── tab-cycle
│ ├── tab-cycle.js
│ ├── tab-cycle.json
│ ├── tab-cycle.wxml
│ └── tab-cycle.wxss
├── images
├── 1.png
├── course-first.png
├── dele.png
├── dialog.png
├── ic_about.png
├── ic_about_selected.png
├── ic_component.png
├── ic_component_selected.png
├── ic_input_delete.png
├── ic_left_black_arrow.png
├── ic_left_gray_arrow.png
├── ic_record_next.png
├── ic_record_pause.png
├── ic_record_play.png
├── ic_record_pre.png
├── ic_right_black_arrow.png
├── ic_right_gray_arrow.png
├── ic_search.png
├── ic_search_delete.png
├── icon_163news.png
├── icon_baidu.png
├── icon_cnr.png
├── icon_ifeng.svg
├── icon_sina.svg
├── icon_sohu.svg
├── icon_teiba.png
├── icon_toutiao.svg
├── icon_wangyi163.svg
├── icon_weibo.svg
├── icon_weixin.svg
├── icon_yidian.png
├── icon_zhihu.svg
├── img
│ ├── 0722_tbg1.png
│ ├── 0722_tbg2.png
│ ├── 0723bg.jpg
│ ├── avatar.jpeg
│ ├── share2.png
│ └── wxacode.jpeg
├── loading.svg
├── person.svg
├── person2.svg
├── qqqq.png
├── selected.svg
├── share-app.jpg
├── success.svg
└── test.png
├── package-lock.json
├── pages
├── about
│ ├── about.js
│ ├── about.json
│ ├── about.wxml
│ └── about.wxss
├── calibration-instrument
│ ├── calibration-instrument.js
│ ├── calibration-instrument.json
│ ├── calibration-instrument.wxml
│ └── calibration-instrument.wxss
├── call-statistics-detail
│ ├── call-statistics-detail.js
│ ├── call-statistics-detail.json
│ ├── call-statistics-detail.wxml
│ └── call-statistics-detail.wxss
├── call-statistics
│ ├── call-statistics.js
│ ├── call-statistics.json
│ ├── call-statistics.wxml
│ └── call-statistics.wxss
├── canvasDemo
│ ├── canvasDemo.js
│ ├── canvasDemo.json
│ ├── canvasDemo.wxml
│ └── canvasDemo.wxss
├── circle
│ ├── circle.js
│ ├── circle.json
│ ├── circle.wxml
│ └── circle.wxss
├── city
│ ├── city.js
│ ├── city.json
│ ├── city.wxml
│ └── city.wxss
├── column-chart
│ ├── column-chart.js
│ ├── column-chart.json
│ ├── column-chart.wxml
│ └── column-chart.wxss
├── comon-search-history
│ ├── comon-search-history.js
│ ├── comon-search-history.json
│ ├── comon-search-history.wxml
│ └── comon-search-history.wxss
├── comon-search
│ ├── comon-search.js
│ ├── comon-search.json
│ ├── comon-search.wxml
│ └── comon-search.wxss
├── date
│ ├── date.js
│ ├── date.json
│ ├── date.wxml
│ └── date.wxss
├── delete
│ ├── delete.js
│ ├── delete.json
│ ├── delete.wxml
│ └── delete.wxss
├── double-column-chart
│ ├── double-column-chart.js
│ ├── double-column-chart.json
│ ├── double-column-chart.wxml
│ └── double-column-chart.wxss
├── double-line-chart
│ ├── double-line-chart.js
│ ├── double-line-chart.json
│ ├── double-line-chart.wxml
│ └── double-line-chart.wxss
├── fenxianghaibao
│ ├── fenxianghaibao.js
│ ├── fenxianghaibao.json
│ ├── fenxianghaibao.wxml
│ └── fenxianghaibao.wxss
├── float_tab
│ ├── float_tab.js
│ ├── float_tab.json
│ ├── float_tab.wxml
│ └── float_tab.wxss
├── haibao
│ ├── haibao.js
│ ├── haibao.json
│ ├── haibao.wxml
│ └── haibao.wxss
├── haibao1
│ ├── haibao1.js
│ ├── haibao1.json
│ ├── haibao1.wxml
│ └── haibao1.wxss
├── haibao2
│ ├── haibao2.js
│ ├── haibao2.json
│ ├── haibao2.wxml
│ └── haibao2.wxss
├── haibao3
│ ├── haibao3.js
│ ├── haibao3.json
│ ├── haibao3.wxml
│ └── haibao3.wxss
├── haibao4
│ ├── haibao3.js
│ ├── haibao3.json
│ ├── haibao3.wxml
│ └── haibao3.wxss
├── horizontal-scroll_tab
│ ├── horizontal-scroll_tab.js
│ ├── horizontal-scroll_tab.json
│ ├── horizontal-scroll_tab.wxml
│ └── horizontal-scroll_tab.wxss
├── huadonglizhuti
│ ├── huadonglizhutu.js
│ ├── huadonglizhutu.json
│ ├── huadonglizhutu.wxml
│ └── huadonglizhutu.wxss
├── index
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── jiazaisaomiao
│ ├── jiazaisaomiao.js
│ ├── jiazaisaomiao.json
│ ├── jiazaisaomiao.wxml
│ └── jiazaisaomiao.wxss
├── line-chart
│ ├── line-chart.js
│ ├── line-chart.json
│ ├── line-chart.wxml
│ └── line-chart.wxss
├── line-column-chart
│ ├── line-column-chart.js
│ ├── line-column-chart.json
│ ├── line-column-chart.wxml
│ └── line-column-chart.wxss
├── linghuojindutiao
│ ├── linghuojindutiao.js
│ ├── linghuojindutiao.json
│ ├── linghuojindutiao.wxml
│ └── linghuojindutiao.wxss
├── meituan
│ ├── meituan.js
│ ├── meituan.json
│ ├── meituan.wxml
│ └── meituan.wxss
├── mian
│ ├── mian.js
│ ├── mian.json
│ ├── mian.wxml
│ └── mian.wxss
├── posters
│ ├── posters1
│ │ ├── posters1.js
│ │ ├── posters1.json
│ │ ├── posters1.wxml
│ │ └── posters1.wxss
│ └── posters2
│ │ ├── posters2.js
│ │ ├── posters2.json
│ │ ├── posters2.wxml
│ │ └── posters2.wxss
├── progress-bar
│ ├── progress-bar.js
│ ├── progress-bar.json
│ ├── progress-bar.wxml
│ └── progress-bar.wxss
├── share
│ ├── share.js
│ ├── share.json
│ ├── share.wxml
│ └── share.wxss
├── share1
│ ├── share.js
│ ├── share.json
│ ├── share.wxml
│ └── share.wxss
├── slideCharts
│ ├── slideCharts.js
│ ├── slideCharts.json
│ ├── slideCharts.wxml
│ └── slideCharts.wxss
├── study-components
│ ├── study-components.js
│ ├── study-components.json
│ ├── study-components.wxml
│ └── study-components.wxss
├── yuanjindu
│ ├── yuanjindu.js
│ ├── yuanjindu.json
│ ├── yuanjindu.wxml
│ └── yuanjindu.wxss
└── yuanjindu1
│ ├── yuanjindu1.js
│ ├── yuanjindu1.json
│ ├── yuanjindu1.wxml
│ └── yuanjindu1.wxss
├── project.config.json
├── sitemap.json
└── utils
├── canvas.js
├── drawing.js
├── qrCode.js
└── util.js
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 seedling
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
9 | # 优秀的前端开发者,你居然来了.就
10 |
11 | # 点一下 star 吧
12 |
13 | # 很多部分组件不是本人开发的,大部分来源于网络论坛大佬的代码.
14 |
15 | # 少部分组件由本人开发的!
16 |
17 |
18 | # 技术交流
19 | > 大家可以接着往后面更新开发,继续完善这个小程序组件库,有兴趣互相学习的可以加下
20 | > 微信:wm1061214467 回复:wechat
21 |
22 |
23 |
24 | 
25 | 
26 | 
27 | 
28 | 
29 | 
30 | 
31 | 
32 | 
33 | 
34 | 
35 | 
36 | 
37 |
38 | ### 注意要点:
39 |
40 | 1,由于部分功能小程序的基础库需要 1.9.90 才能使用,因此建议使用微信 1.9.90 以上的基础库
41 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function (options) {
4 | //调用API从本地缓存中获取数据
5 | var logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 | var _that = this;
9 | wx: wx.getSystemInfo({
10 | success: function (res) {
11 | _that.systemInfo = res;
12 | }
13 | });
14 | },
15 | getUserInfo: function (cb) {
16 | var that = this
17 | if (this.globalData.userInfo) {
18 | typeof cb == "function" && cb(this.globalData.userInfo)
19 | } else {
20 | //调用登录接口
21 | wx.login({
22 | success: function () {
23 | wx.getUserInfo({
24 | success: function (res) {
25 | that.globalData.userInfo = res.userInfo
26 | typeof cb == "function" && cb(that.globalData.userInfo)
27 | }
28 | })
29 | }
30 | })
31 | }
32 | },
33 | globalData: {
34 | userInfo: null
35 | },
36 |
37 |
38 | /**
39 | * 系统信息
40 | */
41 | systemInfo: null,//系统信息
42 |
43 |
44 | /**
45 | * 音频播放上下文
46 | */
47 | audioContext: null,
48 |
49 | /**
50 | * 获取当前音频上下文
51 | */
52 | getAudioContext: function getAudioContext() {
53 | if (this.audioContext == null) {
54 | this.audioContext = wx.createInnerAudioContext();
55 | }
56 | return this.audioContext;
57 | },
58 |
59 | /**
60 | * 摧毁当前音频上下文
61 | */
62 | destroyAudioContext: function destroyAudioContext() {
63 | if (this.audioContext != null) {
64 | this.audioContext.stop();
65 | this.audioContext.destroy
66 | }
67 | },
68 | })
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/study-components/study-components",
5 | "pages/about/about",
6 | "pages/date/date",
7 | "pages/city/city",
8 | "pages/float_tab/float_tab",
9 | "pages/horizontal-scroll_tab/horizontal-scroll_tab",
10 | "pages/line-chart/line-chart",
11 | "pages/column-chart/column-chart",
12 | "pages/double-line-chart/double-line-chart",
13 | "pages/line-column-chart/line-column-chart",
14 | "pages/double-column-chart/double-column-chart",
15 | "pages/calibration-instrument/calibration-instrument",
16 | "pages/progress-bar/progress-bar",
17 | "pages/call-statistics/call-statistics",
18 | "pages/call-statistics-detail/call-statistics-detail",
19 | "pages/comon-search/comon-search",
20 | "pages/comon-search-history/comon-search-history",
21 | "pages/circle/circle",
22 | "pages/canvasDemo/canvasDemo",
23 | "pages/meituan/meituan",
24 | "pages/linghuojindutiao/linghuojindutiao",
25 | "pages/yuanjindu/yuanjindu",
26 | "pages/yuanjindu1/yuanjindu1",
27 | "pages/delete/delete",
28 | "pages/mian/mian",
29 | "pages/huadonglizhuti/huadonglizhutu",
30 | "pages/slideCharts/slideCharts",
31 | "pages/jiazaisaomiao/jiazaisaomiao",
32 | "pages/share/share",
33 | "pages/share1/share",
34 | "pages/fenxianghaibao/fenxianghaibao",
35 | "pages/haibao/haibao",
36 | "pages/haibao1/haibao1",
37 | "pages/posters/posters1/posters1",
38 | "pages/posters/posters2/posters2",
39 | "pages/haibao2/haibao2",
40 | "pages/haibao3/haibao3",
41 | "pages/haibao4/haibao3"
42 | ],
43 | "window": {
44 | "backgroundTextStyle": "light",
45 | "navigationBarBackgroundColor": "#8C25FF",
46 | "navigationBarTitleText": "自定义组件",
47 | "navigationBarTextStyle": "white"
48 | },
49 | "tabBar": {
50 | "position": "bottom",
51 | "color": "#888888",
52 | "selectedColor": "#8C25FF",
53 | "list": [
54 | {
55 | "pagePath": "pages/index/index",
56 | "text": "组件",
57 | "iconPath": "images/ic_component.png",
58 | "selectedIconPath": "images/ic_component_selected.png"
59 | },
60 | {
61 | "pagePath": "pages/about/about",
62 | "text": "关于",
63 | "iconPath": "images/ic_about.png",
64 | "selectedIconPath": "images/ic_about_selected.png"
65 | }
66 | ]
67 | },
68 | "sitemapLocation": "sitemap.json"
69 | }
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/app.wxss
--------------------------------------------------------------------------------
/biliang/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/biliang/.DS_Store
--------------------------------------------------------------------------------
/biliang/res/gradient_circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/biliang/res/gradient_circle.png
--------------------------------------------------------------------------------
/biliang/res/gradient_dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/biliang/res/gradient_dot.png
--------------------------------------------------------------------------------
/biliang/scan/scanbar.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {{progressPercent}}
22 | %
23 |
24 |
25 |
--------------------------------------------------------------------------------
/biliang/scan/scanbar.wxss:
--------------------------------------------------------------------------------
1 | /*---------- radar start ----------*/
2 |
3 | .radar {
4 | width: 100%;
5 | height: 330px;
6 | position: relative;
7 | }
8 |
9 | .circle_end {
10 | position: absolute;
11 | left: 0;
12 | right: 0;
13 | top: 0;
14 | bottom: 0;
15 | margin: auto;
16 | width: 300px;
17 | height: 300px;
18 | box-sizing: border-box;
19 | border-radius: 50%;
20 | border: 4px solid rgba(255, 255, 255, 0.5);
21 | }
22 |
23 | .circle {
24 | position: absolute;
25 | left: 0;
26 | right: 0;
27 | top: 0;
28 | bottom: 0;
29 | margin: auto;
30 | width: 300px;
31 | height: 300px;
32 | border-radius: 50%;
33 | }
34 |
35 | .gradient_circle {
36 | position: absolute;
37 | top: 0;
38 | left: 0;
39 | }
40 |
41 | .scan {
42 | width: 150px;
43 | height: 150px;
44 | background: linear-gradient(0deg, rgba(40, 168, 252, 0.0), rgba(255, 255, 255, 0.45));
45 | border-radius: 100% 0 0 0;
46 | z-index: 999;
47 | position: relative;
48 | }
49 |
50 | .gradient_dot {
51 | position: absolute;
52 | top: -14px;
53 | right: -14px;
54 | }
55 |
56 | .cursor {
57 | width: 2px;
58 | height: 100%;
59 | background: linear-gradient(0deg, rgba(40, 168, 252, 0.0), rgba(255, 255, 255, 0.45));
60 | position: absolute;
61 | top: 0;
62 | right: 0;
63 | }
64 |
65 | .radar_score {
66 | margin-top: -30px;
67 | margin-left: -80px;
68 | width: 160px;
69 | height: 60px;
70 | text-align: center;
71 | line-height: 60px;
72 | font-size: 60px;
73 | color: #fff;
74 | position: absolute;
75 | top: 50%;
76 | left: 50%;
77 | z-index: 1000;
78 | }
79 |
80 | .radar_score_percent {
81 | display: inline-block;
82 | margin-top: 25px;
83 | margin-left: -15px;
84 | height: 30px;
85 | line-height: 30px;
86 | font-size: 30px;
87 | }
88 |
89 | /*---------- radar end ----------*/
--------------------------------------------------------------------------------
/components/calendar/calendar.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "date-picker": "../date-picker/date-picker"
5 | }
6 | }
--------------------------------------------------------------------------------
/components/calendar/calendar.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{preText}}
6 |
7 | {{content}}
8 |
9 | {{nextText}}
10 |
11 |
12 |
13 |
14 | {{callbackDate.startDate}}
15 | 至
16 | {{callbackDate.endDate}}
17 | 查询
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/components/calendar/calendar.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | justify-content: space-between;
4 | flex-direction: row;
5 | align-items: center;
6 | box-sizing: border-box;
7 | height: 96rpx;
8 | padding-left: 32rpx;
9 | padding-right: 32rpx;
10 | }
11 |
12 | .seletion{
13 | display: flex;
14 | flex-direction: row;
15 | align-items: center;
16 | }
17 |
18 | .letf_arrow,.right_arrow{
19 | width: 15rpx;
20 | height: 25rpx;
21 | flex-shrink: 0;
22 | margin-left: 10rpx;
23 | margin-right: 10rpx;
24 | }
25 |
26 | .date_enable,.date_disable{
27 | flex-shrink: 0;
28 | font-size: 20rpx;
29 | }
30 |
31 | .date_enable{
32 | color: #8A96A0;
33 | }
34 |
35 | .date_disable{
36 | color: #CCCCCC;
37 | }
38 |
39 | .content{
40 | flex-grow: 1;
41 | text-align: center;
42 | clear: #8A96A0;
43 | font-size: 28rpx;
44 | font-weight: 500;
45 | }
46 |
47 | .select_date{
48 | background-color: #F9FAFB;
49 | border-radius:30rpx;
50 | height: 52rpx;
51 | width: 220rpx;
52 | font-size: 22rpx;
53 | line-height: 52rpx;
54 | text-align: center;
55 | color: #555555;
56 | font-weight: 600;
57 | }
58 | .select_center{
59 | font-size: 22rpx;
60 | line-height: 52rpx;
61 | text-align: center;
62 | color: #8A96A0;
63 | flex-grow: 1;
64 | }
65 |
66 | .query,.query_disable{
67 | border-radius:30rpx;
68 | height: 52rpx;
69 | width: 120rpx;
70 | font-size: 24rpx;
71 | line-height: 52rpx;
72 | text-align: center;
73 | color: #FFFFFF;
74 | font-weight: 600;
75 | margin-left: 32rpx;
76 | }
77 |
78 | .query{
79 | background-color: #0077FF;
80 | }
81 |
82 | .query_disable{
83 | background-color: #CCCCCC;
84 | color: #FFFFFF;
85 | }
86 |
--------------------------------------------------------------------------------
/components/calibration-instrument/calibration-instrument.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var instrument = require('instrument.js');
4 |
5 | Component({
6 | properties: {
7 | canvasData: {
8 | type: Object,
9 | value: {},
10 | observer: "onItemsChange"
11 | },
12 | title: {
13 | type: String,
14 | value: '',
15 | observer: "onTitleChange"
16 | },
17 | units: {
18 | type: Array,
19 | value: [],
20 | observer: "onUnitChange"
21 | }
22 | },
23 |
24 | data: {
25 | instrument: null
26 | },
27 |
28 | detached: function detached() {
29 | this.data.instrument = null;
30 | },
31 |
32 | methods: {
33 | onItemsChange: function onItemsChange() {
34 | this.setData({
35 | canvasData: this.data.canvasData
36 | });
37 | if (this.data.instrument == null || this.data.instrument == undefined) {
38 | this.data.instrument = new instrument(this.data.canvasData, this);
39 | } else {
40 | this.data.instrument.updateData(this.data.canvasData);
41 | }
42 | },
43 | onTitleChange: function onTitleChange() {
44 | this.setData({
45 | title: this.data.title
46 | });
47 | },
48 | onUnitChange: function onUnitChange() {
49 | this.setData({
50 | units: this.data.units
51 | });
52 | },
53 | }
54 |
55 | });
--------------------------------------------------------------------------------
/components/calibration-instrument/calibration-instrument.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/calibration-instrument/calibration-instrument.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
6 | {{item.title}}
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/components/calibration-instrument/calibration-instrument.wxss:
--------------------------------------------------------------------------------
1 | .line_chart_container {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 42rpx 32rpx 56rpx;
7 | }
8 | .line_chart_title_container {
9 | display: flex;
10 | flex-direction: row;
11 | justify-content: space-between;
12 | align-items: center;
13 | margin-bottom: 28rpx;
14 | width: 100%;
15 | }
16 | .line_chart_title_type {
17 | line-height: 34rpx;
18 | font-size: 24rpx;
19 | text-align: left;
20 | flex-grow: 1;
21 | color: #1A173B;
22 | }
23 | .line_chart_unit_color {
24 | width: 32rpx;
25 | height: 10rpx;
26 | margin: 0 12rpx 0 38rpx;
27 | }
28 | .line_chart_unit_title {
29 | line-height: 28rpx;
30 | font-size: 20rpx;
31 | text-align: right;
32 | color: #8A96A0;
33 | }
34 |
--------------------------------------------------------------------------------
/components/call-staticstics-cycle/call-staticstics-cycle.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Component({
4 | properties: {
5 | data: {
6 | type: Object,
7 | value: {
8 | },
9 | observer: "onDataChange"
10 | },
11 | dateType: {
12 | type: String,
13 | value: '',
14 | },
15 | },
16 |
17 |
18 | data: {
19 | dateType:""
20 | },
21 |
22 |
23 | methods: {
24 | onDataChange: function onDataChange() {
25 | this.setData({
26 | data: this.data.data,
27 | });
28 | },
29 |
30 | /**
31 | * 日期选择回调
32 | * @param {*} e
33 | */
34 | onCallbackDate: function onCallbackDate(e) {
35 | console.log(e);
36 | },
37 |
38 | }
39 | });
--------------------------------------------------------------------------------
/components/call-staticstics-cycle/call-staticstics-cycle.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "calendar":"../../components/calendar/calendar"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/components/call-staticstics-cycle/call-staticstics-cycle.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/components/call-staticstics-cycle/call-staticstics-cycle.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | flex-direction: row
3 | }
4 |
--------------------------------------------------------------------------------
/components/canvasdrawer/canvasdrawer.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/canvasdrawer/canvasdrawer.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/canvasdrawer/canvasdrawer.wxss:
--------------------------------------------------------------------------------
1 | .board {
2 | position: fixed;
3 | top: 2000rpx;
4 | }
--------------------------------------------------------------------------------
/components/city-picker/city-picker.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/city-picker/city-picker.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 取消
7 |
8 |
9 | 确认
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{item.province_name}}
17 |
18 |
19 |
20 |
21 | {{item.city_name}}
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/components/city-picker/city-picker.wxss:
--------------------------------------------------------------------------------
1 | .city-picker {
2 | position: absolute;
3 | top: 0;
4 | left: 0;
5 | margin: 0;
6 | padding: 0;
7 | width: 100%;
8 | height: 100%;
9 | z-index: 9;
10 | }
11 |
12 | .city-picker-mask {
13 | position: absolute;
14 | top: 0;
15 | left: 0;
16 | background-color: #353535;
17 | opacity: 0.3;
18 | width: 100%;
19 | height: 100%;
20 | z-index: 10;
21 | }
22 |
23 | .city-picker-content {
24 | position: absolute;
25 | bottom: 64rpx;
26 | left: 0;
27 | width: 654rpx;
28 | height: 474rpx;
29 | margin-right: 48rpx;
30 | margin-left: 48rpx;
31 | border-radius: 8px;
32 | background-color: #fff;
33 | z-index: 33;
34 | overflow: hidden;
35 | }
36 |
37 | .hover-class{
38 | background-color: #e6e6e6;
39 | }
40 |
41 | .city-picker-content-top {
42 | display: flex;
43 | flex-direction: row;
44 | align-items: center;
45 | height: 112rpx;
46 | justify-content: space-between;
47 | }
48 |
49 | .city-picker-content-line {
50 | background-color: #d3dce6;
51 | height: 1px;
52 | width: 100%;
53 | }
54 |
55 | .city-picker-content-cancel {
56 | line-height: 50rpx;
57 | height: 50rpx;
58 | font-size: 36rpx;
59 | color: #353535;
60 | padding: 30rpx 48rpx;
61 | }
62 |
63 | .city-picker-content-sure {
64 | line-height: 50rpx;
65 | height: 50rpx;
66 | font-size: 36rpx;
67 | color: #ed373d;
68 | padding: 30rpx 48rpx;
69 | }
70 |
71 | .city-picker-content-center {
72 | display: flex;
73 | flex-direction: row;
74 | align-items: center;
75 | height: 362rpx;
76 | overflow: hidden;
77 | margin-top: 6rpx;
78 | margin-bottom: 6rpx;
79 | justify-content: space-between;
80 | }
81 |
82 | .city-picker-content-item {
83 | width: 50%;
84 | height: 210rpx;
85 | text-align: center;
86 | }
--------------------------------------------------------------------------------
/components/column-chart/column-chart.js:
--------------------------------------------------------------------------------
1 | var chart = require('chart.js');
2 | Component({
3 | properties: {
4 | canvasData: {
5 | type: Object,
6 | value: {},
7 | observer: "onItemsChange"
8 | },
9 | title: {
10 | type: String,
11 | value: '',
12 | observer: "onTitleChange"
13 | },
14 | unit: {
15 | type: String,
16 | value: '',
17 | observer: "onUnitChange"
18 | }
19 | },
20 |
21 | data: {
22 | columnChart: null,
23 | },
24 |
25 | detached: function () {
26 | this.data.columnChart = null;
27 | },
28 |
29 | methods: {
30 | onItemsChange() {
31 | this.setData({
32 | canvasData: this.data.canvasData
33 | });
34 | if (this.data.columnChart == null || this.data.columnChart == undefined) {
35 | this.data.columnChart = new chart(this.data.canvasData, this);
36 | } else {
37 | this.data.columnChart.updateData(this.data.canvasData);
38 | }
39 | },
40 | onTitleChange() {
41 | this.setData({
42 | title: this.data.title,
43 | });
44 |
45 | },
46 | onUnitChange() {
47 | this.setData({
48 | unit: this.data.unit
49 | });
50 | },
51 | onTouchHandler(e) {
52 | if (this.data.columnChart != null) {
53 | this.data.columnChart.scrollStart(e);
54 | }
55 | // console.log('onTouchHandler1');
56 | },
57 | onTouchMoveHandler(e) {
58 | if (this.data.columnChart != null) {
59 | this.data.columnChart.scroll(e);
60 | }
61 | // console.log('onTouchMoveHandler1');
62 | },
63 | onTouchEndHandler(e) {
64 | if (this.data.columnChart != null) {
65 | this.data.columnChart.scrollEnd(e);
66 | }
67 | // console.log('onTouchEndHandler1');
68 | },
69 | }
70 |
71 | });
--------------------------------------------------------------------------------
/components/column-chart/column-chart.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/column-chart/column-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 按渠道
4 | 单位:次
5 |
6 |
7 |
--------------------------------------------------------------------------------
/components/column-chart/column-chart.wxss:
--------------------------------------------------------------------------------
1 | .column_chart_container {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 30rpx 32rpx 60rpx;
7 | }
8 |
9 | .column_chart_title_container{
10 | display: flex;
11 | flex-direction: row;
12 | justify-content: space-between;
13 | align-items: center;
14 | margin-bottom: 32rpx;
15 | flex-shrink: 0;
16 | width: 100%;
17 | }
18 |
19 |
20 | .column_chart_title_type{
21 | line-height: 44rpx;
22 | font-size: 32rpx;
23 | text-align: left;
24 | color: #1A173B;
25 | }
26 |
27 | .column_chart_title_unit{
28 | line-height: 34rpx;
29 | font-size: 24rpx;
30 | text-align: right;
31 | color: #8A96A0;
32 | }
--------------------------------------------------------------------------------
/components/common-list/common-list.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Component({
3 | properties: {
4 | list: {
5 | type: Array,
6 | value: [],
7 | observer: "onListChange"
8 | },
9 | loadMore: {
10 | type: Object,
11 | value: {
12 | enableLoadMore: false,
13 | hasMore: true,
14 | },
15 | observer: "onLoadMoreChange"
16 | },
17 |
18 | },
19 |
20 |
21 | data: {
22 | enableLoadMore: false,
23 | hasMore: true,
24 | },
25 |
26 |
27 | methods: {
28 |
29 | onListChange: function onListChange() {
30 | this.setData({
31 | list: this.data.list,
32 | });
33 | },
34 |
35 | /**
36 | * list里面item内部点击
37 | * 可通过e.detail.clickEvent.target知道是Item内部哪个子控件自身点击事件
38 | * @param {*} e
39 | */
40 | onClickItem: function onClickItem(e) {
41 | // console.log(e);
42 | this.triggerEvent('onClickListItem', e.detail);
43 | },
44 |
45 | /**
46 | * 加载更多控件更新
47 | */
48 | onLoadMoreChange: function onLoadMoreChange() {
49 | this.setData({
50 | enableLoadMore: this.data.loadMore.enableLoadMore,
51 | hasMore: this.data.loadMore.hasMore,
52 | });
53 | },
54 |
55 | }
56 | });
--------------------------------------------------------------------------------
/components/common-list/common-list.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "componentGenerics": {
4 | "list-item": true
5 | }
6 | }
--------------------------------------------------------------------------------
/components/common-list/common-list.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{(listNoMoreDataTip ? listNoMoreDataTip : '没有更多内容了')}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/components/common-list/common-list.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | flex-direction: column;
4 | background-color: #fff;
5 | margin: 0;
6 | padding: 0;
7 | width: 100%;
8 | box-sizing: border-box;
9 | }
10 |
11 | .loadmore_parent {
12 | text-align: center;
13 | flex-shrink: 0;
14 | width: 100%;
15 | background-color: #f8f9fa
16 | }
17 |
18 | .loading {
19 | width: 64rpx;
20 | height: 64rpx;
21 | margin-top: 32rpx;
22 | margin-bottom: 32rpx;
23 | display: inline-block
24 | }
25 |
26 | .loadmore {
27 | font-size: 14rpx;
28 | height: 160rpx;
29 | text-align: center
30 | }
31 |
32 | .loadmore, .loadmore-end-container {
33 | width: 100%
34 | }
35 |
36 | .loadmore-end {
37 | padding-bottom: 48rpx;
38 | padding-top: 48rpx
39 | }
40 |
41 | .loadmore-tip {
42 | width: auto;
43 | display: flex;
44 | flex-direction: row;
45 | justify-content: center;
46 | align-items: center
47 | }
48 |
49 | .loadmore-end-tip {
50 | width: auto;
51 | height: 34rpx;
52 | font-size: 24rpx;
53 | line-height: 34rpx;
54 | margin-right: 14rpx;
55 | margin-left: 14rpx;
56 | display: inline-block;
57 | color: #888;
58 | flex-shrink: 0
59 | }
60 |
61 | .loadmore-end-line {
62 | width: auto;
63 | height: 1px;
64 | flex-grow: 1;
65 | margin-right: 32rpx;
66 | margin-left: 32rpx;
67 | background: #e5e5e5;
68 | display: inline-block;
69 | vertical-align: middle
70 | }
--------------------------------------------------------------------------------
/components/common-search-and-history/common-search-and-history.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "common-search": "/components/common-search/common-search",
5 | "common-search-history": "/components/common-search-history/common-search-history"
6 | }
7 | }
--------------------------------------------------------------------------------
/components/common-search-and-history/common-search-and-history.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/components/common-search-and-history/common-search-and-history.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | background-color: #fff;
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | }
8 |
9 | .container {
10 | flex-direction: column;
11 | }
12 |
--------------------------------------------------------------------------------
/components/common-search-history/common-search-history.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Component({
3 | properties: {
4 | list: {
5 | type: Array,
6 | value: [],
7 | observer: "onListChange"
8 | },
9 | },
10 |
11 |
12 | data: {
13 | },
14 |
15 |
16 | methods: {
17 |
18 | onListChange: function onListChange() {
19 | this.setData({
20 | list: this.data.list,
21 | });
22 | },
23 |
24 | /**
25 | * 点击Item
26 | * @param {*} e
27 | */
28 | onClickItem: function onClickItem(e) {
29 | let data = e.currentTarget.dataset.item;
30 | this.triggerEvent('onClickItem', data);
31 | },
32 |
33 |
34 | /**
35 | * 点击清除历史
36 | * @param {*} e
37 | */
38 | onClickClear: function onClickClear(e) {
39 | this.triggerEvent('onClickClearHistory', {});
40 | },
41 |
42 |
43 | }
44 | });
--------------------------------------------------------------------------------
/components/common-search-history/common-search-history.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "componentGenerics": {
4 | "list-item": true
5 | }
6 | }
--------------------------------------------------------------------------------
/components/common-search-history/common-search-history.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{item}}
6 |
7 |
8 |
9 |
10 |
11 | 清空搜索记录
12 |
13 |
14 |
--------------------------------------------------------------------------------
/components/common-search-history/common-search-history.wxss:
--------------------------------------------------------------------------------
1 | .container,.history_item_container,.clear_history_container {
2 | display: flex;
3 | background-color: #fff;
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | }
8 |
9 | .container {
10 | flex-direction: column;
11 | }
12 |
13 | .history_item_container{
14 | flex-direction: row;
15 | justify-content: space-between;
16 | align-items: center;
17 | padding: 30rpx 0;
18 | margin: 0 32rpx;
19 | border-bottom: 1rpx solid #F6F6F6;
20 | }
21 |
22 | .clear_history_container{
23 | justify-content: center;
24 | align-items: center;
25 | padding: 30rpx 0;
26 | }
27 |
28 | .right_arrow{
29 | width: 15rpx;
30 | height: 25rpx;
31 | flex-shrink: 0;
32 | margin-left: 10rpx;
33 | margin-right: 10rpx;
34 | }
35 |
36 | .history_item_content,.cleart_text{
37 | line-height: 34rpx;
38 | font-size: 24rpx;
39 | flex-shrink: 0;
40 | text-align: center;
41 | color: #333333;
42 | }
43 |
44 | .clear{
45 | width: 25rpx;
46 | height: 24rpx;
47 | flex-shrink: 0;
48 | margin-left: 10rpx;
49 | margin-right: 10rpx;
50 | }
--------------------------------------------------------------------------------
/components/common-search/common-search.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Component({
4 | properties: {
5 | tab_datas: {
6 | type: Array,
7 | value: [],
8 | observer: "onItemsChange"
9 | },
10 |
11 | },
12 |
13 |
14 | data: {
15 | content: '',
16 | searchValue:'',
17 | },
18 |
19 |
20 | methods: {
21 | onItemsChange: function onItemsChange() {
22 | this.setData({
23 |
24 | });
25 | },
26 | bindSearchInput: function bindSearchInput(e) {
27 | this.setData({
28 | content: e.detail.value
29 | })
30 | this.triggerEvent('onSearchInputChange', { content: e.detail.value});
31 | },
32 | onClickClear: function onClickClear(e) {
33 | this.setData({
34 | searchValue:'',
35 | content:''
36 | });
37 | this.triggerEvent('onSearchInputChange', { content: this.data.content});
38 | },
39 | bindConfirmSearch: function bindConfirmSearch(e) {
40 | this.triggerEvent('onClickSubmit', { content: e.detail.value});
41 | },
42 | onClickSearch: function onClickSearch(e) {
43 | this.triggerEvent('onClickSubmit', { content: this.data.content});
44 | },
45 | }
46 | });
--------------------------------------------------------------------------------
/components/common-search/common-search.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/common-search/common-search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 搜索
8 |
--------------------------------------------------------------------------------
/components/common-search/common-search.wxss:
--------------------------------------------------------------------------------
1 | .container{
2 | display: flex;
3 | justify-content: space-between;
4 | align-items: center;
5 | box-sizing: border-box;
6 | }
7 |
8 | .container {
9 | height: 120rpx;
10 | flex-direction: row;
11 | padding: 22rpx 32rpx;
12 | }
13 |
14 |
15 | .search_container{
16 | display: flex;
17 | flex-direction: row;
18 | justify-content: flex-start;
19 | align-items: center;
20 | background-color: #F9FAFB;
21 | border-radius:38rpx;
22 | height: 76rpx;
23 | flex-grow: 1;
24 | box-sizing: border-box;
25 | padding: 20rpx 20rpx;
26 | margin-right: 46rpx;
27 | }
28 |
29 | .letf_search{
30 | width: 24rpx;
31 | height: 24rpx;
32 | flex-shrink: 0;
33 | margin-right: 20rpx;
34 | }
35 |
36 | .input_delete{
37 | width: 40rpx;
38 | height: 40rpx;
39 | flex-shrink: 0;
40 | margin-left: 20rpx;
41 | }
42 |
43 | .search_input{
44 | font-size: 24rpx;
45 | color: #333333;
46 | flex-grow: 1;
47 | }
48 |
49 | .search_placeholder{
50 | font-size: 24rpx;
51 | color: #999999;
52 | }
53 |
54 | .search_btn{
55 | line-height: 40rpx;
56 | font-size: 28rpx;
57 | flex-shrink: 0;
58 | padding: 24rpx 0;
59 | text-align: center;
60 | color: #1A173B;
61 | font-weight: bold;
62 | }
63 |
64 | .tab_item {
65 | flex-direction: column;
66 | position: relative;
67 | }
68 |
69 | .tab_item_checked, .tab_item_normal, .tab_title {
70 | width: 100%;
71 | line-height: 48rpx;
72 | font-size: 28rpx;
73 | flex-grow: 1;
74 | padding: 24rpx 0;
75 | text-align: center;
76 | box-sizing: border-box;
77 | font-weight: bold;
78 | border-bottom: 1px solid #dce0e6
79 | }
80 |
81 | .tab_item_checked {
82 | color: #0077FF;
83 | }
84 |
85 | .tab_item_normal {
86 | color: #1A173B;
87 | }
88 |
89 | .tab-line {
90 | position: absolute;
91 | bottom: 0;
92 | left: 50%;
93 | margin-left: -25rpx;
94 | z-index: 99;
95 | background-color: #0077FF;
96 | width: 50rpx;
97 | height: 6rpx;
98 | }
--------------------------------------------------------------------------------
/components/date-picker/date-picker.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/date-picker/date-picker.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 取消
7 |
8 |
9 | 确认
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{item}}年
17 |
18 |
19 |
20 |
21 | {{item}}月
22 |
23 |
24 |
25 |
26 | {{item}}日
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/components/date-picker/date-picker.wxss:
--------------------------------------------------------------------------------
1 | @keyframes fade-in {
2 | 0% {
3 | top: 1000rpx;
4 | opacity: 0;
5 | }/*初始状态 透明度为0*/
6 |
7 | 40% {
8 | top: 1000rpx;
9 | opcity: 0;
10 | }/*过渡状态 透明度为0*/
11 |
12 | 100% {
13 | margin-top: 0rpx;
14 | opacity: 1;
15 | }/*结束状态 透明度为1*/
16 | }
17 |
18 | .date-picker {
19 | position: absolute;
20 | top: 0;
21 | left: 0;
22 | margin: 0;
23 | padding: 0;
24 | width: 100%;
25 | height: 100%;
26 | z-index: 9;
27 | animation: fade-in 0.5s ease 1 forwards;
28 | }
29 |
30 | .date-picker-mask {
31 | position: absolute;
32 | top: 0;
33 | left: 0;
34 | background-color: #353535;
35 | opacity: 0.3;
36 | width: 100%;
37 | height: 100%;
38 | z-index: 10;
39 | }
40 |
41 | .date-picker-content {
42 | position: absolute;
43 | bottom: 64rpx;
44 | left: 0;
45 | width: 654rpx;
46 | height: 474rpx;
47 | margin-right: 48rpx;
48 | margin-left: 48rpx;
49 | border-radius: 8px;
50 | background-color: #fff;
51 | z-index: 33;
52 | overflow: hidden;
53 | }
54 |
55 | .date-picker-content-top {
56 | display: flex;
57 | flex-direction: row;
58 | align-items: center;
59 | height: 112rpx;
60 | justify-content: space-between;
61 | }
62 |
63 | .hover-class {
64 | background-color: #e6e6e6;
65 | }
66 |
67 | .date-picker-content-line {
68 | background-color: #d3dce6;
69 | height: 1px;
70 | width: 100%;
71 | }
72 |
73 | .date-picker-content-cancel {
74 | line-height: 50rpx;
75 | height: 50rpx;
76 | font-size: 36rpx;
77 | color: #353535;
78 | padding: 30rpx 48rpx;
79 | }
80 |
81 | .date-picker-content-sure {
82 | line-height: 50rpx;
83 | height: 50rpx;
84 | font-size: 36rpx;
85 | color: #ed373d;
86 | padding: 30rpx 48rpx;
87 | }
88 |
89 | .date-picker-content-center {
90 | display: flex;
91 | flex-direction: row;
92 | align-items: center;
93 | height: 362rpx;
94 | overflow: hidden;
95 | margin-top: 6rpx;
96 | margin-bottom: 6rpx;
97 | justify-content: space-between;
98 | }
99 |
100 | .date-picker-content-item {
101 | width: 33.3%;
102 | height: 210rpx;
103 | text-align: center;
104 | }
105 |
--------------------------------------------------------------------------------
/components/double-column-chart/double-column-chart.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var chart = require('chart.js');
4 | Component({
5 | properties: {
6 | canvasData: {
7 | type: Object,
8 | value: {},
9 | observer: "onItemsChange"
10 | },
11 | title: {
12 | type: String,
13 | value: '',
14 | observer: "onTitleChange"
15 | },
16 | units: {
17 | type: Array,
18 | value: [],
19 | observer: "onUnitChange"
20 | }
21 | },
22 |
23 | data: {
24 | columnChart: null
25 | },
26 |
27 | detached: function detached() {
28 | this.data.columnChart = null;
29 | },
30 |
31 | methods: {
32 | onItemsChange: function onItemsChange() {
33 | this.setData({
34 | canvasData: this.data.canvasData
35 | });
36 | if (this.data.columnChart == null || this.data.columnChart == undefined) {
37 | this.data.columnChart = new chart(this.data.canvasData, this);
38 | } else {
39 | this.data.columnChart.updateData(this.data.canvasData);
40 | }
41 | },
42 | onTitleChange: function onTitleChange() {
43 | this.setData({
44 | title: this.data.title
45 | });
46 | },
47 | onUnitChange: function onUnitChange() {
48 | this.setData({
49 | units: this.data.units
50 | });
51 | },
52 | onTouchHandler: function onTouchHandler(e) {
53 | if (this.data.columnChart != null) {
54 | this.data.columnChart.touchstart(e);
55 | }
56 | // console.log('onTouchHandler1');
57 | },
58 | onTouchMoveHandler: function onTouchMoveHandler(e) {
59 | if (this.data.columnChart != null) {
60 | this.data.columnChart.touchmove(e);
61 | }
62 | // console.log('onTouchMoveHandler1');
63 | },
64 | onTouchEndHandler: function onTouchEndHandler(e) {
65 | if (this.data.columnChart != null) {
66 | this.data.columnChart.touchend(e);
67 | }
68 | //console.log('onTouchEndHandler1');
69 | }
70 | }
71 |
72 | });
--------------------------------------------------------------------------------
/components/double-column-chart/double-column-chart.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/double-column-chart/double-column-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
6 | {{item.title}}
7 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/components/double-column-chart/double-column-chart.wxss:
--------------------------------------------------------------------------------
1 | .column_chart_container {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 42rpx 32rpx 56rpx;
7 | }
8 | .column_chart_title_container {
9 | display: flex;
10 | flex-direction: row;
11 | justify-content: space-between;
12 | align-items: center;
13 | margin-bottom: 28rpx;
14 | width: 100%;
15 | }
16 | .column_chart_title_type {
17 | line-height: 34rpx;
18 | font-size: 24rpx;
19 | text-align: left;
20 | flex-grow: 1;
21 | color: #1A173B;
22 | }
23 | .column_chart_unit_color {
24 | width: 32rpx;
25 | height: 10rpx;
26 | margin: 0 12rpx 0 38rpx;
27 | }
28 | .column_chart_unit_title {
29 | line-height: 28rpx;
30 | font-size: 20rpx;
31 | text-align: right;
32 | color: #8A96A0;
33 | }
34 |
--------------------------------------------------------------------------------
/components/double-column-chart1/double-column-chart.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var chart = require('chart.js');
4 | Component({
5 | properties: {
6 | canvasData: {
7 | type: Object,
8 | value: {},
9 | observer: "onItemsChange"
10 | },
11 | title: {
12 | type: String,
13 | value: '',
14 | observer: "onTitleChange"
15 | },
16 | units: {
17 | type: String,
18 | value: [],
19 | observer: "onUnitChange"
20 | }
21 | },
22 |
23 | data: {
24 | columnChart: null
25 | },
26 |
27 | detached: function detached() {
28 | this.data.columnChart = null;
29 | },
30 |
31 | methods: {
32 | onItemsChange: function onItemsChange() {
33 | this.setData({
34 | canvasData: this.data.canvasData
35 | });
36 | if (this.data.columnChart == null || this.data.columnChart == undefined) {
37 | this.data.columnChart = new chart(this.data.canvasData, this);
38 | } else {
39 | this.data.columnChart.updateData(this.data.canvasData);
40 | }
41 | },
42 | onTitleChange: function onTitleChange() {
43 | this.setData({
44 | title: this.data.title
45 | });
46 | },
47 | onUnitChange: function onUnitChange() {
48 | this.setData({
49 | units: this.data.units
50 | });
51 | },
52 | onTouchHandler: function onTouchHandler(e) {
53 | if (this.data.columnChart != null) {
54 | this.data.columnChart.scrollStart(e);
55 | this.data.columnChart.touchstart(e);
56 |
57 | }
58 | // console.log('onTouchHandler1');
59 | },
60 | onTouchMoveHandler: function onTouchMoveHandler(e) {
61 | if (this.data.columnChart != null) {
62 | this.data.columnChart.touchmove(e);
63 | this.data.columnChart.scroll(e);
64 | }
65 | // console.log('onTouchMoveHandler1');
66 | },
67 | onTouchEndHandler: function onTouchEndHandler(e) {
68 | if (this.data.columnChart != null) {
69 | this.data.columnChart.touchend(e);
70 | this.data.columnChart.scrollEnd(e);
71 | }
72 | // console.log('onTouchEndHandler1');
73 | }
74 | }
75 |
76 | });
--------------------------------------------------------------------------------
/components/double-column-chart1/double-column-chart.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/double-column-chart1/double-column-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
6 | {{item.title}}
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/components/double-column-chart1/double-column-chart.wxss:
--------------------------------------------------------------------------------
1 | .column_chart_container {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 42rpx 32rpx 56rpx;
7 | }
8 | .column_chart_title_container {
9 | display: flex;
10 | flex-direction: row;
11 | justify-content: space-between;
12 | align-items: center;
13 | margin-bottom: 28rpx;
14 | width: 100%;
15 | }
16 | .column_chart_title_type {
17 | line-height: 34rpx;
18 | font-size: 24rpx;
19 | text-align: left;
20 | flex-grow: 1;
21 | color: #1A173B;
22 | }
23 | .column_chart_unit_color {
24 | width: 32rpx;
25 | height: 10rpx;
26 | margin: 0 12rpx 0 38rpx;
27 | }
28 | .column_chart_unit_title {
29 | line-height: 28rpx;
30 | font-size: 20rpx;
31 | text-align: right;
32 | color: #8A96A0;
33 | }
34 |
--------------------------------------------------------------------------------
/components/double-line-chart/double-line-chart.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var chart = require('chart.js');
4 |
5 | Component({
6 | properties: {
7 | canvasData: {
8 | type: Object,
9 | value: {},
10 | observer: "onItemsChange"
11 | },
12 | title: {
13 | type: String,
14 | value: '',
15 | observer: "onTitleChange"
16 | },
17 | units: {
18 | type: Array,
19 | value: [],
20 | observer: "onUnitChange"
21 | }
22 | },
23 |
24 | data: { lineChart: null },
25 |
26 | detached: function detached() {
27 | this.data.lineChart = null;
28 | // this.setData({
29 | // canvasData: null,
30 | // });
31 | },
32 |
33 | methods: {
34 | onItemsChange: function onItemsChange() {
35 | this.setData({
36 | canvasData: this.data.canvasData
37 | });
38 | if (this.data.lineChart == null || this.data.lineChart == undefined) {
39 | this.data.lineChart = new chart(this.data.canvasData, this);
40 | } else {
41 | this.data.lineChart.updateData(this.data.canvasData);
42 | }
43 | },
44 | onTitleChange: function onTitleChange() {
45 | this.setData({
46 | title: this.data.title
47 | });
48 | },
49 | onUnitChange: function onUnitChange() {
50 | this.setData({
51 | units: this.data.units
52 | });
53 | },
54 | onTouchHandler: function onTouchHandler(e) {
55 | if (this.data.lineChart != null) {
56 | this.data.lineChart.touchstart(e);
57 | }
58 | // console.log('onTouchHandler1');
59 | },
60 | onTouchMoveHandler: function onTouchMoveHandler(e) {
61 | if (this.data.lineChart != null) {
62 | this.data.lineChart.touchmove(e);
63 | }
64 | // console.log('onTouchMoveHandler1');
65 | },
66 | onTouchEndHandler: function onTouchEndHandler(e) {
67 | if (this.data.lineChart != null) {
68 | this.data.lineChart.touchend(e);
69 | }
70 | // console.log('onTouchEndHandler1');
71 | }
72 | }
73 |
74 | });
--------------------------------------------------------------------------------
/components/double-line-chart/double-line-chart.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/double-line-chart/double-line-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
6 | {{item.title}}
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/components/double-line-chart/double-line-chart.wxss:
--------------------------------------------------------------------------------
1 | .line_chart_container {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 42rpx 32rpx 56rpx;
7 | }
8 | .line_chart_title_container {
9 | display: flex;
10 | flex-direction: row;
11 | justify-content: space-between;
12 | align-items: center;
13 | margin-bottom: 28rpx;
14 | width: 100%;
15 | }
16 | .line_chart_title_type {
17 | line-height: 34rpx;
18 | font-size: 24rpx;
19 | text-align: left;
20 | flex-grow: 1;
21 | color: #1A173B;
22 | }
23 | .line_chart_unit_color {
24 | width: 32rpx;
25 | height: 10rpx;
26 | margin: 0 12rpx 0 38rpx;
27 | }
28 | .line_chart_unit_title {
29 | line-height: 28rpx;
30 | font-size: 20rpx;
31 | text-align: right;
32 | color: #8A96A0;
33 | }
34 |
--------------------------------------------------------------------------------
/components/float-tab/float-tab.js:
--------------------------------------------------------------------------------
1 | // components/float-tab/float-tab.js
2 | Component({
3 | properties: {
4 | items: {
5 | type: Array,
6 | value: [],
7 | },
8 | fixedBar: {
9 | type: Boolean,
10 | value: false,
11 | observer: "onScroll"
12 | }
13 | },
14 |
15 | data: {
16 | showFixedBar: false
17 | },
18 |
19 | methods: {
20 | onTabItemClick(e) {
21 | this.triggerEvent('tabclick', { id: e.currentTarget.dataset.tabs.id });
22 | },
23 | onScroll() {
24 | this.setData({
25 | showFixedBar: this.data.fixedBar
26 | });
27 | }
28 | }
29 | })
30 |
--------------------------------------------------------------------------------
/components/float-tab/float-tab.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/components/float-tab/float-tab.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/components/float-tab/float-tab.wxss:
--------------------------------------------------------------------------------
1 | @import "tab-item/tab-item.wxss";
2 |
3 | .float_container {
4 | position: fixed;
5 | width: 100%;
6 | /*悬停关键样式*/
7 | top: 0;
8 | left: 0;
9 | z-index: 999;
10 | height: 180rpx;
11 | background-color: #ffffff;
12 | }
13 |
14 | .ml_float_tab{
15 | display: flex;
16 | flex-direction: column;
17 | }
18 |
19 | .tab_container {
20 | height: 96rpx;
21 | display: flex;
22 | flex-direction: row;
23 | margin: 32rpx 32rpx 32rpx 32rpx;
24 | justify-content: space-between;
25 | align-items: center;
26 | border: 1px solid #DDDDDD;
27 | box-sizing: border-box;
28 | }
29 |
30 |
31 | .tab_item {
32 | display: flex;
33 | flex-direction: row;
34 | height: 96rpx;
35 | justify-content: center;
36 | align-items: center;
37 | flex-grow: 1;
38 | box-sizing: border-box;
39 | }
40 |
41 | .tab_line {
42 | height: 40rpx;
43 | width: 1px;
44 | z-index: 0;
45 | background-color: #E5E5E5;
46 | }
47 |
48 | .tab_bottom_line {
49 | height: 20rpx;
50 | background-color: #F5F5F5;
51 | }
--------------------------------------------------------------------------------
/components/float-tab/tab-item/tab-item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item.title}}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/components/float-tab/tab-item/tab-item.wxss:
--------------------------------------------------------------------------------
1 | .tab_item {
2 | position: relative;
3 | display: flex;
4 | flex-direction: column;
5 | height: 96rpx;
6 | }
7 |
8 | .tab_item_text_nor {
9 | width: auto;
10 | height: 96rpx;
11 | line-height: 96rpx;
12 | color: #353535;
13 | font-size: 28rpx;
14 | text-align: center;
15 | text-overflow: ellipsis;
16 | display: -webkit-box;
17 | -webkit-line-clamp: 1;
18 | box-sizing: border-box;
19 | -webkit-box-orient: vertical;
20 | }
21 |
22 | .tab_item_text_select {
23 | width: auto;
24 | height: 96rpx;
25 | line-height: 96rpx;
26 | color: #ED373D;
27 | font-size: 28rpx;
28 | text-align: center;
29 | text-overflow: ellipsis;
30 | display: -webkit-box;
31 | -webkit-line-clamp: 1;
32 | -webkit-box-orient: vertical;
33 | box-sizing: border-box;
34 | }
35 |
36 | .tab_item_bottom_line {
37 | position: absolute;
38 | bottom: 0;
39 | left: 50%;
40 | margin-left: -30rpx;
41 | z-index: 99;
42 | background-color: #ED373D;
43 | width: 60rpx;
44 | height: 6rpx;
45 | }
--------------------------------------------------------------------------------
/components/line-chart/line-chart.js:
--------------------------------------------------------------------------------
1 | var chart = require('chart.js');
2 |
3 | Component({
4 | properties: {
5 | canvasData: {
6 | type: Object,
7 | value: {},
8 | observer: "onItemsChange"
9 | },
10 | title: {
11 | type: String,
12 | value: '',
13 | observer: "onTitleChange"
14 | },
15 | units: {
16 | type: Array,
17 | value: [],
18 | observer: "onUnitChange"
19 | }
20 | },
21 |
22 |
23 | data: { lineChart: null, },
24 |
25 | detached: function () {
26 | this.data.lineChart = null;
27 | // this.setData({
28 | // canvasData: null,
29 | // });
30 | },
31 |
32 |
33 | methods: {
34 | onItemsChange() {
35 | this.setData({
36 | canvasData: this.data.canvasData
37 | });
38 | if (this.data.lineChart == null || this.data.lineChart == undefined) {
39 | this.data.lineChart = new chart(this.data.canvasData, this);
40 | } else {
41 | this.data.lineChart.updateData(this.data.canvasData);
42 | }
43 | },
44 | onTitleChange() {
45 | this.setData({
46 | title: this.data.title,
47 | });
48 |
49 | },
50 | onUnitChange() {
51 | this.setData({
52 | units: this.data.units
53 | });
54 | },
55 | onTouchHandler(e) {
56 | if (this.data.lineChart != null) {
57 | this.data.lineChart.touchstart(e);
58 | }
59 | // console.log('onTouchHandler1');
60 | },
61 | onTouchMoveHandler(e) {
62 | if (this.data.lineChart != null) {
63 | this.data.lineChart.touchmove(e);
64 | }
65 | // console.log('onTouchMoveHandler1');
66 | },
67 | onTouchEndHandler(e) {
68 | if (this.data.lineChart != null) {
69 | this.data.lineChart.touchend(e);
70 | }
71 | // console.log('onTouchEndHandler1');
72 | },
73 | }
74 |
75 | });
--------------------------------------------------------------------------------
/components/line-chart/line-chart.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/line-chart/line-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 按时间
4 | 单位:次
5 |
6 |
9 |
--------------------------------------------------------------------------------
/components/line-chart/line-chart.wxss:
--------------------------------------------------------------------------------
1 | .line_chart_container {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 30rpx 32rpx 60rpx;
7 | }
8 |
9 | .line_chart_title_container{
10 | display: flex;
11 | flex-direction: row;
12 | justify-content: space-between;
13 | align-items: center;
14 | // margin-bottom: 32rpx;
15 | flex-shrink: 0;
16 | width: 100%;
17 | }
18 |
19 |
20 | .line_chart_title_type{
21 | line-height: 44rpx;
22 | font-size: 32rpx;
23 | text-align: left;
24 | color: #1A173B;
25 | }
26 |
27 | .line_chart_title_unit{
28 | line-height: 34rpx;
29 | font-size: 24rpx;
30 | text-align: right;
31 | color: #8A96A0;
32 | }
--------------------------------------------------------------------------------
/components/miniprogram_dist/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/miniprogram_dist/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/components/miniprogram_dist/index/index.wxss:
--------------------------------------------------------------------------------
1 | .canvas {
2 | width: 750rpx;
3 | height: 750rpx;
4 | }
5 | .canvas.pro {
6 | position: absolute;
7 | bottom: 0;
8 | left: 0;
9 | transform: translate3d(-9999rpx, 0, 0);
10 | }
11 | .canvas.debug {
12 | position: absolute;
13 | bottom: 0;
14 | left: 0;
15 | border: 1rpx solid #ccc;
16 | }
17 | .poste_btn{
18 | position:fixed;
19 | bottom:150rpx;
20 | width:382rpx;
21 | height:80rpx;
22 | left:50%;
23 | z-index: 99999 !important;
24 | margin-left:-191rpx;
25 | border-radius:20rpx;
26 | background-color:#4FE1B6;
27 | border:1px solid black;
28 | box-sizing:border-box;
29 | font-size:30rpx;
30 | font-family:PingFang-SC-Medium;
31 | color:#fff;
32 | display:flex;
33 | justify-content:center;
34 | align-items:center;
35 |
36 | }
37 | .close-poste {
38 | /* width: 100%;
39 | height: 80rpx;
40 | position: absolute;
41 | bottom: -451rpx; */
42 | text-align: center;
43 | z-index: 99999 !important;
44 | position:fixed;
45 | bottom:30rpx;
46 | width:382rpx;
47 | height:80rpx;
48 | left:50%;
49 | margin-left:-191rpx;
50 | border-radius:20rpx;
51 | background-color:#4FE1B6;
52 | border:1px solid black;
53 | box-sizing:border-box;
54 | font-size:30rpx;
55 | font-family:PingFang-SC-Medium;
56 | color:#fff;
57 | display:flex;
58 | justify-content:center;
59 | align-items:center;
60 |
61 | }
--------------------------------------------------------------------------------
/components/miniprogram_dist/poster/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "we-canvas": "../index/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/components/miniprogram_dist/poster/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/components/miniprogram_dist/poster/index.wxss:
--------------------------------------------------------------------------------
1 | /* pages/haibao1/haibao1.wxss */
2 | .poste_btn{
3 | position:fixed;
4 | bottom:150rpx;
5 | width:382rpx;
6 | height:80rpx;
7 | left:50%;
8 | z-index: 99999 !important;
9 | margin-left:-191rpx;
10 | border-radius:20rpx;
11 | background-color:#4FE1B6;
12 | border:1px solid black;
13 | box-sizing:border-box;
14 | font-size:30rpx;
15 | font-family:PingFang-SC-Medium;
16 | color:#fff;
17 | display:flex;
18 | justify-content:center;
19 | align-items:center;
20 |
21 | }
22 | .close-poste {
23 | /* width: 100%;
24 | height: 80rpx;
25 | position: absolute;
26 | bottom: -451rpx; */
27 | text-align: center;
28 | z-index: 99999 !important;
29 | position:fixed;
30 | bottom:30rpx;
31 | width:382rpx;
32 | height:80rpx;
33 | left:50%;
34 | margin-left:-191rpx;
35 | border-radius:20rpx;
36 | background-color:#4FE1B6;
37 | border:1px solid black;
38 | box-sizing:border-box;
39 | font-size:30rpx;
40 | font-family:PingFang-SC-Medium;
41 | color:#fff;
42 | display:flex;
43 | justify-content:center;
44 | align-items:center;
45 |
46 | }
--------------------------------------------------------------------------------
/components/miniprogram_dist/poster/poster.js:
--------------------------------------------------------------------------------
1 | const defaultOptions = {
2 | selector: '#poster'
3 | };
4 |
5 | function Poster(options = {}) {
6 | options = {
7 | ...defaultOptions,
8 | ...options,
9 | };
10 |
11 | const pages = getCurrentPages();
12 | const ctx = pages[pages.length - 1];
13 |
14 | const poster = ctx.selectComponent(options.selector);
15 | delete options.selector;
16 |
17 | return poster;
18 | };
19 |
20 | Poster.create = (reset = false) => {
21 | const poster = Poster();
22 | if (!poster) {
23 | console.error('请设置组件的id="poster"!!!');
24 | } else {
25 | return Poster().onCreate(reset);
26 | }
27 | }
28 |
29 | export default Poster;
--------------------------------------------------------------------------------
/components/mod-process/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/mod-process/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{activeInfo}}{{countAnimation}}{{requireInfo}}{{requireNum}}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{scaleItem.scale}}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/components/mod-process/index.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | width: 100%;
3 | height: 210rpx;
4 | background: #fff;
5 | position: relative;
6 | }
7 |
8 | .count-info image {
9 | width: 28rpx;
10 | height: 32rpx;
11 | }
12 |
13 | .count-info {
14 | position: relative;
15 | margin: 0 auto;
16 | margin-top: 40rpx;
17 | /* width: 540rpx; */
18 | font-family: DINAlternate-Bold;
19 | font-size: 40rpx;
20 | }
21 |
22 | .process {
23 | margin: 0 auto;
24 | margin-top: 20rpx;
25 | /* width: 540rpx; */
26 | height: 20rpx;
27 | border-radius: 10rpx;
28 | /* background: #9CF0D1; */
29 | position: relative;
30 | z-index: 2;
31 | }
32 |
33 | .process-active {
34 | position: absolute;
35 | top: 0rpx;
36 | left: 0rpx;
37 | width: 0;
38 | height: 20rpx;
39 | border-radius: 10rpx;
40 | /* background: #09CD8A; */
41 | z-index: 2;
42 | }
43 |
44 | .scale-container {
45 | margin: -20rpx auto;
46 | height: 16rpx;
47 | /* width: 540rpx; */
48 | position: relative;
49 | z-index: 1;
50 | }
51 |
52 | .success {
53 | position: absolute;
54 | background: #fff;
55 | border-radius: 50%;
56 | top: -8rpx;
57 | width: 44rpx;
58 | height: 44rpx;
59 | z-index: 3;
60 | top: -12rpx;
61 | transform: scale(0.2);
62 | }
63 |
64 | .num {
65 | position: absolute;
66 | margin-left: 74rpx;
67 | }
68 |
69 | .scale {
70 | position: absolute;
71 | top: 14rpx;
72 | height: 16rpx;
73 | width: 2rpx;
74 | background: #09CD8A;
75 | }
76 |
77 | .scale-num {
78 | position: absolute;
79 | top: 40rpx;
80 | font-family: PingFangSC-Regular;
81 | font-size: 22rpx;
82 | color: #CACACD;
83 | text-align: center;
84 | width: 44rpx;
85 | }
86 |
87 | .dsn {
88 | display: none;
89 | }
--------------------------------------------------------------------------------
/components/mode-list-item/mode-list-item.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Component({
4 | properties: {
5 | item: {
6 | type: Object,
7 | value: null,
8 | observer: 'onDataChange'
9 | },
10 | index: {
11 | type: Number,
12 | value: "",
13 | }
14 | },
15 |
16 | data: {
17 | curTime: '00:00',
18 | sliderValue: ''
19 | },
20 |
21 | methods: {
22 | onDataChange: function onDataChange() {
23 | this.setData({
24 | item: this.data.item,
25 | });
26 | },
27 | /**
28 | * 点击播放
29 | * @param {*} e
30 | */
31 | onClickPlay: function onClickPlay(e) {
32 | let data = e.currentTarget.dataset.item;
33 | data.index = this.data.index;
34 | let clickEvent = {};
35 | clickEvent.target = 'play';
36 | data.clickEvent = clickEvent;
37 | this.triggerEvent('onClickItem', data);
38 | },
39 |
40 | }
41 | });
--------------------------------------------------------------------------------
/components/mode-list-item/mode-list-item.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/mode-list-item/mode-list-item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{item.phone+'('+item.name+')'}}
5 | {{item.type + ' | 接电员 : ' + item.rPersonnel + ' | 通话时间:' + item.duration}}
6 | {{item.creatTime}}
7 |
8 |
9 |
10 |
11 | {{curTime}}
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/components/mode-list-item/mode-list-item.wxss:
--------------------------------------------------------------------------------
1 | .container, .content_container, .content,.play_container {
2 | display: flex;
3 | justify-content: space-between;
4 | align-items: center;
5 | box-sizing: border-box;
6 | }
7 |
8 | .container {
9 | flex-direction: column;
10 | }
11 |
12 | .content_container {
13 | width: 100%;
14 | flex-direction: row;
15 | padding: 32rpx;
16 | }
17 |
18 | .content {
19 | flex-direction: column;
20 | }
21 |
22 | .title {
23 | width: 100%;
24 | color: #333333FF;
25 | font-size: 32rpx;
26 | font-weight: 500;
27 | margin-bottom: 8rpx;
28 | line-height: 44rpx;
29 | }
30 |
31 | .des, .time {
32 | width: 100%;
33 | color: #BBBBBBFF;
34 | font-size: 24rpx;
35 | font-weight: 500;
36 | line-height: 36rpx;
37 | }
38 |
39 | .play_icon {
40 | width: 60rpx;
41 | height: 60rpx;
42 | flex-shrink: 0;
43 | margin-left: 10rpx;
44 | }
45 |
46 | .play_container {
47 | background-color: #F9FAFB;
48 | width: 100%;
49 | flex-direction: row;
50 | padding: 24rpx 32rpx;
51 | }
52 |
53 |
54 | .cur_time{
55 | flex-shrink: 0;
56 | color: #BBBBBB;
57 | font-size: 24rpx;
58 | line-height: 32rpx;
59 | margin-right: 30rpx;
60 | }
61 |
62 | .record_slider{
63 | flex-grow: 1;
64 | margin: 0;
65 | }
66 |
67 | .pre ,.next{
68 | width: 20rpx;
69 | height: 16rpx;
70 | flex-shrink: 0;
71 | margin-left: 28rpx;
72 | }
73 |
74 | .line{
75 | width: 100%;
76 | background-color: #EEEEEE;
77 | height: 2rpx;
78 | }
--------------------------------------------------------------------------------
/components/popup/popup.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | multipleSlots: true // 在组件定义时的选项中启用多slot支持
4 | },
5 | /**
6 | * 组件的属性列表
7 | */
8 | properties: {
9 | title: { // 属性名
10 | type: String, // 类型(必填),目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
11 | value: '标题' // 属性初始值(可选),如果未指定则会根据类型选择一个
12 | },
13 | // 弹窗内容
14 | content: {
15 | type: String,
16 | value: '内容'
17 | },
18 | // 弹窗取消按钮文字
19 | btn_no: {
20 | type: String,
21 | value: '取消'
22 | },
23 | // 弹窗确认按钮文字
24 | btn_ok: {
25 | type: String,
26 | value: '确定'
27 | }
28 | },
29 |
30 | /**
31 | * 组件的初始数据
32 | */
33 | data: {
34 | flag: true,
35 | },
36 |
37 | /**
38 | * 组件的方法列表
39 | */
40 | methods: {
41 | //隐藏弹框
42 | hidePopup: function () {
43 | this.setData({
44 | flag: !this.data.flag
45 | })
46 | },
47 | //展示弹框
48 | showPopup () {
49 | this.setData({
50 | flag: !this.data.flag
51 | })
52 | },
53 | /*
54 | * 内部私有方法建议以下划线开头
55 | * triggerEvent 用于触发事件
56 | */
57 | _error () {
58 | //触发取消回调
59 | this.triggerEvent("error")
60 | },
61 | _success () {
62 | //触发成功回调
63 | this.triggerEvent("success");
64 | }
65 | }
66 | })
--------------------------------------------------------------------------------
/components/popup/popup.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/popup/popup.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/popup/popup.wxss:
--------------------------------------------------------------------------------
1 | /* component/popup.wxss */
2 |
3 | .wx-popup {
4 | position: absolute;
5 | left: 0;
6 | top: 0;
7 | width: 100%;
8 | height: 100%;
9 | background: rgba(0, 0, 0, .5);
10 | }
11 |
12 | .popup-container {
13 | position: absolute;
14 | left: 50%;
15 | top: 50%;
16 | width: 80%;
17 | max-width: 600rpx;
18 | border: 2rpx solid #ccc;
19 | border-radius: 10rpx;
20 | box-sizing: bordre-box;
21 | transform: translate(-50%, -50%);
22 | overflow: hidden;
23 | background: #fff;
24 | }
25 |
26 | .wx-popup-title {
27 | width: 100%;
28 | padding: 20rpx;
29 | text-align: center;
30 | font-size: 40rpx;
31 | border-bottom: 2rpx solid red;
32 | }
33 |
34 | .wx-popup-con {
35 | margin: 60rpx 10rpx;
36 | text-align: center;
37 | }
38 |
39 | .wx-popup-btn {
40 | display: flex;
41 | justify-content: space-around;
42 | margin-bottom: 40rpx;
43 | }
44 |
45 | .wx-popup-btn text {
46 | display: flex;
47 | align-items: center;
48 | justify-content: center;
49 | width: 30%;
50 | height: 88rpx;
51 | border: 2rpx solid #ccc;
52 | border-radius: 88rpx;
53 | }
--------------------------------------------------------------------------------
/components/poster/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/components/poster/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/components/poster1/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/components/poster1/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/components/poster2/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/components/poster2/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/components/progress-bar/progress-bar.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var instrument = require('progress.js');
4 |
5 | Component({
6 | properties: {
7 | canvasData: {
8 | type: Object,
9 | value: {},
10 | observer: "onItemsChange"
11 | },
12 | title: {
13 | type: String,
14 | value: '',
15 | observer: "onTitleChange"
16 | },
17 | units: {
18 | type: Array,
19 | value: [],
20 | observer: "onUnitChange"
21 | }
22 | },
23 |
24 | data: {
25 | instrument: null
26 | },
27 |
28 | detached: function detached() {
29 | this.data.instrument = null;
30 | },
31 |
32 | methods: {
33 | onItemsChange: function onItemsChange() {
34 | this.setData({
35 | canvasData: this.data.canvasData
36 | });
37 | if (this.data.instrument == null || this.data.instrument == undefined) {
38 | this.data.instrument = new instrument(this.data.canvasData, this);
39 | } else {
40 | this.data.instrument.updateData(this.data.canvasData);
41 | }
42 | },
43 | onTitleChange: function onTitleChange() {
44 | this.setData({
45 | title: this.data.title
46 | });
47 | },
48 | onUnitChange: function onUnitChange() {
49 | this.setData({
50 | units: this.data.units
51 | });
52 | },
53 | }
54 |
55 | });
--------------------------------------------------------------------------------
/components/progress-bar/progress-bar.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/progress-bar/progress-bar.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/components/progress-bar/progress-bar.wxss:
--------------------------------------------------------------------------------
1 | .line_chart_container {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | align-items: center;
6 | padding: 42rpx 32rpx 56rpx;
7 | }
8 | .line_chart_title_container {
9 | display: flex;
10 | flex-direction: row;
11 | justify-content: space-between;
12 | align-items: center;
13 | margin-bottom: 28rpx;
14 | width: 100%;
15 | }
16 | .line_chart_title_type {
17 | line-height: 34rpx;
18 | font-size: 24rpx;
19 | text-align: left;
20 | flex-grow: 1;
21 | color: #1A173B;
22 | }
23 | .line_chart_unit_color {
24 | width: 32rpx;
25 | height: 10rpx;
26 | margin: 0 12rpx 0 38rpx;
27 | }
28 | .line_chart_unit_title {
29 | line-height: 28rpx;
30 | font-size: 20rpx;
31 | text-align: right;
32 | color: #8A96A0;
33 | }
34 |
--------------------------------------------------------------------------------
/components/progress/progress.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | mutations: true
4 | },
5 | properties: {
6 | //左边角度变化
7 | deg2: {
8 | type: Number,
9 | value: 0
10 | },
11 | //右边角度变化
12 | deg: {
13 | type: Number,
14 | value: 0
15 | },
16 | adminValue: {
17 | type: Number,
18 | value: 70
19 | },
20 | outer: {
21 | type: String,
22 | value: '#F8E5DF'
23 | },
24 | inside: {
25 | type: String,
26 | value: '#ED987D'
27 | }
28 | },
29 | data: {
30 | deg: 0,
31 | deg2: 0,
32 | adminValue: 70, //需要更改的值 其他不用进行修改
33 | outer: '#F8E5DF',
34 | inside: '#ED987D'
35 | },
36 | // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
37 | attached: function () {}, // 此处attached的声明会被lifetimes字段中的声明覆盖
38 | ready: function () {
39 | if (parseInt(this.data.adminValue) <= 50) {
40 | this.data.deg = parseInt(this.data.adminValue) * 3.6;
41 | } else if (parseInt(this.data.adminValue) > 33) {
42 | this.data.deg = 50 * 3.6;
43 | this.data.deg2 = (parseInt(this.data.adminValue) - 50) * 3.6;
44 | }
45 | this.setData({
46 | deg: this.data.deg,
47 | deg2: this.data.deg2,
48 | outer: this.data.outer,
49 | inside: this.data.inside
50 | })
51 | },
52 | /**
53 | * 生命周期函数--监听页面显示
54 | */ // 180deg = 90deg 360 = 180deg 180 = 50 * 3.6
55 | onShow: function () {
56 |
57 | },
58 | methods: {
59 |
60 | }
61 | })
--------------------------------------------------------------------------------
/components/progress/progress.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/progress/progress.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 风险值
11 |
12 | {{adminValue}}
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/components/progress/progress.wxss:
--------------------------------------------------------------------------------
1 | .rt-info-expand {
2 | flex: 1;
3 | margin-left: 20rpx;
4 | text-align: center;
5 | }
6 |
7 | .rt-h2 {
8 | position: relative;
9 | display: inline-block;
10 | font-size: 24rpx;
11 | color: #666666;
12 | width: 128rpx;
13 | height: 128rpx;
14 | border-radius: 64rpx;
15 | }
16 |
17 | .percent-circle {
18 | position: absolute;
19 | height: 100%;
20 | background: #f00;
21 | overflow: hidden;
22 | }
23 |
24 | .percent-circle-right {
25 | right: 0;
26 | width: 64rpx;
27 | border-radius: 0 64rpx 64rpx 0/0 64rpx 64rpx 0;
28 | }
29 |
30 | .percent-circle-right .right-content {
31 | position: absolute;
32 | content: '';
33 | width: 100%;
34 | height: 100%;
35 | transform-origin: left center;
36 | transform: rotate(0deg);
37 | border-radius: 0 64rpx 64rpx 0/0 64rpx 64rpx 0;
38 | }
39 |
40 | .percent-circle-left {
41 | width: 64rpx;
42 | border-radius: 64rpx 0 0 64rpx/64rpx 0 0 64rpx;
43 | }
44 |
45 | .percent-circle-left .left-content {
46 | position: absolute;
47 | content: '';
48 | width: 100%;
49 | height: 100%;
50 | transform-origin: right center;
51 | transform: rotate(0deg);
52 | border-radius: 64rpx 0 0 64rpx/64rpx 0 0 64rpx;
53 | }
54 |
55 | .text-circle {
56 | position: absolute;
57 | font-size: 22rpx;
58 | height: 69%;
59 | width: 88%;
60 | left: 6%;
61 | top: 6%;
62 | border-radius: 100%;
63 | background: #ffffff;
64 | color: #666666;
65 | padding-top: 25rpx;
66 | }
--------------------------------------------------------------------------------
/components/progress2/progress2.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/components/progress2/progress2.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{containerText}}
11 |
12 | {{adminValue}}
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/components/record-item/record-item.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/record-item/record-item.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{item.phone+'('+item.name+')'}}
5 | {{item.type + ' | 接电员 : ' + item.rPersonnel + ' | 通话时间:' + item.duration}}
6 | {{item.creatTime}}
7 |
8 |
9 |
10 |
11 | {{curTime}}
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/components/record-item/record-item.wxss:
--------------------------------------------------------------------------------
1 | .container, .content_container, .content,.play_container {
2 | display: flex;
3 | justify-content: space-between;
4 | align-items: center;
5 | box-sizing: border-box;
6 | }
7 |
8 | .container {
9 | flex-direction: column;
10 | }
11 |
12 | .content_container {
13 | width: 100%;
14 | flex-direction: row;
15 | padding: 32rpx;
16 | }
17 |
18 | .content {
19 | flex-direction: column;
20 | }
21 |
22 | .title {
23 | width: 100%;
24 | color: #333333;
25 | font-size: 32rpx;
26 | font-weight: 500;
27 | margin-bottom: 8rpx;
28 | line-height: 44rpx;
29 | }
30 |
31 | .des, .time {
32 | width: 100%;
33 | color: #BBBBBB;
34 | font-size: 24rpx;
35 | font-weight: 500;
36 | line-height: 36rpx;
37 | }
38 |
39 | .play_icon {
40 | width: 60rpx;
41 | height: 60rpx;
42 | flex-shrink: 0;
43 | margin-left: 10rpx;
44 | }
45 |
46 | .play_container {
47 | background-color: #F9FAFB;
48 | width: 100%;
49 | flex-direction: row;
50 | padding: 24rpx 32rpx;
51 | }
52 |
53 |
54 | .cur_time{
55 | flex-shrink: 0;
56 | color: #BBBBBB;
57 | font-size: 24rpx;
58 | line-height: 32rpx;
59 | margin-right: 30rpx;
60 | }
61 |
62 | .record_slider{
63 | flex-grow: 1;
64 | margin: 0;
65 | }
66 |
67 | .pre ,.next{
68 | width: 20rpx;
69 | height: 16rpx;
70 | flex-shrink: 0;
71 | margin-left: 28rpx;
72 | }
73 |
74 | .line{
75 | width: 100%;
76 | background-color: #EEEEEE;
77 | height: 2rpx;
78 | }
--------------------------------------------------------------------------------
/components/record-tab-list/record-tab-list.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "record-item":"/components/record-item/record-item",
5 | "common-list":"/components/common-list/common-list"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/components/record-tab-list/record-tab-list.wxml:
--------------------------------------------------------------------------------
1 |
2 | 共300 条记录
3 |
4 |
--------------------------------------------------------------------------------
/components/record-tab-list/record-tab-list.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | flex-direction: column;
4 | background-color: #fff;
5 | margin: 0;
6 | padding: 0;
7 | width: 100%;
8 | box-sizing: border-box;
9 | }
10 |
11 | .record_total{
12 | background-color: #F9FAFB;
13 | font-size: 24rpx;
14 | color: #8A96A0FF;
15 | line-height: 34rpx;
16 | height: 76rpx;
17 | box-sizing: border-box;
18 | padding: 22rpx 30rpx;
19 | }
--------------------------------------------------------------------------------
/components/slide-delete/slide-delete.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | position: relative;
3 | }
4 |
5 | .wrap .content {
6 | position: relative;
7 | z-index: 1;
8 | background: #fff;
9 | }
10 |
11 | .wrap .content.animate {
12 | transition: transform 0.3s;
13 | }
14 |
15 | .wrap .action-wrap {
16 | position: absolute;
17 | display: flex;
18 | width: 120rpx;
19 | top: 0;
20 | bottom: 0;
21 | right: 0;
22 | }
23 |
24 | .wrap .action {
25 | display: flex;
26 | width: 120rpx;
27 | height: 100%;
28 | justify-content: center;
29 | align-items: center;
30 | background: #E66671;
31 | }
32 |
33 | .wrap .action text {
34 | font-size: 24rpx;
35 | color: #fff;
36 | }
--------------------------------------------------------------------------------
/components/slide-delete/slide-delete.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 |
4 | }
--------------------------------------------------------------------------------
/components/slide-delete/slide-delete.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 删除
8 |
9 |
10 |
--------------------------------------------------------------------------------
/components/slideBarChart/slideBarChart.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/components/slideBarChart/slideBarChart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 350
5 |
6 |
7 | 300
8 |
9 |
10 | 250
11 |
12 |
13 | 200
14 |
15 |
16 | 150
17 |
18 |
19 | 100
20 |
21 |
22 | 50
23 |
24 |
25 | 0
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | {{item[yName]}}
35 |
36 | {{item[xName]}}
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/components/tab-cycle/tab-cycle.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Component({
4 | properties: {
5 | tab_datas: {
6 | type: Array,
7 | value:[
8 | { id: "day", title: "日", isSelect: true },
9 | { id: "weeks", title: "周", isSelect: false },
10 | { id: "month", title: "月", isSelect: false },
11 | { id: "quarter", title: "季度", isSelect: false },
12 | { id: "custom", title: "自定义", isSelect: false }
13 | ],
14 | observer: "onItemsChange"
15 | },
16 | cur_tab_id: {
17 | type: String,
18 | value: "",
19 | observer: 'onSelectIndexChange'
20 | }
21 | },
22 |
23 |
24 | data: {
25 | defaut_tab_datas: [
26 | { id: "day", title: "日", isSelect: true },
27 | { id: "weeks", title: "周", isSelect: false },
28 | { id: "month", title: "月", isSelect: false },
29 | { id: "quarter", title: "季度", isSelect: false },
30 | { id: "custom", title: "自定义", isSelect: false }
31 | ]
32 | },
33 |
34 |
35 | methods: {
36 | onTabItemClick: function onTabItemClick(e) {
37 | var id = e.currentTarget.dataset.tabs.id;
38 | this.updateData(id);
39 | this.triggerEvent('tabclick', { id: e.currentTarget.dataset.tabs.id });
40 | },
41 | onSelectIndexChange: function onSelectIndexChange() {
42 | var id = this.data.cur_tab_id;
43 | this.updateData(id);
44 | },
45 | updateData: function updateData(id) {
46 | for (var i = 0; i < this.data.tab_datas.length; i++) {
47 | if (id == this.data.tab_datas[i].id) {
48 | this.data.tab_datas[i].isSelect = true;
49 | this.data.cur_tab_id = this.data.tab_datas[i].id;
50 | } else {
51 | this.data.tab_datas[i].isSelect = false;
52 | }
53 | }
54 | this.onItemsChange();
55 | },
56 | onItemsChange: function onItemsChange() {
57 | this.setData({
58 | tab_datas: this.data.tab_datas == null || this.data.tab_datas.length == 0 ? this.data.defaut_tab_datas : this.data.tab_datas
59 | });
60 | }
61 | }
62 | });
--------------------------------------------------------------------------------
/components/tab-cycle/tab-cycle.json:
--------------------------------------------------------------------------------
1 | {"component":true}
--------------------------------------------------------------------------------
/components/tab-cycle/tab-cycle.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item.title}}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/components/tab-cycle/tab-cycle.wxss:
--------------------------------------------------------------------------------
1 | .tab_container {
2 | flex-direction: row
3 | }
4 |
5 | .tab_container, .tab_item {
6 | display: flex;
7 | justify-content: space-between;
8 | align-items: center;
9 | box-sizing: border-box
10 | }
11 |
12 | .tab_item {
13 | flex-direction: column;
14 | position: relative;
15 | }
16 |
17 | .tab_item_checked, .tab_item_normal, .tab_title {
18 | width: 100%;
19 | line-height: 48rpx;
20 | font-size: 28rpx;
21 | flex-grow: 1;
22 | padding: 24rpx 0;
23 | text-align: center;
24 | box-sizing: border-box;
25 | font-weight: bold;
26 | border-bottom: 1px solid #dce0e6
27 | }
28 |
29 | .tab_item_checked {
30 | color: #0077FF;
31 | }
32 |
33 | .tab_item_normal {
34 | color: #1A173B;
35 | }
36 |
37 | .tab-line {
38 | position: absolute;
39 | bottom: 0;
40 | left: 50%;
41 | margin-left: -25rpx;
42 | z-index: 99;
43 | background-color: #0077FF;
44 | width: 50rpx;
45 | height: 6rpx;
46 | }
--------------------------------------------------------------------------------
/images/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/1.png
--------------------------------------------------------------------------------
/images/course-first.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/course-first.png
--------------------------------------------------------------------------------
/images/dele.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/dele.png
--------------------------------------------------------------------------------
/images/dialog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/dialog.png
--------------------------------------------------------------------------------
/images/ic_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_about.png
--------------------------------------------------------------------------------
/images/ic_about_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_about_selected.png
--------------------------------------------------------------------------------
/images/ic_component.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_component.png
--------------------------------------------------------------------------------
/images/ic_component_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_component_selected.png
--------------------------------------------------------------------------------
/images/ic_input_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_input_delete.png
--------------------------------------------------------------------------------
/images/ic_left_black_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_left_black_arrow.png
--------------------------------------------------------------------------------
/images/ic_left_gray_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_left_gray_arrow.png
--------------------------------------------------------------------------------
/images/ic_record_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_record_next.png
--------------------------------------------------------------------------------
/images/ic_record_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_record_pause.png
--------------------------------------------------------------------------------
/images/ic_record_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_record_play.png
--------------------------------------------------------------------------------
/images/ic_record_pre.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_record_pre.png
--------------------------------------------------------------------------------
/images/ic_right_black_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_right_black_arrow.png
--------------------------------------------------------------------------------
/images/ic_right_gray_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_right_gray_arrow.png
--------------------------------------------------------------------------------
/images/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_search.png
--------------------------------------------------------------------------------
/images/ic_search_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/ic_search_delete.png
--------------------------------------------------------------------------------
/images/icon_163news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/icon_163news.png
--------------------------------------------------------------------------------
/images/icon_baidu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/icon_baidu.png
--------------------------------------------------------------------------------
/images/icon_cnr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/icon_cnr.png
--------------------------------------------------------------------------------
/images/icon_teiba.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/icon_teiba.png
--------------------------------------------------------------------------------
/images/icon_wangyi163.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/icon_yidian.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/icon_yidian.png
--------------------------------------------------------------------------------
/images/icon_zhihu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/img/0722_tbg1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/img/0722_tbg1.png
--------------------------------------------------------------------------------
/images/img/0722_tbg2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/img/0722_tbg2.png
--------------------------------------------------------------------------------
/images/img/0723bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/img/0723bg.jpg
--------------------------------------------------------------------------------
/images/img/avatar.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/img/avatar.jpeg
--------------------------------------------------------------------------------
/images/img/share2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/img/share2.png
--------------------------------------------------------------------------------
/images/img/wxacode.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/img/wxacode.jpeg
--------------------------------------------------------------------------------
/images/person.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/images/person2.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/images/qqqq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/qqqq.png
--------------------------------------------------------------------------------
/images/selected.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/images/share-app.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/share-app.jpg
--------------------------------------------------------------------------------
/images/success.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/images/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/images/test.png
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "requires": true,
3 | "lockfileVersion": 1,
4 | "dependencies": {
5 | "wxa-plugin-canvas": {
6 | "version": "1.1.11",
7 | "resolved": "https://registry.npm.taobao.org/wxa-plugin-canvas/download/wxa-plugin-canvas-1.1.11.tgz",
8 | "integrity": "sha1-7GtyGa6DQRZ0omuJGMJ256iKgZA="
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/pages/about/about.js:
--------------------------------------------------------------------------------
1 | // pages/about/about.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 | onTabItemTap(item) {
67 | console.log(item.index)
68 | console.log(item.pagePath)
69 | console.log(item.text)
70 | },
71 | })
--------------------------------------------------------------------------------
/pages/about/about.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/pages/about/about.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 优秀的前端开发者,你居然来了.就
8 | 点一下star吧
9 | 很多部分组件不是本人开发的,大部分来源于网络论坛大佬的代码.
10 | 少部分组件由本人开发的!
11 | 大家可以接着往后面更新开发,继续完善这个小程序组件库,有兴趣互相学习的可以加下Q群
12 |
13 |
--------------------------------------------------------------------------------
/pages/about/about.wxss:
--------------------------------------------------------------------------------
1 | /* pages/about/about.wxss */
2 | .contaner {
3 | width: 750rpx;
4 | height: 100%;
5 | display: flex;
6 | justify-content: center;
7 | }
8 |
9 | .contaner-images {
10 | width: 476rpx;
11 | height: 500rpx;
12 | margin-top: 50rpx;
13 | border-radius: 20rpx;
14 | box-shadow: 10rpx 10rpx 10rpx 10rpx #ccc;
15 | }
16 |
17 | .contaner-text {
18 | width: 600rpx;
19 | margin-top: 50rpx;
20 | border-radius: 20rpx;
21 | box-shadow: 10rpx 10rpx 10rpx 10rpx #ccc;
22 |
23 | }
24 |
25 | .contaner-text-child {
26 | text-shadow: .2rem 0rem .5rem red,
27 | -.2rem 0rem .5rem red,
28 | 0rem .2rem .5rem red,
29 | 0rem -.2rem .5rem red;
30 | }
--------------------------------------------------------------------------------
/pages/calibration-instrument/calibration-instrument.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "刻度盘",
4 | "backgroundColor": "#F5F5F5",
5 | "backgroundTextStyle": "dark",
6 | "usingComponents": {
7 | "calibration-instrument": "../../components/calibration-instrument/calibration-instrument"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/calibration-instrument/calibration-instrument.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/calibration-instrument/calibration-instrument.wxss:
--------------------------------------------------------------------------------
1 | /* pages/date/date.wxss */
--------------------------------------------------------------------------------
/pages/call-statistics-detail/call-statistics-detail.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // 获取全局应用程序实例对象
4 | var app = getApp();
5 |
6 | // 创建页面实例对象
7 | Page({
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | queryDate: {
13 | startDate: "",
14 | endDate: ""
15 | },
16 | tabStatus: [{
17 | id: "all",
18 | title: "全部",
19 | isSelect: true
20 | },
21 | {
22 | id: "hasAnswer",
23 | title: "已接通",
24 | isSelect: false
25 | },
26 | {
27 | id: "hasArchive",
28 | title: "已归档",
29 | isSelect: false
30 | },
31 | {
32 | id: "noAnswer",
33 | title: "未接未回",
34 | isSelect: false
35 | }
36 | ],
37 | tabStatusId: 'all',
38 | onReachBottom: 0,
39 | recordListData: null,
40 | },
41 |
42 |
43 | /**
44 | * 生命周期函数--监听页面加载
45 | */
46 | onLoad: function onLoad(opt) {
47 | if (opt.startDate != undefined && opt.startDate != null && opt.endDate != undefined && opt.endDate != null) {
48 | let queryDate = {};
49 | queryDate.startDate = opt.startDate;
50 | queryDate.endDate = opt.endDate;
51 | this.setData({
52 | queryDate: queryDate,
53 | recordListData: {
54 | queryDate: queryDate
55 | }
56 | });
57 | }
58 | },
59 |
60 | /**
61 | * 生命周期函数--监听页面卸载
62 | */
63 | onUnload: function onUnload(opt) {
64 | getApp().destroyAudioContext(); //摧毁音频对象
65 | },
66 |
67 |
68 | /**
69 | * tab切换
70 | * @param {*} e
71 | */
72 | onClickTabStatus: function onClickTabStatus(e) {
73 | this.setData({
74 | tabStatusId: e.detail.id
75 | })
76 | },
77 |
78 |
79 | /**
80 | * 跳转搜索
81 | * @param {*} e
82 | */
83 | onToSearchClick: function onToSearchClick(e) {
84 | console.log('跳转搜索', this.data.queryDate);
85 | },
86 |
87 |
88 | onReachBottom: function onReachBottom() {
89 | console.log('onReachBottom');
90 | this.setData({
91 | onReachBottom: this.data.onReachBottom + 1
92 | });
93 | },
94 |
95 | });
--------------------------------------------------------------------------------
/pages/call-statistics-detail/call-statistics-detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarBackgroundColor": "#1F2D3D",
3 | "navigationBarTextStyle": "white",
4 | "navigationBarTitleText": "通用list分页加载,加载更多组件和音频播放结合使用demo",
5 | "backgroundColor": "#FFFFFF",
6 | "backgroundTextStyle": "dark",
7 | "usingComponents": {
8 | "tab-call-status": "/components/tab-cycle/tab-cycle",
9 | "record-list": "/components/record-tab-list/record-tab-list"
10 | },
11 | "enablePullDownRefresh": false
12 | }
--------------------------------------------------------------------------------
/pages/call-statistics-detail/call-statistics-detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 搜索关键词
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/pages/call-statistics-detail/call-statistics-detail.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | flex-direction: column;
4 | background-color: #fff;
5 | margin: 0;
6 | padding: 0;
7 | width: 100%;
8 | padding-top: 96rpx;
9 | box-sizing: border-box;
10 | }
11 |
12 | .tab{
13 | position: fixed;
14 | width: 100%;
15 | /*悬停关键样式*/
16 | top: 0;
17 | left: 0;
18 | z-index: 999;
19 | background-color: #fff;
20 | }
21 |
22 | .search_container{
23 | display: flex;
24 | flex-direction: row;
25 | justify-content: flex-start;
26 | align-items: center;
27 | background-color: #F9FAFBFF;
28 | border-radius:38rpx;
29 | height: 76rpx;
30 | box-sizing: border-box;
31 | padding: 20rpx 32rpx;
32 | margin: 22rpx 32rpx;
33 | }
34 |
35 | .letf_search{
36 | width: 24rpx;
37 | height: 24rpx;
38 | flex-shrink: 0;
39 | margin-right: 20rpx;
40 | }
41 |
42 | .text{
43 | font-size: 24rpx;
44 | color: #999999FF;
45 | }
46 |
47 |
48 |
49 |
50 |
51 | page {
52 | width: 100%;
53 | height: 100%;
54 | background-color: #fff;
55 | }
56 |
--------------------------------------------------------------------------------
/pages/call-statistics/call-statistics.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // 获取全局应用程序实例对象
4 | var app = getApp();
5 |
6 | // 创建页面实例对象
7 | Page({
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | cycleId: 'month',
13 | },
14 |
15 |
16 | /**
17 | * 生命周期函数--监听页面加载
18 | */
19 | onLoad: function onLoad(opt) {
20 |
21 | },
22 |
23 | /**
24 | * 周期切换点击
25 | * @param {*} e
26 | */
27 | onClickTabCycle: function onClickTabCycle(e) {
28 | console.log(e);
29 | this.setData({
30 | cycleId: e.detail.id
31 | })
32 | }
33 |
34 | });
--------------------------------------------------------------------------------
/pages/call-statistics/call-statistics.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarBackgroundColor": "#1F2D3D",
3 | "navigationBarTextStyle": "white",
4 | "navigationBarTitleText": "日,周,月,季度,自定义周期选择器",
5 | "backgroundColor": "#FFFFFF",
6 | "backgroundTextStyle": "dark",
7 | "usingComponents": {
8 | "tab-cycle": "../../components/tab-cycle/tab-cycle",
9 | "call-staticstics-cycle": "../../components/call-staticstics-cycle/call-staticstics-cycle"
10 | },
11 | "enablePullDownRefresh": false
12 | }
--------------------------------------------------------------------------------
/pages/call-statistics/call-statistics.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/pages/canvasDemo/canvasDemo.js:
--------------------------------------------------------------------------------
1 | import Canvas from '../../utils/canvas.js'
2 | Page({
3 | ...Canvas.options,
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | ...Canvas.data,
9 | },
10 | /**
11 | * 生命周期函数--监听页面加载
12 | */
13 | onLoad: function(options) {
14 | this.draw('runCanvas', 20, 1000);
15 | },
16 | })
--------------------------------------------------------------------------------
/pages/canvasDemo/canvasDemo.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/canvasDemo/canvasDemo.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/canvasDemo/canvasDemo.wxss:
--------------------------------------------------------------------------------
1 | /* pages/canvasDemo/canvasDemo.wxss */
2 |
3 | .canvasBox {
4 | height: 500rpx;
5 | position: relative;
6 | background-color: #f5f5f5;
7 | }
8 |
9 | .bigCircle {
10 | width: 420rpx;
11 | height: 420rpx;
12 | border-radius: 50%;
13 | position: absolute;
14 | top: 0;
15 | bottom: 0;
16 | left: 0;
17 | right: 0;
18 | margin: auto auto;
19 | background-color: #F8E5DF;
20 | }
21 |
22 | .littleCircle {
23 | width: 356rpx;
24 | height: 356rpx;
25 | border-radius: 50%;
26 | position: absolute;
27 | top: 0;
28 | bottom: 0;
29 | left: 0;
30 | right: 0;
31 | margin: auto auto;
32 | background-color: #eee;
33 | }
34 |
35 | .canvas {
36 | width: 420rpx;
37 | height: 420rpx;
38 | position: absolute;
39 | left: 0;
40 | top: 0;
41 | bottom: 0;
42 | right: 0;
43 | margin: auto auto;
44 | z-index: 99;
45 | }
--------------------------------------------------------------------------------
/pages/circle/circle.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 |
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/circle/circle.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{progress_txt}}
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/pages/circle/circle.wxss:
--------------------------------------------------------------------------------
1 | .progress_box {
2 | position: relative;
3 | width: 220px;
4 | height: 220px;
5 | /* // 这里的宽高是必须大于等于canvas圆环的直径 否则绘制到盒子外面就看不见了 */
6 | /* // 一开始设置 */
7 | width: 440rpx;
8 | height: 440rpx;
9 | /* 发现 在360X640分辨率的设备,下绘制的圆环跑盒子外去了 */
10 | /* // 小程序使用rpx单位适配 ,但是canvas绘制的是px单位的。所以只能用px单位绘制的圆环在盒子内显示 */
11 | display: flex;
12 | align-items: center;
13 | justify-content: center;
14 | background-color: #eee;
15 | }
16 |
17 | .progress_bg {
18 | position: absolute;
19 | width: 220px;
20 | height: 220px;
21 | }
22 |
23 | .progress_canvas {
24 | width: 220px;
25 | height: 220px;
26 | }
27 |
28 | .progress_text {
29 | position: absolute;
30 | display: flex;
31 | align-items: center;
32 | justify-content: center
33 | }
34 |
35 | .progress_info {
36 | font-size: 36rpx;
37 | padding-left: 16rpx;
38 | letter-spacing: 2rpx
39 | }
40 |
41 | .progress_dot {
42 | width: 16rpx;
43 | height: 16rpx;
44 | border-radius: 50%;
45 | background-color: #fb9126;
46 | }
--------------------------------------------------------------------------------
/pages/city/city.js:
--------------------------------------------------------------------------------
1 | // pages/city/city.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | city: '',
9 | cityPickerValue: [0, 0],
10 | cityPickerIsShow: false,
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 |
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面初次渲染完成
22 | */
23 | onReady: function () {
24 |
25 | },
26 |
27 | /**
28 | * 生命周期函数--监听页面显示
29 | */
30 | onShow: function () {
31 |
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面隐藏
36 | */
37 | onHide: function () {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面卸载
43 | */
44 | onUnload: function () {
45 |
46 | },
47 |
48 | /**
49 | * 页面相关事件处理函数--监听用户下拉动作
50 | */
51 | onPullDownRefresh: function () {
52 |
53 | },
54 |
55 | /**
56 | * 页面上拉触底事件的处理函数
57 | */
58 | onReachBottom: function () {
59 |
60 | },
61 |
62 | /**
63 | * 用户点击右上角分享
64 | */
65 | onShareAppMessage: function () {
66 |
67 | },
68 | /**
69 | * 城市选择确认
70 | */
71 | cityPickerOnSureClick: function (e) {
72 | console.log('cityPickerOnSureClick');
73 | console.log(e);
74 | this.setData({
75 | city: e.detail.valueName[0] + e.detail.valueName[1],
76 | cityPickerValue: e.detail.valueCode,
77 | cityPickerIsShow: false,
78 | });
79 |
80 | },
81 | /**
82 | * 城市选择取消
83 | */
84 | cityPickerOnCancelClick: function (event) {
85 | console.log('cityPickerOnCancelClick');
86 | console.log(event);
87 | this.setData({
88 | cityPickerIsShow: false,
89 | });
90 | },
91 |
92 |
93 | showCityPicker() {
94 | // this.data.cityPicker.show()
95 | this.setData({
96 | cityPickerIsShow: true,
97 | });
98 | }
99 | })
--------------------------------------------------------------------------------
/pages/city/city.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "城市",
3 | "backgroundColor": "#F5F5F5",
4 | "backgroundTextStyle": "dark",
5 | "usingComponents": {
6 | "city-picker": "../../components/city-picker/city-picker"
7 | }
8 | }
--------------------------------------------------------------------------------
/pages/city/city.wxml:
--------------------------------------------------------------------------------
1 |
2 | 当前选择城市:{{city}}
3 | 选择城市
4 |
10 |
--------------------------------------------------------------------------------
/pages/city/city.wxss:
--------------------------------------------------------------------------------
1 | /* pages/city/city.wxss */
--------------------------------------------------------------------------------
/pages/column-chart/column-chart.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "柱状图",
4 | "backgroundColor": "#F5F5F5",
5 | "backgroundTextStyle": "dark",
6 | "usingComponents": {
7 | "column-chart": "../../components/column-chart/column-chart"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/column-chart/column-chart.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/column-chart/column-chart.wxss:
--------------------------------------------------------------------------------
1 | /* pages/date/date.wxss */
--------------------------------------------------------------------------------
/pages/comon-search-history/comon-search-history.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // 获取全局应用程序实例对象
4 | var app = getApp();
5 |
6 | // 创建页面实例对象
7 | Page({
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | queryDate: {
13 | startDate: "",
14 | endDate: ""
15 | },
16 | onReachBottom: 0,
17 | recordListData: null,
18 | pageScroll: null,
19 | historyList: []
20 | },
21 |
22 |
23 | /**
24 | * 生命周期函数--监听页面加载
25 | */
26 | onLoad: function onLoad(opt) {
27 | if (opt.startDate != undefined && opt.startDate != null && opt.endDate != undefined && opt.endDate != null) {
28 | let queryDate = {};
29 | queryDate.startDate = opt.startDate;
30 | queryDate.endDate = opt.endDate;
31 | this.setData({
32 | queryDate: queryDate,
33 | recordListData: {
34 | queryDate: queryDate
35 | }
36 | });
37 | }
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面卸载
43 | */
44 | onUnload: function onUnload(opt) {
45 | getApp().destroyAudioContext();//摧毁音频对象
46 | },
47 |
48 | /**
49 | * 点击搜索
50 | * @param {*} e
51 | */
52 | onClickSearchSubmit: function onClickSearchSubmit(e) {
53 | console.log('点击搜索', e);
54 | if (e.detail.content == '') {
55 | return;
56 | }
57 | wx.showToast({
58 | title: '搜索' + e.detail.content,
59 | icon: 'none'
60 | })
61 | },
62 |
63 |
64 | onReachBottom: function onReachBottom() {
65 | // console.log('onReachBottom');
66 | this.setData({
67 | onReachBottom: this.data.onReachBottom + 1
68 | });
69 | },
70 |
71 | onPageScroll: function onPageScroll(Object) {
72 | this.setData({
73 | pageScroll: Object
74 | });
75 | },
76 |
77 | });
--------------------------------------------------------------------------------
/pages/comon-search-history/comon-search-history.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarBackgroundColor": "#1F2D3D",
3 | "navigationBarTextStyle": "white",
4 | "navigationBarTitleText": "搜索",
5 | "backgroundColor": "#F8F9FA",
6 | "backgroundTextStyle": "dark",
7 | "usingComponents": {
8 | "search-history": "/components/common-search-and-history/common-search-and-history",
9 | "record-list": "/components/record-tab-list/record-tab-list"
10 | },
11 | "enablePullDownRefresh": false
12 | }
--------------------------------------------------------------------------------
/pages/comon-search-history/comon-search-history.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/pages/comon-search-history/comon-search-history.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | flex-direction: column;
4 | background-color: #F8F9FA;
5 | margin: 0;
6 | padding: 0;
7 | width: 100%;
8 | padding-top: 120rpx;
9 | box-sizing: border-box;
10 | }
11 |
12 | .search_container{
13 | position: fixed;
14 | width: 100%;
15 | /*悬停关键样式*/
16 | top: 0;
17 | left: 0;
18 | z-index: 999;
19 | background-color: #fff;
20 | }
21 |
22 |
23 |
24 |
25 |
26 | page {
27 | width: 100%;
28 | height: 100%;
29 | background-color: #fff;
30 | }
31 |
--------------------------------------------------------------------------------
/pages/comon-search/comon-search.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // 获取全局应用程序实例对象
4 | var app = getApp();
5 |
6 | // 创建页面实例对象
7 | Page({
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | queryDate: {
13 | startDate: "",
14 | endDate: ""
15 | },
16 | onReachBottom: 0,
17 | recordListData: null,
18 | pageScroll:null,
19 | },
20 |
21 |
22 | /**
23 | * 生命周期函数--监听页面加载
24 | */
25 | onLoad: function onLoad(opt) {
26 | if (opt.startDate != undefined && opt.startDate != null && opt.endDate != undefined && opt.endDate != null) {
27 | let queryDate = {};
28 | queryDate.startDate = opt.startDate;
29 | queryDate.endDate = opt.endDate;
30 | this.setData({
31 | queryDate: queryDate,
32 | recordListData: {
33 | queryDate: queryDate
34 | }
35 | });
36 | }
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function onUnload(opt) {
43 | getApp().destroyAudioContext();//摧毁音频对象
44 | },
45 |
46 | /**
47 | * d点击搜索
48 | * @param {*} e
49 | */
50 | onClickSearchSubmit: function onClickSearchSubmit(e) {
51 | console.log(e);
52 | wx.showToast({
53 | title: '搜索' + e.detail.content,
54 | icon:'none'
55 | })
56 | },
57 |
58 | onReachBottom: function onReachBottom() {
59 | // console.log('onReachBottom');
60 | this.setData({
61 | onReachBottom: this.data.onReachBottom + 1
62 | });
63 | },
64 |
65 | onPageScroll: function onPageScroll(Object) {
66 | this.setData({
67 | pageScroll: Object
68 | });
69 | },
70 |
71 | });
--------------------------------------------------------------------------------
/pages/comon-search/comon-search.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarBackgroundColor": "#1F2D3D",
3 | "navigationBarTextStyle": "white",
4 | "navigationBarTitleText": "搜索",
5 | "backgroundColor": "#FFFFFF",
6 | "backgroundTextStyle": "dark",
7 | "usingComponents": {
8 | "common-search": "/components/common-search/common-search",
9 | "record-list": "/components/record-tab-list/record-tab-list"
10 | },
11 | "enablePullDownRefresh": false
12 | }
--------------------------------------------------------------------------------
/pages/comon-search/comon-search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/pages/comon-search/comon-search.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | flex-direction: column;
4 | background-color: #fff;
5 | margin: 0;
6 | padding: 0;
7 | width: 100%;
8 | padding-top: 120rpx;
9 | box-sizing: border-box;
10 | }
11 |
12 | .search_container{
13 | position: fixed;
14 | width: 100%;
15 | /*悬停关键样式*/
16 | top: 0;
17 | left: 0;
18 | z-index: 999;
19 | background-color: #fff;
20 | }
21 |
22 |
23 |
24 |
25 |
26 | page {
27 | width: 100%;
28 | height: 100%;
29 | background-color: #fff;
30 | }
31 |
--------------------------------------------------------------------------------
/pages/date/date.js:
--------------------------------------------------------------------------------
1 | // pages/date/date.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | date:'',
9 | datePickerValue: ['', '', ''],
10 | datePickerIsShow: false
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 |
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面初次渲染完成
22 | */
23 | onReady: function () {
24 |
25 | },
26 |
27 | /**
28 | * 生命周期函数--监听页面显示
29 | */
30 | onShow: function () {
31 |
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面隐藏
36 | */
37 | onHide: function () {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面卸载
43 | */
44 | onUnload: function () {
45 |
46 | },
47 |
48 | /**
49 | * 页面相关事件处理函数--监听用户下拉动作
50 | */
51 | onPullDownRefresh: function () {
52 |
53 | },
54 |
55 | /**
56 | * 页面上拉触底事件的处理函数
57 | */
58 | onReachBottom: function () {
59 |
60 | },
61 |
62 | /**
63 | * 用户点击右上角分享
64 | */
65 | onShareAppMessage: function () {
66 |
67 | },
68 |
69 |
70 | showDatePicker: function (e) {
71 | // this.data.datePicker.show(this);
72 | this.setData({
73 | datePickerIsShow: true,
74 | });
75 | },
76 |
77 | datePickerOnSureClick: function (e) {
78 | console.log('datePickerOnSureClick');
79 | console.log(e);
80 | this.setData({
81 | date: `${e.detail.value[0]}年${e.detail.value[1]}月${e.detail.value[2]}日`,
82 | datePickerValue: e.detail.value,
83 | datePickerIsShow: false,
84 | });
85 | },
86 |
87 | datePickerOnCancelClick: function (event) {
88 | console.log('datePickerOnCancelClick');
89 | console.log(event);
90 | this.setData({
91 | datePickerIsShow: false,
92 | });
93 | },
94 |
95 |
96 | })
--------------------------------------------------------------------------------
/pages/date/date.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "日期",
4 | "backgroundColor": "#F5F5F5",
5 | "backgroundTextStyle": "dark",
6 | "usingComponents": {
7 | "date-picker": "../../components/date-picker/date-picker"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/date/date.wxml:
--------------------------------------------------------------------------------
1 | 当前日期:{{date}}
2 | 选择日期
3 |
9 |
--------------------------------------------------------------------------------
/pages/date/date.wxss:
--------------------------------------------------------------------------------
1 | /* pages/date/date.wxss */
--------------------------------------------------------------------------------
/pages/delete/delete.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "滑动删除",
3 | "usingComponents": {
4 | "slide-delete": "../../components/slide-delete/slide-delete"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/delete/delete.wxml:
--------------------------------------------------------------------------------
1 |
2 | 通过movable-view实现左滑删除
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.name}}
10 | {{item.code}}
11 |
12 |
13 | {{item.amount}}
14 | 万
15 |
16 |
17 |
18 |
19 | 删除
20 |
21 |
22 | 通过Touch事件实现左滑删除
23 |
24 |
25 |
26 |
27 |
28 | {{item.name}}
29 | {{item.code}}
30 |
31 |
32 | {{item.amount}}
33 | 万
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/pages/double-column-chart/double-column-chart.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "双柱状折线图",
4 | "backgroundColor": "#F5F5F5",
5 | "backgroundTextStyle": "dark",
6 | "usingComponents": {
7 | "double-column-chart": "../../components/double-column-chart/double-column-chart"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/double-column-chart/double-column-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/double-column-chart/double-column-chart.wxss:
--------------------------------------------------------------------------------
1 | /* pages/date/date.wxss */
--------------------------------------------------------------------------------
/pages/double-line-chart/double-line-chart.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "折线图",
4 | "backgroundColor": "#F5F5F5",
5 | "backgroundTextStyle": "dark",
6 | "usingComponents": {
7 | "double-line-chart": "../../components/double-line-chart/double-line-chart"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/double-line-chart/double-line-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/double-line-chart/double-line-chart.wxss:
--------------------------------------------------------------------------------
1 | /* pages/date/date.wxss */
--------------------------------------------------------------------------------
/pages/fenxianghaibao/fenxianghaibao.js:
--------------------------------------------------------------------------------
1 | // pages/share/share.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | showVideo: false
9 | },
10 |
11 | //调用子组件的方法
12 | getSharePoster: function() {
13 | this.setData({ showVideo: false })
14 | this.selectComponent('#getPoster').getAvaterInfo()
15 | },
16 |
17 | myEventListener: function(e) {
18 | this.setData({ showVideo: true })
19 | },
20 | getUserInfo: function(e) {
21 | var that = this;
22 | if (e && e.detail.userInfo) {
23 | that.setData({
24 | showModal: false
25 | })
26 | }
27 | wx.getUserInfo({
28 | success: (result) => {
29 | console.log(2222)
30 | wx.showLoading({
31 | title: '加载中',
32 | mask: true
33 | })
34 | var gender = null;
35 | let nickName = result.userInfo.nickName
36 | let userPic = result.userInfo.avatarUrl
37 | let userData = {
38 | 'nickName': nickName,
39 | 'userPic': userPic,
40 | 'gender': gender,
41 | 'age': null
42 | }
43 | wx.setStorageSync('userInfo', userData);
44 | that.setData({
45 | userData: userData
46 | })
47 | }
48 | })
49 | },
50 | /**
51 | * 生命周期函数--监听页面加载
52 | */
53 | onLoad: function(options) {
54 |
55 | },
56 |
57 | /**
58 | * 生命周期函数--监听页面初次渲染完成
59 | */
60 | onReady: function() {
61 |
62 | },
63 |
64 | /**
65 | * 生命周期函数--监听页面显示
66 | */
67 | onShow: function() {
68 |
69 | },
70 |
71 | /**
72 | * 生命周期函数--监听页面隐藏
73 | */
74 | onHide: function() {
75 |
76 | },
77 |
78 | /**
79 | * 生命周期函数--监听页面卸载
80 | */
81 | onUnload: function() {
82 |
83 | },
84 |
85 | /**
86 | * 页面相关事件处理函数--监听用户下拉动作
87 | */
88 | onPullDownRefresh: function() {
89 |
90 | },
91 |
92 | /**
93 | * 页面上拉触底事件的处理函数
94 | */
95 | onReachBottom: function() {
96 |
97 | },
98 |
99 | /**
100 | * 用户点击右上角分享
101 | */
102 | onShareAppMessage: function() {
103 |
104 | }
105 | })
--------------------------------------------------------------------------------
/pages/fenxianghaibao/fenxianghaibao.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "my-poster": "/components/poster1/index"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/fenxianghaibao/fenxianghaibao.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
15 |
16 |
17 |
22 |
23 |
27 |
28 |
--------------------------------------------------------------------------------
/pages/float_tab/float_tab.js:
--------------------------------------------------------------------------------
1 | var rate = 0; //分辨转换
2 | var floatTop = 0; //悬浮高度
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | tabs: [
10 | { id: "news", isSelect: true, title: "要闻" },
11 | { id: "hall", isSelect: false, title: "供需" }
12 | ], //tabbar数组
13 | curTabId: "news", //当前tabid
14 | isShowFloatTab: false //是否显示悬浮tab
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: function (options) {
21 | this.getScrollTop();
22 | },
23 |
24 | /**
25 | * 获得滑动导致悬浮开始的高度
26 | * @return {[type]} [description]
27 | */
28 | getScrollTop: function () {
29 | var that = this;
30 | if (wx.canIUse('getSystemInfo.success.screenWidth')) {
31 | wx: wx.getSystemInfo({
32 | success: function (res) {
33 | rate = res.screenWidth / 750;
34 | floatTop = 104 * rate;
35 | that.setData({
36 | scrollTop: 104 * res.screenWidth / 750,
37 | scrollHeight: res.screenHeight / (res.screenWidth / 750) - 128,
38 | });
39 | }
40 | });
41 | }
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面加载
46 | */
47 | onPageScroll: function (event) {
48 | var scrollTop = event.scrollTop;
49 | if (scrollTop >= floatTop && !this.data.isShowFloatTab) {
50 | this.setData({
51 | isShowFloatTab: true,
52 | });
53 | } else if (scrollTop < floatTop && this.data.isShowFloatTab) {
54 | this.setData({
55 | isShowFloatTab: false,
56 | });
57 | }
58 | },
59 |
60 |
61 | /**
62 | * 点击tab切换
63 | * @param {[type]} event
64 | * @return {[type]}
65 | */
66 | clickTab: function (event) {
67 | var id = event.detail.id;
68 | this.data.curTabId = id;
69 | for (var i = 0; i < this.data.tabs.length; i++) {
70 | if (id == this.data.tabs[i].id) {
71 | this.data.tabs[i].isSelect = true;
72 | } else {
73 | this.data.tabs[i].isSelect = false;
74 | }
75 | }
76 |
77 | this.setData({
78 | tabs: this.data.tabs,
79 | curTabId: this.data.curTabId,
80 | });
81 |
82 | //更新数据,第一次点击或者为空的时候加载重新加载数据
83 | if (this.data.curTabId == 'news') {
84 | } else {
85 | }
86 | },
87 |
88 |
89 | })
--------------------------------------------------------------------------------
/pages/float_tab/float_tab.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "滑动悬浮",
4 | "backgroundColor": "#FFFFFF",
5 | "backgroundTextStyle": "light",
6 | "enablePullDownRefresh": false,
7 | "usingComponents": {
8 | "float-tab": "../../components/float-tab/float-tab"
9 | },
10 | "onReachBottomDistance": 0
11 |
12 | }
--------------------------------------------------------------------------------
/pages/float_tab/float_tab.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 | 要闻
11 |
12 |
13 | 供需
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/float_tab/float_tab.wxss:
--------------------------------------------------------------------------------
1 | /* pages/float_tab/float_tab.wxss */
2 | .flaot-container{
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | .float-top{
8 | height: 104rpx;
9 | background-color: red;
10 | }
11 |
12 | .tab_list_data{
13 | height: 2000rpx;
14 | display: flex;
15 | flex-direction: column;
16 | justify-content: flex-start;
17 | align-items: center;
18 | background-color: gray;
19 | }
--------------------------------------------------------------------------------
/pages/haibao/haibao.js:
--------------------------------------------------------------------------------
1 | // pages/share/share.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | showVideo: false
9 | },
10 |
11 | //调用子组件的方法
12 | getSharePoster: function() {
13 | this.setData({ showVideo: false })
14 | this.selectComponent('#getPoster').getAvaterInfo()
15 | },
16 |
17 | myEventListener: function(e) {
18 | this.setData({ showVideo: true })
19 | },
20 | getUserInfo: function(e) {
21 | var that = this;
22 | if (e && e.detail.userInfo) {
23 | that.setData({
24 | showModal: false
25 | })
26 | }
27 | wx.getUserInfo({
28 | success: (result) => {
29 | console.log(2222)
30 | wx.showLoading({
31 | title: '加载中',
32 | mask: true
33 | })
34 | var gender = null;
35 | let nickName = result.userInfo.nickName
36 | let userPic = result.userInfo.avatarUrl
37 | let userData = {
38 | 'nickName': nickName,
39 | 'userPic': userPic,
40 | 'gender': gender,
41 | 'age': null
42 | }
43 | wx.setStorageSync('userInfo', userData);
44 | that.setData({
45 | userData: userData
46 | })
47 | wx.hideToast()
48 | }
49 | })
50 | },
51 | /**
52 | * 生命周期函数--监听页面加载
53 | */
54 | onLoad: function(options) {
55 |
56 | },
57 |
58 | /**
59 | * 生命周期函数--监听页面初次渲染完成
60 | */
61 | onReady: function() {
62 |
63 | },
64 |
65 | /**
66 | * 生命周期函数--监听页面显示
67 | */
68 | onShow: function() {
69 |
70 | },
71 |
72 | /**
73 | * 生命周期函数--监听页面隐藏
74 | */
75 | onHide: function() {
76 |
77 | },
78 |
79 | /**
80 | * 生命周期函数--监听页面卸载
81 | */
82 | onUnload: function() {
83 |
84 | },
85 |
86 | /**
87 | * 页面相关事件处理函数--监听用户下拉动作
88 | */
89 | onPullDownRefresh: function() {
90 |
91 | },
92 |
93 | /**
94 | * 页面上拉触底事件的处理函数
95 | */
96 | onReachBottom: function() {
97 |
98 | },
99 |
100 | /**
101 | * 用户点击右上角分享
102 | */
103 | onShareAppMessage: function() {
104 |
105 | }
106 | })
--------------------------------------------------------------------------------
/pages/haibao/haibao.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "my-poster": "/components/poster2/index"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/haibao/haibao.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
15 |
16 |
17 |
22 |
23 |
27 |
28 |
--------------------------------------------------------------------------------
/pages/haibao1/haibao1.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "poster": "/components/miniprogram_dist/poster/index"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/haibao1/haibao1.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/haibao1/haibao1.wxss:
--------------------------------------------------------------------------------
1 | /* pages/haibao1/haibao1.wxss */
2 | .poste_btn{
3 | position:fixed;
4 | bottom:150rpx;
5 | width:382rpx;
6 | height:80rpx;
7 | left:50%;
8 | z-index: 99999 !important;
9 | margin-left:-191rpx;
10 | border-radius:20rpx;
11 | background-color:#4FE1B6;
12 | border:1px solid black;
13 | box-sizing:border-box;
14 | font-size:30rpx;
15 | font-family:PingFang-SC-Medium;
16 | color:#fff;
17 | display:flex;
18 | justify-content:center;
19 | align-items:center;
20 |
21 | }
22 | .close-poste {
23 | /* width: 100%;
24 | height: 80rpx;
25 | position: absolute;
26 | bottom: -451rpx; */
27 | text-align: center;
28 | z-index: 99999 !important;
29 | position:fixed;
30 | bottom:30rpx;
31 | width:382rpx;
32 | height:80rpx;
33 | left:50%;
34 | margin-left:-191rpx;
35 | border-radius:20rpx;
36 | background-color:#4FE1B6;
37 | border:1px solid black;
38 | box-sizing:border-box;
39 | font-size:30rpx;
40 | font-family:PingFang-SC-Medium;
41 | color:#fff;
42 | display:flex;
43 | justify-content:center;
44 | align-items:center;
45 |
46 | }
--------------------------------------------------------------------------------
/pages/haibao2/haibao2.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "poster": "/components/miniprogram_dist/poster/index"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/haibao2/haibao2.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/pages/haibao2/haibao2.wxss:
--------------------------------------------------------------------------------
1 | /* pages/haibao2/haibao2.wxss */
--------------------------------------------------------------------------------
/pages/haibao3/haibao3.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/haibao3/haibao3.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/pages/haibao3/haibao3.wxss:
--------------------------------------------------------------------------------
1 | /* pages/haibao3/haibao3.wxss */
2 | canvas {
3 | /* position: fixed; */
4 | width: 100vw;
5 | height: 1334rpx;
6 | }
7 |
8 | .qrCode {
9 | position: absolute;
10 | left: -1000rpx;
11 | height: 100rpx;
12 | width: 100rpx;
13 | }
14 |
15 | .qrCode > canvas {
16 | width: 100rpx;
17 | height: 100rpx;
18 | }
19 |
--------------------------------------------------------------------------------
/pages/haibao4/haibao3.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/haibao4/haibao3.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/pages/haibao4/haibao3.wxss:
--------------------------------------------------------------------------------
1 | /* pages/haibao3/haibao3.wxss */
2 | canvas {
3 | /* position: fixed; */
4 | width: 100vw;
5 | height: 1334rpx;
6 | }
7 |
8 | .qrCode {
9 | position: absolute;
10 | left: -1000rpx;
11 | height: 100rpx;
12 | width: 100rpx;
13 | }
14 |
15 | .qrCode > canvas {
16 | width: 100rpx;
17 | height: 100rpx;
18 | }
19 |
--------------------------------------------------------------------------------
/pages/horizontal-scroll_tab/horizontal-scroll_tab.js:
--------------------------------------------------------------------------------
1 | // pages/horizontal-scroll_tab/horizontal-scroll_tab.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | ips: [
9 | { id: "1", title: "全部", isSelect:true },
10 | { id: "2", title: "养老", isSelect: false},
11 | { id: "3", title: "儿童", isSelect: false},
12 | { id: "4", title: "健身", isSelect: false },
13 | { id: "5", title: "旅行", isSelect: false },
14 | { id: "6", title: "互联网", isSelect: false },
15 | { id: "7", title: "大数据", isSelect: false },
16 | { id: "8", title: "比特币", isSelect: false },
17 | { id: "9", title: "宅基地三权分置", isSelect: false },
18 | ],
19 | content:"全部"
20 | },
21 |
22 | /**
23 | * 生命周期函数--监听页面加载
24 | */
25 | onLoad: function (options) {
26 |
27 | },
28 |
29 | /**
30 | * item点击事件
31 | */
32 | onIpItemClick: function (event) {
33 | console.log(event);
34 | var id = event.currentTarget.dataset.item.id;
35 | var curIndex = 0;
36 | for (var i = 0; i < this.data.ips.length; i++) {
37 | if (id == this.data.ips[i].id) {
38 | this.data.ips[i].isSelect = true;
39 | curIndex = i;
40 | } else {
41 | this.data.ips[i].isSelect = false;
42 | }
43 | }
44 |
45 | this.setData({
46 | content: this.data.ips[curIndex].title,
47 | ips: this.data.ips,
48 | });
49 | },
50 |
51 | })
--------------------------------------------------------------------------------
/pages/horizontal-scroll_tab/horizontal-scroll_tab.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/horizontal-scroll_tab/horizontal-scroll_tab.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ip.title}}
6 |
7 |
8 |
9 |
10 |
11 | {{content}}
12 |
--------------------------------------------------------------------------------
/pages/horizontal-scroll_tab/horizontal-scroll_tab.wxss:
--------------------------------------------------------------------------------
1 | .ip_tab_comtainer {
2 | width: 100%;
3 | background-color: #F5F5F5;
4 | padding: 20rpx 0 0;
5 | white-space: nowrap;
6 | }
7 |
8 | .ip_tab_comtainer_padd {
9 | display: inline-block;
10 | width: 24rpx;
11 | }
12 |
13 | .ip_tab_item_s {
14 | display: inline-block;
15 | line-height: 40rpx;
16 | padding: 12rpx 32rpx;
17 | color: #ED373D;
18 | margin-right: 8rpx;
19 | margin-left: 8rpx;
20 | font-size: 28rpx;
21 | text-align: center;
22 | overflow: hidden;
23 | text-overflow: ellipsis;
24 | background-color: #ffffff;
25 | border-radius: 4rpx;
26 | border: 1px solid #ED373D;
27 | }
28 |
29 | .ip_tab_item_n {
30 | display: inline-block;
31 | padding: 12rpx 32rpx;
32 | line-height: 40rpx;
33 | color: #353535;
34 | margin-right: 8rpx;
35 | background-color: #ffffff;
36 | margin-left: 8rpx;
37 | font-size: 28rpx;
38 | text-align: center;
39 | overflow: hidden;
40 | text-overflow: ellipsis;
41 | border-radius: 4rpx;
42 | border: 1px solid #CCCCCC;
43 | }
44 |
45 | /**
46 | 去除横向滚动条
47 | */
48 | ::-webkit-scrollbar {
49 | width: 0;
50 | height: 0;
51 | color: transparent;
52 | }
53 |
54 | .content{
55 | width: 100%;
56 | }
--------------------------------------------------------------------------------
/pages/huadonglizhuti/huadonglizhutu.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "折线图",
3 | "backgroundColor": "#F5F5F5",
4 | "backgroundTextStyle": "dark",
5 | "usingComponents": {
6 | "double-column-chart": "../../components/double-column-chart1/double-column-chart"
7 | }
8 | }
--------------------------------------------------------------------------------
/pages/huadonglizhuti/huadonglizhutu.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/huadonglizhuti/huadonglizhutu.wxss:
--------------------------------------------------------------------------------
1 | /* pages/huadonglizhuti/huadonglizhutu.wxss */
2 |
3 | .log-list {
4 | display: flex;
5 | flex-direction: column;
6 | padding: 40rpx;
7 | }
8 |
9 | .log-item {
10 | margin: 10rpx;
11 | }
--------------------------------------------------------------------------------
/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{item.title}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | page{
3 | /* background-image: linear-gradient(160deg, #ff0064 20%,#ca00ff 80%); */
4 | /* background-image: linear-gradient(160deg, #b100ff 20%,#00b3ff 80%); */
5 | /* background-image: linear-gradient(0deg, #fff 0%,#000 100%); */
6 | /* background-image: linear-gradient(160deg, #00ffd5 20%,#008cff 80%); */
7 | }
8 | .container{
9 | width: 100%;
10 | display: flex;
11 | flex-direction: row;
12 | flex-wrap: wrap;
13 | justify-content: space-between;
14 | align-items: center;
15 |
16 | }
17 | .container::after {
18 | content: "";
19 | width: 50%;
20 | filter:blur(4px);
21 |
22 | }
23 | .container-child{
24 | width: 30.333%;
25 | height: 210rpx;
26 | box-sizing: border-box;
27 | border-radius: 10rpx;
28 | font-size: 28rpx;
29 | margin:10rpx;
30 | color: aliceblue;
31 | position: relative;
32 | background-image: linear-gradient(160deg, #b100ff 20%,#00b3ff 80%);
33 | box-shadow: 2px 2px 2px 2px rgba(0,0,0,.3);
34 | overflow: hidden;
35 | }
36 | .container-child::before{
37 | content: '';
38 | position:absolute;
39 | top: 0; right: 0; bottom: 0; left: 0;
40 | z-index: -1
41 | }
--------------------------------------------------------------------------------
/pages/jiazaisaomiao/jiazaisaomiao.js:
--------------------------------------------------------------------------------
1 | var ScanBar = require("../../biliang/scan/scanbar.js")
2 | Page({
3 | data: {
4 | startStopEngine: '开始',
5 | },
6 |
7 | onShow: function() {
8 | let anim = wx.createAnimation({
9 | duration: 500,
10 | timingFunction: 'linear',
11 | delay: 0
12 | })
13 | //1、创建对象
14 | this.scanBar = new ScanBar();
15 | //2、传入需要展示的图标
16 | this.scanBar.init(['../../images/icon_toutiao.svg', '../../images/icon_weibo.svg', '../../images/icon_sohu.svg', '../../images/icon_sina.svg', '../../images/icon_wangyi163.svg', '../../images/icon_zhihu.svg', '../../images/icon_ifeng.svg', '../../images/icon_weixin.svg', '../../images/icon_163news.png', '../../images/icon_baidu.png', '../../images/icon_cnr.png', '../../images/icon_teiba.png']);
17 | },
18 |
19 | //开始/结束按钮点击
20 | engineButtonTap: function() {
21 | let changeButtonStatus = this.data.startStopEngine == '开始' ? '结束' : '开始';
22 | let start = this.data.startStopEngine == '开始';
23 |
24 | this.setData({
25 | startStopEngine: changeButtonStatus,
26 | })
27 |
28 | if (start) {
29 | this.startScan();
30 | } else {
31 | this.stopScan();
32 | }
33 | },
34 |
35 | startScan: function() {
36 | //3、开始扫描
37 | this.scanBar.startScan();
38 |
39 | let progress = 0;
40 | this.timer = setInterval(function() {
41 |
42 | //4、设置进度
43 | this.scanBar.setProgress(++progress);
44 |
45 | if (progress === 100) {
46 | this.scanBar.stopScan(true);
47 | clearInterval(this.timer);
48 | this.setData({
49 | startStopEngine: '开始',
50 | })
51 | }
52 | }.bind(this), 1000);
53 | },
54 |
55 | stopScan: function() {
56 | //5、停止扫描
57 | this.scanBar.stopScan(true);
58 |
59 | clearInterval(this.timer);
60 | this.setData({
61 | startStopEngine: '开始',
62 | })
63 | }
64 | })
--------------------------------------------------------------------------------
/pages/jiazaisaomiao/jiazaisaomiao.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/jiazaisaomiao/jiazaisaomiao.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/pages/jiazaisaomiao/jiazaisaomiao.wxss:
--------------------------------------------------------------------------------
1 | /* pages/jiazaisaomiao/jiazaisaomiao.wxss */
2 |
3 |
4 | /**index.wxss**/
5 |
6 | @import "../../biliang/scan/scanbar.wxss";
7 | .bg {
8 | position: fixed;
9 | left: 0;
10 | right: 0;
11 | top: 0;
12 | bottom: 0;
13 | display: flex;
14 | flex: 1;
15 | z-index: -1;
16 | background: linear-gradient(#1788fb, #2bccfd);
17 | }
--------------------------------------------------------------------------------
/pages/line-chart/line-chart.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "折线图",
4 | "backgroundColor": "#F5F5F5",
5 | "backgroundTextStyle": "dark",
6 | "usingComponents": {
7 | "line-chart": "../../components/line-chart/line-chart"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/line-chart/line-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/line-chart/line-chart.wxss:
--------------------------------------------------------------------------------
1 | /* pages/date/date.wxss */
--------------------------------------------------------------------------------
/pages/line-column-chart/line-column-chart.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "折线图",
4 | "backgroundColor": "#F5F5F5",
5 | "backgroundTextStyle": "dark",
6 | "usingComponents": {
7 | "double-column-chart": "../../components/double-column-chart/double-column-chart"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/line-column-chart/line-column-chart.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/line-column-chart/line-column-chart.wxss:
--------------------------------------------------------------------------------
1 | /* pages/date/date.wxss */
--------------------------------------------------------------------------------
/pages/linghuojindutiao/linghuojindutiao.json:
--------------------------------------------------------------------------------
1 | {
2 | "disableScroll": true,
3 | "usingComponents": {
4 | "mod-process": "/components/mod-process/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/linghuojindutiao/linghuojindutiao.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/pages/linghuojindutiao/linghuojindutiao.wxss:
--------------------------------------------------------------------------------
1 | /* pages/linghuojindutiao/linghuojindutiao.wxss */
2 |
3 | .container {
4 | width: 100%;
5 | height: 210rpx;
6 | background: #fff;
7 | position: relative;
8 | }
9 |
10 | .count-info {
11 | position: relative;
12 | margin: 0 auto;
13 | margin-top: 40rpx;
14 | width: 540rpx;
15 | font-family: DINAlternate-Bold;
16 | font-size: 40rpx;
17 | }
18 |
19 | .count-info image {
20 | width: 28rpx;
21 | height: 32rpx;
22 | }
23 |
24 | .process {
25 | margin: 0 auto;
26 | margin-top: 20rpx;
27 | width: 540rpx;
28 | height: 20rpx;
29 | border-radius: 10rpx;
30 | background: #9CF0D1;
31 | position: relative;
32 | z-index: 2;
33 | }
34 |
35 | .process-active {
36 | position: absolute;
37 | top: 0rpx;
38 | left: 0rpx;
39 | width: 0;
40 | height: 20rpx;
41 | border-radius: 10rpx;
42 | /* background: #9CF0D1; */
43 | background: #09CD8A;
44 | z-index: 2;
45 | }
46 |
47 | .success {
48 | position: absolute;
49 | background: #fff;
50 | border-radius: 50%;
51 | top: -8rpx;
52 | width: 44rpx;
53 | height: 44rpx;
54 | z-index: 3;
55 | top: -12rpx;
56 | transform: scale(0.2);
57 | }
58 |
59 | .num {
60 | position: absolute;
61 | margin-left: 74rpx;
62 | }
63 |
64 | .scale-container {
65 | margin: -20rpx auto;
66 | height: 16rpx;
67 | width: 540rpx;
68 | position: relative;
69 | z-index: 1;
70 | }
71 |
72 | .scale {
73 | position: absolute;
74 | top: 14rpx;
75 | height: 16rpx;
76 | width: 2rpx;
77 | background: #09CD8A;
78 | }
79 |
80 | .scale-num {
81 | position: absolute;
82 | top: 40rpx;
83 | font-family: PingFangSC-Regular;
84 | font-size: 22rpx;
85 | color: #CACACD;
86 | text-align: center;
87 | width: 44rpx;
88 | }
--------------------------------------------------------------------------------
/pages/meituan/meituan.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 | Page({
3 | data: {
4 | num: 8, //这是当前有几个人
5 | jindutiao: [ //这个是进度条的标准,刻度
6 | {
7 | num: 3,
8 | price: '999'
9 | },
10 | {
11 | num: 5,
12 | price: '799'
13 | },
14 | {
15 | num: 10,
16 | price: '599'
17 | }
18 | ],
19 | },
20 | onLoad: function() {
21 | this.jindutiao();
22 | },
23 | jindutiao: function() {
24 | var that = this;
25 | var jindutiao = that.data.jindutiao;
26 | var num = that.data.num;
27 | var p = 0;
28 | for (var i = 0; i < jindutiao.length; i++) {
29 | if (jindutiao[i].num > num) {
30 | p = i;
31 | break;
32 | }
33 | }
34 | if (i == jindutiao.length) { p = i; }
35 | for (var j = 0; j < p; j++) {
36 | jindutiao[j].statu = true;
37 | }
38 | if (p == 0) {
39 | num = 0.5 / jindutiao.length * 100;
40 |
41 | } else if (jindutiao[p - 1].num < num) {
42 | num = (p + 0.5) / jindutiao.length * 100;
43 | //毕竟不是当前进度等分,所以让他在等于8,7,6的时候也能在中间。就加0.5
44 | } else {
45 | num = p / jindutiao.length * 100;
46 | //当前黄色进度长度就是当前人数除以总人数乘以100,就是进度条宽度的百分比。
47 | }
48 | that.setData({
49 | width: num,
50 | p: p,
51 | jindutiao: jindutiao
52 | })
53 | },
54 | })
--------------------------------------------------------------------------------
/pages/meituan/meituan.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/meituan/meituan.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{num}}人已参团
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{item.num}}人团
25 | ¥{{item.price}}
26 |
27 |
28 | {{item.num}}人团
29 | ¥{{item.price}}
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/pages/mian/mian.js:
--------------------------------------------------------------------------------
1 | // pages/main/main.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | chartData: [{
9 | name: 0,
10 | value: 200,
11 | text: `Weex 是一套简单易用的跨平台开发方案,
12 | 能以 web 的开发体验构建高性能、可扩展的 native 应用`
13 | },
14 | {
15 | name: 1,
16 | value: 20,
17 | text: `仅仅管一行,因此在只有第一个元素设置了高度的情况下,第一行的其`
18 | },
19 | {
20 | name: 2,
21 | value: 120,
22 | text: `仅仅管一行,因此在只有第一个元素设置了高度的情况下,第一行的其`
23 | },
24 | {
25 | name: 3,
26 | value: 90,
27 | text: `仅仅管一行,因此在只有第一个元素设置了高度的情况下,第一行的其`
28 | },
29 | {
30 | name: 4,
31 | value: 110
32 | },
33 | {
34 | name: 5,
35 | value: 140
36 | },
37 | {
38 | name: 6,
39 | value: 160
40 | },
41 | {
42 | name: 7,
43 | value: 50
44 | }, {
45 | name: 8,
46 | value: 60
47 | }, {
48 | name: 9,
49 | value: 140
50 | },
51 | ],
52 | currentData: ""
53 | },
54 |
55 | /**
56 | * 生命周期函数--监听页面加载
57 | */
58 | onLoad: function(options) {
59 |
60 | },
61 |
62 | /**
63 | * 生命周期函数--监听页面初次渲染完成
64 | */
65 | onReady: function() {
66 |
67 | },
68 |
69 | /**
70 | * 生命周期函数--监听页面显示
71 | */
72 | onShow: function() {
73 |
74 | },
75 |
76 | /**
77 | * 生命周期函数--监听页面隐藏
78 | */
79 | onHide: function() {
80 |
81 | },
82 |
83 | /**
84 | * 生命周期函数--监听页面卸载
85 | */
86 | onUnload: function() {
87 |
88 | },
89 |
90 | // 滑动组件变化时处罚
91 | currentBarChange: function(e) {
92 | console.log(e)
93 | console.log(e.detail),
94 | this.setData({
95 | currentData: e.detail
96 | })
97 | }
98 | })
--------------------------------------------------------------------------------
/pages/mian/mian.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "可滑动柱状图表",
3 | "usingComponents": {
4 | "slideBarChart": "../../components/slideBarChart/slideBarChart"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/mian/mian.wxml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | {{currentData.text}}
10 |
11 |
12 |
--------------------------------------------------------------------------------
/pages/mian/mian.wxss:
--------------------------------------------------------------------------------
1 | /* pages/mian/mian.wxss */
2 |
3 |
4 | /* pages/main/main.wxss */
5 |
6 | page {
7 | background: #eee;
8 | }
9 |
10 | .container {
11 | /* background-color: pink; */
12 | }
13 |
14 | .current {
15 | width: 100%;
16 | margin: 20rpx auto;
17 | font-size: 30rpx;
18 | text-align: center;
19 | color: #888;
20 | }
21 |
22 | .current .value {
23 | width: 200rpx;
24 | height: 60rpx;
25 | text-align: center;
26 | font-size: 60rpx;
27 | line-height: 60rpx;
28 | font-weight: bold;
29 | color: #5cbdf4;
30 | }
31 |
32 | .current .value1 {
33 | height: 200rpx;
34 | width: 100%;
35 | border-radius: 20rpx;
36 | box-shadow: 10rpx 10rpx 10rpx 10rpx #ccc;
37 | }
--------------------------------------------------------------------------------
/pages/posters/posters1/posters1.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "海报图1",
3 | "usingComponents": {
4 | "canvasdrawer": "/components/canvasdrawer/canvasdrawer"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/posters/posters1/posters1.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{shareText}}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/pages/posters/posters1/posters1.wxss:
--------------------------------------------------------------------------------
1 | /* pages/posters/posters1/posters1.wxss */
2 |
3 | .share-image {
4 | width: 650rpx;
5 | height: 1000rpx;
6 | padding: 0 50rpx 50rpx;
7 | }
8 |
9 | .contain {
10 | width: 100%;
11 | height: 100%;
12 | background-color: #1d1443;
13 | position: fixed;
14 | bottom: 0;
15 | }
16 | .keep1{
17 | position:fixed;
18 | bottom:150rpx;
19 | width:382rpx;
20 | height:80rpx;
21 | left:50%;
22 | margin-left:-191rpx;
23 | border-radius:40rpx;
24 | background-color:#fb4a50;
25 | border:3px solid #fff;
26 | box-sizing: border-box;
27 | font-size:30rpx;
28 | font-family: PingFang-SC-Medium;
29 | color:#fff;
30 | display: flex;
31 | justify-content: center;
32 | align-items: center;
33 | }
34 |
35 | .keep{
36 | position:fixed;
37 | bottom:30rpx;
38 | width:382rpx;
39 | height:80rpx;
40 | left:50%;
41 | margin-left:-191rpx;
42 | border-radius:40rpx;
43 | background-color:#fb4a50;
44 | border:3px solid #fff;
45 | box-sizing: border-box;
46 | font-size:30rpx;
47 | font-family: PingFang-SC-Medium;
48 | color:#fff;
49 | display: flex;
50 | justify-content: center;
51 | align-items: center;
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/pages/posters/posters2/posters2.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "海报图2",
3 | "usingComponents": {
4 | "canvasdrawer": "/components/canvasdrawer/canvasdrawer"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/posters/posters2/posters2.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/pages/posters/posters2/posters2.wxss:
--------------------------------------------------------------------------------
1 | /* pages/posters/posters2/posters2.wxss */
2 | page{
3 | width:100%;
4 | height:100%;
5 | background-color:#1d1443;
6 | }
7 | .share-image {
8 | width: 656rpx;
9 | height: 1320rpx;
10 | margin:0 50rpx 50rpx;
11 | }
12 |
13 | .contain{
14 | width:100%;
15 | height:100%;
16 |
17 |
18 | }
19 | .keep1{
20 | position:fixed;
21 | bottom:150rpx;
22 | width:382rpx;
23 | height:80rpx;
24 | left:50%;
25 | margin-left:-191rpx;
26 | border-radius:40rpx;
27 | background-color:#fb4a50;
28 | border:3px solid #fff;
29 | box-sizing: border-box;
30 | font-size:30rpx;
31 | font-family: PingFang-SC-Medium;
32 | color:#fff;
33 | display: flex;
34 | justify-content: center;
35 | align-items: center;
36 | }
37 |
38 | .keep{
39 | position:fixed;
40 | bottom:30rpx;
41 | width:382rpx;
42 | height:80rpx;
43 | left:50%;
44 | margin-left:-191rpx;
45 | border-radius:40rpx;
46 | background-color:#fb4a50;
47 | border:3px solid #fff;
48 | box-sizing: border-box;
49 | font-size:30rpx;
50 | font-family: PingFang-SC-Medium;
51 | color:#fff;
52 | display: flex;
53 | justify-content: center;
54 | align-items: center;
55 | }
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/pages/progress-bar/progress-bar.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "进度条",
4 | "backgroundColor": "#F5F5F5",
5 | "backgroundTextStyle": "dark",
6 | "usingComponents": {
7 | "progress-bar": "../../components/progress-bar/progress-bar"
8 | }
9 | }
--------------------------------------------------------------------------------
/pages/progress-bar/progress-bar.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/progress-bar/progress-bar.wxss:
--------------------------------------------------------------------------------
1 | /* pages/date/date.wxss */
--------------------------------------------------------------------------------
/pages/share/share.js:
--------------------------------------------------------------------------------
1 | // pages/share/share.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 | onShareAppMessage: function(e) {
11 | return e.from && "button" === e.from && console.log(e.target), {
12 | title: "AI神器,体态风险,一拍便知!",
13 | path: "/pages/index/index",
14 | imageUrl: "../../images/share-app.jpg",
15 | success: function(e) {
16 | console.log(e);
17 | },
18 | fail: function(e) {
19 | console.log(e);
20 | }
21 | };
22 | },
23 | /**
24 | * 生命周期函数--监听页面加载
25 | */
26 | onLoad: function (options) {
27 |
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面初次渲染完成
32 | */
33 | onReady: function () {
34 |
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面显示
39 | */
40 | onShow: function () {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面隐藏
46 | */
47 | onHide: function () {
48 |
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面卸载
53 | */
54 | onUnload: function () {
55 |
56 | },
57 |
58 | /**
59 | * 页面相关事件处理函数--监听用户下拉动作
60 | */
61 | onPullDownRefresh: function () {
62 |
63 | },
64 |
65 | /**
66 | * 页面上拉触底事件的处理函数
67 | */
68 | onReachBottom: function () {
69 |
70 | },
71 |
72 | /**
73 | * 用户点击右上角分享
74 | */
75 | onShareAppMessage: function () {
76 |
77 | }
78 | })
--------------------------------------------------------------------------------
/pages/share/share.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/share/share.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/pages/share1/share.js:
--------------------------------------------------------------------------------
1 | // pages/share/share.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | showVideo: false
9 | },
10 |
11 | //调用子组件的方法
12 | getSharePoster: function() {
13 | this.setData({ showVideo: false })
14 | this.selectComponent('#getPoster').getAvaterInfo()
15 | },
16 |
17 | myEventListener: function(e) {
18 | this.setData({ showVideo: true })
19 | },
20 | /**
21 | * 生命周期函数--监听页面加载
22 | */
23 | onLoad: function(options) {
24 |
25 | },
26 |
27 | /**
28 | * 生命周期函数--监听页面初次渲染完成
29 | */
30 | onReady: function() {
31 |
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面显示
36 | */
37 | onShow: function() {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面隐藏
43 | */
44 | onHide: function() {
45 |
46 | },
47 |
48 | /**
49 | * 生命周期函数--监听页面卸载
50 | */
51 | onUnload: function() {
52 |
53 | },
54 |
55 | /**
56 | * 页面相关事件处理函数--监听用户下拉动作
57 | */
58 | onPullDownRefresh: function() {
59 |
60 | },
61 |
62 | /**
63 | * 页面上拉触底事件的处理函数
64 | */
65 | onReachBottom: function() {
66 |
67 | },
68 |
69 | /**
70 | * 用户点击右上角分享
71 | */
72 | onShareAppMessage: function() {
73 |
74 | }
75 | })
--------------------------------------------------------------------------------
/pages/share1/share.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "my-poster": "/components/poster/index"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/share1/share.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/pages/slideCharts/slideCharts.js:
--------------------------------------------------------------------------------
1 | // pages/滑动展示图表/slideCharts.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | historyData: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
9 | moveScroll: 0,
10 | barWidth: 0,
11 | windowWidth: 0,//实际的宽度
12 | nowIndex: 0,//当前位置的索引,从1开始
13 | scale: 1,
14 | chartLeft: 0,
15 | isTouch: false,
16 | scrollTimeout: "",//滚动节流定时器
17 | },
18 |
19 | /**
20 | * 生命周期函数--监听页面加载
21 | */
22 | onLoad: function (options) {
23 | let that = this
24 | wx.createSelectorQuery().selectAll('.slide-item-content').boundingClientRect(function (rects) {
25 | // 获取bar的实际宽度
26 | wx.getSystemInfo({
27 | success: function (res) {
28 | let chartLeft = (res.windowWidth - rects[0].width) / 2
29 | console.log(rects[0].width, that.data.historyData.length - 1)
30 | that.setData({
31 | chartLeft: chartLeft,
32 | chartWidth: (that.data.historyData.length - 0.5) * rects[0].width + res.windowWidth / 2
33 | })
34 | setTimeout(() => {
35 | that.setData({
36 | // 滚动到最后一个时间轴
37 | moveScroll: rects[0].width * (that.data.historyData.length - 1),
38 | nowIndex: that.data.historyData.length,
39 | barWidth: rects[0].width,
40 | windowWidth: res.windowWidth
41 | })
42 | }, 1000)
43 | }
44 | })
45 | }).exec()
46 |
47 | },
48 | // 滑动开始
49 | clickStart(e) {
50 | this.setData({
51 | isTouch: true
52 | })
53 | },
54 | // 滑动过程
55 | chartScroll(e) {
56 | // console.log("滑动" + e.detail.scrollLeft)
57 | let that = this
58 | clearTimeout(this.data.scrollTimeout)
59 | if (this.data.isTouch) {
60 | this.setData({
61 | scrollX: e.detail.scrollLeft
62 | })
63 | // 节流函数,当滑动停止的100毫秒后执行结束事件
64 | // 因为ios下有惯性滑动,这里不能直接touchend事件
65 | this.setData({
66 | scrollTimeout: setTimeout(() => {
67 | that.clickEnd()
68 | }, 100)
69 | })
70 | }
71 | },
72 | // 滑动结束
73 | clickEnd() {
74 | console.log('滑动结束')
75 | let nowIndex = Math.round(this.data.scrollX / this.data.barWidth + 1)
76 | this.setData({
77 | nowIndex: nowIndex,
78 | moveScroll: this.data.barWidth * (nowIndex - 1),
79 | isTouch: false
80 | })
81 | }
82 | })
--------------------------------------------------------------------------------
/pages/slideCharts/slideCharts.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/slideCharts/slideCharts.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{item}}
9 |
10 | 4/14-4/20
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{nowIndex}}
20 |
--------------------------------------------------------------------------------
/pages/slideCharts/slideCharts.wxss:
--------------------------------------------------------------------------------
1 | /* pages/slideCharts/slideCharts.wxss */
2 | /* pages/滑动展示图表/slideCharts.wxss*/
3 |
4 | page {
5 | height: 2000rpx;
6 | overflow-y: scroll;
7 | }
8 |
9 | .slide-content {
10 | height: 492rpx;
11 | width: 100%;
12 | background: linear-gradient(#1797eb, #3cabef);
13 | overflow-x: scroll;
14 | overflow-y: hidden;
15 | position: relative;
16 | }
17 |
18 | .slide-charts {
19 | height: 100%;
20 | transition: all 1s;
21 | overflow-x: scroll;
22 | overflow-y: hidden;
23 | display: flex;
24 | }
25 |
26 | .slide-item {
27 | height: 492rpx;
28 | text-align: center;
29 | width: 124rpx;
30 | position: relative;
31 | color: #92d6f4;
32 | }
33 |
34 | .slide-item::after {
35 | content: "";
36 | position: absolute;
37 | top: 15%;
38 | height: 90%;
39 | width: 2rpx;
40 | left: 50%;
41 | margin-left: -1rpx;
42 | z-index: 0;
43 | }
44 |
45 | .slide-item-content {
46 | display: flex;
47 | flex-direction: column;
48 | justify-content: flex-end;
49 | align-items: center;
50 | width: 124rpx;
51 | height: 450rpx;
52 | }
53 |
54 | .slide-bar-content {
55 | background: linear-gradient(#5cbdf4, #8fd6f6);
56 | width: 40rpx;
57 | z-index: 5;
58 | border-radius: 4rpx;
59 | margin-top: 24rpx;
60 | }
61 |
62 | .slide-number {
63 | font-size: 20rpx;
64 | color: #92d6f4;
65 | text-align: center;
66 | line-height: 24rpx;
67 | margin-top: 24rpx;
68 | }
69 |
70 | .slide-bar-isSelect .slide-bar-content {
71 | background: #fff;
72 | }
73 |
74 | .slide-bar-isSelect .slide-number {
75 | color: #fff;
76 | }
77 |
78 | .chart-bottom {
79 | width: 100%;
80 | height: 300rpx;
81 | background: #fff;
82 | position: relative;
83 | text-align: center;
84 | }
85 |
86 | .chart-bottom:after {
87 | content: "";
88 | width: 63rpx;
89 | height: 63rpx;
90 | /* border-left: 20rpx solid transparent;
91 | border-right: 20rpx solid transparent;
92 | border-bottom: 20rpx solid #fff; */
93 | transform: rotate(45deg);
94 | background: #fff;
95 | position: absolute;
96 | /* top: -16rpx; */
97 | left: 50%;
98 | margin-left: -30rpx;
99 | border-radius: 6rpx;
100 | }
101 |
102 | .chart-bottom text {
103 | display: inline-block;
104 | margin-top: 50rpx;
105 | font-size: 80rpx;
106 | font-weight: 600;
107 | color: #666;
108 | }
109 |
--------------------------------------------------------------------------------
/pages/study-components/study-components.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const app = getApp()
4 |
5 | Page({
6 | onReady: function () {
7 | //获得popup组件
8 | this.popup = this.selectComponent("#popup");
9 | },
10 |
11 | showPopup() {
12 | this.popup.showPopup();
13 | },
14 |
15 | //取消事件
16 | _error() {
17 | console.log('你点击了取消');
18 | this.popup.hidePopup();
19 | },
20 | //确认事件
21 | _success() {
22 | console.log('你点击了确定');
23 | this.popup.hidePopup();
24 | }
25 | })
--------------------------------------------------------------------------------
/pages/study-components/study-components.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "popup": "/components/popup/popup"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/study-components/study-components.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/study-components/study-components.wxss:
--------------------------------------------------------------------------------
1 | /* pages/study-components/study-components.wxss */
--------------------------------------------------------------------------------
/pages/yuanjindu/yuanjindu.js:
--------------------------------------------------------------------------------
1 | // pages/date/date.js
2 | Page({
3 | /**
4 | * 页面的初始数据
5 | */
6 | data: {},
7 |
8 | /**
9 | * 生命周期函数--监听页面加载
10 | */
11 | onLoad: function (options) {
12 |
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面初次渲染完成
17 | */
18 | onReady: function () {
19 |
20 | },
21 |
22 | /**
23 | * 生命周期函数--监听页面显示
24 |
25 | onShow: function() {
26 |
27 | },
28 |
29 | /**
30 | * 生命周期函数--监听页面隐藏
31 | */
32 | onHide: function () {
33 |
34 | },
35 |
36 | /**
37 | * 生命周期函数--监听页面卸载
38 | */
39 | onUnload: function () {
40 |
41 | },
42 |
43 | /**
44 | * 页面相关事件处理函数--监听用户下拉动作
45 | */
46 | onPullDownRefresh: function () {
47 |
48 | },
49 |
50 | /**
51 | * 页面上拉触底事件的处理函数
52 | */
53 | onReachBottom: function () {
54 |
55 | },
56 |
57 | /**
58 | * 用户点击右上角分享
59 | */
60 | onShareAppMessage: function () {
61 |
62 | },
63 |
64 |
65 |
66 |
67 | })
--------------------------------------------------------------------------------
/pages/yuanjindu/yuanjindu.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "progress": "/components/progress/progress"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/yuanjindu/yuanjindu.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/yuanjindu/yuanjindu.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/pages/yuanjindu/yuanjindu.wxss
--------------------------------------------------------------------------------
/pages/yuanjindu1/yuanjindu1.js:
--------------------------------------------------------------------------------
1 | // pages/date/date.js
2 | Page({
3 | /**
4 | * 页面的初始数据
5 | */
6 | data: {
7 |
8 | },
9 |
10 | /**
11 | * 生命周期函数--监听页面加载
12 | */
13 | onLoad: function (options) {
14 |
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面初次渲染完成
19 | */
20 | onReady: function () {
21 |
22 | },
23 |
24 | /**
25 | * 生命周期函数--监听页面显示
26 | */
27 | onShow: function () {
28 | let progress2 = this.selectComponent("#progress2").properties.class;
29 |
30 | console.log(this.selectComponent("#progress2"))
31 |
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面隐藏
36 | */
37 | onHide: function () {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面卸载
43 | */
44 | onUnload: function () {
45 |
46 | },
47 |
48 | /**
49 | * 页面相关事件处理函数--监听用户下拉动作
50 | */
51 | onPullDownRefresh: function () {
52 |
53 | },
54 |
55 | /**
56 | * 页面上拉触底事件的处理函数
57 | */
58 | onReachBottom: function () {
59 |
60 | },
61 |
62 | /**
63 | * 用户点击右上角分享
64 | */
65 | onShareAppMessage: function () {
66 |
67 | },
68 |
69 |
70 |
71 |
72 | })
--------------------------------------------------------------------------------
/pages/yuanjindu1/yuanjindu1.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "progress2": "/components/progress2/progress2"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/yuanjindu1/yuanjindu1.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/yuanjindu1/yuanjindu1.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/pages/yuanjindu1/yuanjindu1.wxss
--------------------------------------------------------------------------------
/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/utils/canvas.js:
--------------------------------------------------------------------------------
1 | export default {
2 | data: {
3 | percentage: '', //百分比
4 | animTime: '', // 动画执行时间
5 | },
6 | options: {
7 | // 绘制圆形进度条方法
8 | run(c, w, h) {
9 | let that = this;
10 | var num = (2 * Math.PI / 100 * c) - 0.5 * Math.PI;
11 | that.data.ctx2.arc(w, h, w - 8, -0.5 * Math.PI, num); //每个间隔绘制的弧度
12 | that.data.ctx2.setStrokeStyle("#ED987D");
13 | that.data.ctx2.setLineWidth("16");
14 | that.data.ctx2.setLineCap("butt");
15 | that.data.ctx2.stroke();
16 | that.data.ctx2.beginPath();
17 | that.data.ctx2.setFontSize(20); //注意不要加引号
18 | that.data.ctx2.setFillStyle("#ED987D");
19 | that.data.ctx2.setTextAlign("center");
20 | that.data.ctx2.setTextBaseline("middle");
21 | that.data.ctx2.fillText("风险值", w, 80);
22 | that.data.ctx2.fillText(c + "%", w, h);
23 |
24 | that.data.ctx2.draw();
25 | },
26 | /**
27 | * start 起始百分比
28 | * end 结束百分比
29 | * w,h 其实就是圆心横纵坐标
30 | */
31 | // 动画效果实现
32 | canvasTap(start, end, time, w, h) {
33 | var that = this;
34 | start++;
35 | if (start > end) {
36 | return false;
37 | }
38 | that.run(start, w, h);
39 | setTimeout(function() {
40 | that.canvasTap(start, end, time, w, h);
41 | }, time);
42 | },
43 | /**
44 | * id----------------canvas画板id
45 | * percent-----------进度条百分比
46 | * time--------------画图动画执行的时间
47 | */
48 | draw: function(id, percent, animTime) {
49 | var that = this;
50 | const ctx2 = wx.createCanvasContext(id);
51 | that.setData({
52 | ctx2: ctx2,
53 | percentage: percent,
54 | animTime: animTime
55 | });
56 | var time = that.data.animTime / that.data.percentage;
57 | wx.createSelectorQuery().select('#' + id).boundingClientRect(function(rect) { //监听canvas的宽高
58 | var w = parseInt(rect.width / 2); //获取canvas宽的的一半
59 | var h = parseInt(rect.height / 2); //获取canvas高的一半,
60 | that.canvasTap(0, that.data.percentage, time, w, h)
61 | }).exec();
62 | },
63 | }
64 | }
--------------------------------------------------------------------------------
/utils/drawing.js:
--------------------------------------------------------------------------------
1 | var qrcode = require("./qrCode");
2 |
3 | function convert_length(length) {
4 | return Math.round((wx.getSystemInfoSync().windowWidth * length) / 750);
5 | }
6 |
7 | function barc(id, code, width, height) {
8 | barcode.code128(
9 | wx.createCanvasContext(id),
10 | code,
11 | convert_length(width),
12 | convert_length(height)
13 | );
14 | }
15 |
16 | function qrc(id, code, width, height) {
17 | qrcode.api.draw(code, {
18 | ctx: wx.createCanvasContext(id),
19 | width: width,
20 | height: height
21 | });
22 | }
23 |
24 | // export defalut qrc;
25 | module.exports = {
26 | qrc: qrc
27 | };
28 |
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangmiaozero/wxComoponents/97d4e00820f846c0f8c1295a595affde34eb91b3/utils/util.js
--------------------------------------------------------------------------------