├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ └── qqci.yml ├── .gitignore ├── LICENSE ├── README.md ├── app.js ├── app.json ├── app.qss ├── commitlint.config.js ├── config.js ├── image ├── audioPause.png ├── audioPlay.png ├── beauty-dis.png ├── beauty.png ├── camera-gray.png ├── camera.png ├── common │ ├── ad.svg │ ├── entry.svg │ ├── icon-add.svg │ ├── icon-arrow-right@2x.svg │ ├── icon-copy.svg │ ├── img-avatar@2x.png │ ├── individuation.svg │ ├── logo-mini.svg │ ├── map.svg │ ├── media.svg │ ├── msg.svg │ ├── new.png │ ├── relationship.svg │ ├── share.svg │ └── wxPay.svg ├── icon-add@2x.png ├── icon-delete.svg ├── icon-pause-02.svg ├── icon-pause.svg ├── icon-play.svg ├── icon-share.svg ├── icon-stop-02.svg ├── icon-stop.svg ├── icon-voice.svg ├── index │ ├── ad.svg │ ├── api.svg │ ├── canvas.svg │ ├── content.svg │ ├── custom-dress.svg │ ├── device.svg │ ├── form.svg │ ├── group.svg │ ├── location.svg │ ├── logo-api.svg │ ├── logo-component.svg │ ├── logo-superpower.svg │ ├── map.svg │ ├── media.svg │ ├── nav.svg │ ├── network.svg │ ├── official-dress.svg │ ├── open.svg │ ├── page.svg │ ├── pc.svg │ ├── publish.svg │ ├── qzone.svg │ ├── storage.svg │ ├── view.svg │ └── worker.svg ├── mic-dis.png ├── mic.png ├── play.png ├── plus.png ├── qq-miniapp.png └── tabbar │ ├── icon-api-selected@2x.png │ ├── icon-api@2x.png │ ├── icon-component-selected@2x.png │ ├── icon-component@2x.png │ ├── icon-superpower-selected@2x.png │ └── icon-superpower@2x.png ├── miniprogram_npm └── crypto-js │ ├── index.js │ └── index.js.map ├── package.json ├── page ├── API │ ├── components │ │ └── set-tab-bar │ │ │ ├── set-tab-bar.js │ │ │ ├── set-tab-bar.json │ │ │ ├── set-tab-bar.qml │ │ │ └── set-tab-bar.qss │ ├── index.js │ ├── index.json │ ├── index.qml │ ├── index.qss │ └── pages │ │ ├── InnerAudioContext │ │ ├── InnerAudioContext.js │ │ ├── InnerAudioContext.json │ │ ├── InnerAudioContext.qml │ │ ├── InnerAudioContext.qss │ │ └── album.jpg │ │ ├── action-sheet │ │ ├── action-sheet.js │ │ ├── action-sheet.json │ │ ├── action-sheet.qml │ │ └── action-sheet.qss │ │ ├── animation │ │ ├── animation.js │ │ ├── animation.json │ │ ├── animation.qml │ │ └── animation.qss │ │ ├── background-audio │ │ ├── background-audio.js │ │ ├── background-audio.json │ │ ├── background-audio.qml │ │ └── background-audio.qss │ │ ├── canvas │ │ ├── canvas.js │ │ ├── canvas.json │ │ ├── canvas.qml │ │ ├── canvas.qss │ │ └── example.js │ │ ├── capture-screen │ │ ├── capture-screen.js │ │ ├── capture-screen.json │ │ ├── capture-screen.qml │ │ └── capture-screen.qss │ │ ├── clipboard-data │ │ ├── clipboard-data.js │ │ ├── clipboard-data.json │ │ ├── clipboard-data.qml │ │ └── clipboard-data.qss │ │ ├── download-file │ │ ├── download-file.js │ │ ├── download-file.json │ │ ├── download-file.qml │ │ └── download-file.qss │ │ ├── file │ │ ├── file.js │ │ ├── file.json │ │ ├── file.qml │ │ └── file.qss │ │ ├── get-location │ │ ├── get-location.js │ │ ├── get-location.json │ │ ├── get-location.qml │ │ └── get-location.qss │ │ ├── get-network-type │ │ ├── get-network-type.js │ │ ├── get-network-type.json │ │ ├── get-network-type.qml │ │ └── get-network-type.qss │ │ ├── get-qml-node-info │ │ ├── get-qml-node-info.js │ │ ├── get-qml-node-info.json │ │ ├── get-qml-node-info.qml │ │ └── get-qml-node-info.qss │ │ ├── get-system-info │ │ ├── get-system-info.js │ │ ├── get-system-info.json │ │ ├── get-system-info.qml │ │ └── get-system-info.qss │ │ ├── get-user-info │ │ ├── get-user-info.js │ │ ├── get-user-info.json │ │ ├── get-user-info.qml │ │ └── get-user-info.qss │ │ ├── gyroscope │ │ ├── gyroscope.js │ │ ├── gyroscope.json │ │ ├── gyroscope.qml │ │ ├── gyroscope.qss │ │ └── image.png │ │ ├── image │ │ ├── image.js │ │ ├── image.json │ │ ├── image.qml │ │ └── image.qss │ │ ├── intersection-observer │ │ ├── intersection-observer.js │ │ ├── intersection-observer.json │ │ ├── intersection-observer.qml │ │ └── intersection-observer.qss │ │ ├── login │ │ ├── login.js │ │ ├── login.json │ │ ├── login.qml │ │ └── login.qss │ │ ├── make-phone-call │ │ ├── make-phone-call.js │ │ ├── make-phone-call.json │ │ ├── make-phone-call.qml │ │ └── make-phone-call.qss │ │ ├── modal │ │ ├── modal.js │ │ ├── modal.json │ │ ├── modal.qml │ │ └── modal.qss │ │ ├── navigate-to-miniprogram │ │ ├── navigate-to-miniprogram.js │ │ ├── navigate-to-miniprogram.json │ │ ├── navigate-to-miniprogram.qml │ │ └── navigate-to-miniprogram.qss │ │ ├── navigation-bar-loading │ │ ├── navigation-bar-loading.js │ │ ├── navigation-bar-loading.json │ │ ├── navigation-bar-loading.qml │ │ └── navigation-bar-loading.qss │ │ ├── navigator │ │ ├── navigator.js │ │ ├── navigator.json │ │ ├── navigator.qml │ │ └── navigator.qss │ │ ├── on-accelerometer-change │ │ ├── on-accelerometer-change.js │ │ ├── on-accelerometer-change.json │ │ ├── on-accelerometer-change.qml │ │ └── on-accelerometer-change.qss │ │ ├── on-compass-change │ │ ├── compass.png │ │ ├── on-compass-change.js │ │ ├── on-compass-change.json │ │ ├── on-compass-change.qml │ │ └── on-compass-change.qss │ │ ├── on-network-status-change │ │ ├── on-network-status-change.js │ │ ├── on-network-status-change.json │ │ ├── on-network-status-change.qml │ │ └── on-network-status-change.qss │ │ ├── page-scroll │ │ ├── page-scroll.js │ │ ├── page-scroll.json │ │ ├── page-scroll.qml │ │ └── page-scroll.qss │ │ ├── pull-down-refresh │ │ ├── pull-down-refresh.js │ │ ├── pull-down-refresh.json │ │ ├── pull-down-refresh.qml │ │ └── pull-down-refresh.qss │ │ ├── request │ │ ├── request.js │ │ ├── request.json │ │ ├── request.qml │ │ └── request.qss │ │ ├── scan-code │ │ ├── scan-code.js │ │ ├── scan-code.json │ │ ├── scan-code.qml │ │ └── scan-code.qss │ │ ├── screen-brightness │ │ ├── screen-brightness.js │ │ ├── screen-brightness.json │ │ ├── screen-brightness.qml │ │ └── screen-brightness.qss │ │ ├── set-navigation-bar-title │ │ ├── set-navigation-bar-title.js │ │ ├── set-navigation-bar-title.json │ │ ├── set-navigation-bar-title.qml │ │ └── set-navigation-bar-title.qss │ │ ├── setting │ │ ├── setting.js │ │ ├── setting.json │ │ ├── setting.qml │ │ └── setting.qss │ │ ├── storage │ │ ├── storage.js │ │ ├── storage.json │ │ ├── storage.qml │ │ └── storage.qss │ │ ├── toast │ │ ├── toast.js │ │ ├── toast.json │ │ ├── toast.qml │ │ └── toast.qss │ │ ├── upload-file │ │ ├── upload-file.js │ │ ├── upload-file.json │ │ ├── upload-file.qml │ │ └── upload-file.qss │ │ ├── vibrate │ │ ├── vibrate.js │ │ ├── vibrate.json │ │ ├── vibrate.qml │ │ └── vibrate.qss │ │ ├── video │ │ ├── video.js │ │ ├── video.json │ │ ├── video.qml │ │ └── video.qss │ │ ├── voice │ │ ├── voice.js │ │ ├── voice.json │ │ ├── voice.qml │ │ └── voice.qss │ │ ├── web-socket │ │ ├── web-socket.js │ │ ├── web-socket.json │ │ ├── web-socket.qml │ │ └── web-socket.qss │ │ └── worker │ │ ├── worker.js │ │ ├── worker.json │ │ ├── worker.qml │ │ └── worker.qss ├── common │ ├── components │ │ └── x-list │ │ │ ├── x-list.js │ │ │ ├── x-list.json │ │ │ ├── x-list.qml │ │ │ └── x-list.qss │ ├── foot.qml │ ├── head.qml │ ├── index.qss │ └── lib │ │ └── qui.qss ├── component │ ├── index.js │ ├── index.json │ ├── index.qml │ ├── index.qss │ ├── pages │ │ ├── button │ │ │ ├── button.js │ │ │ ├── button.json │ │ │ ├── button.qml │ │ │ └── button.qss │ │ ├── camera │ │ │ ├── camera.js │ │ │ ├── camera.json │ │ │ ├── camera.qml │ │ │ └── camera.qss │ │ ├── canvas │ │ │ ├── canvas.js │ │ │ ├── canvas.json │ │ │ ├── canvas.qml │ │ │ └── canvas.qss │ │ ├── checkbox │ │ │ ├── checkbox.js │ │ │ ├── checkbox.json │ │ │ ├── checkbox.qml │ │ │ └── checkbox.qss │ │ ├── cover-view │ │ │ ├── cover-view.js │ │ │ ├── cover-view.json │ │ │ ├── cover-view.qml │ │ │ └── cover-view.qss │ │ ├── editor │ │ │ ├── editor.js │ │ │ ├── editor.json │ │ │ ├── editor.qml │ │ │ └── editor.qss │ │ ├── form │ │ │ ├── form.js │ │ │ ├── form.json │ │ │ ├── form.qml │ │ │ └── form.qss │ │ ├── icon │ │ │ ├── icon.js │ │ │ ├── icon.json │ │ │ ├── icon.qml │ │ │ └── icon.qss │ │ ├── image │ │ │ ├── image.js │ │ │ ├── image.json │ │ │ ├── image.qml │ │ │ └── image.qss │ │ ├── input │ │ │ ├── input.js │ │ │ ├── input.json │ │ │ ├── input.qml │ │ │ └── input.qss │ │ ├── label │ │ │ ├── label.js │ │ │ ├── label.json │ │ │ ├── label.qml │ │ │ └── label.qss │ │ ├── movable-view │ │ │ ├── movable-view.js │ │ │ ├── movable-view.json │ │ │ ├── movable-view.qml │ │ │ └── movable-view.qss │ │ ├── navigator │ │ │ ├── navigate.js │ │ │ ├── navigate.json │ │ │ ├── navigate.qml │ │ │ ├── navigate.qss │ │ │ ├── navigator.js │ │ │ ├── navigator.json │ │ │ ├── navigator.qml │ │ │ ├── navigator.qss │ │ │ ├── redirect.js │ │ │ ├── redirect.json │ │ │ ├── redirect.qml │ │ │ └── redirect.qss │ │ ├── open-data │ │ │ ├── open-data.js │ │ │ ├── open-data.json │ │ │ ├── open-data.qml │ │ │ └── open-data.qss │ │ ├── picker-view │ │ │ ├── picker-view.js │ │ │ ├── picker-view.json │ │ │ ├── picker-view.qml │ │ │ └── picker-view.qss │ │ ├── picker │ │ │ ├── picker.js │ │ │ ├── picker.json │ │ │ ├── picker.qml │ │ │ └── picker.qss │ │ ├── progress │ │ │ ├── progress.js │ │ │ ├── progress.json │ │ │ ├── progress.qml │ │ │ └── progress.qss │ │ ├── radio │ │ │ ├── radio.js │ │ │ ├── radio.json │ │ │ ├── radio.qml │ │ │ └── radio.qss │ │ ├── rich-text │ │ │ ├── rich-text.js │ │ │ ├── rich-text.json │ │ │ ├── rich-text.qml │ │ │ └── rich-text.qss │ │ ├── scroll-view │ │ │ ├── scroll-view.js │ │ │ ├── scroll-view.json │ │ │ ├── scroll-view.qml │ │ │ └── scroll-view.qss │ │ ├── slider │ │ │ ├── slider.js │ │ │ ├── slider.json │ │ │ ├── slider.qml │ │ │ └── slider.qss │ │ ├── swiper │ │ │ ├── swiper.js │ │ │ ├── swiper.json │ │ │ ├── swiper.qml │ │ │ └── swiper.qss │ │ ├── switch │ │ │ ├── switch.js │ │ │ ├── switch.json │ │ │ ├── switch.qml │ │ │ └── switch.qss │ │ ├── text │ │ │ ├── text.js │ │ │ ├── text.json │ │ │ ├── text.qml │ │ │ └── text.qss │ │ ├── textarea │ │ │ ├── textarea.js │ │ │ ├── textarea.json │ │ │ ├── textarea.qml │ │ │ └── textarea.qss │ │ ├── video │ │ │ ├── video.js │ │ │ ├── video.json │ │ │ ├── video.qml │ │ │ └── video.qss │ │ ├── view │ │ │ ├── view.js │ │ │ ├── view.json │ │ │ ├── view.qml │ │ │ └── view.qss │ │ └── web-view │ │ │ ├── web-view.js │ │ │ ├── web-view.json │ │ │ ├── web-view.qml │ │ │ └── web-view.qss │ └── resources │ │ ├── kind │ │ ├── daytime.png │ │ └── night.png │ │ └── pic │ │ ├── 1.jpg │ │ └── 2.jpg └── superpower │ ├── index.js │ ├── index.json │ ├── index.qml │ ├── index.qss │ ├── pages │ ├── VoIPChat │ │ ├── VoIPChat.js │ │ ├── VoIPChat.json │ │ ├── VoIPChat.qml │ │ └── VoIPChat.qss │ ├── ad-more-style │ │ ├── ad-more-style.js │ │ ├── ad-more-style.json │ │ ├── ad-more-style.qml │ │ └── ad-more-style.qss │ ├── add-friend │ │ ├── add-fried.qss │ │ ├── add-friend.js │ │ ├── add-friend.json │ │ └── add-friend.qml │ ├── address │ │ ├── address.js │ │ ├── address.json │ │ ├── address.qml │ │ └── address.qss │ ├── entry │ │ ├── entry.js │ │ ├── entry.json │ │ ├── entry.qml │ │ └── entry.qss │ ├── general-webpage-url │ │ ├── general-webpage-url.js │ │ ├── general-webpage-url.json │ │ ├── general-webpage-url.qml │ │ └── general-webpage-url.qss │ ├── group-profile │ │ ├── group-profile.js │ │ ├── group-profile.json │ │ ├── group-profile.qml │ │ └── group-profile.qss │ ├── individuation │ │ ├── individuation.js │ │ ├── individuation.json │ │ ├── individuation.qml │ │ └── individuation.qss │ ├── liveplayer │ │ ├── liveplayer.js │ │ ├── liveplayer.json │ │ ├── liveplayer.qml │ │ └── liveplayer.qss │ ├── livepusher-record │ │ ├── livepusher-record.js │ │ ├── livepusher-record.json │ │ ├── livepusher-record.qml │ │ └── livepusher-record.qss │ ├── livepusher │ │ ├── livepusher.js │ │ ├── livepusher.json │ │ ├── livepusher.qml │ │ └── livepusher.qss │ ├── map-more-style │ │ ├── map-more-style.js │ │ ├── map-more-style.json │ │ ├── map-more-style.qml │ │ └── map-more-style.qss │ ├── map │ │ ├── map.js │ │ ├── map.json │ │ ├── map.qml │ │ └── map.qss │ ├── media │ │ ├── media.js │ │ ├── media.json │ │ ├── media.qml │ │ └── media.qss │ ├── message-subscribe │ │ ├── message-subscribe.js │ │ ├── message-subscribe.json │ │ ├── message-subscribe.qml │ │ └── message-subscribe.qss │ ├── message-template │ │ ├── message-template.js │ │ ├── message-template.json │ │ ├── message-template.qml │ │ └── message-template.qss │ ├── message │ │ ├── message.js │ │ ├── message.json │ │ ├── message.qml │ │ └── message.qss │ ├── o2o │ │ ├── o2o.js │ │ ├── o2o.json │ │ ├── o2o.qml │ │ └── o2o.qss │ ├── open-qzone-publish │ │ ├── open-qzone-publish.js │ │ ├── open-qzone-publish.json │ │ ├── open-qzone-publish.qml │ │ └── open-qzone-publish.qss │ ├── public-profile │ │ ├── public-profile.js │ │ ├── public-profile.json │ │ ├── public-profile.qml │ │ └── public-profile.qss │ ├── qzone │ │ ├── qzone.js │ │ ├── qzone.json │ │ ├── qzone.qml │ │ └── qzone.qss │ ├── relationship │ │ ├── relationship.js │ │ ├── relationship.json │ │ ├── relationship.qml │ │ └── relationship.qss │ ├── set-custom-dress │ │ ├── avatar.png │ │ ├── set-custom-dress.js │ │ ├── set-custom-dress.json │ │ ├── set-custom-dress.qml │ │ └── set-custom-dress.qss │ ├── set-official-dress │ │ ├── 1.png │ │ ├── 2.png │ │ ├── set-official-dress.js │ │ ├── set-official-dress.json │ │ ├── set-official-dress.qml │ │ └── set-official-dress.qss │ └── wxPay │ │ ├── wxPay.js │ │ ├── wxPay.json │ │ ├── wxPay.qml │ │ └── wxPay.qss │ └── resources │ ├── kind │ ├── daytime.png │ └── night.png │ └── pic │ ├── 1.jpg │ ├── 2.jpg │ ├── custom_map_template_1.png │ ├── custom_map_template_2.png │ ├── custom_map_template_3.png │ └── custom_map_template_4.png ├── project.config.json ├── sitemap.json ├── util └── util.js └── workers └── fib └── index.js /.eslintignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /node_modules 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | commonjs: true, 4 | es6: true, 5 | }, 6 | extends: [ 7 | 'airbnb-base', 8 | ], 9 | globals: { 10 | Atomics: 'readonly', 11 | SharedArrayBuffer: 'readonly', 12 | 'worker': true, 13 | 'getApp': true, 14 | 'qq': true, 15 | 'Page': true, 16 | 'App': true, 17 | 'Component': true 18 | }, 19 | parserOptions: { 20 | ecmaVersion: 2018, 21 | }, 22 | rules: { 23 | "linebreak-style": 'off', 24 | 'no-param-reassign': 'off', 25 | 'no-plusplus': 'off', 26 | 'no-console': 'off', 27 | 'func-names': 'off' 28 | }, 29 | }; 30 | -------------------------------------------------------------------------------- /.github/workflows/qqci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build-qq-ci: #job名称 10 | 11 | runs-on: ubuntu-latest #运行环境 12 | 13 | steps: 14 | 15 | - name: Checkout 16 | uses: actions/checkout@master 17 | 18 | - name: ESLint checks 19 | run: | 20 | npm install 21 | npm run eslint 22 | 23 | - name: Build 24 | uses: docker://qqminiapp/build:latest 25 | env: 26 | PLUGIN_VERSION: 1.0.0 27 | PLUGIN_DESC: CI自动构建上传 28 | PLUGIN_APPTOKEN: ${{ secrets.APPTOKEN }} 29 | PLUGIN_BUILDUSER: ${{ github.actor }} 30 | PLUGIN_EXPERIENCE: true 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *swp 2 | .idea 3 | .DS_Store 4 | package-lock.json 5 | 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | node_modules 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT LICENSE 2 | 3 | Copyright (c) 2019-present qq-web, https://q.qq.com/ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # qq-miniprogram-demo 2 | 3 | QQ小程序示例源码 4 | > 请使用QQ开发者工具或手机QQ Android 客户端( Version ≥7.9.9)。 5 | 6 | ![小程序码](https://qzonestyle.gtimg.cn/aoi/sola/20190825223041_lNzgtoPEqK.png) 7 | 8 | ## 推荐使用CI构建 9 | 10 | 强烈推荐使用QQ小程序官方提供的docker构建镜像,本示例使用GitHub Actions接入。 11 | 12 | [yml示例](https://github.com/qq-web/qq-miniprogram-demo/blob/master/.github/workflows/qqci.yml) 13 | 14 | [查看更多文档](https://q.qq.com/wiki/tools/ci/) 15 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const openIdUrl = require('./config').openIdUrl 2 | 3 | App({ 4 | onLaunch(opts) { 5 | console.log('App Launch', opts) 6 | }, 7 | onShow(opts) { 8 | console.log('App Show', opts) 9 | this.globalData.appOnShowOptions = opts; 10 | // qq.testNewApi() 11 | }, 12 | onHide() { 13 | console.log('App Hide') 14 | }, 15 | globalData: { 16 | hasLogin: false, 17 | openid: null, 18 | appOnShowOptions: null 19 | }, 20 | // lazy loading openid 21 | getUserOpenId(callback) { 22 | const self = this 23 | 24 | if (self.globalData.openid) { 25 | callback(null, self.globalData.openid) 26 | } else { 27 | qq.login({ 28 | success(data) { 29 | qq.request({ 30 | url: openIdUrl, 31 | data: { 32 | code: data.code 33 | }, 34 | success(res) { 35 | console.log('拉取openid成功', res) 36 | self.globalData.openid = res.data.openid 37 | callback(null, self.globalData.openid) 38 | }, 39 | fail(res) { 40 | console.log('拉取用户openid失败,将无法正常使用开放接口等服务', res) 41 | callback(res) 42 | } 43 | }) 44 | }, 45 | fail(err) { 46 | console.log('qq.login 接口调用失败,将无法正常使用开放接口等服务', err) 47 | callback(err) 48 | } 49 | }) 50 | } 51 | } 52 | }) 53 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | } 4 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 小程序配置文件 3 | */ 4 | 5 | // 此处主机域名是腾讯云解决方案分配的域名 6 | // 小程序后台服务解决方案:https://www.qcloud.com/solution/la 7 | 8 | const host = '14592619.qcloud.la' 9 | 10 | const config = { 11 | 12 | // 下面的地址配合云端 Server 工作 13 | host, 14 | 15 | // 登录地址,用于建立会话 16 | loginUrl: `https://${host}/login`, 17 | 18 | // 测试的请求地址,用于测试会话 19 | requestUrl: 'https://q.qq.com', 20 | 21 | // 用code换取openId 22 | openIdUrl: `https://q.qq.com/demo/openid`, 23 | 24 | // 测试的信道服务接口 25 | tunnelUrl: `https://${host}/tunnel`, 26 | 27 | // 生成支付订单的接口 28 | paymentUrl: `https://${host}/payment`, 29 | 30 | // 发送模板消息接口 31 | templateMessageUrl: `https://q.qq.com/demo/templateMessage`, 32 | 33 | // 存储示例value 34 | testValue: '520', 35 | 36 | // 发送订阅消息接口 37 | subscribeMessageUrl: `https://q.qq.com/demo/subscribeMessage`, 38 | 39 | // 上传文件接口 40 | uploadFileUrl: 'https://q.qq.com/upload', 41 | 42 | // 微信支付接口 43 | wxPayUrl: 'https://q.qq.com/demo/wxPay', 44 | 45 | // 下载示例图片接口 46 | downloadExampleUrl: 'https://qzonestyle.gtimg.cn/aoi/sola/20190717151707_2LoGUX7hZ1.png' 47 | } 48 | 49 | module.exports = config 50 | -------------------------------------------------------------------------------- /image/audioPause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/audioPause.png -------------------------------------------------------------------------------- /image/audioPlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/audioPlay.png -------------------------------------------------------------------------------- /image/beauty-dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/beauty-dis.png -------------------------------------------------------------------------------- /image/beauty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/beauty.png -------------------------------------------------------------------------------- /image/camera-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/camera-gray.png -------------------------------------------------------------------------------- /image/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/camera.png -------------------------------------------------------------------------------- /image/common/entry.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 图标/组件/大图标/多场景入口 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /image/common/icon-add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 添加 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /image/common/img-avatar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/common/img-avatar@2x.png -------------------------------------------------------------------------------- /image/common/individuation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 图标/组件/大图标/个性化能力 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /image/common/map.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 图标/组件/大图标/地图 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /image/common/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/common/new.png -------------------------------------------------------------------------------- /image/common/share.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 图标/组件/大图标/分享强化 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /image/common/wxPay.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 微信支付能力 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /image/icon-add@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/icon-add@2x.png -------------------------------------------------------------------------------- /image/icon-play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编组 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /image/index/custom-dress.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 图标/特殊能力/设置自定义装扮@1x 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /image/index/device.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icon_device_normal@2x图标/设备/默认状态 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /image/index/location.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icon_location_normal@2x图标/默认/默认状态 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /image/index/map.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icon_map_normal@2x图标/地图/默认状态 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /image/index/open.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icon_explore capacity_normal@2x图标/开发能力/默认状态 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /image/index/page.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icon_page_normal@2x图标/页面/默认状态 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /image/index/view.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | icon_container_normal@2x图标/视图容器/默认状态 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /image/mic-dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/mic-dis.png -------------------------------------------------------------------------------- /image/mic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/mic.png -------------------------------------------------------------------------------- /image/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/play.png -------------------------------------------------------------------------------- /image/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/plus.png -------------------------------------------------------------------------------- /image/qq-miniapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/qq-miniapp.png -------------------------------------------------------------------------------- /image/tabbar/icon-api-selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/tabbar/icon-api-selected@2x.png -------------------------------------------------------------------------------- /image/tabbar/icon-api@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/tabbar/icon-api@2x.png -------------------------------------------------------------------------------- /image/tabbar/icon-component-selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/tabbar/icon-component-selected@2x.png -------------------------------------------------------------------------------- /image/tabbar/icon-component@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/tabbar/icon-component@2x.png -------------------------------------------------------------------------------- /image/tabbar/icon-superpower-selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/tabbar/icon-superpower-selected@2x.png -------------------------------------------------------------------------------- /image/tabbar/icon-superpower@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qq-web/qq-miniprogram-demo/b9c9a79617ac9bc84f3a6b344db5f309eb6f473c/image/tabbar/icon-superpower@2x.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "miniprogram-demo", 3 | "version": "1.0.0", 4 | "description": "QQ小程序示例源码 > 请使用QQ开发者工具或QQ Android客户端7.9.9/Ios客户端8.0.3及以上版本运行。", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "cp": "cp -R ./ ../../github/fork/qq-miniprogram-demo/" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "http://git.code.oa.com/QQMiniApp/miniprogram-demo.git" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "dependencies": { 17 | "crypto-js": "^3.1.9-1" 18 | }, 19 | "devDependencies": { 20 | "@commitlint/config-conventional": "^9.0.1", 21 | "commitlint": "^9.0.1", 22 | "eslint": "^7.3.1", 23 | "eslint-config-airbnb": "^18.2.0", 24 | "eslint-plugin-import": "^2.22.0", 25 | "eslint-plugin-node": "^11.1.0", 26 | "eslint-plugin-promise": "^4.2.1", 27 | "husky": "^4.2.5", 28 | "lint-staged": "^10.2.11" 29 | }, 30 | "lint-staged": { 31 | "./**/*.js": [ 32 | "eslint --fix", 33 | "git add" 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /page/API/components/set-tab-bar/set-tab-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /page/API/components/set-tab-bar/set-tab-bar.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |