代码修改后的版本,全部提交
This commit is contained in:
432
Mtxfw.VipSite/Admin_Member_JCHG_add.aspx
Normal file
432
Mtxfw.VipSite/Admin_Member_JCHG_add.aspx
Normal file
@@ -0,0 +1,432 @@
|
||||
<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="Admin_Member_JCHG_add.aspx.cs" Inherits="Mtxfw.VipSite.Admin_Member_JCHG_add" %>
|
||||
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head id="Head1" runat="server">
|
||||
<title></title>
|
||||
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta http-equiv="Cache-Control" content="no-store" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9,IE=10" />
|
||||
<script src="/Scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="/Scripts/bootstrap.min.js"></script>
|
||||
<script src="/Scripts/common.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="/Scripts/vod-js-sdk-v6.js"></script>
|
||||
<script type="text/javascript" src="/layer/layer.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/long.js"></script>
|
||||
<link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||||
|
||||
<!-- Basic Styles -->
|
||||
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/bootstrap.css">
|
||||
<!--[if IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/font-awesome-ie7.min.css">
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/smartadmin-production.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/smartadmin-skins.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/your_style.css">
|
||||
|
||||
<!-- Demo purpose only: goes with demo.js, you can delete this css when designing your own WebApp -->
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/demo.css">
|
||||
|
||||
|
||||
<!-- FAVICONS -->
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/cjadd.css">
|
||||
<link href="artDialog/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
|
||||
<script type="text/javascript" charset="utf-8" src="/artDialog/umeditor.config.js?t=0"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="/artDialog/umeditor.min.js?t=0"> </script>
|
||||
<!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
|
||||
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
|
||||
<script type="text/javascript" charset="utf-8" src="/artDialog/lang/zh-cn/zh-cn.js"></script>
|
||||
<script src="/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
|
||||
<script src="/artDialog/iframeTools.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
var open = function (url) {
|
||||
art.dialog.open(url, {
|
||||
title: '插入视频',
|
||||
width: '700px',
|
||||
height: '500px',
|
||||
lock: true,
|
||||
id: 'dg_test34243'
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.uploadvideobox{ display:inline-block; width:15em;}
|
||||
.uploadvideobtnbox{ position:relative;
|
||||
float:left;
|
||||
width: 8em;
|
||||
height: 2em;
|
||||
line-height: 2em;
|
||||
margin: 1em auto;
|
||||
background: linear-gradient(to right, #fec02e, #fc9b06);
|
||||
border-radius: 0.5em;
|
||||
|
||||
color:#fff;}
|
||||
.uploadvideobtnbox span{width: 100%;height: 100%; display:block;text-align:center;}
|
||||
.uploadvideobtnbox input#videofile{position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
border:0;
|
||||
background-color:#000;}
|
||||
.processbox{ width: 100%;height: 0.5em;border-radius: 10px;background: #999;margin: 10px auto;border: 1px solid #ff6780; display:none}
|
||||
.child{position: relative;height:100%;border-radius:inherit; background-color:#ff4500;}
|
||||
|
||||
.process-animate{background: #ff6780;position: absolute;left: 0;top: 0;bottom: 0;border-radius:inherit;
|
||||
animation: process 1s linear forwards ;
|
||||
}
|
||||
@keyframes process
|
||||
{
|
||||
0%{
|
||||
left:0;right:100%;
|
||||
}
|
||||
20%{
|
||||
right:80%
|
||||
}
|
||||
40%{
|
||||
right:60%;
|
||||
}
|
||||
60%{right:40%;}
|
||||
80%{right:20%;}
|
||||
100%{right:0;}
|
||||
}
|
||||
.delvideobtnbox{display:inline-block; margin-left:1em; margin-top:1em; width:2em; height:2em; background-color:#fff; cursor:pointer; display:none}
|
||||
.delvideobtnbox img{display:inline-block; width:100%; height:100%;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var checkForm = function () {
|
||||
var Text_Title = $("#<%=Text_Title.ClientID %>");
|
||||
if (Text_Title.val() == "") {
|
||||
alert('请输入标题!'); return false;
|
||||
}
|
||||
//alert($("#<%=Hidd_myEditor.ClientID %>").val());
|
||||
return true;
|
||||
};
|
||||
window.UMEDITOR_CONFIG.toolbar = [
|
||||
// 加入一个 test
|
||||
' bold italic underline strikethrough superscript subscript forecolor removeformat ',' fontfamily fontsize' ,
|
||||
'| justifyleft justifycenter justifyright justifyjustify', 'image', 'upvideo','source'
|
||||
];
|
||||
|
||||
UM.registerUI('upvideo',
|
||||
function(name) {
|
||||
var me = this;
|
||||
var $btn = $.eduibutton({
|
||||
icon : "video",
|
||||
click : function(){
|
||||
$('#uploadvideosuccessModal').modal('show');
|
||||
},
|
||||
title: '插入视频'
|
||||
});
|
||||
|
||||
this.addListener('selectionchange',function(){
|
||||
//切换为不可编辑时,把自己变灰
|
||||
var state = this.queryCommandState(name);
|
||||
$btn.edui().disabled(state == -1).active(state == 1)
|
||||
});
|
||||
return $btn;
|
||||
}
|
||||
);
|
||||
function getSignature() {
|
||||
return "<%=Signature%>";
|
||||
|
||||
};
|
||||
function videoUploading() {
|
||||
try {
|
||||
$('.processbox .child').css("width", "0%");
|
||||
const tcVod = new TcVod.default({
|
||||
getSignature: getSignature // 前文中所述的获取上传签名的函数
|
||||
})
|
||||
|
||||
const uploader = tcVod.upload({
|
||||
mediaFile: document.getElementById('videofile').files[0], // 媒体文件(视频或音频或图片),类型为 File
|
||||
})
|
||||
uploader.on('media_progress', function (info) {
|
||||
$(".uploadvideobtnbox span").html("上傳中...");
|
||||
$(".processbox").show();
|
||||
$('.processbox .child').css("width", (info.percent * 100) + "%");
|
||||
})
|
||||
|
||||
uploader.done().then(function (doneResult) {
|
||||
$(".uploadvideobtnbox span").html("正在檢查文件...");
|
||||
$("#hidden_file").val(doneResult.video.url);
|
||||
$("#file_id").val(doneResult.fileId);
|
||||
savefileId(doneResult.video.url, doneResult.fileId);
|
||||
|
||||
}).catch(function (err0) {
|
||||
tishi3(err0);
|
||||
});
|
||||
} catch (err) {
|
||||
tishi3(err);
|
||||
}
|
||||
|
||||
}
|
||||
function savefileId(url,fileId) {
|
||||
|
||||
|
||||
var formdata = new FormData();
|
||||
// 将文件追加到 formdata对象中。
|
||||
formdata.append("url", url);
|
||||
formdata.append("fileId", fileId);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/ajax.ashx?action=savefileId',
|
||||
data: formdata,
|
||||
/**
|
||||
* 必须false才会避开jQuery对 formdata 的默认处理
|
||||
* XMLHttpRequest会对 formdata 进行正确的处理
|
||||
*/
|
||||
processData: false,
|
||||
// 告诉jQuery不要去设置Content-Type请求头
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
tishi2close();
|
||||
if (data.success) {
|
||||
$("#show_fileurl").val(data.video);
|
||||
$(".uploadvideobtnbox span").html("上傳完成");
|
||||
$(".processbox").hide();
|
||||
} else {
|
||||
tishi3(data.msg);
|
||||
|
||||
}
|
||||
},
|
||||
error: function (jqXHR) {
|
||||
layer.msg("发生错误:" + jqXHR.status);
|
||||
},
|
||||
});
|
||||
}
|
||||
function InsertVideo() {
|
||||
var video = $("#show_fileurl").val();
|
||||
var html = "<div style=\"width:100%;text-align:center;\"><video width=\"500\" height=\"400\" style=\"background-color: #000000;\" controls=\"controls\" autoplay=\"autoplay\" poster=\"\" x5-playsinline=\"\" playsinline=\"\" webkit-playsinline=\"\"><source src=\"" + video + "\" type=\"video/mp4\"></video></div><span style=\"display:none\">用于保存视频不能保存问题</span><br/>";
|
||||
insertHtml(html);
|
||||
$('#uploadvideosuccessModal').modal('hide');
|
||||
|
||||
}
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form runat="server">
|
||||
<!-- RIBBON -->
|
||||
<div id="ribbon">
|
||||
|
||||
<span class="ribbon-button-alignment"> <span id="refresh" class="btn btn-ribbon" data-title="refresh" rel="tooltip" data-placement="bottom" data-original-title="<i class='text-warning fa fa-warning'></i> 注意!这会重新设置小工具的排位." data-html="true" data-reset-msg="刷新网站?"><i class="fa fa-refresh"></i></span> </span>
|
||||
|
||||
<!-- breadcrumb -->
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/" target="_top">主页</a></li>
|
||||
<li><a href="/Member_Index.aspx">会员中心首页</a></li>
|
||||
<li><a href="/Admin_Member_config.aspx">后台管理</a></li>
|
||||
<li><%=strTitle %></li>
|
||||
</ol>
|
||||
<!-- end breadcrumb -->
|
||||
</div>
|
||||
<!-- END RIBBON -->
|
||||
<!-- MAIN CONTENT -->
|
||||
<div style="opacity: 1;" id="content">
|
||||
<div class="frontMain">
|
||||
|
||||
<h1 class="title01"><span class="semi-bold"><%=strTitle %></span></h1>
|
||||
<div class="MainContent">
|
||||
<table width="100%" class="data_table2">
|
||||
<tr>
|
||||
<th width="10%"> 标题:</th>
|
||||
<td>
|
||||
<asp:TextBox ID="Text_Title" Width="500px" runat="server"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th width="10%"> 预览图片:</th>
|
||||
<td>
|
||||
<asp:FileUpload ID="File_AdsImg" runat="server" style="border:1px solid #ccc;" />
|
||||
<img id="Img_Img" runat="server" style="display:block; margin-top:4px;" />
|
||||
<asp:HiddenField ID="Hidd_Img" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="10%"> 内容:</th>
|
||||
<td>
|
||||
<script id="editor" type="text/plain" style="width:90%;height:400px;"><%=strBody %></script>
|
||||
<asp:HiddenField ID="Hidd_myEditor" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="15%"></th>
|
||||
<td>
|
||||
<asp:Button ID="Btn_Insert" runat="server" Cssclass="abtn" Text="添加" OnClientClick="getContent();return checkForm();" />
|
||||
<asp:Button ID="Btn_Update" runat="server" Cssclass="abtn" Text="更新" OnClientClick="getContent();return checkForm();" />
|
||||
<input id="btn_back" type="reset" value="返回" onclick="history.go(-1)" class="abtn" />
|
||||
<asp:HiddenField ID="Hidd_Url" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 上传视频(Modal) -->
|
||||
<div class="modal fade" id="uploadvideosuccessModal" tabindex="-1" role="dialog" aria-labelledby="successLab" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><span id="uploadvideomodal-title">上传视频</span><span class="close" onclick="$('#uploadvideosuccessModal').modal('hide');">x</span></h5>
|
||||
|
||||
</div>
|
||||
<div class="modal-body0">
|
||||
<div class="uploadvideobox">
|
||||
<div class="processbox">
|
||||
<div class="child" style="width:0%">
|
||||
<p class="process-animate"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uploadvideobtnbox"><span>上传</span><input type="file" id="videofile" value="" onchange="videoUploading()" accept="video/*" /></div>
|
||||
|
||||
</div>
|
||||
<div class="uploadvideo_msgbox">仅支持mp4格式文件,上传其它文件无法播放。</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default text-right" onclick="$('#uploadvideosuccessModal').modal('hide');" id="uploadvideobtn-qx">取消</button>
|
||||
<button type="button" class="btn btn-success" id="uploadvideobtn-continue" onclick="InsertVideo()">确认</button>
|
||||
<input id="hidden_file" type="hidden" />
|
||||
<input id="file_id" type="hidden" />
|
||||
<input id="show_fileurl" type="hidden" />
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
//实例化编辑器
|
||||
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UM.getEditor('editor')就能拿到相关的实例
|
||||
UM.getEditor('editor');
|
||||
|
||||
|
||||
function isFocus(e) {
|
||||
alert(UM.getEditor('editor').isFocus());
|
||||
UM.dom.domUtils.preventDefault(e)
|
||||
}
|
||||
function setblur(e) {
|
||||
UM.getEditor('editor').blur();
|
||||
UM.dom.domUtils.preventDefault(e)
|
||||
}
|
||||
function insertHtml(value) {
|
||||
UM.getEditor('editor').execCommand('insertHtml', value)
|
||||
}
|
||||
function createEditor() {
|
||||
enableBtn();
|
||||
UM.getEditor('editor');
|
||||
};
|
||||
function getAllHtml() {
|
||||
$("#Hidd_myEditor").val(UM.getEditor('editor').getAllHtml());
|
||||
}
|
||||
function getContent() {
|
||||
|
||||
$("#Hidd_myEditor").val(UM.getEditor('editor').getContent());
|
||||
}
|
||||
function getPlainTxt() {
|
||||
var arr = [];
|
||||
arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
|
||||
arr.push("内容为:");
|
||||
arr.push(UM.getEditor('editor').getPlainTxt());
|
||||
alert(arr.join('\n'))
|
||||
}
|
||||
function setContent(isAppendTo) {
|
||||
//var arr = [];
|
||||
//arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
|
||||
UM.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
|
||||
//alert(arr.join("\n"));
|
||||
}
|
||||
function setDisabled() {
|
||||
UM.getEditor('editor').setDisabled('fullscreen');
|
||||
disableBtn("enable");
|
||||
}
|
||||
|
||||
function setEnabled() {
|
||||
UM.getEditor('editor').setEnabled();
|
||||
enableBtn();
|
||||
}
|
||||
|
||||
function getText() {
|
||||
//当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容
|
||||
var range = UM.getEditor('editor').selection.getRange();
|
||||
range.select();
|
||||
var txt = UM.getEditor('editor').selection.getText();
|
||||
alert(txt)
|
||||
}
|
||||
|
||||
function getContentTxt() {
|
||||
var arr = [];
|
||||
arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
|
||||
arr.push("编辑器的纯文本内容为:");
|
||||
arr.push(UM.getEditor('editor').getContentTxt());
|
||||
alert(arr.join("\n"));
|
||||
}
|
||||
function hasContent() {
|
||||
var arr = [];
|
||||
arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
|
||||
arr.push("判断结果为:");
|
||||
arr.push(UM.getEditor('editor').hasContents());
|
||||
alert(arr.join("\n"));
|
||||
}
|
||||
function setFocus() {
|
||||
UM.getEditor('editor').focus();
|
||||
}
|
||||
function deleteEditor() {
|
||||
disableBtn();
|
||||
UM.getEditor('editor').destroy();
|
||||
}
|
||||
function disableBtn(str) {
|
||||
var div = document.getElementById('btns');
|
||||
var btns = domUtils.getElementsByTagName(div, "button");
|
||||
for (var i = 0, btn; btn = btns[i++]; ) {
|
||||
if (btn.id == str) {
|
||||
domUtils.removeAttributes(btn, ["disabled"]);
|
||||
} else {
|
||||
btn.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
function enableBtn() {
|
||||
var div = document.getElementById('btns');
|
||||
var btns = domUtils.getElementsByTagName(div, "button");
|
||||
for (var i = 0, btn; btn = btns[i++]; ) {
|
||||
domUtils.removeAttributes(btn, ["disabled"]);
|
||||
}
|
||||
}
|
||||
|
||||
function getLocalData() {
|
||||
alert(UM.getEditor('editor').execCommand("getlocaldata"));
|
||||
}
|
||||
|
||||
function clearLocalData() {
|
||||
UM.getEditor('editor').execCommand("clearlocaldata");
|
||||
alert("已清空草稿箱")
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user