From 1b14435b4f74837952508a5b0b3bf699ad843d6e Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Sat, 7 Nov 2020 19:35:26 +0800 Subject: [PATCH 01/15] first init --- App.vue | 18 + README.en.md | 36 - README.md | 37 - common/api.js | 399 +++++ common/captcha.js | 49 + common/config.js | 38 + common/http.api.js | 378 +++++ common/http.interceptor.js | 30 + common/md5.js | 263 ++++ common/storage.js | 59 + common/tcplayer.js | 4 + common/utils.js | 146 ++ common/validator.js | 19 + components/kg-course-list/course-list.vue | 105 ++ main.js | 53 + manifest.json | 78 + pages.json | 254 +++ pages/account/forget.vue | 128 ++ pages/account/login.vue | 155 ++ pages/account/register.vue | 111 ++ pages/chapter/info.vue | 36 + pages/chapter/live.vue | 25 + pages/chapter/read.vue | 25 + pages/chapter/vod.vue | 78 + pages/consult/add.vue | 22 + pages/consult/edit.vue | 81 + pages/consult/info.vue | 22 + pages/course/category.vue | 55 + pages/course/consults.vue | 22 + pages/course/info.vue | 356 +++++ pages/course/list.vue | 139 ++ pages/course/reviews.vue | 64 + pages/help/info.vue | 22 + pages/help/list.vue | 22 + pages/im/group/index.vue | 22 + pages/im/group/list.vue | 22 + pages/index/index.vue | 133 ++ pages/me/account.vue | 22 + pages/me/consults.vue | 109 ++ pages/me/courses.vue | 103 ++ pages/me/favorites.vue | 110 ++ pages/me/friends.vue | 22 + pages/me/groups.vue | 22 + pages/me/index.vue | 62 + pages/me/orders.vue | 144 ++ pages/me/profile.vue | 111 ++ pages/me/refunds.vue | 142 ++ pages/me/reviews.vue | 123 ++ pages/order/confirm.vue | 140 ++ pages/order/info.vue | 124 ++ pages/order/pay.vue | 79 + pages/page/info.vue | 22 + pages/page/list.vue | 22 + pages/refund/confirm.vue | 8 + pages/refund/info.vue | 8 + pages/review/add.vue | 95 ++ pages/review/edit.vue | 94 ++ pages/review/info.vue | 22 + pages/search/index.vue | 98 ++ pages/teacher/index.vue | 22 + pages/teacher/list.vue | 22 + pages/trade/h5pay.vue | 27 + pages/user/index.vue | 22 + pages/vip/index.vue | 80 + static/css/common.css | 51 + uni.scss | 1 + uview-ui/LICENSE | 21 + uview-ui/README.md | 106 ++ .../u-action-sheet/u-action-sheet.vue | 190 +++ .../components/u-alert-tips/u-alert-tips.vue | 256 ++++ .../u-avatar-cropper/u-avatar-cropper.vue | 290 ++++ .../components/u-avatar-cropper/weCropper.js | 1265 +++++++++++++++ uview-ui/components/u-avatar/u-avatar.vue | 244 +++ uview-ui/components/u-back-top/u-back-top.vue | 153 ++ uview-ui/components/u-badge/u-badge.vue | 216 +++ uview-ui/components/u-button/u-button.vue | 596 ++++++++ uview-ui/components/u-calendar/u-calendar.vue | 639 ++++++++ .../u-car-keyboard/u-car-keyboard.vue | 257 ++++ uview-ui/components/u-card/u-card.vue | 298 ++++ .../components/u-cell-group/u-cell-group.vue | 70 + .../components/u-cell-item/u-cell-item.vue | 316 ++++ .../u-checkbox-group/u-checkbox-group.vue | 123 ++ uview-ui/components/u-checkbox/u-checkbox.vue | 284 ++++ .../u-circle-progress/u-circle-progress.vue | 220 +++ uview-ui/components/u-col/u-col.vue | 156 ++ .../u-collapse-item/u-collapse-item.vue | 204 +++ uview-ui/components/u-collapse/u-collapse.vue | 99 ++ .../u-column-notice/u-column-notice.vue | 237 +++ .../components/u-count-down/u-count-down.vue | 318 ++++ uview-ui/components/u-count-to/u-count-to.vue | 241 +++ uview-ui/components/u-divider/u-divider.vue | 153 ++ .../u-dropdown-item/u-dropdown-item.vue | 132 ++ uview-ui/components/u-dropdown/u-dropdown.vue | 298 ++++ uview-ui/components/u-empty/u-empty.vue | 193 +++ uview-ui/components/u-field/u-field.vue | 384 +++++ .../components/u-form-item/u-form-item.vue | 431 ++++++ uview-ui/components/u-form/u-form.vue | 134 ++ .../u-full-screen/u-full-screen.vue | 52 + uview-ui/components/u-gap/u-gap.vue | 54 + .../components/u-grid-item/u-grid-item.vue | 126 ++ uview-ui/components/u-grid/u-grid.vue | 108 ++ uview-ui/components/u-icon/u-icon.vue | 336 ++++ uview-ui/components/u-image/u-image.vue | 266 ++++ .../u-index-anchor/u-index-anchor.vue | 89 ++ .../components/u-index-list/u-index-list.vue | 315 ++++ uview-ui/components/u-input/u-input.vue | 387 +++++ uview-ui/components/u-keyboard/u-keyboard.vue | 217 +++ .../components/u-lazy-load/u-lazy-load.vue | 244 +++ .../u-line-progress/u-line-progress.vue | 147 ++ uview-ui/components/u-line/u-line.vue | 84 + uview-ui/components/u-link/u-link.vue | 89 ++ .../u-loading-page/u-loading-page.vue | 25 + uview-ui/components/u-loading/u-loading.vue | 103 ++ uview-ui/components/u-loadmore/u-loadmore.vue | 203 +++ uview-ui/components/u-mask/u-mask.vue | 123 ++ .../u-message-input/u-message-input.vue | 311 ++++ uview-ui/components/u-modal/u-modal.vue | 283 ++++ uview-ui/components/u-navbar/u-navbar.vue | 315 ++++ .../components/u-no-network/u-no-network.vue | 233 +++ .../components/u-notice-bar/u-notice-bar.vue | 272 ++++ .../components/u-number-box/u-number-box.vue | 363 +++++ .../u-number-keyboard/u-number-keyboard.vue | 158 ++ .../components/u-parse/libs/CssHandler.js | 100 ++ .../components/u-parse/libs/MpHtmlParser.js | 580 +++++++ uview-ui/components/u-parse/libs/config.js | 80 + uview-ui/components/u-parse/libs/handler.wxs | 22 + uview-ui/components/u-parse/libs/trees.vue | 505 ++++++ uview-ui/components/u-parse/u-parse.vue | 645 ++++++++ uview-ui/components/u-picker/u-picker.vue | 676 ++++++++ uview-ui/components/u-popup/u-popup.vue | 456 ++++++ .../u-radio-group/u-radio-group.vue | 128 ++ uview-ui/components/u-radio/u-radio.vue | 271 ++++ uview-ui/components/u-rate/u-rate.vue | 275 ++++ .../components/u-read-more/u-read-more.vue | 179 +++ .../components/u-row-notice/u-row-notice.vue | 269 ++++ uview-ui/components/u-row/u-row.vue | 84 + uview-ui/components/u-search/u-search.vue | 342 +++++ uview-ui/components/u-section/u-section.vue | 154 ++ uview-ui/components/u-select/u-select.vue | 417 +++++ uview-ui/components/u-skeleton/u-skeleton.vue | 199 +++ uview-ui/components/u-slider/u-slider.vue | 257 ++++ uview-ui/components/u-steps/u-steps.vue | 200 +++ uview-ui/components/u-sticky/u-sticky.vue | 157 ++ .../components/u-subsection/u-subsection.vue | 355 +++++ .../u-swipe-action/u-swipe-action.vue | 255 ++++ uview-ui/components/u-swiper/u-swiper.vue | 340 +++++ uview-ui/components/u-switch/u-switch.vue | 163 ++ uview-ui/components/u-tabbar/u-tabbar.vue | 328 ++++ uview-ui/components/u-table/u-table.vue | 84 + .../u-tabs-swiper/u-tabs-swiper.vue | 488 ++++++ uview-ui/components/u-tabs/u-tabs.vue | 368 +++++ uview-ui/components/u-tag/u-tag.vue | 294 ++++ uview-ui/components/u-td/u-td.vue | 66 + uview-ui/components/u-th/u-th.vue | 62 + .../u-time-line-item/u-time-line-item.vue | 83 + .../components/u-time-line/u-time-line.vue | 43 + uview-ui/components/u-toast/u-toast.vue | 220 +++ uview-ui/components/u-top-tips/u-top-tips.vue | 121 ++ uview-ui/components/u-tr/u-tr.vue | 25 + uview-ui/components/u-upload/u-upload.vue | 652 ++++++++ .../u-verification-code.vue | 164 ++ .../components/u-waterfall/u-waterfall.vue | 176 +++ uview-ui/iconfont.css | 910 +++++++++++ uview-ui/index.js | 137 ++ uview-ui/index.scss | 23 + uview-ui/libs/config/config.js | 15 + uview-ui/libs/config/zIndex.js | 20 + uview-ui/libs/css/color.scss | 155 ++ uview-ui/libs/css/common.scss | 176 +++ uview-ui/libs/css/style.components.scss | 7 + uview-ui/libs/css/style.h5.scss | 8 + uview-ui/libs/css/style.mp.scss | 72 + uview-ui/libs/css/style.nvue.scss | 3 + uview-ui/libs/css/style.vue.scss | 175 +++ uview-ui/libs/function/$parent.js | 18 + uview-ui/libs/function/addUnit.js | 8 + uview-ui/libs/function/bem.js | 5 + uview-ui/libs/function/color.js | 37 + uview-ui/libs/function/colorGradient.js | 100 ++ uview-ui/libs/function/debounce.js | 29 + uview-ui/libs/function/deepClone.js | 23 + uview-ui/libs/function/deepMerge.js | 30 + uview-ui/libs/function/getParent.js | 47 + uview-ui/libs/function/guid.js | 41 + uview-ui/libs/function/md5.js | 385 +++++ uview-ui/libs/function/queryParams.js | 58 + uview-ui/libs/function/random.js | 10 + uview-ui/libs/function/randomArray.js | 7 + uview-ui/libs/function/route.js | 85 ++ uview-ui/libs/function/sys.js | 9 + uview-ui/libs/function/test.js | 232 +++ uview-ui/libs/function/throttle.js | 32 + uview-ui/libs/function/timeFormat.js | 52 + uview-ui/libs/function/timeFrom.js | 46 + uview-ui/libs/function/toast.js | 9 + uview-ui/libs/function/trim.js | 15 + uview-ui/libs/function/type2icon.js | 35 + uview-ui/libs/mixin/mixin.js | 50 + uview-ui/libs/mixin/mpShare.js | 18 + uview-ui/libs/request/index.js | 169 ++ uview-ui/libs/store/index.js | 19 + uview-ui/libs/util/area.js | 1 + uview-ui/libs/util/async-validator.js | 1356 +++++++++++++++++ uview-ui/libs/util/city.js | 1 + uview-ui/libs/util/emitter.js | 51 + uview-ui/libs/util/province.js | 1 + uview-ui/package.json | 39 + uview-ui/theme.scss | 38 + 208 files changed, 33807 insertions(+), 73 deletions(-) create mode 100644 App.vue delete mode 100644 README.en.md delete mode 100644 README.md create mode 100644 common/api.js create mode 100644 common/captcha.js create mode 100644 common/config.js create mode 100644 common/http.api.js create mode 100644 common/http.interceptor.js create mode 100644 common/md5.js create mode 100644 common/storage.js create mode 100644 common/tcplayer.js create mode 100644 common/utils.js create mode 100644 common/validator.js create mode 100644 components/kg-course-list/course-list.vue create mode 100644 main.js create mode 100644 manifest.json create mode 100644 pages.json create mode 100644 pages/account/forget.vue create mode 100644 pages/account/login.vue create mode 100644 pages/account/register.vue create mode 100644 pages/chapter/info.vue create mode 100644 pages/chapter/live.vue create mode 100644 pages/chapter/read.vue create mode 100644 pages/chapter/vod.vue create mode 100644 pages/consult/add.vue create mode 100644 pages/consult/edit.vue create mode 100644 pages/consult/info.vue create mode 100644 pages/course/category.vue create mode 100644 pages/course/consults.vue create mode 100644 pages/course/info.vue create mode 100644 pages/course/list.vue create mode 100644 pages/course/reviews.vue create mode 100644 pages/help/info.vue create mode 100644 pages/help/list.vue create mode 100644 pages/im/group/index.vue create mode 100644 pages/im/group/list.vue create mode 100644 pages/index/index.vue create mode 100644 pages/me/account.vue create mode 100644 pages/me/consults.vue create mode 100644 pages/me/courses.vue create mode 100644 pages/me/favorites.vue create mode 100644 pages/me/friends.vue create mode 100644 pages/me/groups.vue create mode 100644 pages/me/index.vue create mode 100644 pages/me/orders.vue create mode 100644 pages/me/profile.vue create mode 100644 pages/me/refunds.vue create mode 100644 pages/me/reviews.vue create mode 100644 pages/order/confirm.vue create mode 100644 pages/order/info.vue create mode 100644 pages/order/pay.vue create mode 100644 pages/page/info.vue create mode 100644 pages/page/list.vue create mode 100644 pages/refund/confirm.vue create mode 100644 pages/refund/info.vue create mode 100644 pages/review/add.vue create mode 100644 pages/review/edit.vue create mode 100644 pages/review/info.vue create mode 100644 pages/search/index.vue create mode 100644 pages/teacher/index.vue create mode 100644 pages/teacher/list.vue create mode 100644 pages/trade/h5pay.vue create mode 100644 pages/user/index.vue create mode 100644 pages/vip/index.vue create mode 100644 static/css/common.css create mode 100644 uni.scss create mode 100644 uview-ui/LICENSE create mode 100644 uview-ui/README.md create mode 100644 uview-ui/components/u-action-sheet/u-action-sheet.vue create mode 100644 uview-ui/components/u-alert-tips/u-alert-tips.vue create mode 100644 uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue create mode 100644 uview-ui/components/u-avatar-cropper/weCropper.js create mode 100644 uview-ui/components/u-avatar/u-avatar.vue create mode 100644 uview-ui/components/u-back-top/u-back-top.vue create mode 100644 uview-ui/components/u-badge/u-badge.vue create mode 100644 uview-ui/components/u-button/u-button.vue create mode 100644 uview-ui/components/u-calendar/u-calendar.vue create mode 100644 uview-ui/components/u-car-keyboard/u-car-keyboard.vue create mode 100644 uview-ui/components/u-card/u-card.vue create mode 100644 uview-ui/components/u-cell-group/u-cell-group.vue create mode 100644 uview-ui/components/u-cell-item/u-cell-item.vue create mode 100644 uview-ui/components/u-checkbox-group/u-checkbox-group.vue create mode 100644 uview-ui/components/u-checkbox/u-checkbox.vue create mode 100644 uview-ui/components/u-circle-progress/u-circle-progress.vue create mode 100644 uview-ui/components/u-col/u-col.vue create mode 100644 uview-ui/components/u-collapse-item/u-collapse-item.vue create mode 100644 uview-ui/components/u-collapse/u-collapse.vue create mode 100644 uview-ui/components/u-column-notice/u-column-notice.vue create mode 100644 uview-ui/components/u-count-down/u-count-down.vue create mode 100644 uview-ui/components/u-count-to/u-count-to.vue create mode 100644 uview-ui/components/u-divider/u-divider.vue create mode 100644 uview-ui/components/u-dropdown-item/u-dropdown-item.vue create mode 100644 uview-ui/components/u-dropdown/u-dropdown.vue create mode 100644 uview-ui/components/u-empty/u-empty.vue create mode 100644 uview-ui/components/u-field/u-field.vue create mode 100644 uview-ui/components/u-form-item/u-form-item.vue create mode 100644 uview-ui/components/u-form/u-form.vue create mode 100644 uview-ui/components/u-full-screen/u-full-screen.vue create mode 100644 uview-ui/components/u-gap/u-gap.vue create mode 100644 uview-ui/components/u-grid-item/u-grid-item.vue create mode 100644 uview-ui/components/u-grid/u-grid.vue create mode 100644 uview-ui/components/u-icon/u-icon.vue create mode 100644 uview-ui/components/u-image/u-image.vue create mode 100644 uview-ui/components/u-index-anchor/u-index-anchor.vue create mode 100644 uview-ui/components/u-index-list/u-index-list.vue create mode 100644 uview-ui/components/u-input/u-input.vue create mode 100644 uview-ui/components/u-keyboard/u-keyboard.vue create mode 100644 uview-ui/components/u-lazy-load/u-lazy-load.vue create mode 100644 uview-ui/components/u-line-progress/u-line-progress.vue create mode 100644 uview-ui/components/u-line/u-line.vue create mode 100644 uview-ui/components/u-link/u-link.vue create mode 100644 uview-ui/components/u-loading-page/u-loading-page.vue create mode 100644 uview-ui/components/u-loading/u-loading.vue create mode 100644 uview-ui/components/u-loadmore/u-loadmore.vue create mode 100644 uview-ui/components/u-mask/u-mask.vue create mode 100644 uview-ui/components/u-message-input/u-message-input.vue create mode 100644 uview-ui/components/u-modal/u-modal.vue create mode 100644 uview-ui/components/u-navbar/u-navbar.vue create mode 100644 uview-ui/components/u-no-network/u-no-network.vue create mode 100644 uview-ui/components/u-notice-bar/u-notice-bar.vue create mode 100644 uview-ui/components/u-number-box/u-number-box.vue create mode 100644 uview-ui/components/u-number-keyboard/u-number-keyboard.vue create mode 100644 uview-ui/components/u-parse/libs/CssHandler.js create mode 100644 uview-ui/components/u-parse/libs/MpHtmlParser.js create mode 100644 uview-ui/components/u-parse/libs/config.js create mode 100644 uview-ui/components/u-parse/libs/handler.wxs create mode 100644 uview-ui/components/u-parse/libs/trees.vue create mode 100644 uview-ui/components/u-parse/u-parse.vue create mode 100644 uview-ui/components/u-picker/u-picker.vue create mode 100644 uview-ui/components/u-popup/u-popup.vue create mode 100644 uview-ui/components/u-radio-group/u-radio-group.vue create mode 100644 uview-ui/components/u-radio/u-radio.vue create mode 100644 uview-ui/components/u-rate/u-rate.vue create mode 100644 uview-ui/components/u-read-more/u-read-more.vue create mode 100644 uview-ui/components/u-row-notice/u-row-notice.vue create mode 100644 uview-ui/components/u-row/u-row.vue create mode 100644 uview-ui/components/u-search/u-search.vue create mode 100644 uview-ui/components/u-section/u-section.vue create mode 100644 uview-ui/components/u-select/u-select.vue create mode 100644 uview-ui/components/u-skeleton/u-skeleton.vue create mode 100644 uview-ui/components/u-slider/u-slider.vue create mode 100644 uview-ui/components/u-steps/u-steps.vue create mode 100644 uview-ui/components/u-sticky/u-sticky.vue create mode 100644 uview-ui/components/u-subsection/u-subsection.vue create mode 100644 uview-ui/components/u-swipe-action/u-swipe-action.vue create mode 100644 uview-ui/components/u-swiper/u-swiper.vue create mode 100644 uview-ui/components/u-switch/u-switch.vue create mode 100644 uview-ui/components/u-tabbar/u-tabbar.vue create mode 100644 uview-ui/components/u-table/u-table.vue create mode 100644 uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue create mode 100644 uview-ui/components/u-tabs/u-tabs.vue create mode 100644 uview-ui/components/u-tag/u-tag.vue create mode 100644 uview-ui/components/u-td/u-td.vue create mode 100644 uview-ui/components/u-th/u-th.vue create mode 100644 uview-ui/components/u-time-line-item/u-time-line-item.vue create mode 100644 uview-ui/components/u-time-line/u-time-line.vue create mode 100644 uview-ui/components/u-toast/u-toast.vue create mode 100644 uview-ui/components/u-top-tips/u-top-tips.vue create mode 100644 uview-ui/components/u-tr/u-tr.vue create mode 100644 uview-ui/components/u-upload/u-upload.vue create mode 100644 uview-ui/components/u-verification-code/u-verification-code.vue create mode 100644 uview-ui/components/u-waterfall/u-waterfall.vue create mode 100644 uview-ui/iconfont.css create mode 100644 uview-ui/index.js create mode 100644 uview-ui/index.scss create mode 100644 uview-ui/libs/config/config.js create mode 100644 uview-ui/libs/config/zIndex.js create mode 100644 uview-ui/libs/css/color.scss create mode 100644 uview-ui/libs/css/common.scss create mode 100644 uview-ui/libs/css/style.components.scss create mode 100644 uview-ui/libs/css/style.h5.scss create mode 100644 uview-ui/libs/css/style.mp.scss create mode 100644 uview-ui/libs/css/style.nvue.scss create mode 100644 uview-ui/libs/css/style.vue.scss create mode 100644 uview-ui/libs/function/$parent.js create mode 100644 uview-ui/libs/function/addUnit.js create mode 100644 uview-ui/libs/function/bem.js create mode 100644 uview-ui/libs/function/color.js create mode 100644 uview-ui/libs/function/colorGradient.js create mode 100644 uview-ui/libs/function/debounce.js create mode 100644 uview-ui/libs/function/deepClone.js create mode 100644 uview-ui/libs/function/deepMerge.js create mode 100644 uview-ui/libs/function/getParent.js create mode 100644 uview-ui/libs/function/guid.js create mode 100644 uview-ui/libs/function/md5.js create mode 100644 uview-ui/libs/function/queryParams.js create mode 100644 uview-ui/libs/function/random.js create mode 100644 uview-ui/libs/function/randomArray.js create mode 100644 uview-ui/libs/function/route.js create mode 100644 uview-ui/libs/function/sys.js create mode 100644 uview-ui/libs/function/test.js create mode 100644 uview-ui/libs/function/throttle.js create mode 100644 uview-ui/libs/function/timeFormat.js create mode 100644 uview-ui/libs/function/timeFrom.js create mode 100644 uview-ui/libs/function/toast.js create mode 100644 uview-ui/libs/function/trim.js create mode 100644 uview-ui/libs/function/type2icon.js create mode 100644 uview-ui/libs/mixin/mixin.js create mode 100644 uview-ui/libs/mixin/mpShare.js create mode 100644 uview-ui/libs/request/index.js create mode 100644 uview-ui/libs/store/index.js create mode 100644 uview-ui/libs/util/area.js create mode 100644 uview-ui/libs/util/async-validator.js create mode 100644 uview-ui/libs/util/city.js create mode 100644 uview-ui/libs/util/emitter.js create mode 100644 uview-ui/libs/util/province.js create mode 100644 uview-ui/package.json create mode 100644 uview-ui/theme.scss diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..cf9abc2 --- /dev/null +++ b/App.vue @@ -0,0 +1,18 @@ + + + diff --git a/README.en.md b/README.en.md deleted file mode 100644 index f147a2d..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# course-tencent-cloud-app - -#### Description -酷瓜云课堂(腾讯云版)APP - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index ff471f3..0000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# course-tencent-cloud-app - -#### 介绍 -酷瓜云课堂(腾讯云版)APP - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/common/api.js b/common/api.js new file mode 100644 index 0000000..3c0c1f6 --- /dev/null +++ b/common/api.js @@ -0,0 +1,399 @@ +import * as Config from '@/common/config.js' +import * as Utils from '@/common/utils.js' +import * as Storage from '@/common/storage.js' +import md5 from '@/common/md5.js' + +export const search = (params) => { + return httpGet('/search', params) +} + +export const getSiteInfo = () => { + return httpGet('/site/info') +} + +export const getCaptchaInfo = () => { + return httpGet('/captcha/info') +} + +export const getRewardOptions = () => { + return httpGet('/reward/options') +} + +export const getVipOptions = () => { + return httpGet('/vip/options') +} + +export const getIndexSlides = () => { + return httpGet('/index/slides') +} + +export const getIndexNewCourses = () => { + return httpGet('/index/courses/new') +} + +export const getIndexFreeCourses = () => { + return httpGet('/index/courses/free') +} + +export const getIndexVipCourses = () => { + return httpGet('/index/courses/vip') +} + +export const getCourseCategories = () => { + return httpGet('/course/categories') +} + +export const getCourseList = (params = {}) => { + return httpGet('/course/list', params) +} + +export const getCourseInfo = (id) => { + return httpGet(`/course/${id}/info`) +} + +export const getCourseChapters = (id) => { + return httpGet(`/course/${id}/chapters`) +} + +export const getCoursePackages = (id) => { + return httpGet(`/course/${id}/packages`) +} + +export const getCourseReviews = (id, params) => { + return httpGet(`/course/${id}/reviews`, params) +} + +export const getCourseConsults = (id, params) => { + return httpGet(`/course/${id}/consults`, params) +} + +export const favoriteCourse = (id) => { + return httpPost(`/course/${id}/favorite`) +} + +export const unfavoriteCourse = (id) => { + return httpPost(`/course/${id}/unfavorite`) +} + +export const getChapterInfo = (id) => { + return httpGet(`/chapter/${id}/info`) +} + +export const getChapterResources = (id) => { + return httpGet(`/course/${id}/resources`) +} + +export const likeChapter = (id) => { + return httpPost(`/chapter/${id}/like`) +} + +export const unlikeChapter = (id) => { + return httpPost(`/chapter/${id}/unlike`) +} + +export const learningChapter = (id, params) => { + return httpPost(`/chapter/${id}/learning`, params) +} + +export const createConsult = (params) => { + return httpPost('/consult/create', params) +} + +export const getConsultInfo = (id) => { + return httpGet(`/consult/${id}/info`) +} + +export const updateConsult = (id, params) => { + return httpPost(`/consult/${id}/update`, params) +} + +export const deleteConsult = (id) => { + return httpPost(`/consult/${id}/delete`) +} + +export const likeConsult = (id) => { + return httpPost(`/consult/${id}/like`) +} + +export const unlikeConsult = (id) => { + return httpPost(`/consult/${id}/unlike`) +} + +export const createReview = (params) => { + return httpPost('/review/create', params) +} + +export const getReviewInfo = (id) => { + return httpGet(`/review/${id}/info`) +} + +export const updateReview = (id, params) => { + return httpPost(`/review/${id}/update`, params) +} + +export const deleteReview = (id) => { + return httpPost(`/review/${id}/delete`) +} + +export const likeReview = (id) => { + return httpPost(`/review/${id}/like`) +} + +export const unlikeReview = (id) => { + return httpPost(`/review/${id}/unlike`) +} + +export const getOrderInfo = (sn) => { + return httpGet('/order/info', { + sn: sn + }) +} + +export const getOrderConfirm = (itemId, itemType) => { + return httpGet('/order/confirm', { + item_id: itemId, + item_type: itemType + }) +} + +export const createOrder = (params) => { + return httpPost('/order/create', params) +} + +export const cancelOrder = (sn) => { + return httpPost('/order/cancel', { + sn: sn + }) +} + +export const getRefundInfo = (sn) => { + return httpGet('/refund/info', { + sn: sn + }) +} + +export const cancelRefund = (sn) => { + return httpPost('/refund/cancel', { + sn: sn + }) +} + +export const getTradeInfo = (sn) => { + return httpGet('/trade/info', { + sn: sn + }) +} + +export const createH5Trade = (params) => { + return httpPost('/trade/h5/create', params) +} + +export const createMpTrade = (params) => { + return httpPost('/trade/mp/create', params) +} + +export const createAppTrade = (params) => { + return httpPost('/trade/app/create', params) +} + +export const getUserInfo = (id) => { + return httpGet(`/user/${id}/info`) +} + +export const getUserCourses = (id, params = {}) => { + return httpGet(`/user/${id}/courses`, params) +} + +export const getUserFavorites = (id, params = {}) => { + return httpGet(`/user/${id}/favorites`, params) +} + +export const getUserFriends = (id, params = {}) => { + return httpGet(`/user/${id}/friends`, params) +} + +export const getUserGroups = (id, prams = {}) => { + return httpGet(`/user/${id}/groups`, params) +} + +export const getMyProfile = () => { + return httpGet('/uc/profile') +} + +export const getMyAccount = () => { + return httpGet('/uc/account') +} + +export const getMyOrders = (params = {}) => { + return httpGet('/uc/orders', params) +} + +export const getMyRefunds = (params = {}) => { + return httpGet('/uc/refunds', params) +} + +export const getMyCourses = (params = {}) => { + return httpGet('/uc/courses', params) +} + +export const getMyConsults = (params = {}) => { + return httpGet('/uc/consults', params) +} + +export const getMyReviews = (params = {}) => { + return httpGet('/uc/reviews', params) +} + +export const getMyFavorites = (params = {}) => { + return httpGet('/uc/favorites', params) +} + +export const getMyFriends = (params = {}) => { + return httpGet('/uc/friends', params) +} + +export const getMyGroups = (params = {}) => { + return httpGet('/uc/groups', params) +} + +export const updateMyProfile = (params = {}) => { + return httpPost('/uc/profile/update', params) +} + +export const registerAccount = (params = {}) => { + return httpPost('/account/register', params) +} + +export const loginByPassword = (params = {}) => { + return httpPost('/account/password/login', params) +} + +export const loginByVerify = (params = {}) => { + return httpPost('/account/verify/login', params) +} + +export const logoutAccount = (params = {}) => { + return httpPost('/account/logout', params) +} + +export const resetPassword = (params = {}) => { + return httpPost('/account/password/reset', params) +} + +export const updatePhone = (params = {}) => { + return httpPost('/account/phone/update', params) +} + +export const updateEmail = (params = {}) => { + return httpPost('/account/email/update', params) +} + +export const updatePassword = (params = {}) => { + return httpPost('/account/password/update', params) +} + +export const sendSmsVerifyCode = (params = {}) => { + return httpPost('/verify/sms/code', params) +} + +export const sendEmailVerifyCode = (params = {}) => { + return httpPost('/verify/email/code', params) +} + +export const uploadAvatar = (filePath) => { + return new Promise((resolve, reject) => { + uni.uploadFile({ + url: Config.apiBaseUrl + '/upload/avatar/img', + name: 'file', + filePath: filePath, + success: (res) => { + resolve(res) + }, + fail: (e) => { + reject(e) + } + }) + }) +} + +const httpGet = (path, params = {}, header = {}) => { + return httpRequest(path, params, 'GET', header) +} + +const httpPost = (path, params = {}, header = {}) => { + return httpRequest(path, params, 'POST', header) +} + +const httpRequest = (path, params = {}, method = 'GET', header = {}) => { + let url = Config.apiBaseUrl + path + let platform = Utils.getPlatform() + let auth = Config.security[platform] ? Config.security[platform] : { + appKey: '', + appSecret: '' + } + let extra = { + _timestamp: parseInt(new Date().getTime() / 1000), + _nonce: Math.random().toString() + } + + let signature = '' + + if (method === 'POST') { + signature = httpPostSignature(url, params, extra, auth.appSecret) + } else { + signature = httpGetSignature(url, params, extra, auth.appSecret) + } + + header['X-App-Key'] = auth.appKey + header['X-App-Version'] = Config.appInfo.version + header['X-Platform'] = platform + header['X-Signature'] = signature + header['X-Timestamp'] = extra._timestamp + header['X-Nonce'] = extra._nonce + header['X-Token'] = Storage.get(Config.cacheKey.token) + + return new Promise(function(resolve, reject) { + uni.request({ + url: url, + data: params, + method: method, + header: header, + success: function(res) { + if (res.statusCode === 200) { + resolve(res.data) + } else if (res.statusCode === 401) { + uni.reLaunch({ + url: '/pages/account/login' + }) + } else { + reject(res.data) + } + }, + fail: function(err) { + reject(err) + } + }) + }) +} + +const httpGetSignature = (url, params, extra, appSecret) => { + let query = httpBuildQuery({ + ...params, + ...extra + }) + return md5.hex_md5(url + query + appSecret) +} + +const httpPostSignature = (url, params, extra, appSecret) => { + let query = httpBuildQuery(extra) + let body = JSON.stringify(params) + return md5.hex_md5(url + query + body + appSecret) +} + +const httpBuildQuery = (params) => { + let arr = [] + for (let key in params) { + arr.push(`${key}=${params[key]}`) + } + return arr.sort().join('&') +} diff --git a/common/captcha.js b/common/captcha.js new file mode 100644 index 0000000..dc963f5 --- /dev/null +++ b/common/captcha.js @@ -0,0 +1,49 @@ +"use strict" + +import * as Api from '@/common/api.js' + +/** + * 加载验证码JS文件 + */ +function loadScript(url) { + return new Promise((resolve, reject) => { + if (window.TencentCaptcha === undefined) { + let script = document.createElement("script") + let head = document.getElementsByTagName("head")[0] + script.type = "text/javascript" + script.charset = "UTF-8" + script.src = url + head.appendChild(script) + script.onload = function() { + resolve() + }; + script.onerror = function() { + reject(new Error("验证码脚本加载失败,请重试")) + }; + } else { + resolve() + } + }); +} + +/** + * 验证码creater + * @param {function} callback 回调函数, 回调结果请参见 https://cloud.tencent.com/document/product/1110/36841 + * @param {object} options 更多配置参数, 请参见 https://cloud.tencent.com/document/product/1110/36841#pzcs + * @returns {Promise} 返回TencentCaptcha的实例提供一些操作验证码的方法 + */ +async function captchaCreater(callback, options) { + try { + await loadScript("https://ssl.captcha.qq.com/TCaptcha.js"); + const appId = await Api.getCaptchaInfo().then(res => { + return res.captcha.app_id + }) + return new TencentCaptcha(appId, callback, options) + } catch (error) { + throw new Error(error) + } +} + +export { + captchaCreater +} diff --git a/common/config.js b/common/config.js new file mode 100644 index 0000000..cc6b67b --- /dev/null +++ b/common/config.js @@ -0,0 +1,38 @@ +/** + * NOTE:尾部不要加"/" + */ +export const apiBaseUrl = 'http://10.86.40.27/api' + +export const cacheKey = { + token: '__TOKEN__' +} + +export const security = { + h5: { + appKey: 'MaImPVblUZGys2xa', + appSecret: 'K05WaWYm8yyzPizi' + }, + ios: { + appKey: '69lO8yCtxsPTPkFC', + appSecret: 'UEPXj9hzuBUuLiHu' + }, + android: { + appKey: 'e6kYnpHnAFpsy1Cw', + appSecret: 'S7btzsst1E39xgDG' + }, + mp_weixin: { + appKey: 'uRrXcXw3unJg5qew', + appSecret: 'U6XyV2w2SU9PSAIx' + }, + mp_alipay: { + appKey: 'jqemwNEM6CSjwdx4', + appSecret: 'np1q5STgjfapLpHE' + } +} + +export const appInfo = { + name: '酷瓜云课堂', + alias: 'ctc-app', + link: 'https://gitee.com/koogua/course-tencent-cloud-app', + version: '1.0.0' +} diff --git a/common/http.api.js b/common/http.api.js new file mode 100644 index 0000000..8a2d2e4 --- /dev/null +++ b/common/http.api.js @@ -0,0 +1,378 @@ +const install = (Vue, vm) => { + + const search = (params) => { + return vm.$u.get('/search', params) + } + + const getSiteInfo = () => { + return vm.$u.get('/site/info') + } + + const getCaptchaInfo = () => { + return vm.$u.get('/captcha/info') + } + + const getRewardOptions = () => { + return vm.$u.get('/reward/options') + } + + const getVipOptions = () => { + return vm.$u.get('/vip/options') + } + + const getIndexSlides = () => { + return vm.$u.get('/index/slides') + } + + const getIndexNewCourses = () => { + return vm.$u.get('/index/courses/new') + } + + const getIndexFreeCourses = () => { + return vm.$u.get('/index/courses/free') + } + + const getIndexVipCourses = () => { + return vm.$u.get('/index/courses/vip') + } + + const getCourseCategories = () => { + return vm.$u.get('/course/categories') + } + + const getCourseList = (params) => { + return vm.$u.get('/course/list', params) + } + + const getCourseInfo = (id) => { + return vm.$u.get(`/course/${id}/info`) + } + + const getCourseChapters = (id) => { + return vm.$u.get(`/course/${id}/chapters`) + } + + const getCoursePackages = (id) => { + return vm.$u.get(`/course/${id}/packages`) + } + + const getCourseReviews = (id, params) => { + return vm.$u.get(`/course/${id}/reviews`, params) + } + + const getCourseConsults = (id, params) => { + return vm.$u.get(`/course/${id}/consults`, params) + } + + const favoriteCourse = (id) => { + return vm.$u.post(`/course/${id}/favorite`) + } + + const unfavoriteCourse = (id) => { + return vm.$u.post(`/course/${id}/unfavorite`) + } + + const getChapterInfo = (id) => { + return vm.$u.get(`/chapter/${id}/info`) + } + + const getChapterResources = (id) => { + return vm.$u.get(`/course/${id}/resources`) + } + + const likeChapter = (id) => { + return vm.$u.post(`/chapter/${id}/like`) + } + + const unlikeChapter = (id) => { + return vm.$u.post(`/chapter/${id}/unlike`) + } + + const learningChapter = (id, params) => { + return vm.$u.post(`/chapter/${id}/learning`, params) + } + + const createConsult = (params) => { + return vm.$u.post('/consult/create', params) + } + + const getConsultInfo = (id) => { + return vm.$u.post(`/consult/${id}/info`) + } + + const updateConsult = (id, params) => { + return vm.$u.post(`/consult/${id}/update`, params) + } + + const deleteConsult = (id) => { + return vm.$u.post(`/consult/${id}/delete`) + } + + const likeConsult = (id) => { + return vm.$u.post(`/consult/${id}/like`) + } + + const unlikeConsult = (id) => { + return vm.$u.post(`/consult/${id}/unlike`) + } + + const createReview = (params) => { + return vm.$u.post('/review/create', params) + } + + const getReviewInfo = (id) => { + return vm.$u.post(`/review/${id}/info`) + } + + const updateReview = (id, params) => { + return vm.$u.post(`/review/${id}/update`, params) + } + + const deleteReview = (id) => { + return vm.$u.post(`/review/${id}/delete`) + } + + const likeReview = (id) => { + return vm.$u.post(`/review/${id}/like`) + } + + const unlikeReview = (id) => { + return vm.$u.post(`/review/${id}/unlike`) + } + + const getOrderInfo = (sn) => { + return vm.$u.get('/order/info', { + sn: sn + }) + } + + const getOrderConfirm = (itemId, itemType) => { + return vm.$u.get('/order/confirm', { + item_id: itemId, + item_type: itemType + }) + } + + const createOrder = (params) => { + return vm.$u.post('/order/create', params) + } + + const cancelOrder = (params) => { + return vm.$u.post('/order/cancel', params) + } + + const getTradeInfo = (sn) => { + return vm.$u.get('/trade/info', { + sn: sn + }) + } + + const createH5Trade = (params) => { + return vm.$u.post('/trade/h5/create', params) + } + + const createMpTrade = (params) => { + return vm.$u.post('/trade/mp/create', params) + } + + const createAppTrade = (params) => { + return vm.$u.post('/trade/app/create', params) + } + + const getUserInfo = (id) => { + return vm.$u.get(`/user/${id}/info`) + } + + const getUserCourses = (id, params = {}) => { + return vm.$u.get(`/user/${id}/courses`, params) + } + + const getUserFavorites = (id, params = {}) => { + return vm.$u.get(`/user/${id}/favorites`, params) + } + + const getUserFriends = (id, params = {}) => { + return vm.$u.get(`/user/${id}/friends`, params) + } + + const getUserGroups = (id, prams = {}) => { + return vm.$u.get(`/user/${id}/groups`, params) + } + + const getMyProfile = () => { + return vm.$u.get('/uc/profile') + } + + const getMyAccount = () => { + return vm.$u.get('/uc/account') + } + + const getMyOrders = (params = {}) => { + return vm.$u.get('/uc/orders', params) + } + + const getMyRefunds = (params = {}) => { + return vm.$u.get('/uc/refunds', params) + } + + const getMyCourses = (params = {}) => { + return vm.$u.get('/uc/courses', params) + } + + const getMyConsults = (params = {}) => { + return vm.$u.get('/uc/consults', params) + } + + const getMyReviews = (params = {}) => { + return vm.$u.get('/uc/reviews', params) + } + + const getMyFavorites = (params = {}) => { + return vm.$u.get('/uc/favorites', params) + } + + const getMyFriends = (params = {}) => { + return vm.$u.get('/uc/friends', params) + } + + const getMyGroups = (params = {}) => { + return vm.$u.get('/uc/groups', params) + } + + const updateMyProfile = (params = {}) => { + return vm.$u.post('/uc/profile/update', params) + } + + const registerAccount = (params = {}) => { + return vm.$u.post('/account/register', params) + } + + const loginByPassword = (params = {}) => { + return vm.$u.post('/account/password/login', params) + } + + const loginByVerify = (params = {}) => { + return vm.$u.post('/account/verify/login', params) + } + + const logoutAccount = (params = {}) => { + return vm.$u.post('/account/logout', params) + } + + const resetPassword = (params = {}) => { + return vm.$u.post('/account/password/reset', params) + } + + const updatePhone = (params = {}) => { + return vm.$u.post('/account/phone/update', params) + } + + const updateEmail = (params = {}) => { + return vm.$u.post('/account/email/update', params) + } + + const updatePassword = (params = {}) => { + return vm.$u.post('/account/password/update', params) + } + + const sendSmsVerifyCode = (params = {}) => { + return vm.$u.post('/verify/sms/code', params) + } + + const sendEmailVerifyCode = (params = {}) => { + return vm.$u.post('/verify/email/code', params) + } + + const uploadAvatar = (filePath) => { + return new Promise((resolve, reject) => { + uni.uploadFile({ + url: Config.apiBaseUrl + '/upload/avatar/img', + name: 'file', + filePath: filePath, + success: (res) => { + resolve(res) + }, + fail: (e) => { + reject(e) + } + }) + }) + } + + vm.$u.api = { + search, + getCaptchaInfo, + getSiteInfo, + getRewardOptions, + getVipOptions, + getIndexSlides, + getIndexNewCourses, + getIndexFreeCourses, + getIndexVipCourses, + getCourseCategories, + getCourseList, + getCourseInfo, + getCourseChapters, + getCoursePackages, + getCourseReviews, + getCourseConsults, + favoriteCourse, + unfavoriteCourse, + getChapterInfo, + getChapterResources, + likeChapter, + unlikeChapter, + learningChapter, + getConsultInfo, + createConsult, + updateConsult, + deleteConsult, + likeConsult, + unlikeConsult, + getReviewInfo, + createReview, + updateReview, + deleteReview, + likeReview, + unlikeReview, + getOrderInfo, + getOrderConfirm, + createOrder, + cancelOrder, + getTradeInfo, + createH5Trade, + createMpTrade, + createAppTrade, + getUserInfo, + getUserCourses, + getUserFavorites, + getUserFriends, + getUserGroups, + getMyProfile, + getMyAccount, + getMyCourses, + getMyFavorites, + getMyFriends, + getMyGroups, + getMyOrders, + getMyRefunds, + getMyConsults, + getMyReviews, + updateMyProfile, + updateEmail, + updatePhone, + updatePassword, + logoutAccount, + registerAccount, + loginByPassword, + loginByVerify, + resetPassword, + sendSmsVerifyCode, + sendEmailVerifyCode, + uploadAvatar, + } +} + +export default { + install +} diff --git a/common/http.interceptor.js b/common/http.interceptor.js new file mode 100644 index 0000000..192fb77 --- /dev/null +++ b/common/http.interceptor.js @@ -0,0 +1,30 @@ +const install = (Vue, vm) => { + + Vue.prototype.$u.http.setConfig({ + baseUrl: 'http://10.86.40.27/api', + originalData: true, + }); + + Vue.prototype.$u.http.interceptor.request = (config) => { + config.header.token = vm.token + return config + } + + Vue.prototype.$u.http.interceptor.response = (res) => { + if (res.statusCode == 200) { + return res.data + } else if (res.statusCode == 401) { + vm.$u.toast('验证失败,请重新登录'); + setTimeout(() => { + vm.$u.route('/pages/account/login') + }, 1500) + return false + } else { + return false + } + } +} + +export default { + install +} diff --git a/common/md5.js b/common/md5.js new file mode 100644 index 0000000..713d640 --- /dev/null +++ b/common/md5.js @@ -0,0 +1,263 @@ +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_md5(s) { + return binl2hex(core_md5(str2binl(s), s.length * chrsz)); +} + +function b64_md5(s) { + return binl2b64(core_md5(str2binl(s), s.length * chrsz)); +} + +function str_md5(s) { + return binl2str(core_md5(str2binl(s), s.length * chrsz)); +} + +function hex_hmac_md5(key, data) { + return binl2hex(core_hmac_md5(key, data)); +} + +function b64_hmac_md5(key, data) { + return binl2b64(core_hmac_md5(key, data)); +} + +function str_hmac_md5(key, data) { + return binl2str(core_hmac_md5(key, data)); +} + +/* + * Perform a simple self-test to see if the VM is working + */ +function md5_vm_test() { + return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; +} + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length + */ +function core_md5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for (var i = 0; i < x.length; i += 16) { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936); + d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844); + d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); + +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) { + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b); +} + +function md5_ff(a, b, c, d, x, s, t) { + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} + +function md5_gg(a, b, c, d, x, s, t) { + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} + +function md5_hh(a, b, c, d, x, s, t) { + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} + +function md5_ii(a, b, c, d, x, s, t) { + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Calculate the HMAC-MD5, of a key and some data + */ +function core_hmac_md5(key, data) { + var bkey = str2binl(key); + if (bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); + + var ipad = Array(16), + opad = Array(16); + for (var i = 0; i < 16; i++) { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); + return core_md5(opad.concat(hash), 512 + 128); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* + * Convert a string to an array of little-endian words + * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. + */ +function str2binl(str) { + var bin = Array(); + var mask = (1 << chrsz) - 1; + for (var i = 0; i < str.length * chrsz; i += chrsz) + bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32); + return bin; +} + +/* + * Convert an array of little-endian words to a string + */ +function binl2str(bin) { + var str = ""; + var mask = (1 << chrsz) - 1; + for (var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask); + return str; +} + +/* + * Convert an array of little-endian words to a hex string. + */ +function binl2hex(binarray) { + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for (var i = 0; i < binarray.length * 4; i++) { + str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) + + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF); + } + return str; +} + +/* + * Convert an array of little-endian words to a base-64 string + */ +function binl2b64(binarray) { + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for (var i = 0; i < binarray.length * 4; i += 3) { + var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 0xFF) << 16) | + (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 0xFF) << 8) | + ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 0xFF); + for (var j = 0; j < 4; j++) { + if (i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F); + } + } + return str; +} + +module.exports = { + hex_md5 +} diff --git a/common/storage.js b/common/storage.js new file mode 100644 index 0000000..756ec54 --- /dev/null +++ b/common/storage.js @@ -0,0 +1,59 @@ +export const get = (key, sync = true) => { + try { + if (sync) { + return uni.getStorageSync(key); + } else { + let data = ''; + uni.getStorage({ + key: key, + success: function(res) { + data = res.data; + } + }); + return data; + } + } catch (e) { + return false; + } +} + +export const set = (key, value, sync = true) => { + try { + if (sync) { + return uni.setStorageSync(key, value); + } else { + uni.setStorage({ + key: key, + data: value + }); + } + } catch (e) { + + } +} + +export const remove = (key, sync = true) => { + try { + if (sync) { + return uni.removeStorageSync(key); + } else { + uni.removeStorage({ + key: key + }); + } + } catch (e) { + return false; + } +} + +export const clear = (sync = true) => { + try { + if (sync) { + return uni.clearStorageSync(); + } else { + uni.clearStorage(); + } + } catch (e) { + return false; + } +} diff --git a/common/tcplayer.js b/common/tcplayer.js new file mode 100644 index 0000000..ddec7fc --- /dev/null +++ b/common/tcplayer.js @@ -0,0 +1,4 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.TcPlayer=t():e.TcPlayer=t()}(this,function(){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="//imgcache.qq.com/open/qcloud/video/vcplayer/",t(0)}([function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){if(d.IS_MOBILE?(e.flash=!1,d.IS_X5TBS&&e.x5_player?b.mobile=["flv","m3u8","mp4"]:d.IS_ENABLED_MSE&&e.h5_flv&&(b.mobile=["flv","m3u8","mp4"])):(e.flash=!!t.isFormat("rtmp")||e.flash,t.isFormat("flv")&&void 0==e.flash&&(e.flash=!0),e.flash?d.IS_ENABLED_FLASH||(e.flash=!1,d.IS_ENABLED_MSE?e.h5_flv&&(d.IS_SAFARI&&A.compareVersion(d.SAFARI_VERSION,"10.1")>-1||!d.IS_SAFARI)?b.pc=["flv","m3u8","mp4"]:b.pc=["m3u8","mp4"]:b.pc=["mp4"]):d.IS_ENABLED_MSE?e.h5_flv&&(d.IS_SAFARI&&A.compareVersion(d.SAFARI_VERSION,"10.1")>-1||!d.IS_SAFARI)?b.pc=["flv","m3u8","mp4"]:b.pc=["m3u8","mp4"]:d.IS_ENABLED_FLASH?e.flash=!0:b.pc=["mp4"]),e.clarity){var i=M.indexOf(e.clarity);M.splice(i,1),M.unshift(e.clarity)}}function a(e){var t={urls:{m3u8:{od:e.m3u8||"",hd:e.m3u8_hd||"",sd:e.m3u8_sd||""},flv:{od:e.flv||"",hd:e.flv_hd||"",sd:e.flv_sd||""},mp4:{od:e.mp4||"",hd:e.mp4_hd||"",sd:e.mp4_sd||""},rtmp:{od:e.rtmp||"",hd:e.rtmp_hd||"",sd:e.rtmp_sd||""}},isClarity:function(e){var i=t.urls;return!!(i.m3u8[e]||i.flv[e]||i.mp4[e]||i.rtmp[e])},isFormat:function(e){var i=t.urls;return!!i[e].od||!!i[e].hd||!!i[e].sd},hasUrl:function(){return this.isFormat("rtmp")||this.isFormat("flv")||this.isFormat("m3u8")||this.isFormat("mp4")}};t.definitions=[];for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:b,n="",r=void 0;i=i||(d.IS_MOBILE?o.mobile:o.pc);for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:M,o="",n=0;n1&&void 0!==arguments[1]?arguments[1]:b,i=void 0,o="",n=e.urls,r=d.IS_MOBILE?t.mobile:t.pc,s=0;s0&&!this.options.live&&this.currentTime(t),n&&this.play(!0),g.unsub(w.MetaLoaded,"*",r,this)});g.sub(w.MetaLoaded,"*",r,this)},t.prototype.switchClarity=function(e){this.claritySwitcher?this.claritySwitcher.setClarity(e):this._switchClarity(e)},t.prototype.handleMsg=function(t){e.prototype.handleMsg.call(this,t)},t}(m.Player)},function(e,t){"use strict";t.__esModule=!0;var i=window.navigator.userAgent,o=/AppleWebKit\/([\d.]+)/i.exec(i),n=o?parseFloat(o.pop()):null,r=t.IS_IPAD=/iPad/i.test(i),s=t.IS_IPHONE=/iPhone/i.test(i)&&!r,l=t.IS_IPOD=/iPod/i.test(i),a=t.IS_IOS=s||r||l,c=(t.IOS_VERSION=function(){var e=i.match(/OS (\d+)_/i);if(e&&e[1])return e[1]}(),t.IS_MAC=/Mac/i.test(i),t.IS_ANDROID=/Android/i.test(i)),u=t.ANDROID_VERSION=function(){var e,t,o=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return o?(e=o[1]&&parseFloat(o[1]),t=o[2]&&parseFloat(o[2]),e&&t?parseFloat(o[1]+"."+o[2]):e?e:null):null}(),p=(t.IS_OLD_ANDROID=c&&/webkit/i.test(i)&&u<2.3,t.IS_NATIVE_ANDROID=c&&u<5&&n<537,t.IS_FIREFOX=/Firefox/i.test(i),t.IS_EDGE=/Edge/i.test(i)),h=t.IS_CHROME=!p&&/Chrome/i.test(i),d=t.IS_SAFARI=!p&&!h&&/Safari/i.test(i),f=(t.SAFARI_VERSION=function(){if(!d)return null;var e=/version\/([\d.]+)/i,t=i.match(e);return t?t[1]:void 0}(),t.IS_IE8=/MSIE\s8\.0/.test(i),t.IS_IE9=/MSIE\s9\.0/.test(i),t.IS_IE=/(msie\s|trident.*rv:)([\w.]+)/i.test(i)),y=(t.IE_VERSION=function(){var e=/(msie\s|trident.*rv:)([\w.]+)/i,t=i.match(e);return t?t[2]:null}(),t.TOUCH_ENABLED=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),t.BACKGROUND_SIZE_SUPPORTED="backgroundSize"in document.createElement("video").style,t.HASVIDEO=!!document.createElement("video").canPlayType,t.IS_X5TBS=/TBS\/\d+/i.test(i)),A=(t.TBS_VERSION=function(){var e=i.match(/TBS\/(\d+)/i);if(e&&e[1])return e[1]}(),t.IS_MQQB=!y&&/MQQBrowser\/\d+/i.test(i),t.IS_QQB=!y&&/ QQBrowser\/\d+/i.test(i),t.IS_WECHAT=/(micromessenger|webbrowser)/i.test(i),t.IS_MQQ=/ QQ\/\d+/i.test(i),t.IS_MOBILE=c||a,t.IS_FILE_PROTOCOL=/file:/.test(location.protocol),t.FLASH_VERSION=null);t.IS_ENABLED_FLASH=function(){var e;if(document.all||f)try{if(e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return t.FLASH_VERSION=A=e.GetVariable("$version").split(" ")[1].replace(/,/g,"."),window.console&&console.log("FLASH_VERSION",A),!0}catch(e){return!1}else try{if(navigator.plugins&&navigator.plugins.length>0&&(e=navigator.plugins["Shockwave Flash"])){for(var i=e.description.split(" "),o=0;o-1?"Edge":i.indexOf(".NET")>-1?"IE":i.indexOf("QQBrowser")>-1?"QQBrowser":i.indexOf("Mac OS")>-1?"safari":i.indexOf("Chrome")>-1?"chrome":"other"}()},function(e,t){"use strict";function i(e,t,i){return e?(e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i),i):console.warn("element not exists")}function o(e,t,i){return e?void(e.removeEventListener?e.removeEventListener(t,i,!1):e.detachEvent&&e.detachEvent("on"+t,i)):console.warn("element not exists")}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(e);for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];null===r?o.removeAttribute(r):o.setAttribute(n,r)}for(var s in i)i.hasOwnProperty(s)&&(o[s]=i[s]);return o}function r(e){return document.getElementById(e)}function s(e,t){e.classList?e.classList.add(t):c(e,t)||(e.className=e.className+" "+t)}function l(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(u(t)," ")}function a(e,t,i){i?s(e,t):l(e,t)}function c(e,t){return e.classList?e.classList.contains(t):u(t).test(e.className)}function u(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function p(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=document.documentElement,o=document.body,n=i.clientLeft||o.clientLeft||0,r=window.pageXOffset||o.scrollLeft,s=t.left+r-n,l=i.clientTop||o.clientTop||0,a=window.pageYOffset||o.scrollTop,c=t.top+a-l;return{left:Math.round(s),top:Math.round(c)}}function h(e,t,i){var o={},n=i||p(e),r=e.offsetWidth,s=e.offsetHeight,l=n.top,a=n.left,c=t.pageY||t.clientY,u=t.pageX||t.clientX;return t.changedTouches&&(u=t.changedTouches[0].pageX,c=t.changedTouches[0].pageY),o.y=Math.max(0,Math.min(1,(l-c+s)/s)),o.x=Math.max(0,Math.min(1,(u-a)/r)),o}function d(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=document.createElement("script");if(n.onload=n.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||("function"==typeof t&&t(),n.onload=n.onreadystatechange=null,n.parentNode&&!o&&n.parentNode.removeChild(n))},i)for(var r in i)if(i.hasOwnProperty(r)){var s=i[r];null===s?n.removeAttribute(s):n.setAttribute(r,s)}n.src=e,document.getElementsByTagName("head")[0].appendChild(n)}function f(){var e=document,t=e.documentElement,i=e.body;return{width:t&&t.clientWidth||i&&i.offsetWidth||window.innerWidth||0,height:t&&t.clientHeight||i&&i.offsetHeight||window.innerHeight||0}}t.__esModule=!0,t.on=i,t.off=o,t.createEl=n,t.get=r,t.addClass=s,t.removeClass=l,t.toggleClass=a,t.hasClass=c,t.findElPosition=p,t.getPointerPosition=h,t.loadScript=d,t.getViewportSize=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(){return E++}function r(e,t,i){t.guid||(t.guid=n());var o=function(){t.apply(e,arguments)};return o.guid=i?i+"_"+t.guid:t.guid,o}function s(e){if(e instanceof Array)return 0===e.length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function l(e){e|=0;var t=3600,i=60,o=e/t|0,n=(e-o*t)/i|0,r=e-o*t-n*i;return o=o>0?o+":":"",n=n>0?n+":":"00:",r=r>0?r+"":o.length>0||n.length>0?"00":"00:00",o=2==o.length?"0"+o:o,n=2==n.length?"0"+n:n,r=1==r.length?"0"+r:r,o+n+r}function a(e){h.__isFullscreen=!!document[_.fullscreenElement],h.__isFullscreen||(I.IS_X5TBS&&w.off(h.player.video.el,"x5videoexitfullscreen",c),w.off(document,_.fullscreenchange,a)),M.pub({type:b.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:h.__isFullscreen}},h.player)}function c(e){"x5videoexitfullscreen"===e.type&&(h.__isFullscreen=!1,w.off(document,_.fullscreenchange,a),w.off(h.player.video.el,"x5videoexitfullscreen",c),M.pub({type:b.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:!1}},h.player))}function u(e){"webkitbeginfullscreen"==e.type?(w.off(h.player.video.el,"webkitbeginfullscreen",u),w.on(h.player.video.el,"webkitendfullscreen",u),M.pub({type:b.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:!0}},h.player)):"webkitendfullscreen"==e.type&&(w.off(h.player.video.el,"webkitendfullscreen",u),M.pub({type:b.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:!1}},h.player))}function p(e){27===e.keyCode&&h(h.player,!1)}function h(e,t,i){if("undefined"==typeof t)return h.__isFullscreen||!1;var o=e.options.systemFullscreen;h.player=e,_.requestFullscreen?t?(I.IS_X5TBS&&w.on(e.video.el,"x5videoexitfullscreen",c),w.on(document,_.fullscreenchange,a),i&&i[_.requestFullscreen]()):document[_.exitFullscreen]():o&&e.video.el.webkitEnterFullScreen?(w.on(e.video.el,"webkitbeginfullscreen",u),t?e.video.el.webkitEnterFullScreen():e.video.el.webkitExitFullscreen()):(h.__isFullscreen=t,h.__isFullscreen?(h.__origOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden",w.on(document,"keydown",p)):(document.documentElement.style.overflow=h.__origOverflow,w.off(document,"keydown",p)),w.toggleClass(document.body,"vcp-full-window",t),M.pub({type:b.MSG.FullScreen,src:"util",detail:{isFullscreen:h.__isFullscreen}},h.player))}function d(e){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;ol)return-1}return-1}function A(e){return e.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""").replace(/\'/g,"'").replace(/\//g,"/")}function v(e){var t="unknown";return e.isFormat("rtmp")?t="rtmp":e.isFormat("flv")?t="flv":e.isFormat("m3u8")?t="m3u8":e.isFormat("mp4")&&(t="mp4"),t}function g(e,t){e=e.replace(/^(http|https):/,"");var i=window.location.protocol;return"http:"!=i&&"https:"!=i&&(i=t||"https:"),e=i+e}t.__esModule=!0,t.supportStyle=t.console=t.VideoType=t.CDNPath=t.FullscreenApi=void 0,t.guid=n,t.bind=r,t.isEmpty=s,t.convertTime=l,t.doFullscreen=h,t.extend=d,t.store=f,t.compareVersion=y,t.escapeHTML=A,t.getFormat=v,t.unifyProtocol=g;for(var m=i(2),w=o(m),b=i(4),M=o(b),S=i(1),I=o(S),E=1,_=t.FullscreenApi={requestFullscreen:null,exitFullscreen:null,fullscreenElement:null,fullscreenEnabled:null,fullscreenchange:null,fullscreenerror:null},T=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],D=T[0],L=void 0,O=0;O10||C.IOS_VERSION>10)&&"system"==this.options.controls||(this.bigplay=new b["default"](this),this.bigplay.render(this.el));var n=void 0;n=!(this.options.controls&&"default"!=this.options.controls&&(!this.options.flash||"system"!=this.options.controls)),n&&(this.panel=new m["default"](this),this.panel.render(this.el)),this.setup()},e.prototype.verifyOptions=function(){return C.IE_VERSION&&x.compareVersion(C.IE_VERSION,"8.0")==-1?(this.errortips.show({code:5}),!1):!!this.options.src||(this.options.videoSource.hasUrl()?C.IS_IE||!C.IS_ENABLED_FLASH?this.errortips.show({code:5}):this.errortips.show({code:5}):this.errortips.show({code:12}),!1)},e.prototype.size=function(e,t,i){i=i||"cover";var o=/^\d+\.?\d{0,2}%$/,n=void 0,r=void 0;if(o.test(e)||o.test(t))n=e,r=t;else{var s=this.video?this.video.videoWidth():this.options.width,l=this.video?this.video.videoHeight():this.options.height;if(n=e,r=t,s&&l){var a=s/l;"fit"==i&&(n=e,r=n/a,r>t&&(n*=t/r,r=t))}var c=P.getViewportSize();c.width>0&&n>c.width&&(n=c.width)}n+=o.test(n)?"":"px",r+=o.test(r)?"":"px",this.el.style.width=n,this.el.style.height=r,this.video&&(this.video.width(n),this.video.height(r)),this.width=n,this.height=r},e.prototype.setup=function(){if(this.__handleEvent=x.bind(this,this.handleEvent),C.IS_MOBILE){if(this.options.autoplay){var e=this;document.addEventListener("WeixinJSBridgeReady",function(){e.play()})}}else this.loading.show()},e.prototype.destroy=function(){this.video&&this.video.destroy(),this.panel&&this.panel.destroy(),this.bigplay&&this.bigplay.destroy(),this.loading&&this.loading.destroy(),d.unsub("*","*",this.handleMsg,this),this.video=this.panel=this.bigplay=this.loading=null,this.el.parentNode.removeChild(this.el)},e.prototype.setListener=function(e){this.listener=e},e.prototype.handleEvent=function(e){switch(e.type){case"mousemove":if(this.__lastmove&&new Date-this.__lastmove<100)break;var t=this;if(this.__movecnt=this.__movecnt||0,this.__movecnt++,this.__movecnt<5){setTimeout(function(){t.__movecnt=0},500);break}this.__movecnt=0,this.__lastmove=+new Date,clearTimeout(this.__moveid),t.panel&&t.panel.show(),this.__moveid=setTimeout(function(){t.playing()&&t.panel&&t.panel.hide()},3e3)}},e.prototype.handleMsg=function(e){switch(e.type){case O.Load:P.removeClass(this.el,"vcp-playing"),("none"===this.options.preload||this.options.hlsConfig&&this.options.hlsConfig.autoStartLoad===!1)&&this.loading.hide();break;case O.Play:if(!this.playing())break;!this.hasPlay&&this.options.flash&&(this.mtaReport.reportFlash(),this.hasPlay=!0),P.addClass(this.el,"vcp-playing"),this.video.type()==x.VideoType.RTMP&&(this.__wait=!0,this.loading.show()),P.on(this.el,"mousemove",this.__handleEvent);break;case O.Playing:this.loading.hide();break;case O.TimeUpdate:this.__wait&&(this.__wait=!1,this.loading.hide());break;case O.Pause:P.off(this.el,"mousemove",this.__handleEvent),P.removeClass(this.el,"vcp-playing");break;case O.Ended:P.off(this.el,"mousemove",this.__handleEvent),this.panel&&this.panel.show(),P.removeClass(this.el,"vcp-playing");break;case O.MetaLoaded:this.loading.hide(),this.mtaReport.report(),this.size(this.options.width,this.options.height);break;case O.Seeking:this.loading.show();break;case O.Seeked:this.loading.hide();break;case O.FullScreen:var t=this;setTimeout(function(){P.toggleClass(t.el,"vcp-fullscreen",e.detail.isFullscreen)},0);break;case O.Error:this.loading.hide(),this.errortips.show(e.detail),this.panel&&this.panel.show();try{var i=this.options.videoSource,o=x.getFormat(i);C.IS_X5TBS?MtaH5.clickStat("x5_err",{format:o}):MtaH5.clickStat("error",{format:o})}catch(e){}}!e["private"]&&this.listener&&this.listener(e)},e.prototype.currentTime=function(e){return this.video.currentTime(e)},e.prototype.duration=function(){return this.video.duration()},e.prototype.percent=function(e){return this.video.duration()?"undefined"==typeof e?this.video.currentTime()/this.video.duration():void this.video.currentTime(this.video.duration()*e):0},e.prototype.buffered=function(){return this.video.duration()?this.video.buffered()/this.video.duration():0},e.prototype.pause=function(){this.video.pause()},e.prototype.play=function(){var e;this.errortips.clear(),(e=this.video).play.apply(e,arguments)},e.prototype.togglePlay=function(){this.errortips.clear(),this.video.togglePlay()},e.prototype.stop=function(){this.video.stop()},e.prototype.mute=function(e){return this.video.mute(e)},e.prototype.volume=function(e){return this.video.volume(e)},e.prototype.fullscreen=function(e){return this.video.fullscreen(e)},e.prototype.load=function(e,t){this.errortips.clear(),this.loading.show(),this.video.load(e||this.options.src,t)},e.prototype.playing=function(){return this.video&&this.video.playing()},e.prototype.paused=function(){return this.video&&this.video.paused()},e}()},function(e,t,i){var o=i(7);"string"==typeof o&&(o=[[e.id,o,""]]);i(22)(o,{});o.locals&&(e.exports=o.locals)},function(e,t,i){t=e.exports=i(8)(),t.push([e.id,".vcp-player{position:relative;z-index:0;font-family:Tahoma,\\\\5FAE\\8F6F\\96C5\\9ED1,\\u5b8b\\u4f53,Verdana,Arial,sans-serif;background-color:#000}.vcp-player video{display:block;overflow:hidden}.vcp-fullscreen.vcp-player,.vcp-fullscreen video,body.vcp-full-window{width:100%!important;height:100%!important}body.vcp-full-window{overflow-y:auto}.vcp-full-window .vcp-player{position:fixed;left:0;top:0;z-index:2147483647}.vcp-pre-flash,.vcp-video{width:100%;height:100%}.vcp-pre-flash{z-index:999;background:#000;position:absolute;top:0;left:0}.vcp-controls-panel{position:absolute;bottom:0;width:100%;font-size:16px;height:3em;z-index:1000}.vcp-controls-panel.show{animation:fadeIn ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.vcp-controls-panel.hide{animation:fadeOut ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.vcp-panel-bg{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#242424;opacity:.8;filter:alpha(opacity=80);z-index:1000}.vcp-playtoggle{cursor:pointer;position:relative;z-index:1001;width:3em;height:100%;float:left;background-image:url("+i(9)+");background-image:url("+i(10)+")\\0}.vcp-playtoggle:focus,.vcp-playtoggle:hover{background-color:#708090;opacity:.9;filter:alpha(opacity=90)}.touchable .vcp-playtoggle:hover{background-color:transparent;opacity:1}.vcp-playing .vcp-playtoggle{background-image:url("+i(11)+");background-image:url("+i(12)+")\\0}.vcp-bigplay{width:100%;height:80%;position:absolute;background-color:white\\0;filter:alpha(opacity=0);opacity:0;z-index:1000;top:0;left:0}.vcp-slider{position:relative;z-index:1001;float:left;background:#c4c4c4;height:10px;opacity:.8;filter:alpha(opacity=80);cursor:pointer}.vcp-slider .vcp-slider-track{width:0;height:100%;margin-top:0;opacity:1;filter:alpha(opacity=100);background-color:#1e90ff}.vcp-slider .vcp-slider-thumb{cursor:pointer;background-color:#fff;position:absolute;top:0;left:0;border-radius:1em!important;height:10px;margin-left:-5px;width:10px}.vcp-slider-vertical{position:relative;width:.5em;height:8em;top:-5.6em;z-index:1001;background-color:#1c1c1c;opacity:.9;filter:alpha(opacity=90);cursor:pointer}.vcp-slider-vertical .vcp-slider-track{background-color:#1275cf;width:.5em;height:100%;opacity:.8;filter:alpha(opacity=80)}.vcp-slider-vertical .vcp-slider-thumb{cursor:pointer;position:absolute;background-color:#f0f8ff;width:.8em;height:.8em;border-radius:.8em!important;margin-top:-.4em;top:0;left:-.15em}.vcp-timeline{top:-10px;left:0;height:10px;position:absolute;z-index:1001;width:100%}.vcp-timeline .vcp-slider-thumb{top:-4px}.vcp-timeline .vcp-slider{margin-top:8px;height:2px;width:100%}.vcp-timeline:hover .vcp-slider{margin-top:0;height:10px}.vcp-timeline:hover .vcp-slider-thumb{display:block;width:16px;height:16px;top:-3px;margin-left:-8px}.vcp-timelabel{display:inline-block;line-height:3em;float:left;color:#fff;padding:0 9px}.vcp-timelabel,.vcp-volume{height:3em;z-index:1001;position:relative}.vcp-volume{width:3em;cursor:pointer;float:right;background-color:transparent;opacity:.9;filter:alpha(opacity=90)}.vcp-volume-icon{background-image:url("+i(13)+");background-image:url("+i(14)+")\\0;display:inline-block;width:3em;height:3em;position:absolute;left:0;top:0}.vcp-volume-muted .vcp-volume-icon{background-image:url("+i(15)+");background-image:url("+i(16)+")\\0}.vcp-volume .vcp-slider-vertical{top:-8.4em;left:1em;display:none}.vcp-volume .vcp-slider-track{position:absolute;bottom:0}.vcp-volume:hover .vcp-slider-vertical{display:block}.vcp-volume .vcp-volume-bg{height:8.8em;width:2em;position:absolute;left:.25em;top:-8.8em;background:#242424;display:none}.vcp-volume:hover .vcp-slider-vertical,.vcp-volume:hover .vcp-volume-bg{display:block}.vcp-fullscreen-toggle{position:relative;width:3em;height:3em;float:right;cursor:pointer;z-index:1001;background-image:url("+i(17)+");background-image:url("+i(18)+")\\0}.vcp-fullscreen .vcp-fullscreen-toggle{background-image:url("+i(19)+");background-image:url("+i(20)+')\\0}.vcp-loading{box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;text-indent:-9999em}.vcp-loading:before{box-sizing:inherit;content:"";display:block;width:100%;height:100%;border-radius:50%;border:3px solid hsla(0,0%,100%,0);border-left-color:#fff;border-right-color:#fff;transform:translateZ(0);animation:load8 1.1s infinite linear}@keyframes load8{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.vcp-poster{position:absolute;left:0;top:0;overflow:hidden;z-index:1000;width:100%;height:100%;display:none}.vcp-poster-pic{position:relative}.vcp-poster-pic.cover,.vcp-poster-pic.default{left:50%;top:50%;transform:translate(-50%,-50%)}.vcp-poster-pic.cover{width:100%}.vcp-poster-pic.stretch{width:100%;height:100%}.vcp-error-tips{position:absolute;z-index:1001;width:100%;height:4.5em;left:0;top:50%;color:#ff4500;margin-top:-5.25em;text-align:center;display:none}.vcp-clarityswitcher{height:3em;width:3em;cursor:pointer;position:relative;z-index:1001;float:right;background-color:transparent;opacity:.9}.vcp-vertical-switcher-container{width:3em;position:absolute;left:0;bottom:2.4em;background:#242424;display:none}.vcp-vertical-switcher-current{display:block;color:#fff;text-align:center;line-height:3em}.vcp-vertical-switcher-item{display:block;color:#fff;text-align:center;line-height:2em}.vcp-vertical-switcher-item.current{color:#888}.vcp-share>a{width:3em;height:3em;cursor:pointer;background-image:url('+i(21)+");opacity:.9;display:block}.vcp-share{width:3em;height:3em;position:relative;float:right;z-index:1001}.vcp-vertical-share-container{width:auto;height:auto;position:absolute;background:rgba(36,36,36,.8);padding:.5em;overflow:hidden;display:none}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{animation:fadeOut ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{animation:fadeIn ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&m.splice(t,1)}function l(e){var t=document.createElement("style");return t.type="text/css",r(e,t),t}function a(e){var t=document.createElement("link");return t.rel="stylesheet",r(e,t),t}function c(e,t){var i,o,n;if(t.singleton){var r=g++;i=v||(v=l(t)),o=u.bind(null,i,r,!1),n=u.bind(null,i,r,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=a(t),o=h.bind(null,i),n=function(){s(i),i.href&&URL.revokeObjectURL(i.href)}):(i=l(t),o=p.bind(null,i),n=function(){s(i)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else n()}}function u(e,t,i,o){var n=i?"":o.css;if(e.styleSheet)e.styleSheet.cssText=w(t,n);else{var r=document.createTextNode(n),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function p(e,t){var i=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}function h(e,t){var i=t.css,o=t.sourceMap;o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var n=new Blob([i],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(n),r&&URL.revokeObjectURL(r)}var d={},f=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},y=f(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),A=f(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,m=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=y()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var i=n(e);return o(i,t),function(e){for(var r=[],s=0;s0?f.console.error("加载视频文件超时"):f.console.error("无法加载视频文件,请检查网络,以及视频文件是否允许跨域请求访问,m3u8文件是否存在 "+(t.response&&t.response.status?"netstatus:"+t.response.status:"")),this.notify({type:"error",code:2,timeStamp:+new Date}),r.startLoad();break;case Hls.ErrorTypes.MEDIA_ERROR:r.recoverMediaError();break;default:r.destroy()}},t.prototype.__flvLoaded=function(e){if(!flvjs.isSupported())return this.notify({type:"error",code:5,timeStamp:+new Date});this.flv&&this.flv.destroy();var t=flvjs.createPlayer({type:"flv",isLive:this.player.options.live,url:e},this.options.flvConfig);t.attachMediaElement(this.el),t.on(flvjs.Events.ERROR,f.bind(this,function(e,t,i){var o={type:"error"};e==flvjs.ErrorTypes.NETWORK_ERROR&&(o.code=2),e==flvjs.ErrorTypes.MEDIA_ERROR&&(o.code=1002),e==flvjs.ErrorTypes.OTHER_ERROR,o.timeStamp=+new Date,this.notify(o)})),t.on(flvjs.Events.MEDIA_INFO,f.bind(this,function(e,t){})),t.on(flvjs.Events.STATISTICS_INFO,f.bind(this,function(e,t){})),this.flv=t,t.load()},t.prototype.setup=function(){this.playState=v.PlayStates.IDLE,this.seekState=v.SeekStates.IDLE,this.metaDataLoaded=!1,this.__timebase=+new Date,this.on(y.MSG.MetaLoaded,this.notify),this.on(y.MSG.Loaded,this.notify),this.on(y.MSG.Progress,this.notify),this.on(y.MSG.Play,this.notify),this.on(y.MSG.Playing,this.notify),this.on(y.MSG.Pause,this.notify),this.on(y.MSG.Error,this.notify),this.on(y.MSG.TimeUpdate,this.notify),this.on(y.MSG.Ended,this.notify),this.on(y.MSG.Seeking,this.notify),this.on(y.MSG.Seeked,this.notify),this.on(y.MSG.VolumeChange,this.notify),this.on("durationchange",this.notify),this.load(this.options.src,this.options.m3u8?f.VideoType.M3U8:"")},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.hls&&this.hls.destroy(),this.flv&&this.flv.destroy()},t.prototype.notify=function(e){var t={type:e.type,src:this,ts:+new Date,timeStamp:e.timeStamp};switch(e.type){case y.MSG.MetaLoaded:this.metaDataLoaded=!0;break;case y.MSG.Error:var i={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};t.detail=this.el&&this.el.error||{code:e.code},t.detail.reason=i[t.detail.code];break;case y.MSG.Ended:this.pause(),this.playState=v.PlayStates.STOP;break;case"durationchange":0!=this.videoHeight()&&(t.type=y.MSG.Resize);break;case y.MSG.Playing:this.playState=e.type.toUpperCase();break;case y.MSG.Pause:this.playState=v.PlayStates.PAUSED;break;case y.MSG.Seeking:case y.MSG.Seeked:this.seekState=e.type.toUpperCase()}"timeupdate"!=e.type,this.pub(t)},t.prototype.videoWidth=function(){return this.el.videoWidth},t.prototype.videoHeight=function(){return this.el.videoHeight},t.prototype.width=function(e){return e?void(this.el.style.width=e):this.el.width},t.prototype.height=function(e){return e?void(this.el.style.height=e):this.el.height},t.prototype.play=function(){this.options.hlsConfig&&this.options.hlsConfig.autoStartLoad===!1&&this.hls&&this.hls.startLoad(-1),this.el.play()},t.prototype.togglePlay=function(){this.paused()?this.play():this.pause()},t.prototype.pause=function(){this.el.pause()},t.prototype.stop=function(){this.el.pause(),this.el.currentTime=0},t.prototype.paused=function(){return this.el.paused},t.prototype.buffered=function(){return this.el.buffered.length>=1?this.el.buffered.end(this.el.buffered.length-1):0},t.prototype.currentTime=function(e){return"undefined"==typeof e?this.el.currentTime:this.el.currentTime=e},t.prototype.duration=function(){return this.el.duration||0},t.prototype.mute=function(e){return"undefined"==typeof e?this.el.muted:(this.volume(e?0:this.__lastVol),this.el.muted=e)},t.prototype.volume=function(e){return"undefined"==typeof e?this.el.volume:(e<0&&(e=0),e>1&&(e=1),0!=e&&(this.__lastVol=e),this.el.muted=0==e,this.options.volume=e,this.el.volume=e)},t.prototype.fullscreen=function(e){return f.doFullscreen(this.player,e,this.owner)},t.prototype.load=function(e,t){this.pub({type:y.MSG.Load,src:this,ts:+new Date,detail:{src:e,type:t}});var i=e.indexOf(".m3u8")>-1||t==f.VideoType.M3U8,o=e.indexOf(".flv")>-1;if(!m.IS_ENABLED_MSE||!i&&!o||m.IS_X5TBS&&this.player.options.x5_player||i&&m.IS_MAC&&m.IS_SAFARI&&!m.IS_IOS)this.__type=t,this.el.src=e;else{var n=this,r=w[this.options.hls]||w["0.7.1"];i?(this.__type=f.VideoType.M3U8,"undefined"==typeof window.Hls?h.loadScript(f.unifyProtocol(f.CDNPath+r),function(){n.__hlsLoaded.call(n,e)}):this.__hlsLoaded(e)):o&&(this.__type=f.VideoType.FLV,"undefined"==typeof window.flvjs?h.loadScript(f.unifyProtocol(f.CDNPath+"libs/flv.min.1.5.js"),function(){n.__flvLoaded.call(n,e)}):this.__flvLoaded(e))}},t.prototype.playing=function(){return!this.el.paused},t.prototype.type=function(){return this.__type},t}(u["default"]);t["default"]=b},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return t+"_"+e}function s(e,t){return t.guid&&String(t.guid).indexOf("_")==-1?e+"_"+t.guid:t.guid}t.__esModule=!0;var l=i(2),a=o(l),c=i(3),u=o(c),p=i(4),h=o(p),d=i(1),f=o(d),y=function(){function e(t,i){n(this,e),this.name=i,this.player=t,this.options=t.options,this.fnCache={},this.guid=u.guid()}return e.prototype.createEl=function(e,t,i){return this.el=a.createEl(e,t,i)},e.prototype.render=function(e){return e&&this.el&&(this.owner=e,e.appendChild(this.el),this.setup()),this.el},e.prototype.on=function(e,t,i){"string"==typeof e&&(i=t,t=e,e=this.el),this.cbs=this.cbs||{};var o=s(this.guid,i),n=!o,l=o&&!this.fnCache[o];return n||l?(i=u.bind(this,i,this.guid),this.fnCache[i.guid]=i,o=i.guid):i=this.fnCache[o],a.on(e,t,i),this.cbs[r(o,t)]={guid:o,el:e,type:t},i},e.prototype.off=function(e,t,i){"string"==typeof e&&(i=t,t=e,e=this.el),f.IS_MOBILE&&"click"==t&&(t="touchend");var o=s(this.guid,i);this.fnCache[o]&&(i=this.fnCache[o]),a.off(e,t,i),delete this.cbs[r(o,t)]},e.prototype.pub=function(e){var t=this;setTimeout(function(){h.pub(e,t.player)},0)},e.prototype.sub=function(e,t,i){h.sub(e,t,i,this.player)},e.prototype.unsub=function(e,t,i){h.unsub(e,t,i,this.player)},e.prototype.handleMsg=function(){},e.prototype.setup=function(){},e.prototype.destroy=function(){if(this.handleMsg&&this.unsub("*","*",this.handleMsg),this.cbs){for(var e in this.cbs)if(this.cbs.hasOwnProperty(e)){var t=this.cbs[e];a.off(t.el,t.type,this.fnCache[t.guid]),delete this.cbs[e]}this.fnCache=null,this.cbs=null;try{this.el.parentNode.removeChild(this.el)}catch(e){}}},e}();t["default"]=y},function(e,t){"use strict";t.__esModule=!0;t.PlayStates={IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",STOP:"STOP"},t.SeekStates={IDLE:"IDLE",SEEKING:"SEEKING",SEEKED:"SEEKED"},t.ControlsStates={DEFAULT:"default",NONE:"none",SYSTEM:""}},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return window.document[e]?window.document[e]:navigator.appName.indexOf("Microsoft Internet")!=-1?document.getElementById(e):document.embeds&&document.embeds[e]?document.embeds[e]:void 0}t.__esModule=!0;var c=i(24),u=n(c),p=i(4),h=i(2),d=o(h),f=i(3),y=o(f),A=i(25),v=o(A),g=i(1),m=o(g),w=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"FlashVideo")),n="vcpFlashCB_"+o.guid;return o.__flashCB=n,window[n]||(window[n]=function(e,t){t=t&&t[0];var i=window[n].fnObj&&window[n].fnObj[t.objectID];i&&i(e,t)},window[n].fnObj={}),o}return l(t,e),t.prototype.render=function(e){this.__timebase=+new Date;var t=this.player.options,i=y.unifyProtocol(t.flashUrl||"//imgcache.qq.com/open/qcloud/video/player/release/QCPlayer.swf"),o="opaque",n="obj_vcplayer_"+this.player.guid,r=this.__flashCB;this.__id=n;var s=d.createEl("div",{class:"vcp-video"});s.innerHTML='\n\t\t\n \n \n \n \n \n \n \n \n\n \n \n \n\t\t',this.container=s,this.owner=e,this.owner.appendChild(s),this.cover=d.createEl("div",{class:"vcp-pre-flash"}),this.owner.appendChild(this.cover),window[this.__flashCB].fnObj[this.__id]=y.bind(this,this.notify)},t.prototype.setup=function(){this.on("error",this.notify),this.playState=v.PlayStates.IDLE,this.seekState=v.SeekStates.IDLE,this.metaDataLoaded=!1},t.prototype.doPolling=function(){this.options.live||(clearInterval(this.__timer),this.__timer=setInterval(this.interval.bind(this),1e3))},t.prototype.endPolling=function(){clearInterval(this.__timer)},t.prototype.interval=function(){var e;try{e=this.el.getState()}catch(e){return void this.endPolling()}if(this.__m3u8){var t=this.currentTime()+e.bufferLength;this.__buffered!==t&&(this.__buffered=t,this.pub({type:p.MSG.Progress,src:this,ts:+new Date})),this.__buffered>=this.duration()&&this.endPolling()}else this.__rtmp||(this.__bytesloaded!=e.bytesLoaded&&(this.__bytesloaded=e.bytesLoaded, +this.pub({type:p.MSG.Progress,src:this,ts:+new Date})),this.__bytesloaded>=this.__bytesTotal&&this.endPolling())},t.prototype.destroy=function(){"undefined"!=typeof this.el&&"undefined"!=typeof this.el.destroy&&this.el.destroy(),this.endPolling(),delete window[this.__flashCB].fnObj[this.__id],e.prototype.destroy.call(this)},t.prototype.notify=function(e,t){var i={type:e,ts:+new Date};try{switch(this.options.debug&&this.pub({type:i.type,src:this,ts:i.ts,detail:y.extend({debug:!0},t)}),i.type){case"ready":if(this.el=a(this.__id),this.setup(),m.IS_FIREFOX){var o=this;setTimeout(function(){o.el.setAutoPlay(!!o.options.autoplay),o.__timebase=new Date-t.time,o.load(o.options.src)},0)}else{try{this.el.setAutoPlay(!!this.options.autoplay)}catch(e){console.warn("Flash 调用失败,请检查Flash是否启用成功")}this.__timebase=new Date-t.time,this.load(this.options.src)}return;case"metaData":i.type=p.MSG.MetaLoaded,this.__videoWidth=t.videoWidth,this.__videoHeight=t.videoHeight,this.__duration=t.duration,this.__bytesTotal=t.bytesTotal,this.__prevPlayState=null,this.__m3u8=t.type===y.VideoType.M3U8,this.__rtmp=t.type===y.VideoType.RTMP,this.__type=t.type,this.__metaloaded=!0,this.metaDataLoaded=!0,this.doPolling();var o=this;if(!o.cover)break;setTimeout(function(){o.cover&&(o.owner.removeChild(o.cover),o.cover=null)},500);break;case"playState":this.playState=t.playState,t.playState==v.PlayStates.PLAYING?(this.__playing=!0,this.__stopped=!1,i.type=p.MSG.Play):t.playState==v.PlayStates.PAUSED?(this.__playing=!1,this.__stopped=!1,i.type=p.MSG.Pause):t.playState==v.PlayStates.STOP?(this.__playing=!1,this.__stopped=!0,i.type=p.MSG.Ended,this.__prevPlayState=null,this.options.live&&(this.metaDataLoaded=!1)):t.playState==v.PlayStates.IDLE&&(this.__playing=!1,this.__stopped=!0,i.type=p.MSG.Ended);break;case"seekState":if(this.seekState=t.seekState,!this.__metaloaded)return;if(t.seekState==v.SeekStates.SEEKING)i.type=p.MSG.Seeking;else{if(t.seekState!=v.SeekStates.SEEKED)return;this.__m3u8||this.options.live||t.playState!=v.PlayStates.STOP||(this.play(),this.__prevPlayState=t.playState),this.__m3u8&&(i.type=p.MSG.Seeked)}break;case"netStatus":this.options.live||("NetStream.Buffer.Full"==t.code?(this.__prevPlayState==v.PlayStates.PAUSED||this.__prevPlayState==v.PlayStates.STOP,this.__prevPlayState=null,i.type=p.MSG.Seeked):"NetStream.Seek.Complete"==t.code),"NetConnection.Connect.Closed"==t.code&&(this.options.src.indexOf("rtmp://")>-1?this.playState==v.PlayStates.STOP?(i.type="error",t={code:13,reason:t.code}):(i.type="error",t={code:1002,reason:t.code}):this.playState=v.PlayStates.IDLE),"NetStream.Play.Stop"!=t.code&&"NetConnection.Connect.Success"!=t.code&&"NetConnection.Connect.Failed"!=t.code||(this.playState=v.PlayStates.IDLE);break;case"mediaTime":this.__videoWidth=t.videoWidth,this.__videoHeight=t.videoHeight,i.type=p.MSG.TimeUpdate;break;case"error":if("NetStream.Seek.InvalidTime"==t.code)return this.currentTime(t.details),!1;"NetStream.Play.StreamNotFound"==t.code&&this.pub({type:"netStatus",src:this,ts:i.ts,detail:t});var n=isNaN(parseInt(t.code))?1002:t.code,r=isNaN(parseInt(t.code))?t.code:t.msg,s=r.match(/#(\d+)/);s&&s[1]&&(n=s[1]),t={code:n,reason:r||""},this.metaDataLoaded=!1}var l="printLog"==e||"canPlay"==e;!l&&this.pub({type:i.type,src:this,ts:i.ts,detail:t})}catch(t){y.console.error(e+" "+i.type,t)}},t.prototype.handleMsg=function(e){},t.prototype.videoWidth=function(){return this.__videoWidth},t.prototype.videoHeight=function(){return this.__videoHeight},t.prototype.width=function(e){return"undefined"==typeof e?this.el&&this.el.width:(e="100%",this.el&&(this.el.width=e))},t.prototype.height=function(e){return"undefined"==typeof e?this.el&&this.el.height:(e="100%",this.el&&(this.el.height=e))},t.prototype.play=function(e){this.playState==v.PlayStates.PAUSED||this.playState==v.PlayStates.PLAYING||e?this.el.playerResume():this.playState!=v.PlayStates.PLAYING&&this.el.playerPlay()},t.prototype.togglePlay=function(){if(this.metaDataLoaded)if(this.playState==v.PlayStates.PAUSED)this.el.playerResume();else if(this.playState==v.PlayStates.PLAYING)this.el.playerPause();else if(this.playState==v.PlayStates.STOP)this.currentTime(0),this.el.playerResume();else try{this.el.playerPlay()}catch(e){console.warn("Flash 调用失败,请检查Flash是否启用成功")}else this.player.load()},t.prototype.pause=function(){this.el.playerPause()},t.prototype.stop=function(){this.el.playerStop()},t.prototype.paused=function(){return!this.__playing},t.prototype.buffered=function(){var e;return this.__m3u8?this.__buffered||0:(e=(this.__bytesloaded||0)/(this.__bytesTotal||1),this.duration()*e)},t.prototype.currentTime=function(e){return"undefined"==typeof e?this.el.getPosition():void this.el.playerSeek(e)},t.prototype.duration=function(){return this.__duration},t.prototype.mute=function(e){return"undefined"==typeof e?0==this.volume():void this.volume(e?0:this.__lastVol)},t.prototype.volume=function(e){return"undefined"==typeof e?this.el&&this.el.getState().volume:(this.el&&this.el.playerVolume(e),0!=e&&(this.__lastVol=e),this.options.volume=e,void this.pub({type:p.MSG.VolumeChange,src:this,ts:+new Date}))},t.prototype.fullscreen=function(e){return y.doFullscreen(this.player,e,this.owner)},t.prototype.load=function(e,t){this.pub({type:p.MSG.Load,src:this,ts:+new Date,detail:{src:e,type:t}}),this.el&&this.el.playerLoad(e)},t.prototype.playing=function(){return this.el&&this.el.getState&&this.el.getState().playState===v.PlayStates.PLAYING},t.prototype.type=function(){return this.__type},t.prototype.state=function(){return this.playState},t}(u["default"]);t["default"]=w},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=i(24),c=n(a),u=i(28),p=n(u),h=i(29),d=n(h),f=i(30),y=i(31),A=n(y),v=i(32),g=n(v),m=i(33),w=n(m),b=i(34),M=n(b),S=i(4),I=i(2),E=o(I),_=i(3),T=o(_),D=i(1),L=o(D),O=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"Panel"))}return l(t,e),t.prototype.render=function(t){return this.createEl("div",{class:"vcp-controls-panel"}),this.el.appendChild(E.createEl("div",{class:"vcp-panel-bg"})),this.playToggle=new p["default"](this.player),this.playToggle.render(this.el),this.timelabel=new g["default"](this.player),this.timelabel.render(this.el),this.timeline=new A["default"](this.player),this.timeline.render(this.el),this.options.fullscreenEnabled===!0&&(this.fullscreen=new d["default"](this.player),this.fullscreen.render(this.el)),L.IS_MOBILE||(this.volume=new w["default"](this.player),this.volume.render(this.el)),this.options.videoSource&&this.options.videoSource.definitions.length>1&&!L.IS_MOBILE&&(this.claritySwitcher=new M["default"](this.player),this.claritySwitcher.render(this.el)),e.prototype.render.call(this,t)},t.prototype.setup=function(){var e=T.bind(this,this.handleMsg);this.sub(f.MSG.Changing,this.volume,e),this.sub(f.MSG.Changed,this.timeline.progress,e),this.sub(S.MSG.TimeUpdate,this.player.video,e),this.sub(S.MSG.Progress,this.player.video,e),this.sub(S.MSG.MetaLoaded,this.player.video,e),this.sub(S.MSG.Pause,this.player.video,e),this.sub(S.MSG.Play,this.player.video,e),this.sub(S.MSG.Ended,this.player.video,e)},t.prototype.handleMsg=function(e){switch(e.type){case S.MSG.MetaLoaded:this.timeline.percent(this.player.percent()),this.timeline.buffered(this.player.buffered()),this.player.volume("undefined"==typeof this.options.volume?.5:this.options.volume),!this.options.autoplay&&this.show();break;case S.MSG.TimeUpdate:this.timeline.scrubbing||this.timeline.percent(this.player.percent());break;case S.MSG.Pause:this.show();break;case S.MSG.Play:this.hide();break;case S.MSG.Progress:this.timeline.buffered(this.player.buffered());break;case f.MSG.Changed:e.src===this.timeline.progress&&this.player.percent(this.timeline.percent());break;case S.MSG.Ended:this.show()}},t.prototype.toggle=function(){E.hasClass(this.el,"show")?this.hide():this.show()},t.prototype.show=function(){E.hasClass(this.el,"hide")&&(E.removeClass(this.el,"hide"),E.addClass(this.el,"show"))},t.prototype.hide=function(){E.removeClass(this.el,"show"),E.addClass(this.el,"hide")},t}(c["default"]);t["default"]=O},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=i(24),c=n(a),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=(o(h),i(25)),f=(o(d),function(e){function t(i){return r(this,t),s(this,e.call(this,i,"PlayToggle"))}return l(t,e),t.prototype.render=function(t){return this.createEl("div",{class:"vcp-playtoggle"}),e.prototype.render.call(this,t)},t.prototype.setup=function(){this.on("click",this.onClick)},t.prototype.onClick=function(){this.player.togglePlay()},t.prototype.handleMsg=function(e){console.log("@"+this.name,e)},t}(c["default"]));t["default"]=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=i(24),c=n(a),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=o(h),f=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"FullscreenToggle"))}return l(t,e),t.prototype.render=function(t){return this.createEl("div",{class:"vcp-fullscreen-toggle"}),window.fsApi=d.FullscreenApi,e.prototype.render.call(this,t)},t.prototype.setup=function(){this.on("click",this.onClick)},t.prototype.onClick=function(){this.player.fullscreen(!this.player.fullscreen())},t.prototype.handleMsg=function(e){console.log(t.name,e)},t}(c["default"]);t["default"]=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.MSG=void 0;var a=i(24),c=n(a),u=i(2),p=o(u),h=i(4),d=(o(h),i(3)),f=(o(d),t.MSG={Changing:"sliderchanging",Changed:"sliderchanged"}),y=function(e){function t(i,o){r(this,t);var n=s(this,e.call(this,i,"Slider"));return n.vertical=o||!1,n}return l(t,e),t.prototype.render=function(t,i){var o=this.vertical?"vcp-slider-vertical":"vcp-slider";return this.createEl("div",{class:o}),this.track=p.createEl("div",{class:"vcp-slider-track"}),this.thumb=p.createEl("div",{class:"vcp-slider-thumb"}),this.el.appendChild(this.track),this.el.appendChild(this.thumb),this.enabled="undefined"==typeof i||i,e.prototype.render.call(this,t)},t.prototype.setup=function(){this.enabled&&(this.ownerDoc=document.body.ownerDocument,this.on("mousedown",this.mousedown),this.on("touchstart",this.mousedown))},t.prototype.handleMsg=function(e){},t.prototype.mousedown=function(e){return e.preventDefault&&e.preventDefault(),this.pos=p.findElPosition(this.el),this.on(this.ownerDoc,"mouseup",this.mouseup),this.on(this.ownerDoc,"mousemove",this.mousemove),this.on(this.ownerDoc,"touchend",this.mouseup),this.on(this.ownerDoc,"touchmove",this.mousemove),this.mousemove(e),!1},t.prototype.mouseup=function(e){e.target||e.srcElement;this.off(this.ownerDoc,"mouseup",this.mouseup),this.off(this.ownerDoc,"mousemove",this.mousemove),this.off(this.ownerDoc,"touchend",this.mouseup),this.off(this.ownerDoc,"touchmove",this.mousemove),this.pub({type:f.Changed,src:this,private:!0})},t.prototype.mousemove=function(e){var t=p.getPointerPosition(this.el,e,this.pos);this.vertical?(this.__percent=1-t.y,this.thumb.style.top=100*this.__percent+"%"):(this.__percent=t.x,this.thumb.style.left=100*this.__percent+"%"),this.__percent=Number(this.__percent.toFixed(3)),this.pub({type:f.Changing,src:this,private:!0})},t.prototype.percent=function(e){return e||0==e?(this.__percent=e,void(this.vertical?this.thumb.style.top=100*this.__percent+"%":this.thumb.style.left=100*this.__percent+"%")):this.__percent},t}(c["default"]);t["default"]=y},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=i(30),c=n(a),u=i(24),p=n(u),h=i(2),d=(o(h),i(3)),f=o(d),y=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"Timeline"))}return l(t,e),t.prototype.render=function(t){return this.enabled=!this.options.live,this.createEl("div",{class:"vcp-timeline"}),this.progress=new c["default"](this.player,!1),this.progress.render(this.el,this.enabled),this.track=this.progress.track,this.enabled||(this.el.style.display="none"),e.prototype.render.call(this,t)},t.prototype.setup=function(){this.enabled&&(this.sub(a.MSG.Changing,this.progress,f.bind(this,this.handleMsg)),this.sub(a.MSG.Changed,this.progress,f.bind(this,this.handleMsg)))},t.prototype.handleMsg=function(e){e.type===a.MSG.Changing?(this.scrubbing=!0,this.syncLabel(this.percent())):e.type===a.MSG.Changed&&(this.scrubbing=!1)},t.prototype.syncLabel=function(e){var t=this.player.duration();e=Math.min(e,1);var i="";t&&(i=f.convertTime(e*t)+" / "+f.convertTime(t)),this.pub({type:"timelabel",src:"timeline",label:i,private:!0})},t.prototype.buffered=function(e){this.enabled&&(e=Math.min(e,1),this.__buffered=e,this.track.style.width=100*e+"%")},t.prototype.percent=function(e){if(this.enabled)return"undefined"==typeof e?this.progress.percent()||0:(e=Math.min(e,1),this.syncLabel(e),this.__buffered0&&this.__muted&&this.syncMute(!1)}},t.prototype.toggleMute=function(e){var t=!this.player.mute();this.player.mute(t)},t.prototype.syncMute=function(e){e?d.addClass(this.el,"vcp-volume-muted"):d.removeClass(this.el,"vcp-volume-muted"),this.__muted=e},t.prototype.syncTrack=function(e){this.track.style.height=100*e+"%",this.volume.percent(1-e)},t.prototype.percent=function(e){return"undefined"==typeof e?1-this.volume.percent()||0:(this.player.volume(e),e)},t}(p["default"]);t["default"]=v},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=i(24),c=n(a),u=i(2),p=o(u),h=i(3),d=o(h),f={od:"超清",hd:"高清",sd:"标清"},y=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"ClaritySwitcher"));return f=d.extend({},i.options.clarityLabel,f),i.claritySwitcher=o,o}return l(t,e),t.prototype.render=function(t){this.show=!1,this.createEl("div",{class:"vcp-clarityswitcher"}),this.current=p.createEl("a",{class:"vcp-vertical-switcher-current"}),this.container=p.createEl("div",{class:"vcp-vertical-switcher-container"}),this.items=[],this.currentItem="";var i=this.options.videoSource;this.current.innerHTML=f[i.curDef],this.el.appendChild(this.current);for(var o=0;o10||A.IOS_VERSION>10)&&"system"==this.player.options.controls&&this.player.togglePlay()},t.prototype.handleMsg=function(e){switch(e.type){case v.MSG.Load:this.__loaded=!1,this.setPoster(this.poster.start);break;case v.MSG.MetaLoaded:if(this.__loaded=!0,!this.player.playing())break;this.hide();case v.MSG.Play:if(!this.__loaded)break;this.hide();break;case v.MSG.Pause:if(!this.__loaded)break;this.options.pausePosterEnabled===!0&&this.setPoster(this.poster.pause);break;case v.MSG.Ended:if(!this.__loaded)break;break;case v.MSG.Error:if(!this.__loaded)break}},t.prototype.setPoster=function(e){if(e=e||this.poster.src){this.__preload&&(this.__preload.onload=null),this.__preload=new Image;var t=this.__preload;this.hide();var i=this;t.onload=function(){if(i.pic.src!==t.src&&(i.pic.src=t.src,i.show(),!f.supportStyle("transform"))){var e="stretch"==i.poster.style;if(e)return;var o="cover"==i.poster.style?i.options.width/(t.width/t.height):t.height,n="-"+i.options.width/2+"px",r="-"+o/2+"px";i.pic.style.cssText="left: 50%; top: 50%; margin-left: "+n+"; margin-top: "+r+";"}},t.src=e}},t.prototype.toggle=function(e){clearTimeout(this.__tid);var t=this;this.__tid=setTimeout(function(){t.el.style.display=e},100)},t.prototype.hide=function(){this.__preload&&(this.__preload.onload=null),this.toggle("none")},t.prototype.show=function(){this.toggle("block")},t}(u["default"]);t["default"]=g},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=i(24),c=n(a),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=(o(h),function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"Loading"));return o.timeSeed=null,o}return l(t,e),t.prototype.render=function(t){return this.createEl("div",{class:"vcp-loading"}),e.prototype.render.call(this,t)},t.prototype.setup=function(){},t.prototype.handleMsg=function(e){},t.prototype.show=function(){if(this.options.showLoading!==!1){var e=500,t=this;this.timeSeed=setTimeout(function(){t.el.style.display="block"},e)}},t.prototype.hide=function(){this.timeSeed&&(clearTimeout(this.timeSeed),this.timeSeed=null),this.el.style.display="none"},t}(c["default"]));t["default"]=d},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=i(24),c=n(a),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=o(h),f={EnvError:"当前系统环境不支持播放该视频格式",EnvFlashError:"当前系统环境不支持播放该视频格式",VideoSourceError:"获取视频失败,请检查播放链接是否有效",NetworkError:"网络错误,请检查网络配置或者播放链接是否正确",VideoDecodeError:"视频解码错误",ArgumentError:"使用参数有误,请检查播放器调用代码",UrlEmpty:"请填写视频播放地址",FileProtocol:"请勿在file协议下使用播放器,可能会导致视频无法播放",LiveFinish:"直播已结束,请稍后再来",CrossDomainError:"无法加载视频文件,跨域访问被拒绝",Ie9IframeFullscreenError:"在IE9中用iframe引用的实例无法支持全屏"},y={FileProtocol:[10],ArgumentError:[11],UrlEmpty:[12],LiveFinish:[13],VideoSourceError:[1002,2032],EnvError:[4,5],NetworkError:[1001,1,2],VideoDecodeError:[3],CrossDomainError:[2048],Ie9IframeFullscreenError:[10001]},A=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"ErrorTips"));o.customTips=d.extend({},f,o.options.wording);for(var n in y)for(var l=0;l { + number = parseFloat(number) + return '¥' + number.toFixed(2) +} + +export const formatNumber = (number) => { + number = number.toString() + return number[1] ? number : '0' + number +} + +export const formatDuration = (number) => { + let result = '00:00' + if (number > 0) { + let hours = Math.floor(number / 3600) + let minutes = Math.floor((number - hours * 3600) / 60) + let seconds = number % 60 + let format = [] + if (hours > 0) { + format.push(formatNumber(hours)) + } + if (minutes > 0) { + format.push(formatNumber(minutes)) + } + if (seconds >= 0) { + format.push(formatNumber(seconds)) + } + return format.join(':') + } + return result +} + +export const thumbAvatar = (url) => { + return `${url}!avatar_160` +} + +export const thumbCover = (url) => { + return `${url}!cover_270` +} + +export const thumbSlide = (url) => { + return `${url}!slide_1100` +} + +export const orderStatus = (status) => { + const mapping = { + '1': '待支付', + '2': '发货中', + '3': '已完成', + '4': '已关闭', + '5': '已退款', + } + return mapping[status] ? mapping[status] : '未知' +} + +export const refundStatus = (status) => { + const mapping = { + '1': '待处理', + '2': '已取消', + '3': '退款中', + '4': '已拒绝', + '5': '已完成', + '6': '已失败', + } + return mapping[status] ? mapping[status] : '未知' +} + +export const courseLevel = (level) => { + const mapping = { + '1': '入门', + '2': '初级', + '3': '中级', + '4': '高级', + } + return mapping[level] ? mapping[level] : '未知' +} + +export const redirect = (url) => { + const tabUrls = [ + '/pages/index/index', + '/pages/course/category', + '/pages/teacher/index', + '/pages/me/index', + '/pages/im/index', + ] + if (tabUrls.indexOf(url) !== -1) { + uni.switchTab({ + url: url + }) + } else if (url.indexOf('://') !== -1) { + plus.runtime.openURL(url) + } else if (url.indexOf('/pages') === 0) { + uni.navigateTo({ + url: url + }) + } else { + uni.showToast({ + title: '不支持的协议类型' + }) + } +} + +export const getPlatform = () => { + let platform = 'OTHER' + // #ifdef H5 + platform = 'H5' + // #endif + // #ifdef MP-WEIXIN + platform = 'MP_WEIXIN' + // #endif + // #ifdef MP-ALIPAY + platform = 'MP_ALIPAY' + // #endif + // #ifdef MP-TOUTIAO + platform = 'MP_TOUTIAO' + // #endif + // #ifdef APP-PLUS + platform = uni.getSystemInfoSync().platform + // #endif + return platform.toLowerCase() +} + +export const getToken = () => { + let key = Config.cacheKey.token + return Storage.get(key) +} + +export const setToken = (value) => { + let key = Config.cacheKey.token + return Storage.set(key, value) +} + +export const checkLogin = (redirect = '') => { + if (redirect === '') { + redirect = '/pages/index/index' + } + if (getToken() === '') { + uni.reLaunch({ + url: '/pages/account/login?redirect=' + encodeURIComponent(redirect) + }) + return false + } + return true +} diff --git a/common/validator.js b/common/validator.js new file mode 100644 index 0000000..06e2e31 --- /dev/null +++ b/common/validator.js @@ -0,0 +1,19 @@ +export const phone = (str) => { + return /^1(3|4|5|6|7|8|9)[0-9]{9}$/.test(str) +} + +export const email = (str) => { + return /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(str) +} + +export const password = (str) => { + return /^[0-9a-zA-Z~!@#$%^&*]{6,16}$/.test(str) +} + +export const userName = (str) => { + return /^[0-9a-zA-Z\u4E00-\u9FA5]{2,15}$/.test(str) +} + +export const verifyCode = (str) => { + return /^[0-9]{6}$/.test(str) +} \ No newline at end of file diff --git a/components/kg-course-list/course-list.vue b/components/kg-course-list/course-list.vue new file mode 100644 index 0000000..a940637 --- /dev/null +++ b/components/kg-course-list/course-list.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..6e0e3e6 --- /dev/null +++ b/main.js @@ -0,0 +1,53 @@ +import Vue from 'vue' +import App from './App' +import * as Utils from '@/common/utils.js' +import * as Api from '@/common/api.js' + +Vue.prototype.$utils = Utils +Vue.prototype.$api = Api + +Vue.config.productionTip = false + +Vue.filter('formatPrice', function(argv) { + return Utils.formatPrice(argv) +}) + +Vue.filter('formatDuration', function(argv) { + return Utils.formatDuration(argv) +}) + +Vue.filter('thumbAvatar', function(argv) { + return Utils.thumbAvatar(argv) +}) + +Vue.filter('thumbCover', function(argv) { + return Utils.thumbCover(argv) +}) + +Vue.filter('thumbSlide', function(argv) { + return Common.thumbSlide(argv) +}) + +Vue.filter('courseLevel', function(argv) { + return Utils.courseLevel(argv) +}) + +Vue.filter('orderStatus', function(argv) { + return Utils.orderStatus(argv) +}) + +Vue.filter('refundStatus', function(argv) { + return Utils.refundStatus(argv) +}) + +App.mpType = 'app' + +import uView from 'uview-ui' + +Vue.use(uView) + +const app = new Vue({ + ...App +}) + +app.$mount() diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..6e6a5b9 --- /dev/null +++ b/manifest.json @@ -0,0 +1,78 @@ +{ + "name" : "ctc-app", + "appid" : "__UNI__CC01E6A", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics": { + "enable": false + } +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..5965fdf --- /dev/null +++ b/pages.json @@ -0,0 +1,254 @@ +{ + "easycom": { + "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" + }, + "pages": [{ + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "酷瓜云课堂" + } + }, { + "path": "pages/search/index", + "style": { + "navigationBarTitleText": "内容搜索" + } + }, { + "path": "pages/course/category", + "style": { + "navigationBarTitleText": "课程分类" + } + }, { + "path": "pages/course/list", + "style": { + "navigationBarTitleText": "课程列表" + } + }, { + "path": "pages/course/info", + "style": { + "navigationBarTitleText": "课程详情" + } + }, { + "path": "pages/course/consults", + "style": { + "navigationBarTitleText": "课程咨询" + } + }, { + "path": "pages/course/reviews", + "style": { + "navigationBarTitleText": "课程评价" + } + }, { + "path": "pages/chapter/vod", + "style": { + "navigationBarTitleText": "课时详情" + } + }, { + "path": "pages/chapter/live", + "style": { + "navigationBarTitleText": "课时详情" + } + }, { + "path": "pages/chapter/read", + "style": { + "navigationBarTitleText": "课时详情" + } + }, { + "path": "pages/teacher/list", + "style": { + "navigationBarTitleText": "教师列表" + } + }, { + "path": "pages/teacher/index", + "style": { + "navigationBarTitleText": "教师主页" + } + }, { + "path": "pages/im/group/list", + "style": { + "navigationBarTitleText": "群组列表" + } + }, { + "path": "pages/im/group/index", + "style": { + "navigationBarTitleText": "群组主页" + } + }, { + "path": "pages/review/info", + "style": { + "navigationBarTitleText": "评价详情" + } + }, { + "path": "pages/review/add", + "style": { + "navigationBarTitleText": "发布评价" + } + }, { + "path": "pages/review/edit", + "style": { + "navigationBarTitleText": "修改评价" + } + }, { + "path": "pages/consult/info", + "style": { + "navigationBarTitleText": "咨询详情" + } + }, { + "path": "pages/consult/add", + "style": { + "navigationBarTitleText": "发布咨询" + } + }, { + "path": "pages/consult/edit", + "style": { + "navigationBarTitleText": "修改咨询" + } + }, { + "path": "pages/help/list", + "style": { + "navigationBarTitleText": "帮助列表" + } + }, { + "path": "pages/help/info", + "style": { + "navigationBarTitleText": "帮助详情" + } + }, { + "path": "pages/page/info", + "style": { + "navigationBarTitleText": "单页详情" + } + }, { + "path": "pages/me/index", + "style": { + "navigationBarTitleText": "我的主页" + } + }, { + "path": "pages/me/courses", + "style": { + "navigationBarTitleText": "我的课程" + } + }, { + "path": "pages/me/favorites", + "style": { + "navigationBarTitleText": "我的收藏" + } + }, { + "path": "pages/me/consults", + "style": { + "navigationBarTitleText": "我的咨询" + } + }, { + "path": "pages/me/reviews", + "style": { + "navigationBarTitleText": "我的评价" + } + }, { + "path": "pages/me/friends", + "style": { + "navigationBarTitleText": "我的好友" + } + }, { + "path": "pages/me/groups", + "style": { + "navigationBarTitleText": "我的群组" + } + }, { + "path": "pages/me/orders", + "style": { + "navigationBarTitleText": "我的订单" + } + }, { + "path": "pages/me/refunds", + "style": { + "navigationBarTitleText": "我的退款" + } + }, { + "path": "pages/me/profile", + "style": { + "navigationBarTitleText": "资料信息" + } + }, { + "path": "pages/me/account", + "style": { + "navigationBarTitleText": "账户信息" + } + }, { + "path": "pages/account/login", + "style": { + "navigationBarTitleText": "用户登录" + } + }, { + "path": "pages/account/register", + "style": { + "navigationBarTitleText": "用户注册" + } + }, { + "path": "pages/account/forget", + "style": { + "navigationBarTitleText": "忘记密码" + } + }, { + "path": "pages/vip/index", + "style": { + "navigationBarTitleText": "会员中心" + } + }, { + "path": "pages/order/confirm", + "style": { + "navigationBarTitleText": "确认订单" + } + }, { + "path": "pages/order/pay", + "style": { + "navigationBarTitleText": "支付订单" + } + }, { + "path": "pages/order/info", + "style": { + "navigationBarTitleText": "订单详情" + } + }, { + "path": "pages/trade/h5pay", + "style": { + "navigationBarTitleText": "H5支付" + } + }, { + "path": "pages/refund/confirm", + "style": { + "navigationBarTitleText": "确认退款" + } + }, { + "path": "pages/refund/info", + "style": { + "navigationBarTitleText": "退款详情" + } + }], + "tabBar": { + "list": [{ + "pagePath": "pages/index/index", + "text": "首页" + }, + { + "pagePath": "pages/course/category", + "text": "分类" + }, + { + "pagePath": "pages/teacher/list", + "text": "名师" + }, + { + "pagePath": "pages/me/index", + "text": "我的" + } + ], + "backgroundColor": "#ffffff", + "color": "#888888", + "selectedColor": "#1aad19" + }, + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8" + } +} diff --git a/pages/account/forget.vue b/pages/account/forget.vue new file mode 100644 index 0000000..5fa8f44 --- /dev/null +++ b/pages/account/forget.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/pages/account/login.vue b/pages/account/login.vue new file mode 100644 index 0000000..1354049 --- /dev/null +++ b/pages/account/login.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/pages/account/register.vue b/pages/account/register.vue new file mode 100644 index 0000000..e937f87 --- /dev/null +++ b/pages/account/register.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/pages/chapter/info.vue b/pages/chapter/info.vue new file mode 100644 index 0000000..33adbeb --- /dev/null +++ b/pages/chapter/info.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/pages/chapter/live.vue b/pages/chapter/live.vue new file mode 100644 index 0000000..6a5d1e1 --- /dev/null +++ b/pages/chapter/live.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/pages/chapter/read.vue b/pages/chapter/read.vue new file mode 100644 index 0000000..6a5d1e1 --- /dev/null +++ b/pages/chapter/read.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/pages/chapter/vod.vue b/pages/chapter/vod.vue new file mode 100644 index 0000000..949ae44 --- /dev/null +++ b/pages/chapter/vod.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/pages/consult/add.vue b/pages/consult/add.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/consult/add.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/consult/edit.vue b/pages/consult/edit.vue new file mode 100644 index 0000000..2e7e26e --- /dev/null +++ b/pages/consult/edit.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/pages/consult/info.vue b/pages/consult/info.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/consult/info.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/course/category.vue b/pages/course/category.vue new file mode 100644 index 0000000..997b55f --- /dev/null +++ b/pages/course/category.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/pages/course/consults.vue b/pages/course/consults.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/course/consults.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/course/info.vue b/pages/course/info.vue new file mode 100644 index 0000000..6b943e0 --- /dev/null +++ b/pages/course/info.vue @@ -0,0 +1,356 @@ + + + + + diff --git a/pages/course/list.vue b/pages/course/list.vue new file mode 100644 index 0000000..e1a0407 --- /dev/null +++ b/pages/course/list.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/pages/course/reviews.vue b/pages/course/reviews.vue new file mode 100644 index 0000000..e23ed5e --- /dev/null +++ b/pages/course/reviews.vue @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/pages/help/info.vue b/pages/help/info.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/help/info.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/help/list.vue b/pages/help/list.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/help/list.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/im/group/index.vue b/pages/im/group/index.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/im/group/index.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/im/group/list.vue b/pages/im/group/list.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/im/group/list.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..d39b583 --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/pages/me/account.vue b/pages/me/account.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/me/account.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/me/consults.vue b/pages/me/consults.vue new file mode 100644 index 0000000..f0b3fc1 --- /dev/null +++ b/pages/me/consults.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/pages/me/courses.vue b/pages/me/courses.vue new file mode 100644 index 0000000..d12f0c1 --- /dev/null +++ b/pages/me/courses.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/pages/me/favorites.vue b/pages/me/favorites.vue new file mode 100644 index 0000000..992c0ad --- /dev/null +++ b/pages/me/favorites.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/pages/me/friends.vue b/pages/me/friends.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/me/friends.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/me/groups.vue b/pages/me/groups.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/me/groups.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/me/index.vue b/pages/me/index.vue new file mode 100644 index 0000000..54e39ef --- /dev/null +++ b/pages/me/index.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/pages/me/orders.vue b/pages/me/orders.vue new file mode 100644 index 0000000..dd49431 --- /dev/null +++ b/pages/me/orders.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/pages/me/profile.vue b/pages/me/profile.vue new file mode 100644 index 0000000..43876f3 --- /dev/null +++ b/pages/me/profile.vue @@ -0,0 +1,111 @@ +