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' ...@@ -89,11 +89,11 @@ import recorder from '@/mixin/record/recorder'
import uploader from '@/mixin/record/uploader.js' import uploader from '@/mixin/record/uploader.js'
import versionCheck from '@/mixin/versionCheck.js' import versionCheck from '@/mixin/versionCheck.js'
import LeftSide from './components/LeftSide.vue' 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 Material from '@/components/MaterialIndex.vue'
import { interceptionMixin } from '@/mixin/index' import { interceptionMixin } from '@/mixin/index'
export default { export default {
mixins: [recorder, uploader, timeout, versionCheck, merge, interceptionMixin], mixins: [recorder, uploader, timeout, versionCheck, interceptionMixin],
components: { SceneMarket, LeftSide, Material }, components: { SceneMarket, LeftSide, Material },
props: { props: {
id: [String, Number], id: [String, Number],
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
footerBox: true, footerBox: true,
showHome: true, showHome: true,
pointComponentName: 'Point', pointComponentName: 'Point',
userInfo: {}, // userInfo: {},
tabIndex: 0, tabIndex: 0,
showBeisen: false, showBeisen: false,
tipsObject: {}, tipsObject: {},
...@@ -134,8 +134,8 @@ export default { ...@@ -134,8 +134,8 @@ export default {
} }
}, },
mounted() { mounted() {
const userInfo = uni.$storage.get('userInfo') || {} // const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo // this.userInfo = userInfo
this.currentType = uni.$storage.get('typeItem') this.currentType = uni.$storage.get('typeItem')
// if (this.checkRecordAudio) permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限 // if (this.checkRecordAudio) permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限
}, },
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
import detail from './detail/detail' import detail from './detail/detail'
import { mapMutations } from 'vuex' import { mapMutations } from 'vuex'
import HomeFrame from '@/components/HomeFrame/index.vue' import HomeFrame from '@/components/HomeFrame/index.vue'
import { set } from 'lodash';
// import storge from "@/mixin/storge"; // import storge from "@/mixin/storge";
export default { export default {
// mixins: [storge], // mixins: [storge],
...@@ -83,16 +84,20 @@ export default { ...@@ -83,16 +84,20 @@ export default {
// this.requested = true // this.requested = true
// this.$refs.home.updateApp(true) // this.$refs.home.updateApp(true)
this.getSoure(mockdata?.typeCode) this.getSoure(mockdata?.typeCode)
setTimeout(() => {
this.start()
}, 1e3)
}, },
async onShow () { async onShow () {
// this.init() this.init()
}, },
methods: { methods: {
...mapMutations('audio', ['setReceptionStatus']), ...mapMutations('audio', ['setReceptionStatus']),
// init () { init () {
// // this.findPayInfo() // this.findPayInfo()
// if (this.requested && !this.id) this.$refs.home.updateApp() if (this.requested && !this.id) this.$refs.home.updateApp()
// }, },
// 查询素材 // 查询素材
async getSoure (typeCode) { async getSoure (typeCode) {
const first_res = await uni.$api.commonApi.getPadFolderList({ const first_res = await uni.$api.commonApi.getPadFolderList({
...@@ -156,22 +161,21 @@ export default { ...@@ -156,22 +161,21 @@ export default {
title: '该场景尚未配置素材,请联系总部人员', title: '该场景尚未配置素材,请联系总部人员',
icon: 'none' icon: 'none'
}) })
// const isPermision = await this.$refs.home.isPermission() const isPermision = await this.$refs.home.isPermission()
// if (this.recording || !isPermision) return if (this.recording || !isPermision) return
// uni.showLoading({ uni.showLoading({
// mask: true mask: true
// }) })
// this.$refs.home.startAudio() this.$refs.home.startAudio()
// this.clearHistory() this.clearHistory()
this.id = +this.moduleList[0].id this.id = +this.moduleList[0].id
console.log(this.id) this.id = 6
// this.id = 6
this.type = 'edit' this.type = 'edit'
this.recording = true this.recording = true
// setTimeout(() => { setTimeout(() => {
// uni.hideLoading() uni.hideLoading()
// }, 1e3) }, 1e3)
}, },
toDetail (index) { toDetail (index) {
let item = this.moduleList[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!