mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-07 01:03:26 +08:00
【新增】后端代理商列表、分销商列表增加二维码功能。
This commit is contained in:
@@ -82,6 +82,7 @@
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="LAY-app-CoreCmsAgent-tableBox-bar">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="qrcode">小程序码</a>
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#CoreCmsAgentTbDelDrop{{d.LAY_NUM}}" no-shade="true">删除</a>
|
||||
@@ -189,7 +190,7 @@
|
||||
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
||||
{ field: 'verifyTime', title: '审核时间', width: 130, sort: false },
|
||||
//{ field: 'isDelete', title: '是否删除', width: 95, templet: '#switch_isDelete', sort: false, unresize: true },
|
||||
{ width: 142, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsAgent-tableBox-bar' }
|
||||
{ width: 222, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsAgent-tableBox-bar' }
|
||||
]
|
||||
]
|
||||
});
|
||||
@@ -226,6 +227,8 @@
|
||||
doDelete(obj);
|
||||
} else if (obj.event === 'edit') {
|
||||
doEdit(obj)
|
||||
} else if (obj.event === 'qrcode') {
|
||||
doQrCode(obj)
|
||||
}
|
||||
});
|
||||
//执行创建操作
|
||||
@@ -342,6 +345,28 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//获取小程序码
|
||||
function doQrCode(obj) {
|
||||
coreHelper.Post("Api/Tools/GetAgentWxCode", { id: obj.data.userId }, function (e) {
|
||||
if (e.code === 0) {
|
||||
admin.popup({
|
||||
shadeClose: false,
|
||||
title: '查看小程序码',
|
||||
area: ['380px', '480px'],
|
||||
id: 'LAY-popup-CoreCmsAgent-QrCode',
|
||||
success: function (layero, index) {
|
||||
view(this.id).render('agent/agents/qrCode', { data: e.data }).done(function () {
|
||||
form.render();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//执行单个删除
|
||||
function doDelete(obj) {
|
||||
//console.log(obj.data.id);
|
||||
|
||||
25
CoreCms.Net.Web.Admin/wwwroot/views/agent/agents/qrCode.html
Normal file
25
CoreCms.Net.Web.Admin/wwwroot/views/agent/agents/qrCode.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<script type="text/html" template lay-done="layui.data.done(d);">
|
||||
<div style="text-align: center" lay-filter="LAY-app-CoreCmsAgent-QrCode" id="LAY-app-CoreCmsAgent-QrCode">
|
||||
<img id="cavasimg" src="{{d.params.data.fileUrl}}" width="300" height="341" style="border: 1px solid #c0c0c0" />
|
||||
<div style="width: 100%;text-align:center;margin-top: 20px;">
|
||||
<a class="layui-btn" href="{{d.params.data.fileUrl}}" target="_blank">下载二维码</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var debug = layui.setter.debug;
|
||||
layui.data.done = function (d) {
|
||||
//开启调试情况下获取接口赋值数据
|
||||
if (debug) { console.log(d.params.data); }
|
||||
|
||||
layui.use(['admin', 'form', 'coreHelper'], function () {
|
||||
var $ = layui.$
|
||||
, setter = layui.setter
|
||||
, admin = layui.admin
|
||||
, coreHelper = layui.coreHelper
|
||||
, form = layui.form;
|
||||
form.render(null, 'LAY-app-CoreCmsAgent-detailsForm');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
@@ -103,6 +103,7 @@
|
||||
|
||||
|
||||
<script type="text/html" id="LAY-app-CoreCmsDistribution-tableBox-bar">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="qrcode">小程序码</a>
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">审核</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#CoreCmsDistributionTbDelDrop{{d.LAY_NUM}}" no-shade="true">删除</a>
|
||||
@@ -219,7 +220,7 @@
|
||||
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
||||
{ field: 'verifyTime', title: '审核时间', width: 130, sort: false },
|
||||
//{ field: 'isDelete', title: '是否删除', width: 95, templet: '#switch_isDelete', sort: false, unresize: true },
|
||||
{ width: 142, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsDistribution-tableBox-bar' }
|
||||
{ width: 222, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsDistribution-tableBox-bar' }
|
||||
]
|
||||
]
|
||||
});
|
||||
@@ -256,6 +257,8 @@
|
||||
doDelete(obj);
|
||||
} else if (obj.event === 'edit') {
|
||||
doEdit(obj)
|
||||
} else if (obj.event === 'qrcode') {
|
||||
doQrCode(obj)
|
||||
}
|
||||
});
|
||||
//执行创建操作
|
||||
@@ -372,6 +375,28 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//获取小程序码
|
||||
function doQrCode(obj) {
|
||||
coreHelper.Post("Api/Tools/GetDistributionWxCode", { id: obj.data.userId }, function (e) {
|
||||
if (e.code === 0) {
|
||||
admin.popup({
|
||||
shadeClose: false,
|
||||
title: '查看小程序码',
|
||||
area: ['380px', '480px'],
|
||||
id: 'LAY-popup-CoreCmsDistributor-QrCode',
|
||||
success: function (layero, index) {
|
||||
view(this.id).render('distribution/distributor/qrCode', { data: e.data }).done(function () {
|
||||
form.render();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//执行单个删除
|
||||
function doDelete(obj) {
|
||||
//console.log(obj.data.id);
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<script type="text/html" template lay-done="layui.data.done(d);">
|
||||
<div style="text-align: center" lay-filter="LAY-app-CoreCmsDistributor-QrCode" id="LAY-app-CoreCmsDistributor-QrCode">
|
||||
<img id="cavasimg" src="{{d.params.data.fileUrl}}" width="300" height="341" style="border: 1px solid #c0c0c0" />
|
||||
<div style="width: 100%;text-align:center;margin-top: 20px;">
|
||||
<a class="layui-btn" href="{{d.params.data.fileUrl}}" target="_blank">下载二维码</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var debug = layui.setter.debug;
|
||||
layui.data.done = function (d) {
|
||||
//开启调试情况下获取接口赋值数据
|
||||
if (debug) { console.log(d.params.data); }
|
||||
|
||||
layui.use(['admin', 'form', 'coreHelper'], function () {
|
||||
var $ = layui.$
|
||||
, setter = layui.setter
|
||||
, admin = layui.admin
|
||||
, coreHelper = layui.coreHelper
|
||||
, form = layui.form;
|
||||
form.render(null, 'LAY-app-CoreCmsDistributor-detailsForm');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user