Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
miniapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜立平
miniapp
Commits
b4714a87
Commit
b4714a87
authored
Nov 12, 2019
by
F274D38F76EF052A7C28103488931A2E
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序提交HR
parent
c4794b1b
Changes
199
Show whitespace changes
Inline
Side-by-side
Showing
199 changed files
with
1071 additions
and
3642 deletions
+1071
-3642
app.json
02-PG/小程序/weapp-demo/app.json
+2
-56
animation.js
02-PG/小程序/weapp-demo/page/API/animation/animation.js
+0
-56
animation.json
02-PG/小程序/weapp-demo/page/API/animation/animation.json
+0
-3
animation.wxml
02-PG/小程序/weapp-demo/page/API/animation/animation.wxml
+0
-28
animation.wxss
02-PG/小程序/weapp-demo/page/API/animation/animation.wxss
+0
-32
background-audio.js
.../weapp-demo/page/API/background-audio/background-audio.js
+0
-86
background-audio.json
...eapp-demo/page/API/background-audio/background-audio.json
+0
-3
background-audio.wxml
...eapp-demo/page/API/background-audio/background-audio.wxml
+0
-39
background-audio.wxss
...eapp-demo/page/API/background-audio/background-audio.wxss
+0
-30
canvas.js
02-PG/小程序/weapp-demo/page/API/canvas/canvas.js
+0
-59
canvas.json
02-PG/小程序/weapp-demo/page/API/canvas/canvas.json
+0
-3
canvas.wxml
02-PG/小程序/weapp-demo/page/API/canvas/canvas.wxml
+0
-16
canvas.wxss
02-PG/小程序/weapp-demo/page/API/canvas/canvas.wxss
+0
-5
footer.wxml
02-PG/小程序/weapp-demo/page/API/common/footer.wxml
+0
-5
header.wxml
02-PG/小程序/weapp-demo/page/API/common/header.wxml
+0
-5
download-file.js
02-PG/小程序/weapp-demo/page/API/download-file/download-file.js
+0
-1
download-file.json
.../小程序/weapp-demo/page/API/download-file/download-file.json
+0
-3
download-file.wxml
.../小程序/weapp-demo/page/API/download-file/download-file.wxml
+0
-16
download-file.wxss
.../小程序/weapp-demo/page/API/download-file/download-file.wxss
+0
-0
file.js
02-PG/小程序/weapp-demo/page/API/file/file.js
+0
-62
file.json
02-PG/小程序/weapp-demo/page/API/file/file.json
+0
-3
file.wxml
02-PG/小程序/weapp-demo/page/API/file/file.wxml
+0
-31
file.wxss
02-PG/小程序/weapp-demo/page/API/file/file.wxss
+0
-9
generate.sh
02-PG/小程序/weapp-demo/page/API/generate.sh
+0
-5
format-location.js
...G/小程序/weapp-demo/page/API/get-location/format-location.js
+0
-11
get-location.js
02-PG/小程序/weapp-demo/page/API/get-location/get-location.js
+0
-24
get-location.json
02-PG/小程序/weapp-demo/page/API/get-location/get-location.json
+0
-3
get-location.wxml
02-PG/小程序/weapp-demo/page/API/get-location/get-location.wxml
+0
-31
get-location.wxss
02-PG/小程序/weapp-demo/page/API/get-location/get-location.wxss
+0
-12
get-network-type.js
.../weapp-demo/page/API/get-network-type/get-network-type.js
+0
-24
get-network-type.json
...eapp-demo/page/API/get-network-type/get-network-type.json
+0
-3
get-network-type.wxml
...eapp-demo/page/API/get-network-type/get-network-type.wxml
+0
-28
get-network-type.wxss
...eapp-demo/page/API/get-network-type/get-network-type.wxss
+0
-3
get-system-info.js
...程序/weapp-demo/page/API/get-system-info/get-system-info.js
+0
-16
get-system-info.json
.../weapp-demo/page/API/get-system-info/get-system-info.json
+0
-3
get-system-info.wxml
.../weapp-demo/page/API/get-system-info/get-system-info.wxml
+0
-44
get-system-info.wxss
.../weapp-demo/page/API/get-system-info/get-system-info.wxss
+0
-0
get-user-info.js
02-PG/小程序/weapp-demo/page/API/get-user-info/get-user-info.js
+0
-35
get-user-info.json
.../小程序/weapp-demo/page/API/get-user-info/get-user-info.json
+0
-3
get-user-info.wxml
.../小程序/weapp-demo/page/API/get-user-info/get-user-info.wxml
+0
-28
get-user-info.wxss
.../小程序/weapp-demo/page/API/get-user-info/get-user-info.wxss
+0
-9
image.js
02-PG/小程序/weapp-demo/page/API/image/image.js
+0
-52
image.json
02-PG/小程序/weapp-demo/page/API/image/image.json
+0
-3
image.wxml
02-PG/小程序/weapp-demo/page/API/image/image.wxml
+0
-44
image.wxss
02-PG/小程序/weapp-demo/page/API/image/image.wxss
+0
-21
index.js
02-PG/小程序/weapp-demo/page/API/index/index.js
+0
-137
index.wxml
02-PG/小程序/weapp-demo/page/API/index/index.wxml
+0
-33
index.wxss
02-PG/小程序/weapp-demo/page/API/index/index.wxss
+0
-83
login.js
02-PG/小程序/weapp-demo/page/API/login/login.js
+0
-21
login.json
02-PG/小程序/weapp-demo/page/API/login/login.json
+0
-3
login.wxml
02-PG/小程序/weapp-demo/page/API/login/login.wxml
+0
-21
login.wxss
02-PG/小程序/weapp-demo/page/API/login/login.wxss
+0
-26
navigation-bar-loading.js
...page/API/navigation-bar-loading/navigation-bar-loading.js
+0
-8
navigation-bar-loading.json
...ge/API/navigation-bar-loading/navigation-bar-loading.json
+0
-3
navigation-bar-loading.wxml
...ge/API/navigation-bar-loading/navigation-bar-loading.wxml
+0
-17
navigation-bar-loading.wxss
...ge/API/navigation-bar-loading/navigation-bar-loading.wxss
+0
-0
navigator.js
02-PG/小程序/weapp-demo/page/API/navigator/navigator.js
+0
-11
navigator.json
02-PG/小程序/weapp-demo/page/API/navigator/navigator.json
+0
-3
navigator.wxml
02-PG/小程序/weapp-demo/page/API/navigator/navigator.wxml
+0
-18
navigator.wxss
02-PG/小程序/weapp-demo/page/API/navigator/navigator.wxss
+0
-0
on-accelerometer-change.js
...ge/API/on-accelerometer-change/on-accelerometer-change.js
+0
-88
on-accelerometer-change.json
.../API/on-accelerometer-change/on-accelerometer-change.json
+0
-3
on-accelerometer-change.wxml
.../API/on-accelerometer-change/on-accelerometer-change.wxml
+0
-24
on-accelerometer-change.wxss
.../API/on-accelerometer-change/on-accelerometer-change.wxss
+0
-23
on-compass-change.js
...eapp-demo/page/API/on-compass-change/on-compass-change.js
+0
-13
on-compass-change.json
...pp-demo/page/API/on-compass-change/on-compass-change.json
+0
-3
on-compass-change.wxml
...pp-demo/page/API/on-compass-change/on-compass-change.wxml
+0
-20
on-compass-change.wxss
...pp-demo/page/API/on-compass-change/on-compass-change.wxss
+0
-10
open-location.js
02-PG/小程序/weapp-demo/page/API/open-location/open-location.js
+0
-13
open-location.json
.../小程序/weapp-demo/page/API/open-location/open-location.json
+0
-3
open-location.wxml
.../小程序/weapp-demo/page/API/open-location/open-location.wxml
+0
-36
open-location.wxss
.../小程序/weapp-demo/page/API/open-location/open-location.wxss
+0
-0
pull-down-refresh.js
...eapp-demo/page/API/pull-down-refresh/pull-down-refresh.js
+0
-12
pull-down-refresh.json
...pp-demo/page/API/pull-down-refresh/pull-down-refresh.json
+0
-4
pull-down-refresh.wxml
...pp-demo/page/API/pull-down-refresh/pull-down-refresh.wxml
+0
-19
pull-down-refresh.wxss
...pp-demo/page/API/pull-down-refresh/pull-down-refresh.wxss
+0
-10
request-payment.js
...程序/weapp-demo/page/API/request-payment/request-payment.js
+0
-2
request-payment.json
.../weapp-demo/page/API/request-payment/request-payment.json
+0
-3
request-payment.wxml
.../weapp-demo/page/API/request-payment/request-payment.wxml
+0
-17
request-payment.wxss
.../weapp-demo/page/API/request-payment/request-payment.wxss
+0
-0
request.js
02-PG/小程序/weapp-demo/page/API/request/request.js
+0
-1
request.json
02-PG/小程序/weapp-demo/page/API/request/request.json
+0
-3
request.wxml
02-PG/小程序/weapp-demo/page/API/request/request.wxml
+0
-17
request.wxss
02-PG/小程序/weapp-demo/page/API/request/request.wxss
+0
-0
set-navigation-bar-title.js
.../API/set-navigation-bar-title/set-navigation-bar-title.js
+0
-9
set-navigation-bar-title.json
...PI/set-navigation-bar-title/set-navigation-bar-title.json
+0
-3
set-navigation-bar-title.wxml
...PI/set-navigation-bar-title/set-navigation-bar-title.wxml
+0
-26
set-navigation-bar-title.wxss
...PI/set-navigation-bar-title/set-navigation-bar-title.wxss
+0
-0
storage.js
02-PG/小程序/weapp-demo/page/API/storage/storage.js
+0
-49
storage.json
02-PG/小程序/weapp-demo/page/API/storage/storage.json
+0
-3
storage.wxml
02-PG/小程序/weapp-demo/page/API/storage/storage.wxml
+0
-28
storage.wxss
02-PG/小程序/weapp-demo/page/API/storage/storage.wxss
+0
-0
upload-file.js
02-PG/小程序/weapp-demo/page/API/upload-file/upload-file.js
+0
-1
upload-file.json
02-PG/小程序/weapp-demo/page/API/upload-file/upload-file.json
+0
-3
upload-file.wxml
02-PG/小程序/weapp-demo/page/API/upload-file/upload-file.wxml
+0
-16
upload-file.wxss
02-PG/小程序/weapp-demo/page/API/upload-file/upload-file.wxss
+0
-0
voice.js
02-PG/小程序/weapp-demo/page/API/voice/voice.js
+0
-87
voice.json
02-PG/小程序/weapp-demo/page/API/voice/voice.json
+0
-3
voice.wxml
02-PG/小程序/weapp-demo/page/API/voice/voice.wxml
+0
-73
voice.wxss
02-PG/小程序/weapp-demo/page/API/voice/voice.wxss
+0
-34
web-socket.js
02-PG/小程序/weapp-demo/page/API/web-socket/web-socket.js
+0
-1
web-socket.json
02-PG/小程序/weapp-demo/page/API/web-socket/web-socket.json
+0
-3
web-socket.wxml
02-PG/小程序/weapp-demo/page/API/web-socket/web-socket.wxml
+0
-16
web-socket.wxss
02-PG/小程序/weapp-demo/page/API/web-socket/web-socket.wxss
+0
-0
wx-action-sheet.js
...ponent/component-pages/wx-action-sheet/wx-action-sheet.js
+0
-27
wx-action-sheet.wxml
...nent/component-pages/wx-action-sheet/wx-action-sheet.wxml
+0
-18
wx-action-sheet.wxss
...nent/component-pages/wx-action-sheet/wx-action-sheet.wxss
+0
-9
wx-audio.js
...-demo/page/component/component-pages/wx-audio/wx-audio.js
+0
-11
wx-audio.wxml
...emo/page/component/component-pages/wx-audio/wx-audio.wxml
+0
-12
wx-button.js
...emo/page/component/component-pages/wx-button/wx-button.js
+0
-40
wx-button.wxml
...o/page/component/component-pages/wx-button/wx-button.wxml
+0
-36
wx-button.wxss
...o/page/component/component-pages/wx-button/wx-button.wxss
+0
-0
wx-checkbox.js
...page/component/component-pages/wx-checkbox/wx-checkbox.js
+0
-15
wx-checkbox.wxml
...ge/component/component-pages/wx-checkbox/wx-checkbox.wxml
+0
-16
wx-checkbox.wxss
...ge/component/component-pages/wx-checkbox/wx-checkbox.wxss
+0
-5
wx-form.js
...pp-demo/page/component/component-pages/wx-form/wx-form.js
+0
-33
wx-form.wxml
...-demo/page/component/component-pages/wx-form/wx-form.wxml
+0
-40
wx-form.wxss
...-demo/page/component/component-pages/wx-form/wx-form.wxss
+0
-12
wx-icon.js
...pp-demo/page/component/component-pages/wx-icon/wx-icon.js
+0
-13
wx-icon.wxml
...-demo/page/component/component-pages/wx-icon/wx-icon.wxml
+0
-34
wx-icon.wxss
...-demo/page/component/component-pages/wx-icon/wx-icon.wxss
+0
-5
wx-image.js
...-demo/page/component/component-pages/wx-image/wx-image.js
+0
-6
wx-image.wxml
...emo/page/component/component-pages/wx-image/wx-image.wxml
+0
-28
wx-image.wxss
...emo/page/component/component-pages/wx-image/wx-image.wxss
+0
-4
wx-input.js
...-demo/page/component/component-pages/wx-input/wx-input.js
+0
-42
wx-input.wxml
...emo/page/component/component-pages/wx-input/wx-input.wxml
+0
-49
wx-input.wxss
...emo/page/component/component-pages/wx-input/wx-input.wxss
+0
-0
wx-label.js
...-demo/page/component/component-pages/wx-label/wx-label.js
+0
-48
wx-label.wxml
...emo/page/component/component-pages/wx-label/wx-label.wxml
+0
-51
wx-label.wxss
...emo/page/component/component-pages/wx-label/wx-label.wxss
+0
-9
wx-mask.js
...pp-demo/page/component/component-pages/wx-mask/wx-mask.js
+0
-20
wx-mask.wxml
...-demo/page/component/component-pages/wx-mask/wx-mask.wxml
+0
-30
wx-modal.js
...-demo/page/component/component-pages/wx-modal/wx-modal.js
+0
-26
wx-modal.wxml
...emo/page/component/component-pages/wx-modal/wx-modal.wxml
+0
-22
navigate.js
...o/page/component/component-pages/wx-navigator/navigate.js
+0
-8
navigate.wxml
...page/component/component-pages/wx-navigator/navigate.wxml
+0
-7
redirect.js
...o/page/component/component-pages/wx-navigator/redirect.js
+0
-8
redirect.wxml
...page/component/component-pages/wx-navigator/redirect.wxml
+0
-7
wx-navigator.js
...ge/component/component-pages/wx-navigator/wx-navigator.js
+0
-2
wx-navigator.wxml
.../component/component-pages/wx-navigator/wx-navigator.wxml
+0
-17
wx-navigator.wxss
.../component/component-pages/wx-navigator/wx-navigator.wxss
+0
-7
wx-picker.js
...emo/page/component/component-pages/wx-picker/wx-picker.js
+0
-25
wx-picker.wxml
...o/page/component/component-pages/wx-picker/wx-picker.wxml
+0
-34
wx-picker.wxss
...o/page/component/component-pages/wx-picker/wx-picker.wxss
+0
-5
wx-progress.js
...page/component/component-pages/wx-progress/wx-progress.js
+0
-1
wx-progress.wxml
...ge/component/component-pages/wx-progress/wx-progress.wxml
+0
-15
wx-progress.wxss
...ge/component/component-pages/wx-progress/wx-progress.wxss
+0
-4
wx-radio.js
...-demo/page/component/component-pages/wx-radio/wx-radio.js
+0
-15
wx-radio.wxml
...emo/page/component/component-pages/wx-radio/wx-radio.wxml
+0
-16
wx-radio.wxss
...emo/page/component/component-pages/wx-radio/wx-radio.wxss
+0
-5
wx-scroll-view.js
...omponent/component-pages/wx-scroll-view/wx-scroll-view.js
+0
-36
wx-scroll-view.wxml
...ponent/component-pages/wx-scroll-view/wx-scroll-view.wxml
+0
-32
wx-scroll-view.wxss
...ponent/component-pages/wx-scroll-view/wx-scroll-view.wxss
+0
-12
wx-slide-tab.js
...ge/component/component-pages/wx-slide-tab/wx-slide-tab.js
+0
-12
wx-slide-tab.wxml
.../component/component-pages/wx-slide-tab/wx-slide-tab.wxml
+0
-20
wx-slide-tab.wxss
.../component/component-pages/wx-slide-tab/wx-slide-tab.wxss
+0
-0
wx-slider.js
...emo/page/component/component-pages/wx-slider/wx-slider.js
+0
-10
wx-slider.wxml
...o/page/component/component-pages/wx-slider/wx-slider.wxml
+0
-29
wx-swiper.js
...emo/page/component/component-pages/wx-swiper/wx-swiper.js
+0
-35
wx-swiper.wxml
...o/page/component/component-pages/wx-swiper/wx-swiper.wxml
+0
-27
wx-swiper.wxss
...o/page/component/component-pages/wx-swiper/wx-swiper.wxss
+0
-5
wx-switch.js
...emo/page/component/component-pages/wx-switch/wx-switch.js
+0
-23
wx-switch.wxml
...o/page/component/component-pages/wx-switch/wx-switch.wxml
+0
-14
wx-text.js
...pp-demo/page/component/component-pages/wx-text/wx-text.js
+0
-21
wx-text.wxml
...-demo/page/component/component-pages/wx-text/wx-text.wxml
+0
-16
wx-toast.js
...-demo/page/component/component-pages/wx-toast/wx-toast.js
+0
-19
wx-toast.wxml
...emo/page/component/component-pages/wx-toast/wx-toast.wxml
+0
-29
wx-video.js
...-demo/page/component/component-pages/wx-video/wx-video.js
+0
-23
wx-video.wxml
...emo/page/component/component-pages/wx-video/wx-video.wxml
+0
-18
wx-view.js
...pp-demo/page/component/component-pages/wx-view/wx-view.js
+0
-1
wx-view.wxml
...-demo/page/component/component-pages/wx-view/wx-view.wxml
+0
-81
wx-view.wxss
...-demo/page/component/component-pages/wx-view/wx-view.wxss
+0
-10
index.wxml
02-PG/小程序/weapp-demo/page/component/index.wxml
+0
-172
controller.js
.../page/component/navigation-pages/controller/controller.js
+0
-14
controller.wxml
...age/component/navigation-pages/controller/controller.wxml
+0
-6
form.js
...序/weapp-demo/page/component/navigation-pages/form/form.js
+0
-14
form.wxml
...weapp-demo/page/component/navigation-pages/form/form.wxml
+0
-10
media.js
...weapp-demo/page/component/navigation-pages/media/media.js
+0
-14
media.wxml
...app-demo/page/component/navigation-pages/media/media.wxml
+0
-6
view.js
...序/weapp-demo/page/component/navigation-pages/view/view.js
+0
-13
view.wxml
...weapp-demo/page/component/navigation-pages/view/view.wxml
+0
-10
arrow.png
02-PG/小程序/weapp-demo/page/component/resources/arrow.png
+0
-0
canvas.png
...G/小程序/weapp-demo/page/component/resources/kind/canvas.png
+0
-0
content.png
.../小程序/weapp-demo/page/component/resources/kind/content.png
+0
-0
form.png
02-PG/小程序/weapp-demo/page/component/resources/kind/form.png
+0
-0
interact.png
...小程序/weapp-demo/page/component/resources/kind/interact.png
+0
-0
map.png
02-PG/小程序/weapp-demo/page/component/resources/kind/map.png
+0
-0
media.png
02-PG/小程序/weapp-demo/page/component/resources/kind/media.png
+0
-0
nav.png
02-PG/小程序/weapp-demo/page/component/resources/kind/nav.png
+0
-0
view.png
02-PG/小程序/weapp-demo/page/component/resources/kind/view.png
+0
-0
pic.jpg
02-PG/小程序/weapp-demo/page/component/resources/pic.jpg
+0
-0
hr.js
02-PG/小程序/weapp-demo/page/hr/hr.js
+253
-0
hr.json
02-PG/小程序/weapp-demo/page/hr/hr.json
+4
-0
hr.wxml
02-PG/小程序/weapp-demo/page/hr/hr.wxml
+100
-0
hr.wxss
02-PG/小程序/weapp-demo/page/hr/hr.wxss
+429
-0
my.js
02-PG/小程序/weapp-demo/page/my/my.js
+105
-18
my.wxml
02-PG/小程序/weapp-demo/page/my/my.wxml
+24
-36
my.wxss
02-PG/小程序/weapp-demo/page/my/my.wxss
+110
-3
my_old.wxml
02-PG/小程序/weapp-demo/page/my/my_old.wxml
+44
-0
No files found.
02-PG/小程序/weapp-demo/app.json
View file @
b4714a87
{
"pages"
:
[
"page/component/index"
,
"page/component/navigation-pages/controller/controller"
,
"page/component/navigation-pages/form/form"
,
"page/component/navigation-pages/media/media"
,
"page/component/navigation-pages/view/view"
,
"page/component/component-pages/wx-action-sheet/wx-action-sheet"
,
"page/component/component-pages/wx-audio/wx-audio"
,
"page/component/component-pages/wx-button/wx-button"
,
"page/component/component-pages/wx-checkbox/wx-checkbox"
,
"page/component/component-pages/wx-form/wx-form"
,
"page/component/component-pages/wx-icon/wx-icon"
,
"page/component/component-pages/wx-image/wx-image"
,
"page/component/component-pages/wx-input/wx-input"
,
"page/component/component-pages/wx-mask/wx-mask"
,
"page/component/component-pages/wx-modal/wx-modal"
,
"page/component/component-pages/wx-navigator/wx-navigator"
,
"page/component/component-pages/wx-progress/wx-progress"
,
"page/component/component-pages/wx-radio/wx-radio"
,
"page/component/component-pages/wx-scroll-view/wx-scroll-view"
,
"page/component/component-pages/wx-slider/wx-slider"
,
"page/component/component-pages/wx-switch/wx-switch"
,
"page/component/component-pages/wx-text/wx-text"
,
"page/component/component-pages/wx-toast/wx-toast"
,
"page/component/component-pages/wx-video/wx-video"
,
"page/component/component-pages/wx-view/wx-view"
,
"page/component/component-pages/wx-swiper/wx-swiper"
,
"page/component/component-pages/wx-slide-tab/wx-slide-tab"
,
"page/component/component-pages/wx-label/wx-label"
,
"page/component/component-pages/wx-navigator/navigate"
,
"page/component/component-pages/wx-navigator/redirect"
,
"page/component/component-pages/wx-picker/wx-picker"
,
"page/API/index/index"
,
"page/API/storage/storage"
,
"page/API/login/login"
,
"page/API/get-user-info/get-user-info"
,
"page/API/request-payment/request-payment"
,
"page/API/set-navigation-bar-title/set-navigation-bar-title"
,
"page/API/navigation-bar-loading/navigation-bar-loading"
,
"page/API/navigator/navigator"
,
"page/API/pull-down-refresh/pull-down-refresh"
,
"page/API/animation/animation"
,
"page/API/get-network-type/get-network-type"
,
"page/API/get-system-info/get-system-info"
,
"page/API/on-compass-change/on-compass-change"
,
"page/API/request/request"
,
"page/API/web-socket/web-socket"
,
"page/API/upload-file/upload-file"
,
"page/API/download-file/download-file"
,
"page/API/image/image"
,
"page/API/voice/voice"
,
"page/API/file/file"
,
"page/API/on-accelerometer-change/on-accelerometer-change"
,
"page/API/canvas/canvas"
,
"page/API/background-audio/background-audio"
,
"page/API/get-location/get-location"
,
"page/API/open-location/open-location"
,
"page/resume/resume"
,
"page/resumeOnline/resumeOnline"
,
"page/my/my"
,
"page/job/job"
"page/job/job"
,
"page/hr/hr"
],
"window"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
02-PG/小程序/weapp-demo/page/API/animation/animation.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
onReady
:
function
()
{
this
.
animation
=
wx
.
createAnimation
()
},
rotate
:
function
()
{
this
.
animation
.
rotate
(
Math
.
random
()
*
720
-
360
).
step
()
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
},
scale
:
function
()
{
this
.
animation
.
scale
(
Math
.
random
()
*
2
).
step
()
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
},
translate
:
function
()
{
this
.
animation
.
translate
(
Math
.
random
()
*
100
-
50
,
Math
.
random
()
*
100
-
50
).
step
()
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
},
skew
:
function
()
{
this
.
animation
.
skew
(
Math
.
random
()
*
90
,
Math
.
random
()
*
90
).
step
()
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
},
rotateAndScale
:
function
()
{
this
.
animation
.
rotate
(
Math
.
random
()
*
720
-
360
)
.
scale
(
Math
.
random
()
*
2
)
.
step
()
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
},
rotateThenScale
:
function
()
{
this
.
animation
.
rotate
(
Math
.
random
()
*
720
-
360
).
step
()
.
scale
(
Math
.
random
()
*
2
).
step
()
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
},
all
:
function
()
{
this
.
animation
.
rotate
(
Math
.
random
()
*
720
-
360
)
.
scale
(
Math
.
random
()
*
2
)
.
translate
(
Math
.
random
()
*
100
-
50
,
Math
.
random
()
*
100
-
50
)
.
skew
(
Math
.
random
()
*
90
,
Math
.
random
()
*
90
)
.
step
()
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
},
allInQueue
:
function
()
{
this
.
animation
.
rotate
(
Math
.
random
()
*
720
-
360
).
step
()
.
scale
(
Math
.
random
()
*
2
).
step
()
.
translate
(
Math
.
random
()
*
100
-
50
,
Math
.
random
()
*
100
-
50
).
step
()
.
skew
(
Math
.
random
()
*
90
,
Math
.
random
()
*
90
).
step
()
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
},
reset
:
function
()
{
this
.
animation
.
rotate
(
0
,
0
)
.
scale
(
1
)
.
translate
(
0
,
0
)
.
skew
(
0
,
0
)
.
step
({
duration
:
0
})
this
.
setData
({
animation
:
this
.
animation
.
export
()
})
}
})
02-PG/小程序/weapp-demo/page/API/animation/animation.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"动画"
}
02-PG/小程序/weapp-demo/page/API/animation/animation.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'createAnimation'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="animation-element-wrapper">
<view class="animation-element" animation="{{animation}}"></view>
</view>
<view class="animation-buttons" scroll-y="true">
<button class="animation-button" bindtap="rotate">旋转</button>
<button class="animation-button" bindtap="scale"> 缩放</button>
<button class="animation-button" bindtap="translate">移动</button>
<button class="animation-button" bindtap="skew">倾斜</button>
<button class="animation-button" bindtap="rotateAndScale">旋转并缩放</button>
<button class="animation-button" bindtap="rotateThenScale">旋转后缩放</button>
<button class="animation-button" bindtap="all">同时展示全部</button>
<button class="animation-button" bindtap="allInQueue">顺序展示全部</button>
<button class="animation-button-reset" bindtap="reset">还原</button>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/animation/animation.wxss
deleted
100644 → 0
View file @
c4794b1b
.page-body-wrapper {
flex-grow: 1;
}
.animation-element-wrapper {
display: block;
margin-bottom: 100rpx;
}
.animation-element {
width: 200rpx;
height: 200rpx;
background-color: #1AAD19;
}
.animation-buttons {
padding: 50rpx 50rpx 10rpx;
border-top: 1px solid #ccc;
display: flex;
flex-grow: 1;
overflow-y: scroll;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
height: 400rpx;
box-sizing: border-box;
}
.animation-button {
width: 290rpx;
margin: 20rpx auto;
}
.animation-button-reset {
width: 610rpx;
margin: 20rpx auto;
}
02-PG/小程序/weapp-demo/page/API/background-audio/background-audio.js
deleted
100644 → 0
View file @
c4794b1b
var
util
=
require
(
'
../../../util/util.js
'
)
var
dataUrl
=
'
http://ws.stream.qqmusic.qq.com/C100001wmp4t06stlC.m4a?fromtag=38
'
Page
({
onLoad
:
function
()
{
var
that
=
this
wx
.
onBackgroundAudioStop
(
function
()
{
that
.
setData
({
playing
:
false
,
playTime
:
0
,
formatedPlayTime
:
'
00:00:00
'
})
})
},
data
:
{
playing
:
false
,
playTime
:
0
,
formatedPlayTime
:
'
00:00:00
'
},
play
:
function
(
res
)
{
var
that
=
this
wx
.
playBackgroundAudio
({
dataUrl
:
dataUrl
,
title
:
'
Lost Stars
'
,
coverImgUrl
:
'
http://y.gtimg.cn/music/photo_new/T002R150x150M000000Jhxf24CFL06.jpg?max_age=2592000
'
,
complete
:
function
(
res
)
{
that
.
setData
({
playing
:
true
})
}
})
this
.
_enableInterval
()
},
seek
:
function
(
e
)
{
clearInterval
(
this
.
updateInterval
)
var
that
=
this
wx
.
seekBackgroundAudio
({
position
:
e
.
detail
.
value
,
complete
:
function
()
{
// 实际会延迟两秒左右才跳过去
setTimeout
(
function
()
{
that
.
_enableInterval
()
},
2000
)
}
})
},
pause
:
function
()
{
var
that
=
this
wx
.
pauseBackgroundAudio
({
success
:
function
()
{
that
.
setData
({
playing
:
false
})
}
})
},
stop
:
function
()
{
var
that
=
this
wx
.
stopBackgroundAudio
({
success
:
function
(
res
)
{
that
.
setData
({
playing
:
false
,
playTime
:
0
,
formatedPlayTime
:
util
.
formatTime
(
0
)
})
}
})
},
_enableInterval
:
function
()
{
var
that
=
this
update
()
this
.
updateInterval
=
setInterval
(
update
,
500
)
function
update
()
{
wx
.
getBackgroundAudioPlayerState
({
success
:
function
(
res
)
{
that
.
setData
({
playTime
:
res
.
currentPosition
,
formatedPlayTime
:
util
.
formatTime
(
res
.
currentPosition
+
1
)
})
}
})
}
},
onUnload
:
function
()
{
clearInterval
(
this
.
updateInterval
)
}
})
02-PG/小程序/weapp-demo/page/API/background-audio/background-audio.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"背景音乐"
}
02-PG/小程序/weapp-demo/page/API/background-audio/background-audio.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'backgroundAudio'}}"/>
<view class="page-body-wrapper">
<view class="page-body-info">
<text class="time-big">{{formatedPlayTime}}</text>
<slider class="slider" min="0" max="269" step="1" value="{{playTime}}" bindchange="seek"></slider>
<view class="play-time">
<text>00:00</text>
<text>04:29</text>
</view>
</view>
<text class="page-body-text">离开应用后音乐也可保持播放</text>
<view class="page-body-buttons">
<block wx:if="{{playing === true}}">
<view class="page-body-button" bindtap="stop">
<image src="/image/stop.png"></image>
</view>
<view class="page-body-button" bindtap="pause">
<image src="/image/pause.png"></image>
</view>
</block>
<block wx:if="{{playing === false}}">
<view class="page-body-button"></view>
<view class="page-body-button" bindtap="play">
<image src="/image/play.png"></image>
</view>
</block>
<view class="page-body-button"></view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/background-audio/background-audio.wxss
deleted
100644 → 0
View file @
c4794b1b
.page-body-wrapper {
margin-top: 0;
}
.page-body-info {
padding-bottom: 50rpx;
}
.time-big {
font-size: 60rpx;
margin: 20rpx;
}
.slider {
width: 650rpx;
}
.play-time {
font-size: 28rpx;
width: 700rpx;
padding: 20rpx 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
}
.page-body-buttons {
display: flex;
justify-content: space-around;
margin-top: 100rpx;
}
.page-body-button {
width: 250rpx;
text-align: center;
}
02-PG/小程序/weapp-demo/page/API/canvas/canvas.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
onReady
:
function
()
{
this
.
position
=
{
x
:
150
,
y
:
150
,
vx
:
2
,
vy
:
2
}
this
.
drawBall
()
this
.
interval
=
setInterval
(
this
.
drawBall
,
17
)
},
drawBall
:
function
()
{
var
p
=
this
.
position
p
.
x
+=
p
.
vx
p
.
y
+=
p
.
vy
if
(
p
.
x
>=
300
)
{
p
.
vx
=
-
2
}
if
(
p
.
x
<=
7
)
{
p
.
vx
=
2
}
if
(
p
.
y
>=
300
)
{
p
.
vy
=
-
2
}
if
(
p
.
y
<=
7
)
{
p
.
vy
=
2
}
var
context
=
wx
.
createContext
()
ball
(
p
.
x
,
150
)
ball
(
150
,
p
.
y
)
ball
(
300
-
p
.
x
,
150
)
ball
(
150
,
300
-
p
.
y
)
ball
(
p
.
x
,
p
.
y
)
ball
(
300
-
p
.
x
,
300
-
p
.
y
)
ball
(
p
.
x
,
300
-
p
.
y
)
ball
(
300
-
p
.
x
,
p
.
y
)
wx
.
drawCanvas
({
canvasId
:
'
canvas
'
,
actions
:
context
.
getActions
()
})
function
ball
(
x
,
y
)
{
context
.
beginPath
(
0
)
context
.
arc
(
x
,
y
,
5
,
0
,
Math
.
PI
*
2
)
context
.
setFillStyle
(
'
#1aad19
'
)
context
.
setStrokeStyle
(
'
rgba(1,1,1,0)
'
)
context
.
fill
()
context
.
stroke
()
}
},
onUnload
:
function
()
{
clearInterval
(
this
.
interval
)
}
})
02-PG/小程序/weapp-demo/page/API/canvas/canvas.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"创建画布"
}
02-PG/小程序/weapp-demo/page/API/canvas/canvas.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'createCanvas'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<canvas canvas-id="canvas" class="canvas"></canvas>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/canvas/canvas.wxss
deleted
100644 → 0
View file @
c4794b1b
.canvas {
width: 305px;
height: 305px;
background-color: #fff;
}
02-PG/小程序/weapp-demo/page/API/common/footer.wxml
deleted
100644 → 0
View file @
c4794b1b
<template name="footer">
<view class="page-footer">
微信接口功能
</view>
</template>
02-PG/小程序/weapp-demo/page/API/common/header.wxml
deleted
100644 → 0
View file @
c4794b1b
<template name="header">
<view class="page-header">
<text class="page-header-text">{{title}}</text>
</view>
</template>
02-PG/小程序/weapp-demo/page/API/download-file/download-file.js
deleted
100644 → 0
View file @
c4794b1b
Page
({})
02-PG/小程序/weapp-demo/page/API/download-file/download-file.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"下载文件"
}
02-PG/小程序/weapp-demo/page/API/download-file/download-file.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'downloadFile'}}"/>
<view class="page-body">
<view class="page-body-wording">
<text class="page-body-text">
搭建好自己的后台服务器后,可以将服务器上的图片视频等资源下载到手机上。
</text>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/download-file/download-file.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/file/file.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
tempFilePath
:
''
,
savedFilePath
:
wx
.
getStorageSync
(
'
savedFilePath
'
)
||
''
,
dialog
:
{
hidden
:
true
}
},
chooseImage
:
function
()
{
var
that
=
this
wx
.
chooseImage
({
count
:
1
,
success
:
function
(
res
)
{
that
.
setData
({
tempFilePath
:
res
.
tempFilePaths
[
0
]
})
}
})
},
saveFile
:
function
()
{
if
(
this
.
data
.
tempFilePath
.
length
>
0
)
{
var
that
=
this
wx
.
saveFile
({
tempFilePath
:
this
.
data
.
tempFilePath
,
success
:
function
(
res
)
{
that
.
setData
({
savedFilePath
:
res
.
savedFilePath
})
wx
.
setStorageSync
(
'
savedFilePath
'
,
res
.
savedFilePath
)
that
.
setData
({
dialog
:
{
title
:
'
保存成功
'
,
content
:
'
下次进入应用时,此文件仍可用
'
,
hidden
:
false
}
})
},
fail
:
function
(
res
)
{
that
.
setData
({
dialog
:
{
title
:
'
保存失败
'
,
content
:
'
应该是有 bug 吧
'
,
hidden
:
false
}
})
}
})
}
},
clear
:
function
()
{
wx
.
setStorageSync
(
'
savedFilePath
'
,
''
)
this
.
setData
({
tempFilePath
:
''
,
savedFilePath
:
''
})
},
confirm
:
function
()
{
this
.
setData
({
'
dialog.hidden
'
:
true
})
}
})
02-PG/小程序/weapp-demo/page/API/file/file.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"文件"
}
02-PG/小程序/weapp-demo/page/API/file/file.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'saveFile'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="page-body-info">
<text class="page-body-text-small">请选择图片</text>
<block wx:if="{{tempFilePath != ''}}">
<image src="{{tempFilePath}}" class="image"></image>
</block>
<block wx:if="{{tempFilePath === '' && savedFilePath != ''}}">
<image src="{{savedFilePath}}" class="image"></image>
</block>
<block wx:if="{{tempFilePath === '' && savedFilePath === ''}}">
<image src="/image/plus.png" class="image-plus" bindtap="chooseImage"></image>
</block>
</view>
<view class="page-body-buttons">
<button class="page-body-button" type="primary" bindtap="saveFile">保存文件</button>
<button class="page-body-button" bindtap="clear">删除文件</button>
</view>
</view>
</view>
<modal title="{{dialog.title}}" hidden="{{dialog.hidden}}" no-cancel bindconfirm="confirm">{{dialog.content}}</modal>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/file/file.wxss
deleted
100644 → 0
View file @
c4794b1b
.image {
width: 300rpx;
height: 300rpx;
}
.image-plus {
width: 150rpx;
height: 150rpx;
border: 1px solid #bbb;
}
02-PG/小程序/weapp-demo/page/API/generate.sh
deleted
100644 → 0
View file @
c4794b1b
mkdir
$1
touch
$1
/
$1
.js
touch
$1
/
$1
.wxss
touch
$1
/
$1
.wxml
touch
$1
/
$1
.json
02-PG/小程序/weapp-demo/page/API/get-location/format-location.js
deleted
100644 → 0
View file @
c4794b1b
function
formatLocation
(
longitude
,
latitude
)
{
longitude
=
longitude
.
toFixed
(
2
)
latitude
=
latitude
.
toFixed
(
2
)
return
{
longitude
:
longitude
.
toString
().
split
(
'
.
'
),
latitude
:
latitude
.
toString
().
split
(
'
.
'
)
}
}
module
.
exports
=
formatLocation
02-PG/小程序/weapp-demo/page/API/get-location/get-location.js
deleted
100644 → 0
View file @
c4794b1b
var
formatLocation
=
require
(
'
./format-location.js
'
)
Page
({
data
:
{
hasLocation
:
false
,
},
getLocation
:
function
()
{
var
that
=
this
wx
.
getLocation
({
success
:
function
(
res
)
{
console
.
log
(
res
)
that
.
setData
({
hasLocation
:
true
,
location
:
formatLocation
(
res
.
longitude
,
res
.
latitude
)
})
}
})
},
clear
:
function
()
{
this
.
setData
({
hasLocation
:
false
})
}
})
02-PG/小程序/weapp-demo/page/API/get-location/get-location.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"获取位置"
}
02-PG/小程序/weapp-demo/page/API/get-location/get-location.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'getLocation'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="page-body-info">
<text class="page-body-text-small">当前位置经纬度</text>
<block wx:if="{{hasLocation === false}}">
<text class="page-body-text">未获取</text>
</block>
<block wx:if="{{hasLocation === true}}">
<view class="page-body-text-location">
<text>E{{location.longitude[0]}}°{{location.longitude[1]}}′</text>
<text>N{{location.latitude[0]}}°{{location.latitude[1]}}′</text>
</view>
</block>
</view>
<view class="page-body-buttons">
<button class="page-body-button" type="primary" bindtap="getLocation">获取位置</button>
<button class="page-body-button" bindtap="clear">清空</button>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/get-location/get-location.wxss
deleted
100644 → 0
View file @
c4794b1b
.page-body-text-small {
font-size: 24rpx;
color: #000;
margin-bottom: 100rpx;
}
.page-body-text-location {
display: flex;
font-size: 50rpx;
}
.page-body-text-location text {
margin: 10rpx;
}
02-PG/小程序/weapp-demo/page/API/get-network-type/get-network-type.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
hasNetworkType
:
false
},
getNetworkType
:
function
()
{
var
that
=
this
wx
.
getNetworkType
({
success
:
function
(
res
)
{
console
.
log
(
res
)
that
.
setData
({
hasNetworkType
:
true
,
networkType
:
res
.
subtype
||
res
.
networkType
})
that
.
update
()
}
})
},
clear
:
function
()
{
this
.
setData
({
hasNetworkType
:
false
,
networkType
:
''
})
}
})
02-PG/小程序/weapp-demo/page/API/get-network-type/get-network-type.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"获取手机网络状态"
}
02-PG/小程序/weapp-demo/page/API/get-network-type/get-network-type.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'getNetworkType'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="page-body-info">
<view class="page-body-title">网络状态</view>
<block wx:if="{{hasNetworkType === false}}">
<text class="page-body-text">未获取</text>
<text class="page-body-text">点击绿色按钮可获取网络状态</text>
</block>
<block wx:if="{{hasNetworkType === true}}">
<text class="page-body-text-network-type">{{networkType}}</text>
</block>
</view>
<view class="page-body-buttons">
<button class="page-body-button" type="primary" bindtap="getNetworkType">获取手机网络状态</button>
<button class="page-body-button" bindtap="clear">清空</button>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/get-network-type/get-network-type.wxss
deleted
100644 → 0
View file @
c4794b1b
.page-body-text-network-type {
font-size: 80rpx;
}
02-PG/小程序/weapp-demo/page/API/get-system-info/get-system-info.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
systemInfo
:
{}
},
getSystemInfo
:
function
()
{
var
that
=
this
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
that
.
setData
({
systemInfo
:
res
})
that
.
update
()
}
})
}
})
02-PG/小程序/weapp-demo/page/API/get-system-info/get-system-info.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"获取手机系统信息"
}
02-PG/小程序/weapp-demo/page/API/get-system-info/get-system-info.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'getSystemInfo'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="page-body-form">
<view class="page-body-form-item">
<text class="page-body-form-key">手机型号</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" placeholder="未获取" value="{{systemInfo.model}}"></input>
</view>
<view class="page-body-form-item">
<text class="page-body-form-key">微信语言</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" placeholder="未获取" value="{{systemInfo.language}}"></input>
</view>
<view class="page-body-form-item">
<text class="page-body-form-key">微信版本</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" placeholder="未获取" value="{{systemInfo.version}}"></input>
</view>
<view class="page-body-form-item">
<text class="page-body-form-key">屏幕宽度</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" placeholder="未获取" value="{{systemInfo.windowWidth}}"></input>
</view>
<view class="page-body-form-item">
<text class="page-body-form-key">屏幕高度</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" placeholder="未获取" value="{{systemInfo.windowHeight}}"></input>
</view>
<view class="page-body-form-item">
<text class="page-body-form-key">DPI</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" placeholder="未获取" value="{{systemInfo.pixelRatio}}"></input>
</view>
</view>
<view class="page-body-buttons">
<button class="page-body-button" type="primary" bindtap="getSystemInfo">获取手机系统信息</button>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/get-system-info/get-system-info.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/get-user-info/get-user-info.js
deleted
100644 → 0
View file @
c4794b1b
var
app
=
getApp
()
Page
({
data
:
{
hasUserInfo
:
false
},
getUserInfo
:
function
()
{
var
that
=
this
if
(
app
.
globalData
.
hasLogin
===
false
)
{
wx
.
login
({
success
:
_getUserInfo
})
}
else
{
_getUserInfo
()
}
function
_getUserInfo
()
{
wx
.
getUserInfo
({
success
:
function
(
res
)
{
that
.
setData
({
hasUserInfo
:
true
,
userInfo
:
res
.
userInfo
})
that
.
update
()
}
})
}
},
clear
:
function
()
{
this
.
setData
({
hasUserInfo
:
false
,
userInfo
:
{}
})
}
})
02-PG/小程序/weapp-demo/page/API/get-user-info/get-user-info.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"获取用户信息"
}
02-PG/小程序/weapp-demo/page/API/get-user-info/get-user-info.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'getUserInfo'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="page-body-info">
<view class="page-body-title">用户信息</view>
<block wx:if="{{hasUserInfo === false}}">
<text class="page-body-text">未获取</text>
<text class="page-body-text">点击绿色按钮可获取用户头像及昵称</text>
</block>
<block wx:if="{{hasUserInfo === true}}">
<image class="userinfo-avatar" src="{{userInfo.avatarUrl}}"></image>
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
</block>
</view>
<view class="page-body-buttons">
<button class="page-body-button" type="primary" bindtap="getUserInfo">获取用户信息</button>
<button class="page-body-button" bindtap="clear">清空</button>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/get-user-info/get-user-info.wxss
deleted
100644 → 0
View file @
c4794b1b
.userinfo-avatar {
border-radius: 128rpx;
width: 128rpx;
height: 128rpx;
}
.userinfo-nickname {
margin-top: 20rpx;
font-size: 38rpx;
}
02-PG/小程序/weapp-demo/page/API/image/image.js
deleted
100644 → 0
View file @
c4794b1b
var
sourceType
=
[
[
'
camera
'
],
[
'
album
'
],
[
'
camera
'
,
'
album
'
]
]
var
sizeType
=
[
[
'
compressed
'
],
[
'
original
'
],
[
'
compressed
'
,
'
original
'
]
]
Page
({
data
:
{
sourceTypeIndex
:
0
,
sourceType
:
[
'
拍照
'
,
'
相册
'
,
'
拍照或相册
'
],
sizeTypeIndex
:
0
,
sizeType
:
[
'
压缩
'
,
'
原图
'
,
'
压缩或原图
'
],
countIndex
:
0
,
count
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]
},
sourceTypeChange
:
function
(
e
)
{
this
.
setData
({
sourceTypeIndex
:
e
.
detail
.
value
})
},
sizeTypeChange
:
function
(
e
)
{
this
.
setData
({
sizeTypeIndex
:
e
.
detail
.
value
})
},
countChange
:
function
(
e
)
{
this
.
setData
({
countIndex
:
e
.
detail
.
value
})
},
chooseImage
:
function
()
{
var
that
=
this
wx
.
chooseImage
({
sourceType
:
sourceType
[
this
.
data
.
sourceTypeIndex
],
sizeType
:
sizeType
[
this
.
data
.
sizeTypeIndex
],
count
:
this
.
data
.
count
[
this
.
data
.
countIndex
],
success
:
function
(
res
)
{
console
.
log
(
res
)
that
.
setData
({
imageList
:
res
.
tempFilePaths
})
}
})
},
previewImage
:
function
(
e
)
{
var
current
=
e
.
target
.
dataset
.
src
wx
.
previewImage
({
current
:
current
,
urls
:
this
.
data
.
imageList
})
}
})
02-PG/小程序/weapp-demo/page/API/image/image.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"图片"
}
02-PG/小程序/weapp-demo/page/API/image/image.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'choose/previewImage'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<form bindsubmit="openLocation">
<view class="page-body-form">
<picker range="{{sourceType}}" bindchange="sourceTypeChange" value="{{sourceTypeIndex}}">
<view class="page-body-form-picker">
<view class="page-body-form-picker-key">图片来源</view>
<view class="page-body-form-picker-value">{{sourceType[sourceTypeIndex]}}</view>
</view>
</picker>
<picker range="{{sizeType}}" bindchange="sizeTypeChange" value="{{sizeTypeIndex}}">
<view class="page-body-form-picker">
<view class="page-body-form-picker-key">图片质量</view>
<view class="page-body-form-picker-value">{{sizeType[sizeTypeIndex]}}</view>
</view>
</picker>
<picker range="{{count}}" bindchange="countChange" value="{{countIndex}}">
<view class="page-body-form-picker" style="border-bottom: none;">
<view class="page-body-form-picker-key">数量限制</view>
<view class="page-body-form-picker-value">{{count[countIndex]}}</view>
</view>
</picker>
</view>
<view class="images-wrapper">
<text class="images-text">请选择图片</text>
<view class="images-list">
<block wx:for-items="{{imageList}}" wx:for-item="image">
<image src="{{image}}" class="images-image" data-src="{{image}}" bindtap="previewImage"></image>
</block>
<image src="/image/plus.png" class="images-image images-image-plus" bindtap="chooseImage"></image>
</view>
</view>
</form>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/image/image.wxss
deleted
100644 → 0
View file @
c4794b1b
.images-wrapper {
padding: 20rpx;
background-color: #fff;
margin-top: 20rpx;
}
.images-wrapper-text {
font-size: 28rpx;
}
.images-list {
display: flex;
margin-top: 20rpx;
flex-wrap: wrap;
}
.images-image {
width: 150rpx;
height: 150rpx;
margin: 10rpx;
}
.images-image-plus {
border: 1px solid #999;
}
02-PG/小程序/weapp-demo/page/API/index/index.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
menuList
:
[{
name
:
'
基础能力
'
,
APIList
:
[{
zhName
:
'
微信登录
'
,
enName
:
'
login
'
,
url
:
'
../login/login
'
},
{
zhName
:
'
获取用户信息
'
,
enName
:
'
getUserInfo
'
,
url
:
'
../get-user-info/get-user-info
'
},
{
zhName
:
'
发起支付
'
,
enName
:
'
RequestPayment
'
,
url
:
'
../request-payment/request-payment
'
}],
opened
:
false
},
{
name
:
'
界面跳转、监听和加载
'
,
opened
:
false
,
APIList
:
[{
zhName
:
'
设置界面标题
'
,
enName
:
'
setNavigationBarTitle
'
,
url
:
'
../set-navigation-bar-title/set-navigation-bar-title
'
},
{
zhName
:
'
标题栏加载动画
'
,
enName
:
'
navigationBarLoading
'
,
url
:
'
../navigation-bar-loading/navigation-bar-loading
'
},
{
zhName
:
'
页面跳转
'
,
enName
:
'
navigateTo, navigateBack, redirectTo
'
,
url
:
'
../navigator/navigator
'
},
{
zhName
:
'
下拉刷新
'
,
enName
:
'
pullDownRefresh
'
,
url
:
'
../pull-down-refresh/pull-down-refresh
'
},
{
zhName
:
'
创建动画
'
,
enName
:
'
createAnimation
'
,
url
:
'
../animation/animation
'
},
{
zhName
:
'
创建绘画
'
,
enName
:
'
createContext
'
,
url
:
'
../canvas/canvas
'
}]
},
{
name
:
'
设备相关
'
,
opened
:
false
,
APIList
:
[{
zhName
:
'
获取手机网络状态
'
,
enName
:
'
getNetworkType
'
,
url
:
'
../get-network-type/get-network-type
'
},
{
zhName
:
'
获取手机系统信息
'
,
enName
:
'
getSystemInfo
'
,
url
:
'
../get-system-info/get-system-info
'
},
{
zhName
:
'
监听重力感应数据
'
,
enName
:
'
onAccelerometerChange
'
,
url
:
'
../on-accelerometer-change/on-accelerometer-change
'
},
{
zhName
:
'
监听罗盘数据
'
,
enName
:
'
onCompassChange
'
,
url
:
'
../on-compass-change/on-compass-change
'
}]
},
{
name
:
'
网络相关
'
,
opened
:
false
,
APIList
:
[{
zhName
:
'
发起一个请求
'
,
enName
:
'
request
'
,
url
:
'
../request/request
'
},
{
zhName
:
'
Web Socket
'
,
enName
:
'
Web Socket
'
,
url
:
'
../web-socket/web-socket
'
},
{
zhName
:
'
上传文件
'
,
enName
:
'
Upload File
'
,
url
:
'
../upload-file/upload-file
'
},
{
zhName
:
'
下载文件
'
,
enName
:
'
Download File
'
,
url
:
'
../download-file/download-file
'
}]
},
{
name
:
'
多媒体
'
,
opened
:
false
,
APIList
:
[{
zhName
:
'
图片
'
,
enName
:
'
chooseImage/previewImage
'
,
url
:
'
../image/image
'
},
{
zhName
:
'
录音
'
,
enName
:
'
start/stopRecord, play/pause/stopVoice
'
,
url
:
'
../voice/voice
'
},
{
zhName
:
'
背景音频
'
,
enName
:
'
play/pause/stopAudio
'
,
url
:
'
../background-audio/background-audio
'
},
{
zhName
:
'
文件
'
,
enName
:
'
saveFile
'
,
url
:
'
../file/file
'
}]
},
{
name
:
'
数据
'
,
opened
:
false
,
url
:
'
../storage/storage
'
},
{
name
:
'
地理位置
'
,
opened
:
false
,
APIList
:
[{
zhName
:
'
获取当前位置
'
,
enName
:
'
getLocation
'
,
url
:
'
../get-location/get-location
'
},
{
zhName
:
'
使用原生地图查看位置
'
,
enName
:
'
openLocation
'
,
url
:
'
../open-location/open-location
'
}]
}]
},
tapMenuItem
:
function
(
e
)
{
var
menuItem
=
this
.
data
.
menuList
[
parseInt
(
e
.
currentTarget
.
id
)]
if
(
menuItem
.
url
)
{
wx
.
navigateTo
({
url
:
menuItem
.
url
})
}
else
{
var
changeData
=
{}
var
opened
=
menuItem
.
opened
changeData
[
'
menuList[
'
+
e
.
currentTarget
.
id
+
'
].opened
'
]
=
!
opened
this
.
setData
(
changeData
)
}
}
})
02-PG/小程序/weapp-demo/page/API/index/index.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="container">
<view class="header">
<view class="title">小程序接口</view>
<view class="desc">为便于开发者直观了解小程序接口能力,该小程序就当前已支持的接口能力进行演示。</view>
</view>
<view class="menu-list">
<block wx:for-items="{{menuList}}" wx:for-item="menuItem">
<view class="menu-item">
<view class="menu-item-main" id="{{index}}" bindtap="tapMenuItem">
<text class="menu-item-name">{{menuItem.name}}</text>
<image
class="menu-item-arrow {{menuItem.opened ? 'open' : 'close'}} {{menuItem.url ? 'url' : ''}}"
src="/image/arrowright.png">
</image>
</view>
<view class="menu-item-api-list {{menuItem.opened ? 'open' : 'close'}}">
<block wx:for-items="{{menuItem.APIList}}" wx:for-item="APIItem">
<navigator url="{{APIItem.url}}">
<view class="menu-item-api-item" style="{{index === 0 ? 'border-top:none;' : ''}}">
<view class="menu-item-api-item-text">
<text class="menu-item-api-item-text-zhname">{{APIItem.zhName}}</text>
<text class="menu-item-api-item-text-enname">{{APIItem.enName}}</text>
</view>
<image class="menu-item-api-item-arrow" src="/image/arrowright.png"></image>
</view>
</navigator>
</block>
</view>
</view>
</block>
</view>
</view>
02-PG/小程序/weapp-demo/page/API/index/index.wxss
deleted
100644 → 0
View file @
c4794b1b
.header {
padding: 40px;
}
.title {
font-size: 30px;
}
.desc {
margin-top: 5px;
color: #888888;
font-size: 14px;
line-height: 1.4;
}
.menu-list {
display: flex;
flex-direction: column;
background-color: #fbf9fe;
}
.menu-item {
color: #000000;
display: flex;
background-color: #fff;
margin: 10rpx 40rpx;
flex-direction: column;
}
.menu-item-main {
display: flex;
height: 100rpx;
padding: 20rpx;
border-radius: 10rpx;
align-items: center;
font-size: 32rpx;
justify-content: space-between;
}
.menu-item-arrow {
width: 32rpx;
height: 32rpx;
transition: 400ms;
}
.menu-item-arrow.open {
transform: rotate(-90deg);
}
.menu-item-arrow.close {
transform: rotate(90deg);
}
.menu-item-arrow.url {
transform: rotate(0deg);
}
.menu-item-api-list {
transition: 200ms;
height: auto;
border-top: 1px solid #d8d8d8;
}
.menu-item-api-list.close {
display: none;
height: 0;
}
.menu-item-api-item {
display: flex;
justify-content: space-between;
height: 80rpx;
padding: 20rpx 20rpx 20rpx 0;
margin-left: 20rpx;
align-items: center;
border-top: 1px solid #f0f0f0;
}
.menu-item-api-item-text {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}
.menu-item-api-item-text-zhname {
font-size: 30rpx;
}
.menu-item-api-item-text-enname {
font-size: 26rpx;
color: #6b6b6b;
}
.menu-item-api-item-arrow {
width: 32rpx;
height: 32rpx;
}
02-PG/小程序/weapp-demo/page/API/login/login.js
deleted
100644 → 0
View file @
c4794b1b
var
app
=
getApp
()
Page
({
onLoad
:
function
()
{
this
.
setData
({
hasLogin
:
app
.
globalData
.
hasLogin
})
},
data
:
{},
login
:
function
()
{
var
that
=
this
wx
.
login
({
success
:
function
(
res
)
{
app
.
globalData
.
hasLogin
=
true
that
.
setData
({
hasLogin
:
true
})
that
.
update
()
}
})
}
})
02-PG/小程序/weapp-demo/page/API/login/login.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"微信登录"
}
02-PG/小程序/weapp-demo/page/API/login/login.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'Login'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<block wx:if="{{hasLogin === true}}">
<text class="page-body-title">已登录</text>
<text class="page-body-text">每个微信号中仅需登录 1 次,后续每次进入页面即可根据微信 id 自动拉取用户信息</text>
</block>
<block wx:if="{{hasLogin === false}}">
<text class="page-body-text">每个微信号中仅需登录一次</text>
<button class="page-body-button" type="primary" bindtap="login">微信登录</button>
</block>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/login/login.wxss
deleted
100644 → 0
View file @
c4794b1b
.page-body-wrapper {
margin-top: 200rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
padding: 0 50rpx;
box-sizing: border-box;
}
.page-body-title {
font-size: 60rpx;
/*TODO 使用 rpx */
line-height: 100px;
}
.page-body-text {
color: #bbb;
font-size: 28rpx;
/*TODO 使用 rpx */
line-height: 20px;
margin: 0 0 100rpx 0;
text-align: center;
}
.page-body-button {
width: 100%;
}
02-PG/小程序/weapp-demo/page/API/navigation-bar-loading/navigation-bar-loading.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
showNavigationBarLoading
:
function
()
{
wx
.
showNavigationBarLoading
()
},
hideNavigationBarLoading
:
function
()
{
wx
.
hideNavigationBarLoading
()
}
})
02-PG/小程序/weapp-demo/page/API/navigation-bar-loading/navigation-bar-loading.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"标题栏加载动画"
}
02-PG/小程序/weapp-demo/page/API/navigation-bar-loading/navigation-bar-loading.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'navigationBarLoading'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="page-body-buttons">
<button class="page-body-button" type="primary" bindtap="showNavigationBarLoading">显示加载动画</button>
<button class="page-body-button" bindtap="hideNavigationBarLoading">隐藏加载动画</button>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/navigation-bar-loading/navigation-bar-loading.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/navigator/navigator.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
navigateTo
:
function
()
{
wx
.
navigateTo
({
url
:
'
./navigator
'
})
},
navigateBack
:
function
()
{
wx
.
navigateBack
()
},
redirectTo
:
function
()
{
wx
.
redirectTo
({
url
:
'
./navigator
'
})
}
})
02-PG/小程序/weapp-demo/page/API/navigator/navigator.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"页面跳转"
}
02-PG/小程序/weapp-demo/page/API/navigator/navigator.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'navigateTo/Back, redirectTo'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="page-body-buttons">
<button class="page-body-button" bindtap="navigateTo">跳转新页面</button>
<button class="page-body-button" bindtap="navigateBack">返回上一页</button>
<button class="page-body-button" bindtap="redirectTo">在当前页面打开</button>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/navigator/navigator.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/on-accelerometer-change/on-accelerometer-change.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
onReady
:
function
()
{
this
.
drawBigBall
()
var
that
=
this
this
.
position
=
{
x
:
151
,
y
:
151
,
vx
:
0
,
vy
:
0
,
ax
:
0
,
ay
:
0
}
wx
.
onAccelerometerChange
(
function
(
res
)
{
that
.
setData
({
x
:
res
.
x
.
toFixed
(
2
),
y
:
res
.
y
.
toFixed
(
2
),
z
:
res
.
z
.
toFixed
(
2
)
})
that
.
position
.
ax
=
Math
.
sin
(
res
.
x
*
Math
.
PI
/
2
)
that
.
position
.
ay
=
-
Math
.
sin
(
res
.
y
*
Math
.
PI
/
2
)
//that.drawSmallBall()
})
this
.
interval
=
setInterval
(
function
()
{
that
.
drawSmallBall
()
},
17
)
},
drawBigBall
:
function
()
{
var
context
=
wx
.
createContext
()
context
.
beginPath
(
0
)
context
.
arc
(
151
,
151
,
140
,
0
,
Math
.
PI
*
2
)
context
.
setFillStyle
(
'
#ffffff
'
)
context
.
setStrokeStyle
(
'
#aaaaaa
'
)
context
.
fill
()
context
.
stroke
()
wx
.
drawCanvas
({
canvasId
:
'
big-ball
'
,
actions
:
context
.
getActions
()
})
},
drawSmallBall
:
function
()
{
var
p
=
this
.
position
var
strokeStyle
=
'
rgba(1,1,1,0)
'
p
.
x
=
p
.
x
+
p
.
vx
p
.
y
=
p
.
y
+
p
.
vy
p
.
vx
=
p
.
vx
+
p
.
ax
p
.
vy
=
p
.
vy
+
p
.
ay
if
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
abs
(
p
.
x
)
-
151
,
2
)
+
Math
.
pow
(
Math
.
abs
(
p
.
y
)
-
151
,
2
))
>=
115
)
{
if
(
p
.
x
>
151
&&
p
.
vx
>
0
)
{
p
.
vx
=
0
}
if
(
p
.
x
<
151
&&
p
.
vx
<
0
)
{
p
.
vx
=
0
}
if
(
p
.
y
>
151
&&
p
.
vy
>
0
)
{
p
.
vy
=
0
}
if
(
p
.
y
<
151
&&
p
.
vy
<
0
)
{
p
.
vy
=
0
}
strokeStyle
=
'
#ff0000
'
}
var
context
=
wx
.
createContext
()
context
.
beginPath
(
0
)
context
.
arc
(
p
.
x
,
p
.
y
,
15
,
0
,
Math
.
PI
*
2
)
context
.
setFillStyle
(
'
#1aad19
'
)
context
.
setStrokeStyle
(
strokeStyle
)
context
.
fill
()
context
.
stroke
()
wx
.
drawCanvas
({
canvasId
:
'
small-ball
'
,
actions
:
context
.
getActions
()
})
},
data
:
{
x
:
0
,
y
:
0
,
z
:
0
},
onUnload
:
function
()
{
clearInterval
(
this
.
interval
)
}
})
02-PG/小程序/weapp-demo/page/API/on-accelerometer-change/on-accelerometer-change.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"监听重力感应数据"
}
02-PG/小程序/weapp-demo/page/API/on-accelerometer-change/on-accelerometer-change.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'onAccelerometerChange'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<text class="page-body-text">旋转手机即可移动以下小球</text>
<view class="page-body-canvas">
<canvas class="page-body-ball" show="{{true}}" canvas-id="big-ball"></canvas>
<canvas class="page-body-ball" show="{{true}}" canvas-id="small-ball"></canvas>
</view>
<view class="page-body-xyz">
<text class="page-body-title">X: {{x}}</text>
<text class="page-body-title">Y: {{y}}</text>
<text class="page-body-title">Z: {{z}}</text>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/on-accelerometer-change/on-accelerometer-change.wxss
deleted
100644 → 0
View file @
c4794b1b
.page-body-xyz {
display: flex;
justify-content: space-around;
width: 700rpx;
margin-top: 50rpx;
box-sizing: border-box;
}
.page-body-canvas {
width: 302px;
height: 302px;
position: relative;
}
.page-body-ball {
position: absolute;
top: 0;
left: 0;
width: 302px;
height: 302px;
}
.page-body-title {
font-size: 50rpx;
width: 250rpx;
}
02-PG/小程序/weapp-demo/page/API/on-compass-change/on-compass-change.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
direction
:
0
},
onReady
:
function
()
{
var
that
=
this
wx
.
onCompassChange
(
function
(
res
)
{
that
.
setData
({
direction
:
parseInt
(
res
.
direction
)
})
})
}
})
02-PG/小程序/weapp-demo/page/API/on-compass-change/on-compass-change.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"监听罗盘数据"
}
02-PG/小程序/weapp-demo/page/API/on-compass-change/on-compass-change.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'onCompassChange'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<text class="page-body-text">选中手机即可获取方位信息</text>
<view class="direction">
<text class="direction-value">{{direction}}</text>
<text class="direction-degree">o</text>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/on-compass-change/on-compass-change.wxss
deleted
100644 → 0
View file @
c4794b1b
.direction {
margin-top: 100rpx;
display: flex;
}
.direction-value {
font-size: 200rpx;
}
.direction-degree {
font-size: 40rpx;
}
02-PG/小程序/weapp-demo/page/API/open-location/open-location.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
openLocation
:
function
(
e
)
{
console
.
log
(
e
)
var
value
=
e
.
detail
.
value
console
.
log
(
value
)
wx
.
openLocation
({
longitude
:
Number
(
value
.
longitude
),
latitude
:
Number
(
value
.
latitude
),
name
:
value
.
name
,
address
:
value
.
address
})
}
})
02-PG/小程序/weapp-demo/page/API/open-location/open-location.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"查看位置"
}
02-PG/小程序/weapp-demo/page/API/open-location/open-location.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'openLocation'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<form bindsubmit="openLocation">
<view class="page-body-form">
<view class="page-body-form-item">
<text class="page-body-form-key">经度</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" value="113.324520" name="longitude"></input>
</view>
<view class="page-body-form-item">
<text class="page-body-form-key">纬度</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" value="23.099994" name="latitude"></input>
</view>
<view class="page-body-form-item">
<text class="page-body-form-key">位置名称</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" value="T.I.T 创意园" name="name"></input>
</view>
<view class="page-body-form-item" style="border-bottom: none;">
<text class="page-body-form-key">详细位置</text>
<input class="page-body-form-value" type="text" disabled="{{true}}" value="广州市海珠区新港中路397号" name="address"></input>
</view>
</view>
<view class="page-body-buttons">
<button class="page-body-button" type="primary" formType="submit">查看位置</button>
</view>
</form>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/open-location/open-location.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/pull-down-refresh/pull-down-refresh.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
onPullDownRefresh
:
function
()
{
console
.
log
(
'
onPullDownRefresh
'
,
new
Date
())
},
stopPullDownRefresh
:
function
()
{
wx
.
stopPullDownRefresh
({
complete
:
function
(
res
)
{
console
.
log
(
res
,
new
Date
())
}
})
}
})
02-PG/小程序/weapp-demo/page/API/pull-down-refresh/pull-down-refresh.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"下拉刷新"
,
"enablePullDownRefresh"
:
true
}
02-PG/小程序/weapp-demo/page/API/pull-down-refresh/pull-down-refresh.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'on/stopPullDownRefresh'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<view class="page-body-info">
<text class="page-body-text">下滑页面即可刷新</text>
</view>
<view class="page-body-buttons">
<button bindtap="stopPullDownRefresh">停止刷新</button>
</view>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/pull-down-refresh/pull-down-refresh.wxss
deleted
100644 → 0
View file @
c4794b1b
.page-body-info {
background-color: transparent;
}
.page-body-buttons button {
color: #21c932;
margin: 0 100rpx;
}
.page-body-buttons button:after {
border-color: #21c932;
}
02-PG/小程序/weapp-demo/page/API/request-payment/request-payment.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
})
02-PG/小程序/weapp-demo/page/API/request-payment/request-payment.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"发起支付"
}
02-PG/小程序/weapp-demo/page/API/request-payment/request-payment.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'requestPayment'}}"/>
<view class="page-body">
<view class="page-body-wording">
<text class="page-body-text">
自主接入微信支付后,可以让用户在页面上快捷完成下单购买。
</text>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/request-payment/request-payment.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/request/request.js
deleted
100644 → 0
View file @
c4794b1b
Page
({})
02-PG/小程序/weapp-demo/page/API/request/request.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"网络请求"
}
02-PG/小程序/weapp-demo/page/API/request/request.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'request'}}"/>
<view class="page-body">
<view class="page-body-wording">
<text class="page-body-text">
搭建好自己的后台服务器后,可以跟服务器互通数据,为用户提供个性化服务。
</text>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/request/request.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/set-navigation-bar-title/set-navigation-bar-title.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
setNaivgationBarTitle
:
function
(
e
)
{
var
title
=
e
.
detail
.
value
.
title
console
.
log
(
title
)
wx
.
setNavigationBarTitle
({
title
:
title
})
}
})
02-PG/小程序/weapp-demo/page/API/set-navigation-bar-title/set-navigation-bar-title.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"设置页面标题"
}
02-PG/小程序/weapp-demo/page/API/set-navigation-bar-title/set-navigation-bar-title.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'setNaivgationBarTitle'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<form bindsubmit="setNaivgationBarTitle">
<view class="page-body-form">
<view class="page-body-form-item" style="border-bottom: none;">
<text class="page-body-form-key">页面标题</text>
<input class="page-body-form-value" type="text" placeholder="请输入页面标题并点击设置即可" name="title"></input>
</view>
</view>
<view class="page-body-buttons">
<button class="page-body-button" type="primary" formType="submit">设置</button>
</view>
</form>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/set-navigation-bar-title/set-navigation-bar-title.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/storage/storage.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
toast
:
{
hidden
:
true
}
},
submitForm
:
function
(
e
)
{
var
type
=
e
.
detail
.
target
.
id
var
key
=
e
.
detail
.
value
.
key
var
data
=
e
.
detail
.
value
.
data
if
(
key
.
length
===
0
&&
type
!==
'
clear
'
)
{
this
.
setData
({
key
:
key
,
data
:
data
,
'
toast.hidden
'
:
false
,
'
toast.content
'
:
'
key 不能为空
'
})
}
else
if
(
type
===
'
get
'
&&
key
.
length
>
0
)
{
this
.
setData
({
key
:
key
,
data
:
wx
.
getStorageSync
(
key
),
'
toast.hidden
'
:
false
,
'
toast.content
'
:
'
读取数据成功
'
})
}
else
if
(
type
===
'
set
'
&&
key
.
length
>
0
)
{
wx
.
setStorageSync
(
key
,
data
)
this
.
setData
({
key
:
key
,
data
:
data
,
'
toast.hidden
'
:
false
,
'
toast.content
'
:
'
存储数据成功
'
})
}
else
if
(
type
===
'
clear
'
)
{
wx
.
clearStorageSync
()
this
.
setData
({
key
:
''
,
data
:
''
,
'
toast.hidden
'
:
false
,
'
toast.content
'
:
'
清除数据成功
'
})
}
},
toastChange
:
function
()
{
this
.
setData
({
'
toast.hidden
'
:
true
})
}
})
02-PG/小程序/weapp-demo/page/API/storage/storage.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"数据存储"
}
02-PG/小程序/weapp-demo/page/API/storage/storage.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'get/set/clearStorage'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<form bindsubmit="submitForm" id="123">
<view class="page-body-form">
<view class="page-body-form-item" style="border-bottom: none;">
<input class="page-body-form-key" type="text" placeholder="key" name="key" value="{{key}}"></input>
<input class="page-body-form-value" type="text" placeholder="data" name="data" value="{{data}}"></input>
</view>
</view>
<view class="page-body-buttons">
<button class="page-body-button" type="primary" id="get" formType="submit">读取数据</button>
<button class="page-body-button" id="set" formType="submit">存储数据</button>
<button class="page-body-button" id="clear" formType="submit">清理数据</button>
</view>
</form>
</view>
</view>
<toast hidden="{{toast.hidden}}" bindchange="toastChange">{{toast.content}}</toast>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/storage/storage.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/upload-file/upload-file.js
deleted
100644 → 0
View file @
c4794b1b
Page
({})
02-PG/小程序/weapp-demo/page/API/upload-file/upload-file.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"上传文件"
}
02-PG/小程序/weapp-demo/page/API/upload-file/upload-file.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'uploadFile'}}"/>
<view class="page-body">
<view class="page-body-wording">
<text class="page-body-text">
搭建好自己的后台服务器后,可以将手机上的图片视频等资源上传到服务器上。
</text>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/upload-file/upload-file.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/API/voice/voice.js
deleted
100644 → 0
View file @
c4794b1b
var
util
=
require
(
'
../../../util/util.js
'
)
var
playTimeInterval
Page
({
data
:
{
recording
:
false
,
playing
:
false
,
hasRecord
:
false
,
recordTime
:
0
,
playTime
:
0
,
formatedRecordTime
:
'
00:00:00
'
,
formatedPlayTime
:
'
00:00:00
'
},
startRecord
:
function
()
{
this
.
setData
({
recording
:
true
})
var
that
=
this
var
interval
=
setInterval
(
function
()
{
that
.
data
.
recordTime
+=
1
that
.
setData
({
formatedRecordTime
:
util
.
formatTime
(
that
.
data
.
recordTime
)
})
},
1000
)
wx
.
startRecord
({
success
:
function
(
res
)
{
that
.
setData
({
hasRecord
:
true
,
tempFilePath
:
res
.
tempFilePath
,
formatedPlayTime
:
util
.
formatTime
(
that
.
data
.
playTime
)
})
},
complete
:
function
()
{
that
.
setData
({
recording
:
false
})
clearInterval
(
interval
)
}
})
},
stopRecord
:
function
()
{
wx
.
stopRecord
()
},
playVoice
:
function
()
{
var
that
=
this
playTimeInterval
=
setInterval
(
function
()
{
that
.
data
.
playTime
+=
1
that
.
setData
({
playing
:
true
,
formatedPlayTime
:
util
.
formatTime
(
that
.
data
.
playTime
)
})
},
1000
)
wx
.
playVoice
({
filePath
:
this
.
data
.
tempFilePath
,
success
:
function
()
{
clearInterval
(
playTimeInterval
)
that
.
data
.
playTime
=
0
that
.
setData
({
playing
:
false
,
formatedPlayTime
:
util
.
formatTime
(
that
.
data
.
playTime
)
})
}
})
},
pauseVoice
:
function
()
{
clearInterval
(
playTimeInterval
)
wx
.
pauseVoice
()
this
.
setData
({
playing
:
false
})
},
stopVoice
:
function
()
{
clearInterval
(
playTimeInterval
)
this
.
data
.
playTime
=
0
this
.
setData
({
playing
:
false
,
formatedPlayTime
:
util
.
formatTime
(
this
.
data
.
playTime
)
})
wx
.
stopVoice
()
},
clear
:
function
()
{
this
.
data
.
recordTime
=
0
this
.
data
.
playTime
=
0
this
.
setData
({
hasRecord
:
false
,
tempFilePath
:
''
,
formatedRecordTime
:
util
.
formatTime
(
0
)
})
}
})
02-PG/小程序/weapp-demo/page/API/voice/voice.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"录音"
}
02-PG/小程序/weapp-demo/page/API/voice/voice.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'start/stopRecord、play/pause/stopVoice'}}"/>
<view class="page-body">
<view class="page-body-wrapper">
<block wx:if="{{recording === false && playing === false && hasRecord === false}}">
<view class="page-body-time">
<text class="time-big">{{formatedRecordTime}}</text>
</view>
<view class="page-body-buttons">
<view class="page-body-button"></view>
<view class="page-body-button" bindtap="startRecord">
<image src="/image/record.png"></image>
</view>
<view class="page-body-button"></view>
</view>
</block>
<block wx:if="{{recording === true}}">
<view class="page-body-time">
<text class="time-big">{{formatedRecordTime}}</text>
</view>
<view class="page-body-buttons">
<view class="page-body-button"></view>
<view class="page-body-button" bindtap="stopRecord">
<view class="button-stop-record"></view>
</view>
<view class="page-body-button"></view>
</view>
</block>
<block wx:if="{{hasRecord === true && playing === false}}">
<view class="page-body-time">
<text class="time-big">{{formatedPlayTime}}</text>
<text class="time-small">{{formatedRecordTime}}</text>
</view>
<view class="page-body-buttons">
<view class="page-body-button"></view>
<view class="page-body-button" bindtap="playVoice">
<image src="/image/play.png"></image>
</view>
<view class="page-body-button" bindtap="clear">
<image src="/image/trash.png"></image>
</view>
</view>
</block>
<block wx:if="{{hasRecord === true && playing === true}}">
<view class="page-body-time">
<text class="time-big">{{formatedPlayTime}}</text>
<text class="time-small">{{formatedRecordTime}}</text>
</view>
<view class="page-body-buttons">
<view class="page-body-button" bindtap="stopVoice">
<image src="/image/stop.png"></image>
</view>
<view class="page-body-button" bindtap="pauseVoice">
<image src="/image/pause.png"></image>
</view>
<view class="page-body-button" bindtap="clear">
<image src="/image/trash.png"></image>
</view>
</view>
</block>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/voice/voice.wxss
deleted
100644 → 0
View file @
c4794b1b
.page-body-wrapper {
justify-content: space-between;
flex-grow: 1;
margin-bottom: 300rpx;
}
.page-body-time {
display: flex;
flex-direction: column;
align-items: center;
}
.time-big {
font-size: 60rpx;
margin: 20rpx;
}
.time-small {
font-size: 30rpx;
}
.page-body-buttons {
display: flex;
justify-content: space-around;
}
.page-body-button {
width: 250rpx;
text-align: center;
}
.button-stop-record {
width: 110rpx;
height: 110rpx;
border: 20rpx solid #fff;
background-color: #f55c23;
border-radius: 130rpx;
margin: 0 auto;
}
02-PG/小程序/weapp-demo/page/API/web-socket/web-socket.js
deleted
100644 → 0
View file @
c4794b1b
Page
({})
02-PG/小程序/weapp-demo/page/API/web-socket/web-socket.json
deleted
100644 → 0
View file @
c4794b1b
{
"navigationBarTitleText"
:
"Web Socket"
}
02-PG/小程序/weapp-demo/page/API/web-socket/web-socket.wxml
deleted
100644 → 0
View file @
c4794b1b
<import src="../common/header.wxml" />
<import src="../common/footer.wxml" />
<view class="container">
<template is="header" data="{{title: 'WebSocket'}}"/>
<view class="page-body">
<view class="page-body-wording">
<text class="page-body-text">
搭建好自己的后台服务器后,可以跟服务器建立持久连接,实现即时聊天等功能。
</text>
</view>
</view>
<template is="footer" />
</view>
02-PG/小程序/weapp-demo/page/API/web-socket/web-socket.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/component/component-pages/wx-action-sheet/wx-action-sheet.js
deleted
100644 → 0
View file @
c4794b1b
var
items
=
[
'
item1
'
,
'
item2
'
,
'
item3
'
,
'
item4
'
]
var
pageObject
=
{
data
:
{
actionSheetHidden
:
true
,
actionSheetItems
:
items
},
actionSheetTap
:
function
(
e
)
{
this
.
setData
({
actionSheetHidden
:
!
this
.
data
.
actionSheetHidden
})
},
actionSheetChange
:
function
(
e
)
{
this
.
setData
({
actionSheetHidden
:
!
this
.
data
.
actionSheetHidden
})
}
}
for
(
var
i
=
0
;
i
<
items
.
length
;
++
i
)
{
(
function
(
itemName
)
{
pageObject
[
'
bind
'
+
itemName
]
=
function
(
e
)
{
console
.
log
(
'
click
'
+
itemName
,
e
)
}
})(
items
[
i
])
}
Page
(
pageObject
)
02-PG/小程序/weapp-demo/page/component/component-pages/wx-action-sheet/wx-action-sheet.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">action-sheet</text>
<text class="page__desc">action-sheet</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<button type="default" bindtap="actionSheetTap">弹出action sheet</button>
<action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange">
<block wx:for-items="{{actionSheetItems}}">
<action-sheet-item class="item" bindtap="bind{{item}}">{{item}}</action-sheet-item>
</block>
<action-sheet-cancel class="cancel">取消</action-sheet-cancel>
</action-sheet>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-action-sheet/wx-action-sheet.wxss
deleted
100644 → 0
View file @
c4794b1b
/*
.cancel {
color: white;
background: #303F9F;
}
.item {
color: black;
background: #C5CAE9;
}*/
02-PG/小程序/weapp-demo/page/component/component-pages/wx-audio/wx-audio.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
audioAction
:
{
method
:
'
pause
'
}
},
audioPlayed
:
function
(
e
)
{
console
.
log
(
'
audio is played
'
)
}
})
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-audio/wx-audio.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">audio</text>
<text class="page__desc">音频</text>
</view>
<view class="page__bd">
<view class="section tc">
<audio src="http://5.1015600.com/2014/ring/000/118/28b0e17cfab0136677648b39cb8b7fbc.mp3" action="{{audioAction}}" bindplay="audioPlayed" controls></audio>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-button/wx-button.js
deleted
100644 → 0
View file @
c4794b1b
var
types
=
[
'
default
'
,
'
primary
'
,
'
warn
'
]
var
pageObject
=
{
data
:
{
defaultSize
:
'
default
'
,
primarySize
:
'
default
'
,
warnSize
:
'
default
'
,
disabled
:
false
,
plain
:
false
,
loading
:
false
},
setDisabled
:
function
(
e
)
{
this
.
setData
({
disabled
:
!
this
.
data
.
disabled
})
},
setPlain
:
function
(
e
)
{
this
.
setData
({
plain
:
!
this
.
data
.
plain
})
},
setLoading
:
function
(
e
)
{
this
.
setData
({
loading
:
!
this
.
data
.
loading
})
}
}
for
(
var
i
=
0
;
i
<
types
.
length
;
++
i
)
{
(
function
(
type
)
{
pageObject
[
type
]
=
function
(
e
)
{
var
key
=
type
+
'
Size
'
var
changedData
=
{}
changedData
[
key
]
=
this
.
data
[
key
]
===
'
default
'
?
'
mini
'
:
'
default
'
this
.
setData
(
changedData
)
}
})(
types
[
i
])
}
Page
(
pageObject
)
02-PG/小程序/weapp-demo/page/component/component-pages/wx-button/wx-button.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">button</text>
<text class="page__desc">按钮</text>
</view>
<view class="page__bd">
<view class="btn-area" id="buttonContainer">
<view class="button-wrapper">
<button type="default" size="{{defaultSize}}" loading="{{loading}}" plain="{{plain}}"
disabled="{{disabled}}" bindtap="default"> default
</button>
</view>
<view class="button-wrapper">
<button type="primary" size="{{primarySize}}" loading="{{loading}}" plain="{{plain}}"
disabled="{{disabled}}" bindtap="primary"> primary
</button>
</view>
<view class="button-wrapper">
<button type="warn" size="{{warnSize}}" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}"
bindtap="warn"> warn
</button>
</view>
<view class="button-wrapper">
<button bindtap="setDisabled">点击设置以上按钮disabled属性</button>
</view>
<view class="button-wrapper">
<button bindtap="setPlain">点击设置以上按钮plain属性</button>
</view>
<view class="button-wrapper">
<button bindtap="setLoading">点击设置以上按钮loading属性</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-button/wx-button.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/component/component-pages/wx-checkbox/wx-checkbox.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
items
:
[
{
name
:
'
USA
'
,
value
:
'
美国
'
},
{
name
:
'
CHN
'
,
value
:
'
中国
'
,
checked
:
'
true
'
},
{
name
:
'
BRA
'
,
value
:
'
巴西
'
},
{
name
:
'
JPN
'
,
value
:
'
日本
'
},
{
name
:
'
ENG
'
,
value
:
'
英国
'
},
{
name
:
'
FRA
'
,
value
:
'
法国
'
},
]
},
checkboxChange
:
function
(
e
)
{
console
.
log
(
'
checkbox发生change事件,携带value值为:
'
,
e
.
detail
.
value
)
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-checkbox/wx-checkbox.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">checkbox</text>
<text class="page__desc">多选框</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<checkbox-group bindchange="checkboxChange">
<label class="checkbox" wx:for-items="{{items}}">
<checkbox value="{{item.name}}" checked="{{item.checked}}"/>{{item.value}}
</label>
</checkbox-group>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-checkbox/wx-checkbox.wxss
deleted
100644 → 0
View file @
c4794b1b
.checkbox{
display: block;
margin-bottom: 10px;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-form/wx-form.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
pickerHidden
:
true
,
chosen
:
''
},
pickerConfirm
:
function
(
e
)
{
this
.
setData
({
pickerHidden
:
true
})
this
.
setData
({
chosen
:
e
.
detail
.
value
})
},
pickerCancel
:
function
(
e
)
{
this
.
setData
({
pickerHidden
:
true
})
},
pickerShow
:
function
(
e
)
{
this
.
setData
({
pickerHidden
:
false
})
},
formSubmit
:
function
(
e
)
{
console
.
log
(
'
form发生了submit事件,携带数据为:
'
,
e
.
detail
.
value
)
},
formReset
:
function
(
e
)
{
console
.
log
(
'
form发生了reset事件,携带数据为:
'
,
e
.
detail
.
value
)
this
.
setData
({
chosen
:
''
})
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-form/wx-form.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">form</text>
<text class="page__desc">表单</text>
</view>
<form class="page__bd" catchsubmit="formSubmit" catchreset="formReset">
<view class="section section_gap">
<view class="section__title">switch</view>
<switch name="switch"/>
</view>
<view class="section section_gap">
<view class="section__title">slider</view>
<slider name="slider" show-value ></slider>
</view>
<view class="section">
<view class="section__title">input</view>
<input name="input" placeholder="please input here" />
</view>
<view class="section section_gap">
<view class="section__title">radio</view>
<radio-group name="radio-group">
<label><radio value="radio1"/>radio1</label>
<label><radio value="radio2"/>radio2</label>
</radio-group>
</view>
<view class="section section_gap">
<view class="section__title">checkbox</view>
<checkbox-group name="checkbox">
<label><checkbox value="checkbox1"/>checkbox1</label>
<label><checkbox value="checkbox2"/>checkbox2</label>
</checkbox-group>
</view>
<view class="btn-area">
<button formType="submit">Submit</button>
<button formType="reset">Reset</button>
</view>
</form>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-form/wx-form.wxss
deleted
100644 → 0
View file @
c4794b1b
wx-button {
margin-top: 10px;
margin-bottom: 10px;
}
wx-label {
display: block;
margin-top: 5px;
}
.picker-text {
margin-left: 10px;
position: relative;
}
02-PG/小程序/weapp-demo/page/component/component-pages/wx-icon/wx-icon.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
iconSize
:
[
20
,
30
,
40
,
50
,
60
,
70
],
iconColor
:
[
'
red
'
,
'
orange
'
,
'
yellow
'
,
'
green
'
,
'
rgb(0,255,255)
'
,
'
blue
'
,
'
purple
'
],
iconType
:
[
'
success
'
,
'
info
'
,
'
warn
'
,
'
waiting
'
,
'
safe_success
'
,
'
safe_warn
'
,
'
success_circle
'
,
'
success_no_circle
'
,
'
waiting_circle
'
,
'
circle
'
,
'
download
'
,
'
info_circle
'
,
'
cancel
'
,
'
search
'
,
'
clear
'
]
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-icon/wx-icon.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">icon</text>
<text class="page__desc">icon图标</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<view class="group">
<block wx:for-items="{{iconSize}}">
<icon type="success" size="{{item}}"/>
</block>
</view>
</view>
<view class="section section_gap">
<view class="group">
<scroll-view scroll-x>
<block wx:for-items="{{iconType}}">
<icon type="{{item}}" size="45"/>
</block>
</scroll-view>
</view>
</view>
<view class="section section_gap">
<view class="group">
<block wx:for-items="{{iconColor}}">
<icon type="success" size="45" color="{{item}}"/>
</block>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-icon/wx-icon.wxss
deleted
100644 → 0
View file @
c4794b1b
.group{
flex-direction: row;
align-items: center;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-image/wx-image.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
imageError
:
function
(
e
)
{
console
.
log
(
'
image3发生error事件,携带值为
'
,
e
.
detail
.
errMsg
)
}
})
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-image/wx-image.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">image</text>
<text class="page__desc">图片</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<view class="section__title"> local image</view>
<view class="section__ctn">
<image src="../../resources/pic.jpg"/>
</view>
</view>
<view class="section section_gap">
<view class="section__title"> internet image</view>
<view class="section__ctn">
<image src="http://img02.tooopen.com/images/20160603/tooopen_sy_164101489754.jpg" width="200"
height="130"/>
</view>
</view>
<view class="section section_gap">
<view class="section__title"> error image</view>
<view class="section__ctn">
<image src="error url" binderror="imageError"/>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-image/wx-image.wxss
deleted
100644 → 0
View file @
c4794b1b
.section__ctn{
text-align: center;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-input/wx-input.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:{
focus
:
false
,
inputValue
:
""
},
bindButtonTap
:
function
(){
this
.
setData
({
focus
:
true
})
},
bindKeyInput
:
function
(
e
){
this
.
setData
({
inputValue
:
e
.
detail
.
value
})
},
bindReplaceInput
:
function
(
e
){
var
value
=
e
.
detail
.
value
;
var
pos
=
e
.
detail
.
cursor
;
if
(
pos
!=
-
1
){
//光标在中间
var
left
=
e
.
detail
.
value
.
slice
(
0
,
pos
);
//计算光标的位置
pos
=
left
.
replace
(
/11/g
,
'
2
'
).
length
;
}
//直接返回对象,可以对输入进行过滤处理,同时可以控制光标的位置
return
{
value
:
value
.
replace
(
/11/g
,
'
2
'
),
cursor
:
pos
}
//或者直接返回字符串,光标在最后边
//return value.replace(/11/g,'2'),
},
bindHideKeyboard
:
function
(
e
){
if
(
e
.
detail
.
value
===
"
123
"
){
//收起键盘
wx
.
hideKeyboard
();
}
}
})
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-input/wx-input.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">input</text>
<text class="page__desc">输入框</text>
</view>
<view class="page__bd">
<view class="section">
<input placeholder="这是一个可以自动聚焦的input" auto-focus/>
</view>
<view class="section">
<input placeholder="这个只有在按钮点击的时候才聚焦" focus="{{focus}}" />
<view class="btn-area">
<button bindtap="bindButtonTap">使得输入框获取焦点</button>
</view>
</view>
<view class="section">
<input maxlength="10" placeholder="最大输入长度10" />
</view>
<view class="section">
<view class="section__title">你输入的是:{{inputValue}}</view>
<input bindinput="bindKeyInput" placeholder="输入同步到view中"/>
</view>
<view class="section">
<input bindinput="bindReplaceInput" placeholder="连续的两个1会变成2" />
</view>
<view class="section">
<input bindinput="bindHideKeyboard" placeholder="输入123自动收起键盘" />
</view>
<view class="section">
<input type="emoji" placeholder="这是一个带有表情的输入框" />
</view>
<view class="section">
<input password type="number" placeholder="这是一个数字输入框" />
</view>
<view class="section">
<input password type="text" placeholder="这是一个文本输入框" />
</view>
<view class="section">
<input type="digit" placeholder="带小数点的数字键盘"/>
</view>
<view class="section">
<input type="idcard" placeholder="身份证输入键盘" />
</view>
<view class="section">
<input placeholder-style="color:red" placeholder="占位符字体是红色的" />
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-input/wx-input.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/component/component-pages/wx-label/wx-label.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
checkboxItems
:
[
{
name
:
'
USA
'
,
value
:
'
美国
'
},
{
name
:
'
CHN
'
,
value
:
'
中国
'
,
checked
:
'
true
'
},
{
name
:
'
BRA
'
,
value
:
'
巴西
'
},
{
name
:
'
JPN
'
,
value
:
'
日本
'
,
checked
:
'
true
'
},
{
name
:
'
ENG
'
,
value
:
'
英国
'
},
{
name
:
'
FRA
'
,
value
:
'
法国
'
},
],
radioItems
:
[
{
name
:
'
USA
'
,
value
:
'
美国
'
},
{
name
:
'
CHN
'
,
value
:
'
中国
'
,
checked
:
'
true
'
},
{
name
:
'
BRA
'
,
value
:
'
巴西
'
},
{
name
:
'
JPN
'
,
value
:
'
日本
'
},
{
name
:
'
ENG
'
,
value
:
'
英国
'
},
{
name
:
'
FRA
'
,
value
:
'
法国
'
},
],
hidden
:
false
},
checkboxChange
:
function
(
e
)
{
var
checked
=
e
.
detail
.
value
var
changed
=
{}
for
(
var
i
=
0
;
i
<
this
.
data
.
checkboxItems
.
length
;
i
++
)
{
if
(
checked
.
indexOf
(
this
.
data
.
checkboxItems
[
i
].
name
)
!==
-
1
)
{
changed
[
'
checkboxItems[
'
+
i
+
'
].checked
'
]
=
true
}
else
{
changed
[
'
checkboxItems[
'
+
i
+
'
].checked
'
]
=
false
}
}
this
.
setData
(
changed
)
},
radioChange
:
function
(
e
)
{
var
checked
=
e
.
detail
.
value
var
changed
=
{}
for
(
var
i
=
0
;
i
<
this
.
data
.
radioItems
.
length
;
i
++
)
{
if
(
checked
.
indexOf
(
this
.
data
.
radioItems
[
i
].
name
)
!==
-
1
)
{
changed
[
'
radioItems[
'
+
i
+
'
].checked
'
]
=
true
}
else
{
changed
[
'
radioItems[
'
+
i
+
'
].checked
'
]
=
false
}
}
this
.
setData
(
changed
)
},
tapEvent
:
function
(
e
)
{
console
.
log
(
'
按钮被点击
'
)
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-label/wx-label.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">label</text>
<text class="page__desc">标签</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<view class="section__title">表单组件在label内</view>
<checkbox-group class="group" bindchange="checkboxChange">
<view class="label-1" wx:for-items="{{checkboxItems}}">
<label>
<checkbox value="{{item.name}}" checked="{{item.checked}}"></checkbox>
<text class="label-1__text">{{item.value}}</text>
</label>
</view>
</checkbox-group>
</view>
<view class="section section_gap">
<view class="section__title">label用for标识表单组件</view>
<radio-group class="group" bindchange="radioChange">
<view class="label-2" wx:for-items="{{radioItems}}">
<radio id="{{item.name}}" value="{{item.name}}" checked="{{item.checked}}"></radio>
<label class="label-2__text" for="{{item.name}}"><text>{{item.name}}</text></label>
</view>
</radio-group>
</view>
<view class="section section_gap">
<view class="section__title">绑定button</view>
<label class="label-3">
<text>点击这段文字,button会被选中</text>
</label>
<view class="btn-area">
<button type="default" name="1" bindtap="tapEvent">按钮</button>
</view>
</view>
<view class="section section_gap">
<view class="section__title">label内有多个时选中第一个</view>
<label class="label-4">
<checkbox> 选中我 </checkbox>
<checkbox> 选不中 </checkbox>
<checkbox> 选不中 </checkbox>
<checkbox> 选不中 </checkbox>
<view class="label-4_text">点我会选中第一个</view>
</label>
</view>
</view>
</view>
02-PG/小程序/weapp-demo/page/component/component-pages/wx-label/wx-label.wxss
deleted
100644 → 0
View file @
c4794b1b
.label-1, .label-2{
margin-bottom: 15px;
}
.label-4_text{
text-align: center;
margin-top: 15px;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-mask/wx-mask.js
deleted
100644 → 0
View file @
c4794b1b
var
pageData
=
{}
var
maskNum
=
4
pageData
.
data
=
{}
for
(
var
i
=
1
;
i
<=
maskNum
;
++
i
)
{
pageData
.
data
[
`hidden
${
i
}
`
]
=
true
;
(
function
(
index
)
{
pageData
[
`tap
${
index
}
`
]
=
function
(
e
)
{
var
obj
=
{}
obj
[
`hidden
${
index
}
`
]
=
false
this
.
setData
(
obj
)
}
pageData
[
`mask
${
index
}
`
]
=
function
(
e
)
{
var
obj
=
{}
obj
[
`hidden
${
index
}
`
]
=
true
this
.
setData
(
obj
)
}
})(
i
);
}
Page
(
pageData
)
02-PG/小程序/weapp-demo/page/component/component-pages/wx-mask/wx-mask.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">mask</text>
<text class="page__desc">遮罩</text>
</view>
<view class="page__bd">
<view class="btn-area">
<view class="body-view">
<mask hidden="{{hidden1}}" bindtap="mask1" hover-style="none"/>
<button type="default" bindtap="tap1">点击弹出默认mask</button>
</view>
<view class="body-view">
<mask hidden="{{hidden2}}" bindtap="mask2" style="background-color: rgba(255,255,0,0.6);" hover-style="none"/>
<button type="default" bindtap="tap2">点击弹出半透明颜色的mask</button>
</view>
<view class="body-view">
<mask hidden="{{hidden3}}" bindtap="mask3" style="background-color: rgb(0,255,0);" hover-style="none"/>
<button type="default" bindtap="tap3">点击弹出纯色mask</button>
</view>
<view class="body-view">
<mask hidden="{{hidden4}}" bindtap="mask4" style="z-index: -100;" hover-style="none"/>
<button type="default" bindtap="tap4">点击弹出设置z-index的mask</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-modal/wx-modal.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
modalHidden
:
true
,
modalHidden2
:
true
},
modalTap
:
function
(
e
)
{
this
.
setData
({
modalHidden
:
false
})
},
modalChange
:
function
(
e
)
{
this
.
setData
({
modalHidden
:
true
})
},
modalTap2
:
function
(
e
)
{
this
.
setData
({
modalHidden2
:
false
})
},
modalChange2
:
function
(
e
)
{
this
.
setData
({
modalHidden2
:
true
})
},
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-modal/wx-modal.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">modal</text>
<text class="page__desc">模式对话框</text>
</view>
<view class="page__bd">
<modal title="标题" confirm-text="confirm" cancel-text="cancel" hidden="{{modalHidden}}" mask bindconfirm="modalChange" bindcancel="modalChange">
这是对话框的内容。
</modal>
<modal class="modal" hidden="{{modalHidden2}}" no-cancel bindconfirm="modalChange2" bindcancel="modalChange2">
<view> 没有标题没有取消的对话框 </view>
<view> 内容可以插入节点 </view>
</modal>
<view class="btn-area">
<button type="default" bindtap="modalTap">点击弹出modal</button>
<button type="default" bindtap="modalTap2">点击弹出modal2</button>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-navigator/navigate.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
onLoad
:
function
(
options
)
{
console
.
log
(
options
)
this
.
setData
({
title
:
options
.
title
})
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-navigator/navigate.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">{{title}}</text>
<text class="page__desc">这是新建的页面,点击左上角返回回到之前页面</text>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-navigator/redirect.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
onLoad
:
function
(
options
)
{
console
.
log
(
options
)
this
.
setData
({
title
:
options
.
title
})
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-navigator/redirect.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">{{title}}</text>
<text class="page__desc">这是当前页,点击左上角返回回到上级菜单</text>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-navigator/wx-navigator.js
deleted
100644 → 0
View file @
c4794b1b
Page
({})
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-navigator/wx-navigator.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">navigator</text>
<text class="page__desc">导航栏</text>
</view>
<view class="page__bd">
<view class="btn-area">
<navigator url="navigate?title=navigate" hover-class="navigator-hover">
<button type="default">跳转到新页面</button>
</navigator>
<navigator url="redirect?title=redirect" redirect hover-class="other-navigator-hover">
<button type="default">在当前页打开</button>
</navigator>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-navigator/wx-navigator.wxss
deleted
100644 → 0
View file @
c4794b1b
.navigator-hover button{
background-color:blue;
}
.other-navigator-hover button{
background-color:red;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-picker/wx-picker.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
array
:[
"
中国
"
,
"
美国
"
,
"
巴西
"
,
"
日本
"
],
index
:
0
,
date
:
"
2016-09-01
"
,
time
:
"
12:01
"
},
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'
picker发送选择改变,携带值为
'
,
e
.
detail
.
value
)
this
.
setData
({
index
:
e
.
detail
.
value
})
},
bindDateChange
:
function
(
e
){
this
.
setData
({
date
:
e
.
detail
.
value
})
},
bindTimeChange
:
function
(
e
){
this
.
setData
({
time
:
e
.
detail
.
time
})
}
})
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-picker/wx-picker.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">picker</text>
<text class="page__desc">选择器</text>
</view>
<view class="page__bd">
<view class="section">
<view class="section__title">地区选择器</view>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<view class="picker">
当前选择:{{array[index]}}
</view>
</picker>
</view>
<view class="section">
<view class="section__title">时间选择器</view>
<picker mode="time" value="{{time}}" start="09:01" end="21:01" bindchange="bindTimeChange">
<view class="picker">
当前选择: {{time}}
</view>
</picker>
</view>
<view class="section">
<view class="section__title">日期选择器</view>
<picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
<view class="picker">
当前选择: {{date}}
</view>
</picker>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-picker/wx-picker.wxss
deleted
100644 → 0
View file @
c4794b1b
.picker{
padding: 13px;
background-color: #FFFFFF;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-progress/wx-progress.js
deleted
100644 → 0
View file @
c4794b1b
Page
({})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-progress/wx-progress.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">progress</text>
<text class="page__desc">进度条</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<progress percent="20" show-info/>
<progress percent="40" active/>
<progress percent="60" stroke-width="10"/>
<progress percent="80" color="#10AEFF"/>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-progress/wx-progress.wxss
deleted
100644 → 0
View file @
c4794b1b
progress{
margin-bottom: 30px;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-radio/wx-radio.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
items
:
[
{
name
:
'
USA
'
,
value
:
'
美国
'
},
{
name
:
'
CHN
'
,
value
:
'
中国
'
,
checked
:
'
true
'
},
{
name
:
'
BRA
'
,
value
:
'
巴西
'
},
{
name
:
'
JPN
'
,
value
:
'
日本
'
},
{
name
:
'
ENG
'
,
value
:
'
英国
'
},
{
name
:
'
FRA
'
,
value
:
'
法国
'
},
]
},
radioChange
:
function
(
e
)
{
console
.
log
(
'
radio发生change事件,携带value值为:
'
,
e
.
detail
.
value
)
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-radio/wx-radio.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">radio</text>
<text class="page__desc">单选框</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<radio-group class="radio-group" bindchange="radioChange">
<label class="radio" wx:for-items="{{items}}">
<radio value="{{item.name}}" checked="{{item.checked}}"/>{{item.value}}
</label>
</radio-group>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-radio/wx-radio.wxss
deleted
100644 → 0
View file @
c4794b1b
.radio {
display: block;
margin-bottom: 10px;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-scroll-view/wx-scroll-view.js
deleted
100644 → 0
View file @
c4794b1b
var
order
=
[
'
green
'
,
'
red
'
,
'
yellow
'
,
'
blue
'
,
'
green
'
]
Page
({
data
:
{
toView
:
"
green
"
},
upper
:
function
(
e
)
{
console
.
log
(
e
)
},
lower
:
function
(
e
)
{
console
.
log
(
e
)
},
scroll
:
function
(
e
)
{
console
.
log
(
e
)
},
scrollToTop
:
function
(
e
)
{
this
.
setAction
({
scrollTop
:
0
})
},
tap
:
function
(
e
)
{
for
(
var
i
=
0
;
i
<
order
.
length
;
++
i
)
{
if
(
order
[
i
]
===
this
.
data
.
toView
)
{
this
.
setData
({
toView
:
order
[
i
+
1
],
scrollTop
:
(
i
+
1
)
*
200
})
break
}
}
},
tapMove
:
function
(
e
)
{
this
.
setData
({
scrollTop
:
this
.
data
.
scrollTop
+
10
})
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-scroll-view/wx-scroll-view.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">scroll-view</text>
<text class="page__desc">可滚动视图区域。</text>
</view>
<view class="page__bd">
<view class="section">
<view class="section__title">vertical scroll</view>
<scroll-view scroll-y="true" style="height: 200px;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}">
<view id="green" class="scroll-view-item bc_green"></view>
<view id="red" class="scroll-view-item bc_red"></view>
<view id="yellow" class="scroll-view-item bc_yellow"></view>
<view id="blue" class="scroll-view-item bc_blue"></view>
</scroll-view>
<view class="btn-area">
<button size="mini" bindtap="tap">click me to scroll into view </button>
<button size="mini" bindtap="tapMove">click me to scroll</button>
<button size="mini" bindtap="scrollToTop">click me to top</button>
</view>
</view>
<view class="section section_gap">
<view class="section__title">horizontal scroll</view>
<scroll-view class="scroll-view_H" scroll-x="true" style="width: 100%">
<view id="green" class="scroll-view-item_H bc_green"></view>
<view id="red" class="scroll-view-item_H bc_red"></view>
<view id="yellow" class="scroll-view-item_H bc_yellow"></view>
<view id="blue" class="scroll-view-item_H bc_blue"></view>
</scroll-view>
</view>
</view>
</view>
02-PG/小程序/weapp-demo/page/component/component-pages/wx-scroll-view/wx-scroll-view.wxss
deleted
100644 → 0
View file @
c4794b1b
.scroll-view_H{
white-space: nowrap;
}
.scroll-view-item{
height: 200px;
}
.scroll-view-item_H{
display: inline-block;
width: 100%;
height: 200px;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-slide-tab/wx-slide-tab.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
texts
:
[
'
这是第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
嘻嘻,到底了
'
,
'
这是第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
嘻嘻,到底了
'
,
'
这是第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
嘻嘻,到底了
'
]
},
tabchange
:
function
(
e
){
console
.
log
(
'
现在跳转到了第
'
+
e
.
detail
.
current
+
'
个tab
'
)
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-slide-tab/wx-slide-tab.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">slide-tab</text>
<text class="page__desc">slide-tab</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<swiper duration="300" bindchange="tabchange" style="height: 300px; color: #fff">
<block wx:for-items="{{texts}}">
<swiper-item style="background-color: #{{index}}{{index}}{{index}}">
<scroll-view scroll-y>
<text>{{item}}</text>
</scroll-view>
</swiper-item>
</block>
</swiper>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-slide-tab/wx-slide-tab.wxss
deleted
100644 → 0
View file @
c4794b1b
02-PG/小程序/weapp-demo/page/component/component-pages/wx-slider/wx-slider.js
deleted
100644 → 0
View file @
c4794b1b
var
pageData
=
{}
for
(
var
i
=
1
;
i
<
5
;
++
i
)
{
(
function
(
index
)
{
pageData
[
`slider
${
index
}
change`
]
=
function
(
e
)
{
console
.
log
(
`slider
${
index
}
发生change事件,携带值为`
,
e
.
detail
.
value
)
}
})(
i
);
}
Page
(
pageData
)
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-slider/wx-slider.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">slider</text>
<text class="page__desc">滑块</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<text class="section__title">设置step</text>
<view class="body-view">
<slider value="60" bindchange="slider2change" step="5"/>
</view>
</view>
<view class="section section_gap">
<text class="section__title">显示当前value</text>
<view class="body-view">
<slider value="50" bindchange="slider3change" show-value/>
</view>
</view>
<view class="section section_gap">
<text class="section__title">设置最小/最大值</text>
<view class="body-view">
<slider value="100" bindchange="slider4change" min="50" max="200" show-value/>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-swiper/wx-swiper.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:
{
background
:
[
'
green
'
,
'
red
'
,
'
yellow
'
],
indicatorDots
:
true
,
vertical
:
false
,
autoplay
:
false
,
interval
:
3000
,
duration
:
1000
},
changeIndicatorDots
:
function
(
e
)
{
this
.
setData
({
indicatorDots
:
!
this
.
data
.
indicatorDots
})
},
changeVertical
:
function
(
e
)
{
this
.
setData
({
vertical
:
!
this
.
data
.
vertical
})
},
changeAutoplay
:
function
(
e
)
{
this
.
setData
({
autoplay
:
!
this
.
data
.
autoplay
})
},
intervalChange
:
function
(
e
)
{
this
.
setData
({
interval
:
e
.
detail
.
value
})
},
durationChange
:
function
(
e
)
{
this
.
setData
({
duration
:
e
.
detail
.
value
})
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-swiper/wx-swiper.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">swiper</text>
<text class="page__desc">swiper</text>
</view>
<view class="page__bd">
<view class="section section_gap swiper">
<swiper indicator-dots="{{indicatorDots}}" vertical="{{vertical}}"
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<block wx:for-items="{{background}}">
<swiper-item>
<view class="swiper-item bc_{{item}}"></view>
</swiper-item>
</block>
</swiper>
</view>
<view class="btn-area">
<button type="default" bindtap="changeIndicatorDots">indicator-dots</button>
<button type="default" bindtap="changeVertical">{{vertical?'horizontal':'vertical'}}</button>
<button type="default" bindtap="changeAutoplay">autoplay</button>
</view>
<slider bindchange="durationChange" value="{{duration}}" show-value min="500" max="2000"/>
<view class="section__title">duration</view>
<slider bindchange="intervalChange" value="{{interval}}" show-value min="2000" max="10000"/>
<view class="section__title">interval</view>
</view>
</view>
02-PG/小程序/weapp-demo/page/component/component-pages/wx-swiper/wx-swiper.wxss
deleted
100644 → 0
View file @
c4794b1b
.swiper-item{
display: block;
height: 150px;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-switch/wx-switch.js
deleted
100644 → 0
View file @
c4794b1b
var
pageData
=
{
data
:
{
switch1Checked
:
true
,
switch2Checked
:
false
,
switch1Style
:
''
,
switch2Style
:
'
text-decoration: line-through
'
}
}
for
(
var
i
=
1
;
i
<=
2
;
++
i
)
{
(
function
(
index
)
{
pageData
[
`switch
${
index
}
Change`
]
=
function
(
e
)
{
console
.
log
(
`switch
${
index
}
发生change事件,携带值为`
,
e
.
detail
.
value
)
var
obj
=
{}
obj
[
`switch
${
index
}
Checked`
]
=
e
.
detail
.
value
this
.
setData
(
obj
)
obj
=
{}
obj
[
`switch
${
index
}
Style`
]
=
e
.
detail
.
value
?
''
:
'
text-decoration: line-through
'
this
.
setData
(
obj
)
}
})(
i
)
}
Page
(
pageData
)
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-switch/wx-switch.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">switch</text>
<text class="page__desc">开关</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<view class="body-view">
<switch checked="{{switch1Checked}}" bindchange="switch1Change"/>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-text/wx-text.js
deleted
100644 → 0
View file @
c4794b1b
var
initData
=
'
this is first line
\n
this is second line
'
Page
({
data
:
{
text
:
initData
},
extraLine
:
[],
add
:
function
(
e
)
{
this
.
extraLine
.
push
(
'
other line
'
)
this
.
setData
({
text
:
initData
+
'
\n
'
+
this
.
extraLine
.
join
(
'
\n
'
)
})
},
remove
:
function
(
e
)
{
if
(
this
.
extraLine
.
length
>
0
)
{
this
.
extraLine
.
pop
()
this
.
setData
({
text
:
initData
+
'
\n
'
+
this
.
extraLine
.
join
(
'
\n
'
)
})
}
}
})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-text/wx-text.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">text</text>
<text class="page__desc">文字标签</text>
</view>
<view class="page__bd">
<view class="section section_gap">
<text>{{text}}</text>
<view class="btn-area">
<button bindtap="add">add line</button>
<button bindtap="remove">remove line</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-toast/wx-toast.js
deleted
100644 → 0
View file @
c4794b1b
var
toastNum
=
3
var
pageData
=
{}
pageData
.
data
=
{}
for
(
var
i
=
0
;
i
<=
toastNum
;
++
i
)
{
pageData
.
data
[
'
toast
'
+
i
+
'
Hidden
'
]
=
true
;
(
function
(
index
)
{
pageData
[
'
toast
'
+
index
+
'
Change
'
]
=
function
(
e
)
{
var
obj
=
{}
obj
[
'
toast
'
+
index
+
'
Hidden
'
]
=
true
;
this
.
setData
(
obj
)
}
pageData
[
'
toast
'
+
index
+
'
Tap
'
]
=
function
(
e
)
{
var
obj
=
{}
obj
[
'
toast
'
+
index
+
'
Hidden
'
]
=
false
this
.
setData
(
obj
)
}
})(
i
)
}
Page
(
pageData
)
02-PG/小程序/weapp-demo/page/component/component-pages/wx-toast/wx-toast.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">toast</text>
<text class="page__desc">toast提示</text>
</view>
<view class="page__bd">
<view class="btn-area">
<view class="body-view">
<toast hidden="{{toast1Hidden}}" bindchange="toast1Change">
默认
</toast>
<button type="default" bindtap="toast1Tap">点击弹出默认toast</button>
</view>
<view class="body-view">
<toast hidden="{{toast2Hidden}}" icon="warn" bindchange="toast2Change">
设置icon
</toast>
<button type="default" bindtap="toast2Tap">点击弹出设置icon的toast</button>
</view>
<view class="body-view">
<toast hidden="{{toast3Hidden}}" duration="3000" bindchange="toast3Change">
设置duration
</toast>
<button type="default" bindtap="toast3Tap">点击弹出设置duration的toast</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-video/wx-video.js
deleted
100644 → 0
View file @
c4794b1b
Page
({
data
:{
src
:
""
},
bindButtonTap
:
function
(){
var
that
=
this
;
wx
.
chooseVideo
({
sourceType
:[
'
album
'
,
'
camera
'
],
maxDuration
:
60
,
camera
:[
'
front
'
,
'
back
'
],
success
:
function
(
res
){
that
.
setData
({
src
:
res
.
tempFilePath
})
}
})
},
videoErrorCallback
:
function
(
e
)
{
console
.
log
(
'
视频错误信息:
'
);
console
.
log
(
e
.
detail
.
errMsg
);
}
})
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-video/wx-video.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">video</text>
<text class="page__desc">视频</text>
</view>
<view class="page__bd">
<view class="section tc">
<video src="http://flv.bn.netease.com/videolib3/1605/22/auDfZ8781/HD/auDfZ8781-mobile.mp4" binderror="videoErrorCallback"></video>
</view>
<view class="section tc">
<video src="{{src}}"></video>
<view class="btn-area">
<button bindtap="bindButtonTap">获取视频</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-view/wx-view.js
deleted
100644 → 0
View file @
c4794b1b
Page
({})
02-PG/小程序/weapp-demo/page/component/component-pages/wx-view/wx-view.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="page">
<view class="page__hd">
<text class="page__title">view</text>
<text class="page__desc">弹性框模型分为弹性容器以及弹性项目。当组件的display为flex或inline-flex时,该组件则为弹性容器,弹性容器的子组件为弹性项目。</text>
</view>
<view class="page__bd">
<view class="section">
<view class="section__title">flex-direction: row</view>
<view class="flex-wrp" style="flex-direction:row;">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
<view class="section">
<view class="section__title">flex-direction: column</view>
<view class="flex-wrp" style="height: 300px;flex-direction:column;">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
<view class="section">
<view class="section__title">justify-content: flex-start</view>
<view class="flex-wrp" style="flex-direction:row;justify-content: flex-start;">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
<view class="section">
<view class="section__title">justify-content: flex-end</view>
<view class="flex-wrp" style="flex-direction:row;justify-content: flex-end;">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
<view class="section">
<view class="section__title">justify-content: center</view>
<view class="flex-wrp" style="flex-direction:row;justify-content: center;">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
<view class="section">
<view class="section__title">justify-content: space-between</view>
<view class="flex-wrp" style="flex-direction:row;justify-content: space-between;">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
<view class="section">
<view class="section__title">justify-content: space-around</view>
<view class="flex-wrp" style="flex-direction:row;justify-content: space-around;">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
<view class="section">
<view class="section__title">align-items: flex-end</view>
<view class="flex-wrp" style="height: 200px;flex-direction:row;justify-content: center;align-items: flex-end">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
<view class="section">
<view class="section__title">align-items: center</view>
<view class="flex-wrp" style="height: 200px;flex-direction:row;justify-content: center;align-items: center">
<view class="flex-item bc_green"></view>
<view class="flex-item bc_red"></view>
<view class="flex-item bc_blue"></view>
</view>
</view>
</view>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/component-pages/wx-view/wx-view.wxss
deleted
100644 → 0
View file @
c4794b1b
.flex-wrp{
height: 100px;
display:flex;
background-color: #FFFFFF;
}
.flex-item{
width: 100px;
height: 100px;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/index.wxml
View file @
b4714a87
...
...
@@ -19,175 +19,3 @@
</view>
</view>
</view>
\ No newline at end of file
<!--
<view class="index">
<view class="head">
<view class="title">小程序组件</view>
<view class="desc">这是展示小程序组件的DEMO。</view>
</view>
<view class="body">
<view class="widgets">
<view class="widgets__item">
<view id="view" class="widgets__info {{viewShow ? 'widgets__info_show' : ''}}" bindtap="widgetsToggle">
<text class="widgets__info-name">内容分区</text>
<image class="widgets__info-img" src="resources/kind/view.png" background-size="cover" />
</view>
<view class="widgets__list {{viewShow ? 'widgets__list_show' : ''}}">
<navigator url="component-pages/wx-view/wx-view" class="widget">
<text class="widget__name">view</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-scroll-view/wx-scroll-view" class="widget">
<text class="widget__name">scroll-view</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-swiper/wx-swiper" class="widget">
<text class="widget__name">swiper</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
</navigator>
</view>
</view>
<view class="widgets__item">
<view id="content" class="widgets__info {{contentShow ? 'widgets__info_show' : ''}}" bindtap="widgetsToggle">
<text class="widgets__info-name">内容</text>
<image class="widgets__info-img" src="resources/kind/content.png" background-size="cover" />
</view>
<view class="widgets__list {{contentShow ? 'widgets__list_show' : ''}}">
<navigator url="component-pages/wx-text/wx-text" class="widget">
<text class="widget__name">text</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-icon/wx-icon" class="widget">
<text class="widget__name">icon</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-mask/wx-mask" class="widget">
<text class="widget__name">mask</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-toast/wx-toast" class="widget">
<text class="widget__name">toast</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-progress/wx-progress" class="widget">
<text class="widget__name">progress</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
</navigator>
</view>
</view>
<view class="widgets__item">
<view id="form" class="widgets__info {{formShow ? 'widgets__info_show' : ''}}" bindtap="widgetsToggle">
<text class="widgets__info-name">表单组件</text>
<image class="widgets__info-img" src="resources/kind/form.png" background-size="cover" />
</view>
<view class="widgets__list {{formShow ? 'widgets__list_show' : ''}}">
<navigator url="component-pages/wx-button/wx-button" class="widget">
<text class="widget__name">button</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-checkbox/wx-checkbox" class="widget">
<text class="widget__name">checkbox</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-form/wx-form" class="widget">
<text class="widget__name">form</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-input/wx-input" class="widget">
<text class="widget__name">input</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-label/wx-label" class="widget">
<text class="widget__name">label</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-picker/wx-picker" class="widget">
<text class="widget__name">picker</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-radio/wx-radio" class="widget">
<text class="widget__name">radio</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-slider/wx-slider" class="widget">
<text class="widget__name">slider</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-switch/wx-switch" class="widget">
<text class="widget__name">switch</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
</navigator>
</view>
</view>
<view class="widgets__item">
<view id="interact" class="widgets__info {{interactShow ? 'widgets__info_show' : ''}}" bindtap="widgetsToggle">
<text class="widgets__info-name">交互组件</text>
<image class="widgets__info-img" src="resources/kind/interact.png" background-size="cover" />
</view>
<view class="widgets__list {{interactShow ? 'widgets__list_show' : ''}}">
<navigator url="component-pages/wx-action-sheet/wx-action-sheet" class="widget">
<text class="widget__name">action-sheet</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-modal/wx-modal" class="widget">
<text class="widget__name">modal</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
</navigator>
</view>
</view>
<view class="widgets__item">
<view id="nav" class="widgets__info {{navShow ? 'widgets__info_show' : ''}}" bindtap="widgetsToggle">
<text class="widgets__info-name">导航</text>
<image class="widgets__info-img" src="resources/kind/nav.png" background-size="cover" />
</view>
<view class="widgets__list {{navShow ? 'widgets__list_show' : ''}}">
<navigator url="component-pages/wx-navigator/wx-navigator" class="widget">
<text class="widget__name">navigator</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
</navigator>
</view>
</view>
<view class="widgets__item">
<view id="media" class="widgets__info {{mediaShow ? 'widgets__info_show' : ''}}" bindtap="widgetsToggle">
<text class="widgets__info-name">媒体</text>
<image class="widgets__info-img" src="resources/kind/media.png" background-size="cover" />
</view>
<view class="widgets__list {{mediaShow ? 'widgets__list_show' : ''}}">
<view class="widgets__list-inner {{mediaShow ? 'widgets__list-inner_show' : ''}}">
<navigator url="component-pages/wx-image/wx-image" class="widget">
<text class="widget__name">image</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-audio/wx-audio" class="widget">
<text class="widget__name">audio</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
<view class="widget__line"></view>
</navigator>
<navigator url="component-pages/wx-video/wx-video" class="widget">
<text class="widget__name">video</text>
<image class="widget__arrow" src="resources/arrow.png" background-size="cover" />
</navigator>
</view>
</view>
</view>
</view>
</view>
</view> -->
02-PG/小程序/weapp-demo/page/component/navigation-pages/controller/controller.js
deleted
100644 → 0
View file @
c4794b1b
var
components
=
[
'
action-sheet
'
,
'
button
'
,
'
searchbar
'
,
'
modal
'
,
'
navigator
'
,
'
drawer
'
]
var
pageData
=
{}
for
(
var
i
=
0
;
i
<
components
.
length
;
++
i
)
{
(
function
(
index
)
{
pageData
[
components
[
index
]]
=
function
(
e
)
{
var
url
=
'
../../component-pages/wx-
'
+
components
[
index
]
+
'
/wx-
'
+
components
[
index
]
wx
.
navigateTo
({
url
:
url
})
}
})(
i
);
}
Page
(
pageData
)
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/navigation-pages/controller/controller.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="div-view">
<button type="default" bindtap="action-sheet" class="index-button">action-sheet</button>
<button type="default" bindtap="button" class="index-button">button</button>
<button type="default" bindtap="modal" class="index-button">modal</button>
<button type="default" bindtap="navigator" class="index-button">navigator</button>
</view>
02-PG/小程序/weapp-demo/page/component/navigation-pages/form/form.js
deleted
100644 → 0
View file @
c4794b1b
var
components
=
[
'
checkbox
'
,
'
radio
'
,
'
form
'
,
'
selector
'
,
'
switch
'
,
'
slider
'
,
'
input
'
,
'
label
'
,
'
picker
'
]
var
pageData
=
{}
for
(
var
i
=
0
;
i
<
components
.
length
;
++
i
)
{
(
function
(
index
)
{
pageData
[
components
[
index
]]
=
function
(
e
)
{
var
url
=
'
../../component-pages/wx-
'
+
components
[
index
]
+
'
/wx-
'
+
components
[
index
]
wx
.
navigateTo
({
url
:
url
})
}
})(
i
);
}
Page
(
pageData
)
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/navigation-pages/form/form.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="div-view">
<button type="default" bindtap="checkbox" class="index-button">checkbox</button>
<button type="default" bindtap="radio" class="index-button">radio</button>
<button type="default" bindtap="form" class="index-button">form</button>
<button type="default" bindtap="switch" class="index-button">switch</button>
<button type="default" bindtap="slider" class="index-button">slider</button>
<button type="default" bindtap="input" class="index-button">input</button>
<button type="default" bindtap="label" class="index-button">label</button>
<button type="default" bindtap="picker" class="index-button">picker</button>
</view>
02-PG/小程序/weapp-demo/page/component/navigation-pages/media/media.js
deleted
100644 → 0
View file @
c4794b1b
var
components
=
[
'
image
'
,
'
audio
'
,
'
video
'
]
var
pageData
=
{}
for
(
var
i
=
0
;
i
<
components
.
length
;
++
i
)
{
(
function
(
index
)
{
pageData
[
components
[
index
]]
=
function
(
e
)
{
var
url
=
'
../../component-pages/wx-
'
+
components
[
index
]
+
'
/wx-
'
+
components
[
index
]
wx
.
navigateTo
({
url
:
url
})
}
})(
i
)
}
Page
(
pageData
)
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/navigation-pages/media/media.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="div-view">
<button type="default" bindtap="image" class="index-button">image</button>
<button type="default" bindtap="audio" class="index-button">audio</button>
<button type="default" bindtap="video" class="index-button">video</button>
</view>
\ No newline at end of file
02-PG/小程序/weapp-demo/page/component/navigation-pages/view/view.js
deleted
100644 → 0
View file @
c4794b1b
var
components
=
[
'
progress
'
,
'
toast
'
,
'
scroll-view
'
,
'
text
'
,
'
view
'
,
'
mask
'
,
'
icon
'
,
'
spinner
'
,
'
swiper
'
,
'
slide-tab
'
]
var
pageData
=
{}
for
(
var
i
=
0
;
i
<
components
.
length
;
++
i
)
{
(
function
(
index
)
{
pageData
[
components
[
index
]]
=
function
(
e
)
{
var
url
=
'
../../component-pages/wx-
'
+
components
[
index
]
+
'
/wx-
'
+
components
[
index
]
wx
.
navigateTo
({
url
:
url
})
}
})(
i
)
}
Page
(
pageData
)
02-PG/小程序/weapp-demo/page/component/navigation-pages/view/view.wxml
deleted
100644 → 0
View file @
c4794b1b
<view class="div-view">
<button type="default" bindtap="text" class="index-button">text</button>
<button type="default" bindtap="view" class="index-button">view</button>
<button type="default" bindtap="icon" class="index-button">icon</button>
<button type="default" bindtap="toast" class="index-button">toast</button>
<button type="default" bindtap="progress" class="index-button">progress</button>
<button type="default" bindtap="scroll-view" class="index-button">scroll-view</button>
<button type="default" bindtap="swiper" class="index-button">swiper</button>
<button type="default" bindtap="slide-tab" class="index-button">swiper + scroll-view</button>
</view>
02-PG/小程序/weapp-demo/page/component/resources/arrow.png
deleted
100644 → 0
View file @
c4794b1b
471 Bytes
02-PG/小程序/weapp-demo/page/component/resources/kind/canvas.png
deleted
100644 → 0
View file @
c4794b1b
834 Bytes
02-PG/小程序/weapp-demo/page/component/resources/kind/content.png
deleted
100644 → 0
View file @
c4794b1b
357 Bytes
02-PG/小程序/weapp-demo/page/component/resources/kind/form.png
deleted
100644 → 0
View file @
c4794b1b
200 Bytes
02-PG/小程序/weapp-demo/page/component/resources/kind/interact.png
deleted
100644 → 0
View file @
c4794b1b
924 Bytes
02-PG/小程序/weapp-demo/page/component/resources/kind/map.png
deleted
100644 → 0
View file @
c4794b1b
495 Bytes
02-PG/小程序/weapp-demo/page/component/resources/kind/media.png
deleted
100644 → 0
View file @
c4794b1b
357 Bytes
02-PG/小程序/weapp-demo/page/component/resources/kind/nav.png
deleted
100644 → 0
View file @
c4794b1b
579 Bytes
02-PG/小程序/weapp-demo/page/component/resources/kind/view.png
deleted
100644 → 0
View file @
c4794b1b
388 Bytes
02-PG/小程序/weapp-demo/page/component/resources/pic.jpg
deleted
100644 → 0
View file @
c4794b1b
7.23 KB
02-PG/小程序/weapp-demo/page/hr/hr.js
0 → 100644
View file @
b4714a87
var
globalData
=
require
(
'
../../util/globalData.js
'
);
var
commonUtil
=
require
(
'
../../util/commonUtil.js
'
);
var
weeksArray
=
[];
//查询内容工具类型
//查询内容工具类型
Page
({
data
:
{
sch_listData
:
[],
dateArray
:
[],
},
//初始化
onLoad
:
function
(
option
)
{
var
scheduleList
=
[
{
"
scheduleId
"
:
"
8aaf510c5e3de339015e3de932660000
"
,
"
resourceName
"
:
"
营销主管
"
,
"
dayOfWeek
"
:
"
1
"
,
"
timePeriod
"
:
"
A
"
,
"
docName
"
:
"
张三(已评价)
"
,
"
doctorId
"
:
"
8a2256334b021c33014b06124fd60181
"
,
"
ifOpenYuYueService
"
:
"
0
"
},
{
"
scheduleId
"
:
"
8aaf510c60c6700b0160de3031f40598
"
,
"
resourceName
"
:
"
测试工程师
"
,
"
dayOfWeek
"
:
"
2
"
,
"
timePeriod
"
:
"
B
"
,
"
docName
"
:
"
李四(已评价)
"
,
"
doctorId
"
:
"
8a2256334c265f88014c26d521fc0103
"
,
"
ifOpenYuYueService
"
:
"
0
"
},
{
"
scheduleId
"
:
"
ff80808162a3453f0162a3f036440000
"
,
"
resourceName
"
:
"
运维工程师
"
,
"
dayOfWeek
"
:
"
1
"
,
"
timePeriod
"
:
"
B
"
,
"
docName
"
:
"
王五
"
,
"
doctorId
"
:
"
8aaf510c53f56ee0015432b3ee760e22
"
,
"
ifOpenYuYueService
"
:
"
0
"
},
{
"
scheduleId
"
:
"
ff8080815e36ffb0015e375d3d850006
"
,
"
resourceName
"
:
"
架构师
"
,
"
dayOfWeek
"
:
"
1
"
,
"
timePeriod
"
:
"
B
"
,
"
docName
"
:
"
李生
"
,
"
doctorId
"
:
"
8a2256334c265f88014c26d521fc0103
"
,
"
ifOpenYuYueService
"
:
"
0
"
},
{
"
scheduleId
"
:
"
8aaf510c5e0ddfd6015e2d4e85290288
"
,
"
resourceName
"
:
"
项目管理
"
,
"
dayOfWeek
"
:
"
3
"
,
"
timePeriod
"
:
"
C
"
,
"
docName
"
:
"
霸气(已评价)
"
,
"
doctorId
"
:
"
8a2256334888ffb301488b90a3fe005f
"
,
"
ifOpenYuYueService
"
:
"
0
"
},
{
"
scheduleId
"
:
"
02f18a9c0a374b4184f35b40a9dde3f0
"
,
"
resourceName
"
:
"
应用顾问
"
,
"
dayOfWeek
"
:
"
4
"
,
"
timePeriod
"
:
"
C
"
,
"
docName
"
:
"
久久
"
,
"
doctorId
"
:
"
8a2256334b021c33014b06124fd60181
"
,
"
ifOpenYuYueService
"
:
"
0
"
},
{
"
scheduleId
"
:
"
ff80808160ea422a0160ea4f6fb10001
"
,
"
resourceName
"
:
"
软件产品经理
"
,
"
dayOfWeek
"
:
"
5
"
,
"
timePeriod
"
:
"
C
"
,
"
docName
"
:
"
试试
"
,
"
doctorId
"
:
"
8a2256334c265f88014c26d521fc0103
"
,
"
ifOpenYuYueService
"
:
"
0
"
},
{
"
scheduleId
"
:
"
ff80808160e90a3e0160e93c9f6e001e
"
,
"
resourceName
"
:
"
北京售前经理
"
,
"
dayOfWeek
"
:
"
6
"
,
"
timePeriod
"
:
"
A
"
,
"
docName
"
:
"
十一
"
,
"
doctorId
"
:
"
8a2256334b021c33014b06124fd60181
"
,
"
ifOpenYuYueService
"
:
"
0
"
},
];
for
(
var
j
=
0
;
j
<
scheduleList
.
length
;
j
++
)
{
console
.
log
(
'
----
'
+
scheduleList
[
j
].
docName
);
}
var
daysArray
=
getSevenDays
();
var
sch_listData
=
dealData
(
scheduleList
);
this
.
setData
({
dateArray
:
daysArray
,
sch_listData
:
sch_listData
,
});
},
//用户点击右上角分享
onShareAppMessage
:
function
()
{
return
{
title
:
'
投简历
'
,
desc
:
'
你身边适用工具,简历帮手
'
,
path
:
'
/pages/component/index
'
}
},
clickDoctor
:
function
(
e
)
{
var
$dict
=
e
.
currentTarget
.
dataset
;
var
tag
=
$dict
.
dayofweek
;
//岗位
var
str
=
'
开发中、将跳转到简历预览中
'
;
wx
.
showModal
({
title
:
'
提示
'
,
content
:
str
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
var
syncFlg
=
false
;
try
{
// 同步接口立即返回值
var
resumeData
=
globalData
.
getGlobalData
(
'
base
'
);
console
.
log
(
resumeData
);
console
.
log
(
!
commonUtil
.
isEmptyObject
(
resumeData
));
if
(
!
commonUtil
.
isEmptyObject
(
resumeData
))
{
syncFlg
=
true
;
}
}
catch
(
e
)
{
console
.
log
(
'
读取key2发生错误
'
);
syncFlg
=
false
;
}
var
url
=
'
/page/resume/resume?op=base
'
;
if
(
syncFlg
)
{
url
=
'
/page/resumeOnline/resumeOnline
'
;
}
wx
.
navigateTo
({
url
:
url
});
}
}
})
},
});
var
getSevenDays
=
function
()
{
var
daysArray
=
[];
daysArray
.
push
({
"
date_text
"
:
"
职能
"
,
"
weekName
"
:
""
,
"
weekNum
"
:
1
});
daysArray
.
push
({
"
date_text
"
:
"
技术
"
,
"
weekName
"
:
""
,
"
weekNum
"
:
2
});
daysArray
.
push
({
"
date_text
"
:
"
项目管理
"
,
"
weekName
"
:
""
,
"
weekNum
"
:
3
});
daysArray
.
push
({
"
date_text
"
:
"
顾问
"
,
"
weekName
"
:
""
,
"
weekNum
"
:
4
});
daysArray
.
push
({
"
date_text
"
:
"
产品
"
,
"
weekName
"
:
""
,
"
weekNum
"
:
5
});
daysArray
.
push
({
"
date_text
"
:
"
销售
"
,
"
weekName
"
:
""
,
"
weekNum
"
:
6
});
daysArray
.
push
({
"
date_text
"
:
"
HR
"
,
"
weekName
"
:
""
,
"
weekNum
"
:
7
});
weeksArray
=
daysArray
;
return
daysArray
;
}
var
dealData
=
function
(
scheduleInfoList
)
{
var
tag
=
weeksArray
[
0
].
weekNum
;
console
.
log
(
'
tag:
'
+
tag
);
var
ar
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
1
,
2
,
3
,
4
,
5
,
6
,
7
];
var
A_Mon_text_ar
=
[];
var
A_Tues_text_ar
=
[];
var
A_Wed_text_ar
=
[];
var
A_Thur_text_ar
=
[];
var
A_Fri_text_ar
=
[];
var
A_Sat_text_ar
=
[];
var
A_Sun_text_ar
=
[];
var
B_Mon_text_ar
=
[];
var
B_Tues_text_ar
=
[];
var
B_Wed_text_ar
=
[];
var
B_Thur_text_ar
=
[];
var
B_Fri_text_ar
=
[];
var
B_Sat_text_ar
=
[];
var
B_Sun_text_ar
=
[];
var
C_Mon_text_ar
=
[];
var
C_Tues_text_ar
=
[];
var
C_Wed_text_ar
=
[];
var
C_Thur_text_ar
=
[];
var
C_Fri_text_ar
=
[];
var
C_Sat_text_ar
=
[];
var
C_Sun_text_ar
=
[];
for
(
var
i
=
0
;
i
<
scheduleInfoList
.
length
;
i
++
)
{
// console.log(scheduleInfoList[i].scheduleId + "222222");
if
(
scheduleInfoList
[
i
].
timePeriod
==
'
A
'
)
{
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
])
{
A_Mon_text_ar
=
A_Mon_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
1
])
{
A_Tues_text_ar
=
A_Tues_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
2
])
{
A_Wed_text_ar
=
A_Wed_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
3
])
{
A_Thur_text_ar
=
A_Thur_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
4
])
{
A_Fri_text_ar
=
A_Fri_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
5
])
{
A_Sat_text_ar
=
A_Sat_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
6
])
{
A_Sun_text_ar
=
A_Sun_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
}
else
if
(
scheduleInfoList
[
i
].
timePeriod
==
'
B
'
)
{
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
])
{
B_Mon_text_ar
=
B_Mon_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
1
])
{
B_Tues_text_ar
=
B_Tues_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
2
])
{
B_Wed_text_ar
=
B_Wed_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
3
])
{
B_Thur_text_ar
=
B_Thur_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
4
])
{
B_Fri_text_ar
=
B_Fri_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
5
])
{
B_Sat_text_ar
=
B_Sat_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
6
])
{
B_Sun_text_ar
=
B_Sun_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
}
else
{
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
])
{
C_Mon_text_ar
=
C_Mon_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
1
])
{
C_Tues_text_ar
=
C_Tues_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
2
])
{
C_Wed_text_ar
=
C_Wed_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
3
])
{
C_Thur_text_ar
=
C_Thur_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
4
])
{
C_Fri_text_ar
=
C_Fri_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
5
])
{
C_Sat_text_ar
=
C_Sat_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
else
if
(
scheduleInfoList
[
i
].
dayOfWeek
==
ar
[
tag
+
6
])
{
C_Sun_text_ar
=
C_Sun_text_ar
.
concat
(
scheduleInfoList
[
i
]);
}
}
}
var
sch_listData
=
[{
"
time_title
"
:
"
资源管理部
"
,
"
Mon_text
"
:
A_Mon_text_ar
,
"
Tues_text
"
:
A_Tues_text_ar
,
"
Wed_text
"
:
A_Wed_text_ar
,
"
Thur_text
"
:
A_Thur_text_ar
,
"
Fri_text
"
:
A_Fri_text_ar
,
"
Sat_text
"
:
A_Sat_text_ar
,
"
Sun_text
"
:
A_Sun_text_ar
},
{
"
time_title
"
:
"
产品与研发事业部
"
,
"
Mon_text
"
:
B_Mon_text_ar
,
"
Tues_text
"
:
B_Tues_text_ar
,
"
Wed_text
"
:
B_Wed_text_ar
,
"
Thur_text
"
:
B_Thur_text_ar
,
"
Fri_text
"
:
B_Fri_text_ar
,
"
Sat_text
"
:
B_Sat_text_ar
,
"
Sun_text
"
:
B_Sun_text_ar
},
{
"
time_title
"
:
"
TeleWork事业部
"
,
"
Mon_text
"
:
C_Mon_text_ar
,
"
Tues_text
"
:
C_Tues_text_ar
,
"
Wed_text
"
:
C_Wed_text_ar
,
"
Thur_text
"
:
C_Thur_text_ar
,
"
Fri_text
"
:
C_Fri_text_ar
,
"
Sat_text
"
:
C_Sat_text_ar
,
"
Sun_text
"
:
C_Sun_text_ar
}]
return
sch_listData
;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/hr/hr.json
0 → 100644
View file @
b4714a87
{
"navigationBarTitleText"
:
"简历审核"
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/hr/hr.wxml
0 → 100644
View file @
b4714a87
<!--index.wxml-->
<view class="">
<view class="track-bg">
<view class="track-input-block">
<navigator url="/pages/search/search?n=" class="link">
<icon type="search" size="15" color="purple" />
<input class="track-input" placeholder="岗位|人名"/>
</navigator>
<navigator url="/pages/leader/leader">
<image src="/assets/images/book0.jpg" class="img-plus-book"></image>
</navigator>
</view>
</view>
<!-- 简历投递表 -->
<scroll-view scroll-x="true" class='scrollClass'>
<view class='table'>
<view class='table_header'>
<view class="th" style='width:230rpx;background-color:white'>
<view class='centerclass cell_label'>简历查看</view>
</view>
<block wx:for="{{dateArray}}">
<view class='th'>
<view class="cell_label centerclass">{{item.weekName}}</view>
<view class="cell_date_label centerclass">{{item.date_text}}</view>
</view>
</block>
</view>
<block wx:for="{{sch_listData}}">
<view class='table_main'>
<!--部门 -->
<view class='td' style='width:230rpx;background-color:white;'>
<view class="cell_label centerclass">{{item.time_title}}</view>
</view>
<!-- 1 -->
<view class='td'>
<block wx:for="{{item.Mon_text}}" wx:for-item="trade" wx:for-index="ind">
<view class='{{item.Mon_text.length-1==ind? "table_Text_last_class":"table_Text_class"}}' bindtap='clickDoctor' data-docname='{{trade.docName}}' data-timeperiod='{{trade.timePeriod}}'
data-dayOfWeek='{{trade.dayOfWeek}}'><text> {{trade.docName}} \n {{trade.resourceName}}</text> </view>
</block>
</view>
<!--2 -->
<view class='td'>
<block wx:for="{{item.Tues_text}}" wx:for-item="trade" wx:for-index="ind">
<view class='{{item.Tues_text.length-1==ind? "table_Text_last_class":"table_Text_class"}}' bindtap='clickDoctor' data-docname='{{trade.docName}}' data-timeperiod='{{trade.timePeriod}}'
data-dayOfWeek='{{trade.dayOfWeek}}'><text> {{trade.docName}} \n {{trade.resourceName}}</text></view>
</block>
</view>
<!--3 -->
<view class='td'>
<block wx:for="{{item.Wed_text}}" wx:for-item="trade" wx:for-index="ind">
<view class='{{item.Wed_text.length-1==ind? "table_Text_last_class":"table_Text_class"}}' bindtap='clickDoctor' data-docname='{{trade.docName}}' data-timeperiod='{{trade.timePeriod}}'
data-dayOfWeek='{{trade.dayOfWeek}}'><text> {{trade.docName}} \n {{trade.resourceName}}</text></view>
</block>
</view>
<!--4 -->
<view class='td'>
<block wx:for="{{item.Thur_text}}" wx:for-item="trade" wx:for-index="ind">
<view class='{{item.Thur_text.length-1==ind? "table_Text_last_class":"table_Text_class"}}' bindtap='clickDoctor' data-docname='{{trade.docName}}' data-timeperiod='{{trade.timePeriod}}'
data-dayOfWeek='{{trade.dayOfWeek}}'><text> {{trade.docName}} \n {{trade.resourceName}}</text></view>
</block>
</view>
<!--5 -->
<view class='td'>
<block wx:for="{{item.Fri_text}}" wx:for-item="trade" wx:for-index="ind">
<view class='{{item.Fri_text.length-1==ind? "table_Text_last_class":"table_Text_class"}}' bindtap='clickDoctor' data-docname='{{trade.docName}}' data-timeperiod='{{trade.timePeriod}}'
data-dayOfWeek='{{trade.dayOfWeek}}'><text> {{trade.docName}} \n {{trade.resourceName}}</text></view>
</block>
</view>
<!--6 -->
<view class='td'>
<block wx:for="{{item.Sat_text}}" wx:for-item="trade" wx:for-index="ind">
<view class='{{item.Sat_text.length-1==ind? "table_Text_last_class":"table_Text_class"}}' bindtap='clickDoctor' data-docname='{{trade.docName}}' data-timeperiod='{{trade.timePeriod}}'
data-dayOfWeek='{{trade.dayOfWeek}}'><text> {{trade.docName}} \n {{trade.resourceName}}</text></view>
</block>
</view>
<!-- 7 -->
<view class='td'>
<block wx:for="{{item.Sun_text}}" wx:for-item="trade" wx:for-index="ind">
<view class='{{item.Sun_text.length-1==ind? "table_Text_last_class":"table_Text_class"}}' bindtap='clickDoctor' data-docname='{{trade.docName}}' data-timeperiod='{{trade.timePeriod}}'
data-dayOfWeek='{{trade.dayOfWeek}}'><text> {{trade.docName}} \n {{trade.resourceName}}</text></view>
</block>
</view>
</view>
</block>
</view>
</scroll-view>
</view>
02-PG/小程序/weapp-demo/page/hr/hr.wxss
0 → 100644
View file @
b4714a87
/**index.wxss**/
.container {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.track-bg {
background-color: #f8f8f8;
padding-bottom: 180rpx;
width: 100%;
text-align: center;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAAABOo35HAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAS1BMVEXp3cbv48zz7NXy5s/z69Tz6NHz7dnq3sfz6tPx5c7t4crz7dbs4Mnz7djr38ju4svz6dLz59Dz7dfz7drw5M3z7dvz7dzz7d0AAABbZDHFAAAAAWJLR0QYm2mFHgAAAAlwSFlzAAALEgAACxIB0t1+/AAACYBJREFUeNrtnY2SoyoQhRUhgBBExt37/m96Af/GRGNmN2LInq92p5xM1Yw5odumaZqiAAAAAAAAAAAAAAAA5EhJSHX2PeRCSYuClWffRR4ErYriws++jxzotaqEOPtGMqCMIklWq7Pv5P3ptaqYJjDDPcpreAx6rRS02sP7K1Z5rYwyZ9/K2xNtkBFo9QSjv+JKn30rb8+oVQGtdpm0KuDb95i1AntAq+c5VStGzn77P+JMrWrSMCtberYGz1LGj/YcrVrrnyemdbTJ5MmiaHmSVprEvBmzRWHFlztbiCdoy4KWp2hViTCYesW4kEzq5s1TtCa4i8sZWrVt+CppUKwhPhTu7K/L2XI8RujRGlITXCUXcSyx+GGVRL+3o29s0YpzXOulrKsv79j9hxW+cusVe2+xSKPOWpygsm1CQlaq3hDr4s3FkteThlXRC+OooHFchSdi8eZiuRPXvOjwn7nW/5tfAytMYunalHJ+Dawwi+UfhBDrMRDrB0CsHwCxfsCaWFgI3+BerDoGpmCFO7FicgusQlvJQg5rEMucM53PhboMBSicRLE6inXwHbQQltZjSQrYxVAPlsEBAAAAAAAAAAAAAAAAnI8pPU1Ae7DS9ojOtRULWI+gymFZZJtWLr/nDBuat1G3Q6lxWEfaxN42qNCuOfue3hfpbla6uZJ/9pv+BdrLVJoj+2FGsa9yC6ddN17L3mMx1MytU9PvQ2kQrnOoQllDBH/ezhFD35Io6UORqkAOH0+/i7GcxenipUm3XcLGwfzme7gi5WCBRrHxo9UuPA65SxWekoIbw4sMtoLXU5zVeWtwTjmlyG9lLUslVnMhRAhCvjKI7+5rektmuotsUg0sO4xok0EDt3vnFMoyk7ms756qfH+3xSldDC4ea+1Lm+SPL4uKZQbRcE1dNRtdn4mgSSru2c3MKov4oZCKjGF8jCV4kr4Ipn8C8o6xLn5aZQZDK944c7bmuotxQ1ElyQLaOHwrVzVN1f/dfLbbNJaItjeEa5JnYZTGDpt0Y4cBkWE2jX2l+Ct1NLrJ8oR39mV79lv/+btwScyB+TC0m7+Nj+EM4vgbXJckPlTF0kkFG8zHaY3IJCEpJ6MlDnQydv4BK3RV1IZNCMcYsrTrCMGYE0WzJD87TIKK4ty+6hT6Vt/CiVp/8NlaYln8hko2Q0hlSMwqK9LHo7IS7598SAwV43NvXBvR/XRUf0m4rRuU/Ioi8WKK2fuZog9L8wtMD2aUpCns+JLVi5+AiVESPUtDlj8BE7MkkzSDq7pKOPgbqLwOV+MZRm0/p24o6lLukOOyEh9CB9t/K7LILKdGr2Y2Ei2UZIe4TzDwfDpup4a0YRaovoF2O9t03l2dfQ8AAAAAAAAAAAAAAAAAAAAAZEFzxekVT+NM7fLb0XIObajdTbPlIXtMX5bKBYEt7kLGqvpawRZ36NRsgLDFHRzndjJAfv2r3/XpsFBn6dywU6pGGe8DdKhe6thogHls5D8LpYcGOvqXt0UJD/+AWIwaGybRplYsSauFbIljKvipMhT2osvjI6J3D5YYVSvfvwfQiYzefXwmYn/nA8jk3YNqDJs0HjB792CJGiXQj5i8e2wqhTORHxHNro+z/EVnz76fdyZmZqJ3p03Kzo5ZYojgcUw1IWKw3d/+vg+ndGqMGDQm0I9QYeLcqnp2XWATSkISy1AaIoYceiyeiZR+4lwEW6wS9SrMmNCVuU9itQ4bFvcIo4nb2IsWbWz26Behe1sEO8h+3lxer0gl72IoL5lSDAm/Z3AQ6hy0WgP2vcrqDABzqFX4uizoQ7jGRr9itE9dY+NJ0SCGW2HL3uC0VlA/fP1fxmx1WUJd7z3l1ky8QrL6js2ZQA0Pf8e2H4fTukP9wU/+WSDWD6hEuY5IkIPVjuSVFq9lpKrk8iJB+YR2vODMnq3AzxGjOHWysjjTty9n+cUos4dKdWQ7H88uzc45Srl2eSSTVvmJ5b4lSdMs26rR7jM45HHJwlGJFKVx0xat/E6HWeiTwsVPEUOdykW+DL78dI+//6mru85Oq1uffvjRNpYNGukMD4ZXO9+/GNYWdSztNBlqdeekjnXxbUj+1F4nHz3oJE+TV8Jub/jQXFb1Ff+cdtpJQrGj9BGd4H2IVf/+YoZlNY9OTQhBe7UU5diq/JAyZma5anz0ECJ3iaKKTcZwnYdTvFVIm1Vf+SUd0jCH68L6yJRVAXitVeZwnV28RBJjaps5BGUsuC6N3bebmCmBVbGCaNfll8hKBr+6IVqXtiiFM626ZDeJTgVpCkPDDL2jwWd5i+QMu442iDZHmz4xaiHTQ6JYhjao+3oCG+OpK5z6M/CwS7K5wqc/BbeKUGgFAAAAAAAAAAAAAAAAAGSGFqxDm/fnYMK0hGOd7Ql43LCheIlN8LuYvlFTLQqKsoAd+Hj0kG0MigN2mIaT91kVThF4SDfvNPI+C32/HvL9EUh1ui3euaEls/Z7szTvs7BnYw1tKStrsyz48j4LwdYdRojBr7eLCnGCYOsO+S2iWmyG1SLNHu+MiCfpjCx9ujAGPn7BQiwfjM7XTODEpiVMqO+mNk+gOS0NwS6XBaxcJhhGn86VLnHu8S2Kd4tetIO7V7qyZ9/a+9HYZbfLfgIt6hbHh65ga3MbjHpjrKDVGt5n3QSjplA4M20D77OWwShtBJJZW3xLMHDd1IZdcb7cJt5nxWC0pISylqlf/yG+2qbtvOOSSvJCM0pZh/T7IxRvVOUfhIRh5rxL9FltXo1Oz8OWHaR6Fm5xUhoAAOxzwMzqsnYI2eXsN/oCaNW9XC339It5ERqfvFytDxUrNol5uVqfKRZ1fcb/xWp9pFh+XNkj1Bp14dOXInuxog32xSjVSxdzB114bPg+NgvJWyzqosMKM9LqtX3sP08sP67GhuMv1urzxKLhnfRLcK/WahaLez5ALNpOpQEv12rShYbInd68mB/Btw9qvV6rDwsd+gbjJKSwD9Dqs8Ty88GxGOUIrYrfboXfZ7/rPyPOB/sH4SFafdLIovNtH6PVB4lFq9YOlwdp9TliBRscTss7SqtJl3L6UmQpVoxF+zPbD9PqUyJ4H4uOJb3HafUhYkUb7C8P1OozxKLzho0jtZrEcuH0BZenWNROLf8P1Wp28JGbF/PA22DtDsozLMk/dIhHHtfxlg/W6gPE6pMMYWQdrdUHiDWmZI7X6iNWpHu1jtfqMwhqQatnIR20eh6CzZ4AAAAAAAAAAHLhfw+JSKrSqPWEAAAAAElFTkSuQmCC);
position: relative;
}
.track-bg:after {
content: ' ';
position: absolute;
width: 100%;
height: 80rpx;
z-index: 10;
background-color: #fff;
left: 0;
bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
}
.track-bg .logo {
width: 35%;
margin-bottom: 50rpx;
margin-top: 70rpx;
}
.track-input-block {
position: relative;
top:30px;
}
.track-input-block icon {
position: absolute;
left: 46rpx;
/*right:40rpx;*/
top: 22rpx;
}
.track-input {
box-shadow: inset 0 2rpx 2rpx rgba(0, 0, 0, 0.075), 0 0 16rpx #ccc;
background-color: #fff;
border: 1px solid #ccc;
width: 80%;
border-radius: 12rpx;
font-size: 24rpx;
margin: 0 auto;
height: 70rpx;
text-align: left;
padding: 0rpx 30rpx 0rpx 60rpx;
}
.track-history {
padding: 20rpx;
width: 90%;
margin-top: -20rpx;
}
.track-history-title {
font-size: 24rpx;
color: #999;
margin-bottom: 20rpx;
}
.track-history-item {
border: 2rpx solid #ddd;
border-radius: 8rpx;
box-shadow: 0 2rpx 2rpx rgba(0, 0, 0, 0.05);
font-size: 24rpx;
margin-bottom: 30rpx;
}
.track-history-item-title {
padding: 20rpx;
color: #333;
background-color: #f5f5f5;
border-color: #ddd;
border-top-left-radius: 6rpx;
border-top-right-radius: 6rpx;
}
.track-history-item-title icon {
float: left;
overflow: hidden;
margin-top: 0;
}
.track-history-item-title view {
margin-left: 80rpx;
min-height: 62rpx;
}
.track-history-item-title text {
display: block;
}
.track-history-item-title .track-number {
font-size: 28rpx;
color: #31708f;
font-weight: bold;
margin-bottom: 10rpx;
}
.track-history-item-content {
padding: 20rpx;
}
.track-history-item-content text {
display: block;
}
.track-success {
border-color: #d6e9c6;
}
.track-success .track-history-item-title {
background-color: #dff0d8;
}
.track-error {
border-color: #ebccd1;
}
.track-error .track-history-item-title {
background-color: #f2dede;
}
.track-info {
border-color: #bce8f1;
}
.track-info .track-history-item-title {
background-color: #d9edf7;
}
.track-null {
border-color: #ddd;
}
.track-null .track-history-item-title {
background-color: #f5f5f5;
}
.i-scan {
width: 5%;
position: absolute;
right: 50rpx;
top: 20rpx;
z-index: 10;
}
.pos{
position: absolute;
top: 30%;
left: 23px;
opacity: 1;
}
.dbtext{
position: absolute;
top: 33%;
left: 23px;
opacity: 1;
line-height: 15px;
color: #666;
font-size: 12px;
}
.zixun{
width: 55px; height: 55px;
position: fixed;
top: 170px;
left: 10px;
border-radius: 50%;
box-shadow: 0 0 5px #ddd;
text-align: center;
font-size: 14px;
color: #333;
}
.zixun .kf{
position: relative; top: 0px; left: 0px; margin:15px auto; opacity: 0;
}
/* 规则提示层 */
.isRuleShow{
display: block;
}
.isRuleHide{
display: none;
}
.ruleZhezhao{
height: 100%;
width: 100%;
position: fixed;
background-color:rgba(0, 0, 0, .5);
z-index: 2;
top: 0;
left: 0;
}
.ruleZhezhaoContent{
padding: 20rpx 0;
width: 80%;
background: #e1d2b1;
margin: 20% auto;
border-radius: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
position: relative;
}
.ruleZhezhaoText{
width: 80%;
font-size: 30rpx;
color: #856d5f;
display: flex;
flex-direction: row;
align-items: center;
margin: 15rpx 0 15rpx 0;
}
/* .ruleZhezhaoText text:nth-child(1){
color: #fff;
font-size: 40rpx;
height: 60rpx;
width: 60rpx;
background: #664a2c;
display: block;
text-align: center;
line-height: 60rpx;
border-radius: 30rpx;
margin-right: 10rpx;
} */
/* .ruleZhezhaoText text:nth-child(2){
flex-wrap:wrap;
width: 80%;
} */
.ruleHide{
height: 60rpx!important;
width: 60rpx!important;
position: absolute;
top: -20rpx;
right: -20rpx;
}
.rule{
display: block;
border: 1px solid #fff;
/*width: 80rpx;*/
line-height: 60rpx;
/*color: #fff;*/
/*height: 60rpx;
font-size: 26rpx;*/
border-radius: 28rpx;
/*position: absolute;
top: 10%;
right: 10%;
text-align:right; */
background-color: #7fe756;
}
/* end */
/** 语音服务 start */
.radio-group radio{
margin-left: 5rpx;
transform:scale(0.8);
font-size:16px;
}
/** 语音服务 end */
.img-plus-style {
height: 70rpx;
width: 70rpx;
position: fixed;
bottom: 220rpx;
right: 30rpx;
opacity: 0.7
}
.img-plus-style1 {
height: 70rpx;
width: 70rpx;
position: fixed;
bottom: 130rpx;
right: 30rpx;
opacity: 0.7
}
/**题库*/
.img-plus-style2 {
height: 65rpx;
width: 65rpx;
position: fixed;
bottom: 400rpx;
right: 30rpx;
opacity: 0.7;
border-radius: 15rpx;
}
.zindex100{z-index: 100}
.yc{opacity: 0}
/**书籍*/
.img-plus-book {
height: 40rpx;
width: 50rpx;
position: fixed;
top: 276rpx;
right: 40rpx;
opacity: 0.7
}
/**故事*/
.img-plus-style3 {
height: 65rpx;
width: 65rpx;
position: fixed;
bottom: 310rpx;
right: 30rpx;
opacity: 1;
border-radius: 15rpx;
border: 1px solid #7fe756;
}
/**公告 */
.swiper_container {
height: 55rpx;
width: 80vw;
position: fixed;
top: 405rpx;
left:30rpx;
/**number代表透明度的值 取值范围0—1 1代表不透明 0代表全透明 */
opacity:1;
}
/**公告 */
.swiper_item {
font-size: 25rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
letter-spacing: 2px;
}
/*科室排班表 */
.table{
display: inline-flex;
flex-direction: column;
border: 1rpx solid rgba(218, 217, 217, 1);
border-bottom: 0;
}
.scrollClass {
display: flex;
width: 100%;
white-space: nowrap;
margin-top: 23px;
height: 100%;
background-color: white;
}
.table_header {
display: inline-flex;
}
.th {
display: flex;
flex-direction: column;
width: 300rpx;
height: 110rpx;
background: rgba(241, 252, 255, 1);
border-right: 1rpx solid rgba(218, 217, 217, 1);
border-bottom: 1rpx solid rgba(218, 217, 217, 1);
justify-content: center;
align-items: center;
overflow-x: auto;
}
.cell_label{
font-size: 26rpx;
color: rgba(74, 74, 74, 1);
}
.cell_date_label{
font-size: 20rpx;
color: rgba(74, 74, 74, 1);
}
.table_main {
display: inline-flex;
flex-direction: row;
}
.right-item{
display: flex;
flex-direction: row;
}
.td {
display: flex;
flex-direction: column;
width: 300rpx;
height: 90rpx;
background: white;
justify-content: center;
align-items: center;
border: 1rpx solid rgba(218, 217, 217, 1);
border-top: 0;
border-left:0;
}
.table_Text_class {
display: flex;
justify-content: center;
align-items: center;
height: 60rpx;
font-size: 30rpx;
color: rgba(55, 134, 244, 1);
width: 100%;
word-break: normal;
border-bottom: 1rpx solid rgba(218, 217, 217, 1);
}
.table_Text_last_class{
display: flex;
justify-content: center;
align-items: center;
height: 60rpx;
font-size: 30rpx;
color: rgba(55, 134, 244, 1);
width: 100%;
word-break: normal;
}
\ No newline at end of file
02-PG/小程序/weapp-demo/page/my/my.js
View file @
b4714a87
var
globalData
=
require
(
'
../../util/globalData.js
'
);
var
commonUtil
=
require
(
'
../../util/commonUtil.js
'
);
Page
({
/**
* 页面的初始数据
*/
// data: {
// historyList:[], //播放记录
// localStorageSize:'0', //本地缓存大小
// canIUse: wx.canIUse('button.open-type.getUserInfo')
// },
data
:
{
historyList
:[],
//播放记录
localStorageSize
:
'
0
'
,
//本地缓存大小
canIUse
:
wx
.
canIUse
(
'
button.open-type.getUserInfo
'
)
menuList
:
[{
name
:
'
在线简历
'
,
APIList
:
[{
zhName
:
'
我的简历
'
,
enName
:
'
5年--青岛--全职
'
,
url
:
'
/page/resumeOnline/resumeOnline
'
,
bindtap
:
'
resumeOnline
'
}],
opened
:
false
},
{
name
:
'
附件简历
'
,
opened
:
false
,
APIList
:
[{
zhName
:
'
最新简历.docx
'
,
enName
:
'
2019年11月更新
'
,
url
:
''
,
bindtap
:
'
resumeUpload
'
}]
},
{
name
:
'
感兴趣的职位
'
,
opened
:
false
,
APIList
:
[{
zhName
:
'
SAP实施顾问(PP模块
'
,
enName
:
'
资源管理部--上海市,深圳市--全职
'
,
url
:
'
/page/job/job
'
},
{
zhName
:
'
SAP CRM 技术顾问
'
,
enName
:
'
资源管理部--上海市,昆明市--全职
'
,
url
:
'
/page/job/job
'
}]
},
{
name
:
'
简历审核(HR)
'
,
opened
:
false
,
APIList
:
[{
zhName
:
'
软件开发高级经理
'
,
enName
:
'
TeleWork事业部--上海市--全职
'
,
url
:
'
/page/hr/hr
'
}]
}
]
},
tapMenuItem
:
function
(
e
)
{
var
menuItem
=
this
.
data
.
menuList
[
parseInt
(
e
.
currentTarget
.
id
)]
if
(
menuItem
.
url
)
{
wx
.
navigateTo
({
url
:
menuItem
.
url
})
}
else
{
var
changeData
=
{}
var
opened
=
menuItem
.
opened
changeData
[
'
menuList[
'
+
e
.
currentTarget
.
id
+
'
].opened
'
]
=
!
opened
this
.
setData
(
changeData
)
}
},
//简历上传
resumeUpload
:
function
(
e
)
{
wx
.
showToast
({
title
:
"
只能上传word、PPT、PDF
"
,
// 标题
icon
:
'
success
'
,
// 图标类型,默认success
duration
:
1500
// 提示窗停留时间,默认1500ms
});
},
//在线简历
resumeOnline
:
function
(
e
)
{
var
syncFlg
=
false
;
try
{
// 同步接口立即返回值
var
resumeData
=
globalData
.
getGlobalData
(
'
base
'
);
console
.
log
(
resumeData
);
console
.
log
(
!
commonUtil
.
isEmptyObject
(
resumeData
));
if
(
!
commonUtil
.
isEmptyObject
(
resumeData
))
{
syncFlg
=
true
;
}
}
catch
(
e
)
{
console
.
log
(
'
读取key2发生错误
'
);
syncFlg
=
false
;
}
var
url
=
'
/page/resume/resume?op=base
'
;
if
(
syncFlg
)
{
url
=
'
/page/resumeOnline/resumeOnline
'
;
}
wx
.
navigateTo
({
url
:
url
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
var
that
=
this
;
// // 查看是否授权
// wx.getSetting({
// success(res) {
// if (res.authSetting['scope.userInfo']) {
// // 已经授权,可以直接调用 getUserInfo 获取头像昵称
// wx.getUserInfo({
// success: function (res) {
// console.log(res.userInfo)
// }
// })
// }
// }
// });
//查看历史播放记录
this
.
onShowStorage
();
// 查看是否授权
wx
.
getSetting
({
success
(
res
)
{
if
(
res
.
authSetting
[
'
scope.userInfo
'
])
{
// 已经授权,可以直接调用 getUserInfo 获取头像昵称
wx
.
getUserInfo
({
success
:
function
(
res
)
{
console
.
log
(
res
.
userInfo
)
}
})
}
}
});
},
/**
...
...
02-PG/小程序/weapp-demo/page/my/my.wxml
View file @
b4714a87
<!--pages/my/my.wxml-->
<view class="container">
<view class="header-image">
<!-- <image src="../../images/user_photo.png" mode="widthFix"></image>
<text>Smart</text> -->
<open-data type="userAvatarUrl" class="icon" mode="aspectFit"></open-data>
<open-data type="userNickName" lang="zh_CN" class="text"></open-data>
</view>
<!-- 如果只是展示用户头像昵称,可以使用 <open-data /> 组件 -->
<!-- <open-data type="userAvatarUrl"></open-data>
<open-data type="userNickName"></open-data> -->
<!-- 需要使用 button 来授权登录 -->
<!-- <button wx:if="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button>
<view wx:else>请升级微信版本</view> -->
<text>简历</text>
<view class="history">
<text>在线简历</text>
<text class="fr">></text>
<view class="menu-list">
<block wx:key = 'menu' wx:for-items="{{menuList}}" wx:for-item="menuItem">
<view class="menu-item">
<view class="menu-item-main" id="{{index}}" bindtap="tapMenuItem">
<text class="menu-item-name">{{menuItem.name}}</text>
<image
class="menu-item-arrow {{menuItem.opened ? 'open' : 'close'}} {{menuItem.url ? 'url' : ''}}"
src="/image/arrowright.png">
</image>
</view>
<view class="history">
<text>附件简历</text>
<text class="fr">></text>
</view>
<text>职位</text>
<view class="history">
<text>感兴趣的职位</text>
<text class="fr">></text>
</view>
<view class="history">
<text>简历审核(HR)</text>
<text class="fr">></text>
</view>
<view class="history">
<contact-button type="default-dark" size="20" session-from="weapp">
<text>意见反馈</text>
<text class="fr"></text>
</contact-button>
<view class="menu-item-api-list {{menuItem.opened ? 'open' : 'close'}}">
<block wx:key = 'menuItem' wx:for-items="{{menuItem.APIList}}" wx:for-item="APIItem">
<view class="menu-item-api-item" style="{{index === 0 ? 'border-top:none;' : ''}}">
<navigator url="{{APIItem.url}}" bindtap="{{APIItem.bindtap}}">
<view class="menu-item-api-item-text">
<text class="menu-item-api-item-text-zhname">{{APIItem.zhName}}</text>
<text class="menu-item-api-item-text-enname">{{APIItem.enName}}</text>
</view>
</navigator>
<image class="menu-item-api-item-arrow" src="/image/arrowright.png"></image>
</view>
</block>
</view>
</view>
</block>
</view>
<button type="default" size="defaultSize" bindtap="nextEdu"> 退 出
</button>
</view>
02-PG/小程序/weapp-demo/page/my/my.wxss
View file @
b4714a87
...
...
@@ -14,6 +14,7 @@
/*padding: 48rpx 0;*/
background: #fff;
text-align: center;
border-bottom: 1rpx solid #e2e2e2;
}
.container .header-image image {
...
...
@@ -71,9 +72,9 @@
width: 100%;
height: auto;
margin: 16rpx 0 0 0;
padding:
56rpx 0 56
rpx 40rpx;
font-size:
28
rpx;
font-weight: bold;
padding:
40rpx 0 40
rpx 40rpx;
font-size:
34
rpx;
/*font-weight: bold;*/
background: #fff;
border-bottom: 1rpx solid #e2e2e2;
}
...
...
@@ -156,3 +157,109 @@
margin-top: 20rpx;
font-size: 38rpx;
}
.menu-item-api-item-arrow {
width: 32rpx;
height: 32rpx;
}
.contact-button {
display: block;
line-height: 0;
z-index: 9999999999;
}
/*******************************/
/* page/job/job.wxss */
.header {
padding: 40px;
}
.title {
font-size: 30px;
}
.desc {
margin-top: 5px;
color: #888888;
font-size: 14px;
line-height: 1.4;
}
.menu-list {
display: flex;
flex-direction: column;
background-color: #fbf9fe;
}
.menu-item {
color: #000000;
display: flex;
background-color: #fff;
/*margin: 10rpx 40rpx;*/
margin-bottom: 10rpx;
flex-direction: column;
border-bottom: 1rpx solid #e2e2e2;
}
.menu-item-main {
display: flex;
height: 100rpx;
padding: 20rpx;
border-radius: 10rpx;
align-items: center;
font-size: 36rpx;
justify-content: space-between;
}
.menu-item-arrow {
width: 32rpx;
height: 32rpx;
transition: 400ms;
}
.menu-item-arrow.open {
transform: rotate(-90deg);
}
.menu-item-arrow.close {
transform: rotate(90deg);
}
.menu-item-arrow.url {
transform: rotate(0deg);
}
.menu-item-api-list {
transition: 200ms;
height: auto;
border-top: 1px solid #d8d8d8;
}
.menu-item-api-list.close {
display: none;
height: 0;
}
.menu-item-api-item {
display: flex;
justify-content: space-between;
height: 80rpx;
padding: 20rpx 20rpx 20rpx 0;
margin-left: 20rpx;
align-items: center;
border-top: 1px solid #f0f0f0;
}
.menu-item-api-item-text {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}
.menu-item-api-item-text-zhname {
font-size: 30rpx;
}
.menu-item-api-item-text-enname {
font-size: 26rpx;
color: #6b6b6b;
}
.menu-item-api-item-arrow {
width: 32rpx;
height: 32rpx;
}
.buttonCSS {
font-size: 30rpx;
width:150rpx;
height:80rpx;
margin:0rpx;
padding: 0rpx;
}
02-PG/小程序/weapp-demo/page/my/my_old.wxml
0 → 100644
View file @
b4714a87
<!--pages/my/my.wxml-->
<view class="container">
<view class="header">
<open-data type="userAvatarUrl" class="icon" mode="aspectFit"></open-data>
<open-data type="userNickName" lang="zh_CN" class="text"></open-data>
</view>
<!-- 如果只是展示用户头像昵称,可以使用 <open-data /> 组件 -->
<!-- <open-data type="userAvatarUrl"></open-data>
<open-data type="userNickName"></open-data> -->
<!-- 需要使用 button 来授权登录 -->
<!-- <button wx:if="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button>
<view wx:else>请升级微信版本</view> -->
<text>简历</text>
<view class="history" bindtap="resumeOnline">
<text>在线简历</text>
<image class="menu-item-api-item-arrow" src="/image/arrowright.png"></image>
</view>
<view class="history">
<text>附件简历</text>
<image class="menu-item-api-item-arrow" src="/image/arrowright.png"></image>
</view>
<text>职位</text>
<view class="history">
<text>感兴趣的职位</text>
<image class="menu-item-api-item-arrow" src="/image/arrowright.png"></image>
</view>
<view class="history">
<text>简历审核(HR)</text>
<image class="menu-item-api-item-arrow" src="/image/arrowright.png"></image>
</view>
<view class="history">
<contact-button type="default-dark" size="20" session-from="weapp" class="contact-button">
<text>意见反馈</text>
<image class="menu-item-api-item-arrow" src="/image/arrowright.png"></image>
</contact-button>
</view>
<button type="default" size="defaultSize" bindtap="nextEdu"> 退 出
</button>
</view>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment