Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wandouchengzhang_coach
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
石盼盼
wandouchengzhang_coach
Commits
0bd41f81
Commit
0bd41f81
authored
Nov 14, 2020
by
吴颖
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wuying' into 'master'
Wuying See merge request
!16
parents
148f8a64
a9610b92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
9 deletions
+25
-9
classDetail.js
pages/index/classDetail/classDetail.js
+1
-1
courseInstant.js
pages/index/courseInstant/courseInstant.js
+19
-2
courseInstant.wxml
pages/index/courseInstant/courseInstant.wxml
+5
-5
courseInstant.wxss
pages/index/courseInstant/courseInstant.wxss
+0
-1
No files found.
pages/index/classDetail/classDetail.js
View file @
0bd41f81
...
@@ -53,7 +53,7 @@ Page({
...
@@ -53,7 +53,7 @@ Page({
},
},
gocourseinstant
:
function
()
{
gocourseinstant
:
function
()
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'
../../index/courseInstant/courseInstant
'
,
url
:
'
../../index/courseInstant/courseInstant
?type=check&lesson_id=
'
+
this
.
data
.
lesson_id
,
})
})
},
},
...
...
pages/index/courseInstant/courseInstant.js
View file @
0bd41f81
...
@@ -8,6 +8,7 @@ var qiniuUploader = require("../../../utils/qiniuUploader");
...
@@ -8,6 +8,7 @@ var qiniuUploader = require("../../../utils/qiniuUploader");
Page
({
Page
({
data
:
{
data
:
{
lesson_id
:
''
,
lesson_id
:
''
,
type
:
''
,
// 查看还是修改
videoBox
:
[],
videoBox
:
[],
videoShow
:
true
,
videoShow
:
true
,
imgBox
:
[],
imgBox
:
[],
...
@@ -20,12 +21,12 @@ Page({
...
@@ -20,12 +21,12 @@ Page({
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
setData
({
this
.
setData
({
lesson_id
:
options
.
lesson_id
?
options
.
lesson_id
:
''
lesson_id
:
options
.
lesson_id
?
options
.
lesson_id
:
''
,
type
:
options
.
type
?
options
.
type
:
''
,
})
})
if
(
this
.
data
.
lesson_id
)
{
if
(
this
.
data
.
lesson_id
)
{
this
.
getDetail
()
this
.
getDetail
()
}
}
},
},
getDetail
()
{
getDetail
()
{
let
params
=
{
let
params
=
{
...
@@ -34,6 +35,22 @@ Page({
...
@@ -34,6 +35,22 @@ Page({
lesson_id
:
this
.
data
.
lesson_id
lesson_id
:
this
.
data
.
lesson_id
},
},
callback
:(
data
)
=>
{
callback
:(
data
)
=>
{
console
.
log
(
JSON
.
parse
(
data
.
class_moment
))
let
class_moment
=
JSON
.
parse
(
data
.
class_moment
)
let
arr1
=
[],
arr2
=
[]
for
(
var
i
=
0
;
i
<
class_moment
.
length
;
i
++
)
{
if
(
class_moment
[
i
].
type
==
'
video
'
)
{
arr1
.
push
(
class_moment
[
i
])
}
else
{
arr2
.
push
(
class_moment
[
i
])
}
}
this
.
setData
({
videoBox
:
arr1
,
imgBox
:
arr2
})
console
.
log
(
arr1
)
console
.
log
(
arr2
)
console
.
log
(
data
)
console
.
log
(
data
)
}
}
}
}
...
...
pages/index/courseInstant/courseInstant.wxml
View file @
0bd41f81
...
@@ -6,11 +6,11 @@
...
@@ -6,11 +6,11 @@
<view class="imgBox flex-h">
<view class="imgBox flex-h">
<view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<video src="{{item.url}}" data-index="{{index}}"></video>
<video src="{{item.url}}" data-index="{{index}}"></video>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteVideo">
<view class="delete-btn" data-index="{{index}}" catchtap="deleteVideo"
wx:if="{{type != 'check'}}"
>
<text class='iconfont iconguanbi'></text>
<text class='iconfont iconguanbi'></text>
</view>
</view>
</view>
</view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseVideo" wx:if="{{
videoShow
}}">
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseVideo" wx:if="{{
imgBox.length < 1
}}">
<text class='iconfont iconshipin'></text>
<text class='iconfont iconshipin'></text>
</view>
</view>
</view>
</view>
...
@@ -23,15 +23,15 @@
...
@@ -23,15 +23,15 @@
<view class="imgBox flex-h flex-hw">
<view class="imgBox flex-h flex-hw">
<view class="img" wx:for="{{imgBox}}" wx:for-item="item" wx:key="idx">
<view class="img" wx:for="{{imgBox}}" wx:for-item="item" wx:key="idx">
<image src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
<image src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteImg">
<view class="delete-btn" data-index="{{index}}" catchtap="deleteImg"
wx:if="{{type != 'check'}}"
>
<text class='iconfont iconguanbi'></text>
<text class='iconfont iconguanbi'></text>
</view>
</view>
</view>
</view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseImg" wx:if="{{imgBox.length < 9}}">
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseImg" wx:if="{{imgBox.length < 9
&& type != 'check'
}}">
<text class='iconfont iconxiangji'></text>
<text class='iconfont iconxiangji'></text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="button">
<view class="button"
wx:if="{{type != 'check'}}"
>
<view class="submit" catchtap="save">提交</view>
<view class="submit" catchtap="save">提交</view>
</view>
</view>
\ No newline at end of file
pages/index/courseInstant/courseInstant.wxss
View file @
0bd41f81
...
@@ -27,7 +27,6 @@ page {
...
@@ -27,7 +27,6 @@ page {
.img {
.img {
width: 210rpx;
width: 210rpx;
height: 210rpx;
height: 210rpx;
border: 1px solid #EBEBEB;
border-radius: 5rpx;
border-radius: 5rpx;
margin-right: 30rpx;
margin-right: 30rpx;
margin-bottom: 30rpx;
margin-bottom: 30rpx;
...
...
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