├── pages
├── licai
│ ├── licai.wxss
│ ├── licai.json
│ ├── licai.wxml
│ └── licai.js
├── touzi
│ ├── touzi.wxss
│ ├── touzi.json
│ ├── touzi.wxml
│ └── touzi.js
├── index
│ ├── calendar
│ │ ├── calendar.js
│ │ ├── calendar.wxml
│ │ └── calendar.wxss
│ ├── userinfo
│ │ ├── userinfo.js
│ │ ├── userinfo.wxss
│ │ └── userinfo.wxml
│ ├── userassets
│ │ ├── userassets.js
│ │ ├── userassets.wxss
│ │ └── userassets.wxml
│ ├── index.json
│ ├── images
│ │ ├── bt.png
│ │ ├── bzx.png
│ │ ├── cgz.png
│ │ ├── db.png
│ │ ├── dj.png
│ │ ├── gb.png
│ │ ├── gp.png
│ │ ├── hj.png
│ │ ├── hk.png
│ │ ├── jj.png
│ │ ├── jt.png
│ │ ├── jy.png
│ │ ├── plf.png
│ │ ├── ss.png
│ │ ├── xbk.png
│ │ ├── xjk.png
│ │ ├── yhq.png
│ │ ├── zc.png
│ │ ├── bbjh.png
│ │ ├── bmlc.png
│ │ ├── bthk.png
│ │ ├── btsc.png
│ │ ├── btsf.png
│ │ ├── btte.png
│ │ ├── dqhk.png
│ │ ├── hfkzr.png
│ │ ├── sjcz.png
│ │ ├── xblc.png
│ │ ├── xbxy.png
│ │ ├── xybt.png
│ │ ├── xykhk.png
│ │ ├── eye@2x.png
│ │ ├── eye@3x.png
│ │ ├── newarea@2x.png
│ │ ├── newarea@3x.png
│ │ ├── investment@2x.png
│ │ ├── investment@3x.png
│ │ ├── right_arrow@2x.png
│ │ ├── right_arrow@3x.png
│ │ ├── servicearea@2x.png
│ │ └── servicearea@3x.png
│ ├── servicearea
│ │ ├── servicearea.wxss
│ │ └── servicearea.wxml
│ ├── index.js
│ ├── index.wxml
│ ├── baitiao
│ │ ├── baitiao.wxml
│ │ └── baitiao.wxss
│ ├── newsarea
│ │ ├── newsarea.wxss
│ │ └── newsarea.wxml
│ ├── index.wxss
│ └── investment
│ │ ├── investment.wxss
│ │ └── investment.wxml
├── baitiao
│ ├── baitiao.json
│ ├── images
│ │ ├── more@2x.png
│ │ ├── phone@2x.png
│ │ ├── baipai@2x.png
│ │ ├── daikuan@2x.png
│ │ ├── gangbeng@2x.png
│ │ ├── xiaoyuan@2x.png
│ │ ├── baina_icon@2x.png
│ │ ├── shangcheng@2x.png
│ │ ├── sibaitiao@2x.png
│ │ ├── xiaobaika@2x.png
│ │ └── youhuijuan@2x.png
│ ├── baitiao.wxss
│ ├── mainad
│ │ ├── mainad.wxss
│ │ └── mainad.wxml
│ ├── baitiao.wxml
│ ├── channelbottom
│ │ ├── channelbottom.wxss
│ │ └── channelbottom.wxml
│ ├── channel
│ │ ├── channel.wxss
│ │ └── channel.wxml
│ ├── baitiao.js
│ └── limitarea
│ │ ├── limitarea.wxml
│ │ └── limitarea.wxss
├── logs
│ ├── logs.json
│ ├── logs.wxss
│ ├── logs.wxml
│ └── logs.js
└── zhongchou
│ ├── zhongchou.json
│ ├── zhongchou.wxml
│ ├── zhongchou.js
│ └── zhongchou.wxss
├── page
├── API
│ ├── navigator
│ │ ├── navigator.wxss
│ │ ├── navigator.json
│ │ ├── navigator.js
│ │ └── navigator.wxml
│ ├── request
│ │ ├── request.wxss
│ │ ├── request.js
│ │ ├── request.json
│ │ └── request.wxml
│ ├── storage
│ │ ├── storage.wxss
│ │ ├── storage.json
│ │ ├── storage.wxml
│ │ └── storage.js
│ ├── upload-file
│ │ ├── upload-file.wxss
│ │ ├── upload-file.js
│ │ ├── upload-file.json
│ │ └── upload-file.wxml
│ ├── web-socket
│ │ ├── web-socket.wxss
│ │ ├── web-socket.js
│ │ ├── web-socket.json
│ │ └── web-socket.wxml
│ ├── download-file
│ │ ├── download-file.wxss
│ │ ├── download-file.js
│ │ ├── download-file.json
│ │ └── download-file.wxml
│ ├── open-location
│ │ ├── open-location.wxss
│ │ ├── open-location.json
│ │ ├── open-location.js
│ │ └── open-location.wxml
│ ├── get-system-info
│ │ ├── get-system-info.wxss
│ │ ├── get-system-info.json
│ │ ├── get-system-info.js
│ │ └── get-system-info.wxml
│ ├── request-payment
│ │ ├── request-payment.wxss
│ │ ├── request-payment.js
│ │ ├── request-payment.json
│ │ └── request-payment.wxml
│ ├── navigation-bar-loading
│ │ ├── navigation-bar-loading.wxss
│ │ ├── navigation-bar-loading.json
│ │ ├── navigation-bar-loading.js
│ │ └── navigation-bar-loading.wxml
│ ├── set-navigation-bar-title
│ │ ├── set-navigation-bar-title.wxss
│ │ ├── set-navigation-bar-title.json
│ │ ├── set-navigation-bar-title.js
│ │ └── set-navigation-bar-title.wxml
│ ├── file
│ │ ├── file.json
│ │ ├── file.wxss
│ │ ├── file.wxml
│ │ └── file.js
│ ├── image
│ │ ├── image.json
│ │ ├── image.wxss
│ │ ├── image.js
│ │ └── image.wxml
│ ├── login
│ │ ├── login.json
│ │ ├── login.js
│ │ ├── login.wxss
│ │ └── login.wxml
│ ├── voice
│ │ ├── voice.json
│ │ ├── voice.wxss
│ │ ├── voice.js
│ │ └── voice.wxml
│ ├── canvas
│ │ ├── canvas.json
│ │ ├── example.wxml
│ │ ├── canvas.wxss
│ │ ├── canvas.wxml
│ │ ├── canvas.js
│ │ └── example.js
│ ├── video
│ │ ├── video.json
│ │ ├── video.wxss
│ │ ├── video.js
│ │ └── video.wxml
│ ├── animation
│ │ ├── animation.json
│ │ ├── animation.wxss
│ │ ├── animation.wxml
│ │ └── animation.js
│ ├── get-location
│ │ ├── get-location.json
│ │ ├── format-location.js
│ │ ├── get-location.wxss
│ │ ├── get-location.js
│ │ └── get-location.wxml
│ ├── get-user-info
│ │ ├── get-user-info.json
│ │ ├── get-user-info.wxss
│ │ ├── get-user-info.js
│ │ └── get-user-info.wxml
│ ├── background-audio
│ │ ├── background-audio.json
│ │ ├── background-audio.wxss
│ │ ├── background-audio.wxml
│ │ └── background-audio.js
│ ├── get-network-type
│ │ ├── get-network-type.json
│ │ ├── get-network-type.wxss
│ │ ├── get-network-type.js
│ │ └── get-network-type.wxml
│ ├── on-compass-change
│ │ ├── on-compass-change.json
│ │ ├── on-compass-change.wxss
│ │ ├── on-compass-change.js
│ │ └── on-compass-change.wxml
│ ├── on-accelerometer-change
│ │ ├── on-accelerometer-change.json
│ │ ├── on-accelerometer-change.wxss
│ │ ├── on-accelerometer-change.wxml
│ │ └── on-accelerometer-change.js
│ ├── common
│ │ ├── footer.wxml
│ │ └── header.wxml
│ ├── pull-down-refresh
│ │ ├── pull-down-refresh.json
│ │ ├── pull-down-refresh.wxss
│ │ ├── pull-down-refresh.js
│ │ └── pull-down-refresh.wxml
│ └── index
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── index.js
└── component
│ ├── component-pages
│ ├── input
│ │ ├── input.wxss
│ │ ├── input.js
│ │ └── input.wxml
│ ├── button
│ │ ├── button.wxss
│ │ ├── button.js
│ │ └── button.wxml
│ ├── slide-tab
│ │ ├── slide-tab.wxss
│ │ ├── slide-tab.js
│ │ └── slide-tab.wxml
│ ├── view
│ │ ├── view.js
│ │ ├── view.wxss
│ │ └── view.wxml
│ ├── image
│ │ ├── image.js
│ │ ├── image.wxss
│ │ └── image.wxml
│ ├── navigator
│ │ ├── navigator.js
│ │ ├── navigator.wxss
│ │ ├── navigate.js
│ │ ├── redirect.js
│ │ ├── navigate.wxml
│ │ ├── redirect.wxml
│ │ └── navigator.wxml
│ ├── progress
│ │ ├── progress.js
│ │ ├── progress.wxss
│ │ └── progress.wxml
│ ├── map
│ │ ├── map.json
│ │ ├── map.wxml
│ │ └── map.js
│ ├── canvas
│ │ ├── canvas.json
│ │ ├── canvas.wxss
│ │ ├── canvas.wxml
│ │ └── canvas.js
│ ├── icon
│ │ ├── icon.wxss
│ │ ├── icon.js
│ │ └── icon.wxml
│ ├── radio
│ │ ├── radio.wxss
│ │ ├── radio.js
│ │ └── radio.wxml
│ ├── swiper
│ │ ├── swiper.wxss
│ │ ├── swiper.js
│ │ └── swiper.wxml
│ ├── picker
│ │ ├── picker.wxss
│ │ ├── picker.js
│ │ └── picker.wxml
│ ├── checkbox
│ │ ├── checkbox.wxss
│ │ ├── checkbox.js
│ │ └── checkbox.wxml
│ ├── label
│ │ ├── label.wxss
│ │ ├── label.js
│ │ └── label.wxml
│ ├── action-sheet
│ │ ├── action-sheet.wxss
│ │ ├── action-sheet.js
│ │ └── action-sheet.wxml
│ ├── form
│ │ ├── form.wxss
│ │ ├── form.js
│ │ └── form.wxml
│ ├── scroll-view
│ │ ├── scroll-view.wxss
│ │ ├── scroll-view.js
│ │ └── scroll-view.wxml
│ ├── switch
│ │ ├── switch.js
│ │ └── switch.wxml
│ ├── slider
│ │ ├── slider.js
│ │ └── slider.wxml
│ ├── video
│ │ ├── video.js
│ │ └── video.wxml
│ ├── loading
│ │ ├── loading.js
│ │ └── loading.wxml
│ ├── audio
│ │ ├── audio.wxml
│ │ └── audio.js
│ ├── text
│ │ ├── text.wxml
│ │ └── text.js
│ ├── modal
│ │ ├── modal.js
│ │ └── modal.wxml
│ └── toast
│ │ ├── toast.js
│ │ └── toast.wxml
│ ├── resources
│ ├── pic
│ │ ├── 1.jpg
│ │ └── 2.jpg
│ └── kind
│ │ ├── form.png
│ │ ├── map.png
│ │ ├── nav.png
│ │ ├── view.png
│ │ ├── canvas.png
│ │ ├── content.png
│ │ ├── media.png
│ │ └── interact.png
│ ├── index.wxml
│ ├── index.js
│ └── index.wxss
├── image
├── pause.png
├── play.png
├── plus.png
├── record.png
├── stop.png
├── trash.png
├── wechat.png
├── icon_API.png
├── wechatHL.png
├── arrowright.png
├── green_tri.png
├── icon_API_HL.png
├── icon_component.png
├── icon64_appwx_logo.png
└── icon_component_HL.png
├── images
├── icon
│ ├── bt-normal.png
│ ├── bt-select.png
│ ├── lc-normal.png
│ ├── lc-select.png
│ ├── tz-normal.png
│ ├── tz-select.png
│ ├── wo-normal.png
│ ├── wo-select.png
│ ├── zc-normal.png
│ └── zc-select.png
├── right_arrow@2x.png
└── right_arrow@3x.png
├── util
└── util.js
├── README.md
├── utils
└── util.js
├── app.js
├── app.json
└── app.wxss
/pages/licai/licai.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/touzi/touzi.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/navigator/navigator.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/request/request.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/storage/storage.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/index/calendar/calendar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/index/userinfo/userinfo.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/upload-file/upload-file.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/web-socket/web-socket.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/index/userassets/userassets.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/download-file/download-file.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/open-location/open-location.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/request/request.js:
--------------------------------------------------------------------------------
1 | Page({})
2 |
--------------------------------------------------------------------------------
/page/API/get-system-info/get-system-info.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/request-payment/request-payment.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/upload-file/upload-file.js:
--------------------------------------------------------------------------------
1 | Page({})
2 |
--------------------------------------------------------------------------------
/page/API/web-socket/web-socket.js:
--------------------------------------------------------------------------------
1 | Page({})
2 |
--------------------------------------------------------------------------------
/page/component/component-pages/input/input.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/download-file/download-file.js:
--------------------------------------------------------------------------------
1 | Page({})
2 |
--------------------------------------------------------------------------------
/page/component/component-pages/button/button.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/component/component-pages/slide-tab/slide-tab.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/component/component-pages/view/view.js:
--------------------------------------------------------------------------------
1 | Page({})
2 |
--------------------------------------------------------------------------------
/page/API/navigation-bar-loading/navigation-bar-loading.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/API/request-payment/request-payment.js:
--------------------------------------------------------------------------------
1 | Page({
2 | })
3 |
--------------------------------------------------------------------------------
/page/API/set-navigation-bar-title/set-navigation-bar-title.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/page/component/component-pages/image/image.js:
--------------------------------------------------------------------------------
1 | Page({
2 | })
3 |
--------------------------------------------------------------------------------
/page/component/component-pages/navigator/navigator.js:
--------------------------------------------------------------------------------
1 | Page({})
--------------------------------------------------------------------------------
/page/component/component-pages/progress/progress.js:
--------------------------------------------------------------------------------
1 | Page({})
2 |
--------------------------------------------------------------------------------
/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "首页"
3 | }
--------------------------------------------------------------------------------
/pages/licai/licai.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "理财"
3 | }
--------------------------------------------------------------------------------
/pages/touzi/touzi.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "投资"
3 | }
--------------------------------------------------------------------------------
/pages/baitiao/baitiao.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "白条"
3 | }
--------------------------------------------------------------------------------
/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志"
3 | }
--------------------------------------------------------------------------------
/page/API/file/file.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "文件"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/image/image.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "图片"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/login/login.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "微信登录"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/voice/voice.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "录音"
3 | }
4 |
--------------------------------------------------------------------------------
/pages/zhongchou/zhongchou.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "众筹"
3 | }
--------------------------------------------------------------------------------
/page/API/canvas/canvas.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "创建画布"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/request/request.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "网络请求"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/storage/storage.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "数据存储"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/video/video.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "拍摄/选择视频"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/animation/animation.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "动画"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/navigator/navigator.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "页面跳转"
3 | }
4 |
--------------------------------------------------------------------------------
/image/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/pause.png
--------------------------------------------------------------------------------
/image/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/play.png
--------------------------------------------------------------------------------
/image/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/plus.png
--------------------------------------------------------------------------------
/image/record.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/record.png
--------------------------------------------------------------------------------
/image/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/stop.png
--------------------------------------------------------------------------------
/image/trash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/trash.png
--------------------------------------------------------------------------------
/image/wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/wechat.png
--------------------------------------------------------------------------------
/page/API/get-location/get-location.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "获取位置"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/upload-file/upload-file.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "上传文件"
3 | }
4 |
--------------------------------------------------------------------------------
/image/icon_API.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/icon_API.png
--------------------------------------------------------------------------------
/image/wechatHL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/wechatHL.png
--------------------------------------------------------------------------------
/page/API/download-file/download-file.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "下载文件"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/get-user-info/get-user-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "获取用户信息"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/open-location/open-location.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看位置"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/request-payment/request-payment.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "发起支付"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/web-socket/web-socket.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Web Socket"
3 | }
4 |
--------------------------------------------------------------------------------
/page/component/component-pages/map/map.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "地图"
3 | }
4 |
--------------------------------------------------------------------------------
/image/arrowright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/arrowright.png
--------------------------------------------------------------------------------
/image/green_tri.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/green_tri.png
--------------------------------------------------------------------------------
/image/icon_API_HL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/icon_API_HL.png
--------------------------------------------------------------------------------
/page/API/background-audio/background-audio.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "背景音乐"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/get-system-info/get-system-info.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "获取手机系统信息"
3 | }
4 |
--------------------------------------------------------------------------------
/page/component/component-pages/canvas/canvas.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "画布"
3 | }
4 |
--------------------------------------------------------------------------------
/page/component/component-pages/progress/progress.wxss:
--------------------------------------------------------------------------------
1 | progress{
2 | margin-bottom: 60rpx;
3 | }
4 |
--------------------------------------------------------------------------------
/pages/licai/licai.wxml:
--------------------------------------------------------------------------------
1 |
2 | coming soon
3 |
--------------------------------------------------------------------------------
/pages/touzi/touzi.wxml:
--------------------------------------------------------------------------------
1 |
2 | coming soon
3 |
--------------------------------------------------------------------------------
/page/API/get-network-type/get-network-type.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "获取手机网络状态"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/on-compass-change/on-compass-change.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "监听罗盘数据"
3 | }
4 |
--------------------------------------------------------------------------------
/image/icon_component.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/icon_component.png
--------------------------------------------------------------------------------
/images/icon/bt-normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/bt-normal.png
--------------------------------------------------------------------------------
/images/icon/bt-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/bt-select.png
--------------------------------------------------------------------------------
/images/icon/lc-normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/lc-normal.png
--------------------------------------------------------------------------------
/images/icon/lc-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/lc-select.png
--------------------------------------------------------------------------------
/images/icon/tz-normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/tz-normal.png
--------------------------------------------------------------------------------
/images/icon/tz-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/tz-select.png
--------------------------------------------------------------------------------
/images/icon/wo-normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/wo-normal.png
--------------------------------------------------------------------------------
/images/icon/wo-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/wo-select.png
--------------------------------------------------------------------------------
/images/icon/zc-normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/zc-normal.png
--------------------------------------------------------------------------------
/images/icon/zc-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/icon/zc-select.png
--------------------------------------------------------------------------------
/images/right_arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/right_arrow@2x.png
--------------------------------------------------------------------------------
/images/right_arrow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/images/right_arrow@3x.png
--------------------------------------------------------------------------------
/pages/index/images/bt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/bt.png
--------------------------------------------------------------------------------
/pages/index/images/bzx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/bzx.png
--------------------------------------------------------------------------------
/pages/index/images/cgz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/cgz.png
--------------------------------------------------------------------------------
/pages/index/images/db.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/db.png
--------------------------------------------------------------------------------
/pages/index/images/dj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/dj.png
--------------------------------------------------------------------------------
/pages/index/images/gb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/gb.png
--------------------------------------------------------------------------------
/pages/index/images/gp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/gp.png
--------------------------------------------------------------------------------
/pages/index/images/hj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/hj.png
--------------------------------------------------------------------------------
/pages/index/images/hk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/hk.png
--------------------------------------------------------------------------------
/pages/index/images/jj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/jj.png
--------------------------------------------------------------------------------
/pages/index/images/jt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/jt.png
--------------------------------------------------------------------------------
/pages/index/images/jy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/jy.png
--------------------------------------------------------------------------------
/pages/index/images/plf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/plf.png
--------------------------------------------------------------------------------
/pages/index/images/ss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/ss.png
--------------------------------------------------------------------------------
/pages/index/images/xbk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/xbk.png
--------------------------------------------------------------------------------
/pages/index/images/xjk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/xjk.png
--------------------------------------------------------------------------------
/pages/index/images/yhq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/yhq.png
--------------------------------------------------------------------------------
/pages/index/images/zc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/zc.png
--------------------------------------------------------------------------------
/image/icon64_appwx_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/icon64_appwx_logo.png
--------------------------------------------------------------------------------
/image/icon_component_HL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/image/icon_component_HL.png
--------------------------------------------------------------------------------
/page/API/navigation-bar-loading/navigation-bar-loading.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "标题栏加载动画"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/on-accelerometer-change/on-accelerometer-change.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "监听重力感应数据"
3 | }
4 |
--------------------------------------------------------------------------------
/page/API/set-navigation-bar-title/set-navigation-bar-title.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "设置页面标题"
3 | }
4 |
--------------------------------------------------------------------------------
/page/component/component-pages/icon/icon.wxss:
--------------------------------------------------------------------------------
1 | .group{
2 | flex-direction: row;
3 | align-items: center;
4 | }
5 |
--------------------------------------------------------------------------------
/page/component/component-pages/radio/radio.wxss:
--------------------------------------------------------------------------------
1 | .radio {
2 | display: block;
3 | margin-bottom: 20rpx;
4 | }
5 |
--------------------------------------------------------------------------------
/page/component/component-pages/swiper/swiper.wxss:
--------------------------------------------------------------------------------
1 | .swiper-item{
2 | display: block;
3 | height: 150px;
4 | }
5 |
--------------------------------------------------------------------------------
/pages/index/images/bbjh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/bbjh.png
--------------------------------------------------------------------------------
/pages/index/images/bmlc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/bmlc.png
--------------------------------------------------------------------------------
/pages/index/images/bthk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/bthk.png
--------------------------------------------------------------------------------
/pages/index/images/btsc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/btsc.png
--------------------------------------------------------------------------------
/pages/index/images/btsf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/btsf.png
--------------------------------------------------------------------------------
/pages/index/images/btte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/btte.png
--------------------------------------------------------------------------------
/pages/index/images/dqhk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/dqhk.png
--------------------------------------------------------------------------------
/pages/index/images/hfkzr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/hfkzr.png
--------------------------------------------------------------------------------
/pages/index/images/sjcz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/sjcz.png
--------------------------------------------------------------------------------
/pages/index/images/xblc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/xblc.png
--------------------------------------------------------------------------------
/pages/index/images/xbxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/xbxy.png
--------------------------------------------------------------------------------
/pages/index/images/xybt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/xybt.png
--------------------------------------------------------------------------------
/pages/index/images/xykhk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/xykhk.png
--------------------------------------------------------------------------------
/page/component/component-pages/picker/picker.wxss:
--------------------------------------------------------------------------------
1 | .picker{
2 | padding: 26rpx;
3 | background-color: #FFFFFF;
4 | }
5 |
--------------------------------------------------------------------------------
/pages/index/images/eye@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/eye@2x.png
--------------------------------------------------------------------------------
/pages/index/images/eye@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/eye@3x.png
--------------------------------------------------------------------------------
/page/component/component-pages/checkbox/checkbox.wxss:
--------------------------------------------------------------------------------
1 | .checkbox{
2 | display: block;
3 | margin-bottom: 20rpx;
4 | }
5 |
--------------------------------------------------------------------------------
/pages/baitiao/images/more@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/more@2x.png
--------------------------------------------------------------------------------
/pages/baitiao/images/phone@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/phone@2x.png
--------------------------------------------------------------------------------
/pages/index/images/newarea@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/newarea@2x.png
--------------------------------------------------------------------------------
/pages/index/images/newarea@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/newarea@3x.png
--------------------------------------------------------------------------------
/page/component/resources/pic/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/pic/1.jpg
--------------------------------------------------------------------------------
/page/component/resources/pic/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/pic/2.jpg
--------------------------------------------------------------------------------
/pages/baitiao/images/baipai@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/baipai@2x.png
--------------------------------------------------------------------------------
/pages/baitiao/images/daikuan@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/daikuan@2x.png
--------------------------------------------------------------------------------
/pages/baitiao/images/gangbeng@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/gangbeng@2x.png
--------------------------------------------------------------------------------
/pages/baitiao/images/xiaoyuan@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/xiaoyuan@2x.png
--------------------------------------------------------------------------------
/pages/index/images/investment@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/investment@2x.png
--------------------------------------------------------------------------------
/pages/index/images/investment@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/investment@3x.png
--------------------------------------------------------------------------------
/page/API/common/footer.wxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/page/component/resources/kind/form.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/kind/form.png
--------------------------------------------------------------------------------
/page/component/resources/kind/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/kind/map.png
--------------------------------------------------------------------------------
/page/component/resources/kind/nav.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/kind/nav.png
--------------------------------------------------------------------------------
/page/component/resources/kind/view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/kind/view.png
--------------------------------------------------------------------------------
/pages/baitiao/images/baina_icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/baina_icon@2x.png
--------------------------------------------------------------------------------
/pages/baitiao/images/shangcheng@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/shangcheng@2x.png
--------------------------------------------------------------------------------
/pages/baitiao/images/sibaitiao@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/sibaitiao@2x.png
--------------------------------------------------------------------------------
/pages/baitiao/images/xiaobaika@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/xiaobaika@2x.png
--------------------------------------------------------------------------------
/pages/baitiao/images/youhuijuan@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/baitiao/images/youhuijuan@2x.png
--------------------------------------------------------------------------------
/pages/index/images/right_arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/right_arrow@2x.png
--------------------------------------------------------------------------------
/pages/index/images/right_arrow@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/right_arrow@3x.png
--------------------------------------------------------------------------------
/pages/index/images/servicearea@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/servicearea@2x.png
--------------------------------------------------------------------------------
/pages/index/images/servicearea@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/pages/index/images/servicearea@3x.png
--------------------------------------------------------------------------------
/page/API/pull-down-refresh/pull-down-refresh.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "下拉刷新",
3 | "enablePullDownRefresh": true
4 | }
5 |
--------------------------------------------------------------------------------
/page/component/component-pages/canvas/canvas.wxss:
--------------------------------------------------------------------------------
1 | .canvas {
2 | width: 305px;
3 | height: 305px;
4 | background-color: #fff;
5 | }
6 |
--------------------------------------------------------------------------------
/page/component/resources/kind/canvas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/kind/canvas.png
--------------------------------------------------------------------------------
/page/component/resources/kind/content.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/kind/content.png
--------------------------------------------------------------------------------
/page/component/resources/kind/media.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/kind/media.png
--------------------------------------------------------------------------------
/page/component/resources/kind/interact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/getweapp/weapp-jd-baitiao/HEAD/page/component/resources/kind/interact.png
--------------------------------------------------------------------------------
/pages/logs/logs.wxss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | display: flex;
3 | flex-direction: column;
4 | padding: 40rpx;
5 | }
6 | .log-item {
7 | margin: 10rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/page/component/component-pages/image/image.wxss:
--------------------------------------------------------------------------------
1 | .section__ctn{
2 | text-align: center;
3 | }
4 | .image{
5 | width: 580rpx;
6 | height: 208rpx;
7 | }
--------------------------------------------------------------------------------
/page/component/component-pages/label/label.wxss:
--------------------------------------------------------------------------------
1 | .label-1, .label-2{
2 | margin-bottom: 30rpx;
3 | }
4 |
5 | .label-4_text{
6 | text-align: center;
7 | margin-top: 30rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/page/component/component-pages/navigator/navigator.wxss:
--------------------------------------------------------------------------------
1 | .navigator-hover button{
2 | background-color:blue;
3 | }
4 | .other-navigator-hover button{
5 | background-color:red;
6 | }
7 |
--------------------------------------------------------------------------------
/page/component/component-pages/navigator/navigate.js:
--------------------------------------------------------------------------------
1 | Page({
2 | onLoad: function(options) {
3 | console.log(options)
4 | this.setData({
5 | title: options.title
6 | })
7 | }
8 | })
9 |
--------------------------------------------------------------------------------
/page/component/component-pages/navigator/redirect.js:
--------------------------------------------------------------------------------
1 | Page({
2 | onLoad: function(options) {
3 | console.log(options)
4 | this.setData({
5 | title: options.title
6 | })
7 | }
8 | })
9 |
--------------------------------------------------------------------------------
/page/component/component-pages/action-sheet/action-sheet.wxss:
--------------------------------------------------------------------------------
1 | /*
2 | .cancel {
3 | color: white;
4 | background: #303F9F;
5 | }
6 | .item {
7 | color: black;
8 | background: #C5CAE9;
9 | }*/
10 |
--------------------------------------------------------------------------------
/page/API/common/header.wxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/baitiao/baitiao.wxss:
--------------------------------------------------------------------------------
1 | /*用户信息*/
2 | @import "limitarea/limitarea.wxss";
3 | /*主广告位*/
4 | @import "mainad/mainad.wxss";
5 | /*频道入口*/
6 | @import "channel/channel.wxss";
7 | /*频道底部*/
8 | @import "channelbottom/channelbottom.wxss";
--------------------------------------------------------------------------------
/pages/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/page/API/get-network-type/get-network-type.wxss:
--------------------------------------------------------------------------------
1 | .page-body-info {
2 | height: 200rpx;
3 | }
4 | .page-body-text-network-type {
5 | font-size: 80rpx;
6 | font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
7 | }
8 |
--------------------------------------------------------------------------------
/page/API/on-compass-change/on-compass-change.wxss:
--------------------------------------------------------------------------------
1 | .direction {
2 | margin-top: 100rpx;
3 | display: flex;
4 | }
5 | .direction-value {
6 | font-size: 200rpx;
7 | }
8 | .direction-degree {
9 | font-size: 40rpx;
10 | }
11 |
--------------------------------------------------------------------------------
/page/component/component-pages/navigator/navigate.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 新建的页面
4 | 这是新建的页面,点击左上角返回回到之前页面
5 |
6 |
7 |
--------------------------------------------------------------------------------
/page/component/component-pages/navigator/redirect.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 当前页
4 | 这是当前页,点击左上角返回回到上级菜单
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/licai/licai.js:
--------------------------------------------------------------------------------
1 | //licai.js
2 | //获取应用实例
3 |
4 | Page({
5 | data: {
6 | },
7 | onLoad: function () {
8 | console.log('理财');
9 | },
10 | onReady: function () {
11 | console.log('理财');
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/pages/touzi/touzi.js:
--------------------------------------------------------------------------------
1 | //touzi.js
2 | //获取应用实例
3 |
4 | Page({
5 | data: {
6 | },
7 | onLoad: function () {
8 | console.log('touzi');
9 | },
10 | onReady: function () {
11 | console.log('touzi');
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/page/API/navigation-bar-loading/navigation-bar-loading.js:
--------------------------------------------------------------------------------
1 | Page({
2 | showNavigationBarLoading: function () {
3 | wx.showNavigationBarLoading()
4 | },
5 | hideNavigationBarLoading: function () {
6 | wx.hideNavigationBarLoading()
7 | }
8 | })
9 |
--------------------------------------------------------------------------------
/page/API/set-navigation-bar-title/set-navigation-bar-title.js:
--------------------------------------------------------------------------------
1 | Page({
2 | setNaivgationBarTitle: function (e) {
3 | var title = e.detail.value.title
4 | console.log(title)
5 | wx.setNavigationBarTitle({
6 | title: title
7 | })
8 | }
9 | })
10 |
--------------------------------------------------------------------------------
/page/component/component-pages/form/form.wxss:
--------------------------------------------------------------------------------
1 | wx-button {
2 | margin-top: 20rpx;
3 | margin-bottom: 20rpx;
4 | }
5 | wx-label {
6 | display: block;
7 | margin-top: 10rpx;
8 | }
9 | .picker-text {
10 | margin-left: 20rpx;
11 | position: relative;
12 | }
13 |
--------------------------------------------------------------------------------
/page/component/component-pages/scroll-view/scroll-view.wxss:
--------------------------------------------------------------------------------
1 | .scroll-view_H{
2 | white-space: nowrap;
3 | }
4 | .scroll-view-item{
5 | height: 200px;
6 | }
7 | .scroll-view-item_H{
8 | display: inline-block;
9 | width: 100%;
10 | height: 200px;
11 | }
12 |
--------------------------------------------------------------------------------
/page/API/pull-down-refresh/pull-down-refresh.wxss:
--------------------------------------------------------------------------------
1 | .page-body-info {
2 | background-color: transparent;
3 | }
4 | .page-body-buttons button {
5 | color: #21c932;
6 | margin: 0 100rpx;
7 | }
8 | .page-body-buttons button:after {
9 | border-color: #21c932;
10 | }
11 |
--------------------------------------------------------------------------------
/page/component/component-pages/switch/switch.js:
--------------------------------------------------------------------------------
1 | Page({
2 | switch1Change: function (e){
3 | console.log('switch1 发生 change 事件,携带值为', e.detail.value)
4 | },
5 | switch2Change: function (e){
6 | console.log('switch2 发生 change 事件,携带值为', e.detail.value)
7 | }
8 | })
9 |
--------------------------------------------------------------------------------
/page/API/get-user-info/get-user-info.wxss:
--------------------------------------------------------------------------------
1 | .page-body-info {
2 | height: 350rpx;
3 | }
4 | .userinfo-avatar {
5 | border-radius: 128rpx;
6 | width: 128rpx;
7 | height: 128rpx;
8 | }
9 | .userinfo-nickname {
10 | margin-top: 20rpx;
11 | font-size: 38rpx;
12 | }
13 |
--------------------------------------------------------------------------------
/page/API/navigator/navigator.js:
--------------------------------------------------------------------------------
1 | Page({
2 | navigateTo: function () {
3 | wx.navigateTo({ url: './navigator' })
4 | },
5 | navigateBack: function () {
6 | wx.navigateBack()
7 | },
8 | redirectTo: function () {
9 | wx.redirectTo({ url: './navigator' })
10 | }
11 | })
12 |
--------------------------------------------------------------------------------
/page/component/component-pages/view/view.wxss:
--------------------------------------------------------------------------------
1 | .flex-wrp{
2 | height: 100px;
3 | display:flex;
4 | background-color: #FFFFFF;
5 | }
6 | .flex-item{
7 | width: 100px;
8 | height: 100px;
9 | color: #FFFFFF;
10 | display: flex;
11 | justify-content: center;
12 | align-items: center;
13 | }
14 |
--------------------------------------------------------------------------------
/page/API/on-compass-change/on-compass-change.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | direction: 0
4 | },
5 | onReady: function () {
6 | var that = this
7 | wx.onCompassChange(function (res) {
8 | that.setData({
9 | direction: parseInt(res.direction)
10 | })
11 | })
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/page/component/component-pages/slider/slider.js:
--------------------------------------------------------------------------------
1 | var pageData = {}
2 | for (var i = 1; i < 5; ++i) {
3 | (function (index) {
4 | pageData['slider' + index + 'change'] = function(e) {
5 | console.log('slider' + index + '发生change事件,携带值为', e.detail.value)
6 | }
7 | })(i)
8 | }
9 | Page(pageData)
10 |
--------------------------------------------------------------------------------
/pages/baitiao/mainad/mainad.wxss:
--------------------------------------------------------------------------------
1 | .mainad-area{
2 | padding-bottom: 40rpx;
3 | }
4 |
5 | .swiper-item{
6 | display: block;
7 | height: 150px;
8 | }
9 |
10 | .slide-image{
11 | width: 100%;
12 | }
13 |
14 | .section_gap .repeat{
15 | background-color: #DDDDDD;
16 | width: 12rpx;
17 | height: 12rpx;
18 | }
--------------------------------------------------------------------------------
/pages/baitiao/baitiao.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/page/API/get-location/format-location.js:
--------------------------------------------------------------------------------
1 | function formatLocation(longitude, latitude) {
2 | longitude = longitude.toFixed(2)
3 | latitude = latitude.toFixed(2)
4 |
5 | return {
6 | longitude: longitude.toString().split('.'),
7 | latitude: latitude.toString().split('.')
8 | }
9 | }
10 |
11 | module.exports = formatLocation
12 |
--------------------------------------------------------------------------------
/page/API/get-location/get-location.wxss:
--------------------------------------------------------------------------------
1 | .page-body-info {
2 | height: 250rpx;
3 | }
4 | .page-body-text-small {
5 | font-size: 24rpx;
6 | color: #000;
7 | margin-bottom: 100rpx;
8 | }
9 | .page-body-text-location {
10 | display: flex;
11 | font-size: 50rpx;
12 | }
13 | .page-body-text-location text {
14 | margin: 10rpx;
15 | }
16 |
--------------------------------------------------------------------------------
/pages/logs/logs.js:
--------------------------------------------------------------------------------
1 | //logs.js
2 | var util = require('../../utils/util.js')
3 | Page({
4 | data: {
5 | logs: []
6 | },
7 | onLoad: function () {
8 | this.setData({
9 | logs: (wx.getStorageSync('logs') || []).map(function (log) {
10 | return util.formatTime(new Date(log))
11 | })
12 | })
13 | }
14 | })
15 |
--------------------------------------------------------------------------------
/page/API/pull-down-refresh/pull-down-refresh.js:
--------------------------------------------------------------------------------
1 | Page({
2 | onPullDownRefresh: function () {
3 | console.log('onPullDownRefresh', new Date())
4 | },
5 | stopPullDownRefresh: function () {
6 | wx.stopPullDownRefresh({
7 | complete: function (res) {
8 | console.log(res, new Date())
9 | }
10 | })
11 | }
12 | })
13 |
--------------------------------------------------------------------------------
/page/component/component-pages/video/video.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data:{
3 | src: "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
4 | }
5 | })
6 |
--------------------------------------------------------------------------------
/page/API/get-system-info/get-system-info.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | systemInfo: {}
4 | },
5 | getSystemInfo: function () {
6 | var that = this
7 | wx.getSystemInfo({
8 | success: function (res) {
9 | that.setData({
10 | systemInfo: res
11 | })
12 | that.update()
13 | }
14 | })
15 | }
16 | })
17 |
--------------------------------------------------------------------------------
/page/component/component-pages/canvas/canvas.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | canvas
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/page/API/open-location/open-location.js:
--------------------------------------------------------------------------------
1 | Page({
2 | openLocation: function (e) {
3 | console.log(e)
4 | var value = e.detail.value
5 | console.log(value)
6 | wx.openLocation({
7 | longitude: Number(value.longitude),
8 | latitude: Number(value.latitude),
9 | name: value.name,
10 | address: value.address
11 | })
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/page/API/canvas/example.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{method}}
4 | {{introduction}}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/page/component/component-pages/loading/loading.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | hidden: true
4 | },
5 | loadingChange: function() {
6 | this.setData({
7 | hidden: true
8 | })
9 | },
10 | loadingTap: function() {
11 | this.setData({
12 | hidden: false
13 | })
14 |
15 | var that = this
16 | setTimeout(function() {
17 | that.setData({
18 | hidden: true
19 | })
20 | }, 1500)
21 | }
22 | })
23 |
--------------------------------------------------------------------------------
/page/component/component-pages/radio/radio.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | items: [
4 | {name: 'USA', value: '美国'},
5 | {name: 'CHN', value: '中国', checked: 'true'},
6 | {name: 'BRA', value: '巴西'},
7 | {name: 'JPN', value: '日本'},
8 | {name: 'ENG', value: '英国'},
9 | {name: 'FRA', value: '法国'},
10 | ]
11 | },
12 | radioChange: function(e) {
13 | console.log('radio发生change事件,携带value值为:', e.detail.value)
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/page/API/request/request.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 搭建好自己的后台服务器后,可以跟服务器互通数据,为用户提供个性化服务。
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/page/component/component-pages/checkbox/checkbox.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | items: [
4 | {name: 'USA', value: '美国'},
5 | {name: 'CHN', value: '中国', checked: 'true'},
6 | {name: 'BRA', value: '巴西'},
7 | {name: 'JPN', value: '日本'},
8 | {name: 'ENG', value: '英国'},
9 | {name: 'FRA', value: '法国'},
10 | ]
11 | },
12 | checkboxChange: function(e) {
13 | console.log('checkbox发生change事件,携带value值为:', e.detail.value)
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/page/API/login/login.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 | Page({
3 | onLoad: function () {
4 | this.setData({
5 | hasLogin: app.globalData.hasLogin
6 | })
7 | },
8 | data: {},
9 | login: function () {
10 | var that = this
11 | wx.login({
12 | success: function (res) {
13 | app.globalData.hasLogin = true
14 | that.setData({
15 | hasLogin: true
16 | })
17 | that.update()
18 | }
19 | })
20 | }
21 | })
22 |
--------------------------------------------------------------------------------
/page/API/upload-file/upload-file.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 搭建好自己的后台服务器后,可以将手机上的图片视频等资源上传到服务器上。
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/page/API/web-socket/web-socket.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 搭建好自己的后台服务器后,可以跟服务器建立持久连接,实现即时聊天等功能。
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/page/component/component-pages/switch/switch.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | switch
4 | 开关
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/page/API/download-file/download-file.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 搭建好自己的后台服务器后,可以将服务器上的图片视频等资源下载到手机上。
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/page/component/component-pages/icon/icon.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | iconSize: [20, 30, 40, 50, 60, 70],
4 | iconColor: [
5 | 'red', 'orange', 'yellow', 'green', 'rgb(0,255,255)', 'blue', 'purple'
6 | ],
7 | iconType: [
8 | 'success', 'info', 'warn', 'waiting', 'safe_success', 'safe_warn',
9 | 'success_circle', 'success_no_circle', 'waiting_circle', 'circle', 'download',
10 | 'info_circle', 'cancel', 'search', 'clear'
11 | ]
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/page/component/component-pages/video/video.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | video
4 | 视频
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/page/API/request-payment/request-payment.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 自主接入微信支付后,可以让用户在页面上快捷完成下单购买。
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/util/util.js:
--------------------------------------------------------------------------------
1 | function formatTime(time) {
2 | if (typeof time !== 'number' || time < 0) {
3 | return time
4 | }
5 |
6 | var hour = parseInt(time / 3600)
7 | time = time % 3600
8 | var minute = parseInt(time / 60)
9 | time = time % 60
10 | var second = time
11 |
12 | return ([hour, minute, second]).map(function (n) {
13 | n = n.toString()
14 | return n[1] ? n : '0' + n
15 | }).join(':')
16 | }
17 |
18 | module.exports = {
19 | formatTime: formatTime
20 | }
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 微信小程序-京东白条
2 |
3 | ### 说明:
4 |
5 | 实现了首页和白条页,以及微信小程序开放API接口功能和模块展示。
6 |
7 | ### 数据接口:
8 |
9 | 使用本地数据
10 |
11 | ### 目录结构:
12 |
13 | - image — 存放项目图片
14 | - images — 存放项目图片
15 | - page — 微信小程序开放API和组件页面相关文件,包括API和component等
16 | - pages — 存放项目页面相关文件,包括- baitiao,index,licai,logs,touzi,zhongchou等页面
17 | - util,utils — 存放日期处理文件,可require引入
18 |
19 | ### 开发环境:
20 |
21 | 微信web开发者工具 v0.10.102800
22 |
23 | ### 项目截图:
24 |
25 | https://www.getweapp.com/project?projectId=5832c56cbb2538f8186c7079
--------------------------------------------------------------------------------
/page/component/component-pages/audio/audio.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | audio
4 | 音频
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/page/component/component-pages/map/map.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | map
4 |
5 |
6 |
7 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/page/component/component-pages/text/text.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | text
4 | 文字标签
5 |
6 |
7 |
8 |
9 | {{text}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/index/servicearea/servicearea.wxss:
--------------------------------------------------------------------------------
1 |
2 | .servicearea-area{
3 | margin-top: 20rpx;
4 | }
5 |
6 | .servicearea-grid{
7 | height: 235rpx;
8 | }
9 |
10 | .servicearea-item{
11 | flex: 1;
12 | }
13 |
14 | .servicearea-item-icon{
15 | width: 114rpx;
16 | height: 114rpx;
17 | border-radius: 50%;
18 | }
19 |
20 | .servicearea-item-desp{
21 | margin-top: 16rpx;
22 | font-family: PingFangSC-Regular;
23 | font-size: 26rpx;
24 | line-height: 37rpx;
25 | color: #333333;
26 | }
--------------------------------------------------------------------------------
/page/component/component-pages/progress/progress.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | progress
4 | 进度条
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/page/API/on-accelerometer-change/on-accelerometer-change.wxss:
--------------------------------------------------------------------------------
1 | .page-body-xyz {
2 | display: flex;
3 | justify-content: space-around;
4 | width: 700rpx;
5 | margin-top: 50rpx;
6 | box-sizing: border-box;
7 | }
8 | .page-body-canvas {
9 | width: 302px;
10 | height: 302px;
11 | position: relative;
12 | }
13 | .page-body-ball {
14 | position: absolute;
15 | top: 0;
16 | left: 0;
17 | width: 302px;
18 | height: 302px;
19 | }
20 | .page-body-title {
21 | font-size: 50rpx;
22 | width: 250rpx;
23 | }
24 |
--------------------------------------------------------------------------------
/pages/baitiao/channelbottom/channelbottom.wxss:
--------------------------------------------------------------------------------
1 | .channel-bottom-top{
2 | height: 230rpx;
3 | text-align: center;
4 | }
5 |
6 | .channel-bottom-icon{
7 | margin-right: 16rpx;
8 | width: 218rpx;
9 | height: 230rpx;
10 | }
11 |
12 | .channel-bottom-icon:last-child{
13 | margin-right: 0rpx;
14 | }
15 |
16 | .channel-bottom-bottom{
17 | height: 120rpx;
18 | line-height: 120rpx;
19 | text-align: center;
20 | font-family: PingFangSC-Regular;
21 | font-size: 28rpx;
22 | color: #508CEE;
23 | }
--------------------------------------------------------------------------------
/pages/baitiao/mainad/mainad.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/page/component/component-pages/slide-tab/slide-tab.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | texts: [
4 | '这是第1个tab\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n嘻嘻,到底了',
5 | '这是第2个tab\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n嘻嘻,到底了',
6 | '这是第3个tab\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n嘻嘻,到底了'
7 | ]
8 | },
9 | tabchange: function(e){
10 | console.log('现在跳转到了第 ' + e.detail.current + ' 个tab')
11 | }
12 | })
13 |
--------------------------------------------------------------------------------
/page/component/component-pages/loading/loading.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | loading
4 | loading提示
5 |
6 |
7 |
8 |
9 |
10 | 加载中...
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/page/component/component-pages/modal/modal.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | modalHidden: true,
4 | modalHidden2: true
5 | },
6 | modalTap: function(e) {
7 | this.setData({
8 | modalHidden: false
9 | })
10 | },
11 | modalChange: function(e) {
12 | this.setData({
13 | modalHidden: true
14 | })
15 | },
16 | modalTap2: function(e) {
17 | this.setData({
18 | modalHidden2: false
19 | })
20 | },
21 | modalChange2: function(e) {
22 | this.setData({
23 | modalHidden2: true
24 | })
25 | },
26 | })
27 |
--------------------------------------------------------------------------------
/pages/index/calendar/calendar.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 22
4 | 周四
5 |
6 |
7 | 月月盈强势回归,4.80%
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
1 | function formatTime(date) {
2 | var year = date.getFullYear()
3 | var month = date.getMonth() + 1
4 | var day = date.getDate()
5 |
6 | var hour = date.getHours()
7 | var minute = date.getMinutes()
8 | var second = date.getSeconds()
9 |
10 |
11 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
12 | }
13 |
14 | function formatNumber(n) {
15 | n = n.toString()
16 | return n[1] ? n : '0' + n
17 | }
18 |
19 | module.exports = {
20 | formatTime: formatTime
21 | }
22 |
--------------------------------------------------------------------------------
/page/component/component-pages/radio/radio.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | radio
4 | 单选框
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/baitiao/channelbottom/channelbottom.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 618白条剁手攻略终极版,快快拿走
8 |
--------------------------------------------------------------------------------
/page/component/component-pages/audio/audio.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | current: {
4 | poster: 'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000',
5 | name: '此时此刻',
6 | author: '许巍',
7 | src: 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E06DCBDC9AB7C49FD713D632D313AC4858BACB8DDD29067D3C601481D36E62053BF8DFEAF74C0A5CCFADD6471160CAF3E6A&fromtag=46',
8 | },
9 | audioAction: {
10 | method: 'pause'
11 | }
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/page/component/component-pages/checkbox/checkbox.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | checkbox
4 | 多选框
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/page/component/component-pages/text/text.js:
--------------------------------------------------------------------------------
1 | var initText = 'this is first line\nthis is second line'
2 |
3 | Page({
4 | data: {
5 | text: initText
6 | },
7 | extraLine: [],
8 | add: function(e) {
9 | this.extraLine.push('other line')
10 | this.setData({
11 | text: initText + '\n' + this.extraLine.join('\n')
12 | })
13 | },
14 | remove: function(e) {
15 | if (this.extraLine.length > 0) {
16 | this.extraLine.pop()
17 | this.setData({
18 | text: initText + '\n' + this.extraLine.join('\n')
19 | })
20 | }
21 | }
22 | })
23 |
--------------------------------------------------------------------------------
/page/API/get-location/get-location.js:
--------------------------------------------------------------------------------
1 | var formatLocation = require('./format-location.js')
2 |
3 | Page({
4 | data: {
5 | hasLocation: false,
6 | },
7 | getLocation: function () {
8 | var that = this
9 | wx.getLocation({
10 | success: function (res) {
11 | console.log(res)
12 | that.setData({
13 | hasLocation: true,
14 | location: formatLocation(res.longitude, res.latitude)
15 | })
16 | }
17 | })
18 | },
19 | clear: function () {
20 | this.setData({
21 | hasLocation: false
22 | })
23 | }
24 | })
25 |
--------------------------------------------------------------------------------
/page/component/component-pages/picker/picker.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | array: ['中国', '美国', '巴西', '日本'],
4 | index: 0,
5 | date: '2016-09-01',
6 | time: '12:01'
7 | },
8 | bindPickerChange: function(e) {
9 | console.log('picker发送选择改变,携带值为', e.detail.value)
10 | this.setData({
11 | index: e.detail.value
12 | })
13 | },
14 | bindDateChange: function(e) {
15 | this.setData({
16 | date: e.detail.value
17 | })
18 | },
19 | bindTimeChange: function(e) {
20 | this.setData({
21 | time: e.detail.value
22 | })
23 | }
24 | })
25 |
--------------------------------------------------------------------------------
/page/component/component-pages/toast/toast.js:
--------------------------------------------------------------------------------
1 | var toastNum = 2
2 | var pageData = {}
3 | pageData.data = {}
4 | for(var i = 0; i <= toastNum; ++i) {
5 | pageData.data['toast'+i+'Hidden'] = true
6 | ;(function (index) {
7 | pageData['toast'+index+'Change'] = function(e) {
8 | var obj = {}
9 | obj['toast'+index+'Hidden'] = true
10 | this.setData(obj)
11 | }
12 | pageData['toast'+index+'Tap'] = function(e) {
13 | var obj = {}
14 | obj['toast'+index+'Hidden'] = false
15 | this.setData(obj)
16 | }
17 | })(i)
18 | }
19 |
20 | Page(pageData)
21 |
--------------------------------------------------------------------------------
/page/API/get-network-type/get-network-type.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | hasNetworkType: false
4 | },
5 | getNetworkType: function () {
6 | var that = this
7 | wx.getNetworkType({
8 | success: function (res) {
9 | console.log(res)
10 | that.setData({
11 | hasNetworkType: true,
12 | networkType: res.subtype || res.networkType
13 | })
14 | that.update()
15 | }
16 | })
17 | },
18 | clear: function () {
19 | this.setData({
20 | hasNetworkType: false,
21 | networkType: ''
22 | })
23 | }
24 | })
25 |
--------------------------------------------------------------------------------
/page/API/login/login.wxss:
--------------------------------------------------------------------------------
1 | .page-body-wrapper {
2 | margin-top: 200rpx;
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | justify-content: center;
7 | width: 100%;
8 | padding: 0 50rpx;
9 | box-sizing: border-box;
10 | }
11 | .page-body-title {
12 | font-size: 60rpx;
13 | /*TODO 使用 rpx */
14 | line-height: 100px;
15 | }
16 | .page-body-text {
17 | color: #bbb;
18 | font-size: 28rpx;
19 | /*TODO 使用 rpx */
20 | line-height: 20px;
21 | margin: 0 0 100rpx 0;
22 | text-align: center;
23 | }
24 | .page-body-button {
25 | width: 100%;
26 | }
27 |
--------------------------------------------------------------------------------
/page/component/component-pages/map/map.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | latitude: 23.099994,
4 | longitude: 113.324520,
5 | markers: [{
6 | latitude: 23.099994,
7 | longitude: 113.324520,
8 | name: 'T.I.T 创意园'
9 | }],
10 | covers: [{
11 | latitude: 23.099994,
12 | longitude: 113.344520,
13 | iconPath: '/image/green_tri.png', // 目前有 bug,正确的写法应该是 /image/green_tri.png ,等我们下个版本修复吧T_T
14 | }, {
15 | latitude: 23.099994,
16 | longitude: 113.304520,
17 | iconPath: '/image/green_tri.png',
18 | rotate: 180
19 | }]
20 | }
21 | })
22 |
--------------------------------------------------------------------------------
/page/API/on-compass-change/on-compass-change.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 旋转手机即可获取方位信息
10 |
11 | {{direction}}
12 | o
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | var app = getApp();
4 | Page({
5 | data: {
6 | motto: 'Hello World',
7 | userInfo: {
8 |
9 | }
10 | },
11 | //事件处理函数
12 | bindViewTap: function () {
13 | wx.navigateTo({
14 | url: '../logs/logs'
15 | })
16 | },
17 | onLoad: function () {
18 | console.log('onLoad')
19 | var that = this
20 | //调用应用实例的方法获取全局数据
21 | app.getUserInfo(function (userInfo) {
22 | //更新数据
23 | that.setData({
24 | userInfo: userInfo
25 | })
26 | });
27 | },
28 | onReady: function () {
29 |
30 | }
31 | })
32 |
--------------------------------------------------------------------------------
/page/API/pull-down-refresh/pull-down-refresh.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 下滑页面即可刷新
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/page/API/background-audio/background-audio.wxss:
--------------------------------------------------------------------------------
1 | .page-body-wrapper {
2 | margin-top: 0;
3 | }
4 | .page-body-info {
5 | padding-bottom: 50rpx;
6 | }
7 | .time-big {
8 | font-size: 60rpx;
9 | margin: 20rpx;
10 | }
11 | .slider {
12 | width: 650rpx;
13 | }
14 | .play-time {
15 | font-size: 28rpx;
16 | width: 700rpx;
17 | padding: 20rpx 0;
18 | display: flex;
19 | justify-content: space-between;
20 | box-sizing: border-box;
21 | }
22 | .page-body-buttons {
23 | display: flex;
24 | justify-content: space-around;
25 | margin-top: 100rpx;
26 | }
27 | .page-body-button {
28 | width: 250rpx;
29 | text-align: center;
30 | }
31 |
--------------------------------------------------------------------------------
/page/component/component-pages/navigator/navigator.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | navigator
4 | 导航栏
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/pages/index/userinfo/userinfo.wxss:
--------------------------------------------------------------------------------
1 | .userinfo-area{
2 | height: 148rpx;
3 | align-items: center;
4 | }
5 |
6 | .userinfo-icon{
7 | margin: 32rpx;
8 | width: 84rpx;
9 | height: 84rpx;
10 | border-radius: 50%;
11 | }
12 |
13 | .userinfo-item{
14 | flex: 1;
15 | padding-left: 32rpx;
16 | height: 82rpx;
17 | text-align: left;
18 | border-left: 1px solid #eee;
19 | }
20 |
21 | .userinfo-title{
22 | font-size: 37rpx;
23 | color: #333333;
24 | line-height: 38rpx;
25 | }
26 |
27 | .userinfo-desp{
28 | margin-top: 12rpx;
29 | font-size: 24rpx;
30 | color: #999;
31 | line-height: 38rpx;
32 | }
--------------------------------------------------------------------------------
/pages/baitiao/channel/channel.wxss:
--------------------------------------------------------------------------------
1 | .channel-area{
2 | margin-top: 20rpx;
3 | box-sizing: border-box;
4 | }
5 |
6 | .channel-item{
7 | flex: 1;
8 | height: 214rpx;
9 | box-sizing: border-box;
10 | }
11 |
12 | .channel-item-icon{
13 | margin-top: 44rpx;
14 | width: 72rpx;
15 | height: 72rpx;
16 | }
17 |
18 | .channel-item-desp{
19 | margin-top: 18rpx;
20 | font-family: PingFangSC-Regular;
21 | font-size: 28rpx;
22 | line-height: 40rpx;
23 | color: #333333;
24 | }
25 |
26 | .channel-item-desp1{
27 | margin-top: 2rpx;
28 | font-family: PingFangSC-Regular;
29 | font-size: 22rpx;
30 | line-height: 30rpx;
31 | color: #FF801A;
32 | }
--------------------------------------------------------------------------------
/page/API/navigation-bar-loading/navigation-bar-loading.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/page/API/navigator/navigator.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/page/API/canvas/canvas.wxss:
--------------------------------------------------------------------------------
1 | .page-body-wrapper {
2 | flex-grow: 1;
3 | }
4 | .canvas-element-wrapper {
5 | display: block;
6 | margin-bottom: 100rpx;
7 | }
8 | .canvas-element {
9 | width: 100%;
10 | height: 400rpx;
11 | }
12 | .canvas-buttons {
13 | padding: 50rpx 50rpx 10rpx;
14 | border-top: 1px solid #ccc;
15 | display: flex;
16 | flex-grow: 1;
17 | overflow-y: scroll;
18 | flex-direction: row;
19 | flex-wrap: wrap;
20 | width: 100%;
21 | height: 400rpx;
22 | box-sizing: border-box;
23 | }
24 | .canvas-button {
25 | font-size: 28rpx;
26 | width: 290rpx;
27 | margin: 20rpx auto;
28 | }
29 | .canvas-button-reset {
30 | width: 610rpx;
31 | margin: 20rpx auto;
32 | }
33 |
--------------------------------------------------------------------------------
/pages/baitiao/baitiao.js:
--------------------------------------------------------------------------------
1 | //baitiao.js
2 | //获取应用实例
3 |
4 | Page({
5 | data: {
6 | limit: '29,102.00',
7 | background: ['green', 'red', 'yellow'],
8 | imgUrls: [
9 | 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
10 | 'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
11 | 'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
12 | ],
13 | indicatorDots: true,
14 | vertical: false,
15 | autoplay: false,
16 | interval: 3000,
17 | duration: 1200
18 | },
19 | onLoad: function () {
20 | console.log('123');
21 | },
22 | onReady: function () {
23 | console.log('123');
24 | }
25 | })
26 |
--------------------------------------------------------------------------------
/page/component/component-pages/slide-tab/slide-tab.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | slide-tab
4 | slide-tab
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{item}}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/page/API/file/file.wxss:
--------------------------------------------------------------------------------
1 | .image {
2 | width: 300rpx;
3 | height: 300rpx;
4 | }
5 | .image-plus {
6 | width: 150rpx;
7 | height: 150rpx;
8 | margin: 10rpx;
9 | border: 1px solid #999;
10 | position: relative;
11 | }
12 | .image-plus-horizontal {
13 | position: absolute;
14 | top: 50%;
15 | left: 50%;
16 | background-color: #d9d9d9;
17 | width: 4rpx;
18 | height: 80rpx;
19 | transform: translate(-50%, -50%);
20 | }
21 | .image-plus-vertical {
22 | position: absolute;
23 | top: 50%;
24 | left: 50%;
25 | background-color: #d9d9d9;
26 | width: 80rpx;
27 | height: 4rpx;
28 | transform: translate(-50%, -50%);
29 | }
30 | .page-body-info {
31 | height: 400rpx;
32 | padding-bottom: 50rpx;
33 | }
34 |
--------------------------------------------------------------------------------
/page/API/animation/animation.wxss:
--------------------------------------------------------------------------------
1 | .page-body-wrapper {
2 | flex-grow: 1;
3 | }
4 | .animation-element-wrapper {
5 | display: block;
6 | margin-bottom: 100rpx;
7 | }
8 | .animation-element {
9 | width: 200rpx;
10 | height: 200rpx;
11 | background-color: #1AAD19;
12 | }
13 | .animation-buttons {
14 | padding: 50rpx 50rpx 10rpx;
15 | border-top: 1px solid #ccc;
16 | display: flex;
17 | flex-grow: 1;
18 | overflow-y: scroll;
19 | flex-direction: row;
20 | flex-wrap: wrap;
21 | width: 100%;
22 | height: 400rpx;
23 | box-sizing: border-box;
24 | }
25 | .animation-button {
26 | width: 290rpx;
27 | margin: 20rpx auto;
28 | }
29 | .animation-button-reset {
30 | width: 610rpx;
31 | margin: 20rpx auto;
32 | }
33 |
--------------------------------------------------------------------------------
/page/API/voice/voice.wxss:
--------------------------------------------------------------------------------
1 | .page-body-wrapper {
2 | justify-content: space-between;
3 | flex-grow: 1;
4 | margin-bottom: 300rpx;
5 | }
6 | .page-body-time {
7 | display: flex;
8 | flex-direction: column;
9 | align-items: center;
10 | }
11 | .time-big {
12 | font-size: 60rpx;
13 | margin: 20rpx;
14 | }
15 | .time-small {
16 | font-size: 30rpx;
17 | }
18 |
19 | .page-body-buttons {
20 | display: flex;
21 | justify-content: space-around;
22 | }
23 | .page-body-button {
24 | width: 250rpx;
25 | text-align: center;
26 | }
27 | .button-stop-record {
28 | width: 110rpx;
29 | height: 110rpx;
30 | border: 20rpx solid #fff;
31 | background-color: #f55c23;
32 | border-radius: 130rpx;
33 | margin: 0 auto;
34 | }
35 |
--------------------------------------------------------------------------------
/page/component/component-pages/action-sheet/action-sheet.js:
--------------------------------------------------------------------------------
1 | var items = ['item1', 'item2', 'item3', 'item4']
2 | var pageObject = {
3 | data: {
4 | actionSheetHidden: true,
5 | actionSheetItems: items
6 | },
7 | actionSheetTap: function(e) {
8 | this.setData({
9 | actionSheetHidden: !this.data.actionSheetHidden
10 | })
11 | },
12 | actionSheetChange: function(e) {
13 | this.setData({
14 | actionSheetHidden: !this.data.actionSheetHidden
15 | })
16 | }
17 | }
18 |
19 | for (var i = 0; i < items.length; ++i) {
20 | (function(itemName) {
21 | pageObject['bind' + itemName] = function(e) {
22 | console.log('click' + itemName, e)
23 | }
24 | })(items[i])
25 | }
26 |
27 | Page(pageObject)
28 |
--------------------------------------------------------------------------------
/page/API/video/video.wxss:
--------------------------------------------------------------------------------
1 | .page-body-wrapper {
2 | flex-grow: 1;
3 | }
4 | .page-body-info {
5 | margin: 0;
6 | margin-top: 40rpx;
7 | padding-top: 40rpx;
8 | flex-grow: 1;
9 | }
10 | .image-plus {
11 | margin-top: 150rpx;
12 | width: 150rpx;
13 | height: 150rpx;
14 | border: 1px solid #999;
15 | position: relative;
16 | }
17 | .image-plus-horizontal {
18 | position: absolute;
19 | top: 50%;
20 | left: 50%;
21 | background-color: #d9d9d9;
22 | width: 4rpx;
23 | height: 80rpx;
24 | transform: translate(-50%, -50%);
25 | }
26 | .image-plus-vertical {
27 | position: absolute;
28 | top: 50%;
29 | left: 50%;
30 | background-color: #d9d9d9;
31 | width: 80rpx;
32 | height: 4rpx;
33 | transform: translate(-50%, -50%);
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/pages/index/calendar/calendar.wxss:
--------------------------------------------------------------------------------
1 | .calendar-area{
2 | height: 112rpx;
3 | font-size: 30rpx;
4 | color: #417CDC;
5 | background-color: #F2F6FF;
6 | }
7 |
8 | .calendar-item1{
9 | flex: 1;
10 | }
11 |
12 | .calendar-num-area{
13 | padding-left: 32rpx;
14 | padding-top: 15rpx;
15 | padding-right: 41rpx;
16 | }
17 |
18 | .calendar-num1{
19 | font-size: 44rpx;
20 | color: #417CDC;
21 | }
22 |
23 | .calendar-num2{
24 | font-size: 24rpx;
25 | color: #417CDC;
26 | }
27 |
28 | .calendar-middle{
29 | flex: auto;
30 | line-height: 112rpx;
31 | }
32 |
33 |
34 | .calendar-right{
35 | width: 46rpx;
36 | line-height: 112rpx;
37 | }
38 |
39 | .calendar-right-icon{
40 | width: 14rpx;
41 | height: 24rpx;
42 | }
--------------------------------------------------------------------------------
/page/API/login/login.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 已登录
11 | 每个微信号中仅需登录 1 次,后续每次进入页面即可根据微信 id 自动拉取用户信息
12 |
13 |
14 | 每个微信号中仅需登录一次
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/page/component/component-pages/action-sheet/action-sheet.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | action-sheet
4 | action-sheet
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{item}}
12 |
13 | 取消
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/page/component/component-pages/form/form.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | pickerHidden: true,
4 | chosen: ''
5 | },
6 | pickerConfirm: function(e) {
7 | this.setData({
8 | pickerHidden: true
9 | })
10 | this.setData({
11 | chosen: e.detail.value
12 | })
13 | },
14 | pickerCancel: function(e) {
15 | this.setData({
16 | pickerHidden: true
17 | })
18 | },
19 | pickerShow: function(e) {
20 | this.setData({
21 | pickerHidden: false
22 | })
23 | },
24 | formSubmit: function(e) {
25 | console.log('form发生了submit事件,携带数据为:', e.detail.value)
26 | },
27 | formReset: function(e) {
28 | console.log('form发生了reset事件,携带数据为:', e.detail.value)
29 | this.setData({
30 | chosen: ''
31 | })
32 | }
33 | })
34 |
--------------------------------------------------------------------------------
/page/API/canvas/canvas.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/pages/index/userinfo/userinfo.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 94.1
7 | 小白信用
8 |
9 |
10 | 高
11 | 保障程度
12 |
13 |
14 | 已签到
15 | 会员中心
16 |
17 |
--------------------------------------------------------------------------------
/page/API/get-user-info/get-user-info.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 | Page({
3 | data: {
4 | hasUserInfo: false
5 | },
6 | getUserInfo: function () {
7 | var that = this
8 |
9 | if (app.globalData.hasLogin === false) {
10 | wx.login({
11 | success: _getUserInfo
12 | })
13 | } else {
14 | _getUserInfo()
15 | }
16 |
17 | function _getUserInfo() {
18 | wx.getUserInfo({
19 | success: function (res) {
20 | that.setData({
21 | hasUserInfo: true,
22 | userInfo: res.userInfo
23 | })
24 | that.update()
25 | }
26 | })
27 | }
28 | },
29 | clear: function () {
30 | this.setData({
31 | hasUserInfo: false,
32 | userInfo: {}
33 | })
34 | }
35 | })
36 |
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function () {
4 | //调用API从本地缓存中获取数据
5 | var logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 | },
9 | getUserInfo:function(cb){
10 | var that = this
11 | if(this.globalData.userInfo){
12 | typeof cb == "function" && cb(this.globalData.userInfo)
13 | }else{
14 | //调用登录接口
15 | wx.login({
16 | success: function () {
17 | wx.getUserInfo({
18 | success: function (res) {
19 | that.globalData.userInfo = res.userInfo
20 | typeof cb == "function" && cb(that.globalData.userInfo)
21 | }
22 | })
23 | }
24 | })
25 | }
26 | },
27 | globalData:{
28 | userInfo:null
29 | }
30 | })
--------------------------------------------------------------------------------
/page/component/component-pages/toast/toast.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | toast
4 | toast提示
5 |
6 |
7 |
8 |
9 |
10 | 默认
11 |
12 |
13 |
14 |
15 |
16 | 设置duration
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/page/component/component-pages/image/image.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | image
4 | 图片
5 |
6 |
7 |
8 | local image
9 |
10 |
11 |
12 |
13 |
14 | internet image
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/page/component/component-pages/modal/modal.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | modal
4 | 模式对话框
5 |
6 |
7 |
8 | 这是对话框的内容。
9 |
10 |
11 |
12 | 没有标题没有取消的对话框
13 | 内容可以插入节点
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/page/component/component-pages/scroll-view/scroll-view.js:
--------------------------------------------------------------------------------
1 | var order = ['green', 'red', 'yellow', 'blue', 'green']
2 | Page({
3 | data: {
4 | toView: 'green'
5 | },
6 | upper: function(e) {
7 | console.log(e)
8 | },
9 | lower: function(e) {
10 | console.log(e)
11 | },
12 | scroll: function(e) {
13 | console.log(e)
14 | },
15 | scrollToTop: function(e) {
16 | this.setAction({
17 | scrollTop: 0
18 | })
19 | },
20 | tap: function(e) {
21 | for (var i = 0; i < order.length; ++i) {
22 | if (order[i] === this.data.toView) {
23 | this.setData({
24 | toView: order[i + 1],
25 | scrollTop: (i + 1) * 200
26 | })
27 | break
28 | }
29 | }
30 | },
31 | tapMove: function(e) {
32 | this.setData({
33 | scrollTop: this.data.scrollTop + 10
34 | })
35 | }
36 | })
37 |
--------------------------------------------------------------------------------
/page/component/component-pages/swiper/swiper.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | background: ['green', 'red', 'yellow'],
4 | indicatorDots: true,
5 | vertical: false,
6 | autoplay: false,
7 | interval: 3000,
8 | duration: 1200
9 | },
10 | changeIndicatorDots: function (e) {
11 | this.setData({
12 | indicatorDots: !this.data.indicatorDots
13 | })
14 | },
15 | changeVertical: function (e) {
16 | this.setData({
17 | vertical: !this.data.vertical
18 | })
19 | },
20 | changeAutoplay: function (e) {
21 | this.setData({
22 | autoplay: !this.data.autoplay
23 | })
24 | },
25 | intervalChange: function (e) {
26 | this.setData({
27 | interval: e.detail.value
28 | })
29 | },
30 | durationChange: function (e) {
31 | this.setData({
32 | duration: e.detail.value
33 | })
34 | }
35 | })
36 |
--------------------------------------------------------------------------------
/page/API/image/image.wxss:
--------------------------------------------------------------------------------
1 | .images-wrapper {
2 | padding: 20rpx;
3 | background-color: #fff;
4 | margin-top: 20rpx;
5 | }
6 | .images-wrapper-text {
7 | font-size: 28rpx;
8 | }
9 | .images-list {
10 | display: flex;
11 | margin-top: 20rpx;
12 | flex-wrap: wrap;
13 | }
14 | .images-image {
15 | width: 150rpx;
16 | height: 150rpx;
17 | margin: 10rpx;
18 | }
19 | .image-plus {
20 | border: 1px solid #999;
21 | position: relative;
22 | }
23 | .image-plus-horizontal {
24 | position: absolute;
25 | top: 50%;
26 | left: 50%;
27 | background-color: #d9d9d9;
28 | width: 4rpx;
29 | height: 80rpx;
30 | transform: translate(-50%, -50%);
31 | }
32 | .image-plus-vertical {
33 | position: absolute;
34 | top: 50%;
35 | left: 50%;
36 | background-color: #d9d9d9;
37 | width: 80rpx;
38 | height: 4rpx;
39 | transform: translate(-50%, -50%);
40 | }
41 |
--------------------------------------------------------------------------------
/page/API/canvas/canvas.js:
--------------------------------------------------------------------------------
1 | var example = require('./example.js')
2 |
3 | Page({
4 | onLoad: function () {
5 | this.context = wx.createContext()
6 |
7 | var methods = Object.keys(example)
8 | this.setData({
9 | methods: methods
10 | })
11 |
12 | var that = this
13 | methods.forEach(function (method) {
14 | that[method] = function () {
15 | example[method](that.context)
16 | var actions = that.context.getActions()
17 |
18 | wx.drawCanvas({
19 | canvasId: 'canvas',
20 | actions: actions
21 | })
22 | }
23 | })
24 | },
25 | toTempFilePath: function () {
26 | wx.toTempFilePath({
27 | canvasId: 'canvas',
28 | success: function (res) {
29 | console.log(res)
30 | },
31 | fail: function (res) {
32 | console.log(res)
33 | }
34 | })
35 | }
36 | })
37 |
--------------------------------------------------------------------------------
/page/API/on-accelerometer-change/on-accelerometer-change.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 倾斜手机即可移动下方小球
10 |
11 |
12 |
13 |
14 |
15 | X: {{x}}
16 | Y: {{y}}
17 | Z: {{z}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/page/component/component-pages/icon/icon.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | icon
4 | icon图标
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/pages/index/baitiao/baitiao.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 我的资产
5 | 115,599.00
6 |
7 |
8 |
9 | 去提额
10 |
11 |
12 |
13 |
14 | 近7日待还
15 | 638.03
16 |
17 |
18 | 金条借款
19 | 额度 20,000.00
20 |
21 |
22 |
--------------------------------------------------------------------------------
/page/API/set-navigation-bar-title/set-navigation-bar-title.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/page/component/component-pages/input/input.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | focus: false,
4 | inputValue: ''
5 | },
6 | bindButtonTap: function() {
7 | this.setData({
8 | focus: true
9 | })
10 | },
11 | bindKeyInput: function(e) {
12 | this.setData({
13 | inputValue: e.detail.value
14 | })
15 | },
16 | bindReplaceInput: function(e) {
17 | var value = e.detail.value
18 | var pos = e.detail.cursor
19 | if(pos != -1){
20 | // 光标在中间
21 | var left = e.detail.value.slice(0,pos)
22 | // 计算光标的位置
23 | pos = left.replace(/11/g,'2').length
24 | }
25 |
26 | // 直接返回对象,可以对输入进行过滤处理,同时可以控制光标的位置
27 | return {
28 | value: value.replace(/11/g,'2'),
29 | cursor: pos
30 | }
31 |
32 | // 或者直接返回字符串,光标在最后边
33 | // return value.replace(/11/g,'2'),
34 | },
35 | bindHideKeyboard: function(e) {
36 | if (e.detail.value === "123") {
37 | //收起键盘
38 | wx.hideKeyboard()
39 | }
40 | }
41 | })
42 |
--------------------------------------------------------------------------------
/page/component/component-pages/slider/slider.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | slider
4 | 滑块
5 |
6 |
7 |
8 | 设置step
9 |
10 |
11 |
12 |
13 |
14 |
15 | 显示当前value
16 |
17 |
18 |
19 |
20 |
21 |
22 | 设置最小/最大值
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/page/component/component-pages/button/button.js:
--------------------------------------------------------------------------------
1 | var types = ['default', 'primary', 'warn']
2 | var pageObject = {
3 | data: {
4 | defaultSize: 'default',
5 | primarySize: 'default',
6 | warnSize: 'default',
7 | disabled: false,
8 | plain: false,
9 | loading: false
10 | },
11 | setDisabled: function(e) {
12 | this.setData({
13 | disabled: !this.data.disabled
14 | })
15 | },
16 | setPlain: function(e) {
17 | this.setData({
18 | plain: !this.data.plain
19 | })
20 | },
21 | setLoading: function(e) {
22 | this.setData({
23 | loading: !this.data.loading
24 | })
25 | }
26 | }
27 |
28 | for (var i = 0; i < types.length; ++i) {
29 | (function(type) {
30 | pageObject[type] = function(e) {
31 | var key = type + 'Size'
32 | var changedData = {}
33 | changedData[key] =
34 | this.data[key] === 'default' ? 'mini' : 'default'
35 | this.setData(changedData)
36 | }
37 | })(types[i])
38 | }
39 |
40 | Page(pageObject)
41 |
--------------------------------------------------------------------------------
/page/component/component-pages/view/view.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | view
4 | 弹性框模型分为弹性容器以及弹性项目。当组件的display为flex或inline-flex时,该组件则为弹性容器,弹性容器的子组件为弹性项目。
5 |
6 |
7 |
8 | flex-direction: row
9 |
10 | 1
11 | 2
12 | 3
13 |
14 |
15 |
16 | flex-direction: column
17 |
18 | 1
19 | 2
20 | 3
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/pages/baitiao/limitarea/limitarea.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 白条可用额度
5 | {{limit}}
6 |
7 | 可提额
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 金条可用额度
16 | 29,102.00
17 |
18 |
19 | 近7日代还
20 | 29,102.00
21 |
22 |
23 |
--------------------------------------------------------------------------------
/page/API/get-network-type/get-network-type.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 网络状态
11 |
12 | 未获取
13 | 点击绿色按钮可获取网络状态
14 |
15 |
16 | {{networkType}}
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/page/API/get-user-info/get-user-info.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 用户信息
11 |
12 | 未获取
13 | 点击绿色按钮可获取用户头像及昵称
14 |
15 |
16 |
17 | {{userInfo.nickName}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/page/API/get-location/get-location.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 当前位置经纬度
11 |
12 | 未获取
13 |
14 |
15 |
16 | E{{location.longitude[0]}}°{{location.longitude[1]}}′
17 | N{{location.latitude[0]}}°{{location.latitude[1]}}′
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/page/component/component-pages/picker/picker.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | picker
4 | 选择器
5 |
6 |
7 |
8 | 地区选择器
9 |
10 |
11 | 当前选择:{{array[index]}}
12 |
13 |
14 |
15 |
16 | 时间选择器
17 |
18 |
19 | 当前选择: {{time}}
20 |
21 |
22 |
23 |
24 |
25 | 日期选择器
26 |
27 |
28 | 当前选择: {{date}}
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/pages/index/baitiao/baitiao.wxss:
--------------------------------------------------------------------------------
1 | .baitiao-area{
2 | margin-top: 20rpx;
3 | }
4 |
5 | .baitiao-top{
6 | height: 216rpx;
7 | }
8 |
9 | .baitiao-top-area{
10 | flex:1;
11 | padding-top: 48rpx;
12 | padding-left: 32rpx;
13 | }
14 |
15 | .baitiao-top-right{
16 | margin-right: 32rpx;
17 | line-height: 216rpx;
18 | }
19 |
20 | .baitiao-desp1{
21 | font-family: PingFangSC-Regular;
22 | font-size: 28rpx;
23 | line-height: 40rpx;
24 | color: #999999;
25 | letter-spacing: 0rpx;
26 | }
27 |
28 | .baitiao-desp2{
29 | font-family: SanFranciscoDisplay-Semibold;
30 | font-size: 66rpx;
31 | color: #424954;
32 | line-height: 80rpx;
33 | }
34 |
35 | .baitiao-grid{
36 | border-top: 1rpx solid #eee;
37 | height: 162rpx;
38 | }
39 |
40 | .baitiao-grid-item{
41 | flex: 1;
42 | padding-top: 38rpx;
43 | padding-left: 32rpx;
44 | }
45 |
46 | .baitiao-desp3{
47 | font-family: PingFangSC-Regular;
48 | font-size: 32rpx;
49 | color: #333333;
50 | letter-spacing: 0rpx;
51 | line-height: 46rpx;
52 | }
53 |
54 |
55 | .baitiao-desp4{
56 | font-family: PingFangSC-Light;
57 | font-size: 28rpx;
58 | color: #999999;
59 | line-height: 40rpx;
60 | }
--------------------------------------------------------------------------------
/page/API/storage/storage.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | {{dialog.content}}
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/pages/baitiao/limitarea/limitarea.wxss:
--------------------------------------------------------------------------------
1 |
2 | .limitarea-area{
3 | padding-top: 36rpx;
4 | /*background-color: red;*/
5 | }
6 |
7 | .limitarea-desp1{
8 | font-family: PingFangSC-Regular;
9 | font-size: 26rpx;
10 | line-height: 37rpx;
11 | color: #888888;
12 | }
13 |
14 |
15 | .limitarea-desp2{
16 | font-family: SanFranciscoDisplay-Semibold;
17 | font-size: 72rpx;
18 | line-height: 86rpx;
19 | color: #333333;
20 | font-weight: bold;
21 | }
22 |
23 | .limitarea-desp3{
24 | font-family: PingFangSC-Regular;
25 | font-size: 20rpx;
26 | color: #FFFFFF;
27 | padding: 6rpx 12rpx;
28 | background-color: #B99562;
29 | border-radius: 30rpx;
30 | }
31 |
32 | .limitarea-grid{
33 | height: 190rpx;
34 | }
35 |
36 | .limitarea-grid-item{
37 | padding-top: 46rpx;
38 | flex:1;
39 | height: 100%;
40 | }
41 |
42 | .limitarea-grid-desp1{
43 | font-family: PingFangSC-Regular;
44 | font-size: 26rpx;
45 | line-height: 37rpx;
46 | color: #888888;
47 | }
48 |
49 | .limitarea-grid-desp2{
50 | margin-top: 8rpx;
51 | font-family: SanFranciscoDisplay-Semibold;
52 | font-size: 44rpx;
53 | line-height: 53rpx;
54 | color: #333333;
55 | font-weight: bold;
56 | }
57 |
--------------------------------------------------------------------------------
/page/API/animation/animation.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/page/component/component-pages/swiper/swiper.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | swiper
4 | swiper
5 |
6 |
7 |
8 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | duration
24 |
25 | interval
26 |
27 |
28 |
--------------------------------------------------------------------------------
/page/API/video/video.js:
--------------------------------------------------------------------------------
1 | var sourceType = [ ['camera'], ['album'], ['camera', 'album'] ]
2 | var camera = [ ['front'], ['back'], ['front', 'back'] ]
3 | var duration = Array.apply(null, {length: 60}).map(function (n, i) {
4 | return i + 1
5 | })
6 |
7 | Page({
8 | data: {
9 | sourceTypeIndex: 2,
10 | sourceType: ['拍摄', '相册', '拍摄或相册'],
11 |
12 | cameraIndex: 2,
13 | camera: ['前置', '后置', '前置或后置'],
14 |
15 | durationIndex: 59,
16 | duration: duration.map(function (t) { return t + '秒'}),
17 |
18 | src: ''
19 | },
20 | sourceTypeChange: function (e) {
21 | this.setData({
22 | sourceTypeIndex: e.detail.value
23 | })
24 | },
25 | cameraChange: function (e) {
26 | this.setData({
27 | cameraIndex: e.detail.value
28 | })
29 | },
30 | durationChange: function (e) {
31 | this.setData({
32 | durationIndex: e.detail.value
33 | })
34 | },
35 | chooseVideo: function () {
36 | var that = this
37 | wx.chooseVideo({
38 | sourceType: sourceType[this.data.sourceTypeIndex],
39 | camera: camera[this.data.cameraIndex],
40 | duration: duration[this.durationIndex],
41 | success: function (res) {
42 | console.log(res)
43 | that.setData({
44 | src: res.tempFilePath
45 | })
46 | }
47 | })
48 | }
49 | })
50 |
--------------------------------------------------------------------------------
/pages/index/newsarea/newsarea.wxss:
--------------------------------------------------------------------------------
1 | .news-area{
2 | margin-top: 20rpx;
3 | padding-bottom: 60rpx;
4 | }
5 |
6 | .news-item{
7 | height: 278rpx;
8 | padding-left: 32rpx;
9 | box-sizing: border-box;
10 | }
11 |
12 | .news-item-content{
13 | padding-top: 40rpx;
14 | height: 100%;
15 | border-bottom:1rpx solid #eee;
16 | box-sizing: border-box;
17 | }
18 |
19 | .news-item-1{
20 | flex:1;
21 | }
22 |
23 | .news-item-title{
24 | font-family: PingFangSC-Medium;
25 | font-size: 32rpx;
26 | color: #333333;
27 | letter-spacing: 0rpx;
28 | line-height: 45rpx;
29 | }
30 |
31 | .news-item-desp{
32 | margin-top: 12rpx;
33 | margin-bottom: 20rpx;
34 | font-family: PingFangSC-Light;
35 | font-size: 28rpx;
36 | color: #999999;
37 | line-height: 40rpx;
38 | }
39 |
40 | .news-item-flag-area{
41 | padding: 0;
42 | margin: 0;
43 | display: inline-block;
44 | line-height: 0;
45 | }
46 |
47 | .news-item-flag{
48 | display: inline-block;
49 | padding: 4rpx 18rpx;
50 | background-color: #508CEE;
51 | font-family: PingFangSC-Regular;
52 | font-size: 22rpx;
53 | color: #FFFFFF;
54 | line-height: 28rpx;
55 | }
56 |
57 | .news-item-image{
58 | margin-left: 18rpx;
59 | margin-right: 32rpx;
60 | width: 140rpx;
61 | height: 140rpx;
62 | }
--------------------------------------------------------------------------------
/page/component/component-pages/canvas/canvas.js:
--------------------------------------------------------------------------------
1 | Page({
2 | onReady: function () {
3 | this.position = {
4 | x: 150,
5 | y: 150,
6 | vx: 2,
7 | vy: 2
8 | }
9 |
10 | this.drawBall()
11 | this.interval = setInterval(this.drawBall, 17)
12 | },
13 | drawBall: function () {
14 | var p = this.position
15 | p.x += p.vx
16 | p.y += p.vy
17 | if (p.x >= 300) {
18 | p.vx = -2
19 | }
20 | if (p.x <= 7) {
21 | p.vx = 2
22 | }
23 | if (p.y >= 300) {
24 | p.vy = -2
25 | }
26 | if (p.y <= 7) {
27 | p.vy = 2
28 | }
29 |
30 | var context = wx.createContext()
31 |
32 | ball(p.x, 150)
33 | ball(150, p.y)
34 | ball(300 - p.x, 150)
35 | ball(150, 300 - p.y)
36 | ball(p.x, p.y)
37 | ball(300 - p.x, 300 - p.y)
38 | ball(p.x, 300 - p.y)
39 | ball(300 - p.x, p.y)
40 |
41 |
42 | wx.drawCanvas({
43 | canvasId: 'canvas',
44 | actions: context.getActions()
45 | })
46 |
47 | function ball(x, y) {
48 | context.beginPath(0)
49 | context.arc(x, y, 5, 0, Math.PI * 2)
50 | context.setFillStyle('#1aad19')
51 | context.setStrokeStyle('rgba(1,1,1,0)')
52 | context.fill()
53 | context.stroke()
54 | }
55 | },
56 | onUnload: function () {
57 | clearInterval(this.interval)
58 | }
59 | })
60 |
--------------------------------------------------------------------------------
/page/component/component-pages/scroll-view/scroll-view.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | scroll-view
4 | 可滚动视图区域
5 |
6 |
7 |
8 | vertical scroll
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | horizontal scroll
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/page/component/component-pages/button/button.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | button
4 | 按钮
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/page/API/background-audio/background-audio.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{formatedPlayTime}}
10 |
11 |
12 | 00:00
13 | 04:29
14 |
15 |
16 | 离开小程序后音乐也可保持播放
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/page/API/file/file.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 请选择图片
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | {{dialog.content}}
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/page/API/image/image.js:
--------------------------------------------------------------------------------
1 | var sourceType = [ ['camera'], ['album'], ['camera', 'album'] ]
2 | var sizeType = [ ['compressed'], ['original'], ['compressed', 'original'] ]
3 |
4 | Page({
5 | data: {
6 | sourceTypeIndex: 2,
7 | sourceType: ['拍照', '相册', '拍照或相册'],
8 |
9 | sizeTypeIndex: 2,
10 | sizeType: ['压缩', '原图', '压缩或原图'],
11 |
12 | countIndex: 8,
13 | count: [1, 2, 3, 4, 5, 6, 7, 8, 9]
14 | },
15 | sourceTypeChange: function (e) {
16 | this.setData({
17 | sourceTypeIndex: e.detail.value
18 | })
19 | },
20 | sizeTypeChange: function (e) {
21 | this.setData({
22 | sizeTypeIndex: e.detail.value
23 | })
24 | },
25 | countChange: function (e) {
26 | this.setData({
27 | countIndex: e.detail.value
28 | })
29 | },
30 | chooseImage: function () {
31 | var that = this
32 | wx.chooseImage({
33 | sourceType: sourceType[this.data.sourceTypeIndex],
34 | sizeType: sizeType[this.data.sizeTypeIndex],
35 | count: this.data.count[this.data.countIndex],
36 | success: function (res) {
37 | console.log(res)
38 | that.setData({
39 | imageList: res.tempFilePaths
40 | })
41 | }
42 | })
43 | },
44 | previewImage: function (e) {
45 | var current = e.target.dataset.src
46 |
47 | wx.previewImage({
48 | current: current,
49 | urls: this.data.imageList
50 | })
51 | }
52 | })
53 |
--------------------------------------------------------------------------------
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | /*用户信息*/
3 | @import "userinfo/userinfo.wxss";
4 | /*日历*/
5 | @import "calendar/calendar.wxss";
6 | /*用户资产*/
7 | @import "userassets/userassets.wxss";
8 | /*白条*/
9 | @import "baitiao/baitiao.wxss";
10 | /*推荐*/
11 | @import "investment/investment.wxss";
12 | /*你的全部服务*/
13 | @import "servicearea/servicearea.wxss";
14 | /*新闻*/
15 | @import "newsarea/newsarea.wxss";
16 |
17 | .main-content{
18 | background-color: #efeff4;
19 | }
20 |
21 | .bg-fff{
22 | background-color: #fff;
23 | }
24 | /*
25 | .userinfo {
26 | display: flex;
27 | flex-direction: column;
28 | align-items: center;
29 | }
30 |
31 | .userinfo-avatar {
32 | width: 128rpx;
33 | height: 128rpx;
34 | margin: 20rpx;
35 | border-radius: 50%;
36 | }
37 |
38 | .userinfo-nickname {
39 | color: #aaa;
40 | }*/
41 |
42 | .usermotto {
43 | margin-top: 200px;
44 | }
45 |
46 | .item-bar-top{
47 | padding-left: 32rpx;
48 | padding-top: 37rpx;
49 | height: 120rpx;
50 | font-family: PingFangSC-Medium;
51 | font-size: 32rpx;
52 | color: #333333;
53 | align-content: center;
54 | box-sizing: border-box;
55 | }
56 |
57 | .item-bar-icon{
58 | width: 30rpx;
59 | height: 30rpx;
60 | padding-top: 8rpx;
61 | margin-right: 18rpx;
62 | }
63 |
64 | .item-bar-desp{
65 | font-family: PingFangSC-Medium;
66 | font-size: 32rpx;
67 | color: #333333;
68 | line-height: 46rpx;
69 | }
--------------------------------------------------------------------------------
/pages/zhongchou/zhongchou.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 小程序组件
4 | 这里就当前已支持的组件进行演示
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{item.name}}
13 |
14 |
15 |
16 |
17 |
18 | {{page}}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/page/component/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 小程序组件
4 | 这里就当前已支持的组件进行演示
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{item.name}}
13 |
14 |
15 |
16 |
17 |
18 | {{page}}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/pages/index/userassets/userassets.wxss:
--------------------------------------------------------------------------------
1 | .userassets-area{
2 | margin-top: 20rpx;
3 |
4 | }
5 |
6 | .userassets-top{
7 | height: 256rpx;
8 | }
9 |
10 | .userassets-num-area{
11 | flex:1;
12 | padding-left: 32rpx;
13 | }
14 |
15 | .userassets-desp1{
16 | font-family: PingFangSC-Regular;
17 | font-size: 28rpx;
18 | color: #999999;
19 | letter-spacing: 0px;
20 | line-height: 48px;
21 | }
22 |
23 | .userassets-desp2{
24 | font-family: SanFranciscoDisplay-Semibold;
25 | font-size: 66rpx;
26 | color: #424954;
27 | line-height: 80rpx;
28 | }
29 |
30 | .userassets-desp3{
31 | font-family: PingFangSC-Regular;
32 | font-size: 28rpx;
33 | color: #FF801A;
34 | letter-spacing: 0rpx;
35 | line-height: 62rpx;
36 | }
37 |
38 | .userassets-right{
39 | width: 46rpx;
40 | margin-right: 32rpx;
41 | line-height: 256rpx;
42 | }
43 |
44 | .userassets-right-icon{
45 | width: 46rpx;
46 | height: 31rpx;
47 | }
48 |
49 | .userassets-grid{
50 | height: 162rpx;
51 | border-top: 1rpx solid #eee;
52 | }
53 |
54 | .userassets-grid-item{
55 | flex:1;
56 | padding-top: 38rpx;
57 | padding-left: 32rpx;
58 | }
59 |
60 | .border-right-1rpx{
61 | border-right: 1rpx solid #eee;
62 | }
63 |
64 | .userassets-desp5{
65 | font-family: PingFangSC-Regular;
66 | font-size: 32rpx;
67 | line-height: 46rpx;
68 | color: #333333;
69 | letter-spacing: 0rpx;
70 | }
71 |
72 | .userassets-desp6{
73 | font-family: PingFangSC-Light;
74 | font-size: 28rpx;
75 | line-height: 40rpx;
76 | color: #999999;
77 | }
--------------------------------------------------------------------------------
/page/component/component-pages/form/form.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | form
4 | 表单
5 |
6 |
39 |
40 |
--------------------------------------------------------------------------------
/page/component/index.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | list: [
4 | {
5 | id: 'view',
6 | name: '视图容器',
7 | open: false,
8 | pages: ['view', 'scroll-view', 'swiper']
9 | }, {
10 | id: 'content',
11 | name: '基础内容',
12 | open: false,
13 | pages: ['text', 'icon', 'progress']
14 | }, {
15 | id: 'form',
16 | name: '表单组件',
17 | open: false,
18 | pages: ['button', 'checkbox', 'form', 'input', 'label', 'picker', 'radio', 'slider', 'switch']
19 | }, {
20 | id: 'feedback',
21 | name: '操作反馈',
22 | open: false,
23 | pages: ['action-sheet', 'modal', 'toast', 'loading']
24 | }, {
25 | id: 'nav',
26 | name: '导航',
27 | open: false,
28 | pages: ['navigator']
29 | }, {
30 | id: 'media',
31 | name: '媒体组件',
32 | open: false,
33 | pages: ['image', 'audio', 'video']
34 | }, {
35 | id: 'map',
36 | name: '地图',
37 | pages: ['map']
38 | }, {
39 | id: 'canvas',
40 | name: '画布',
41 | pages: ['canvas']
42 | }
43 | ]
44 | },
45 | widgetsToggle: function (e) {
46 | var id = e.currentTarget.id, list = this.data.list;
47 | for (var i = 0, len = list.length; i < len; ++i) {
48 | if (list[i].id == id) {
49 | list[i].open = !list[i].open;
50 | } else {
51 | list[i].open = false;
52 | }
53 | }
54 | this.setData({
55 | list: list
56 | });
57 | }
58 | });
59 |
--------------------------------------------------------------------------------
/page/API/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
33 |
34 |
--------------------------------------------------------------------------------
/pages/zhongchou/zhongchou.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | list: [
4 | {
5 | id: 'view',
6 | name: '视图容器',
7 | open: false,
8 | pages: ['view', 'scroll-view', 'swiper']
9 | }, {
10 | id: 'content',
11 | name: '基础内容',
12 | open: false,
13 | pages: ['text', 'icon', 'progress']
14 | }, {
15 | id: 'form',
16 | name: '表单组件',
17 | open: false,
18 | pages: ['button', 'checkbox', 'form', 'input', 'label', 'picker', 'radio', 'slider', 'switch']
19 | }, {
20 | id: 'feedback',
21 | name: '操作反馈',
22 | open: false,
23 | pages: ['action-sheet', 'modal', 'toast', 'loading']
24 | }, {
25 | id: 'nav',
26 | name: '导航',
27 | open: false,
28 | pages: ['navigator']
29 | }, {
30 | id: 'media',
31 | name: '媒体组件',
32 | open: false,
33 | pages: ['image', 'audio', 'video']
34 | }, {
35 | id: 'map',
36 | name: '地图',
37 | pages: ['map']
38 | }, {
39 | id: 'canvas',
40 | name: '画布',
41 | pages: ['canvas']
42 | }
43 | ]
44 | },
45 | widgetsToggle: function (e) {
46 | var id = e.currentTarget.id, list = this.data.list;
47 | for (var i = 0, len = list.length; i < len; ++i) {
48 | if (list[i].id == id) {
49 | list[i].open = !list[i].open;
50 | } else {
51 | list[i].open = false;
52 | }
53 | }
54 | this.setData({
55 | list: list
56 | });
57 | }
58 | });
59 |
--------------------------------------------------------------------------------
/pages/index/userassets/userassets.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 我的资产
5 | 115,599.00
6 | 今日收益 +385.00
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 定期
16 | 102,000.00
17 |
18 |
19 | 基金
20 | 5,599.00
21 |
22 |
23 |
24 |
25 | 京东小金库
26 | 立即开通
27 |
28 |
29 | 小白理财
30 | 1,571.00
31 |
32 |
33 |
--------------------------------------------------------------------------------
/page/component/component-pages/label/label.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | checkboxItems: [
4 | {name: 'USA', value: '美国'},
5 | {name: 'CHN', value: '中国', checked: 'true'},
6 | {name: 'BRA', value: '巴西'},
7 | {name: 'JPN', value: '日本', checked: 'true'},
8 | {name: 'ENG', value: '英国'},
9 | {name: 'FRA', value: '法国'},
10 | ],
11 | radioItems: [
12 | {name: 'USA', value: '美国'},
13 | {name: 'CHN', value: '中国', checked: 'true'},
14 | {name: 'BRA', value: '巴西'},
15 | {name: 'JPN', value: '日本'},
16 | {name: 'ENG', value: '英国'},
17 | {name: 'FRA', value: '法国'},
18 | ],
19 | hidden: false
20 | },
21 | checkboxChange: function(e) {
22 | var checked = e.detail.value
23 | var changed = {}
24 | for (var i = 0; i < this.data.checkboxItems.length; i ++) {
25 | if (checked.indexOf(this.data.checkboxItems[i].name) !== -1) {
26 | changed['checkboxItems['+i+'].checked'] = true
27 | } else {
28 | changed['checkboxItems['+i+'].checked'] = false
29 | }
30 | }
31 | this.setData(changed)
32 | },
33 | radioChange: function(e) {
34 | var checked = e.detail.value
35 | var changed = {}
36 | for (var i = 0; i < this.data.radioItems.length; i ++) {
37 | if (checked.indexOf(this.data.radioItems[i].name) !== -1) {
38 | changed['radioItems['+i+'].checked'] = true
39 | } else {
40 | changed['radioItems['+i+'].checked'] = false
41 | }
42 | }
43 | this.setData(changed)
44 | },
45 | tapEvent: function(e) {
46 | console.log('按钮被点击')
47 | }
48 | })
49 |
--------------------------------------------------------------------------------
/pages/index/investment/investment.wxss:
--------------------------------------------------------------------------------
1 |
2 |
3 | .investment-area{
4 | margin-top: 20rpx;
5 | }
6 |
7 | .investment-top{
8 | padding-left: 32rpx;
9 | padding-top: 37rpx;
10 | height: 120rpx;
11 | font-family: PingFangSC-Medium;
12 | font-size: 32rpx;
13 | color: #333333;
14 | align-content: center;
15 | box-sizing: border-box;
16 | }
17 |
18 | .investment-top-icon{
19 | width: 30rpx;
20 | height: 30rpx;
21 | padding-top: 8rpx;
22 | margin-right: 18rpx;
23 | }
24 |
25 | .investment-desp1{
26 | font-family: PingFangSC-Medium;
27 | font-size: 32rpx;
28 | color: #333333;
29 | line-height: 46rpx;
30 | }
31 |
32 |
33 | .investment-grid{
34 | height: 159rpx;
35 | border-bottom: 1rpx solid #eee;
36 | }
37 |
38 | .investment-item{
39 | padding-top: 32rpx;
40 | padding-left: 32rpx;
41 | box-sizing: border-box;
42 | }
43 |
44 | .investment-item1{
45 | width: 300rpx;
46 | }
47 |
48 | .investment-item2{
49 | flex:1;
50 | }
51 |
52 | .investment-desp2{
53 | font-family: SanFranciscoDisplay-Medium;
54 | font-size: 48rpx;
55 | color: #FF801A;
56 | }
57 |
58 | .investment-desp3{
59 | margin-top: 4rpx;
60 | font-family: PingFangSC-Regular;
61 | font-size: 24rpx;
62 | line-height: 33rpx;
63 | color: #999999;
64 | }
65 |
66 | .investment-desp4,.investment-desp5{
67 | margin-top: 6rpx;
68 | margin-bottom: 10rpx;
69 | font-family: PingFangSC-Regular;
70 | font-size: 32rpx;
71 | color: #666666;
72 | }
73 |
74 | .investment-desp5{
75 | color: #FF801A;
76 | }
--------------------------------------------------------------------------------
/page/API/file/file.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | tempFilePath: '',
4 | savedFilePath: wx.getStorageSync('savedFilePath') || '',
5 | dialog: {
6 | hidden: true
7 | }
8 | },
9 | chooseImage: function () {
10 | var that = this
11 | wx.chooseImage({
12 | count: 1,
13 | success: function (res) {
14 | that.setData({
15 | tempFilePath: res.tempFilePaths[0]
16 | })
17 | }
18 | })
19 | },
20 | saveFile: function () {
21 | if (this.data.tempFilePath.length > 0) {
22 | var that = this
23 | wx.saveFile({
24 | tempFilePath: this.data.tempFilePath,
25 | success: function (res) {
26 | that.setData({
27 | savedFilePath: res.savedFilePath
28 | })
29 | wx.setStorageSync('savedFilePath', res.savedFilePath)
30 | that.setData({
31 | dialog: {
32 | title: '保存成功',
33 | content: '下次进入应用时,此文件仍可用',
34 | hidden: false
35 | }
36 | })
37 | },
38 | fail: function (res) {
39 | that.setData({
40 | dialog: {
41 | title: '保存失败',
42 | content: '应该是有 bug 吧',
43 | hidden: false
44 | }
45 | })
46 | }
47 | })
48 | }
49 | },
50 | clear: function () {
51 | wx.setStorageSync('savedFilePath', '')
52 | this.setData({
53 | tempFilePath: '',
54 | savedFilePath: ''
55 | })
56 | },
57 | confirm: function () {
58 | this.setData({
59 | 'dialog.hidden': true
60 | })
61 | }
62 | })
63 |
--------------------------------------------------------------------------------
/page/component/component-pages/label/label.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | label
4 | 标签
5 |
6 |
7 |
8 | 表单组件在label内
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 | label用for标识表单组件
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | label内有多个时选中第一个
31 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/pages/index/newsarea/newsarea.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 你感兴趣的内容
5 |
6 |
7 |
8 |
9 | 躺着夺冠的C罗,爱名模,爱名车,更爱理财
10 | 今天凌晨,事隔12年,C罗终于带着
11 |
12 | 理财教育
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | 躺着夺冠的C罗,爱名模,爱名车,更爱理财
23 | 今天凌晨,事隔12年,C罗终于带着
24 |
25 | 理财教育
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/page/component/component-pages/input/input.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | input
4 | 输入框
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | 你输入的是:{{inputValue}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/page/API/open-location/open-location.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/page/API/index/index.wxss:
--------------------------------------------------------------------------------
1 | .header {
2 | padding: 80rpx;
3 | line-height: 1;
4 | }
5 | .title {
6 | font-size: 52rpx;
7 | }
8 | .desc {
9 | margin-top: 10rpx;
10 | color: #888888;
11 | font-size: 28rpx;
12 | }
13 | .menu-list {
14 | display: flex;
15 | flex-direction: column;
16 | background-color: #fbf9fe;
17 | margin-top: 10rpx;
18 | }
19 | .menu-item {
20 | color: #000000;
21 | display: flex;
22 | background-color: #fff;
23 | margin: 10rpx 30rpx;
24 | flex-direction: column;
25 | }
26 | .menu-item-main {
27 | display: flex;
28 | padding: 40rpx;
29 | border-radius: 10rpx;
30 | align-items: center;
31 | font-size: 32rpx;
32 | justify-content: space-between;
33 | }
34 | .menu-item-arrow {
35 | width: 32rpx;
36 | height: 32rpx;
37 | transition: 400ms;
38 | }
39 | .menu-item-arrow.open {
40 | transform: rotate(-90deg);
41 | }
42 | .menu-item-arrow.close {
43 | transform: rotate(90deg);
44 | }
45 | .menu-item-arrow.url {
46 | transform: rotate(0deg);
47 | }
48 |
49 | .menu-item-api-list {
50 | transition: 200ms;
51 | height: auto;
52 | border-top: 1px solid #d8d8d8;
53 | }
54 | .menu-item-api-list.close {
55 | display: none;
56 | height: 0;
57 | }
58 | .menu-item-api-item {
59 | display: flex;
60 | justify-content: space-between;
61 | height: 80rpx;
62 | padding: 20rpx 20rpx 20rpx 0;
63 | margin-left: 40rpx;
64 | align-items: center;
65 | border-top: 1px solid #f0f0f0;
66 | }
67 | .menu-item-api-item-text {
68 | display: flex;
69 | flex-direction: column;
70 | justify-content: space-between;
71 | height: 100%;
72 | }
73 | .menu-item-api-item-text-zhname {
74 | font-size: 30rpx;
75 | }
76 | .menu-item-api-item-text-enname {
77 | font-size: 26rpx;
78 | color: #6b6b6b;
79 | }
80 | .menu-item-api-item-arrow {
81 | width: 32rpx;
82 | height: 32rpx;
83 | }
84 |
--------------------------------------------------------------------------------
/pages/index/investment/investment.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 推荐给你的投资产品
5 |
6 |
7 |
8 | 4.70%
9 | 历史年化结算利率
10 |
11 |
12 | 建议增加短期持仓
13 | 由于您的持仓期限较长
14 |
15 |
16 |
17 |
18 | 保本基金
19 | 抗跌神器 赚钱法宝
20 |
21 |
22 | 建议持有债券基金
23 | 由于您偏好稳定理财产品
24 |
25 |
26 |
27 |
28 | 3.95%
29 | 月涨跌幅
30 |
31 |
32 | 建议提高资产灵活性
33 | 由于您的持仓期限稳定
34 |
35 |
36 |
--------------------------------------------------------------------------------
/page/component/index.wxss:
--------------------------------------------------------------------------------
1 | .index{
2 | background-color: #FBF9FE;
3 | font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
4 | flex: 1;
5 | min-height: 100%;
6 | font-size: 32rpx;
7 | }
8 | .head{
9 | padding: 80rpx;
10 | line-height: 1;
11 | }
12 | .body{
13 | padding-left: 30rpx;
14 | padding-right: 30rpx;
15 | overflow: hidden;
16 | }
17 | .title{
18 | font-size: 52rpx;
19 | }
20 | .desc{
21 | margin-top: 10rpx;
22 | color: #888888;
23 | font-size: 28rpx;
24 | }
25 |
26 | .widgets__item{
27 | margin-top: 20rpx;
28 | margin-bottom: 20rpx;
29 | background-color: #FFFFFF;
30 | overflow: hidden;
31 | border-radius: 4rpx;
32 | cursor: pointer;
33 | }
34 | .widgets__info{
35 | display: flex;
36 | padding: 40rpx;
37 | align-items: center;
38 | flex-direction: row;
39 | }
40 | .widgets__info_show{
41 | }
42 | .widgets__info_show .widgets__info-img{
43 | transform: rotate(-90deg);
44 | }
45 | .widgets__info-name{
46 | flex: 1;
47 | }
48 | .widgets__info-img{
49 | width: 32rpx;
50 | height: 32rpx;
51 | transition: transform .4s;
52 | transform: rotate(90deg);
53 | }
54 |
55 | .widgets__list{
56 | display: none;
57 | }
58 | .widgets__list_show{
59 | display: block;
60 | }
61 | .widget{
62 | position: relative;
63 | padding-top: 26rpx;
64 | padding-bottom: 26rpx;
65 | padding-left: 40rpx;
66 | padding-right: 40rpx;
67 | }
68 | .widget__arrow{
69 | position: absolute;
70 | top: 28rpx;
71 | right: 44rpx;
72 | width: 32rpx;
73 | height: 32rpx;
74 | }
75 | .widget__line{
76 | content: " ";
77 | position: absolute;
78 | left: 40rpx;
79 | top: 0;
80 | right: 0;
81 | height: 2rpx;
82 | background-color: #F0F0F0;
83 | }
84 | .widget__line_first{
85 | left: 0;
86 | right: 0;
87 | background-color: #D8D8D8;
88 | }
89 |
--------------------------------------------------------------------------------
/page/API/video/video.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 视频来源
13 | {{sourceType[sourceTypeIndex]}}
14 |
15 |
16 |
17 |
18 | 摄像头
19 | {{camera[cameraIndex]}}
20 |
21 |
22 |
23 |
24 | 拍摄长度
25 | {{duration[durationIndex]}}
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/pages/zhongchou/zhongchou.wxss:
--------------------------------------------------------------------------------
1 | .index{
2 | background-color: #FBF9FE;
3 | font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
4 | flex: 1;
5 | min-height: 100%;
6 | font-size: 32rpx;
7 | }
8 | .head{
9 | padding: 80rpx;
10 | line-height: 1;
11 | }
12 | .body{
13 | padding-left: 30rpx;
14 | padding-right: 30rpx;
15 | overflow: hidden;
16 | }
17 | .title{
18 | font-size: 52rpx;
19 | }
20 | .desc{
21 | margin-top: 10rpx;
22 | color: #888888;
23 | font-size: 28rpx;
24 | }
25 |
26 | .widgets__item{
27 | margin-top: 20rpx;
28 | margin-bottom: 20rpx;
29 | background-color: #FFFFFF;
30 | overflow: hidden;
31 | border-radius: 4rpx;
32 | cursor: pointer;
33 | }
34 | .widgets__info{
35 | display: flex;
36 | padding: 40rpx;
37 | align-items: center;
38 | flex-direction: row;
39 | }
40 | .widgets__info_show{
41 | }
42 | .widgets__info_show .widgets__info-img{
43 | transform: rotate(-90deg);
44 | }
45 | .widgets__info-name{
46 | flex: 1;
47 | }
48 | .widgets__info-img{
49 | width: 32rpx;
50 | height: 32rpx;
51 | transition: transform .4s;
52 | transform: rotate(90deg);
53 | }
54 |
55 | .widgets__list{
56 | display: none;
57 | }
58 | .widgets__list_show{
59 | display: block;
60 | }
61 | .widget{
62 | position: relative;
63 | padding-top: 26rpx;
64 | padding-bottom: 26rpx;
65 | padding-left: 40rpx;
66 | padding-right: 40rpx;
67 | }
68 | .widget__arrow{
69 | position: absolute;
70 | top: 28rpx;
71 | right: 44rpx;
72 | width: 32rpx;
73 | height: 32rpx;
74 | }
75 | .widget__line{
76 | content: " ";
77 | position: absolute;
78 | left: 40rpx;
79 | top: 0;
80 | right: 0;
81 | height: 2rpx;
82 | background-color: #F0F0F0;
83 | }
84 | .widget__line_first{
85 | left: 0;
86 | right: 0;
87 | background-color: #D8D8D8;
88 | }
89 |
--------------------------------------------------------------------------------
/page/API/storage/storage.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | key: '',
4 | data: '',
5 | dialog: {
6 | title: '',
7 | content: '',
8 | hidden: true
9 | }
10 | },
11 | keyChange: function (e) {
12 | this.data.key = e.detail.value
13 | },
14 | dataChange: function (e) {
15 | this.data.data = e.detail.value
16 | },
17 | getStorage: function () {
18 | var key = this.data.key
19 | var data = this.data.data
20 | if (key.length === 0) {
21 | this.setData({
22 | key: key,
23 | data: data,
24 | 'dialog.hidden': false,
25 | 'dialog.title': '读取数据失败',
26 | 'dialog.content': 'key 不能为空'
27 | })
28 | } else {
29 | storageData = wx.getStorageSync(key)
30 | this.setData({
31 | key: key,
32 | data: data,
33 | 'dialog.hidden': false,
34 | 'dialog.title': '读取数据成功',
35 | 'dialog.content': "data: '"+ storageData + "'"
36 | })
37 | }
38 | },
39 | setStorage: function () {
40 | var key = this.data.key
41 | var data = this.data.data
42 | if (key.length === 0) {
43 | this.setData({
44 | key: key,
45 | data: data,
46 | 'dialog.hidden': false,
47 | 'dialog.title': '保存数据失败',
48 | 'dialog.content': 'key 不能为空'
49 | })
50 | } else {
51 | wx.setStorageSync(key, data)
52 | this.setData({
53 | key: key,
54 | data: data,
55 | 'dialog.hidden': false,
56 | 'dialog.title': '存储数据成功'
57 | })
58 | }
59 | },
60 | clearStorage: function () {
61 | wx.clearStorageSync()
62 | this.setData({
63 | key: '',
64 | data: '',
65 | 'dialog.hidden': false,
66 | 'dialog.title': '清除数据成功',
67 | 'dialog.content': ''
68 | })
69 | },
70 | confirm: function () {
71 | this.setData({
72 | 'dialog.hidden': true,
73 | 'dialog.title': '',
74 | 'dialog.content': ''
75 | })
76 | }
77 | })
78 |
--------------------------------------------------------------------------------
/page/API/image/image.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/page/API/get-system-info/get-system-info.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | 手机型号
12 |
13 |
14 |
15 | 微信语言
16 |
17 |
18 |
19 | 微信版本
20 |
21 |
22 |
23 | 屏幕宽度
24 |
25 |
26 |
27 | 屏幕高度
28 |
29 |
30 |
31 | DPI
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/page/API/animation/animation.js:
--------------------------------------------------------------------------------
1 | Page({
2 | onReady: function () {
3 | this.animation = wx.createAnimation()
4 |
5 | },
6 | rotate: function () {
7 | this.animation.rotate(Math.random() * 720 - 360).step()
8 | this.setData({ animation: this.animation.export() })
9 | },
10 | scale: function () {
11 | this.animation.scale(Math.random() * 2).step()
12 | this.setData({ animation: this.animation.export() })
13 | },
14 | translate: function () {
15 | this.animation.translate(Math.random() * 100 - 50, Math.random() * 100 - 50).step()
16 | this.setData({ animation: this.animation.export() })
17 | },
18 | skew: function () {
19 | this.animation.skew(Math.random() * 90, Math.random() * 90).step()
20 | this.setData({ animation: this.animation.export() })
21 | },
22 | rotateAndScale: function () {
23 | this.animation.rotate(Math.random() * 720 - 360)
24 | .scale(Math.random() * 2)
25 | .step()
26 | this.setData({ animation: this.animation.export() })
27 | },
28 | rotateThenScale: function () {
29 | this.animation.rotate(Math.random() * 720 - 360).step()
30 | .scale(Math.random() * 2).step()
31 | this.setData({ animation: this.animation.export() })
32 | },
33 | all: function () {
34 | this.animation.rotate(Math.random() * 720 - 360)
35 | .scale(Math.random() * 2)
36 | .translate(Math.random() * 100 - 50, Math.random() * 100 - 50)
37 | .skew(Math.random() * 90, Math.random() * 90)
38 | .step()
39 | this.setData({ animation: this.animation.export() })
40 | },
41 | allInQueue: function () {
42 | this.animation.rotate(Math.random() * 720 - 360).step()
43 | .scale(Math.random() * 2).step()
44 | .translate(Math.random() * 100 - 50, Math.random() * 100 - 50).step()
45 | .skew(Math.random() * 90, Math.random() * 90).step()
46 | this.setData({ animation: this.animation.export() })
47 | },
48 | reset: function () {
49 | this.animation.rotate(0, 0)
50 | .scale(1)
51 | .translate(0, 0)
52 | .skew(0, 0)
53 | .step({ duration: 0 })
54 | this.setData({ animation: this.animation.export() })
55 | }
56 | })
57 |
--------------------------------------------------------------------------------
/page/API/on-accelerometer-change/on-accelerometer-change.js:
--------------------------------------------------------------------------------
1 | Page({
2 | onReady: function () {
3 | this.drawBigBall()
4 | var that = this
5 |
6 | this.position = {
7 | x: 151,
8 | y: 151,
9 | vx: 0,
10 | vy: 0,
11 | ax: 0,
12 | ay: 0
13 | }
14 | wx.onAccelerometerChange(function (res) {
15 | that.setData({
16 | x: res.x.toFixed(2),
17 | y: res.y.toFixed(2),
18 | z: res.z.toFixed(2)
19 | })
20 | that.position.ax = Math.sin(res.x * Math.PI / 2)
21 | that.position.ay = -Math.sin(res.y * Math.PI / 2)
22 | //that.drawSmallBall()
23 | })
24 |
25 | this.interval = setInterval(function () {
26 | that.drawSmallBall()
27 | }, 17)
28 |
29 | },
30 | drawBigBall: function () {
31 | var context = wx.createContext()
32 | context.beginPath(0)
33 | context.arc(151, 151, 140, 0, Math.PI * 2)
34 | context.setFillStyle('#ffffff')
35 | context.setStrokeStyle('#aaaaaa')
36 | context.fill()
37 | context.stroke()
38 | wx.drawCanvas({
39 | canvasId: 'big-ball',
40 | actions: context.getActions()
41 | })
42 | },
43 | drawSmallBall: function () {
44 | var p = this.position
45 | var strokeStyle = 'rgba(1,1,1,0)'
46 |
47 | p.x = p.x + p.vx
48 | p.y = p.y + p.vy
49 | p.vx = p.vx + p.ax
50 | p.vy = p.vy + p.ay
51 |
52 | if (Math.sqrt(Math.pow(Math.abs(p.x) - 151, 2) + Math.pow(Math.abs(p.y) - 151, 2)) >= 115) {
53 | if (p.x > 151 && p.vx > 0) {
54 | p.vx = 0
55 | }
56 | if (p.x < 151 && p.vx < 0) {
57 | p.vx = 0
58 | }
59 | if (p.y > 151 && p.vy > 0) {
60 | p.vy = 0
61 | }
62 | if (p.y < 151 && p.vy < 0) {
63 | p.vy = 0
64 | }
65 | strokeStyle = '#ff0000'
66 | }
67 |
68 | var context = wx.createContext()
69 | context.beginPath(0)
70 | context.arc(p.x, p.y, 15, 0, Math.PI * 2)
71 | context.setFillStyle('#1aad19')
72 | context.setStrokeStyle(strokeStyle)
73 | context.fill()
74 | context.stroke()
75 | wx.drawCanvas({
76 | canvasId: 'small-ball',
77 | actions: context.getActions()
78 | })
79 | },
80 | data: {
81 | x: 0,
82 | y: 0,
83 | z: 0
84 | },
85 | onUnload: function () {
86 | clearInterval(this.interval)
87 | }
88 | })
89 |
--------------------------------------------------------------------------------
/pages/index/servicearea/servicearea.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 你的全部服务
5 |
6 |
7 |
8 |
9 | 保障险
10 |
11 |
12 |
13 | 付款码
14 |
15 |
16 |
17 | 转账
18 |
19 |
20 |
21 | 定期还款
22 |
23 |
24 |
25 |
26 |
27 | 信用卡还款
28 |
29 |
30 |
31 | 手机充值
32 |
33 |
34 |
35 | 存工资
36 |
37 |
38 |
39 | 全部
40 |
41 |
42 |
--------------------------------------------------------------------------------
/page/API/voice/voice.js:
--------------------------------------------------------------------------------
1 | var util = require('../../../util/util.js')
2 | var playTimeInterval
3 |
4 | Page({
5 | data: {
6 | recording: false,
7 | playing: false,
8 | hasRecord: false,
9 | recordTime: 0,
10 | playTime: 0,
11 | formatedRecordTime: '00:00:00',
12 | formatedPlayTime: '00:00:00'
13 | },
14 | startRecord: function () {
15 | this.setData({ recording: true })
16 |
17 | var that = this
18 | var interval = setInterval(function () {
19 | that.data.recordTime += 1
20 | that.setData({
21 | formatedRecordTime: util.formatTime(that.data.recordTime)
22 | })
23 | }, 1000)
24 | wx.startRecord({
25 | success: function (res) {
26 | that.setData({
27 | hasRecord: true,
28 | tempFilePath: res.tempFilePath,
29 | formatedPlayTime: util.formatTime(that.data.playTime)
30 | })
31 | },
32 | complete: function () {
33 | that.setData({ recording: false })
34 | clearInterval(interval)
35 | }
36 | })
37 | },
38 | stopRecord: function () {
39 | wx.stopRecord()
40 | },
41 | playVoice: function () {
42 | var that = this
43 | playTimeInterval = setInterval(function () {
44 | that.data.playTime += 1
45 | that.setData({
46 | playing: true,
47 | formatedPlayTime: util.formatTime(that.data.playTime)
48 | })
49 | }, 1000)
50 | wx.playVoice({
51 | filePath: this.data.tempFilePath,
52 | success: function () {
53 | clearInterval(playTimeInterval)
54 | that.data.playTime = 0
55 | that.setData({
56 | playing: false,
57 | formatedPlayTime: util.formatTime(that.data.playTime)
58 | })
59 | }
60 | })
61 | },
62 | pauseVoice: function () {
63 | clearInterval(playTimeInterval)
64 | wx.pauseVoice()
65 | this.setData({
66 | playing: false
67 | })
68 | },
69 | stopVoice: function () {
70 | clearInterval(playTimeInterval)
71 | this.data.playTime = 0
72 | this.setData({
73 | playing: false,
74 | formatedPlayTime: util.formatTime(this.data.playTime)
75 | })
76 | wx.stopVoice()
77 | },
78 | clear: function () {
79 | this.data.recordTime = 0
80 | this.data.playTime = 0
81 | clearInterval(playTimeInterval)
82 | wx.stopVoice()
83 | this.setData({
84 | playing: false,
85 | hasRecord: false,
86 | tempFilePath: '',
87 | formatedRecordTime: util.formatTime(0)
88 | })
89 | }
90 | })
91 |
--------------------------------------------------------------------------------
/pages/baitiao/channel/channel.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 领券
6 | 618优惠券
7 |
8 |
9 |
10 | 白条商城
11 |
12 |
13 |
14 |
15 | 白条贷款
16 |
17 |
18 |
19 |
20 | 小白卡
21 |
22 |
23 |
24 |
25 |
26 |
27 | 钢镚
28 |
29 |
30 |
31 |
32 | 手机充值
33 |
34 |
35 |
36 |
37 | 校园白条
38 |
39 |
40 |
41 |
42 | 更多
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/page/API/background-audio/background-audio.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 | var util = require('../../../util/util.js')
3 | var dataUrl = 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46'
4 | Page({
5 | onLoad: function () {
6 | var that = this
7 | this._enableInterval()
8 |
9 | if (app.globalData.backgroundAudioPlaying) {
10 | this.setData({
11 | playing: true
12 | })
13 | }
14 | },
15 | data: {
16 | playing: false,
17 | playTime: 0,
18 | formatedPlayTime: '00:00:00'
19 | },
20 | play: function (res) {
21 | var that = this
22 | wx.playBackgroundAudio({
23 | dataUrl: dataUrl,
24 | title: '此时此刻',
25 | coverImgUrl: 'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000',
26 | complete: function (res) {
27 | that.setData({
28 | playing: true
29 | })
30 | }
31 | })
32 | this._enableInterval()
33 | app.globalData.backgroundAudioPlaying = true
34 | },
35 | seek: function (e) {
36 | clearInterval(this.updateInterval)
37 | var that = this
38 | wx.seekBackgroundAudio({
39 | position: e.detail.value,
40 | complete: function () {
41 | // 实际会延迟两秒左右才跳过去
42 | setTimeout(function () {
43 | that._enableInterval()
44 | }, 2000)
45 | }
46 | })
47 | },
48 | pause: function () {
49 | var that = this
50 | wx.pauseBackgroundAudio({
51 | dataUrl: dataUrl,
52 | success: function () {
53 | that.setData({
54 | playing: false
55 | })
56 | }
57 | })
58 | app.globalData.backgroundAudioPlaying = false
59 | },
60 | stop: function () {
61 | var that = this
62 | wx.stopBackgroundAudio({
63 | dataUrl: dataUrl,
64 | success: function (res) {
65 | that.setData({
66 | playing: false,
67 | playTime: 0,
68 | formatedPlayTime: util.formatTime(0)
69 | })
70 | }
71 | })
72 | app.globalData.backgroundAudioPlaying = false
73 | },
74 | _enableInterval: function () {
75 | var that = this
76 | update()
77 | this.updateInterval = setInterval(update, 500)
78 | function update() {
79 | wx.getBackgroundAudioPlayerState({
80 | success: function (res) {
81 | that.setData({
82 | playTime: res.currentPosition,
83 | formatedPlayTime: util.formatTime(res.currentPosition + 1)
84 | })
85 | }
86 | })
87 | }
88 | },
89 | onUnload: function () {
90 | clearInterval(this.updateInterval)
91 | }
92 | })
93 |
--------------------------------------------------------------------------------
/page/API/voice/voice.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{formatedRecordTime}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{formatedRecordTime}}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | {{formatedPlayTime}}
38 | {{formatedRecordTime}}
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | {{formatedPlayTime}}
54 | {{formatedRecordTime}}
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages":[
3 | "pages/index/index",
4 | "pages/licai/licai",
5 | "pages/touzi/touzi",
6 | "pages/baitiao/baitiao",
7 | "pages/zhongchou/zhongchou",
8 | "pages/logs/logs",
9 |
10 | "page/component/index",
11 | "page/component/component-pages/action-sheet/action-sheet",
12 | "page/component/component-pages/audio/audio",
13 | "page/component/component-pages/button/button",
14 | "page/component/component-pages/canvas/canvas",
15 | "page/component/component-pages/checkbox/checkbox",
16 | "page/component/component-pages/form/form",
17 | "page/component/component-pages/icon/icon",
18 | "page/component/component-pages/image/image",
19 | "page/component/component-pages/input/input",
20 | "page/component/component-pages/map/map",
21 | "page/component/component-pages/modal/modal",
22 | "page/component/component-pages/navigator/navigator",
23 | "page/component/component-pages/progress/progress",
24 | "page/component/component-pages/radio/radio",
25 | "page/component/component-pages/scroll-view/scroll-view",
26 | "page/component/component-pages/slider/slider",
27 | "page/component/component-pages/switch/switch",
28 | "page/component/component-pages/text/text",
29 | "page/component/component-pages/toast/toast",
30 | "page/component/component-pages/video/video",
31 | "page/component/component-pages/view/view",
32 | "page/component/component-pages/swiper/swiper",
33 | "page/component/component-pages/slide-tab/slide-tab",
34 | "page/component/component-pages/label/label",
35 | "page/component/component-pages/loading/loading",
36 | "page/component/component-pages/navigator/navigate",
37 | "page/component/component-pages/navigator/redirect",
38 | "page/component/component-pages/picker/picker",
39 |
40 | "page/API/index/index",
41 |
42 | "page/API/login/login",
43 | "page/API/get-user-info/get-user-info",
44 | "page/API/request-payment/request-payment",
45 |
46 | "page/API/set-navigation-bar-title/set-navigation-bar-title",
47 | "page/API/navigation-bar-loading/navigation-bar-loading",
48 | "page/API/navigator/navigator",
49 | "page/API/pull-down-refresh/pull-down-refresh",
50 | "page/API/animation/animation",
51 |
52 | "page/API/get-network-type/get-network-type",
53 | "page/API/get-system-info/get-system-info",
54 | "page/API/on-compass-change/on-compass-change",
55 |
56 | "page/API/request/request",
57 | "page/API/web-socket/web-socket",
58 | "page/API/upload-file/upload-file",
59 | "page/API/download-file/download-file",
60 |
61 |
62 | "page/API/image/image",
63 | "page/API/voice/voice",
64 | "page/API/file/file",
65 | "page/API/on-accelerometer-change/on-accelerometer-change",
66 | "page/API/canvas/canvas",
67 | "page/API/background-audio/background-audio",
68 | "page/API/video/video",
69 |
70 | "page/API/get-location/get-location",
71 | "page/API/open-location/open-location",
72 |
73 | "page/API/storage/storage"
74 | ],
75 | "window":{
76 | "backgroundTextStyle":"light",
77 | "navigationBarBackgroundColor": "#fff",
78 | "navigationBarTitleText": "WeChat",
79 | "navigationBarTextStyle":"black"
80 | },
81 | "tabBar": {
82 | "color":"#999",
83 | "selectedColor":"#508CEE",
84 | "backgroundColor":"#fff",
85 | "borderStyle":"white",
86 | "position":"bottom",
87 | "list": [{
88 | "pagePath": "pages/index/index",
89 | "text": "我",
90 | "iconPath":"images/icon/wo-normal.png",
91 | "selectedIconPath":"images/icon/wo-select.png"
92 | },{
93 | "pagePath": "pages/baitiao/baitiao",
94 | "text": "白条",
95 | "iconPath":"images/icon/bt-normal.png",
96 | "selectedIconPath":"images/icon/bt-select.png"
97 | },{
98 | "pagePath": "page/API/index/index",
99 | "text": "接口",
100 | "iconPath":"images/icon/tz-normal.png",
101 | "selectedIconPath":"images/icon/tz-select.png"
102 | }, {
103 | "pagePath": "page/component/index",
104 | "text": "WXUI",
105 | "iconPath":"images/icon/zc-normal.png",
106 | "selectedIconPath":"images/icon/zc-select.png"
107 | }]
108 | },
109 | "networkTimeout": {
110 | "request": 10000,
111 | "downloadFile": 10000
112 | },
113 | "debug": false
114 | }
115 |
--------------------------------------------------------------------------------
/page/API/index/index.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | menuList: [{
4 | name: '开放接口',
5 | APIList: [{
6 | zhName: '微信登录',
7 | enName: 'login',
8 | url: '../login/login'
9 | }, {
10 | zhName: '获取用户信息',
11 | enName: 'getUserInfo',
12 | url: '../get-user-info/get-user-info'
13 | }, {
14 | zhName: '发起支付',
15 | enName: 'requestPayment',
16 | url: '../request-payment/request-payment'
17 | }],
18 | opened: false
19 | }, {
20 | name: '界面',
21 | opened: false,
22 | APIList: [{
23 | zhName: '设置界面标题',
24 | enName: 'setNavigationBarTitle',
25 | url: '../set-navigation-bar-title/set-navigation-bar-title'
26 | }, {
27 | zhName: '标题栏加载动画',
28 | enName: 'navigationBarLoading',
29 | url: '../navigation-bar-loading/navigation-bar-loading'
30 | }, {
31 | zhName: '页面跳转',
32 | enName: 'navigateTo, navigateBack, redirectTo',
33 | url: '../navigator/navigator'
34 | }, {
35 | zhName: '下拉刷新',
36 | enName: 'pullDownRefresh',
37 | url: '../pull-down-refresh/pull-down-refresh'
38 | }, {
39 | zhName: '创建动画',
40 | enName: 'createAnimation',
41 | url: '../animation/animation'
42 | }, {
43 | zhName: '创建绘画',
44 | enName: 'createContext',
45 | url: '../canvas/canvas'
46 | }]
47 | }, {
48 | name: '设备',
49 | opened: false,
50 | APIList: [{
51 | zhName: '获取手机网络状态',
52 | enName: 'getNetworkType',
53 | url: '../get-network-type/get-network-type'
54 | }, {
55 | zhName: '获取手机系统信息',
56 | enName: 'getSystemInfo',
57 | url: '../get-system-info/get-system-info'
58 | }, {
59 | zhName: '监听重力感应数据',
60 | enName: 'onAccelerometerChange',
61 | url: '../on-accelerometer-change/on-accelerometer-change'
62 | }, {
63 | zhName: '监听罗盘数据',
64 | enName: 'onCompassChange',
65 | url: '../on-compass-change/on-compass-change'
66 | }]
67 | }, {
68 | name: '网络',
69 | opened: false,
70 | APIList: [{
71 | zhName: '发起一个请求',
72 | enName: 'request',
73 | url: '../request/request'
74 | }, {
75 | zhName: 'WebSocket',
76 | enName: 'WebSocket',
77 | url: '../web-socket/web-socket'
78 | }, {
79 | zhName: '上传文件',
80 | enName: 'Upload File',
81 | url: '../upload-file/upload-file'
82 | }, {
83 | zhName: '下载文件',
84 | enName: 'Download File',
85 | url: '../download-file/download-file'
86 | }]
87 | }, {
88 | name: '媒体',
89 | opened: false,
90 | APIList: [{
91 | zhName: '图片',
92 | enName: 'chooseImage/previewImage',
93 | url: '../image/image'
94 | }, {
95 | zhName: '录音',
96 | enName: 'start/stopRecord, play/pause/stopVoice',
97 | url: '../voice/voice'
98 | }, {
99 | zhName: '背景音频',
100 | enName: 'play/pause/stopAudio',
101 | url: '../background-audio/background-audio'
102 | }, {
103 | zhName: '文件',
104 | enName: 'saveFile',
105 | url: '../file/file'
106 | }, {
107 | zhName: '视频',
108 | enName: 'video',
109 | url: '../video/video'
110 | }]
111 | }, {
112 | name: '位置',
113 | opened: false,
114 | APIList: [{
115 | zhName: '获取当前位置',
116 | enName: 'getLocation',
117 | url: '../get-location/get-location'
118 | }, {
119 | zhName: '使用原生地图查看位置',
120 | enName: 'openLocation',
121 | url: '../open-location/open-location'
122 | }]
123 | }, {
124 | name: '数据',
125 | opened: false,
126 | url: '../storage/storage'
127 | }]
128 | },
129 | tapMenuItem: function (e) {
130 | var menuItem = this.data.menuList[parseInt(e.currentTarget.id)]
131 | if (menuItem.url) {
132 | wx.navigateTo({ url: menuItem.url })
133 | } else {
134 | var changeData = {}
135 | var opened = menuItem.opened
136 | var index = parseInt(e.currentTarget.id)
137 |
138 | // 展开操作
139 | if (opened === false) {
140 | var openedIndex = -1
141 | this.data.menuList.forEach(function (menu, i) {
142 | if (menu.opened === true) {
143 | openedIndex = i
144 | }
145 | })
146 | if (openedIndex > -1) {
147 | changeData['menuList[' + openedIndex + '].opened'] = false
148 | }
149 | }
150 |
151 | changeData['menuList[' + index + '].opened'] = !opened
152 | this.setData(changeData)
153 | }
154 | }
155 | })
156 |
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 |
3 | .container {
4 | height: 100%;
5 | display: flex;
6 | flex-direction: column;
7 | align-items: center;
8 | justify-content: space-between;
9 | box-sizing: border-box;
10 | }
11 |
12 | .main-content{
13 | background-color: #efeff4;
14 | }
15 |
16 | .jrm-box {
17 | box-sizing: border-box;
18 | }
19 |
20 | .jrm-w100p{
21 | width:100%;
22 | }
23 |
24 | .jrm-flex{
25 | display: flex;
26 | }
27 |
28 |
29 | .jrm-flex-row{
30 | display: flex;
31 | flex: 0 1 auto;
32 | }
33 |
34 | .jrm-flex-item{
35 | flex: 0 0 auto;
36 | }
37 |
38 | .jrm-flex-cc{
39 | display: flex;
40 | flex-direction:column;
41 | align-items: center;
42 | }
43 |
44 | .jrm-flex-column{
45 | display: flex;
46 | flex-direction:column;
47 | }
48 |
49 | .jrm-fs28{
50 | font-size: 28rpx;
51 | }
52 |
53 | .jrm-fs36{
54 | font-size: 36rpx;
55 | }
56 |
57 | .jrm-fs48{
58 | font-size: 48rpx;
59 | }
60 |
61 | .jrm-mt20{
62 | margin-top: 20rpx;
63 | }
64 |
65 | .jrm-pl32{
66 | padding-left: 32rpx;
67 | }
68 |
69 | .jrm-pr32{
70 | padding-right: 32rpx;
71 | }
72 |
73 | .jrm-bg-fff{
74 | background-color: #fff;
75 | }
76 |
77 |
78 |
79 |
80 | /*
81 | **************************************************以下是微信UI样式 请谨慎修改*****************************************************
82 | */
83 |
84 | page {
85 | background-color: #fbf9fe;
86 | /*height: 100%;*/
87 | }
88 | .container {
89 | display: flex;
90 | flex-direction: column;
91 | min-height: 100%;
92 | justify-content: space-between;
93 | }
94 | .page-header {
95 | display: flex;
96 | font-size: 32rpx;
97 | color: #aaa;
98 | margin-top: 50rpx;
99 | flex-direction: column;
100 | align-items: center;
101 | }
102 | .page-header-text {
103 | padding: 20rpx 40rpx;
104 | }
105 | .page-header-line {
106 | width: 150rpx;
107 | height: 1px;
108 | border-bottom: 1px solid #ccc;
109 | }
110 |
111 | .page-body {
112 | width: 100%;
113 | display: flex;
114 | flex-direction: column;
115 | align-items: center;
116 | flex-grow: 1;
117 | overflow-x: hidden;
118 | }
119 | .page-body-wrapper {
120 | margin-top: 100rpx;
121 | display: flex;
122 | flex-direction: column;
123 | align-items: center;
124 | width: 100%;
125 | }
126 | .page-body-wrapper form {
127 | width: 100%;
128 | }
129 | .page-body-wording {
130 | text-align: center;
131 | padding: 200rpx 100rpx;
132 | }
133 | .page-body-info {
134 | display: flex;
135 | flex-direction: column;
136 | align-items: center;
137 | background-color: #fff;
138 | margin-bottom: 50rpx;
139 | width: 100%;
140 | padding: 50rpx 0 150rpx 0;
141 | }
142 | .page-body-title {
143 | margin-bottom: 100rpx;
144 | font-size: 32rpx;
145 | }
146 | .page-body-text {
147 | font-size: 30rpx;
148 | line-height: 26px;
149 | color: #ccc;
150 | }
151 | .page-body-text-small {
152 | font-size: 24rpx;
153 | color: #000;
154 | margin-bottom: 100rpx;
155 | }
156 | .page-body-form {
157 | width: 100%;
158 | background-color: #fff;
159 | display: flex;
160 | flex-direction: column;
161 | width: 100%;
162 | border: 1px solid #eee;
163 | }
164 | .page-body-form-item {
165 | display: flex;
166 | align-items: center;
167 | margin-left: 30rpx;
168 | border-bottom: 1px solid #eee;
169 | height: 88rpx;
170 | font-size: 34rpx;
171 | }
172 | .page-body-form-key {
173 | width: 180rpx;
174 | color: #000;
175 | }
176 | .page-body-form-value {
177 | flex-grow: 1;
178 | }
179 | .page-body-form-value .input-placeholder {
180 | color: #b2b2b2;
181 | }
182 |
183 | .page-body-form-picker {
184 | display: flex;
185 | justify-content: space-between;
186 | height: 100rpx;
187 | align-items: center;
188 | font-size: 36rpx;
189 | margin-left: 20rpx;
190 | padding-right: 20rpx;
191 | border-bottom: 1px solid #eee;
192 | }
193 | .page-body-form-picker-value {
194 | color: #ccc;
195 | }
196 |
197 | .page-body-buttons {
198 | width: 100%;
199 | }
200 | .page-body-button {
201 | margin: 25rpx;
202 | }
203 | .page-body-button image {
204 | width: 150rpx;
205 | height: 150rpx;
206 | }
207 | .page-footer {
208 | text-align: center;
209 | color: #1aad19;
210 | font-size: 24rpx;
211 | margin: 20rpx 0;
212 | }
213 |
214 | .green{
215 | color: #09BB07;
216 | }
217 | .red{
218 | color: #F76260;
219 | }
220 | .blue{
221 | color: #10AEFF;
222 | }
223 | .yellow{
224 | color: #FFBE00;
225 | }
226 | .gray{
227 | color: #C9C9C9;
228 | }
229 |
230 | .strong{
231 | font-weight: bold;
232 | }
233 |
234 | .bc_green{
235 | background-color: #09BB07;
236 | }
237 | .bc_red{
238 | background-color: #F76260;
239 | }
240 | .bc_blue{
241 | background-color: #10AEFF;
242 | }
243 | .bc_yellow{
244 | background-color: #FFBE00;
245 | }
246 | .bc_gray{
247 | background-color: #C9C9C9;
248 | }
249 |
250 | .tc{
251 | text-align: center;
252 | }
253 |
254 | .page input{
255 | padding: 20rpx 30rpx;
256 | background-color: #fff;
257 | }
258 | checkbox, radio{
259 | margin-right: 10rpx;
260 | }
261 |
262 | .btn-area{
263 | padding: 0 30px;
264 | }
265 | .btn-area button{
266 | margin-top: 20rpx;
267 | margin-bottom: 20rpx;
268 | }
269 |
270 | .page {
271 | min-height: 100%;
272 | flex: 1;
273 | background-color: #FBF9FE;
274 | font-size: 32rpx;
275 | font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif;
276 | overflow: hidden;
277 | }
278 | .page__hd{
279 | padding: 50rpx 50rpx 100rpx 50rpx;
280 | text-align: center;
281 | }
282 | .page__title{
283 | display: inline-block;
284 | padding: 20rpx 40rpx;
285 | font-size: 32rpx;
286 | color: #AAAAAA;
287 | border-bottom: 1px solid #CCCCCC;
288 | }
289 | .page__desc{
290 | display: none;
291 | margin-top: 20rpx;
292 | font-size: 26rpx;
293 | color: #BBBBBB;
294 | }
295 |
296 | .section{
297 | margin-bottom: 80rpx;
298 | }
299 | .section_gap{
300 | padding: 0 30rpx;
301 | }
302 | .section__title{
303 | margin-bottom: 16rpx;
304 | padding-left: 30rpx;
305 | padding-right: 30rpx;
306 | }
307 | .section_gap .section__title{
308 | padding-left: 0;
309 | padding-right: 0;
310 | }
311 | .section__ctn{
312 |
313 | }
314 |
--------------------------------------------------------------------------------
/page/API/canvas/example.js:
--------------------------------------------------------------------------------
1 | var example = {};
2 |
3 | example.rotate = function (context) {
4 | context.beginPath();
5 | context.rotate(10*Math.PI/180);
6 | context.rect(225, 75, 20, 10);
7 | context.fill();
8 | };
9 |
10 | example.scale = function (context) {
11 | context.beginPath();
12 | context.rect(25, 25, 50, 50);
13 | context.stroke();
14 |
15 | context.scale(2,2);
16 |
17 | context.beginPath();
18 | context.rect(25, 25, 50, 50);
19 | context.stroke();
20 | };
21 |
22 |
23 | example.reset = function (context) {
24 | context.beginPath();
25 |
26 | context.setFillStyle('#000000');
27 | context.setStrokeStyle('#000000');
28 | context.setFontSize(10);
29 |
30 | context.setShadow(0, 0, 0, 'rgba(0, 0, 0, 0)');
31 |
32 | context.setLineCap('butt');
33 | context.setLineJoin('miter');
34 | context.setLineWidth(1);
35 | context.setMiterLimit(10);
36 | };
37 |
38 | example.translate = function (context) {
39 | context.beginPath();
40 | context.rect(10, 10, 100, 50);
41 | context.fill();
42 |
43 | context.translate(70, 70);
44 |
45 | context.beginPath();
46 | context.fill();
47 | };
48 |
49 | example.save = function (context) {
50 | context.beginPath();
51 | context.setStrokeStyle('#00ff00');
52 | context.save();
53 |
54 | context.scale(2, 2);
55 | context.setStrokeStyle('#ff0000');
56 | context.rect(0, 0, 100, 100);
57 | context.stroke();
58 | context.restore();
59 |
60 | context.rect(0, 0, 50, 50);
61 | context.stroke();
62 | };
63 |
64 | example.restore = function (context) {
65 | [3, 2, 1].forEach(function (item) {
66 | context.beginPath();
67 | context.save();
68 | context.scale(item, item);
69 | context.rect(10, 10, 100, 100);
70 | context.stroke();
71 | context.restore();
72 | });
73 |
74 | };
75 |
76 | example.drawImage = function (context) {
77 | context.drawImage('/image/wechat.png', 0, 0);
78 | };
79 |
80 | example.fillText = function (context) {
81 | context.setStrokeStyle('#ff0000');
82 |
83 | context.beginPath();
84 | context.moveTo(0, 10);
85 | context.lineTo(300, 10);
86 | context.stroke();
87 |
88 | // context.save();
89 | // context.scale(1.5, 1.5);
90 | // context.translate(20, 20);
91 | context.setFontSize(10);
92 | context.fillText('Hello World', 0, 30);
93 | context.setFontSize(20);
94 | context.fillText('Hello World', 100, 30);
95 |
96 | // context.restore();
97 |
98 | context.beginPath();
99 | context.moveTo(0, 30);
100 | context.lineTo(300, 30);
101 | context.stroke();
102 | };
103 |
104 | example.fill = function (context) {
105 | context.beginPath();
106 | context.rect(20, 20, 150, 100);
107 | context.setStrokeStyle('#00ff00');
108 | context.fill();
109 | };
110 |
111 | example.stroke = function (context) {
112 | context.beginPath();
113 | context.moveTo(20, 20);
114 | context.lineTo(20, 100);
115 | context.lineTo(70, 100);
116 | context.setStrokeStyle('#00ff00');
117 | context.stroke();
118 | };
119 |
120 | example.clearRect = function (context) {
121 | context.setFillStyle('#ff0000');
122 | context.beginPath();
123 | context.rect(0, 0, 300, 150);
124 | context.fill();
125 | context.clearRect(20, 20, 100, 50);
126 | };
127 |
128 | example.beginPath = function (context) {
129 | context.beginPath();
130 | context.setLineWidth(5);
131 | context.setStrokeStyle('#ff0000');
132 | context.moveTo(0, 75);
133 | context.lineTo(250, 75);
134 | context.stroke();
135 |
136 | context.beginPath();
137 | context.setStrokeStyle('#0000ff');
138 | context.moveTo(50, 0);
139 | context.lineTo(150, 130);
140 | context.stroke();
141 | };
142 |
143 | example.closePath = function (context) {
144 | context.beginPath();
145 | context.moveTo(20, 20);
146 | context.lineTo(20, 100);
147 | context.lineTo(70, 100);
148 | context.closePath();
149 | context.stroke();
150 | };
151 |
152 | example.moveTo = function (context) {
153 | context.beginPath();
154 | context.moveTo(0, 0);
155 | context.lineTo(300, 150);
156 | context.stroke();
157 | };
158 |
159 | example.lineTo = function (context) {
160 | context.beginPath();
161 | context.moveTo(20,20);
162 | context.lineTo(20,100);
163 | context.lineTo(70,100);
164 | context.stroke();
165 | };
166 |
167 | example.rect = function (context) {
168 | context.beginPath();
169 | context.rect(20, 20, 150, 100);
170 | context.stroke();
171 | };
172 |
173 | example.arc = function (context) {
174 | context.beginPath();
175 | context.arc(75,75,50,0,Math.PI*2,true);
176 | context.moveTo(110,75);
177 | context.arc(75,75,35,0,Math.PI,false);
178 | context.moveTo(65,65);
179 | context.arc(60,65,5,0,Math.PI*2,true);
180 | context.moveTo(95,65);
181 | context.arc(90,65,5,0,Math.PI*2,true);
182 | context.stroke();
183 | };
184 |
185 | example.quadraticCurveTo = function (context) {
186 | context.beginPath();
187 | context.moveTo(20, 20);
188 | context.quadraticCurveTo(20, 100, 200, 20);
189 | context.stroke();
190 | };
191 |
192 | example.bezierCurveTo = function (context) {
193 | context.beginPath();
194 | context.moveTo(20, 20);
195 | context.bezierCurveTo(20, 100, 200, 100, 200, 20);
196 | context.stroke();
197 | };
198 |
199 | example.setFillStyle = function (context) {
200 | ['#fef957', 'rgb(242,159,63)', 'rgb(242,117,63)', '#e87e51'].forEach(function (item, index) {
201 | context.setFillStyle(item);
202 | context.beginPath();
203 | context.rect(0 + 75*index, 0, 50, 50);
204 | context.fill();
205 | });
206 | };
207 |
208 | example.setStrokeStyle = function (context) {
209 | ['#fef957', 'rgb(242,159,63)', 'rgb(242,117,63)', '#e87e51'].forEach(function (item, index) {
210 | context.setStrokeStyle(item);
211 | context.beginPath();
212 | context.rect(0 + 75*index, 0, 50, 50);
213 | context.stroke();
214 | });
215 | };
216 |
217 | example.setGlobalAlpha = function (context) {
218 | context.setFillStyle('#000000');
219 | [1, 0.5, 0.1].forEach(function (item, index) {
220 | context.setGlobalAlpha(item)
221 | context.beginPath();
222 | context.rect(0 + 75*index, 0, 50, 50);
223 | context.fill();
224 | });
225 | }
226 |
227 | example.setShadow = function (context) {
228 | context.beginPath();
229 | context.setShadow(10, 10, 10, 'rgba(0, 0, 0, 199)');
230 | context.rect(10, 10, 100, 100);
231 | context.fill();
232 | };
233 |
234 | example.setFontSize = function (context) {
235 | [10, 20, 30, 40].forEach(function (item, index) {
236 | context.setFontSize(item);
237 | context.fillText('Hello, world', 20, 20 + 40*index);
238 | })
239 | };
240 |
241 | example.setLineCap = function (context) {
242 | context.setLineWidth(10);
243 | ['butt', 'round', 'square'].forEach(function (item, index) {
244 | context.beginPath();
245 | context.setLineCap(item);
246 | context.moveTo(20, 20 + 20*index);
247 | context.lineTo(100, 20 + 20*index);
248 | context.stroke();
249 | });
250 | };
251 |
252 | example.setLineJoin = function (context) {
253 | context.setLineWidth(10);
254 | ['bevel', 'round', 'miter'].forEach(function (item, index) {
255 | context.beginPath();
256 |
257 | context.setLineJoin(item);
258 | context.moveTo(20 + 80*index, 20);
259 | context.lineTo(100 + 80*index, 50);
260 | context.lineTo(20 + 80*index, 100);
261 | context.stroke();
262 | });
263 | };
264 |
265 | example.setLineWidth = function (context) {
266 | [2, 4, 6, 8, 10].forEach(function (item, index) {
267 | context.beginPath();
268 | context.setLineWidth(item);
269 | context.moveTo(20, 20 + 20*index);
270 | context.lineTo(100, 20 + 20*index);
271 | context.stroke();
272 | });
273 | };
274 |
275 | example.setMiterLimit = function (context) {
276 | context.setLineWidth(4);
277 |
278 | [2, 4, 6, 8, 10].forEach(function (item, index) {
279 | context.beginPath();
280 | context.setMiterLimit(item);
281 | context.moveTo(20 + 80*index, 20);
282 | context.lineTo(100 + 80*index, 50);
283 | context.lineTo(20 + 80*index, 100);
284 | context.stroke();
285 | });
286 | };
287 |
288 | module.exports = example
289 |
--------------------------------------------------------------------------------