Commit 900666d7 by liimin

```

refactor(home): 移除未使用的 merge 混入和 userInfo 相关代码

移除了 HomeFrame 组件中不再使用的 merge 混入以及与 userInfo 相关的冗余代码逻辑,
优化组件结构。同时更新了 equity 页面中的初始化调用逻辑,并恢复了录音权限检查及
相关 loading 状态控制代码,确保功能完整性。
```
1 parent 47d844c0
......@@ -89,11 +89,11 @@ import recorder from '@/mixin/record/recorder'
import uploader from '@/mixin/record/uploader.js'
import versionCheck from '@/mixin/versionCheck.js'
import LeftSide from './components/LeftSide.vue'
import merge from '@/mixin/record/merge.js'
// import merge from '@/mixin/record/merge.js'
import Material from '@/components/MaterialIndex.vue'
import { interceptionMixin } from '@/mixin/index'
export default {
mixins: [recorder, uploader, timeout, versionCheck, merge, interceptionMixin],
mixins: [recorder, uploader, timeout, versionCheck, interceptionMixin],
components: { SceneMarket, LeftSide, Material },
props: {
id: [String, Number],
......@@ -123,7 +123,7 @@ export default {
footerBox: true,
showHome: true,
pointComponentName: 'Point',
userInfo: {},
// userInfo: {},
tabIndex: 0,
showBeisen: false,
tipsObject: {},
......@@ -134,8 +134,8 @@ export default {
}
},
mounted() {
const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo
// const userInfo = uni.$storage.get('userInfo') || {}
// this.userInfo = userInfo
this.currentType = uni.$storage.get('typeItem')
// if (this.checkRecordAudio) permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限
},
......
......@@ -36,6 +36,7 @@
import detail from './detail/detail'
import { mapMutations } from 'vuex'
import HomeFrame from '@/components/HomeFrame/index.vue'
import { set } from 'lodash';
// import storge from "@/mixin/storge";
export default {
// mixins: [storge],
......@@ -83,16 +84,20 @@ export default {
// this.requested = true
// this.$refs.home.updateApp(true)
this.getSoure(mockdata?.typeCode)
setTimeout(() => {
this.start()
}, 1e3)
},
async onShow () {
// this.init()
this.init()
},
methods: {
...mapMutations('audio', ['setReceptionStatus']),
// init () {
// // this.findPayInfo()
// if (this.requested && !this.id) this.$refs.home.updateApp()
// },
init () {
// this.findPayInfo()
if (this.requested && !this.id) this.$refs.home.updateApp()
},
// 查询素材
async getSoure (typeCode) {
const first_res = await uni.$api.commonApi.getPadFolderList({
......@@ -156,22 +161,21 @@ export default {
title: '该场景尚未配置素材,请联系总部人员',
icon: 'none'
})
// const isPermision = await this.$refs.home.isPermission()
// if (this.recording || !isPermision) return
// uni.showLoading({
// mask: true
// })
// this.$refs.home.startAudio()
// this.clearHistory()
const isPermision = await this.$refs.home.isPermission()
if (this.recording || !isPermision) return
uni.showLoading({
mask: true
})
this.$refs.home.startAudio()
this.clearHistory()
this.id = +this.moduleList[0].id
console.log(this.id)
// this.id = 6
this.id = 6
this.type = 'edit'
this.recording = true
// setTimeout(() => {
// uni.hideLoading()
// }, 1e3)
setTimeout(() => {
uni.hideLoading()
}, 1e3)
},
toDetail (index) {
let item = this.moduleList[index]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!