Commit cb86d734 by 庄欣

新的插件

parent db33fe54
......@@ -20,14 +20,14 @@
height: 50px;
}
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote {
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote {
position: fixed;
width: 30%;
width: 60%;
top: 10%;
z-index: 999;
background-image: linear-gradient(125deg, rgb(239 223 143), rgb(235 209 84), rgb(122 60 25));
background-size: 400%;
left: 35%;
left: 15%;
color: #23283f;
padding-top: 10px;
height: auto;
......@@ -68,8 +68,7 @@
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote .form-group {
margin-top: 20px;
padding-left: 10px;
padding-right: 10px;
width: 100%;
}
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote .btn-primary {
......@@ -120,4 +119,21 @@
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui {
overflow-y: scroll;
}
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui .form{
display: flex;
justify-content: space-between;
}
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui .form .main-left {
width: 40%;
}
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui .form .main-right {
width: 40%;
}
#__extend_fast_quote input[name=is_video] {
-webkit-appearance: auto;
}
\ No newline at end of file
......@@ -6,54 +6,79 @@
<div class="error" id="error"></div>
<div class="success" id="success"></div>
<div id="main-ui">
<div class="col-12" style="padding-left: 10px">
<h4>添加有米使用记录</h4>
<h6>(有中台的请在中台标注)</h6>
</div>
<div class="form-group">
<label>作品id</label>
<input type="text" disabled id="worksId" class="form-control"/>
</div>
<div class="form-group">
<label>在哪里使用</label>
<select id="channelId" class="form-control">
<option value="">请选择</option>
</select>
</div>
<div class="form-group">
<label>在第三方平台上的标题(选填)</label>
<input type="text" class="form-control" id="title"/>
</div>
<div class="form-group">
<label>使用本组作品的张数</label>
<input type="number" value="1" id="quoteCount" class="form-control"/>
<div id="main-ui" >
<div class="col-12" style="margin: 0 auto;text-align: center;">
<h3>添加有米使用记录</h3>
<h5>(有中台的请在中台标注)</h5>
</div>
<div class="form">
<div class="main-left col-md-6">
<div class="form-group">
<label>作品id</label>
<input type="text" disabled id="worksId" class="form-control"/>
</div>
<div class="form-group">
<label>在哪里使用</label>
<select id="channelId" class="form-control">
<option value="">请选择</option>
</select>
</div>
<div class="form-group">
<label>在第三方平台上的标题(选填)</label>
<input type="text" class="form-control" id="title"/>
</div>
<div class="form-group">
<label>使用时间</label>
<input type="text" id="today" class="form-control"/>
</div>
<div class="form-group">
<label>过审情况</label>
<select class="form-control" id="status">
<option value="0">待审核</option>
<option value="1" selected>已过审</option>
<option value="2" selected>被拒绝</option>
</select>
</div>
<div class="form-group">
<label>过审时间</label>
<input type="text" id="passTime" class="form-control" disabled/>
<div class="form-group">
<label>在第三方平台上的标题链接(选填)</label>
<input type="text" class="form-control" id="channelLink"/>
</div>
<div class="form-group">
<label>使用本组作品的张数</label>
<input type="number" value="1" id="quoteCount" class="form-control"/>
</div>
<div class="form-group">
<label>在点是否发布成了什么形式</label>
<div>
<input type="radio" value="0" name="is_video" checked/>图片
<input type="radio" value="1" name="is_video" />视频
<input type="radio" value="2" name="is_video" />文章
</div>
</div>
</div>
<div class="form-group">
<label>责编</label>
<select class="form-control" id="admins">
<div class="main-right col-md-6">
<div class="form-group">
<label>推送时间</label>
<input type="text" id="today" class="form-control"/>
</div>
<div class="form-group">
<label>过审情况</label>
<select class="form-control" id="status">
<option value="0">待审核</option>
<option value="1" selected>已过审</option>
<option value="2" selected>被拒绝</option>
</select>
</div>
<div class="form-group">
<label>过审时间</label>
<input type="text" id="passTime" class="form-control" disabled/>
</div>
<div class="form-group">
<label>责编</label>
<select class="form-control" id="admins">
</select>
</div>
<div class="form-group">
<label>管理员备注(选填)</label>
<textarea id="mepaiRemark" class="form-control"></textarea>
</div>
</select>
</div>
<div class="buttons form-group">
<button class="btn btn-primary" id="send">提交</button>
</div>
<div class="buttons form-group">
<button class="btn btn-primary" id="send">提交</button>
</div>
</div>
</div>
......@@ -211,6 +211,16 @@ function goNext() {
var statusDom = document.getElementById("status");
var worksDom = document.getElementById("worksId");
var passTimeDom = document.getElementById("passTime");
var mepaiRemarkDom = document.getElementById("mepaiRemark");
var channelLinkDom = document.getElementById("channelLink");
var isVideoDom = document.getElementsByName("is_video");
if (isVideo()) {
for (var i in isVideoDom) {
if (isVideoDom[i].value.toString() === "1") {
isVideoDom[i].setAttribute("checked", "checked");
}
}
}
statusDom.onchange = function() {
assertStatus();
}
......@@ -253,6 +263,14 @@ function goNext() {
});
var sendBtn = document.getElementById("send")
sendBtn.onclick = function () {
var isVideoDom = document.getElementsByName("is_video");
var isVideoValue = -1;
for (var i in isVideoDom) {
if (isVideoDom[i].checked) {
isVideoValue = isVideoDom[i].value;
break;
}
}
loading();
var postData = {
"push_time": todayInput.value,
......@@ -262,7 +280,10 @@ function goNext() {
"quote_count": quoteCountDom.value,
"status": statusDom.value,
"works_id": worksDom.value,
"pass_time": passTimeDom.value
"pass_time": passTimeDom.value,
"is_video": isVideoValue,
"channel_link": channelLinkDom.value,
"mepai_remark": mepaiRemarkDom.value
};
if (isNaN(postData['works_id']) || postData['works_id'] <= 0) {
addError("作品id解析失败", true)
......@@ -301,3 +322,9 @@ function getCookie(key, callback) {
callback(response);
});
}
function isVideo() {
var a = document.getElementsByClassName("swiper-wrapper").item(0);
var src = a.firstElementChild.firstElementChild.src;
return src.indexOf("videos.mepai.me") >= 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment