Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xinrenli-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
xinrenli-app
Commits
282955e9
Commit
282955e9
authored
Apr 10, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
要写上传头像
parent
a40fee19
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
44 deletions
+91
-44
components/chengpeng-audio/free-audio.vue
+19
-7
components/form.vue
+38
-14
demand/index/index.vue
+2
-2
pages/my/index.vue
+32
-21
No files found.
components/chengpeng-audio/free-audio.vue
View file @
282955e9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<!-- 音频播放器组件 -->
<!-- 音频播放器组件 -->
<view
v-if=
'url'
class=
'flex justify-between a-center audio j-sb'
>
<view
v-if=
'url'
class=
'flex justify-between a-center audio j-sb'
>
<view
class=
"d-flex"
>
<view
class=
"d-flex"
>
<view
:class=
"status ? 'timeCheck' : ''"
class=
"font"
v-if=
"duration != 0"
>
{{
duration
.
toFixed
(
0
)
}}
</view>
<view
:class=
"status ? 'timeCheck' : ''"
class=
"font"
>
11
</view>
<view
class=
''
@
click=
'start(audioId)'
>
<view
class=
''
@
click=
'start(audioId)'
>
<image
:src=
'startPic'
class=
'icon'
v-show=
'!status'
></image>
<image
:src=
'startPic'
class=
'icon'
v-show=
'!status'
></image>
<image
:src=
'endPic'
class=
'icon'
v-show=
'status'
></image>
<image
:src=
'endPic'
class=
'icon'
v-show=
'status'
></image>
...
@@ -13,10 +13,13 @@
...
@@ -13,10 +13,13 @@
</view>
-->
</view>
-->
<!--
<view>
{{
getTime
(
Math
.
round
(
currentTime
))
}}
</view>
-->
<!--
<view>
{{
getTime
(
Math
.
round
(
currentTime
))
}}
</view>
-->
</view>
</view>
<view>
{{
getTime
(
Math
.
round
(
currentTime
))
}}
</view>
<view
class=
"d-flex"
v-if=
"isDel"
>
<view
@
click=
"handleIconDel"
>
<view>
{{
getTime
(
Math
.
round
(
currentTime
))
}}
</view>
<u-icon
name=
"close-circle-fill"
color=
"#D9001B"
size=
"32"
></u-icon>
<view
@
click=
"handleIconDel"
>
<u-icon
name=
"close-circle-fill"
color=
"#D9001B"
size=
"32"
></u-icon>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -36,10 +39,19 @@
...
@@ -36,10 +39,19 @@
type
:
String
,
type
:
String
,
default
:
'#0E7EFC'
default
:
'#0E7EFC'
},
},
startPic
:
String
,
startPic
:
{
endPic
:
String
,
type
:
String
,
default
:
'../../static/stopStatus.png'
},
endPic
:
{
type
:
String
,
default
:
'../../static/startStatus.png'
},
audioId
:
[
String
,
Number
],
audioId
:
[
String
,
Number
],
isDel
:
true
isDel
:{
type
:
Boolean
,
default
:
true
}
},
},
created
()
{
created
()
{
this
.
context
=
uni
.
createInnerAudioContext
();
this
.
context
=
uni
.
createInnerAudioContext
();
...
...
components/form.vue
View file @
282955e9
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<view
class=
"form-tips"
>
以下内容三选一必填
</view>
<view
class=
"form-tips"
>
以下内容三选一必填
</view>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
<comUpload
v-model=
"formInfo.pictureList"
@
getVal=
"getPhotoList"
@
delVal=
"delPhotoItem"
<comUpload
v-model=
"formInfo.pictureList"
@
getVal=
"getPhotoList"
@
delVal=
"delPhotoItem"
ref=
"photoRef"
></comUpload>
ref=
"photoRef"
></comUpload>
</view>
</view>
</view>
</view>
...
@@ -65,13 +65,22 @@
...
@@ -65,13 +65,22 @@
<view
class=
"form-item-name"
>
上传视频
</view>
<view
class=
"form-item-name"
>
上传视频
</view>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
<video
class=
"video-box"
v-if=
"formInfo.videoList.length"
id=
"myVideo"
<view
v-if=
"formInfo.videoList.length"
>
:src=
"formInfo.videoList[0].url"
<view
class=
"video-box"
>
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
<video
id=
"myVideo"
:src=
"formInfo.videoList[0].url"
:show-fullscreen-btn=
'false'
></video>
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
<comUpload
v-else
:afterWidth=
"350"
v-model=
"formInfo.videoList"
@
getVal=
"getVideoList"
ref=
"videoRef"
:show-fullscreen-btn=
'false'
></video>
:acceptType=
"acceptType"
:maxCount=
"1"
:multiple=
"isMultiple"
></comUpload>
</view>
<view
@
click=
"delVideoList"
>
<u-icon
name=
"close-circle-fill"
color=
"#D9001B"
size=
"32"
></u-icon>
</view>
</view>
<comUpload
v-else
:afterWidth=
"350"
@
getVal=
"getVideoList"
ref=
"videoRef"
:acceptType=
"acceptType"
:maxCount=
"1"
:multiple=
"isMultiple"
>
</comUpload>
</view>
</view>
</view>
</view>
<view>
<view>
...
@@ -79,8 +88,8 @@
...
@@ -79,8 +88,8 @@
<view
class=
"form-item-name"
>
语音描述
</view>
<view
class=
"form-item-name"
>
语音描述
</view>
</view>
</view>
<view
v-if=
"formInfo.voiceList.length"
class=
""
>
<view
v-if=
"formInfo.voiceList.length"
class=
""
>
<free-audio
startPic=
'../../static/play.png'
endPic=
'../../static/stop.png'
<free-audio
audioId=
'audio1'
:url=
'formInfo.voiceList[0].url'
@
delete=
"handleDelete"
>
audioId=
'audio1'
:url=
'formInfo.voiceList[0].url'
@
delete=
"handleDelete"
>
</free-audio>
</free-audio>
</view>
</view>
<view
v-else
class=
"paddding-x-three d-flex j-center "
@
click=
"showPopup = true"
>
<view
v-else
class=
"paddding-x-three d-flex j-center "
@
click=
"showPopup = true"
>
<view
class=
"voice-box d-flex a-center j-center"
>
<view
class=
"voice-box d-flex a-center j-center"
>
...
@@ -223,7 +232,12 @@
...
@@ -223,7 +232,12 @@
})
})
that
.
formInfo
.
videoList
=
videoList
that
.
formInfo
.
videoList
=
videoList
},
},
delVideoList
(){
console
.
log
(
'删除'
,
this
.
formInfo
.
videoList
)
this
.
formInfo
.
videoList
.
splice
(
0
,
1
)
console
.
log
(
'删除后'
,
this
.
formInfo
.
videoList
)
},
// 上传音频事件
// 上传音频事件
getVoiceList
(
data
)
{
getVoiceList
(
data
)
{
let
that
=
this
let
that
=
this
...
@@ -309,7 +323,7 @@
...
@@ -309,7 +323,7 @@
handleDelete
()
{
handleDelete
()
{
console
.
log
(
'删除'
)
console
.
log
(
'删除'
)
let
that
=
this
let
that
=
this
that
.
formInfo
.
voiceList
.
splice
(
0
,
1
)
that
.
formInfo
.
voiceList
.
splice
(
0
,
1
)
// const recorderManager = uni.getRecorderManager()
// const recorderManager = uni.getRecorderManager()
// console.log(recorderManager,'大数据可能')
// console.log(recorderManager,'大数据可能')
},
},
...
@@ -356,11 +370,21 @@
...
@@ -356,11 +370,21 @@
}
}
}
}
}
}
.video-box
{
width
:
373
rpx
;
.video-box
{
height
:
210
rpx
;
width
:
373
rpx
;
height
:
210
rpx
;
video{
width
:
100%
;
height
:
100%
}
}
}
.position-icon
{
}
@import
url("@/css/form.css")
;
@import
url("@/css/form.css")
;
//
::v-deep
.u-border
{
//
::v-deep
.u-border
{
...
...
demand/index/index.vue
View file @
282955e9
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
</view>
</view>
<!-- class="content-voice-audio" -->
<!-- class="content-voice-audio" -->
<view
class=
"margin-y-two"
>
<view
class=
"margin-y-two"
>
<free-audio
startPic=
'../../static/play.png'
endPic=
'../../static/stop.png'
<free-audio
audioId=
'audio1'
:url=
'detailData.voiceList[0].url'
></free-audio>
audioId=
'audio1'
:url=
'detailData.voiceList[0].url'
:isDel=
"false"
></free-audio>
</view>
</view>
</view>
</view>
<view
class=
"content-remarks"
>
<view
class=
"content-remarks"
>
...
...
pages/my/index.vue
View file @
282955e9
...
@@ -124,7 +124,11 @@ export default {
...
@@ -124,7 +124,11 @@ export default {
url
:
'/my/coupon/index?type=coupon'
url
:
'/my/coupon/index?type=coupon'
}
}
],
],
token
:
''
token
:
''
,
userParams
:{
nickname
:
''
,
headImgUrl
:
''
,
}
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -141,7 +145,6 @@ export default {
...
@@ -141,7 +145,6 @@ export default {
that
.
mobile
=
mobile
that
.
mobile
=
mobile
},
},
methods
:
{
methods
:
{
...
mapMutations
([
'upDateUserInfoMount'
]),
onChooseavatar
(
e
)
{
onChooseavatar
(
e
)
{
console
.
log
(
e
,
'1211'
);
console
.
log
(
e
,
'1211'
);
// return;
// return;
...
@@ -150,24 +153,23 @@ export default {
...
@@ -150,24 +153,23 @@ export default {
this
.
fdsa
=
avatarUrl
;
this
.
fdsa
=
avatarUrl
;
wx
.
getFileSystemManager
().
readFile
({
wx
.
getFileSystemManager
().
readFile
({
filePath
:
avatarUrl
,
//选择图片返回的相对路径
filePath
:
avatarUrl
,
//选择图片返回的相对路径
encoding
:
'base64'
,
//编码格式
//
encoding: 'base64', //编码格式
success
:
res
=>
{
success
:
res
=>
{
//成功的回调
//成功的回调
console
.
log
(
res
);
console
.
log
(
res
);
console
.
log
(
res
.
data
);
console
.
log
(
res
.
data
);
userUpdatePOST
({
// userUpdatePOST({
headImgUrl
:
res
.
data
// headImgUrl: res.data
}).
then
(
res
=>
{
// }).then(res => {
console
.
log
(
res
.
code
,
'pppppppppppp'
);
// console.log(res.code, 'pppppppppppp');
if
(
res
.
code
===
200
)
{
// if (res.code === 200) {
uni
.
showToast
({
// uni.showToast({
title
:
'修改成功'
,
// title: '修改成功',
icon
:
'none'
// icon: 'none'
});
// });
console
.
log
(
111111111111
);
// console.log(111111111111);
// self.upDateUserInfoMount();
// }
}
// });
});
},
},
fail
:
err
=>
{
fail
:
err
=>
{
console
.
log
(
err
,
'啊hi吧I'
)
console
.
log
(
err
,
'啊hi吧I'
)
...
@@ -175,12 +177,21 @@ export default {
...
@@ -175,12 +177,21 @@ export default {
});
});
},
},
inputNameConfirm
(
e
)
{
inputNameConfirm
(
e
)
{
console
.
log
(
'======inputNameConfirm:'
,
e
.
detail
.
value
);
console
.
log
(
'======inputNameConfirm:'
,
e
.
detail
.
value
);
this
.
updateUser
(
e
.
detail
.
value
)
let
that
=
this
that
.
$set
(
that
.
userParams
,
'nickname'
,
e
.
detail
.
value
)
this
.
updateUser
()
},
},
async
updateUser
(
value
){
async
updateUser
(){
const
back_data
=
await
updateUserMsg
({
nickname
:
value
})
const
back_data
=
await
updateUserMsg
(
this
.
userParams
)
console
.
log
(
back_data
)
console
.
log
(
back_data
)
const
{
code
}
=
back_data
if
(
code
===
200
){
uni
.
showToast
({
title
:
'修改成功!'
,
icon
:
'none'
})
}
},
},
clickJumpNPage
(
row
)
{
clickJumpNPage
(
row
)
{
if
(
row
.
url
)
{
if
(
row
.
url
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment