mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-03-26 17:57:21 +08:00
# 2022-02-22
### 1.3.7 开源社区版: 无 ### 0.2.3 会员专业版: 【升级】升级uviewui框架到2.0.28版本,优化微信小程序框架流畅度。 【新增】后台商品管理新增获取单个商品的小程序二维码,方便进行宣传使用。 【优化】优化表单rules提示。 【修复】修复sku模型添加文本名称不对应的问题。#I4UPG1 【修复】修复商品列表页面点击进入商品过程,可能出现2次进入刷新闪屏的情况。 【修复】修复普通分类列表、为您推荐商品因文字一行导致的错位问题。
This commit is contained in:
@@ -31,12 +31,13 @@
|
||||
|
||||
|
||||
<script type="text/html" id="LAY-app-CoreCmsGoods-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" lay-event="del">删除</a>-->
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#goodsTbDelDrop{{d.LAY_INDEX}}" no-shade="true">删除</a>
|
||||
<div class="dropdown-menu-nav dropdown-popconfirm dropdown-top-right layui-hide" id="goodsTbDelDrop{{d.LAY_INDEX}}"
|
||||
style="max-width: 200px;white-space: normal;min-width: auto;margin-left: 10px;">
|
||||
style="max-width: 200px; white-space: normal; min-width: auto; margin-left: 10px;">
|
||||
<div class="dropdown-anchor"></div>
|
||||
<div class="dropdown-popconfirm-title">
|
||||
<i class="layui-icon layui-icon-help"></i>
|
||||
@@ -188,7 +189,7 @@
|
||||
[
|
||||
{ type: "checkbox", fixed: "left" },
|
||||
{ field: 'id', title: '序列', width: 50, sort: false },
|
||||
{ width: 142, align: 'center', title: '操作', toolbar: '#LAY-app-CoreCmsGoods-tableBox-bar' },
|
||||
{ width: 220, align: 'center', title: '操作', toolbar: '#LAY-app-CoreCmsGoods-tableBox-bar' },
|
||||
{ field: 'isMarketable', title: '上架', width: 80, templet: '#switch_isMarketable', sort: false, unresize: true },
|
||||
{ field: 'isRecommend', title: '推荐', width: 80, templet: '#switch_isRecommend', sort: false, unresize: true },
|
||||
{ field: 'isHot', title: '热门', width: 80, templet: '#switch_isHot', sort: false, unresize: true },
|
||||
@@ -269,6 +270,8 @@
|
||||
doDelete(obj);
|
||||
} else if (obj.event === 'edit') {
|
||||
doEdit(obj)
|
||||
} else if (obj.event === 'qrcode') {
|
||||
doQrCode(obj)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -605,6 +608,28 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//获取小程序码
|
||||
function doQrCode(obj) {
|
||||
coreHelper.Post("Api/Tools/GetGoodWxCode", { id: obj.data.id }, function (e) {
|
||||
if (e.code === 0) {
|
||||
admin.popup({
|
||||
shadeClose: false,
|
||||
title: '查看小程序码',
|
||||
area: ['380px', '480px'],
|
||||
id: 'LAY-popup-CoreCmsForm-QrCode',
|
||||
success: function (layero, index) {
|
||||
view(this.id).render('good/goods/qrCode', { data: e.data }).done(function () {
|
||||
form.render();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
layer.msg(e.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//监听 表格复选框操作
|
||||
|
||||
layui.form.on('switch(switch_isNomalVirtual)', function (obj) {
|
||||
|
||||
25
CoreCms.Net.Web.Admin/wwwroot/views/good/goods/qrCode.html
Normal file
25
CoreCms.Net.Web.Admin/wwwroot/views/good/goods/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-CoreCmsGoods-QrCode" id="LAY-app-CoreCmsGoods-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-CoreCmsGoods-QrCode');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">模型值:</label>
|
||||
<label class="layui-form-label">SKU模型值:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="value[]" required lay-verType="tips" lay-verify="required" placeholder="请输入SKU模型值" autocomplete="off" class="layui-input" style="width: 80%;display: inline-block;">
|
||||
<div class="layui-btn-group">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
{{# layui.each(d.params.data.specValues, function(index, item){ }}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">模型值:</label>
|
||||
<label class="layui-form-label">SKU模型值:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="value[]" value="{{item.value}}" required lay-verType="tips" lay-verify="required" placeholder="请输入SKU模型值" autocomplete="off" class="layui-input" style="width: 80%;display: inline-block;">
|
||||
<div class="layui-btn-group">
|
||||
|
||||
Reference in New Issue
Block a user