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
01c69967
Commit
01c69967
authored
Apr 09, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
音频
parent
6fa2eb07
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
22 deletions
+66
-22
components/form.vue
+19
-14
components/record/record.vue
+8
-2
pages/my/index.vue
+39
-6
No files found.
components/form.vue
View file @
01c69967
...
...
@@ -65,19 +65,19 @@
<view
class=
"form-item-name"
>
上传视频
</view>
</view>
<view
class=
""
>
<comUpload
v-model=
"formInfo.videoList"
@
getVal=
"getVideoList"
ref=
"videoRef"
:acceptType=
"acceptType"
:multiple=
"isMultiple"
></comUpload>
<comUpload
v-model=
"formInfo.videoList"
@
getVal=
"getVideoList"
ref=
"videoRef"
:
acceptType=
"acceptType"
:
multiple=
"isMultiple"
></comUpload>
</view>
</view>
<view>
<view
class=
"d-flex j-sb a-center form-item-height-only"
>
<view
class=
"form-item-name"
>
语音描述
</view>
</view>
<
!--
<view
class=
"paddding-x-three margin-y-two"
>
<free-audio
startPic=
'../../static/play.png'
endPic=
'../../static/stop.png'
audioId=
'audio1
'
:url=
'path
'
@
delete=
"handleDelete"
></free-audio>
</view>
--
>
<view
class=
"paddding-x-three d-flex j-center "
@
click=
"showPopup = true"
>
<
view
v-if=
"formInfo.voiceList"
class=
"paddding-x-three margin-y-two"
>
<free-audio
startPic=
'../../static/play.png'
endPic=
'../../static/stop.png
'
audioId=
'audio1'
:url=
'formInfo.voiceList[0].url
'
@
delete=
"handleDelete"
></free-audio>
</view
>
<view
v-else
class=
"paddding-x-three d-flex j-center "
@
click=
"showPopup = true"
>
<view
class=
"voice-box d-flex a-center j-center"
>
<u-icon
name=
"mic"
color=
"#2979ff"
size=
"32"
></u-icon>
<view>
添加语音描述
</view>
...
...
@@ -210,7 +210,7 @@
// 获取上传视频的值
getVideoList
(
data
)
{
let
that
=
this
console
.
log
(
data
,
'有的哈桑'
)
console
.
log
(
data
,
'有的哈桑'
)
let
videoList
=
[]
videoList
.
push
({
url
:
data
.
url
,
...
...
@@ -221,10 +221,14 @@
// 上传音频事件
getVoiceList
(
data
)
{
// this.formInfo.videoList.push({
// url: data.data.url,
// fileType: 'voice'
// })
let
that
=
this
console
.
log
(
data
,
'有的哈桑'
)
let
voiceList
=
[]
voiceList
.
push
({
url
:
data
.
url
,
fileType
:
'video'
})
that
.
formInfo
.
voiceList
=
voiceList
},
//确认修改和重新发布按钮
handleUpdateForm
()
{
...
...
@@ -259,9 +263,10 @@
let
that
=
this
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
if
(
res
)
{
if
(
that
.
formInfo
.
pictureList
.
length
||
that
.
formInfo
.
videoList
.
length
||
that
.
formInfo
.
voiceList
.
length
){
if
(
that
.
formInfo
.
pictureList
.
length
||
that
.
formInfo
.
videoList
.
length
||
that
.
formInfo
.
voiceList
.
length
)
{
that
.
handleAdd
()
}
else
{
}
else
{
uni
.
$u
.
toast
(
'图片、视频、音频选其一必填'
)
}
}
...
...
components/record/record.vue
View file @
01c69967
...
...
@@ -73,9 +73,15 @@
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'dsan'
)
that
.
$emit
(
'getVal'
,
JSON
.
parse
(
res
.
data
))
const
{
data
}
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
data
,
'大街上可能'
)
this
.
$emit
(
'getVal'
,
data
);
setTimeout
(()
=>
{
resolve
(
res
.
data
.
data
)
resolve
(
data
.
url
)
// resolve(res.data.data)
},
1000
)
},
fail
(
err
)
{
...
...
pages/my/index.vue
View file @
01c69967
...
...
@@ -7,7 +7,7 @@
<button
class=
"content-in-info-l"
type=
"balanced"
open-type=
"chooseAvatar"
@
chooseavatar=
"onChooseavatar"
>
<image
src=
"@/static/icon/my03.png"
mode=
""
></image>
</button>
<view
class=
"content-in-info-r"
>
<view
v-if=
"token"
class=
"content-in-info-r"
>
<view
class=
"content-in-info-r-t baiyin-flex"
>
<text
v-if=
"nameDisabled"
>
{{
nickname
}}
</text>
<input
v-else
confirm-type=
"确定"
@
confirm=
"inputNameConfirm"
maxlength=
"15"
type=
"text"
:value=
"nickname"
/>
...
...
@@ -15,6 +15,9 @@
</view>
<view
class=
"content-in-info-r-b"
v-if=
"mobile"
>
手机号:
{{
mobile
}}
</view>
</view>
<view
class=
"content-in-info-r-b"
v-else
>
未登录
</view>
</view>
<view
class=
"content-in-item baiyin-flex baiyin-flex-c-sb baiyin-flex-c-b"
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"index != 0 ? clickJumpNPage(item) : null"
>
<!-- 联系客服生成 -->
...
...
@@ -27,7 +30,7 @@
</view>
<view
class=
"content-in-btn"
@
click=
"handleLogin"
>
<u-button
text=
"退出登录
"
:text=
"token ? '退出登录' : '登录'
"
color=
"#EA654E"
:customStyle=
"
{
width: '560rpx',
...
...
@@ -120,19 +123,28 @@ export default {
title
:
'我的优惠券'
,
url
:
'/my/coupon/index?type=coupon'
}
]
],
token
:
''
};
},
onLoad
()
{
this
.
nickname
=
this
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
let
that
=
this
if
(
that
.
$store
.
state
.
login
.
userInfo
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
){
that
.
nickname
=
that
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
}
let
token
=
uni
.
getStorageSync
(
'token'
)
console
.
log
(
'token'
,
token
)
if
(
token
){
that
.
token
=
token
}
let
mobile
=
uni
.
getStorageSync
(
'mobile'
)
th
is
.
mobile
=
mobile
th
at
.
mobile
=
mobile
},
methods
:
{
...
mapMutations
([
'upDateUserInfoMount'
]),
onChooseavatar
(
e
)
{
console
.
log
(
e
,
'1211'
);
return
;
//
return;
let
self
=
this
;
const
{
avatarUrl
}
=
e
.
detail
;
this
.
fdsa
=
avatarUrl
;
...
...
@@ -156,6 +168,9 @@ export default {
// self.upDateUserInfoMount();
}
});
},
fail
:
err
=>
{
console
.
log
(
err
,
'啊hi吧I'
)
}
});
},
...
...
@@ -175,10 +190,28 @@ export default {
}
},
handleLogin
(){
if
(
this
.
token
){
uni
.
showModal
({
content
:
'是否要退出登录'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
uni
.
showToast
({
title
:
'退出成功!'
,
icon
:
'none'
})
//执行退出
uni
.
clearStorageSync
()
this
.
token
=
uni
.
getStorageSync
(
'token'
)
}
}
})
}
else
{
this
.
$uniGo
.
navigateTo
({
url
:
'/my/login/login'
})
}
}
}
};
</
script
>
...
...
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