Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
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
罗超
confucius
Commits
b7510301
Commit
b7510301
authored
Oct 22, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f6db8716
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
61 deletions
+98
-61
applettb.png
src/assets/images/applettb.png
+0
-0
chooseApplet.vue
src/pages/teacher/components/chooseApplet.vue
+51
-19
addimageText.vue
src/pages/teacher/contribution/addimageText.vue
+3
-2
graphicType.vue
src/pages/teacher/contribution/graphicType.vue
+32
-28
contributionUE.vue
src/pages/teacher/contribution/ue/contributionUE.vue
+12
-12
No files found.
src/assets/images/applettb.png
0 → 100644
View file @
b7510301
448 Bytes
src/pages/teacher/components/chooseApplet.vue
View file @
b7510301
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
</div>
</div>
<div
v-if=
'msg.type==3'
>
<div
v-if=
'msg.type==3'
>
<q-input
clearable
standout=
"bg-primary text-white"
v-model=
"msg.title"
@
input=
"$forceUpdate()"
maxlength=
"35"
counter
<q-input
clearable
standout=
"bg-primary text-white"
v-model=
"msg.title"
@
input=
"$forceUpdate()"
label=
"卡片标题"
style=
"margin-top: 20px;"
/>
maxlength=
"35"
counter
label=
"卡片标题"
style=
"margin-top: 20px;"
/>
<div
style=
"margin-top: 20px;display: flex;align-items: flex-start"
v-if=
"msg.appletmsg"
>
<div
style=
"margin-top: 20px;display: flex;align-items: flex-start"
v-if=
"msg.appletmsg"
>
<div
style=
"margin-right: 15px;"
>
卡片样式
</div>
<div
style=
"margin-right: 15px;"
>
卡片样式
</div>
<div
<div
...
@@ -41,18 +41,20 @@
...
@@ -41,18 +41,20 @@
style=
"width: auto;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;word-wrap: normal;font-weight: 400;"
>
{{
msg
.
appletmsg
.
Name
}}
</span>
style=
"width: auto;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;word-wrap: normal;font-weight: 400;"
>
{{
msg
.
appletmsg
.
Name
}}
</span>
</div>
</div>
<span>
{{
msg
.
title
}}
</span>
<span>
{{
msg
.
title
}}
</span>
<div
style=
"width: 240px;height: 180px;border: 1px dashed #E3E4E5;display: flex;align-items: center;justify-content: center;background: #FFF;margin-top: 10px;"
<div
style=
"width: 240px;height: 180px;border: 1px dashed #E3E4E5;display: flex;
flex-direction: column;
align-items: center;justify-content: center;background: #FFF;margin-top: 10px;"
v-if=
"msg.imgUrl==''"
>
v-if=
"msg.imgUrl==''"
>
<p
style=
"padding: 0 10px;text-align: center;"
>
建议图片尺寸为5:4,大小不超过10M,暂不支持动图。
</p>
<q-btn
class=
"q-mr-md"
label=
"从图库选择"
@
click=
"getChoice()"
/>
<q-btn
class=
"q-mr-md"
label=
"从图库选择"
@
click=
"getChoice()"
/>
</div>
</div>
<div
style=
"width: 240px;height: 180px;margin-top: 10px;"
v-if=
"msg.imgUrl!=''"
@
click=
"getChoice()"
>
<div
style=
"width: 240px;height: 180px;margin-top: 10px;"
v-if=
"msg.imgUrl!=''"
@
click=
"getChoice()"
>
<el-image
v-if=
"msg.imgUrl"
style=
"width: 100%;height: 100%;"
:src=
"msg.imgUrl"
<el-image
v-if=
"msg.imgUrl"
style=
"width: 100%;height: 100%;"
:src=
"msg.imgUrl"
fit=
"cover"
></el-image>
fit=
"cover"
></el-image>
</div>
</div>
</div>
</div>
<div
class=
"weapp_card_ft"
>
<div
class=
"weapp_card_ft"
>
<span
class=
"weapp_card_logo"
><img
<span
class=
"weapp_card_logo"
><img
src=
"
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAb1BMVEUAAAB4it11h9x2h9x2h9x2htx8j+R8i+B1h9x2h9x3h92Snv91htt2h9x1h9x4h9x1h9x1h9x2idx1h9t2h9t1htt1h9x1h9x1htx2h9x1h912h9x4h913iN17juOOjuN1iNx2h9t4h958i+B1htvejBiPAAAAJHRSTlMALPLcxKcVEOXXUgXtspU498sx69DPu5+Yc2JeRDwbCYuIRiGBtoolAAAA3ElEQVQoz62S1xKDIBBFWYiFYImm2DWF///G7DJEROOb58U79zi4O8iOo8zuCRfV8EdFgbYE49qFQs8ksJInajOA1wWfYvLcGSueU/oUGBtPpti09uNS68KTMcrQ5jce4kmN/HKn9XVPAo702JEdx9hTUrWUqVrI3KwUmM1NhIWMKdwiGvpGMWZOAj1PZuzAxHwhVSplrajoseBnbyDHAwvrtvKKhdqTtFBkL8wO5ijcsS3G1JMNvQ5mdW7fc0x0+ZcnlJlZiflAomdEyFaM7qeK2JahEjy5ZyU7jC/q/Rz/DgqEuAAAAABJRU5ErkJggg==
"
src=
"
../../../assets/images/applettb.png
"
alt=
""
class=
"icon_weapp_logo_mini"
>
小程序
</span>
alt=
""
class=
"icon_weapp_logo_mini"
>
小程序
</span>
</div>
</div>
</div>
</div>
...
@@ -104,7 +106,7 @@
...
@@ -104,7 +106,7 @@
},
},
AppletList
:
[],
AppletList
:
[],
getImgChoice
:
false
,
getImgChoice
:
false
,
ChooseImgtype
:
0
ChooseImgtype
:
0
}
}
},
},
created
()
{
created
()
{
...
@@ -147,9 +149,36 @@
...
@@ -147,9 +149,36 @@
this
.
getImgChoice
=
true
;
this
.
getImgChoice
=
true
;
},
},
SelectId
(
obj
)
{
SelectId
(
obj
)
{
this
.
msg
.
imgUrl
=
obj
[
0
].
ImageUrl
this
.
getNaturalImgSize
(
obj
[
0
].
ImageUrl
,
k
=>
{
//获取图片比例
console
.
log
(
this
.
msg
.
imgUrl
)
let
qualified
=
k
.
qualified
this
.
getImgChoice
=
false
;
this
.
msg
.
imgUrl
=
obj
[
0
].
ImageUrl
;
this
.
getImgChoice
=
false
;
if
(
qualified
==
true
)
{
this
.
msg
.
imgUrl
=
obj
[
0
].
ImageUrl
;
this
.
getImgChoice
=
false
;
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请上传图片尺寸为5:4,`
,
position
:
'top'
})
}
})
},
getNaturalImgSize
(
img_url
,
callback
)
{
img_url
=
img_url
+
Date
.
parse
(
new
Date
())
var
img
=
new
Image
();
img
.
src
=
img_url
;
img
.
onload
=
function
()
{
// 打印
let
qualified
=
false
if
(
Number
(
img
.
height
)
/
img
.
width
==
0.8
)
{
qualified
=
true
}
callback
({
qualified
:
qualified
})
};
},
},
getroute
(
e
)
{
//选择了小程序 路径赋值
getroute
(
e
)
{
//选择了小程序 路径赋值
this
.
AppletList
.
forEach
(
x
=>
{
this
.
AppletList
.
forEach
(
x
=>
{
...
@@ -180,21 +209,24 @@
...
@@ -180,21 +209,24 @@
background
:
#fff
;
background
:
#fff
;
width
:
520px
;
width
:
520px
;
}
}
.ChooseApplet
.weapp_card_ft
{
.ChooseApplet
.weapp_card_ft
{
padding
:
0
15px
;
padding
:
0
15px
;
border-top
:
1px
solid
#E3E4E5
;
border-top
:
1px
solid
#E3E4E5
;
line-height
:
24px
;
line-height
:
24px
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.ChooseApplet
.weapp_card_logo
{
.ChooseApplet
.weapp_card_logo
{
color
:
#7E8081
;
color
:
#7E8081
;
font-size
:
14px
;
font-size
:
14px
;
}
}
.ChooseApplet
.icon_weapp_logo_mini
{
width
:
14px
;
.ChooseApplet
.icon_weapp_logo_mini
{
height
:
14px
;
width
:
14px
;
vertical-align
:
middle
;
height
:
14px
;
margin-right
:
.2em
;
vertical-align
:
middle
;
margin-top
:
-0.2em
;
margin-right
:
.2em
;
}
margin-top
:
-0.2em
;
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/teacher/contribution/addimageText.vue
View file @
b7510301
...
@@ -271,7 +271,6 @@
...
@@ -271,7 +271,6 @@
}
}
},
},
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
getdetails
()
{
getdetails
()
{
...
@@ -393,6 +392,8 @@
...
@@ -393,6 +392,8 @@
this
.
addMsg
.
ImageList
.
push
(
obj
)
this
.
addMsg
.
ImageList
.
push
(
obj
)
})
})
}
}
// let a = JSON.stringify(this.addMsg.Content)
// console.log(a)
setContributeInfo
(
this
.
addMsg
).
then
(
res
=>
{
setContributeInfo
(
this
.
addMsg
).
then
(
res
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
@@ -404,7 +405,7 @@
...
@@ -404,7 +405,7 @@
message
:
res
.
Message
,
message
:
res
.
Message
,
position
:
'top'
position
:
'top'
})
})
this
.
goblck
()
//
this.goblck()
}
}
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
...
src/pages/teacher/contribution/graphicType.vue
View file @
b7510301
<
template
>
<
template
>
<div
class=
"graphicType"
>
<div
class=
"graphicType"
>
<section
class=
"wx-edui-media-wrp custom_select_card_wrp"
>
<div
style=
"margin-top: 10px;width: 270px;border: 1px solid #E3E4E5;background: #FFF;padding-top: 10px;"
>
<section
class=
"js_editor_audio audio_iframe res_iframe js_uneditable custom_select_card"
<div
style=
"padding:0 15px;"
>
src=
"/cgi-bin/readtemplate?t=tmpl/audio_tmpl&name=202110180631201650000000015.mp3&play_length=00:03"
<div
style=
"display: flex;align-items: center;"
>
isaac2=
"1"
low_size=
"5.57"
source_size=
"5.6"
high_size=
"23.73"
name=
"202110180631201650000000015.mp3"
<img
style=
"width: 20px;height: 20px;border-radius: 10px;margin-right: 10px;"
play_length=
"3000"
voice_encode_fileid=
"MzU3OTUwMjg4OV8xMDAwMDU2OTM="
data-topic_id=
""
:src=
"Image"
fit=
"cover"
></img><span
data-topic_name=
""
data-pluginname=
"insertaudio"
contenteditable=
"false"
>
style=
"width: auto;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;word-wrap: normal;font-weight: 400;"
>
{{
Name
}}
</span>
<!-- 图文类型的音频卡片 -->
</div>
<span>
{{
title
}}
</span>
<section
class=
"appmsg_card_context appmsg_card_active audio_card js_audio_card"
>
<div
style=
"width: 240px;height: 180px;margin-top: 10px;"
>
<strong
class=
"audio_card_title"
>
202110180631201650000000015.mp3
</strong>
<img
style=
"width: 100%;height: 100%;"
:src=
"imgUrl"
fit=
"cover"
></img>
<span
class=
"weui-flex"
><span
class=
"weui-flex__item"
><span
class=
"audio_card_opr"
>
</div>
<span
class=
"audio_card_progress_wrp"
><span
class=
"audio_card_progress"
><span
</div>
class=
"audio_card_progress_inner"
></span></span></span></span>
<div
style=
" padding: 0 15px;border-top: 1px solid #E3E4E5;line-height: 24px;margin-top: 10px;"
>
<span
class=
"audio_card_tips"
aria-labelledby=
"时长"
><em
<span
style=
"color: #7E8081;font-size: 14px;"
><img
class=
"audio_card_length_current"
>
00:00
</em>
src=
"../../../assets/images/applettb.png"
<em
class=
"audio_card_length_total"
>
00:03
</em>
alt=
""
</span></span><span
aria-labelledby=
"播放开关"
class=
"audio_card_switch"
><em
style=
" width: 14px;height: 14px;vertical-align: middle;margin-right: .2em;margin-top: -0.2em;"
>
class=
"weui-audio-btn"
role=
"button"
></em></span></span><span
小程序
</span>
class=
"audio_album_null js_no_album"
>
未加入话题
</span><span
class=
"audio_album_null js_album_name"
</div>
style=
"display: none;"
></span><span
class=
"audio_action js_audio_action"
</div>
style=
"display: none;"
><span
class=
"audio_action_item js_replace_album"
style=
"display: none;"
><em
class=
"audio_action_icon_switch"
></em>
修改话题
</span><span
class=
"audio_action_item js_add_album"
><em
class=
"audio_action_icon_add"
></em>
添加话题
</span></span>
</section>
</section>
</section>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -34,13 +27,24 @@
...
@@ -34,13 +27,24 @@
data
()
{
data
()
{
return
{
return
{
ViewDomain
:
''
,
ViewDomain
:
''
,
Image
:
''
,
Name
:
''
,
title
:
''
,
imgUrl
:
''
,
}
}
},
},
created
()
{
created
()
{
console
.
log
(
this
.
$route
.
query
)
console
.
log
(
this
.
$route
.
query
)
if
(
this
.
$route
.
query
){
this
.
Image
=
this
.
$route
.
query
.
Image
;
this
.
Name
=
this
.
$route
.
query
.
Name
;
this
.
title
=
this
.
$route
.
query
.
title
;
this
.
imgUrl
=
this
.
$route
.
query
.
imgUrl
;
}
},
},
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
@import
'./ue/iframestyle.css'
;
/* @import './ue/iframestyle.css'; */
</
style
>
</
style
>
\ No newline at end of file
src/pages/teacher/contribution/ue/contributionUE.vue
View file @
b7510301
...
@@ -117,14 +117,12 @@
...
@@ -117,14 +117,12 @@
//s视频
//s视频
fileArray
.
forEach
(
item
=>
{
fileArray
.
forEach
(
item
=>
{
html
+=
"<iframe frameborder='0' width='100%' height='200px' src='https://v.qq.com/iframe/player.html?vid=v326875u4ek' allowfullscreen='true'></iframe>"
html
+=
"<iframe frameborder='0' width='100%' height='200px' src='https://v.qq.com/iframe/player.html?vid=v326875u4ek' allowfullscreen='true'></iframe>"
// html += '
<
p
style
=
"text-align:center"
><
iframe
frameborder
=
"0"
src
=
"' + item.fileUrl +
// '"
allowFullScreen
=
"true"
align
=
"center"
height
=
"280"
width
=
"420"
><
/iframe></
p
>
';
})
})
console
.
log
(
html
)
console
.
log
(
html
)
if
(
html
&&
html
!=
''
)
{
if
(
html
&&
html
!=
''
)
{
// html.setAttr('
style
','
display
:
block
;
margin
:
0
auto
;
');
this
.
ue
.
execCommand
(
'inserthtml'
,
html
);
this
.
ue
.
execCommand
(
'inserthtml'
,
html
);
}
}
}
}
...
@@ -134,12 +132,7 @@
...
@@ -134,12 +132,7 @@
let
html
=
''
;
let
html
=
''
;
//音频
//音频
fileArray
.
forEach
(
item
=>
{
fileArray
.
forEach
(
item
=>
{
// html += '
<
p
style
=
"text-align:center"
><
iframe
frameborder
=
"0"
src
=
"' + item.fileUrl + '"
allowFullScreen
=
"true"
align
=
"center"
><
/iframe></
p
>
';
// html += '
<
p
><
iframe
height
=
"auto"
width
=
"100%"
frameborder
=
"0"
allowtransparency
=
"true"
' +
// '
style
=
"background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;"
scrolling
=
"no"
' +
// '
src
=
"http://localhost:8181/#/teacher/contribution/graphicType?fileName=' + item.fileName + '&url=' +
// item.fileUrl + '&fileType=3' +
// '"
class
=
"ans-insertaudio-module"
module
=
"_insertaudio"
>
' + '
<
/iframe></
p
>
';
html
+=
'<p style="text-align:center"><iframe height="62px" width="auto" frameborder="0" allowtransparency="true" '
+
html
+=
'<p style="text-align:center"><iframe height="62px" width="auto" frameborder="0" allowtransparency="true" '
+
' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" '
+
' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" '
+
' src="'
+
this
.
ViewDomain
+
'/index.html?fileName='
+
item
.
fileName
+
'&url='
+
item
.
fileUrl
+
' src="'
+
this
.
ViewDomain
+
'/index.html?fileName='
+
item
.
fileName
+
'&url='
+
item
.
fileUrl
+
...
@@ -174,10 +167,17 @@
...
@@ -174,10 +167,17 @@
}
else
if
(
data
.
type
==
2
){
//图片小程序
}
else
if
(
data
.
type
==
2
){
//图片小程序
html
+=
`<p><a data-miniprogram-appid="
${
data
.
appletmsg
.
AppID
}
" data-miniprogram-path="
${
data
.
route
}
" href=""><img src="
${
data
.
imgUrl
}
" alt="" data-width="null" ></a></p>`
html
+=
`<p><a data-miniprogram-appid="
${
data
.
appletmsg
.
AppID
}
" data-miniprogram-path="
${
data
.
route
}
" href=""><img src="
${
data
.
imgUrl
}
" alt="" data-width="null" ></a></p>`
}
else
if
(
data
.
type
==
3
){
}
else
if
(
data
.
type
==
3
){
html+=`<mp-miniprogram data-miniprogram-appid="${data.appletmsg.AppID}" data-miniprogram-path="${data.route}" data-miniprogram-nickname="${data.appletmsg.Name}" data-miniprogram-avatar="${data.imgUrl}" data-miniprogram-title="${data.title}" data-miniprogram-imageurl="${data.imgUrl}" data-miniprogram-type="card" data-miniprogram-servicetype="0"></mp-miniprogram>`
let
dataTime
=
Date
.
parse
(
new
Date
())
let a=`<mp-miniprogram data-miniprogram-appid="wxacd9f8cc3480d29e" data-miniprogram-path="pages/index/index" data-miniprogram-nickname="赞羊" data-miniprogram-avatar="http://mmbiz.qpic.cn/mmbiz_png/vDPDsxyFvjJ09nKK5HDicbSibuyWIx8l7S3icxkc0kwtJApsYc1hicVSTxbCakhRAuMLpxGibmxH6MeC4kSibBwl3GSQ/640?wx_fmt=png&wxfrom=200" data-miniprogram-title="飞哥地方给对方" data-miniprogram-imageurl="http://mmbiz.qpic.cn/mmbiz_jpg/iamUJ3Ot9utFjb5RP6Fr0ECTbQDnicewkS38JbPCsoFZPUzibXuIj6IhaHOPudWSG0ZxldLIj70QtHVSbwrBaP85g/0?wx_fmt=jpeg" data-miniprogram-type="card" data-miniprogram-servicetype="0"></mp-miniprogram>`
// 给公众号的写法
html
+=
`<mp-miniprogram data-time="
${
dataTime
}
" data-miniprogram-appid="
${
data
.
appletmsg
.
AppID
}
" data-miniprogram-path="
${
data
.
route
}
" data-miniprogram-title="
${
data
.
title
}
" data-miniprogram-imageurl="http://mmbiz.qpic.cn/mmbiz_jpg/iamUJ3Ot9utFjb5RP6Fr0ECTbQDnicewkS38JbPCsoFZPUzibXuIj6IhaHOPudWSG0ZxldLIj70QtHVSbwrBaP85g/0?wx_fmt=jpeg" data-miniprogram-type="card" data-miniprogram-servicetype="0"></mp-miniprogram>`
//自己看的写法
html
+=
'<p><iframe height="320" width="auto" data-time='
+
dataTime
+
' frameborder="0" allowtransparency="true" '
+
' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" '
+
' src="http://localhost:8181/#/teacher/contribution/graphicType?Name='
+
data
.
appletmsg
.
Name
+
'&Image='
+
data
.
appletmsg
.
Image
+
'&title='
+
data
.
title
+
'&imgUrl='
+
data
.
imgUrl
+
'" class="ans-insertaudio-module" module="_insertaudio">'
+
' </iframe></p>'
;
console
.
log
(
html
)
console
.
log
(
html
)
console.log(a)
}
}
if
(
html
&&
html
!=
''
)
{
if
(
html
&&
html
!=
''
)
{
...
...
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