diff --git a/common/config.js b/common/config.js index 39243b12518b8dc87043fb596f688fe5d9600d18..6e74d19b0c8eec2bfb127b9a7e085967a0bf5c09 100644 --- a/common/config.js +++ b/common/config.js @@ -2,17 +2,17 @@ export default { // 云存储服务商 cloudFile:{ // 云存储服务商,支持:aliyun、tencent、qiniu - provider: 'qiniu', + provider: 'aliyun', }, uniPush: { // 消息渠道设置,避免被限量推送、静默推送(静音且需下拉系统通知栏才可见通知内容)详情文档:https://doc.dcloud.net.cn/uniCloud/uni-cloud-push/api.html#channel channel:{ // 渠道id - id: "114240", + id: "", // 消息渠道描述,会显示在手机系统关于当前应用的通知设置中 - desc: "客服消息" + desc: "" } }, // web端绑定的域名,用于生成二维码等 - domain: 'https://im.dcloud.net.cn', + domain: 'http://localhost:8080/', } \ No newline at end of file diff --git a/components/uni-im-msg/types/video.vue b/components/uni-im-msg/types/video.vue index c339c0d4e5e83c828d9f1045f4fea8a9893fdede..6f5f075e19d2b473fe84018b3ee67f18a87b2854 100644 --- a/components/uni-im-msg/types/video.vue +++ b/components/uni-im-msg/types/video.vue @@ -58,21 +58,16 @@ this.videoPoster = '/uni_modules/uni-im/static/msg/video-uploading.gif' // #endif }else{ - // 文件存储的服务商 - const {provider} = config.cloudFile - switch (provider){ - case 'aliyun': - this.videoPoster = this.videoUrl + '?x-oss-process=video/snapshot,t_1000,f_jpg,w_200,m_fast,ar_auto' - break; - case 'tencent': - this.videoPoster = this.videoUrl + '?imageView2/0/w/200' - break; - case 'qiniu': - this.videoPoster = this.videoUrl + '?vframe/jpg/offset/1/w/200' - break; - default: - break; + // 如果链接带?号则加&否则加? + this.videoPoster = this.videoUrl + (this.videoUrl.indexOf('?') > -1 ? '&' : '?') + // 根据文件存储的服务商,传不同的参数获取视频封面 + const paramObj = { + aliyun: 'x-oss-process=video/snapshot,t_0,f_jpg,w_200,m_fast,ar_auto', + tencent: 'imageView2/0/w/200', + qiniu: 'vframe/jpg/offset/0/w/200' } + this.videoPoster += paramObj[config.cloudFile.provider] + console.log('this.videoPoster',this.videoPoster); } }, deep: true,