From 5371349eaa72427fa1e190174be1c024422e8686 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 17 Jun 2022 16:24:32 +0800 Subject: [PATCH 1/8] bug --- src/apps/AppBroadcast/LiveBroadcast.vue | 14 +++----------- src/common/axios.js | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/apps/AppBroadcast/LiveBroadcast.vue b/src/apps/AppBroadcast/LiveBroadcast.vue index fbd81e01..c6120ebf 100644 --- a/src/apps/AppBroadcast/LiveBroadcast.vue +++ b/src/apps/AppBroadcast/LiveBroadcast.vue @@ -174,7 +174,7 @@ }, record () { - this.duration = 0 + this.time = 60 this.recorder = Recorder({ type: 'mp3', sampleRate: 16000, @@ -201,16 +201,6 @@ }, 1000) }, - blobToDataURI(blob) { - return new Promise((resolve) => { - var reader = new FileReader() - reader.readAsDataURL(blob) - reader.onload = function (e) { - resolve(e.target.result) - } - }) - }, - play (url, index) { if (this.currIndex === index) { this.innerAudioContext.destroy() @@ -275,11 +265,13 @@ this.isShow = false }).catch(() => { this.isShow = false + uni.hideLoading() }) } else { this.isShow = false } }).catch(() => { + uni.hideLoading() this.isShow = false }) diff --git a/src/common/axios.js b/src/common/axios.js index 78b032fa..40ecdda7 100644 --- a/src/common/axios.js +++ b/src/common/axios.js @@ -23,8 +23,8 @@ instance.interceptors.request.use(config => { }) instance.interceptors.response.use(res => { + uni.hideLoading() if (res.data) { - uni.hideLoading() if (res.data.access_token) { return res.data } From 6d613abef2a87006dd8b6502572514146c69286d Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 17 Jun 2022 17:22:09 +0800 Subject: [PATCH 2/8] bug --- src/saas/AppCountryAlbum/PhotoRank.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/saas/AppCountryAlbum/PhotoRank.vue b/src/saas/AppCountryAlbum/PhotoRank.vue index 95ff8281..34403751 100644 --- a/src/saas/AppCountryAlbum/PhotoRank.vue +++ b/src/saas/AppCountryAlbum/PhotoRank.vue @@ -43,7 +43,7 @@ methods: { getList (date) { - this.$http.post(`/api/appattendancerecord/userphotosort?queryTime=${date}`).then(res => { + this.$http.post(`/api/appattendancerecord/alluserphotosort?queryTime=${date}`).then(res => { if (res.code === 0) { this.list = Object.keys(res.data).map(v => { return { From f5f15af45f76fd0980cfd5740aebd8dc7f9f26ce Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 17 Jun 2022 17:56:36 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/saas/AppCountryAlbum/Watermark.vue | 4 ++-- .../AppCountryAlbum/components/report/MeetingMminutes.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/saas/AppCountryAlbum/Watermark.vue b/src/saas/AppCountryAlbum/Watermark.vue index 4d2b5314..4ce102b7 100644 --- a/src/saas/AppCountryAlbum/Watermark.vue +++ b/src/saas/AppCountryAlbum/Watermark.vue @@ -12,7 +12,7 @@
@@ -141,7 +141,7 @@ data () { return { img: '', - currIndex: -1, + currIndex: 0, isHide: true, height: '100%', waterSrc: '', diff --git a/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue b/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue index 1450fd5e..db142b56 100644 --- a/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue +++ b/src/saas/AppCountryAlbum/components/report/MeetingMminutes.vue @@ -102,7 +102,7 @@ if (v.length) { const title = v.filter(v => v.type === '17')[0] const hoster = v.filter(v => v.type === '26')[0] - const date = v.filter(v => v.type === '0')[0] + const date = v.filter(v => v.type === '1')[0] const address = v.filter(v => v.type === '29')[0] const remark = v.filter(v => v.type === '31')[0] const theme = v.filter(v => v.type === '30')[0] From 937bcadde77c44b4679fec0035ceaca38cebc646 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 17 Jun 2022 18:29:52 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppBroadcast/LiveBroadcast.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/apps/AppBroadcast/LiveBroadcast.vue b/src/apps/AppBroadcast/LiveBroadcast.vue index c6120ebf..f66a6842 100644 --- a/src/apps/AppBroadcast/LiveBroadcast.vue +++ b/src/apps/AppBroadcast/LiveBroadcast.vue @@ -157,6 +157,7 @@ }, onLongtap () { + this.time = 60 if (!this.equipmentList.length) { return this.$u.toast('请选择播发设备') } @@ -174,7 +175,6 @@ }, record () { - this.time = 60 this.recorder = Recorder({ type: 'mp3', sampleRate: 16000, @@ -191,11 +191,13 @@ }, timing () { - this.time = this.time - 1 - if (this.time === 0) { this.stop() + + return false } + this.time = this.time - 1 + this.timingTimeout = setTimeout(() => { this.timing() }, 1000) @@ -275,7 +277,6 @@ this.isShow = false }) - this.time = 60 console.log(blob, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms') }, msg => { console.log('录音失败:' + msg) From e3e0600bf0568a3f6d9a0662f6273c8c09d01fca Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 21 Jun 2022 17:03:05 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppBroadcast/LiveBroadcast.vue | 35 ++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/apps/AppBroadcast/LiveBroadcast.vue b/src/apps/AppBroadcast/LiveBroadcast.vue index f66a6842..aeb83d7d 100644 --- a/src/apps/AppBroadcast/LiveBroadcast.vue +++ b/src/apps/AppBroadcast/LiveBroadcast.vue @@ -129,6 +129,7 @@ destroyed () { document.body.removeEventListener('touchmove', this.bindEvent) + this.recorder.close() }, onLoad () { @@ -149,6 +150,19 @@ uni.$on('chooseEquipment', e => { this.equipmentList = e.equipmentList }) + this.recorder = Recorder({ + type: 'mp3', + sampleRate: 16000, + bitRate: 16, + onProcess(buffers, powerLevel, bufferDuration, bufferSampleRate, newBufferIdx, asyncEnd) { + //可利用extensions/waveview.js扩展实时绘制波形 + } + }) + this.recorder.open((e) => { + console.log(e) + }, e => { + console.log(e) + }) }, methods: { @@ -158,6 +172,7 @@ onLongtap () { this.time = 60 + if (!this.equipmentList.length) { return this.$u.toast('请选择播发设备') } @@ -175,19 +190,8 @@ }, record () { - this.recorder = Recorder({ - type: 'mp3', - sampleRate: 16000, - bitRate: 16, - onProcess(buffers, powerLevel, bufferDuration, bufferSampleRate, newBufferIdx, asyncEnd) { - //可利用extensions/waveview.js扩展实时绘制波形 - } - }) - - this.recorder.open(() => { - this.recorder.start() - this.timing() - }) + this.recorder.start() + this.timing() }, timing () { @@ -229,9 +233,6 @@ stop (isCancel) { clearTimeout(this.timingTimeout) this.recorder.stop((blob, duration) => { - this.recorder.close() - this.recorder = null - if (isCancel) { this.time = 60 return false @@ -280,9 +281,7 @@ console.log(blob, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms') }, msg => { console.log('录音失败:' + msg) - this.recorder.close() this.isShow = false - this.recorder = null }) }, From 52461c65837951969736c3dfe1c8bafb508b5e5e Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 21 Jun 2022 17:18:22 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppBroadcast/selectEquipment.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apps/AppBroadcast/selectEquipment.vue b/src/apps/AppBroadcast/selectEquipment.vue index 756c97bf..effa2e15 100644 --- a/src/apps/AppBroadcast/selectEquipment.vue +++ b/src/apps/AppBroadcast/selectEquipment.vue @@ -36,6 +36,8 @@ import { mapState } from 'vuex' export default { name: "selectEquipment", + + appName: '选择设备', data() { return { areaId: '', From 982d84777db156165fd1a3c015e63a475e99bad8 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 22 Jun 2022 09:59:19 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BC=81=E5=BE=AE=E6=A0=87=E5=87=86?= =?UTF-8?q?=E7=89=88=E8=B0=83=E6=95=B4oauth2=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/modules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/modules.js b/src/common/modules.js index 723034fa..42db5edd 100644 --- a/src/common/modules.js +++ b/src/common/modules.js @@ -55,7 +55,7 @@ export const config = { } }, getCode({state, dispatch}, tryAgentSign = false) { - let {corpid: corpId, suiteId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_base" + let {corpid: corpId, suiteId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_privateinfo" if (/\/AppForm\//.test(location.search)) { scope = "snsapi_userinfo" } else if (suiteId) { From 64f1e85bd997563156fb83fc9709bbb9ea256aa5 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 22 Jun 2022 10:16:04 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BC=81=E5=BE=AE=E6=A0=87=E5=87=86?= =?UTF-8?q?=E7=89=88=E8=B0=83=E6=95=B4oauth2=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/modules.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/modules.js b/src/common/modules.js index 42db5edd..158672e2 100644 --- a/src/common/modules.js +++ b/src/common/modules.js @@ -55,7 +55,7 @@ export const config = { } }, getCode({state, dispatch}, tryAgentSign = false) { - let {corpid: corpId, suiteId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_privateinfo" + let {corpid: corpId, suiteId, agentid: agentId} = state, url = location.href, REDIRECT_URI = encodeURIComponent(url), scope = "snsapi_privateinfo" if (/\/AppForm\//.test(location.search)) { scope = "snsapi_userinfo" } else if (suiteId) { @@ -64,10 +64,11 @@ export const config = { } return new Promise((resolve, reject) => { if (corpId && scope) { - let oauthURL = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE#wechat_redirect' + let oauthURL = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&agentid=AGENTID#wechat_redirect' .replace(/APPID/g, corpId) .replace(/REDIRECT_URI/g, REDIRECT_URI) .replace(/SCOPE/g, scope) + .replace(/AGENTID/g, agentId) location.replace(oauthURL) } else if (!tryAgentSign) { dispatch("agentSign", {corpId, suiteId}).then(() => dispatch("getCode", true)).then(() => resolve())