Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
14b78db9
Commit
14b78db9
authored
Apr 11, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Plain Diff
微官网首页
parents
cd9033c3
ceaeef90
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
218 additions
and
137 deletions
+218
-137
index.js
components/soundrecording/index.js
+12
-5
index.js
src/pages/clockeditor/index.js
+148
-103
index.wxml
src/pages/clockeditor/index.wxml
+13
-11
index.wxss
src/pages/clockeditor/index.wxss
+9
-0
userinfoupdate.js
src/pages/setting/userinfoupdate.js
+18
-17
wxApi.js
utilities/wxApi.js
+18
-1
No files found.
components/soundrecording/index.js
View file @
14b78db9
...
...
@@ -49,6 +49,10 @@ Component({
showAuthSettingDia
:
false
},
pageLifetimes
:
{
// show () {
// console.log(this.data.role, 'role')
// console.log(this.data.sid, 'role')
// },
hide
()
{
// 如果在录制中停止录制
if
(
this
.
data
.
audioStatus
.
play
==
'play'
)
{
...
...
@@ -57,6 +61,7 @@ Component({
}
},
created
()
{
},
attached
()
{
},
...
...
@@ -70,8 +75,8 @@ Component({
recorderManager
.
onStop
((
res
)
=>
{
const
that
=
this
;
const
{
tempFilePath
}
=
res
;
const
fileType
=
tempFilePath
.
substr
(
tempFilePath
.
lastIndexOf
(
'.'
)
+
1
);
if
(
!
this
.
data
.
audioStatus
.
upload
)
{
return
;
}
let
filename
=
''
;
...
...
@@ -79,21 +84,23 @@ Component({
let
mediaAccess
;
if
(
that
.
data
.
role
==
'2c'
)
{
mediaAccess
=
cMediaOssAccess
({
type
:
2
type
:
2
,
school_id
:
this
.
data
.
sid
,
ext
:
fileType
})
}
if
(
that
.
data
.
role
==
'2b'
)
{
mediaAccess
=
bMediaOssAccess
({
type
:
2
,
school_id
:
this
.
data
.
sid
school_id
:
this
.
data
.
sid
,
ext
:
fileType
})
}
mediaAccess
.
then
((
acc
)
=>
{
let
access
=
acc
.
data
;
filename
=
`
${
access
.
dir
}${
getRandomFilename
(
tempFilePath
)}
`
;
return
wxUploadFile
({
url
:
access
.
host
,
formData
:
{
key
:
filename
,
key
:
access
.
path
,
policy
:
access
.
policy
,
OSSAccessKeyId
:
access
.
accessid
,
signature
:
access
.
signature
,
...
...
src/pages/clockeditor/index.js
View file @
14b78db9
This diff is collapsed.
Click to expand it.
src/pages/clockeditor/index.wxml
View file @
14b78db9
...
...
@@ -177,17 +177,19 @@
<!-- 打卡出问题,去客服消息跳 H5 -->
<!-- <view class="red-text" wx:if="{{pagefrom!='morethemeindex'}}">一个作业只能打卡一次喔!</view> -->
<sound-recording
show="{{audioStatus.show}}"
bind:addVoice="addVoice"
bind:pushVoice="pushVoice"
bind:beforevoiceupload="beforevoiceupload"
bind:voiceuploadsuccess="voiceuploadsuccess"
bind:voiceuploadfail="voiceuploadfail"
role="{{recordRole}}"
>
</sound-recording>
<view class="" wx:if="{{sid != 0}}">
<sound-recording
show="{{audioStatus.show}}"
bind:addVoice="addVoice"
bind:pushVoice="pushVoice"
bind:beforevoiceupload="beforevoiceupload"
bind:voiceuploadsuccess="voiceuploadsuccess"
bind:voiceuploadfail="voiceuploadfail"
role="{{recordRole}}"
sid="{{sid}}"
>
</sound-recording>
</view>
<view class="getmobiledialog common-dialog" wx:if="{{getmobiledialogshow}}">
<view class="dialog-box">
<view class="warn-text-a">请授权微信手机号,方便加入课程微信群</view>
...
...
src/pages/clockeditor/index.wxss
View file @
14b78db9
...
...
@@ -297,6 +297,12 @@ page {
/* .clock-editor-box .clock-video-box .media-box-video-item{
width: 100%;
} */
.clock-editor-box .clock-video-box .videostatus {
font-size: 12px;
white-space: nowrap;
line-height: 44rpx;
overflow: hidden;
}
.clock-editor-box .clock-video-box .videostatus.fail {
background-color: #64d3be;
color: #fff;
...
...
@@ -306,6 +312,7 @@ page {
height: 40rpx;
bottom: 0;
z-index: 50;
font-size: 12px;
}
@keyframes progressani {
0% {
...
...
@@ -337,6 +344,7 @@ page {
width: 100%;
text-align: center;
color: #fff;
font-size: 12px;
}
.clock-editor-box
.clock-video-box
...
...
@@ -374,6 +382,7 @@ page {
transparent
);
-webkit-background-size: 40px 40px;
font-size: 24rpx;
background-size: 40px 40px;
float: left;
height: 100%;
...
...
src/pages/setting/userinfoupdate.js
View file @
14b78db9
...
...
@@ -147,23 +147,24 @@ Page({
ext
:
fileType
})
}).
then
((
data
)
=>
{
const
acc
=
data
.
data
;
// filename = `${access.dir}${getRandomFilename(tempFiles[0].path)}`;
filename
=
acc
.
path
;
console
.
log
(
filename
,
'filename '
);
return
wxUploadFile
({
url
:
acc
.
host
,
formData
:
{
key
:
filename
,
policy
:
acc
.
policy
,
OSSAccessKeyId
:
acc
.
accessid
,
signature
:
acc
.
signature
,
callback
:
acc
.
callback
,
success_action_status
:
'200'
},
filePath
:
tempFiles
[
0
].
path
,
name
:
'file'
,
})
if
(
data
.
code
==
200
)
{
const
acc
=
data
.
data
;
// filename = `${access.dir}${getRandomFilename(tempFiles[0].path)}`;
filename
=
acc
.
path
;
return
wxUploadFile
({
url
:
acc
.
host
,
formData
:
{
key
:
filename
,
policy
:
acc
.
policy
,
OSSAccessKeyId
:
acc
.
accessid
,
signature
:
acc
.
signature
,
callback
:
acc
.
callback
,
success_action_status
:
'200'
},
filePath
:
tempFiles
[
0
].
path
,
name
:
'file'
,
})
}
}).
then
((
res
)
=>
{
const
{
data
}
=
res
;
console
.
log
(
data
,
'data'
)
...
...
utilities/wxApi.js
View file @
14b78db9
...
...
@@ -156,6 +156,7 @@ function wxChooseImage (data) {
resolve
(
res
);
},
fail
(
err
)
{
console
.
log
(
'wxChooseVideo错误'
);
reject
(
err
);
}
})
...
...
@@ -199,6 +200,7 @@ function wxChooseVideo(data) {
resolve
(
res
);
},
fail
(
e
)
{
console
.
log
(
'wxChooseVideo错误'
);
reject
(
e
);
}
})
...
...
@@ -215,6 +217,7 @@ function wxChooseMessageFile(data) {
resolve
(
res
);
},
fail
(
e
)
{
console
.
log
(
'wxChooseMessageFile错误'
);
reject
(
e
);
}
})
...
...
@@ -233,6 +236,19 @@ function wxGetImageInfo ({src}) {
})
})
}
function
wxGetVideoInfo
({
src
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
getVideoInfo
({
src
,
success
(
res
)
{
resolve
(
res
)
},
fail
(
e
)
{
reject
(
e
)
}
})
})
}
function
wxSaveImageToPhotosAlbum
({
filePath
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
saveImageToPhotosAlbum
({
...
...
@@ -335,5 +351,6 @@ export {
wxGetUserInfo
,
wxCheckSession
,
wxOpenSetting
,
wxChooseMessageFile
wxChooseMessageFile
,
wxGetVideoInfo
}
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