diff --git a/src/components/Audio/index.less b/src/components/Audio/index.less
index be8aec2..24b0ed5 100644
--- a/src/components/Audio/index.less
+++ b/src/components/Audio/index.less
@@ -16,3 +16,15 @@
font-size: 16px;
}
}
+.progress-bar {
+ background: #f6f6f6;
+ width: calc(100% - 10px);
+ margin: 0 10px;
+ height: 4px;
+ border-radius: 100px;
+ overflow: hidden;
+ .progress-bar-con {
+ background: rgb(62, 146, 255);
+ height: 100%;
+ }
+}
diff --git a/src/components/Audio/index.vue b/src/components/Audio/index.vue
index 82d2a63..1518331 100644
--- a/src/components/Audio/index.vue
+++ b/src/components/Audio/index.vue
@@ -2,7 +2,10 @@
-
+
+
{{ formatTime(voiceList.duration) }}
@@ -37,7 +40,7 @@ export default {
watch: {
audioSrc(val) {
console.log(val, 'valvalval')
- this.voiceList = this.val
+ this.voiceList = val
}
},
mounted() {
diff --git a/src/components/Recording/index.vue b/src/components/Recording/index.vue
index ea2436f..ab329f2 100644
--- a/src/components/Recording/index.vue
+++ b/src/components/Recording/index.vue
@@ -84,12 +84,15 @@ export default {
clearTimeout(this.timeOutEvent)
clearInterval(this.btnDurationTimer)
this.btnDuration = 1
- wx.stopRecord({
- fail: function (res) {},
- success: function (res) {
- // this.localId = res.localId
- }
- })
+ if (this.voiceList.localId) {
+ wx.stopRecord({
+ fail: function (res) {},
+ success: function (res) {
+ // this.localId = res.localId
+ }
+ })
+ }
+
// 手指按住500ms才算长按
this.timeOutEvent = 0
this.isRecording = true
@@ -118,6 +121,7 @@ export default {
if (timeOutEvent === 0) {
wx.stopRecord({
success: res => {
+ console.log(res, 'res')
this.onRecorded(res.localId)
}
})
@@ -126,6 +130,7 @@ export default {
},
// 录制结束逻辑处理
onRecorded(localId) {
+ console.log(localId, 'localId')
const { recordStartTime } = this
const endTime = new Date().getTime()
const arrItem = {
diff --git a/src/views/userInfo/index.vue b/src/views/userInfo/index.vue
index 245de03..5975305 100644
--- a/src/views/userInfo/index.vue
+++ b/src/views/userInfo/index.vue
@@ -337,12 +337,12 @@ export default {
getAllAgencyStreet({}).then(res => {
this.streetOptions = res
? res.map(item => {
- return {
- label: item.organizationName,
- value: item.id,
- customerId: item.customerId
- }
- })
+ return {
+ label: item.organizationName,
+ value: item.id,
+ customerId: item.customerId
+ }
+ })
: []
this.communityOptions = []
console.log(this.city)
@@ -365,11 +365,11 @@ export default {
}).then(res => {
this.communityOptions = res
? res.map(item => {
- return {
- label: item.organizationName,
- value: item.id
- }
- })
+ return {
+ label: item.organizationName,
+ value: item.id
+ }
+ })
: []
// this.quarterOptions = []
})
@@ -381,12 +381,12 @@ export default {
}).then(res => {
this.quarterOptions = res
? res.map(item => {
- return {
- label: item.label,
- value: item.value,
- gridId: item.pid
- }
- })
+ return {
+ label: item.label,
+ value: item.value,
+ gridId: item.pid
+ }
+ })
: []
// this.buildingOptions = []
})
@@ -398,11 +398,11 @@ export default {
}).then(res => {
this.buildingOptions = res
? res.map(item => {
- return {
- label: item.label,
- value: item.value
- }
- })
+ return {
+ label: item.label,
+ value: item.value
+ }
+ })
: []
// this.unitOptions = []
})
@@ -414,11 +414,11 @@ export default {
}).then(res => {
this.unitOptions = res
? res.map(item => {
- return {
- label: item.label,
- value: item.value
- }
- })
+ return {
+ label: item.label,
+ value: item.value
+ }
+ })
: []
// this.houseOptions = []
})
@@ -430,11 +430,11 @@ export default {
}).then(res => {
this.houseOptions = res
? res.map(item => {
- return {
- label: item.label,
- value: item.value
- }
- })
+ return {
+ label: item.label,
+ value: item.value
+ }
+ })
: []
})
}