277 lines
12 KiB
Plaintext
277 lines
12 KiB
Plaintext
@page "{handler?}"
|
|
@model YBDevice.NWeb.Pages.MiniProgram.DetailModel
|
|
@{
|
|
ViewData["Title"] = "公众号详情";
|
|
}
|
|
<div class="layui-card">
|
|
<div class="layui-card-header">
|
|
<div class="layui-form-item">
|
|
<div class="layui-inline">
|
|
<button class="btn btn-primary btn-lg js-tycode" type="button">体验码</button>
|
|
<button class="btn btn-primary btn-lg js-info" type="button">更新资料</button>
|
|
<button class="btn btn-primary btn-lg js-domain" type="button">更新域名</button>
|
|
<button class="btn btn-primary btn-lg js-upload" type="button">上传代码</button>
|
|
<button class="btn btn-primary btn-lg js-submit" type="button">提交审核</button>
|
|
<button class="btn btn-primary btn-lg js-undo" type="button">撤回审核</button>
|
|
<button class="btn btn-primary btn-lg js-release" type="button">发布</button>
|
|
<button class="btn btn-primary btn-lg js-domainstatus" type="button">查询域名</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-card-body">
|
|
<table id="list" lay-filter="list"></table>
|
|
</div>
|
|
</div>
|
|
<script type="text/html" id="optpl">
|
|
<a href="#" title="查询状态" class="js-status" data-id="{{d.id}}">查询</a>
|
|
</script>
|
|
<script type="text/html" id="statustpl">
|
|
{{# if (d.status == -1){ }}
|
|
<span>代码已上传</span>
|
|
{{# } }}
|
|
{{# if (d.status == 0){ }}
|
|
<span>审核成功</span>
|
|
{{# } }}
|
|
{{# if (d.status == 1){ }}
|
|
<span>审核被拒绝</span>
|
|
{{# } }}
|
|
{{# if (d.status == 2){ }}
|
|
<span>审核中</span>
|
|
{{# } }}
|
|
{{# if (d.status == 3){ }}
|
|
<span>已撤回</span>
|
|
{{# } }}
|
|
{{# if (d.status == 4){ }}
|
|
<span>审核延后</span>
|
|
{{# } }}
|
|
</script>
|
|
@section Scripts{
|
|
<script type="text/javascript">
|
|
layui.use(['common','layer'], function () {
|
|
var common = layui.common,layer=layui.layer;
|
|
$(".js-upload").on("click", function () {
|
|
common.normaldialog({
|
|
title: "选择模板",
|
|
content: "/Code/List?id=" + '@Model.mid',
|
|
btn: ['提交', '取消'],
|
|
yes: function (index, layero) {
|
|
var iframeWin = window[layero.find('iframe')[0]['name']];
|
|
var data = iframeWin.getdata();
|
|
if (data.data.length == 0) {
|
|
common.alert("请先选择模板");
|
|
return;
|
|
}
|
|
var id = data.data[0].id;
|
|
common.ajax({
|
|
url: "/api/official/Commit?templateid=" + id + "&id=" + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.info(res.message, function () {
|
|
layer.close(index);
|
|
window.location.reload();
|
|
});
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
},
|
|
btn2: function (index, layero) {
|
|
layer.close(index);
|
|
}
|
|
});
|
|
});
|
|
$(".js-submit").on("click", function () {
|
|
common.confirm("确定提交审核?", function () {
|
|
common.ajax({
|
|
url: "/api/official/SubmitAudit?id=" + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.info(res.message, function () {
|
|
window.location.reload();
|
|
});
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
$(".js-undo").on("click", function () {
|
|
common.confirm("确定撤回审核?", function () {
|
|
common.ajax({
|
|
url: "/api/official/UndoCodeAudit?id=" + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.info(res.message, function () {
|
|
window.location.reload();
|
|
});
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
$(".js-domain").on("click", function () {
|
|
common.confirm("确定更新域名?", function () {
|
|
common.ajax({
|
|
url: "/api/official/ModifyDomain?id=" + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.info(res.message);
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
$(".js-info").on("click", function () {
|
|
common.confirm("确定更新资料?", function () {
|
|
common.ajax({
|
|
url: "/api/official/getinfo?id=" + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.info(res.message);
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
$("body").on("click", ".js-tycode", function () {
|
|
common.ajax({
|
|
url: '/api/official/getqrcode?id=' + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.previewimg(res.data);
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
$(".js-domainstatus").on("click", function () {
|
|
common.ajax({
|
|
url: "/api/official/GetDomain?id=" + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
var requestdomain = res.data.requestdomain;
|
|
var wsrequestdomain = res.data.wsrequestdomain;
|
|
var uploaddomain = res.data.uploaddomain;
|
|
var downloaddomain = res.data.downloaddomain;
|
|
var message = "request域名:";
|
|
if (requestdomain.length == 0) {
|
|
message += "无";
|
|
} else {
|
|
$.each(requestdomain, function () {
|
|
message += this+";";
|
|
});
|
|
}
|
|
message += "<br/>socket域名:";
|
|
if (wsrequestdomain.length == 0) {
|
|
message += "无";
|
|
} else {
|
|
$.each(wsrequestdomain, function () {
|
|
message += this + ";";
|
|
});
|
|
}
|
|
message += "<br/>uploadFile域名:";
|
|
if (uploaddomain.length == 0) {
|
|
message += "无";
|
|
} else {
|
|
$.each(uploaddomain, function () {
|
|
message += this + ";";
|
|
});
|
|
}
|
|
message += "<br/>downloadFile域名:";
|
|
if (downloaddomain.length == 0) {
|
|
message += "无";
|
|
} else {
|
|
$.each(downloaddomain, function () {
|
|
message += this + ";";
|
|
});
|
|
}
|
|
common.info(message);
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
$("body").on("click", ".js-status", function () {
|
|
var id = $(this).data("id");
|
|
common.ajax({
|
|
url: "/api/official/getcommitstatus?id=" + id,
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.info(res.message, function () {
|
|
window.location.reload();
|
|
});
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
$(".js-release").on("click", function () {
|
|
common.confirm("确定发布版本?", function () {
|
|
common.ajax({
|
|
url: "/api/official/Release?id=" + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.info(res.message, function () {
|
|
window.location.reload();
|
|
});
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
$(".js-last").on("click", function () {
|
|
common.ajax({
|
|
url: "/api/official/GetLatestAuditStatus?id=" + '@Model.mid',
|
|
success: function (res) {
|
|
if (res.code == 0) {
|
|
common.info(res.message);
|
|
} else {
|
|
common.alert(res.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
common.initTable({
|
|
url: '/api/official/GetHistoryList'
|
|
, method: 'post',
|
|
where: {
|
|
queryParam: [{
|
|
"Name": 'appid',
|
|
"Type": QueryCond.Equal,
|
|
"Value": '@Model.officla.authorizer_appid'
|
|
}]
|
|
}
|
|
, cols: [[
|
|
{
|
|
field: 'userversion', title: '版本'
|
|
},
|
|
{
|
|
field: 'userdesc', title: '描述'
|
|
},
|
|
{
|
|
field: 'createtime', title: '发布时间'
|
|
},
|
|
{
|
|
title: '状态', templet: "#statustpl"
|
|
},
|
|
{
|
|
title: '操作', templet:'#optpl'
|
|
}
|
|
]]
|
|
});
|
|
});
|
|
</script>
|
|
} |