|
@@ -1,10 +1,20 @@
|
|
|
import {
|
|
|
- createStoreBindings
|
|
|
+ storeBindingsBehavior
|
|
|
} from 'mobx-miniprogram-bindings'
|
|
|
import {
|
|
|
store
|
|
|
} from '~/store/index'
|
|
|
Component({
|
|
|
+ behaviors: [storeBindingsBehavior],
|
|
|
+ storeBindings: {
|
|
|
+ store,
|
|
|
+ fields: {
|
|
|
+ readDetail: 'readDetail'
|
|
|
+ },
|
|
|
+ actions: {
|
|
|
+ setReadDetail: 'setReadDetail'
|
|
|
+ }
|
|
|
+ },
|
|
|
/**
|
|
|
* 组件的属性列表
|
|
|
*/
|
|
@@ -21,7 +31,6 @@ Component({
|
|
|
// 是否上传过
|
|
|
uploadState: false,
|
|
|
percent: 0,
|
|
|
- audioPath: ''
|
|
|
},
|
|
|
/**
|
|
|
* 组件的方法列表
|
|
@@ -43,11 +52,14 @@ Component({
|
|
|
uid: wx.getStorageSync('uid')
|
|
|
},
|
|
|
success: (res) => {
|
|
|
- const formateRes = JSON.parse(res.data);
|
|
|
- let audioPath = formateRes.data;
|
|
|
+ // const formateRes = JSON.parse(res.data);
|
|
|
+ // let audioPath = formateRes.data;
|
|
|
+ // this.setReadDetail({
|
|
|
+ // audioPath,
|
|
|
+ // ...this.data.readDetail
|
|
|
+ // })
|
|
|
this.setData({
|
|
|
uploadSuccess: true,
|
|
|
- audioPath
|
|
|
})
|
|
|
},
|
|
|
complete: () => {
|