Compare commits
108 Commits
718
...
dff1f49269
| Author | SHA1 | Date | |
|---|---|---|---|
| dff1f49269 | |||
| 7317550374 | |||
| 91decda774 | |||
| f92990e550 | |||
| f705e1d0c6 | |||
| bd23758d1b | |||
| 2e121eaf98 | |||
| f3c7de1d29 | |||
| 52fbc2a1bc | |||
| 3061265901 | |||
| cdc4bcf0ff | |||
|
|
dc2aa7407f | ||
|
|
4627e2bd01 | ||
|
|
f6e5da8dca | ||
|
|
5ecf2dc1fa | ||
|
|
100eea9147 | ||
|
|
b74a9810c8 | ||
|
|
c5af21f384 | ||
|
|
b5d7e637b1 | ||
|
|
60315bbf82 | ||
| 816764b9e8 | |||
| 4865a8a5d5 | |||
|
|
bb704377fe | ||
|
|
19141e2119 | ||
| 5e6ea2e0f8 | |||
| 5741f5b1ec | |||
|
|
a959fc4904 | ||
| 8e44473164 | |||
|
|
510fce9b47 | ||
|
|
9539def41c | ||
| 09c087508f | |||
| 2e5b11895c | |||
| 2d4f4c2862 | |||
|
|
85ede3add3 | ||
|
|
7576477ee0 | ||
| cf0bdc5085 | |||
| d6a3a4886e | |||
|
|
3eb3598646 | ||
|
|
359d84f0c7 | ||
| 06e5a2b48e | |||
| bf3b31327b | |||
|
|
f4d5c18e09 | ||
| fa9d44d907 | |||
| 237a2c7b79 | |||
| 1708939d77 | |||
| 1439143624 | |||
| f8a31e6067 | |||
| e49a3fc3d8 | |||
| f0b144f4d7 | |||
|
|
14807d6b54 | ||
|
|
b4f9e13059 | ||
|
|
2cc0395549 | ||
| d49f771baf | |||
| 59823a2ca1 | |||
| 55954a4a9b | |||
| b8a44a2716 | |||
|
|
ef66c81ca7 | ||
|
|
f7ffe12e38 | ||
| 7e84ee0e1b | |||
| 190cba3b6e | |||
| de4330a0a6 | |||
|
|
a328984b24 | ||
|
|
346da3ec4e | ||
|
|
fe907b792f | ||
|
|
3afba2870e | ||
| 81d9286188 | |||
| cdc8a3ed8d | |||
| c85477a45b | |||
| bb98c4af5d | |||
| 0ad2bb2b93 | |||
| 0b975c2418 | |||
| aeb28785c7 | |||
| dac8a28465 | |||
| 21b737052b | |||
| ac451d6403 | |||
| c1f78fe598 | |||
| 4e4c60aa24 | |||
| 95365adddc | |||
| 0ba0738ef9 | |||
| bc92c4036e | |||
| d2074f8c3e | |||
| 6bd1235e97 | |||
| 14070f5402 | |||
| be841069ef | |||
| 9d87cc70a9 | |||
| 75412f2954 | |||
| 25069ac340 | |||
| 55e6620508 | |||
| 6a97c93c58 | |||
| bd8ff7071b | |||
|
|
4387fba497 | ||
| 61b4bed4d5 | |||
| 21c91016a4 | |||
| ec5bb023d7 | |||
| 52eeb475f0 | |||
| 15c357c5b5 | |||
| 32ea0b7373 | |||
| 54614f2dc5 | |||
| 3c852b6ecf | |||
| 77d8c67f64 | |||
| 72eb9abf34 | |||
| fb03d333d4 | |||
| 3c9ae3589a | |||
| 017f704905 | |||
|
|
d846f7793c | ||
|
|
1ab746118e | ||
|
|
87b22a05af | ||
| 04e05a4100 |
30
.gitignore
vendored
Normal file
30
.gitignore
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
vue.config
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw*
|
||||
/package-lock.json
|
||||
.hbuilderx/
|
||||
.idea/
|
||||
wxcomponents/
|
||||
unpackage/cache/
|
||||
unpackage/dist/
|
||||
unpackage/release/
|
||||
unpackage/debug/
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version" : "0.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"app-plus" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"default" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"h5" : {
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"provider" : "aliyun",
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-ios"
|
||||
},
|
||||
{
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-ios_simulator"
|
||||
}
|
||||
]
|
||||
}
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
||||
6
.idea/dictionaries
generated
Normal file
6
.idea/dictionaries
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="liuyuan" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/sociology_app.iml" filepath="$PROJECT_DIR$/.idea/sociology_app.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/sociology_app.iml
generated
Normal file
12
.idea/sociology_app.iml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
7
.idea/vagrant.xml
generated
Normal file
7
.idea/vagrant.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VagrantProjectSettings">
|
||||
<option name="instanceFolder" value="" />
|
||||
<option name="provider" value="" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
50
.idea/workspace.xml
generated
Normal file
50
.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="dfe45a93-1e39-4dfb-998a-b7e9e7e56d8f" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/pages/component/input/input.nvue" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pages/tabBar/extUI/extUI.nvue" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pages/tabBar/template/template.nvue" beforeDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectId" id="2oVBuLEFt2modl2kF1Af1nW7QEi" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="nodejs.protractor.protractor_package" value="" />
|
||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||
<property name="settings.editor.selected.configurable" value="com.github.masahirosuzuka.PhoneGapIntelliJPlugin.PhoneGapConfigurationProvider" />
|
||||
<property name="vue.rearranger.settings.migration" value="true" />
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="SvnConfiguration">
|
||||
<configuration>$USER_HOME$/.subversion</configuration>
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="dfe45a93-1e39-4dfb-998a-b7e9e7e56d8f" name="Default Changelist" comment="" />
|
||||
<created>1730945085136</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1730945085136</updated>
|
||||
<workItem from="1730945086809" duration="384000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
</project>
|
||||
9
App.vue
9
App.vue
@@ -31,6 +31,7 @@ export default {
|
||||
};
|
||||
},
|
||||
onLaunch: function (e) {
|
||||
|
||||
uni.setStorageSync("isJump", null);
|
||||
console.log("App Launch");
|
||||
// #ifdef APP-PLUS
|
||||
@@ -50,7 +51,6 @@ export default {
|
||||
uni.getStorageSync("guidePages") != 2 ||
|
||||
!uni.getStorageSync("guidePages")
|
||||
) {
|
||||
console.log(11111);
|
||||
plus.navigator.closeSplashscreen();
|
||||
// uni.reLaunch({
|
||||
// url: "/pages/advertisement/index/index",
|
||||
@@ -245,6 +245,9 @@ export default {
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
onHide: function () {},
|
||||
destroyed() {
|
||||
store.commit("setUserInfo", {
|
||||
@@ -288,7 +291,7 @@ export default {
|
||||
right: 0;
|
||||
} */
|
||||
|
||||
/deep/uni-page-body {
|
||||
::v-deepuni-page-body {
|
||||
// background-color: #F5F5F5 !important;
|
||||
background-color: $themeBgColor;
|
||||
min-height: 100% !important;
|
||||
@@ -307,7 +310,7 @@ export default {
|
||||
|
||||
/* 以下样式用于 hello uni-app 演示所需 */
|
||||
page {
|
||||
background-color: #efeff4;
|
||||
background-color: #f5f5f5;
|
||||
height: 100%;
|
||||
font-size: 28rpx;
|
||||
/* line-height: 1.8; */
|
||||
|
||||
196
README.md
196
README.md
@@ -1,129 +1,97 @@
|
||||
# hello-uniapp
|
||||
|
||||
`uni-app`框架示例,一套代码,同时发行到iOS、Android、H5、小程序等多个平台,请使用手机在下方扫码快速体验`uni-app`的强大功能。[官方文档](https://uniapp.dcloud.net.cn/)
|
||||
|
||||
## 快速上手
|
||||
hello-uniapp 示例工程可以通过两种方式创建, 一种是 HBuilderX, 配套 IDE,集成开发;另一种是 CLI 创建;推荐前者。
|
||||
### 通过 HBuilderX 可视化界面创建(推荐)
|
||||
欢迎使用 my-audio 在线音乐播放器 不支持倍速 使用uni.createInnerAudioContext()方法搭建
|
||||
插件内有my-video支持倍速 使用uni.createVideoContext()方法搭建
|
||||
|
||||
可视化的方式比较简单,HBuilderX内置相关环境,开箱即用,无需配置nodejs。
|
||||
因为uni-notice-bar 默认上下太宽了
|
||||
我修改了此插件得默认样式
|
||||
.uni-noticebar {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
// padding: 10px 12px; //这里注释了
|
||||
// margin-bottom: 10px; //这里注释了
|
||||
}
|
||||
|
||||
开始之前,开发者需先下载安装如下工具:
|
||||
|
||||
- HBuilderX:[官方IDE下载地址](https://www.dcloud.io/hbuilderx.html)
|
||||
## props (组件属性)
|
||||
|
||||
HBuilderX是通用的前端开发工具,但为`uni-app`做了特别强化,请下载App开发版。
|
||||
属性 | 类型 | 默认值 | 备注
|
||||
------------- | ------------- | ---------
|
||||
autoplay |Boolean| false | 是否自动播放(只支持微信内置浏览器,小程序,app)
|
||||
src |String| '' | 音频地址
|
||||
title |String| 默认文件名 | 标题
|
||||
titleFontSize |Number| 35rpx | 标题字体大小
|
||||
titleColor |String| #303030 | 标题文字颜色
|
||||
titleBackgroundColor |String| white | 标题背景色
|
||||
titleScroll |Boolean| false | 标题是否滚动
|
||||
titleScrollSpeed |Number| 100 | 标题是否滚动
|
||||
subTitle |String| 默认文件名 | 副标题
|
||||
subTitleFontSize |Number| 35rpx | 副标题字体大小
|
||||
subTitleColor |String| #6C7996 | 标题文字颜色
|
||||
subTitleColor |String| #6C7996 | 标题文字颜色
|
||||
isCollectBtn |Boolean| false | 显示收藏按钮
|
||||
isShareBtn |Boolean| false | 显示分享按钮
|
||||
activeColor |String| #bf41a2 | 滑块左侧已选择部分的线条颜色
|
||||
backgroundColor |String| #f1c38b | 滑块右侧背景条的颜色
|
||||
|
||||
由于截图在 github 不便浏览,参见官方文档 [HBuilderX 可视化界面创建](https://uniapp.dcloud.net.cn/quickstart?id=_1-%e9%80%9a%e8%bf%87-hbuilderx-%e5%8f%af%e8%a7%86%e5%8c%96%e7%95%8c%e9%9d%a2)
|
||||
|
||||
### 通过 vue-cli 创建
|
||||
## 组件事件
|
||||
|
||||
```
|
||||
npm install -g @vue/cli
|
||||
事件 | 事件内容
|
||||
------------- | -------------
|
||||
@audioPlay | 音频播放事件
|
||||
@audioPause | 音频暂停事件
|
||||
@audioEnd | 音频自然播放结束事件
|
||||
@change | 音频播放状态监听(返回true/false)
|
||||
@audioCanplay | 音频进入可以播放状态,但不保证后面可以流畅播放
|
||||
@audioError | 播放器错误
|
||||
@audioCollec | 点击收藏按钮
|
||||
@audioShare | 点击分享按钮
|
||||
|
||||
## ref 事件
|
||||
事件 | 事件内容
|
||||
------------- | -------------
|
||||
audioPlay() | 播放
|
||||
audioPause() | 暂停
|
||||
changePlayProgress() | 跳转到指定位置
|
||||
handleFastRewind() | 退回15秒
|
||||
handleFastForward() | 快进15秒
|
||||
handleLoopPlay() | 开启/关闭循环播放
|
||||
handleChageSpeed() | 切换倍速播放 按照0.5/0.8/1.0/1.25/1.5/2.0 顺序取值 只有 my-video 支持
|
||||
audioDestroy() | 销毁innerAudioContext()实例
|
||||
|
||||
```html
|
||||
<my-audio isCountDown ref="audio" src="音频路径" title="标题名称" subTitle="副标题名称" ></my-audio>
|
||||
<my-video isCountDown ref="audio" src="音频路径" title="标题名称" subTitle="副标题名称" ></my-audio>
|
||||
|
||||
//项目为vue2时 调用跳转到音乐15s位置方法,如下:
|
||||
this.$refs.audio.changePlayProgress(15)
|
||||
|
||||
//项目为vue3时 请通过value形式调用子组件方法
|
||||
```
|
||||
|
||||
#### 创建uni-app
|
||||
#### View代码
|
||||
```html
|
||||
<my-audio ref="audio" src="音频路径" title="标题名称" subTitle="副标题名称"></sy-audio>
|
||||
<my-video ref="audio" src="音频路径" title="标题名称" subTitle="副标题名称"></my-video>
|
||||
|
||||
**使用正式版**(对应HBuilderX最新正式版)
|
||||
//项目为vue2时 src为本地路径时,使用require方法,如下:
|
||||
<my-audio :src="require('@/static/audio.mp3')"></sy-audio>
|
||||
<my-video :src="require('@/static/audio.mp3')"></my-video>
|
||||
|
||||
```
|
||||
vue create -p dcloudio/uni-preset-vue my-project
|
||||
//项目为vue3时 src为本地路径时,使用自定义方法,如下:
|
||||
<my-audio :src="toUrl('../../static/audio.mp3')"></sy-audio>
|
||||
<my-video :src="toUrl('../../static/audio.mp3')"></my-video>
|
||||
methods: {
|
||||
toUrl(src){
|
||||
return new URL(src, import.meta.url).href
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**使用alpha版**(对应HBuilderX最新alpha版)
|
||||
|
||||
```
|
||||
vue create -p dcloudio/uni-preset-vue#alpha my-alpha-project
|
||||
```
|
||||
|
||||
此时,会提示选择项目模板,选择 `hello uni-app` 项目模板,如下所示:
|
||||
|
||||
<div>
|
||||
<img src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/h5-cli-01.png" width="300">
|
||||
</div>
|
||||
|
||||
创建好后,进入项目目录
|
||||
```
|
||||
cd my-project
|
||||
```
|
||||
|
||||
执行该命令运行到 h5 端
|
||||
```
|
||||
npm run dev:h5
|
||||
```
|
||||
|
||||
欢迎提 issues,推荐到[官方社区](https://ask.dcloud.net.cn/explore/)提问。
|
||||
|
||||
## 扫码体验
|
||||
|
||||
<div class="quick">
|
||||
<p>一套代码编到10个平台,这不是梦想。眼见为实,扫描10个二维码,亲自体验最全面的跨平台效果!</p>
|
||||
<div style="display: flex;">
|
||||
<a href="//m3w.cn/uniapp" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box">
|
||||
<img src="https://web-assets.dcloud.net.cn/unidoc/zh/uni-android.png" width="160" />
|
||||
</div>
|
||||
<b>Android版</b>
|
||||
</a>
|
||||
<a href="https://itunes.apple.com/cn/app/hello-uni-app/id1417078253?mt=8" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box">
|
||||
<img src="https://web-assets.dcloud.net.cn/unidoc/zh/uni-h5.png" width="160" />
|
||||
</div>
|
||||
<b>iOS版</b>
|
||||
</a>
|
||||
<a href="https://hellouniapp.dcloud.net.cn/" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box">
|
||||
<img src="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/bb3ef7c0-517d-11eb-bdc1-8bd33eb6adaa.png" width="160" />
|
||||
</div>
|
||||
<b>H5版</b>
|
||||
</a>
|
||||
<a href="//m3w.cn/uniapp" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box"><img src="//img.cdn.aliyun.dcloud.net.cn/guide/uniapp/gh_33446d7f7a26_430.jpg" width="160" /></div>
|
||||
<b>微信小程序版</b>
|
||||
</a>
|
||||
<a href="//m3w.cn/uniapp" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box"><img src="https://web-assets.dcloud.net.cn/unidoc/zh/alipay1.png" width="160" /></div>
|
||||
<b>支付宝小程序版</b>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex-img-group-view" style="margin-top: 20px;">
|
||||
<a href="//m3w.cn/uniapp" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box"><img src="https://web-assets.dcloud.net.cn/unidoc/zh/baidu-uniapp.png" width="160" /></div>
|
||||
<b>百度小程序版</b>
|
||||
</a>
|
||||
<a href="//m3w.cn/uniapp" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box">
|
||||
<img src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/mp-toutiao.png" width="160" />
|
||||
</div>
|
||||
<b>字节跳动小程序版</b>
|
||||
</a>
|
||||
<a href="//m3w.cn/uniapp" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box">
|
||||
<img src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hello-uni-qq.png" width="160" />
|
||||
</div>
|
||||
<b>QQ小程序版</b>
|
||||
</a>
|
||||
<a href="//m3w.cn/uniapp" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box">
|
||||
<img src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hello-uni-qa-union.png" width="160" />
|
||||
</div>
|
||||
<b>快应用</b>
|
||||
</a>
|
||||
<a href="https://so.mp.360.cn/mp.html?appid=qh4j181qqtru354st6" target="_blank" class="clear-style barcode-view">
|
||||
<div class="barcode-img-box">
|
||||
<img src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hello-uni-mp-360-qr.png" width="160" />
|
||||
</div>
|
||||
<b>360小程序</b>
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
<em>注:某些平台不能提交简单demo,故补充了一些其他功能;hello uni-app示例代码可从[github](https://github.com/dcloudio/hello-uniapp)获取</em></br>
|
||||
<em>快应用仅支持 vivo 、oppo、华为</em></br>
|
||||
<em>360小程序仅 windows平台支持,需要在360浏览器中打开</em></br>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
`uni-app`官网文档详见[https://uniapp.dcloud.io](https://uniapp.dcloud.io)
|
||||
|
||||
更多uni-app的模板、示例详见[插件市场](https://ext.dcloud.net.cn/)
|
||||
|
||||
> my-audio my-video 将会持续更新,欢迎大家踊跃提出宝贵建议;
|
||||
|
||||
BIN
bkhumor-emojiplus/.DS_Store
vendored
Normal file
BIN
bkhumor-emojiplus/.DS_Store
vendored
Normal file
Binary file not shown.
29
common/debounce.js
Normal file
29
common/debounce.js
Normal file
@@ -0,0 +1,29 @@
|
||||
let timeout = null
|
||||
|
||||
/**
|
||||
* 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
|
||||
*
|
||||
* @param {Function} func 要执行的回调函数
|
||||
* @param {Number} wait 延时的时间
|
||||
* @param {Boolean} immediate 是否立即执行
|
||||
* @return null
|
||||
*/
|
||||
function debounce(func, wait = 500, immediate = false) {
|
||||
// 清除定时器
|
||||
if (timeout !== null) clearTimeout(timeout)
|
||||
// 立即执行,此类情况一般用不到
|
||||
if (immediate) {
|
||||
const callNow = !timeout
|
||||
timeout = setTimeout(() => {
|
||||
timeout = null
|
||||
}, wait)
|
||||
if (callNow) typeof func === 'function' && func()
|
||||
} else {
|
||||
// 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
|
||||
timeout = setTimeout(() => {
|
||||
typeof func === 'function' && func()
|
||||
}, wait)
|
||||
}
|
||||
}
|
||||
|
||||
export default debounce
|
||||
BIN
components/.DS_Store
vendored
Normal file
BIN
components/.DS_Store
vendored
Normal file
Binary file not shown.
202
components/buyPupFudu.vue
Normal file
202
components/buyPupFudu.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-popup key="1" :show="pricespop" :round="10" @close="closePup">
|
||||
<view class="proListPrice" v-if="proPriceList.length > 0">
|
||||
<view class="title">
|
||||
请选择
|
||||
</view>
|
||||
<view class="list">
|
||||
<view :class="['item',curProId == index ? 'active' : '']"
|
||||
v-for="(item,index) in proPriceList" :key="index" @click="choosePrice(item,index)">
|
||||
{{item.productName}} - ¥{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tbn flexbox" style="padding-bottom: 20px;">
|
||||
<view class="saveBtnss buybtn flexbox" @click="oprate('buy')">
|
||||
<u-icon name="bag" color="#fff" size="28"></u-icon>
|
||||
<text>立即购买</text>
|
||||
</view>
|
||||
<!-- <view class="saveBtnss gouwuche flexbox" @click="oprate('gouwuche')">
|
||||
<uni-icons type="cart" size="28" style="color: #666;"></uni-icons>
|
||||
<text>加入购物车</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"buyPup",
|
||||
props:['proPriceList'],
|
||||
data() {
|
||||
return {
|
||||
pricespop:true,
|
||||
curProId:null,
|
||||
curPro:{}
|
||||
};
|
||||
},methods:{
|
||||
closePup() {
|
||||
this.pricespop = false
|
||||
this.$emit('closePup')
|
||||
|
||||
},
|
||||
choosePrice(item,index) {
|
||||
console.log(index, 'choosePrice')
|
||||
this.curProId = index
|
||||
this.curPro = item
|
||||
},
|
||||
oprate(val){
|
||||
if(this.curProId==null){
|
||||
uni.showToast({
|
||||
title:'请选择您的课程',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(val=='buy'){
|
||||
console.log('直接购买');
|
||||
this.$emit('oprate',{name:val,item:this.curPro,index:this.curProId})
|
||||
}else if(val == 'gouwuche'){
|
||||
console.log('加入购物车');
|
||||
this.$emit('oprate',{name:val,item:this.curPro,index:this.curProId})
|
||||
}
|
||||
this.closePup()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
.saveBtn {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 80rpx;
|
||||
background-color: #00d8df;
|
||||
// width: 46%;
|
||||
overflow: hidden;
|
||||
border-radius: 30rpx;
|
||||
|
||||
text {
|
||||
padding-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.vipBtn {
|
||||
@include theme("vipbtnbg");
|
||||
border-radius: 100rpx;
|
||||
justify-content: center;
|
||||
width: 150px;
|
||||
color: #fff;
|
||||
margin: 10rpx auto;
|
||||
}
|
||||
|
||||
.buyBox {
|
||||
// position: fixed;
|
||||
// z-index: 2;
|
||||
// bottom: 100rpx;
|
||||
// left: 0;
|
||||
@include pleft_right(4px);
|
||||
// @include mshadow(10px, 1);
|
||||
padding: 20rpx 10rpx;
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
flex-wrap: wrap;
|
||||
background-image: linear-gradient(60deg, #e0e9f6 0%,#ece6fa 30%,#d7e8f0 60%, #fff 100%);
|
||||
// background: rgba(255, 255, 255, 0.9);
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
text-align: center; line-height: 70rpx !important;
|
||||
|
||||
}
|
||||
|
||||
.tbn {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.buybtn {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.proListPrice {
|
||||
text-align: center;
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0 10px;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.item {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
margin-bottom: 10rpx;
|
||||
padding-top:20rpx ;
|
||||
padding-bottom:20rpx ;
|
||||
line-height:40rpx;
|
||||
border-radius: 50rpx;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.item.active {
|
||||
color: $themeColor;
|
||||
border: 1px solid $themeColor;
|
||||
}
|
||||
|
||||
.item:last-child {
|
||||
// border-bottom: none
|
||||
}
|
||||
}
|
||||
|
||||
.tbn {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.buybtn { padding: 0 20rpx;
|
||||
background-color: #00d8df;
|
||||
margin: 0;
|
||||
margin-right: 20rpx;
|
||||
|
||||
text {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.saveBtnss {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 80rpx;
|
||||
|
||||
// width: 46%;
|
||||
overflow: hidden;
|
||||
border-radius: 50rpx;
|
||||
|
||||
text {
|
||||
padding-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.gouwuche {
|
||||
border: 1px solid #666;
|
||||
padding-right: 20rpx;
|
||||
|
||||
text {
|
||||
// color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
394
components/commentsList.vue
Normal file
394
components/commentsList.vue
Normal file
@@ -0,0 +1,394 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="box" v-if="sayList && sayList.length > 0">
|
||||
<view class="firstLeve flexbox leve" v-for="(item, index) in sayList" :key="index" style="flex-wrap: wrap;">
|
||||
<view v-if="item.user && item.user != null && item.user != 'null'" class="imgbox" :style="getBackGround(item.user.avatar)">
|
||||
<view class="img">
|
||||
<!-- <image :src="item.user.avatar" mode="aspectFit" style="width: 80rpx; height: 80rpx;"></image> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentBox contentBoxfirstLeve">
|
||||
<view class="name" v-if="item.user && item.user != null && item.user != 'null'">
|
||||
{{item.user.name == '' ? '暂无昵称': item.user.name}}
|
||||
</view>
|
||||
<view class="content" v-if="item.content != ''">
|
||||
<rich-text class="content" :nodes="formatRichText(item.content)"></rich-text>
|
||||
</view>
|
||||
<view class="imagesList flexbox" v-if="item.images !=''">
|
||||
<view class="item" v-for="(item2, index2) in item.imgList" :key="index2">
|
||||
<image @click="previewImage(item2)" :src="item2" mode="widthFix"
|
||||
style="width: 80rpx; height: 80rpx;"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="others flexbox">
|
||||
<view class="dianzan flexbox" @click="support('one',index,item)">
|
||||
<u-icon v-if="item.support" name="heart-fill" color="#ff5500" size="24"></u-icon>
|
||||
<u-icon v-else name="heart" color="#999" size="24"></u-icon>
|
||||
<text>{{item.supportCount}}</text>
|
||||
</view>
|
||||
<view class="pinglun flexbox" @click="addSay(index,item)">
|
||||
<!-- <u-icon name="chat-fill" color="#999" size="24"></u-icon> -->
|
||||
<u-icon name="chat" color="#999" size="24"></u-icon>
|
||||
<text>{{item.children && item.children.length > 0? item.children.length : 0}}</text>
|
||||
</view>
|
||||
<text>{{item.createTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 二级 -->
|
||||
<view class="boxB" v-if="item.Bchildren && item.Bchildren.length > 0" style="width: 100%;">
|
||||
<view class=" flexbox leve" v-for="(citem, cindex) in item.Bchildren" :key="cindex">
|
||||
<view class="imgbox" :style="getBackGround(citem.user.avatar)">
|
||||
<view class="img">
|
||||
<image :src="citem.user.avatar" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentBox">
|
||||
<view class="name">
|
||||
{{citem.user.name == '' ? '暂无昵称': citem.user.name}}
|
||||
</view>
|
||||
<view class="content" v-if="citem.content != ''">
|
||||
<rich-text class="content" :nodes="formatRichText(citem.content)"></rich-text>
|
||||
</view>
|
||||
<view class="imagesList flexbox" v-if="citem.images !=''">
|
||||
<view class="item" v-for="(item3, index3) in citem.imgList" :key="index3">
|
||||
<image @click="previewImage(item3)" :src="item3" mode="widthFix"
|
||||
style="width: 80rpx; height: 80rpx;"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="others flexbox">
|
||||
<view class="dianzan flexbox" @click="support(index,cindex,citem)">
|
||||
<u-icon v-if="citem.support" name="heart-fill" color="#ff5500" size="24"></u-icon>
|
||||
<u-icon v-else name="heart" color="#999" size="24"></u-icon>
|
||||
<text>{{citem.supportCount}}</text>
|
||||
</view>
|
||||
<!-- <view class="pinglun flexbox" @click="addSay(cindex,citem)">
|
||||
<u-icon name="chat" color="#999" size="24"></u-icon>
|
||||
<text>{{citem.children && citem.children.length > 0? item.children.length : 0}}</text>
|
||||
</view> -->
|
||||
<text style="margin-left: 20rpx;">{{citem.createTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadMore" v-show="item.Bchildren.length < item.children.length" @click="showMoreChildren(index,item)">
|
||||
<text>加载更多追评</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- end -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:['sayList'],
|
||||
name:"commentsList",
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},methods:{
|
||||
// 加载更多子评论
|
||||
showMoreChildren(i,val){
|
||||
console.log('更多评论');
|
||||
if(val.children.length <= val.Bchildren.length){
|
||||
uni.showToast({
|
||||
title:'没有更多了哦',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let _list = []
|
||||
let _cc = [...val.children]
|
||||
_list = _cc.slice(val.Bchildren.length, val.Bchildren.length + 6)
|
||||
this.sayList[i].Bchildren = this.sayList[i].Bchildren.concat(_list)
|
||||
},
|
||||
// 点赞
|
||||
support(index1,index,val){
|
||||
console.log(index1,index,val, '点赞');
|
||||
this.$emit('support',{index1,index,val})
|
||||
},
|
||||
getBackGround(src){
|
||||
// console.log(src,'src')
|
||||
if(src == '' || src == null){
|
||||
return `background: url(./static/icon/morenAvavter.png); background-size: cover;`
|
||||
}else{
|
||||
return `background: url(${src});background-size: cover;`
|
||||
}
|
||||
},
|
||||
formatRichText(html) { //控制图片大小
|
||||
let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
|
||||
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
|
||||
match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
|
||||
match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
|
||||
return match;
|
||||
});
|
||||
newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
|
||||
match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi,
|
||||
'max-width:100%;');
|
||||
return match;
|
||||
});
|
||||
newContent = newContent.replace(/<br[^>]*\/>/gi, '');
|
||||
newContent = newContent.replace(/\<img/gi,
|
||||
'<img style="max-width:40rpx;height:40rpx;display:inline-block;margin:10rpx auto;"');
|
||||
return newContent;
|
||||
},
|
||||
previewImage(url) {
|
||||
console.log(url)
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
longPressActions: {
|
||||
itemList: ['很抱歉,暂不支持保存图片到本地'],
|
||||
success: function(res) {
|
||||
// console.log(res,'+++++')
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
addSay(index,item){
|
||||
// console.log(index,item,'添加评论')
|
||||
this.$emit('showSayModule',{index,item})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
.flexbox{display: flex;}
|
||||
// /deep/ .contentBox {
|
||||
// .ql-editor {
|
||||
|
||||
// font-size: 26rpx;
|
||||
// font-style: normal;
|
||||
// min-height: 50rpx !important;
|
||||
// padding: 20rpx;
|
||||
// }
|
||||
|
||||
// img {
|
||||
// width: 20px;
|
||||
// }
|
||||
|
||||
// .u-upload__button {
|
||||
// margin: 0 auto;
|
||||
// }
|
||||
// }
|
||||
.liuyanBox {
|
||||
padding: 0 20rpx;
|
||||
margin-top: 20rpx;
|
||||
.contentBoxfirstLeve{
|
||||
width: calc(100% - 70rpx);
|
||||
}
|
||||
}
|
||||
.leve {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.imgbox {
|
||||
border: 1px solid #eee;
|
||||
margin-right: 10rpx;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 100%; overflow: hidden;
|
||||
}
|
||||
|
||||
.contentBox {
|
||||
font-size: 24rpx;
|
||||
|
||||
.name {
|
||||
color: #999; font-size: 28rpx;
|
||||
@include toe();
|
||||
}
|
||||
|
||||
.content {
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.others {
|
||||
margin-top: 10rpx;
|
||||
color: #999; font-size: 28rpx;
|
||||
align-items: center;
|
||||
|
||||
.dianzan {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pinglun {
|
||||
align-items: center;
|
||||
margin-left: 10rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.firstLeve{padding-bottom: 10rpx; border-bottom: 1px solid #f7f8f9;}
|
||||
.loadMore{text-align: center; margin-bottom: 20rpx;
|
||||
text{color: $themeColor; font-size: 26rpx;}
|
||||
}
|
||||
.contentBox {
|
||||
padding: 0 20rpx;
|
||||
|
||||
.icon {
|
||||
width: 80rpx;
|
||||
justify-content: center;
|
||||
margin-left: 10rpx;
|
||||
height: 80rpx;
|
||||
align-items: center;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.addEmoji {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.imagesList { margin-top: 20rpx;
|
||||
.item {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.boxB{margin-left: 60rpx; margin-top: 20rpx; background-color: #f7f8f9;
|
||||
padding-top: 20rpx; padding-left:10rpx;
|
||||
.imgbox{
|
||||
width: 40rpx !important;
|
||||
height: 40rpx !important;
|
||||
}
|
||||
.contentBox{width: calc(100% - 60rpx);}
|
||||
// .img{ width: 60rpx;
|
||||
// height: 60rpx;
|
||||
// image{width:60rpx; height: 60rpx; border-radius: 100%;}
|
||||
// }
|
||||
}
|
||||
.chooseImgType {
|
||||
margin-top: 20rpx;
|
||||
|
||||
.item {
|
||||
text-align: center;
|
||||
margin-right: 20rpx;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 60px;
|
||||
border: 1px solid #eee;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
border-radius: 20rpx;
|
||||
background-color: #f4f5f7;
|
||||
|
||||
// background-color: red;
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin-top: -10rpx;
|
||||
}
|
||||
|
||||
.img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.ss {
|
||||
line-height: 20rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sbmitBox {
|
||||
button {
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
@include theme("btn_bg");
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.upimgList {
|
||||
margin-top: 15px;
|
||||
|
||||
.item {
|
||||
border: 1px solid #eee;
|
||||
padding: 10rpx;
|
||||
margin-right: 20rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
position: relative; overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: -10px;
|
||||
z-index: 1;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
line-height: 20px;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.emojiBtn {
|
||||
|
||||
.img {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.editorBox {
|
||||
width: calc(100vw - 100rpx);
|
||||
}
|
||||
|
||||
.ql-container {
|
||||
min-height: 50rpx !important;
|
||||
height: auto !important;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.contentBox {
|
||||
padding: 0 20rpx;
|
||||
|
||||
.icon {
|
||||
width: 80rpx;
|
||||
justify-content: center;
|
||||
margin-left: 10rpx;
|
||||
height: 80rpx;
|
||||
align-items: center;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.addEmoji {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.imagesList { margin-top: 20rpx;
|
||||
.item {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,12 +2,14 @@
|
||||
<view>
|
||||
<view :class="['fuchuang',showBig?'bigMode':'miniMode']" v-show="userInfo.playVisible">
|
||||
<view>
|
||||
<view class="audo-video" >
|
||||
<view class="audo-video">
|
||||
<!--音频播放按钮处-->
|
||||
<view class="audo-top">
|
||||
|
||||
<!-- 播放封面 -->
|
||||
<image @click="changeShow" style="width: 120rpx; height: 120rpx; margin-top: 0;" :class="['fengImg','fengmianBox','defaultBg', userInfo.playFlag ? 'playAnimate' : '']" :src="userInfo.fengImg" mode="aspectFill"></image>
|
||||
<image @click="changeShow" style="width: 120rpx; height: 120rpx; margin-top: 0;"
|
||||
:class="['fengImg','fengmianBox','defaultBg', userInfo.playFlag ? 'playAnimate' : '']"
|
||||
:src="userInfo.fengImg" mode="aspectFill"></image>
|
||||
<!-- <image v-else @click="changeShow" style="width: 120rpx; height: 120rpx; margin-top: 0;" :class="['fengImg','fengmianBox','defaultBg', userInfo.playFlag ? 'playAnimate' : '']" src="@/static/icon/fengziIcon.jpg" mode="aspectFill"></image> -->
|
||||
|
||||
<!-- <u-icon name="arrow-right" color="#61e781" size="28" v-else @click="changeShow"></u-icon> -->
|
||||
@@ -23,8 +25,8 @@
|
||||
<!--快退按钮-->
|
||||
|
||||
<!--播放按钮-->
|
||||
<image class="plays" :src="userInfo.playFlag ?'/static/zantigBtn.png':'/static/bofangBtn.png'" mode="aspectFill"
|
||||
style="" @click.stop="plays()"></image>
|
||||
<image class="plays" :src="userInfo.playFlag ?'/static/zantigBtn.png':'/static/bofangBtn.png'"
|
||||
mode="aspectFill" style="" @click.stop="plays()"></image>
|
||||
<!--播放按钮-->
|
||||
|
||||
<!--快进按钮-->
|
||||
@@ -39,9 +41,11 @@
|
||||
|
||||
|
||||
<!-- 暂时去掉关闭按钮 -->
|
||||
<u-icon name="close" color="#61e781" size="20" style="background-color: #fff;border-radius: 100%;" v-if="!showBig" @click="closePlayer"></u-icon>
|
||||
<u-icon name="close" color="#61e781" size="20"
|
||||
style="background-color: #fff;border-radius: 100%;" v-if="!showBig"
|
||||
@click="closePlayer"></u-icon>
|
||||
|
||||
<!-- 暂时去掉关闭按钮 -->
|
||||
<!-- 暂时去掉关闭按钮 -->
|
||||
|
||||
<!-- 播放目录 -->
|
||||
<!-- <image src="/static/libIcon.png" style="width:45rpx;height:45rpx;" mode="aspectFill"></image> -->
|
||||
@@ -58,32 +62,35 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState,mapMutations
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
export default {
|
||||
name:"music",
|
||||
props:{
|
||||
playData:{
|
||||
type:Object,
|
||||
default:()=>({})
|
||||
name: "music",
|
||||
props: {
|
||||
playData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showBig:false, // 显示详细模式
|
||||
muteBgMusic:true,
|
||||
fengImg:'',
|
||||
libLIst:[], // 播放目录
|
||||
playIndex: 0,// 播放器index
|
||||
showBig: false, // 显示详细模式
|
||||
muteBgMusic: true,
|
||||
fengImg: '',
|
||||
libLIst: [], // 播放目录
|
||||
playIndex: 0, // 播放器index
|
||||
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
this.$music.playBgm({mute:false})
|
||||
|
||||
this.$music.playBgm({
|
||||
mute: false
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
created() {
|
||||
// this.fengImg = this.$music.getCoverImg()
|
||||
@@ -94,69 +101,77 @@
|
||||
|
||||
},
|
||||
|
||||
methods:{
|
||||
methods: {
|
||||
...mapMutations(['setUserInfo']),
|
||||
|
||||
closePlayer(){
|
||||
closePlayer() {
|
||||
// 关闭播放器
|
||||
// console.log('点击了关闭按钮')
|
||||
this.$music.setCloseBgm() // 关闭音频
|
||||
this.$music.setCloseBgm() // 关闭音频
|
||||
uni.setStorage({
|
||||
key: 'playVisible',
|
||||
data: false,
|
||||
success: function () {
|
||||
success: function() {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
this.setUserInfo({'playVisible':false})
|
||||
},
|
||||
changeShow(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/listen/bigListen'
|
||||
this.setUserInfo({
|
||||
'playVisible': false
|
||||
})
|
||||
// this.showBig = !this.showBig
|
||||
},
|
||||
changeShow() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/listen/bigListen'
|
||||
})
|
||||
// this.showBig = !this.showBig
|
||||
},
|
||||
// 上一首
|
||||
prevMusic(){
|
||||
if(this.$bgm._options.src == ''){ // 如果直接点下一首,没点播放
|
||||
this.$music.playBgm({mute:false})
|
||||
prevMusic() {
|
||||
if (this.$bgm._options.src == '') { // 如果直接点下一首,没点播放
|
||||
this.$music.playBgm({
|
||||
mute: false
|
||||
})
|
||||
this.$music.setPlayIndex('next')
|
||||
}else{
|
||||
this.$music.setPlayIndex('prev')
|
||||
} else {
|
||||
this.$music.setPlayIndex('prev')
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
nextMusic(){ // 下一首
|
||||
if(this.$bgm._options.src == ''){ // 如果直接点下一首,没点播放
|
||||
this.$music.playBgm({mute:false})
|
||||
nextMusic() { // 下一首
|
||||
if (this.$bgm._options.src == '') { // 如果直接点下一首,没点播放
|
||||
this.$music.playBgm({
|
||||
mute: false
|
||||
})
|
||||
this.$music.setPlayIndex('next')
|
||||
}else{
|
||||
} else {
|
||||
this.$music.setPlayIndex('next')
|
||||
}
|
||||
},
|
||||
|
||||
//关闭或开启 音乐
|
||||
plays() {
|
||||
this.muteBgMusic = !this.muteBgMusic
|
||||
console.log(this.muteBgMusic,this.muteBgMusic?'已关闭音乐####':'已开启音乐####');
|
||||
plays() {
|
||||
this.muteBgMusic = !this.muteBgMusic
|
||||
console.log(this.muteBgMusic, this.muteBgMusic ? '已关闭音乐####' : '已开启音乐####');
|
||||
|
||||
if (this.userInfo.playFlag) {
|
||||
// 暂停
|
||||
// this.$music.playBgm({mute:true})
|
||||
// 暂停
|
||||
// this.$music.playBgm({mute:true})
|
||||
this.$bgm.pause()
|
||||
} else {
|
||||
// 播放
|
||||
// this.$music.playBgm({mute:false})
|
||||
if(this.$bgm._options.src == ''){
|
||||
this.$music.playBgm({mute:false})
|
||||
}else{
|
||||
} else {
|
||||
// 播放
|
||||
// this.$music.playBgm({mute:false})
|
||||
if (this.$bgm._options.src == '') {
|
||||
this.$music.playBgm({
|
||||
mute: false
|
||||
})
|
||||
} else {
|
||||
this.$bgm.play()
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
computed:{
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
timer() {
|
||||
return calcTimer(this.userInfo.currentTime)
|
||||
@@ -164,47 +179,51 @@
|
||||
overTimer() {
|
||||
return calcTimer(this.userInfo.duration)
|
||||
},
|
||||
playStatus(){
|
||||
playStatus() {
|
||||
var playFlag = false
|
||||
this.userInfo.playFlag !== undefined ? playFlag = this.userInfo.playFlag : ''
|
||||
console.log(playFlag,'playFlag')
|
||||
console.log(playFlag, 'playFlag')
|
||||
return playFlag
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
playData(newVal, oldVal){
|
||||
console.log(newVal,'组件获取到新值')
|
||||
if(newVal.myList.length > 0){
|
||||
this.setUserInfo({'playIndex': 0})
|
||||
this.$music.setList(newVal.myList,'autoPlay')
|
||||
watch: {
|
||||
playData(newVal, oldVal) {
|
||||
console.log(newVal, '组件获取到新值')
|
||||
if (newVal.myList.length > 0) {
|
||||
this.setUserInfo({
|
||||
'playIndex': 0
|
||||
})
|
||||
this.$music.setList(newVal.myList, 'autoPlay')
|
||||
// this.fengImg = newVal.fengImg
|
||||
|
||||
// 本地存储播放列表
|
||||
uni.setStorage({
|
||||
key: 'playData',
|
||||
data: newVal,
|
||||
success: function () {
|
||||
success: function() {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
// 系统暂存
|
||||
this.setUserInfo({'myList':newVal.myList})
|
||||
this.setUserInfo({
|
||||
'myList': newVal.myList
|
||||
})
|
||||
|
||||
|
||||
this.libLIst = newVal.myList
|
||||
// console.log(newVal.myList,'newVal.myList')
|
||||
uni.showToast({
|
||||
title:'添加列表成功',
|
||||
icon:'success',
|
||||
duration:2000
|
||||
title: '添加列表成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'添加列表失败',
|
||||
icon:'error',
|
||||
duration:2000
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '添加列表失败',
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,52 +245,123 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.fengImg {
|
||||
border-radius: 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.fengImg{ border-radius: 100%; background-size: cover; }
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
.leveOne{padding: 0 20rpx; }
|
||||
.playList{ width: calc(100% - 250rpx); height: 300rpx; overflow-y: scroll;}
|
||||
.playList .item{line-height:80rpx; white-space: nowrap;
|
||||
overflow-x: hidden; font-size: 38rpx;
|
||||
text-overflow: ellipsis;}
|
||||
.playNow{color: #27b386;}
|
||||
.flexbox{display: flex; }
|
||||
.miniMode{width:160px; padding-left: -20px; border-radius: 100rpx 0 0 100rpx; padding-top: 0rpx;
|
||||
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.leveOne {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.playList {
|
||||
width: calc(100% - 250rpx);
|
||||
height: 300rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.playList .item {
|
||||
line-height: 80rpx;
|
||||
white-space: nowrap;
|
||||
overflow-x: hidden;
|
||||
font-size: 38rpx;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.playNow {
|
||||
color: #27b386;
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.miniMode {
|
||||
width: 160px;
|
||||
padding-left: -20px;
|
||||
border-radius: 100rpx 0 0 100rpx;
|
||||
padding-top: 0rpx;
|
||||
height: 140rpx;
|
||||
border: 1px solid #eee;
|
||||
.closeBtn{border: 1px solid #666; display: inline-block; padding: 3px;}
|
||||
.leveOne{display: none;}
|
||||
.prevMusic{ display: none;
|
||||
width:30rpx;height:30rpx;transform:rotate(180deg)
|
||||
}
|
||||
.plays{width:50rpx;height:50rpx; margin-left: 0 !important;}
|
||||
.nextMusic{width:50rpx;height:50rpx; display: none;}
|
||||
}
|
||||
|
||||
.fuchuang{position: fixed; padding-right: 10px; padding-left: 0; bottom:180rpx; right:0; z-index: 888; background-color:rgba(255, 255, 255, 1); }
|
||||
.playAnimate{
|
||||
.closeBtn {
|
||||
border: 1px solid #666;
|
||||
display: inline-block;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.leveOne {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.prevMusic {
|
||||
display: none;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
transform: rotate(180deg)
|
||||
}
|
||||
|
||||
.plays {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.nextMusic {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.fuchuang {
|
||||
position: fixed;
|
||||
padding-right: 10px;
|
||||
padding-left: 0;
|
||||
bottom: 180rpx;
|
||||
right: 0;
|
||||
z-index: 888;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.playAnimate {
|
||||
-webkit-transform: rotate(360deg);
|
||||
animation: rotation 6s linear infinite;
|
||||
-moz-animation: rotation 6s linear infinite;
|
||||
-webkit-animation: rotation 6s linear infinite;
|
||||
-o-animation: rotation 6s linear infinite;
|
||||
}
|
||||
.playNow{color: #27b386;}
|
||||
.fengmianBox{text-align: center; margin-top:50rpx;
|
||||
.times{ }
|
||||
}
|
||||
|
||||
.fengmianBox .defaultBg{ width: 100%; margin: 0 auto;border-radius: 200rpx; margin: 0 auto;
|
||||
margin-bottom: 20rpx; background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url('@/static/icon/home_icon_logo.png');
|
||||
.playNow {
|
||||
color: #27b386;
|
||||
}
|
||||
|
||||
.fengmianBox {
|
||||
text-align: center;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.times {}
|
||||
}
|
||||
|
||||
.fengmianBox .defaultBg {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
border-radius: 200rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20rpx;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
// background-image: url('@/static/icon/home_icon_logo.png');
|
||||
}
|
||||
|
||||
page {
|
||||
@@ -291,7 +381,8 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 27rpx;
|
||||
color: #999; margin: 0 auto;
|
||||
color: #999;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
button {
|
||||
@@ -330,7 +421,8 @@
|
||||
align-items: center;
|
||||
width: 750rpx;
|
||||
position: relative;
|
||||
z-index: 9; margin: 0 auto;
|
||||
z-index: 9;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.beishu {
|
||||
@@ -358,5 +450,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
461
components/my-audio/my-audio.vue
Normal file
461
components/my-audio/my-audio.vue
Normal file
@@ -0,0 +1,461 @@
|
||||
<template>
|
||||
<view class="audio_container">
|
||||
<view class="audio-title"
|
||||
style="width: 100%; text-align: left; font-size: 36rpx;font-weight: bold;padding: 0rpx 0rpx; position: relative;">
|
||||
<uni-notice-bar single :scrollable="titleScroll" :size="titleFontSize"
|
||||
:background-color="titleBackgroundColor" :color="titleColor" :speed="titleScrollSpeed" :text="title"
|
||||
class="uni-noticebar" style="padding: 0px; margin-bottom: 0px;">
|
||||
</uni-notice-bar>
|
||||
<uni-icons v-show="isCollectBtn" @click="handleCollec" type="heart" size="20"
|
||||
style="color:#848484; position: absolute;top: 0rpx;right: 0px;"></uni-icons>
|
||||
</view>
|
||||
<view class="audio-subTitle"
|
||||
:style="'font-size: '+subTitleFontSize+';font-weight: bold;padding: 0rpx 0rpx 4rpx 0rpx;position: relative;'">
|
||||
<uni-notice-bar single :scrollable="titleScroll" :size="titleFontSize"
|
||||
:background-color="titleBackgroundColor" :color="subTitleColor" :speed="titleScrollSpeed"
|
||||
:text="subTitle" class="uni-noticebar">
|
||||
</uni-notice-bar>
|
||||
<uni-icons v-show="isShareBtn" @click="handleShare" type="redo" size="20"
|
||||
style="color:#848484;position: absolute;top: 0rpx;right: 0px;"></uni-icons>
|
||||
</view>
|
||||
<view>
|
||||
<slider :backgroundColor='backgroundColor' :activeColor='activeColor' @change="handleSliderChange"
|
||||
:value="sliderIndex" :max="maxSliderIndex" block-color="#343434" block-size="16" />
|
||||
</view>
|
||||
<view style="padding: 0rpx 15rpx 0rpx 15rpx ; display: block; ">
|
||||
<view style="float: left; font-size: 20rpx;color:#848484;">
|
||||
{{currentTimeText}}
|
||||
</view>
|
||||
<view style="float: right;font-size: 20rpx;color:#848484;">
|
||||
{{totalTimeText}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 70rpx;">
|
||||
<uni-grid :column="4" :showBorder="false" :square="false">
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleFastRewind" src="../../static/images/get-back.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleChangeAudioState" v-show="!isPlaying" src="../../static/images/play.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
</image>
|
||||
<image @tap="handleChangeAudioState" v-show="isPlaying" src="../../static/images/pause.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleFastForward" src="../../static/images/fast-forward.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleLoopPlay" src="../../static/images/Loop.svg"
|
||||
style="width: 48rpx;height: 48rpx; top:6rpx; ">
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'my-audio',
|
||||
//audioPlay开始播放
|
||||
//audioPause停止播放
|
||||
//audioEnd音频自然播放结束事件
|
||||
//audioCanplay音频进入可以播放状态,但不保证后面可以流畅播放
|
||||
//change播放状态改变 返回值false停止播放 true开始播放
|
||||
//audioError 播放器错误
|
||||
emits: ['audioPlay', 'audioPause', 'audioEnd', 'audioCanplay', 'change', 'audioError'],
|
||||
props: {
|
||||
//标题文字
|
||||
title: {
|
||||
type: String,
|
||||
default: '默认文件名'
|
||||
},
|
||||
//标题默认字体大小
|
||||
titleFontSize: {
|
||||
type: Number,
|
||||
default: 35
|
||||
},
|
||||
//标题文字颜色
|
||||
titleColor: {
|
||||
type: String,
|
||||
default: '#303030'
|
||||
},
|
||||
//标题背景色
|
||||
titleBackgroundColor: {
|
||||
type: String,
|
||||
default: 'white'
|
||||
},
|
||||
//标题是否滚动
|
||||
titleScroll: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//标题滚动速度
|
||||
titleScrollSpeed: {
|
||||
type: Number,
|
||||
default: 100
|
||||
},
|
||||
|
||||
subTitle: {
|
||||
type: String,
|
||||
default: '默认文件名'
|
||||
},
|
||||
subTitleColor: {
|
||||
type: String,
|
||||
default: '#6C7996'
|
||||
},
|
||||
subTitleFontSize: {
|
||||
type: String,
|
||||
default: "30rpx"
|
||||
},
|
||||
//是否自动播放
|
||||
autoplay: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//滑块左侧已选择部分的线条颜色
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: '#7C7C7C'
|
||||
},
|
||||
//滑块右侧背景条的颜色
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: '#E5E5E5'
|
||||
},
|
||||
|
||||
//音频地址
|
||||
src: {
|
||||
type: [String, Array],
|
||||
default: ''
|
||||
},
|
||||
|
||||
//是否倒计时
|
||||
isCountDown: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
//音乐封面
|
||||
audioCover: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//是否显示收藏按钮
|
||||
isCollectBtn: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//是否显示分享按钮
|
||||
isShareBtn: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
totalTimeText: '00:00', //视频总长度文字
|
||||
currentTimeText: '00:00:00', //视频已播放长度文字
|
||||
|
||||
isPlaying: false, //播放状态
|
||||
|
||||
sliderIndex: 0, //滑块当前值
|
||||
maxSliderIndex: 100, //滑块最大值
|
||||
|
||||
IsReadyPlay: false, //是否已经准备好可以播放了
|
||||
|
||||
isLoop: false, //是否循环播放
|
||||
|
||||
speedValue: [0.5, 0.8, 1.0, 1.25, 1.5, 2.0],
|
||||
speedValueIndex: 2,
|
||||
playSpeed: '1.0', //播放倍速 可取值:0.5/0.8/1.0/1.25/1.5/2.0
|
||||
|
||||
stringObject: (data) => {
|
||||
return typeof(data)
|
||||
},
|
||||
innerAudioContext: uni.createInnerAudioContext()
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.innerAudioContext.src = typeof(this.src) == 'string' ? this.src : this.src[0];
|
||||
if (this.autoplay) {
|
||||
if (!this.src) return console.error('src cannot be empty,The target value is string or array')
|
||||
|
||||
// #ifdef H5
|
||||
var ua = window.navigator.userAgent.toLowerCase();
|
||||
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||
const jweixin = require('../../utils/jweixin');
|
||||
|
||||
jweixin.config({});
|
||||
jweixin.ready(() => {
|
||||
WeixinJSBridge.invoke('getNetworkType', {}, (e) => {
|
||||
this.innerAudioContext.play();
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
this.innerAudioContext.autoplay = true;
|
||||
// #endif
|
||||
}
|
||||
|
||||
//音频播放事件
|
||||
this.innerAudioContext.onPlay(() => {
|
||||
this.isPlaying = true;
|
||||
this.$emit('audioPlay')
|
||||
|
||||
this.$emit('change', {
|
||||
state: true
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
this.maxSliderIndex = parseFloat(this.innerAudioContext.duration).toFixed(2);
|
||||
|
||||
}, 100)
|
||||
});
|
||||
|
||||
//音频暂停事件
|
||||
this.innerAudioContext.onPause(() => {
|
||||
this.$emit('audioPause');
|
||||
this.$emit('change', {
|
||||
state: false
|
||||
});
|
||||
});
|
||||
|
||||
//音频自然播放结束事件
|
||||
this.innerAudioContext.onEnded(() => {
|
||||
this.isPlaying = !this.isPlaying;
|
||||
this.$emit('audioEnd');
|
||||
|
||||
if (this.isLoop) {
|
||||
this.changePlayProgress(0);
|
||||
this.innerAudioContext.play();
|
||||
}
|
||||
});
|
||||
|
||||
//音频进入可以播放状态,但不保证后面可以流畅播放
|
||||
this.innerAudioContext.onCanplay((event) => {
|
||||
|
||||
this.IsReadyPlay = true;
|
||||
|
||||
this.$emit('audioCanplay');
|
||||
|
||||
let duration = this.innerAudioContext.duration;
|
||||
|
||||
//console.log('总时长', duration)
|
||||
|
||||
//将当前音频长度秒转换为00:00:00格式
|
||||
this.totalTimeText = this.getFormateTime(duration);
|
||||
this.maxSliderIndex = parseFloat(duration).toFixed(2);
|
||||
|
||||
//console.log(this.getFormateTime(duration))
|
||||
|
||||
//console.log('总时长1', this.totalTimeText)
|
||||
|
||||
//防止视频无法正确获取时长
|
||||
setTimeout(() => {
|
||||
duration = this.innerAudioContext.duration;
|
||||
|
||||
//将当前音频长度秒转换为00:00:00格式
|
||||
this.totalTimeText = this.getFormateTime(duration);
|
||||
this.maxSliderIndex = parseFloat(duration).toFixed(2);
|
||||
|
||||
//console.log('总时长2', this.totalTimeText)
|
||||
}, 300)
|
||||
|
||||
});
|
||||
|
||||
//音频播放错误事件
|
||||
this.innerAudioContext.onTimeUpdate((res) => {
|
||||
this.sliderIndex = parseFloat(this.innerAudioContext.currentTime).toFixed(2);
|
||||
this.currentTimeText = this.getFormateTime(this.innerAudioContext.currentTime);
|
||||
});
|
||||
|
||||
//音频播放错误事件
|
||||
this.innerAudioContext.onError((res) => {
|
||||
console.log(res.errMsg);
|
||||
console.log(res.errCode);
|
||||
this.$emit('change', {
|
||||
state: false
|
||||
});
|
||||
this.audioPause();
|
||||
|
||||
this.$emit('audioError', res);
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
//销毁innerAudioContext()实例
|
||||
audioDestroy() {
|
||||
if (this.innerAudioContext) {
|
||||
this.innerAudioContext.destroy();
|
||||
this.isPlaying = false;
|
||||
}
|
||||
},
|
||||
//点击变更播放状态
|
||||
handleChangeAudioState() {
|
||||
if (this.isPlaying && !this.innerAudioContext.paused) {
|
||||
this.audioPause();
|
||||
} else {
|
||||
this.audioPlay();
|
||||
}
|
||||
},
|
||||
//开始播放
|
||||
audioPlay() {
|
||||
this.innerAudioContext.play();
|
||||
this.isPlaying = true;
|
||||
},
|
||||
//暂停播放
|
||||
audioPause() {
|
||||
this.innerAudioContext.pause();
|
||||
this.isPlaying = false;
|
||||
},
|
||||
//变更滑块位置
|
||||
handleSliderChange(e) {
|
||||
this.changePlayProgress(e.detail ? e.detail.value : e)
|
||||
},
|
||||
//更改播放倍速
|
||||
handleChageSpeed() {
|
||||
//获取播放倍速列表长度
|
||||
let speedCount = this.speedValue.length;
|
||||
//如果当前是最大倍速,从-1开始
|
||||
if (this.speedValueIndex == (speedCount - 1)) {
|
||||
this.speedValueIndex = -1;
|
||||
}
|
||||
//最新倍速序号
|
||||
this.speedValueIndex += 1;
|
||||
//获取最新倍速文字
|
||||
this.playSpeed = this.speedValue[this.speedValueIndex].toFixed(1);
|
||||
//暂停播放
|
||||
this.audioPause();
|
||||
//变更播放倍速
|
||||
this.innerAudioContext.playbackRate(this.speedValue[this.speedValueIndex]);
|
||||
//开始播放
|
||||
this.audioPlay();
|
||||
},
|
||||
//快退15秒
|
||||
handleFastRewind() {
|
||||
if (this.IsReadyPlay) {
|
||||
let value = parseInt(this.sliderIndex) - 15;
|
||||
this.changePlayProgress(value >= 0 ? value : 0);
|
||||
}
|
||||
},
|
||||
//快进15秒
|
||||
handleFastForward() {
|
||||
if (this.IsReadyPlay) {
|
||||
let value = parseInt(this.sliderIndex) + 15;
|
||||
this.changePlayProgress(value <= this.innerAudioContext.duration ? value : this.innerAudioContext
|
||||
.duration);
|
||||
}
|
||||
},
|
||||
//开启循环播放
|
||||
handleLoopPlay() {
|
||||
this.isLoop = !this.isLoop;
|
||||
if (this.isLoop) {
|
||||
uni.showToast({
|
||||
title: '已开启循环播放',
|
||||
duration: 1000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '取消循环播放',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
},
|
||||
//更改播放进度
|
||||
changePlayProgress(value) {
|
||||
this.innerAudioContext.seek(value);
|
||||
this.sliderIndex = value;
|
||||
this.currentTimeText = this.getFormateTime(value);
|
||||
},
|
||||
//秒转换为00:00:00
|
||||
getFormateTime(time) {
|
||||
let ms = time * 1000; // 1485000毫秒
|
||||
let date = new Date(ms);
|
||||
|
||||
// 注意这里是使用的getUTCHours()方法,转换成UTC(协调世界时)时间的小时
|
||||
let hour = date.getUTCHours();
|
||||
// let hour = date.getHours(); 如果直接使用getHours()方法,则得到的时分秒格式会多出来8个小时(在国内开发基本都是使用的是东八区时间),getHours()方法会把当前的时区给加上。
|
||||
let minute = date.getMinutes();
|
||||
let second = date.getSeconds();
|
||||
|
||||
let formatTime =
|
||||
`${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}:${second.toString().padStart(2, '0')}`;
|
||||
|
||||
return formatTime;
|
||||
},
|
||||
handleCollec() {
|
||||
this.$emit('audioCollec');
|
||||
},
|
||||
handleShare() {
|
||||
this.$emit('audioShare');
|
||||
},
|
||||
},
|
||||
onUnload() {
|
||||
this.audioDestroy()
|
||||
},
|
||||
onHide() {
|
||||
this.audioDestroy()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.audioDestroy()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.audio_container {
|
||||
box-shadow: 0 0 10rpx #c3c3c3;
|
||||
padding: 30rpx 20rpx 30rpx 20rpx;
|
||||
|
||||
.audio-title {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.uni-noticebar {
|
||||
padding: 0px;
|
||||
padding-right: 50rpx;
|
||||
margin-bottom: 0px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
.audio-subTitle {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-size: 40rpx;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.speed-text {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
left: 30rpx;
|
||||
right: 0;
|
||||
color: #475266;
|
||||
font-size: 16rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.uni-grid-icon {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
422
components/my-video/my-video.vue
Normal file
422
components/my-video/my-video.vue
Normal file
@@ -0,0 +1,422 @@
|
||||
<template>
|
||||
<view class="audio_container">
|
||||
<!-- video标签 -->
|
||||
<video id="videoPlayer" ref="videoPlayer" :src="src" :autoplay="autoplay" :muted="false"
|
||||
style="width: 1rpx;height:1rpx;opacity: .1;" class="videoPlay" @loadedmetadata="onCanplay"
|
||||
@timeupdate="onTimeUpdate" @error="errorFn" ></video>
|
||||
|
||||
<view class="audio-title"
|
||||
style="width: 100%; text-align: left; font-size: 36rpx;font-weight: bold;padding: 0rpx 0rpx;position: relative;">
|
||||
<uni-notice-bar single :scrollable="titleScroll" :size="titleFontSize"
|
||||
:background-color="titleBackgroundColor" :color="titleColor" :speed="titleScrollSpeed" :text="title" style="padding-right: 50rpx;">
|
||||
</uni-notice-bar>
|
||||
<uni-icons v-show="isCollectBtn" @click="handleCollec" type="heart" size="20" style="color:#848484; position: absolute;top: 0rpx;right: 0px;" ></uni-icons>
|
||||
</view>
|
||||
<view class="audio-subTitle"
|
||||
:style="'font-size: '+subTitleFontSize+';font-weight: bold;padding: 0rpx 0rpx 4rpx 0rpx;position: relative;'">
|
||||
<uni-notice-bar single :scrollable="titleScroll" :size="titleFontSize"
|
||||
:background-color="titleBackgroundColor" :color="subTitleColor" :speed="titleScrollSpeed"
|
||||
:text="subTitle" style="padding-right: 50rpx;">
|
||||
</uni-notice-bar>
|
||||
<uni-icons v-show="isShareBtn" @click="handleShare" type="redo" size="20" style="color:#848484;position: absolute;top: 0rpx;right: 0px;" ></uni-icons>
|
||||
</view>
|
||||
<view>
|
||||
<slider :backgroundColor='backgroundColor' :activeColor='activeColor' @change="handleSliderChange"
|
||||
:value="sliderIndex" :max="maxSliderIndex" block-color="#343434" block-size="16" />
|
||||
</view>
|
||||
<view style="padding: 0rpx 15rpx 0rpx 15rpx ; display: block; ">
|
||||
<view style="float: left; font-size: 20rpx;color:#848484;">
|
||||
{{currentTimeText}}
|
||||
</view>
|
||||
<view style="float: right;font-size: 20rpx;color:#848484;">
|
||||
{{totalTimeText}}
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 70rpx;">
|
||||
<uni-grid :column="5" :showBorder="false" :square="false">
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleChageSpeed" src="../../static/images/multiple.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
<text class="speed-text">{{playSpeed}}</text>
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleFastRewind" src="../../static/images/get-back.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleChangeAudioState" v-show="!isPlaying" src="../../static/images/play.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
</image>
|
||||
<image @tap="handleChangeAudioState" v-show="isPlaying" src="../../static/images/pause.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleFastForward" src="../../static/images/fast-forward.svg"
|
||||
style="width: 48rpx;height: 48rpx;top:6rpx;">
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
<uni-grid-item>
|
||||
<view class="uni-grid-icon">
|
||||
<image @tap="handleLoopPlay" src="../../static/images/Loop.svg"
|
||||
style="width: 48rpx;height: 48rpx; top:6rpx; ">
|
||||
</image>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'my-video',
|
||||
//audioPlay开始播放
|
||||
//audioPause停止播放
|
||||
//audioEnd音频自然播放结束事件
|
||||
//audioCanplay音频进入可以播放状态,但不保证后面可以流畅播放
|
||||
//change播放状态改变 返回值false停止播放 true开始播放
|
||||
emits: ['audioPlay', 'audioPause', 'audioEnd', 'audioCanplay', 'change'],
|
||||
props: {
|
||||
//标题文字
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//标题默认字体大小
|
||||
titleFontSize: {
|
||||
type: Number,
|
||||
default: 35
|
||||
},
|
||||
//标题文字颜色
|
||||
titleColor: {
|
||||
type: String,
|
||||
default: '#303030'
|
||||
},
|
||||
//标题背景色
|
||||
titleBackgroundColor: {
|
||||
type: String,
|
||||
default: 'white'
|
||||
},
|
||||
//标题是否滚动
|
||||
titleScroll: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//标题滚动速度
|
||||
titleScrollSpeed: {
|
||||
type: Number,
|
||||
default: 100
|
||||
},
|
||||
|
||||
subTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
subTitleColor: {
|
||||
type: String,
|
||||
default: '#6C7996'
|
||||
},
|
||||
subTitleFontSize: {
|
||||
type: String,
|
||||
default: "30rpx"
|
||||
},
|
||||
autoplay: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//滑块左侧已选择部分的线条颜色
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: '#7C7C7C'
|
||||
},
|
||||
//滑块右侧背景条的颜色
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: '#E5E5E5'
|
||||
},
|
||||
|
||||
//音频地址
|
||||
src: {
|
||||
type: [String, Array],
|
||||
default: ''
|
||||
},
|
||||
|
||||
//是否倒计时
|
||||
isCountDown: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
//音乐封面
|
||||
audioCover: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//是否显示收藏按钮
|
||||
isCollectBtn: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
//是否显示分享按钮
|
||||
isShareBtn: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
totalTimeText: '00:00', //视频总长度文字
|
||||
currentTimeText: '00:00:00', //视频已播放长度文字
|
||||
|
||||
isPlaying: false, //播放状态
|
||||
|
||||
sliderIndex: 0, //滑块当前值
|
||||
maxSliderIndex: 100, //滑块最大值
|
||||
|
||||
IsReadyPlay: false, //是否已经准备好可以播放了
|
||||
|
||||
isLoop: false, //是否循环播放
|
||||
|
||||
speedValue:[0.5,0.8,1.0,1.25,1.5,2.0],
|
||||
speedValueIndex:2,
|
||||
playSpeed: '1.0', //播放倍速 可取值:0.5/0.8/1.0/1.25/1.5/2.0
|
||||
|
||||
stringObject: (data) => {
|
||||
return typeof(data)
|
||||
},
|
||||
innerAudioContext: null,
|
||||
// 后台音频控制器
|
||||
backAudio:null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 获取 video 对象
|
||||
this.innerAudioContext = uni.createVideoContext("videoPlayer", this);
|
||||
|
||||
},
|
||||
async mounted() {
|
||||
this.innerAudioContext.src = typeof(this.src) == 'string' ? this.src : this.src[0];
|
||||
},
|
||||
methods: {
|
||||
//音频进入可以播放状态,但不保证后面可以流畅播放
|
||||
onCanplay(e){
|
||||
this.IsReadyPlay = true;
|
||||
let duration=e.detail.duration;
|
||||
|
||||
this.$emit('audioCanplay');
|
||||
|
||||
//将当前音频长度秒转换为00:00:00格式
|
||||
this.totalTimeText = this.getFormateTime(duration);
|
||||
this.maxSliderIndex = parseFloat(duration).toFixed(2);
|
||||
|
||||
// #ifdef MP
|
||||
this.totalTimeText = parseFloat(duration).toFixed(2);
|
||||
this.maxSliderIndex = parseFloat(duration).toFixed(2);
|
||||
// #endif
|
||||
|
||||
},
|
||||
// 音频播放事件处理函数 (持续触发) - 获取当前播放时长
|
||||
onTimeUpdate(e) {
|
||||
this.sliderIndex = parseFloat(e.detail.currentTime).toFixed(2);
|
||||
this.currentTimeText = this.getFormateTime(e.detail.currentTime);
|
||||
|
||||
//如果已经播放到结尾,回到音频开始
|
||||
if(this.sliderIndex==this.maxSliderIndex)
|
||||
{
|
||||
let prevState=this.isPlaying;
|
||||
this.sliderIndex=0;
|
||||
this.changePlayProgress(0);
|
||||
this.audioPause();
|
||||
|
||||
//如果开启循环播放,且结束前还是播放状态
|
||||
if(this.isLoop && prevState)
|
||||
{
|
||||
this.audioPlay();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//销毁innerAudioContext()实例
|
||||
audioDestroy() {
|
||||
if (this.innerAudioContext) {
|
||||
this.innerAudioContext=null;
|
||||
this.isPlaying = false;
|
||||
}
|
||||
},
|
||||
//点击变更播放状态
|
||||
handleChangeAudioState() {
|
||||
if (this.isPlaying && !this.innerAudioContext.paused) {
|
||||
this.audioPause();
|
||||
} else {
|
||||
this.audioPlay();
|
||||
}
|
||||
},
|
||||
//开始播放
|
||||
audioPlay(){
|
||||
this.innerAudioContext.play();
|
||||
this.isPlaying=true;
|
||||
this.$emit('audioPlay')
|
||||
|
||||
this.$emit('change', {
|
||||
state: true
|
||||
});
|
||||
},
|
||||
//暂停播放
|
||||
audioPause(){
|
||||
this.innerAudioContext.pause();
|
||||
this.isPlaying=false;
|
||||
|
||||
this.$emit('audioPause');
|
||||
this.$emit('change', {
|
||||
state: false
|
||||
});
|
||||
},
|
||||
//变更滑块位置
|
||||
handleSliderChange(e) {
|
||||
this.changePlayProgress(e.detail ? e.detail.value : e)
|
||||
},
|
||||
//更改播放倍速
|
||||
handleChageSpeed(){
|
||||
//获取播放倍速列表长度
|
||||
let speedCount=this.speedValue.length;
|
||||
//如果当前是最大倍速,从-1开始
|
||||
if(this.speedValueIndex==(speedCount-1))
|
||||
{
|
||||
this.speedValueIndex=-1;
|
||||
}
|
||||
//最新倍速序号
|
||||
this.speedValueIndex+=1;
|
||||
//获取最新倍速文字
|
||||
this.playSpeed=this.speedValue[this.speedValueIndex].toFixed(1);
|
||||
//暂停播放
|
||||
this.audioPause();
|
||||
//变更播放倍速
|
||||
this.innerAudioContext.playbackRate(this.speedValue[this.speedValueIndex]);
|
||||
//开始播放
|
||||
this.audioPlay();
|
||||
},
|
||||
//快退15秒
|
||||
handleFastRewind() {
|
||||
if (this.IsReadyPlay) {
|
||||
let value = parseInt(this.sliderIndex) - 15;
|
||||
this.changePlayProgress(value >= 0 ? value : 0);
|
||||
}
|
||||
},
|
||||
//快进15秒
|
||||
handleFastForward() {
|
||||
if (this.IsReadyPlay) {
|
||||
let value = parseInt(this.sliderIndex) + 15;
|
||||
this.changePlayProgress(value <= this.maxSliderIndex ? value : this.maxSliderIndex);
|
||||
}
|
||||
},
|
||||
//开启循环播放
|
||||
handleLoopPlay() {
|
||||
this.isLoop = !this.isLoop;
|
||||
if (this.isLoop) {
|
||||
uni.showToast({
|
||||
title: '已开启循环播放',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
else{
|
||||
uni.showToast({
|
||||
title: '取消循环播放',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
},
|
||||
//更改播放进度
|
||||
changePlayProgress(value) {
|
||||
this.innerAudioContext.seek(value);
|
||||
|
||||
this.sliderIndex = value;
|
||||
this.currentTimeText = this.getFormateTime(value);
|
||||
},
|
||||
//秒转换为00:00:00
|
||||
getFormateTime(time) {
|
||||
let ms = time * 1000; // 1485000毫秒
|
||||
let date = new Date(ms);
|
||||
|
||||
// 注意这里是使用的getUTCHours()方法,转换成UTC(协调世界时)时间的小时
|
||||
let hour = date.getUTCHours();
|
||||
// let hour = date.getHours(); 如果直接使用getHours()方法,则得到的时分秒格式会多出来8个小时(在国内开发基本都是使用的是东八区时间),getHours()方法会把当前的时区给加上。
|
||||
let minute = date.getMinutes();
|
||||
let second = date.getSeconds();
|
||||
|
||||
let formatTime =
|
||||
`${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}:${second.toString().padStart(2, '0')}`;
|
||||
|
||||
return formatTime;
|
||||
},
|
||||
handleCollec(){
|
||||
this.$emit('audioCollec');
|
||||
},
|
||||
handleShare(){
|
||||
this.$emit('audioShare');
|
||||
},
|
||||
errorFn(){
|
||||
this.$emit('change', {
|
||||
state: false
|
||||
});
|
||||
this.audioPause();
|
||||
this.$emit('error');
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.audioDestroy()
|
||||
},
|
||||
onHide() {
|
||||
this.audioDestroy()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.audioDestroy()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.audio_container {
|
||||
box-shadow: 0 0 10rpx #c3c3c3;
|
||||
padding: 15rpx 15rpx 40rpx 15rpx;
|
||||
|
||||
.audio-title {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.uni-noticebar {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.audio-subTitle {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-size: 40rpx;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.speed-text {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
left: 30rpx;
|
||||
right: 0;
|
||||
color: #475266;
|
||||
font-size: 16rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.uni-grid-icon {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
388
components/orderCoupon.vue
Normal file
388
components/orderCoupon.vue
Normal file
@@ -0,0 +1,388 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 优惠券弹出 -->
|
||||
<u-popup :show="youhuiShow" :round="10" @close="closePup">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">请选择优惠券</view>
|
||||
<template v-if="list.length > 0">
|
||||
<view style="max-height: 40vh; overflow-y: scroll">
|
||||
<view v-for="(item, index) in list" :key="index">
|
||||
<view
|
||||
:class="`youhuiItem ${
|
||||
youhuiIndex === index ? ' youItem_style' : ''
|
||||
} ${item.canUse === 0 ? 'disableSelect' : ''}`"
|
||||
@click="choseYouhui(index)"
|
||||
><text
|
||||
class="border_radius_10"
|
||||
style="
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 10rpx;
|
||||
font-size: 25rpx;
|
||||
background-color: #ffe3e9;
|
||||
color: #c81346;
|
||||
padding: 6rpx;
|
||||
"
|
||||
>{{ item.couponEntity.couponRange | couponType }}</text
|
||||
>
|
||||
<view
|
||||
style="width: 25%; color: #ff0043; text-align: center"
|
||||
class="couponPrice"
|
||||
>
|
||||
<text>¥</text>
|
||||
<b style="font-size: 45rpx">{{
|
||||
item.couponEntity.couponAmount
|
||||
}}</b>
|
||||
<text
|
||||
class="useLevel"
|
||||
style="
|
||||
display: block;
|
||||
color: #666;
|
||||
font-size: 25rpx;
|
||||
margin-top: 10rpx;
|
||||
"
|
||||
>满{{ item.couponEntity.useLevel }}元可用</text
|
||||
>
|
||||
</view>
|
||||
<view style="width: 68%; padding-left: 5%">
|
||||
<view>
|
||||
<text
|
||||
style="
|
||||
display: inline-block;
|
||||
margin-right: 6rpx;
|
||||
line-height: 36rpx;
|
||||
"
|
||||
>{{ item.couponEntity.couponName }}</text
|
||||
>
|
||||
</view>
|
||||
<text
|
||||
style="
|
||||
display: block;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
"
|
||||
>有效期至:{{
|
||||
item.effectType == 0 ? "永久有效" : item.endTime
|
||||
}}</text
|
||||
>
|
||||
<template v-if="item.canUse == 0">
|
||||
<view
|
||||
class=""
|
||||
style="font-size: 20rpx; display: inline-block"
|
||||
>
|
||||
<text style="color: #333">不可用原因:</text>
|
||||
<text style="color: #333">{{ item.canUseReason }}</text>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<view
|
||||
style="width: 7%; position: absolute; right: 20rpx; top: 43%"
|
||||
>
|
||||
<!-- <view class="" style="background-color: #d9d9d9; border-radius: 10rpx; 0 0 10rpx; text-align: center;" v-if="item.canUse == 0">
|
||||
<text
|
||||
style="color: #999; "
|
||||
>不可用</text>
|
||||
</view> -->
|
||||
|
||||
<template v-if="item.canUse == 1">
|
||||
<text
|
||||
style="
|
||||
border: 1px solid #d9d9d9;
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
display: inline-block;
|
||||
border-radius: 30rpx;
|
||||
"
|
||||
v-if="youhuiIndex !== index"
|
||||
></text>
|
||||
|
||||
<u-icon
|
||||
name="checkmark-circle-fill"
|
||||
color="#fd6004"
|
||||
size="20"
|
||||
v-if="youhuiIndex === index"
|
||||
>
|
||||
</u-icon>
|
||||
</template>
|
||||
</view>
|
||||
<br clear="both" />
|
||||
</view>
|
||||
<u-collapse
|
||||
v-if="source != 'goodsDetail' && item.couponEntity.remark"
|
||||
style="
|
||||
margin-top: 0rpx;
|
||||
z-index: 10 !important;
|
||||
background-color: #fafafa;
|
||||
border-bottom-left-radius: 10rpx;
|
||||
border-bottom-right-radius: 10rpx;
|
||||
"
|
||||
:border="false"
|
||||
>
|
||||
<u-collapse-item title="详细信息" name="Docs guide">
|
||||
<view
|
||||
v-if="item.couponEntity.remark"
|
||||
style="
|
||||
font-size: 22rpx;
|
||||
width: 100%;
|
||||
margin-right: 20rpx !important;
|
||||
"
|
||||
>使用说明:{{ item.couponEntity.remark }}</view
|
||||
>
|
||||
</u-collapse-item>
|
||||
</u-collapse>
|
||||
</view>
|
||||
|
||||
<!-- <view style="font-size: 20rpx;color: #aaa;margin-top: 30rpx;">* 每笔订单只能使用一张优惠价</view> -->
|
||||
</view>
|
||||
<view class="btnBox flex_box flex_between" v-if="selectcouponList.length>0">
|
||||
<view class="" style="width: 48%">
|
||||
<button type="default" @click="confirmCoupon('none')">
|
||||
不使用优惠券
|
||||
</button>
|
||||
</view>
|
||||
<view class="" style="width: 48%">
|
||||
<button type="primary" @click="confirmCoupon()">选好了</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnBox flex_box flex_between" v-else>
|
||||
<view class="" style="width: 100%">
|
||||
<button type="default" @click="confirmCoupon('none')">
|
||||
取消
|
||||
</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<view class="" v-else>
|
||||
<u-divider text="暂无可用优惠券哦"></u-divider>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "orderCoupon",
|
||||
props: ["list", "curCouponId", "sumMeony",'selectcouponList'],
|
||||
data() {
|
||||
return {
|
||||
youhuiShow: true,
|
||||
youhuiIndex: undefined,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log("进入了", this.curCouponId, this.sumMeony);
|
||||
if (this.curCouponId) {
|
||||
this.youhuiIndex = this.list.findIndex(
|
||||
(item) => item.couponEntity.id === this.curCouponId
|
||||
);
|
||||
console.log("查找后的结果", this.youhuiIndex);
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
couponType(type) {
|
||||
// 0无限制 1课程卷 2课程品类卷
|
||||
var str = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
str = "全场通用";
|
||||
break;
|
||||
case 1:
|
||||
str = "指定课程可用";
|
||||
break;
|
||||
case 2:
|
||||
str = "指定课程品类可用";
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
closePup() {
|
||||
this.youhuiIndex = undefined;
|
||||
this.$emit("close");
|
||||
},
|
||||
// 确定选中优惠券
|
||||
confirmCoupon(str) {
|
||||
console.log(str, "6666");
|
||||
if (str && str == "none") {
|
||||
// 清空优惠券操作
|
||||
this.$emit("confirmCoupon");
|
||||
setTimeout(() => {
|
||||
this.closePup();
|
||||
}, 300);
|
||||
return;
|
||||
}
|
||||
if (this.youhuiIndex == 0 || this.youhuiIndex) {
|
||||
this.$emit("confirmCoupon", this.list[this.youhuiIndex]);
|
||||
setTimeout(() => {
|
||||
this.closePup();
|
||||
}, 300);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "请选择您要使用的优惠券",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
// 选择优惠券
|
||||
choseYouhui(e) {
|
||||
if (this.list[e].canUse == 0) {
|
||||
return;
|
||||
}
|
||||
console.log("选中优惠券e", e);
|
||||
this.youhuiIndex = e;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btnBox {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.tanchu {
|
||||
padding: 40rpx 30rpx 40rpx 30rpx;
|
||||
position: relative;
|
||||
// max-height: 60vh;
|
||||
// overflow-y: scroll;
|
||||
|
||||
.dp_title {
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 50rpx;
|
||||
color: #555;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.dp_add {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
right: 30rpx;
|
||||
font-size: 22rpx;
|
||||
background-color: #fd6004;
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
|
||||
.u-icon {
|
||||
display: inline-block;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.addressItem {
|
||||
border: 2px dashed #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: 20rpx 10rpx;
|
||||
margin: 25rpx 0 0 0;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
|
||||
.addrContent {
|
||||
margin-left: 40rpx;
|
||||
flex: 1;
|
||||
|
||||
.addrContentTop {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
margin: 0 0 15rpx 0;
|
||||
position: relative;
|
||||
|
||||
.userName {
|
||||
font-size: 35rpx;
|
||||
font-weight: bold;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.userTel {
|
||||
font-size: 25rpx;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.userMoren {
|
||||
border: 1px solid #fd6004;
|
||||
color: #fd6004;
|
||||
padding: 3rpx 10rpx;
|
||||
font-size: 22rpx;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 0 0 20rpx;
|
||||
}
|
||||
|
||||
.chooseCheck {
|
||||
position: absolute;
|
||||
top: 3rpx;
|
||||
right: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.addrContentBottom {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addressItem.addItem_style {
|
||||
border-color: #fd6004;
|
||||
}
|
||||
|
||||
.youhuiItem {
|
||||
position: relative;
|
||||
background: linear-gradient(to top right, #fff, #fef2f4);
|
||||
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
|
||||
padding: 50rpx 20rpx 20rpx;
|
||||
margin: 25rpx 0 0 0;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.disableSelect {
|
||||
background: linear-gradient(to top right, #fafafa, #fafafa) !important;
|
||||
|
||||
color: #979797 !important;
|
||||
.couponPrice {
|
||||
color: #979797 !important;
|
||||
}
|
||||
.useLevel {
|
||||
color: #979797 !important;
|
||||
}
|
||||
.border_radius_10 {
|
||||
color: #98989a !important;
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
}
|
||||
.youhuiItem > view {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.youhuiItem.youItem_style {
|
||||
border-color: #fd6004;
|
||||
}
|
||||
}
|
||||
/deep/ .u-cell__body {
|
||||
padding-top: 0 !important ;
|
||||
padding-bottom: 0 !important ;
|
||||
z-index: 10 !important ;
|
||||
.u-cell__title-text {
|
||||
color: #333 !important;
|
||||
font-size: 24rpx !important;
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .u-collapse-item__content__text {
|
||||
padding: 10rpx 20rpx !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
256
components/tagTree.vue
Normal file
256
components/tagTree.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-drawer
|
||||
ref="showRight"
|
||||
mode="right"
|
||||
:width="320"
|
||||
@change="changeD($event, 'showRight')"
|
||||
>
|
||||
<view class="close">
|
||||
<view class="zhan" style="width: 100%"></view>
|
||||
<u-icon
|
||||
name="close"
|
||||
@click="closeDrawer('showRight')"
|
||||
color="#117e4c"
|
||||
size="28"
|
||||
></u-icon>
|
||||
</view>
|
||||
<view class="proTitle">
|
||||
<text>请选择课程分类</text>
|
||||
</view>
|
||||
<scroll-view class="warp" scroll-y="true" style="max-height: 80vh">
|
||||
<uni-collapse
|
||||
accordion
|
||||
v-if="treeList.length > 0"
|
||||
@change="collapseChange"
|
||||
>
|
||||
<view v-for="(item, index) in treeList" @click.stop="clickCourseInfo(item)" style=" padding: 20rpx;box-sizing: border-box;border-bottom: 1px solid #ebeef5;"> {{ item.title}}</view>
|
||||
|
||||
<!-- <uni-collapse-item
|
||||
v-for="(item, index) in treeList"
|
||||
:key="index"
|
||||
:title="item.title"
|
||||
:show-animation="true"
|
||||
@click.stop="clickCourseInfo(item)"
|
||||
>
|
||||
<view class="content">
|
||||
|
||||
<view class="sub1List">
|
||||
<view
|
||||
class="item leve2"
|
||||
@click.stop="clickCourseInfo(item)"
|
||||
v-if="item.isLast == 1"
|
||||
>
|
||||
<text class="textss"> 本目录下全部课程</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['item', 'leve2']"
|
||||
v-for="(item1, index1) in item.children"
|
||||
:key="index1"
|
||||
@click.stop="clickCourseInfo(item1)"
|
||||
>
|
||||
<text class="textss"> {{ item1.title }}</text>
|
||||
<view class="sub2List" v-if="item1.children">
|
||||
<view
|
||||
:class="['item', 'leve3']"
|
||||
v-for="(item2, index2) in item1.children"
|
||||
:key="index2"
|
||||
@click.stop="clickCourseInfo(item2)"
|
||||
>
|
||||
<text class="textss">{{ item2.title }}</text>
|
||||
<view
|
||||
class="sub3List"
|
||||
v-if="
|
||||
item2.isLast == 0 &&
|
||||
item2.children &&
|
||||
item2.children.length > 0
|
||||
"
|
||||
>
|
||||
|
||||
<text
|
||||
class="textss"
|
||||
v-for="(item3, index3) in item2.children"
|
||||
:key="index3"
|
||||
@click.stop="clickCourseInfo(item3)"
|
||||
>{{ item3.title }}</text
|
||||
>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-collapse-item> -->
|
||||
</uni-collapse>
|
||||
</scroll-view>
|
||||
</uni-drawer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "tagTree",
|
||||
// props:['treeList'],
|
||||
data() {
|
||||
return {
|
||||
treeList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
showDrawer(e) {
|
||||
this.$refs[e].open();
|
||||
// this.videoContext.pause()
|
||||
// this.showTemp = true
|
||||
console.log("打开抽屉");
|
||||
},
|
||||
getData() {
|
||||
var data = { id: 0 };
|
||||
this.$http
|
||||
.request({
|
||||
url: "sociology/home/getSociologyLabels",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data,
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
|
||||
.then((res) => {
|
||||
if (res.code == 0 && res.labels.length > 0) {
|
||||
this.treeList = res.labels;
|
||||
} else {
|
||||
this.treeList = [];
|
||||
}
|
||||
this.showDrawer("showRight");
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e, "报错");
|
||||
uni.showToast({
|
||||
title: "获取课程分类失败",
|
||||
icon: "none",
|
||||
});
|
||||
});
|
||||
},
|
||||
clickCourseInfo(val) {
|
||||
this.$emit("clickCourseInfo", val);
|
||||
this.closeDrawer("showRight");
|
||||
},
|
||||
closeDrawer(e) {
|
||||
this.$refs[e].close();
|
||||
},
|
||||
changeD(e, type) {
|
||||
// console.log((type === 'showRight' ? '左窗口' : '右窗口') + (e ? '打开' : '关闭'));
|
||||
this[type] = e;
|
||||
if (!e) {
|
||||
console.log("关闭弹窗");
|
||||
}
|
||||
},
|
||||
collapseChange(e) {
|
||||
// console.log(e, '折叠面板点击');
|
||||
// if (e) {
|
||||
// this.tagId = this.treeList[e].id
|
||||
// }
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// /deep/ uni-drawer{ height: 50vh !important;
|
||||
// .uni-drawer__content{
|
||||
// overflow-y: scroll !important;
|
||||
// }
|
||||
// }
|
||||
.sub1List {
|
||||
background-color: #f7f7f7;
|
||||
// padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
.item {
|
||||
background-color: #fff;
|
||||
line-height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
color: #1b2a32;
|
||||
// border-bottom: 1px solid #dae8f0;
|
||||
|
||||
text {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item.active {
|
||||
// background-color: #aed1ec;
|
||||
color: #fff;
|
||||
background-image: linear-gradient(
|
||||
90deg,
|
||||
#3ab3ae 0%,
|
||||
#00e1ec 100%
|
||||
) !important;
|
||||
}
|
||||
|
||||
.textss {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.leve2 {
|
||||
.textss {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.leve2 {
|
||||
.textss {
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.leve3 {
|
||||
.sub3List {
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
padding-left: 60rpx;
|
||||
.textss {
|
||||
background-color: #ebeef5;
|
||||
border-radius: 20rpx;
|
||||
padding: 10rpx 14rpx !important;
|
||||
}
|
||||
}
|
||||
.textss {
|
||||
padding-left: 60rpx;
|
||||
display: inline;
|
||||
margin-right: 20rpx;
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.leve4 {
|
||||
.textss {
|
||||
padding-left: 80rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.proTitle {
|
||||
text-align: center;
|
||||
padding: 20rpx 0;
|
||||
margin-top: 60rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
color: #888;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.close {
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
padding-top: 60rpx;
|
||||
padding-right: 20px;
|
||||
}.uni-collapse-item .uni-collapse-item-header .uni-collapse-item-arrow {
|
||||
display: none; /* 隐藏右箭头 */
|
||||
}
|
||||
</style>
|
||||
@@ -2,42 +2,12 @@ let baseUrl = "";
|
||||
let socketUrl = "";
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 开发环境
|
||||
// baseUrl = "http://localhost:7001/";
|
||||
// socketUrl = "ws://localhost:6001/";
|
||||
// baseUrl = "https://twin-ui.com/demo/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
|
||||
|
||||
|
||||
|
||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
|
||||
|
||||
// baseUrl = "http://101.201.146.165:8088/App-EH/"; // 一路健康APP线上正式
|
||||
|
||||
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||
// baseUrl = "http://59.110.212.44:9200/pb/";
|
||||
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
||||
|
||||
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/"; //磊哥
|
||||
|
||||
|
||||
|
||||
// baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1
|
||||
// socketUrl = "ws://8.129.186.35:6001/";
|
||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
// 生产环境11
|
||||
|
||||
baseUrl = "http://192.168.110.110:9200/pb/"; //磊哥
|
||||
// baseUrl = "http://59.110.212.44:9100/pb/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/";
|
||||
// baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
// baseUrl = "ws://twin-ui.com:6001/";
|
||||
// socketUrl = "ws://twin-ui.com:6001/";
|
||||
//baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
}
|
||||
const courtConfig = {
|
||||
//微信公众号APPID
|
||||
@@ -67,7 +37,7 @@ const courtConfig = {
|
||||
//手机号验证正则表达式
|
||||
// (中国大陆)
|
||||
// const phoneRegular = /^1\d{10}$/;
|
||||
const phoneRegular = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])\d{8}$/;
|
||||
const phoneRegular = /^1(3[0-9]|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
|
||||
// const phoneRegular = /^[1][3-8]\d{9}$|^([6|9])\d{7}$|^[0][9]\d{8}$|^[6]([8|6])\d{5}$/;
|
||||
// 手机号码验证 支持港澳台 大陆
|
||||
// const phoneRegular = /^[1][3-8]\d{9}$|^([6|9])\d{7}$|^[0][9]\d{8}$|^[6]([8|6])\d{5}$|^(00){0,1}(65){1}[13689]\d{6,7}$/;
|
||||
|
||||
@@ -39,7 +39,8 @@ let $http = new request({
|
||||
// 'Content-Type': 'application/json;charset=UTF-8',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// 'project_token': base.projectToken, //项目token(可删除)
|
||||
}
|
||||
},
|
||||
timeout: '15000' // 15秒
|
||||
});
|
||||
// 添加获取七牛云token的方法
|
||||
$http.getQnToken = function(callback) {
|
||||
@@ -87,6 +88,9 @@ $http.requestStart = function(options) {
|
||||
//打开加载动画
|
||||
store.commit("setLoadingShow", true);
|
||||
}
|
||||
if (options.data.loadAnimate == 'none') {
|
||||
delete options.data.loadAnimate
|
||||
}
|
||||
// 图片、视频上传大小限制
|
||||
if (options.method == "FILE") {
|
||||
// 文件最大字节: options.maxSize 可以在调用方法的时候加入参数
|
||||
@@ -143,6 +147,7 @@ $http.requestEnd = function(options) {
|
||||
let loginPopupNum = 0;
|
||||
//所有接口数据处理(此方法需要开发者根据各自的接口返回类型修改,以下只是模板)
|
||||
$http.dataFactory = async function(res) {
|
||||
console.log(res, '1111')
|
||||
|
||||
// console.log("接口请求数据", {
|
||||
// url: res.url,
|
||||
@@ -206,6 +211,7 @@ $http.dataFactory = async function(res) {
|
||||
}
|
||||
|
||||
} else if (httpData.code == "500" && !httpData.msg) {
|
||||
console.log(res, '50000000000000000')
|
||||
//500
|
||||
uni.showToast({
|
||||
title: '系统错误,请联系管理员',
|
||||
|
||||
BIN
js_sdk/.DS_Store
vendored
Normal file
BIN
js_sdk/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
|
||||
*/
|
||||
|
||||
var isIos
|
||||
// #ifdef APP-PLUS
|
||||
isIos = (plus.os.name == "iOS")
|
||||
@@ -52,10 +51,10 @@ function judgeIosPermissionLocation() {
|
||||
console.log("enable:" + enable);
|
||||
console.log("status:" + status);
|
||||
if (enable && status != 2) {
|
||||
result = true;
|
||||
console.log("手机定位服务已开启且已授予定位权限");
|
||||
result = true;
|
||||
console.log("手机定位服务已开启且已授予定位权限");
|
||||
} else {
|
||||
console.log("手机系统的定位没有打开或未给予定位权限");
|
||||
console.log("手机系统的定位没有打开或未给予定位权限");
|
||||
} */
|
||||
plus.ios.deleteObject(cllocationManger);
|
||||
return result;
|
||||
@@ -159,7 +158,8 @@ function judgeIosPermissionMemo() {
|
||||
function requestAndroidPermission(permissionID) {
|
||||
return new Promise((resolve, reject) => {
|
||||
plus.android.requestPermissions(
|
||||
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
||||
permissionID.split(","),
|
||||
// [permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
||||
function(resultObj) {
|
||||
var result = 0;
|
||||
for (var i = 0; i < resultObj.granted.length; i++) {
|
||||
@@ -264,9 +264,142 @@ function checkSystemEnableLocation() {
|
||||
}
|
||||
}
|
||||
|
||||
let permissionMap = {
|
||||
"android": {
|
||||
"CAMERA_EXTERNAL_STORAGE": {
|
||||
"name": "android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE,android.permission.CAMERA",
|
||||
"title": "相机/相册权限说明",
|
||||
"content": "便于您使用该功能上传您的照片/图片用于上传用户头像、留言上传图片、申诉反馈上传图片等场景中读取和写入相册和文件内容"
|
||||
},
|
||||
"CAMERA": {
|
||||
"name": "android.permission.CAMERA",
|
||||
"title": "相机权限说明",
|
||||
"content": "便于您使用该功能上传您的照片/图片用于上传用户头像、留言上传图片、申诉反馈上传图片等场景中拍摄图片"
|
||||
},
|
||||
// "EXTERNAL_STORAGE": {
|
||||
// "name": "android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE",
|
||||
// "title": "相册权限说明",
|
||||
// "content": "便于您使用该功能上传您的照片/图片/视频及用于上传工单故障、维修图片、扫码识别设备等信息、意见反馈上传图片、上传设备、客户、设备图片等场景中读取和写入相册和文件内容"
|
||||
// },
|
||||
// "LOCATION": {
|
||||
// "name": "android.location.LocationManager",
|
||||
// "title": "定位权限说明",
|
||||
// "content": "便于您使用该功能定位您当前的位置,并上报当前位置给服务器,来智能得按照当前位置给您分配距离您最近的工单信息等功能"
|
||||
// },
|
||||
"CALLPHONE": {
|
||||
"name": "android.permission.CALL_PHONE",
|
||||
"title": "拨打电话权限说明",
|
||||
"content": "便于您使用该功能能够快速和提交工单信息的客户进行联系并进行及时处理"
|
||||
},
|
||||
},
|
||||
"ios": {}
|
||||
}
|
||||
|
||||
let view = null;
|
||||
let viewShow = false;
|
||||
|
||||
function showViewDesc(permission) {
|
||||
let plat = isIos ? "ios" : "android";
|
||||
view = new plus.nativeObj.View('per-modal', {
|
||||
top: '0px',
|
||||
left: '0px',
|
||||
width: '100%',
|
||||
backgroundColor: 'rgba(0,0,0,0.4)',
|
||||
//opacity: '.9'
|
||||
})
|
||||
view.drawRect({
|
||||
color: '#fff',
|
||||
radius: '5px'
|
||||
}, {
|
||||
top: '170px',
|
||||
left: '5%',
|
||||
width: '90%',
|
||||
height: "150px",
|
||||
})
|
||||
view.drawText(permissionMap[plat][permission]["title"], {
|
||||
top: '180px',
|
||||
left: "8%",
|
||||
height: "30px"
|
||||
}, {
|
||||
align: "left",
|
||||
color: "#000",
|
||||
}, {
|
||||
onClick: function(e) {
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
view.drawText(permissionMap[plat][permission]["content"], {
|
||||
top: '210px',
|
||||
height: "80px",
|
||||
left: "8%",
|
||||
width: "84%"
|
||||
}, {
|
||||
whiteSpace: 'normal',
|
||||
size: "14px",
|
||||
align: "left",
|
||||
color: "#656563"
|
||||
})
|
||||
setTimeout(() => {
|
||||
view.show()
|
||||
}, 200)
|
||||
}
|
||||
|
||||
function premissionCheck(permission) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let plat = isIos ? "ios" : "android";
|
||||
if (isIos) { // ios
|
||||
// const camera = permission.judgeIosPermission("camera");//判断ios是否给予摄像头权限
|
||||
// //ios相册没权限,系统会自动弹出授权框
|
||||
// //let photoLibrary = permission.judgeIosPermission("photoLibrary");//判断ios是否给予相册权限
|
||||
// if(camera){
|
||||
// resolve();
|
||||
// }else{
|
||||
// reject('需要开启相机使用权限');
|
||||
// }
|
||||
resolve(1)
|
||||
} else { // android
|
||||
let permission_arr = permissionMap[plat][permission]["name"].split(",");
|
||||
|
||||
let flag = true;
|
||||
for (let i = 0; i < permission_arr.length; i++) {
|
||||
let status = plus.navigator.checkPermission(permission_arr[i]);
|
||||
if (status == "undetermined") {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if (flag == false) { // 未完全授权
|
||||
showViewDesc(permission);
|
||||
requestAndroidPermission(permissionMap[plat][permission]["name"]).then((res) => {
|
||||
viewShow = false;
|
||||
setTimeout(() => {
|
||||
viewShow = true;
|
||||
}, 120)
|
||||
view.close();
|
||||
// if (res == -1) {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '操作权限已被拒绝,请手动前往设置',
|
||||
// confirmText: "立即设置",
|
||||
// success: (res) => {
|
||||
// if (res.confirm) {
|
||||
// gotoAppPermissionSetting()
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
resolve(res)
|
||||
})
|
||||
} else {
|
||||
resolve(1)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
judgeIosPermission: judgeIosPermission,
|
||||
requestAndroidPermission: requestAndroidPermission,
|
||||
checkSystemEnableLocation: checkSystemEnableLocation,
|
||||
gotoAppPermissionSetting: gotoAppPermissionSetting
|
||||
gotoAppPermissionSetting: gotoAppPermissionSetting,
|
||||
premissionCheck: premissionCheck
|
||||
}
|
||||
|
||||
272
js_sdk/wa-permission/permission11.js
Normal file
272
js_sdk/wa-permission/permission11.js
Normal file
@@ -0,0 +1,272 @@
|
||||
/**
|
||||
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
|
||||
*/
|
||||
|
||||
var isIos
|
||||
// #ifdef APP-PLUS
|
||||
isIos = (plus.os.name == "iOS")
|
||||
// #endif
|
||||
|
||||
// 判断推送权限是否开启
|
||||
function judgeIosPermissionPush() {
|
||||
var result = false;
|
||||
var UIApplication = plus.ios.import("UIApplication");
|
||||
var app = UIApplication.sharedApplication();
|
||||
var enabledTypes = 0;
|
||||
if (app.currentUserNotificationSettings) {
|
||||
var settings = app.currentUserNotificationSettings();
|
||||
enabledTypes = settings.plusGetAttribute("types");
|
||||
console.log("enabledTypes1:" + enabledTypes);
|
||||
if (enabledTypes == 0) {
|
||||
console.log("推送权限没有开启");
|
||||
} else {
|
||||
result = true;
|
||||
console.log("已经开启推送功能!")
|
||||
}
|
||||
plus.ios.deleteObject(settings);
|
||||
} else {
|
||||
enabledTypes = app.enabledRemoteNotificationTypes();
|
||||
if (enabledTypes == 0) {
|
||||
console.log("推送权限没有开启!");
|
||||
} else {
|
||||
result = true;
|
||||
console.log("已经开启推送功能!")
|
||||
}
|
||||
console.log("enabledTypes2:" + enabledTypes);
|
||||
}
|
||||
plus.ios.deleteObject(app);
|
||||
plus.ios.deleteObject(UIApplication);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断定位权限是否开启
|
||||
function judgeIosPermissionLocation() {
|
||||
var result = false;
|
||||
var cllocationManger = plus.ios.import("CLLocationManager");
|
||||
var status = cllocationManger.authorizationStatus();
|
||||
result = (status != 2)
|
||||
console.log("定位权限开启:" + result);
|
||||
// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
|
||||
/* var enable = cllocationManger.locationServicesEnabled();
|
||||
var status = cllocationManger.authorizationStatus();
|
||||
console.log("enable:" + enable);
|
||||
console.log("status:" + status);
|
||||
if (enable && status != 2) {
|
||||
result = true;
|
||||
console.log("手机定位服务已开启且已授予定位权限");
|
||||
} else {
|
||||
console.log("手机系统的定位没有打开或未给予定位权限");
|
||||
} */
|
||||
plus.ios.deleteObject(cllocationManger);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断麦克风权限是否开启
|
||||
function judgeIosPermissionRecord() {
|
||||
var result = false;
|
||||
var avaudiosession = plus.ios.import("AVAudioSession");
|
||||
var avaudio = avaudiosession.sharedInstance();
|
||||
var permissionStatus = avaudio.recordPermission();
|
||||
console.log("permissionStatus:" + permissionStatus);
|
||||
if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
|
||||
console.log("麦克风权限没有开启");
|
||||
} else {
|
||||
result = true;
|
||||
console.log("麦克风权限已经开启");
|
||||
}
|
||||
plus.ios.deleteObject(avaudiosession);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断相机权限是否开启
|
||||
function judgeIosPermissionCamera() {
|
||||
var result = false;
|
||||
var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
|
||||
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
|
||||
console.log("authStatus:" + authStatus);
|
||||
if (authStatus == 3) {
|
||||
result = true;
|
||||
console.log("相机权限已经开启");
|
||||
} else {
|
||||
console.log("相机权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(AVCaptureDevice);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断相册权限是否开启
|
||||
function judgeIosPermissionPhotoLibrary() {
|
||||
var result = false;
|
||||
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
|
||||
var authStatus = PHPhotoLibrary.authorizationStatus();
|
||||
console.log("authStatus:" + authStatus);
|
||||
if (authStatus == 3) {
|
||||
result = true;
|
||||
console.log("相册权限已经开启");
|
||||
} else {
|
||||
console.log("相册权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(PHPhotoLibrary);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断通讯录权限是否开启
|
||||
function judgeIosPermissionContact() {
|
||||
var result = false;
|
||||
var CNContactStore = plus.ios.import("CNContactStore");
|
||||
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
|
||||
if (cnAuthStatus == 3) {
|
||||
result = true;
|
||||
console.log("通讯录权限已经开启");
|
||||
} else {
|
||||
console.log("通讯录权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(CNContactStore);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断日历权限是否开启
|
||||
function judgeIosPermissionCalendar() {
|
||||
var result = false;
|
||||
var EKEventStore = plus.ios.import("EKEventStore");
|
||||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
|
||||
if (ekAuthStatus == 3) {
|
||||
result = true;
|
||||
console.log("日历权限已经开启");
|
||||
} else {
|
||||
console.log("日历权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(EKEventStore);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断备忘录权限是否开启
|
||||
function judgeIosPermissionMemo() {
|
||||
var result = false;
|
||||
var EKEventStore = plus.ios.import("EKEventStore");
|
||||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
|
||||
if (ekAuthStatus == 3) {
|
||||
result = true;
|
||||
console.log("备忘录权限已经开启");
|
||||
} else {
|
||||
console.log("备忘录权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(EKEventStore);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Android权限查询
|
||||
function requestAndroidPermission(permissionID) {
|
||||
return new Promise((resolve, reject) => {
|
||||
plus.android.requestPermissions(
|
||||
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
||||
function(resultObj) {
|
||||
var result = 0;
|
||||
for (var i = 0; i < resultObj.granted.length; i++) {
|
||||
var grantedPermission = resultObj.granted[i];
|
||||
console.log('已获取的权限:' + grantedPermission);
|
||||
result = 1
|
||||
}
|
||||
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
|
||||
var deniedPresentPermission = resultObj.deniedPresent[i];
|
||||
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
|
||||
result = 0
|
||||
}
|
||||
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
|
||||
var deniedAlwaysPermission = resultObj.deniedAlways[i];
|
||||
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
|
||||
result = -1
|
||||
}
|
||||
resolve(result);
|
||||
// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
|
||||
// if (result != 1) {
|
||||
// gotoAppPermissionSetting()
|
||||
// }
|
||||
},
|
||||
function(error) {
|
||||
console.log('申请权限错误:' + error.code + " = " + error.message);
|
||||
resolve({
|
||||
code: error.code,
|
||||
message: error.message
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// 使用一个方法,根据参数判断权限
|
||||
function judgeIosPermission(permissionID) {
|
||||
if (permissionID == "location") {
|
||||
return judgeIosPermissionLocation()
|
||||
} else if (permissionID == "camera") {
|
||||
return judgeIosPermissionCamera()
|
||||
} else if (permissionID == "photoLibrary") {
|
||||
return judgeIosPermissionPhotoLibrary()
|
||||
} else if (permissionID == "record") {
|
||||
return judgeIosPermissionRecord()
|
||||
} else if (permissionID == "push") {
|
||||
return judgeIosPermissionPush()
|
||||
} else if (permissionID == "contact") {
|
||||
return judgeIosPermissionContact()
|
||||
} else if (permissionID == "calendar") {
|
||||
return judgeIosPermissionCalendar()
|
||||
} else if (permissionID == "memo") {
|
||||
return judgeIosPermissionMemo()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 跳转到**应用**的权限页面
|
||||
function gotoAppPermissionSetting() {
|
||||
if (isIos) {
|
||||
var UIApplication = plus.ios.import("UIApplication");
|
||||
var application2 = UIApplication.sharedApplication();
|
||||
var NSURL2 = plus.ios.import("NSURL");
|
||||
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
|
||||
var setting2 = NSURL2.URLWithString("app-settings:");
|
||||
application2.openURL(setting2);
|
||||
|
||||
plus.ios.deleteObject(setting2);
|
||||
plus.ios.deleteObject(NSURL2);
|
||||
plus.ios.deleteObject(application2);
|
||||
} else {
|
||||
// console.log(plus.device.vendor);
|
||||
var Intent = plus.android.importClass("android.content.Intent");
|
||||
var Settings = plus.android.importClass("android.provider.Settings");
|
||||
var Uri = plus.android.importClass("android.net.Uri");
|
||||
var mainActivity = plus.android.runtimeMainActivity();
|
||||
var intent = new Intent();
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
mainActivity.startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
// 检查系统的设备服务是否开启
|
||||
// var checkSystemEnableLocation = async function () {
|
||||
function checkSystemEnableLocation() {
|
||||
if (isIos) {
|
||||
var result = false;
|
||||
var cllocationManger = plus.ios.import("CLLocationManager");
|
||||
var result = cllocationManger.locationServicesEnabled();
|
||||
console.log("系统定位开启:" + result);
|
||||
plus.ios.deleteObject(cllocationManger);
|
||||
return result;
|
||||
} else {
|
||||
var context = plus.android.importClass("android.content.Context");
|
||||
var locationManager = plus.android.importClass("android.location.LocationManager");
|
||||
var main = plus.android.runtimeMainActivity();
|
||||
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
||||
var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
|
||||
console.log("系统定位开启:" + result);
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
judgeIosPermission: judgeIosPermission,
|
||||
requestAndroidPermission: requestAndroidPermission,
|
||||
checkSystemEnableLocation: checkSystemEnableLocation,
|
||||
gotoAppPermissionSetting: gotoAppPermissionSetting
|
||||
}
|
||||
272
js_sdk/wa-permission11/permission.js
Normal file
272
js_sdk/wa-permission11/permission.js
Normal file
@@ -0,0 +1,272 @@
|
||||
/**
|
||||
* 本模块封装了Android、iOS的应用权限判断、打开应用权限设置界面、以及位置系统服务是否开启
|
||||
*/
|
||||
|
||||
var isIos
|
||||
// #ifdef APP-PLUS
|
||||
isIos = (plus.os.name == "iOS")
|
||||
// #endif
|
||||
|
||||
// 判断推送权限是否开启
|
||||
function judgeIosPermissionPush() {
|
||||
var result = false;
|
||||
var UIApplication = plus.ios.import("UIApplication");
|
||||
var app = UIApplication.sharedApplication();
|
||||
var enabledTypes = 0;
|
||||
if (app.currentUserNotificationSettings) {
|
||||
var settings = app.currentUserNotificationSettings();
|
||||
enabledTypes = settings.plusGetAttribute("types");
|
||||
console.log("enabledTypes1:" + enabledTypes);
|
||||
if (enabledTypes == 0) {
|
||||
console.log("推送权限没有开启");
|
||||
} else {
|
||||
result = true;
|
||||
console.log("已经开启推送功能!")
|
||||
}
|
||||
plus.ios.deleteObject(settings);
|
||||
} else {
|
||||
enabledTypes = app.enabledRemoteNotificationTypes();
|
||||
if (enabledTypes == 0) {
|
||||
console.log("推送权限没有开启!");
|
||||
} else {
|
||||
result = true;
|
||||
console.log("已经开启推送功能!")
|
||||
}
|
||||
console.log("enabledTypes2:" + enabledTypes);
|
||||
}
|
||||
plus.ios.deleteObject(app);
|
||||
plus.ios.deleteObject(UIApplication);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断定位权限是否开启
|
||||
function judgeIosPermissionLocation() {
|
||||
var result = false;
|
||||
var cllocationManger = plus.ios.import("CLLocationManager");
|
||||
var status = cllocationManger.authorizationStatus();
|
||||
result = (status != 2)
|
||||
console.log("定位权限开启:" + result);
|
||||
// 以下代码判断了手机设备的定位是否关闭,推荐另行使用方法 checkSystemEnableLocation
|
||||
/* var enable = cllocationManger.locationServicesEnabled();
|
||||
var status = cllocationManger.authorizationStatus();
|
||||
console.log("enable:" + enable);
|
||||
console.log("status:" + status);
|
||||
if (enable && status != 2) {
|
||||
result = true;
|
||||
console.log("手机定位服务已开启且已授予定位权限");
|
||||
} else {
|
||||
console.log("手机系统的定位没有打开或未给予定位权限");
|
||||
} */
|
||||
plus.ios.deleteObject(cllocationManger);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断麦克风权限是否开启
|
||||
function judgeIosPermissionRecord() {
|
||||
var result = false;
|
||||
var avaudiosession = plus.ios.import("AVAudioSession");
|
||||
var avaudio = avaudiosession.sharedInstance();
|
||||
var permissionStatus = avaudio.recordPermission();
|
||||
console.log("permissionStatus:" + permissionStatus);
|
||||
if (permissionStatus == 1684369017 || permissionStatus == 1970168948) {
|
||||
console.log("麦克风权限没有开启");
|
||||
} else {
|
||||
result = true;
|
||||
console.log("麦克风权限已经开启");
|
||||
}
|
||||
plus.ios.deleteObject(avaudiosession);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断相机权限是否开启
|
||||
function judgeIosPermissionCamera() {
|
||||
var result = false;
|
||||
var AVCaptureDevice = plus.ios.import("AVCaptureDevice");
|
||||
var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide');
|
||||
console.log("authStatus:" + authStatus);
|
||||
if (authStatus == 3) {
|
||||
result = true;
|
||||
console.log("相机权限已经开启");
|
||||
} else {
|
||||
console.log("相机权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(AVCaptureDevice);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断相册权限是否开启
|
||||
function judgeIosPermissionPhotoLibrary() {
|
||||
var result = false;
|
||||
var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary");
|
||||
var authStatus = PHPhotoLibrary.authorizationStatus();
|
||||
console.log("authStatus:" + authStatus);
|
||||
if (authStatus == 3) {
|
||||
result = true;
|
||||
console.log("相册权限已经开启");
|
||||
} else {
|
||||
console.log("相册权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(PHPhotoLibrary);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断通讯录权限是否开启
|
||||
function judgeIosPermissionContact() {
|
||||
var result = false;
|
||||
var CNContactStore = plus.ios.import("CNContactStore");
|
||||
var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0);
|
||||
if (cnAuthStatus == 3) {
|
||||
result = true;
|
||||
console.log("通讯录权限已经开启");
|
||||
} else {
|
||||
console.log("通讯录权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(CNContactStore);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断日历权限是否开启
|
||||
function judgeIosPermissionCalendar() {
|
||||
var result = false;
|
||||
var EKEventStore = plus.ios.import("EKEventStore");
|
||||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0);
|
||||
if (ekAuthStatus == 3) {
|
||||
result = true;
|
||||
console.log("日历权限已经开启");
|
||||
} else {
|
||||
console.log("日历权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(EKEventStore);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 判断备忘录权限是否开启
|
||||
function judgeIosPermissionMemo() {
|
||||
var result = false;
|
||||
var EKEventStore = plus.ios.import("EKEventStore");
|
||||
var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1);
|
||||
if (ekAuthStatus == 3) {
|
||||
result = true;
|
||||
console.log("备忘录权限已经开启");
|
||||
} else {
|
||||
console.log("备忘录权限没有开启");
|
||||
}
|
||||
plus.ios.deleteObject(EKEventStore);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Android权限查询
|
||||
function requestAndroidPermission(permissionID) {
|
||||
return new Promise((resolve, reject) => {
|
||||
plus.android.requestPermissions(
|
||||
[permissionID], // 理论上支持多个权限同时查询,但实际上本函数封装只处理了一个权限的情况。有需要的可自行扩展封装
|
||||
function(resultObj) {
|
||||
var result = 0;
|
||||
for (var i = 0; i < resultObj.granted.length; i++) {
|
||||
var grantedPermission = resultObj.granted[i];
|
||||
console.log('已获取的权限:' + grantedPermission);
|
||||
result = 1
|
||||
}
|
||||
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
|
||||
var deniedPresentPermission = resultObj.deniedPresent[i];
|
||||
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
|
||||
result = 0
|
||||
}
|
||||
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
|
||||
var deniedAlwaysPermission = resultObj.deniedAlways[i];
|
||||
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
|
||||
result = -1
|
||||
}
|
||||
resolve(result);
|
||||
// 若所需权限被拒绝,则打开APP设置界面,可以在APP设置界面打开相应权限
|
||||
// if (result != 1) {
|
||||
// gotoAppPermissionSetting()
|
||||
// }
|
||||
},
|
||||
function(error) {
|
||||
console.log('申请权限错误:' + error.code + " = " + error.message);
|
||||
resolve({
|
||||
code: error.code,
|
||||
message: error.message
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// 使用一个方法,根据参数判断权限
|
||||
function judgeIosPermission(permissionID) {
|
||||
if (permissionID == "location") {
|
||||
return judgeIosPermissionLocation()
|
||||
} else if (permissionID == "camera") {
|
||||
return judgeIosPermissionCamera()
|
||||
} else if (permissionID == "photoLibrary") {
|
||||
return judgeIosPermissionPhotoLibrary()
|
||||
} else if (permissionID == "record") {
|
||||
return judgeIosPermissionRecord()
|
||||
} else if (permissionID == "push") {
|
||||
return judgeIosPermissionPush()
|
||||
} else if (permissionID == "contact") {
|
||||
return judgeIosPermissionContact()
|
||||
} else if (permissionID == "calendar") {
|
||||
return judgeIosPermissionCalendar()
|
||||
} else if (permissionID == "memo") {
|
||||
return judgeIosPermissionMemo()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 跳转到**应用**的权限页面
|
||||
function gotoAppPermissionSetting() {
|
||||
if (isIos) {
|
||||
var UIApplication = plus.ios.import("UIApplication");
|
||||
var application2 = UIApplication.sharedApplication();
|
||||
var NSURL2 = plus.ios.import("NSURL");
|
||||
// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
|
||||
var setting2 = NSURL2.URLWithString("app-settings:");
|
||||
application2.openURL(setting2);
|
||||
|
||||
plus.ios.deleteObject(setting2);
|
||||
plus.ios.deleteObject(NSURL2);
|
||||
plus.ios.deleteObject(application2);
|
||||
} else {
|
||||
// console.log(plus.device.vendor);
|
||||
var Intent = plus.android.importClass("android.content.Intent");
|
||||
var Settings = plus.android.importClass("android.provider.Settings");
|
||||
var Uri = plus.android.importClass("android.net.Uri");
|
||||
var mainActivity = plus.android.runtimeMainActivity();
|
||||
var intent = new Intent();
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
|
||||
intent.setData(uri);
|
||||
mainActivity.startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
// 检查系统的设备服务是否开启
|
||||
// var checkSystemEnableLocation = async function () {
|
||||
function checkSystemEnableLocation() {
|
||||
if (isIos) {
|
||||
var result = false;
|
||||
var cllocationManger = plus.ios.import("CLLocationManager");
|
||||
var result = cllocationManger.locationServicesEnabled();
|
||||
console.log("系统定位开启:" + result);
|
||||
plus.ios.deleteObject(cllocationManger);
|
||||
return result;
|
||||
} else {
|
||||
var context = plus.android.importClass("android.content.Context");
|
||||
var locationManager = plus.android.importClass("android.location.LocationManager");
|
||||
var main = plus.android.runtimeMainActivity();
|
||||
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
||||
var result = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
|
||||
console.log("系统定位开启:" + result);
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
judgeIosPermission: judgeIosPermission,
|
||||
requestAndroidPermission: requestAndroidPermission,
|
||||
checkSystemEnableLocation: checkSystemEnableLocation,
|
||||
gotoAppPermissionSetting: gotoAppPermissionSetting
|
||||
}
|
||||
30
main.js
30
main.js
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import qs from 'qs'
|
||||
|
||||
// main.js
|
||||
// 全局添加uWeb
|
||||
// #ifdef H5
|
||||
@@ -30,11 +31,9 @@ Vue.prototype.$commonJS = commonJS
|
||||
import http from '@/config/requestConfig.js';
|
||||
Vue.prototype.$http = http
|
||||
// 地址
|
||||
// Vue.prototype.$baseUrl = "https://testapi.nuttyreading.com/"
|
||||
// Vue.prototype.$baseUrl = "http://192.168.110.100:9200/pb/"
|
||||
// Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/"
|
||||
//Vue.prototype.$baseUrl = "http://192.168.110.100:9200/pb/"
|
||||
Vue.prototype.$baseUrl = "https://api.nuttyreading.com/"
|
||||
// Vue.prototype.$baseUrl = "http://101.201.146.165:8088/App-EH/"//app
|
||||
|
||||
// 安卓安卓包下载地址
|
||||
// Vue.prototype.$apkUrl = "https://www.nuttyreading.com/nuttyreading.apk" // 本地地址
|
||||
Vue.prototype.$apkUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.zmzm" // 应用宝
|
||||
@@ -49,9 +48,10 @@ uni.getSystemInfo({
|
||||
Vue.prototype.iosHidden = true;
|
||||
if (res.platform == 'ios') {
|
||||
|
||||
Vue.prototype.iosHidden = false;//ios临时隐藏听书
|
||||
Vue.prototype.iosHidden = false; //ios临时隐藏听书
|
||||
Vue.prototype.iosHide = true;
|
||||
|
||||
|
||||
} else {
|
||||
Vue.prototype.iosHide = true;
|
||||
|
||||
@@ -66,6 +66,8 @@ import uView from '@/uni_modules/uview-ui'
|
||||
Vue.use(uView)
|
||||
|
||||
|
||||
|
||||
|
||||
// 传参格式
|
||||
Vue.prototype.$qs = qs
|
||||
//数据管理中心
|
||||
@@ -92,6 +94,7 @@ import {
|
||||
} from '@/config/login';
|
||||
Vue.prototype.judgeLogin = judgeLogin;
|
||||
Vue.prototype.isShowHtml = store.state.loadingShow;
|
||||
// Vue.prototype.vuex_fontsize = uni.getStorageSync('fontSize');
|
||||
Vue.config.productionTip = false;
|
||||
// #ifdef H5
|
||||
//微信SDK
|
||||
@@ -107,14 +110,23 @@ Vue.component("mescroll-body", MescrollBody);
|
||||
|
||||
// import musicPlay from '@/components/music.vue'
|
||||
// Vue.component('music-play', musicPlay);
|
||||
import commonOrderSubmit from '@/pages/component/commonComponents/orderSubmit.vue'
|
||||
Vue.component('common-order-submit', commonOrderSubmit);
|
||||
import commonList from '@/pages/component/commonComponents/list.vue'
|
||||
Vue.component('common-list', commonList);
|
||||
import commonVideoAliyun from '@/pages/component/commonComponents/video/AliPlayer.vue'
|
||||
Vue.component('common-list-aliyun', commonVideoAliyun);
|
||||
import commonVideoAudio from '@/pages/component/commonComponents/video/audio.vue'
|
||||
Vue.component('common-list-audio', commonVideoAudio);
|
||||
|
||||
import commonVideo from '@/pages/component/commonComponents/video/index.vue'
|
||||
Vue.component('common-video', commonVideo);
|
||||
import commonVideoIos from '@/pages/component/commonComponents/video/ios.nvue'
|
||||
Vue.component('common-video-ios', commonVideoIos);
|
||||
|
||||
import CommonCourseVideo from 'edu-core/components/course-video'
|
||||
Vue.component('CommonCourseVideo', CommonCourseVideo);
|
||||
|
||||
import commonCoupon from '@/pages/component/commonComponents/coupon/index.vue'
|
||||
Vue.component('common-coupon', commonCoupon);
|
||||
import commonGoodsList from '@/pages/component/commonComponents/goodsList.vue'
|
||||
Vue.component('common-goods-list', commonGoodsList);
|
||||
import commonCurriculumList from '@/pages/component/commonComponents/curriculum.vue'
|
||||
@@ -133,6 +145,10 @@ import commonAddress from '@/pages/component/commonComponents/address/index.vue'
|
||||
Vue.component('common-address', commonAddress);
|
||||
import commonSelectGoods from '@/pages/component/commonComponents/selectGoods.vue'
|
||||
Vue.component('common-select-goods', commonSelectGoods);
|
||||
import commonAdvertisement from '@/pages/component/commonComponents/advertisement.vue'
|
||||
Vue.component('common-advertisement', commonAdvertisement);
|
||||
import commonSelectVip from '@/pages/component/commonComponents/selectVip.vue'
|
||||
Vue.component('common-select-vip', commonSelectVip);
|
||||
import commonAnchorLink from '@/pages/component/commonComponents/anchorLink.vue'
|
||||
Vue.component('common-anchor-link', commonAnchorLink);
|
||||
|
||||
|
||||
264
manifest.json
264
manifest.json
@@ -1,55 +1,64 @@
|
||||
{
|
||||
"name" : "众妙之门",
|
||||
"appid" : "__UNI__5D0ED80",
|
||||
"description" : "uni-app 框架示例,一套代码,同时发行到iOS、Android、H5、小程序等多个平台,请使用手机扫码快速体验 uni-app 的强大功能",
|
||||
"versionName" : "1.0.11",
|
||||
"versionCode" : 1011,
|
||||
"description" : "众妙之门",
|
||||
"sassImplementationName" : "node-sass",
|
||||
"networkTimeout" : {
|
||||
"request" : 3000
|
||||
},
|
||||
"transformPx" : false,
|
||||
"icons" : [
|
||||
{
|
||||
"sizes" : "分辨率,192x192",
|
||||
"src" : "图片路径"
|
||||
}
|
||||
],
|
||||
"versionName" : "1.0.56",
|
||||
"versionCode" : 1056,
|
||||
"app-plus" : {
|
||||
"nvueCompiler" : "weex",
|
||||
"compatible" : {
|
||||
// 设置为true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||
"ignoreVersion" : true
|
||||
},
|
||||
"orientation" : [
|
||||
//竖屏正方向
|
||||
"screenOrientation" : [
|
||||
"portrait-primary",
|
||||
//竖屏反方向
|
||||
"portrait-secondary",
|
||||
//横屏正方向
|
||||
"landscape-primary",
|
||||
//横屏反方向
|
||||
"landscape-secondary",
|
||||
//自然方向
|
||||
"default"
|
||||
"landscape-secondary"
|
||||
],
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"nvueLaunchMode" : "fast",
|
||||
"splashscreen" : {
|
||||
"iosStyle" : "common",
|
||||
"androidStyle" : "default",
|
||||
"useOriginalMsgbox" : true
|
||||
"privacy" : {
|
||||
"prompt" : "template",
|
||||
"template" : {
|
||||
"title" : "用户协议和隐私政策",
|
||||
"message" : "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href='https://zmzm.taihumed.com/agreement.html'>《用户协议》</a>和<a href='https://zmzm.taihumed.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
||||
"buttonAccept" : "同意",
|
||||
"buttonRefuse" : "暂不同意"
|
||||
}
|
||||
},
|
||||
"modules" : {
|
||||
"Push" : {},
|
||||
"Share" : {},
|
||||
"Speech" : {},
|
||||
"VideoPlayer" : {},
|
||||
"Payment" : {},
|
||||
"Share" : {},
|
||||
"VideoPlayer" : {},
|
||||
"OAuth" : {},
|
||||
"Camera" : {}
|
||||
},
|
||||
"distribute" : {
|
||||
"distribute" : {
|
||||
"orientation" : [ "portrait-primary" ] //重力感应、横竖屏配置
|
||||
"apple" : {
|
||||
"devices" : "universal"
|
||||
},
|
||||
// "UIBackgroundModes" : [ "audio" ]
|
||||
"android" : {
|
||||
"permissionPhoneState" : {
|
||||
"request" : "none",
|
||||
"prompt" : "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
|
||||
},
|
||||
"permissionExternalStorage" : {
|
||||
"request" : "none",
|
||||
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
|
||||
},
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
@@ -57,14 +66,12 @@
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
|
||||
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
@@ -72,45 +79,60 @@
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
],
|
||||
"targetSdkVersion" : 30,
|
||||
"minSdkVersion" : 21,
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||
"schemes" : "zmzm"
|
||||
},
|
||||
"ios" : {
|
||||
"UIBackgroundModes" : [ "audio" ],
|
||||
"urlschemewhitelist" : [ "baidumap", "iosamap", "nuttyrading" ],
|
||||
"dSYMs" : false,
|
||||
"urltypes" : "zmzm",
|
||||
"capabilities" : {
|
||||
"entitlements" : {
|
||||
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
|
||||
}
|
||||
}
|
||||
"minSdkVersion" : 21,
|
||||
"targetSdkVersion" : 30,
|
||||
"schemes" : "zmzm",
|
||||
"excludePermissions" : [
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>"
|
||||
]
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"speech" : {},
|
||||
"oauth" : {},
|
||||
"ad" : {},
|
||||
"maps" : {},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx912aa600132dc965",
|
||||
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__5D0ED80/"
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
"alipay" : {
|
||||
"__platform__" : [ "ios", "android" ]
|
||||
},
|
||||
"appleiap" : {},
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "wx912aa600132dc965",
|
||||
"UniversalLinks" : "https://verification.nuttyreading.com/zmzm/"
|
||||
},
|
||||
"appleiap" : {}
|
||||
},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx912aa600132dc965",
|
||||
"UniversalLinks" : "https://verification.nuttyreading.com/zmzm/"
|
||||
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__5D0ED80/"
|
||||
}
|
||||
},
|
||||
"ad" : {}
|
||||
"oauth" : {},
|
||||
"push" : {}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"iosStyle" : "common",
|
||||
"androidStyle" : "default",
|
||||
"useOriginalMsgbox" : true
|
||||
},
|
||||
"ios" : {
|
||||
"dSYMs" : false,
|
||||
// "UIBackgroundModes" : [ "audio" ], // 背景播放音乐
|
||||
"capabilities" : {
|
||||
"entitlements" : {
|
||||
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
|
||||
}
|
||||
},
|
||||
"idfa" : false,
|
||||
"urltypes" : "zmzm",
|
||||
"urlschemewhitelist" : "nuttyreading,medicine",
|
||||
"privacyDescription" : {
|
||||
"NSPhotoLibraryUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
|
||||
"NSCameraUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用",
|
||||
"NSPhotoLibraryAddUsageDescription" : "保障您在此app中的修改头像、申诉反馈上传图片、留言上传图片功能的正常使用"
|
||||
}
|
||||
},
|
||||
"orientation" : [ "portrait-primary" ],
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
@@ -142,103 +164,81 @@
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"androidStyle" : "common",
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png"
|
||||
},
|
||||
"iosStyle" : "common",
|
||||
"useOriginalMsgbox" : true
|
||||
}
|
||||
},
|
||||
"compilerVersion" : 3,
|
||||
"nvueLaunchMode" : "fast",
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : false
|
||||
},
|
||||
"nativePlugins" : {},
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
},
|
||||
"nativePlugins" : {}
|
||||
},
|
||||
"quickapp" : {},
|
||||
"quickapp-native" : {
|
||||
"icon" : "/static/logo.png",
|
||||
"package" : "com.example.demo",
|
||||
"features" : [
|
||||
{
|
||||
"name" : "system.clipboard"
|
||||
"safearea" : {
|
||||
//安全区域配置,仅iOS平台生效
|
||||
"bottom" : {
|
||||
// 底部安全区域配置
|
||||
"offset" : "none" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
|
||||
}
|
||||
]
|
||||
},
|
||||
"quickapp-webview" : {
|
||||
"icon" : "static/icon/fengziIcon.png",
|
||||
"package" : "com.cn.zmzm",
|
||||
"minPlatformVersion" : 1070,
|
||||
"versionName" : "1.0.1",
|
||||
"versionCode" : 101
|
||||
}
|
||||
},
|
||||
// 5+App特有相关
|
||||
"quickapp" : {},
|
||||
// 快应用特有相关
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
"urlCheck" : false,
|
||||
"es6" : true,
|
||||
"postcss" : true,
|
||||
"minified" : true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"appid" : "wx912aa600132dc965",
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "演示定位能力"
|
||||
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
},
|
||||
"dynamicLib" : {
|
||||
"editorLib" : {
|
||||
"provider" : "swan-editor"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-jd" : {
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"h5" : {
|
||||
"template" : "template.h5.html",
|
||||
"router" : {
|
||||
"mode" : "history",
|
||||
"base" : ""
|
||||
"mode" : "hash",
|
||||
"base" : "/uniappDemo/"
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU"
|
||||
}
|
||||
"optimization" : {
|
||||
"treeShaking" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"async" : {
|
||||
"timeout" : 20000
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"vueVersion" : "2",
|
||||
"_spaceID" : "mp-3614b80b-2d75-4462-a481-4998f8187274",
|
||||
"uniStatistics" : {
|
||||
"version" : "2",
|
||||
"enable" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-jd" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-kuaishou" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
@@ -254,6 +254,11 @@
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"quickapp-webview-huawei" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
@@ -263,10 +268,7 @@
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"version" : "2",
|
||||
"enable" : true
|
||||
},
|
||||
"_spaceID" : "mp-3614b80b-2d75-4462-a481-4998f8187274"
|
||||
}
|
||||
}
|
||||
// 小程序特有相关
|
||||
|
||||
|
||||
271
node_modules/.package-lock.json
generated
vendored
271
node_modules/.package-lock.json
generated
vendored
@@ -1,271 +0,0 @@
|
||||
{
|
||||
"name": "hello-uniapp",
|
||||
"version": "3.4.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/babel-runtime": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz",
|
||||
"integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
|
||||
"dependencies": {
|
||||
"core-js": "^2.4.0",
|
||||
"regenerator-runtime": "^0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/blueimp-md5": {
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmmirror.com/blueimp-md5/-/blueimp-md5-2.19.0.tgz",
|
||||
"integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w=="
|
||||
},
|
||||
"node_modules/charenc": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz",
|
||||
"integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/core-js": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
|
||||
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
|
||||
"deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
|
||||
"hasInstallScript": true
|
||||
},
|
||||
"node_modules/crypt": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz",
|
||||
"integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/decode-uri-component": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
|
||||
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/dom-walk": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/dom-walk/-/dom-walk-0.1.2.tgz",
|
||||
"integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="
|
||||
},
|
||||
"node_modules/es5-shim": {
|
||||
"version": "4.6.7",
|
||||
"resolved": "https://registry.npmmirror.com/es5-shim/-/es5-shim-4.6.7.tgz",
|
||||
"integrity": "sha512-jg21/dmlrNQI7JyyA2w7n+yifSxBng0ZralnSfVZjoCawgNTCnS+yBCyVM9DL5itm7SUnDGgv7hcq2XCZX4iRQ==",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/global": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmmirror.com/global/-/global-4.3.2.tgz",
|
||||
"integrity": "sha512-/4AybdwIDU4HkCUbJkZdWpe4P6vuw/CUtu+0I1YlLIPe7OlUO7KNJ+q/rO70CW2/NW6Jc6I62++Hzsf5Alu6rQ==",
|
||||
"dependencies": {
|
||||
"min-document": "^2.19.0",
|
||||
"process": "~0.5.1"
|
||||
}
|
||||
},
|
||||
"node_modules/hls.js": {
|
||||
"version": "1.5.13",
|
||||
"resolved": "https://registry.npmmirror.com/hls.js/-/hls.js-1.5.13.tgz",
|
||||
"integrity": "sha512-xRgKo84nsC7clEvSfIdgn/Tc0NOT+d7vdiL/wvkLO+0k0juc26NRBPPG1SfB8pd5bHXIjMW/F5VM8VYYkOYYdw=="
|
||||
},
|
||||
"node_modules/individual": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/individual/-/individual-2.0.0.tgz",
|
||||
"integrity": "sha512-pWt8hBCqJsUWI/HtcfWod7+N9SgAqyPEaF7JQjwzjn5vGrpg6aQ5qeAFQ7dx//UH4J1O+7xqew+gCeeFt6xN/g=="
|
||||
},
|
||||
"node_modules/is-buffer": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||
},
|
||||
"node_modules/is-function": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/is-function/-/is-function-1.0.2.tgz",
|
||||
"integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ=="
|
||||
},
|
||||
"node_modules/jquery": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
|
||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
|
||||
},
|
||||
"node_modules/jsencrypt": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz",
|
||||
"integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A=="
|
||||
},
|
||||
"node_modules/md5": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz",
|
||||
"integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
|
||||
"dependencies": {
|
||||
"charenc": "0.0.2",
|
||||
"crypt": "0.0.2",
|
||||
"is-buffer": "~1.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/min-document": {
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmmirror.com/min-document/-/min-document-2.19.0.tgz",
|
||||
"integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
|
||||
"dependencies": {
|
||||
"dom-walk": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mui-player": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmmirror.com/mui-player/-/mui-player-1.8.1.tgz",
|
||||
"integrity": "sha512-5o0SnSyVImxT9XUO6jCMmcJ+ZyAEJeFvdeZDHHPNS/LdwhzWX4yQPNgx8nzRbcUJ749xpqEQ6uVddiexLyvvqg=="
|
||||
},
|
||||
"node_modules/object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/parse-headers": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/parse-headers/-/parse-headers-2.0.5.tgz",
|
||||
"integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA=="
|
||||
},
|
||||
"node_modules/process": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmmirror.com/process/-/process-0.5.2.tgz",
|
||||
"integrity": "sha512-oNpcutj+nYX2FjdEW7PGltWhXulAnFlM0My/k48L90hARCOJtvBbQXc/6itV2jDvU5xAAtonP+r6wmQgCcbAUA==",
|
||||
"engines": {
|
||||
"node": ">= 0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/query-string": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/query-string/-/query-string-5.1.1.tgz",
|
||||
"integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==",
|
||||
"dependencies": {
|
||||
"decode-uri-component": "^0.2.0",
|
||||
"object-assign": "^4.1.0",
|
||||
"strict-uri-encode": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/regenerator-runtime": {
|
||||
"version": "0.11.1",
|
||||
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
||||
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
|
||||
},
|
||||
"node_modules/rust-result": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/rust-result/-/rust-result-1.0.0.tgz",
|
||||
"integrity": "sha512-6cJzSBU+J/RJCF063onnQf0cDUOHs9uZI1oroSGnHOph+CQTIJ5Pp2hK5kEQq1+7yE/EEWfulSNXAQ2jikPthA==",
|
||||
"dependencies": {
|
||||
"individual": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-json-parse": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/safe-json-parse/-/safe-json-parse-4.0.0.tgz",
|
||||
"integrity": "sha512-RjZPPHugjK0TOzFrLZ8inw44s9bKox99/0AZW9o/BEQVrJfhI+fIHMErnPyRa89/yRXUUr93q+tiN6zhoVV4wQ==",
|
||||
"dependencies": {
|
||||
"rust-result": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/store": {
|
||||
"version": "2.0.12",
|
||||
"resolved": "https://registry.npmmirror.com/store/-/store-2.0.12.tgz",
|
||||
"integrity": "sha512-eO9xlzDpXLiMr9W1nQ3Nfp9EzZieIQc10zPPMP5jsVV7bLOziSFFBP0XoDXACEIFtdI+rIz0NwWVA/QVJ8zJtw==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/store2": {
|
||||
"version": "2.14.3",
|
||||
"resolved": "https://registry.npmmirror.com/store2/-/store2-2.14.3.tgz",
|
||||
"integrity": "sha512-4QcZ+yx7nzEFiV4BMLnr/pRa5HYzNITX2ri0Zh6sT9EyQHbBHacC6YigllUPU9X3D0f/22QCgfokpKs52YRrUg=="
|
||||
},
|
||||
"node_modules/strict-uri-encode": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
|
||||
"integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tcplayer.js": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/tcplayer.js/-/tcplayer.js-5.1.0.tgz",
|
||||
"integrity": "sha512-CsAp1hJfbDjpWdnZJlkuvM9ncs/hhqVIeW5zbO2eyVzT64SQ4gaQs/bYp7jV6BZwl/4h/JdUUU/ymlE+5gCsQA==",
|
||||
"dependencies": {
|
||||
"babel-runtime": "^6.9.2",
|
||||
"blueimp-md5": "^2.10.0",
|
||||
"global": "4.3.2",
|
||||
"jsencrypt": "^3.2.0",
|
||||
"md5": "^2.3.0",
|
||||
"query-string": "^5.0.1",
|
||||
"safe-json-parse": "4.0.0",
|
||||
"store": "^2.0.12",
|
||||
"store2": "^2.7.1",
|
||||
"tsml": "1.0.1",
|
||||
"videojs-font": "2.1.0",
|
||||
"videojs-ie8": "1.1.2",
|
||||
"videojs-vtt.js": "0.12.4",
|
||||
"xhr": "2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tsml": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/tsml/-/tsml-1.0.1.tgz",
|
||||
"integrity": "sha512-3KmepnH9SUsoOVtg013CRrL7c+AK7ECaquAsJdvu4288EDJuraqBlP4PDXT/rLEJ9YDn4jqLAzRJsnFPx+V6lg==",
|
||||
"deprecated": "no longer maintained"
|
||||
},
|
||||
"node_modules/videojs-font": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/videojs-font/-/videojs-font-2.1.0.tgz",
|
||||
"integrity": "sha512-zFqWpLrXf1q8NtYx5qtZhMC6SLUFScDmR6j+UGPogobxR21lvXShhnzcNNMdOxJUuFLiToJ/BPpFUQwX4xhpvA=="
|
||||
},
|
||||
"node_modules/videojs-ie8": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/videojs-ie8/-/videojs-ie8-1.1.2.tgz",
|
||||
"integrity": "sha512-0Zb2T4MLkpfZbeGMK/Z93b8Lrepr+rLFoHgQV1CoDeFqXvH7b+Vsd/VHoILGxQrgCSHFQ7mAODR6oyMjuiD4/g==",
|
||||
"dependencies": {
|
||||
"es5-shim": "^4.5.1"
|
||||
}
|
||||
},
|
||||
"node_modules/videojs-vtt.js": {
|
||||
"version": "0.12.4",
|
||||
"resolved": "https://registry.npmmirror.com/videojs-vtt.js/-/videojs-vtt.js-0.12.4.tgz",
|
||||
"integrity": "sha512-JQ5eozH5SLOL5xI8ALb1aWf9HjcewQmOytf1gPIsFBTQlSgtSdJ8E8x0GO0ZEXVtFCaPDFiYWAhrjuTI125tBQ==",
|
||||
"dependencies": {
|
||||
"global": "^4.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/xhr": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/xhr/-/xhr-2.4.0.tgz",
|
||||
"integrity": "sha512-TUbBsdAuJbX8olk9hsDwGK8P1ri1XlV+PdEWkYw+HQQbpkiBR8PLgD1F3kQDPBs9l4Px34hP9rCYAZOCCAENbw==",
|
||||
"dependencies": {
|
||||
"global": "~4.3.0",
|
||||
"is-function": "^1.0.1",
|
||||
"parse-headers": "^2.0.0",
|
||||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz",
|
||||
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
||||
"engines": {
|
||||
"node": ">=0.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
node_modules/babel-runtime/.npmignore
generated
vendored
2
node_modules/babel-runtime/.npmignore
generated
vendored
@@ -1,2 +0,0 @@
|
||||
scripts
|
||||
node_modules
|
||||
2
node_modules/babel-runtime/README.md
generated
vendored
2
node_modules/babel-runtime/README.md
generated
vendored
@@ -1,2 +0,0 @@
|
||||
# babel-runtime
|
||||
|
||||
4
node_modules/babel-runtime/core-js.js
generated
vendored
4
node_modules/babel-runtime/core-js.js
generated
vendored
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
"default": require("core-js/library"),
|
||||
__esModule: true
|
||||
};
|
||||
1
node_modules/babel-runtime/core-js/array/concat.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/concat.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/concat"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/copy-within.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/copy-within.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/copy-within"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/entries.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/entries.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/entries"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/every.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/every.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/every"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/fill.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/fill.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/fill"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/filter.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/filter.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/filter"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/find-index.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/find-index.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/find-index"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/find.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/find.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/find"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/for-each.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/for-each.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/for-each"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/from.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/from.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/from"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/includes.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/includes.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/includes"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/index-of.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/index-of.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/index-of"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/join.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/join.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/join"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/keys.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/keys.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/keys"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/last-index-of.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/last-index-of.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/last-index-of"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/map.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/map.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/map"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/of.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/of.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/of"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/pop.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/pop.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/pop"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/push.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/push.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/push"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/reduce-right.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/reduce-right.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/reduce-right"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/reduce.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/reduce.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/reduce"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/reverse.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/reverse.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/reverse"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/shift.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/shift.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/shift"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/slice.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/slice.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/slice"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/some.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/some.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/some"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/sort.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/sort.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/sort"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/splice.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/splice.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/splice"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/unshift.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/unshift.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/unshift"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/array/values.js
generated
vendored
1
node_modules/babel-runtime/core-js/array/values.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/values"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/asap.js
generated
vendored
1
node_modules/babel-runtime/core-js/asap.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/asap"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/clear-immediate.js
generated
vendored
1
node_modules/babel-runtime/core-js/clear-immediate.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/clear-immediate"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/error/is-error.js
generated
vendored
1
node_modules/babel-runtime/core-js/error/is-error.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/error/is-error"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/get-iterator.js
generated
vendored
1
node_modules/babel-runtime/core-js/get-iterator.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/get-iterator"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/is-iterable.js
generated
vendored
1
node_modules/babel-runtime/core-js/is-iterable.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/is-iterable"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/json/stringify.js
generated
vendored
1
node_modules/babel-runtime/core-js/json/stringify.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/json/stringify"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/map.js
generated
vendored
1
node_modules/babel-runtime/core-js/map.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/map"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/acosh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/acosh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/acosh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/asinh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/asinh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/asinh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/atanh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/atanh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/atanh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/cbrt.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/cbrt.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/cbrt"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/clz32.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/clz32.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/clz32"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/cosh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/cosh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/cosh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/expm1.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/expm1.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/expm1"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/fround.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/fround.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/fround"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/hypot.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/hypot.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/hypot"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/iaddh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/iaddh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/iaddh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/imul.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/imul.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/imul"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/imulh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/imulh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/imulh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/isubh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/isubh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/isubh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/log10.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/log10.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/log10"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/log1p.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/log1p.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/log1p"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/log2.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/log2.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/log2"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/sign.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/sign.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/sign"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/sinh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/sinh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/sinh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/tanh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/tanh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/tanh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/trunc.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/trunc.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/trunc"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/math/umulh.js
generated
vendored
1
node_modules/babel-runtime/core-js/math/umulh.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/math/umulh"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/epsilon.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/epsilon.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/epsilon"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/is-finite.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/is-finite.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/is-finite"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/is-integer.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/is-integer.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/is-integer"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/is-nan.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/is-nan.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/is-nan"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/is-safe-integer.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/is-safe-integer.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/is-safe-integer"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/max-safe-integer.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/max-safe-integer.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/max-safe-integer"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/min-safe-integer.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/min-safe-integer.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/min-safe-integer"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/parse-float.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/parse-float.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/parse-float"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/number/parse-int.js
generated
vendored
1
node_modules/babel-runtime/core-js/number/parse-int.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/number/parse-int"), __esModule: true };
|
||||
1
node_modules/babel-runtime/core-js/object/assign.js
generated
vendored
1
node_modules/babel-runtime/core-js/object/assign.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = { "default": require("core-js/library/fn/object/assign"), __esModule: true };
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user