mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:23:26 +08:00
# 2022-02-15
### 1.3.6 开源社区版: 【调整】应广大会员需求,平台设计上传图片从裁剪上传,调整后直接录入图片地址或本地非裁剪上传。 ### 0.1.8 会员专业版: 【调整】平台设计上传图片从裁剪上传,调整后直接录入图片地址或本地非裁剪上传。 【修复】调整下单地址实现2行被遮挡问题。 【修复】修复下单地址未记录街道地址问题,导致订单地址可能出现误差的异常。 【修复】修复核销【提货单】详情图片未限制大小导致容易被撑破的问题。 【修复】修复核销【服务券】详情图片未限制大小导致容易被撑破的问题。 【升级】升级腾讯云COS云存储组件。 【降级】SixLabors.ImageSharp海报组件降级到1.04版本。解决海报生成问题。#I4SWCC 【修复】修复接龙模块列表图片未限制大小导致容易被撑破的问题。
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
|
||||
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.7.0" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="5.0.13" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="5.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
|
||||
<PackageReference Include="Qc.YilianyunSdk" Version="1.0.7" />
|
||||
<PackageReference Include="Qiniu" Version="8.0.0" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.0.0" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" />
|
||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta13" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.26" />
|
||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.27" />
|
||||
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ namespace CoreCms.Net.Services
|
||||
|
||||
//快递邮寄
|
||||
order.shipAreaId = userShipInfo.areaId;
|
||||
order.shipAddress = userShipInfo.address;
|
||||
order.shipAddress = userShipInfo.street + " " + userShipInfo.address;
|
||||
order.shipName = userShipInfo.name;
|
||||
order.shipMobile = userShipInfo.mobile;
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ using Newtonsoft.Json.Linq;
|
||||
using SixLabors.Fonts;
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.Drawing.Processing;
|
||||
using SixLabors.ImageSharp.Formats.Jpeg;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using SixLabors.ImageSharp.Processing;
|
||||
using SKIT.FlurlHttpClient.Wechat.Api;
|
||||
@@ -855,10 +854,7 @@ namespace CoreCms.Net.Services
|
||||
|
||||
//文件硬地址
|
||||
var savePath = _webHostEnvironment.WebRootPath + "/static/poster/";
|
||||
//用户二维码头像
|
||||
var qrCodeDir = _webHostEnvironment.WebRootPath + "/static/qrCode/weChat/" + otherData;
|
||||
|
||||
|
||||
//如果文件夹不存在,则创建文件夹
|
||||
if (!Directory.Exists(savePath)) Directory.CreateDirectory(savePath);
|
||||
|
||||
@@ -886,13 +882,14 @@ namespace CoreCms.Net.Services
|
||||
var images = goodModel.images.Split(",");
|
||||
if (images.Any())
|
||||
{
|
||||
var image = images[0];
|
||||
//创建一个背景宽度为400X600的底图
|
||||
using var imageTemple = new SixLabors.ImageSharp.Image<Rgba32>(400, 600);
|
||||
//设置底图的背景色为白色
|
||||
imageTemple.Mutate(x => x.BackgroundColor(SixLabors.ImageSharp.Color.White));
|
||||
//绘制商品图片(网络下载图片)
|
||||
HttpClient client = new HttpClient();
|
||||
HttpResponseMessage response = await client.GetAsync(goodModel.image);
|
||||
HttpResponseMessage response = await client.GetAsync(image);
|
||||
response.EnsureSuccessStatusCode();
|
||||
var stream = await response.Content.ReadAsStreamAsync();
|
||||
//载入下载的图片流
|
||||
@@ -904,11 +901,6 @@ namespace CoreCms.Net.Services
|
||||
});
|
||||
//将商品大图合并到背景图上
|
||||
imageTemple.Mutate(x => x.DrawImage(imageThumbnail, new SixLabors.ImageSharp.Point(0, 0), 1));
|
||||
|
||||
//如果已经存在用户头像的情况下。则附加渲染二维码
|
||||
//QrCode 根目录
|
||||
if (File.Exists(qrCodeDir))
|
||||
{
|
||||
//将用户的分享二维码合并大背景图上
|
||||
var imageQrcode = await SixLabors.ImageSharp.Image.LoadAsync(qrCodeDir);
|
||||
//将二维码缩略至120X120
|
||||
@@ -918,8 +910,6 @@ namespace CoreCms.Net.Services
|
||||
});
|
||||
//将二维码图片合并到背景图上
|
||||
imageTemple.Mutate(x => x.DrawImage(imageQrcode, new SixLabors.ImageSharp.Point(275, 420), 1));
|
||||
}
|
||||
|
||||
//构建字体//装载字体(ttf)(而且字体一定要支持简体中文的)
|
||||
var fonts = new FontCollection();
|
||||
SixLabors.Fonts.FontFamily fontFamily = fonts.Install(_webHostEnvironment.WebRootPath + "/fonts/SourceHanSansK-Normal.ttf");
|
||||
@@ -992,11 +982,6 @@ namespace CoreCms.Net.Services
|
||||
});
|
||||
//将商品大图合并到背景图上
|
||||
imageTemple.Mutate(x => x.DrawImage(imageThumbnail, new SixLabors.ImageSharp.Point(0, 0), 1));
|
||||
|
||||
//如果已经存在用户头像的情况下。则附加渲染二维码
|
||||
//QrCode 根目录
|
||||
if (File.Exists(qrCodeDir))
|
||||
{
|
||||
//将用户的分享二维码合并大背景图上
|
||||
var imageQrcode = await SixLabors.ImageSharp.Image.LoadAsync(qrCodeDir);
|
||||
//将二维码缩略至120X120
|
||||
@@ -1006,8 +991,6 @@ namespace CoreCms.Net.Services
|
||||
});
|
||||
//将二维码图片合并到背景图上
|
||||
imageTemple.Mutate(x => x.DrawImage(imageQrcode, new SixLabors.ImageSharp.Point(275, 420), 1));
|
||||
}
|
||||
|
||||
//构建字体//装载字体(ttf)(而且字体一定要支持简体中文的)
|
||||
var fonts = new FontCollection();
|
||||
SixLabors.Fonts.FontFamily fontFamily = fonts.Install(_webHostEnvironment.WebRootPath + "/fonts/SourceHanSansK-Normal.ttf");
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
<view class="store u-line-2">{{item.title}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="left"><image :src="item.thumbnail && item.thumbnail!='null' ? item.thumbnail : '/static/images/common/empty-banner.png'" mode="aspectFill"></image></view>
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.thumbnail && item.thumbnail!='null' ? item.thumbnail : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="type u-line-4">{{item.description}}</view>
|
||||
<view class="delivery-time">截止时间:{{ $u.timeFormat(item.endTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
<view>{{item.statusName}}</view>
|
||||
</view>
|
||||
<view class="item" v-for="(v, key) in item.orderItems" :key="key">
|
||||
<view class="left"><image :src="v.imageUrl && v.imageUrl!='null' ? v.imageUrl : '/static/images/common/empty-banner.png'" mode="aspectFill"></image></view>
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="v.imageUrl && v.imageUrl!='null' ? v.imageUrl : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{v.name}}</view>
|
||||
<view class="type">{{v.addon}}</view>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="left">
|
||||
<u--image :showLoading="true" :src="item.thumbnail && item.thumbnail!='null' ? item.thumbnail : '/static/images/common/empty-banner.png'" width="80px" height="80px"></u--image>
|
||||
<u--image :showLoading="true" :src="item.service.thumbnail && item.service.thumbnail!='null' ? item.service.thumbnail : '/static/images/common/empty-banner.png'" width="80px" height="80px" mode="aspectFill"></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title u-line-2">{{item.service.title}}</view>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.coreshop-card { position: relative; padding: 9px; border-radius: 4.5px; box-shadow: 0 0 5.5px #f7f7f7; }
|
||||
}
|
||||
.address-view {
|
||||
.coreshop-list.menu-avatar > .coreshop-list-item { height: 55px;
|
||||
.coreshop-list.menu-avatar > .coreshop-list-item { height: 65px;
|
||||
&:after { width: 0; height: 0; border-bottom: 0; }
|
||||
.icon-view { position: absolute; border-radius: 100%; text-align: center; line-height: 23px; height: 23px; width: 23px; left: 4.5px; top: 10px; }
|
||||
.content { left: 26px; width: calc(100% - 37px - 14px); }
|
||||
|
||||
@@ -62,15 +62,15 @@
|
||||
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.8" />
|
||||
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.8" />
|
||||
<PackageReference Include="IdentityModel" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.1.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.2" />
|
||||
<PackageReference Include="NLog" Version="4.7.13" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
<PackageReference Include="NPOI" Version="2.4.1" />
|
||||
@@ -78,7 +78,7 @@
|
||||
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.15.1" />
|
||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.26" />
|
||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.27" />
|
||||
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.12" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -538,7 +538,7 @@ Vue.component('upload-img', {
|
||||
props: ['index', "item"],
|
||||
methods: {
|
||||
upload: function () {
|
||||
this.$emit('upload-img')
|
||||
this.$emit('upload-img');
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1032,27 +1032,27 @@ Vue.component('layout-config', {
|
||||
},
|
||||
upImage: function (index, item) {
|
||||
var _that = this;
|
||||
layui.use(['admin', 'coreHelper', 'cropperImg'],
|
||||
function () {
|
||||
var $ = layui.$, coreHelper = layui.coreHelper, cropperImg = layui.cropperImg;
|
||||
cropperImg.cropImg({
|
||||
aspectRatio: 16 / 9,
|
||||
imgSrc: _that.selectWg.value.list[index].image,
|
||||
onCrop: function (data) {
|
||||
var loadIndex = layer.load(2);
|
||||
coreHelper.Post("api/Tools/UploadFilesFByBase64", { base64: data }, function (res) {
|
||||
if (0 === res.code) {
|
||||
_that.$set(_that.selectWg.value.list[index], 'image', res.data.fileUrl)
|
||||
layer.msg(res.msg);
|
||||
layer.close(loadIndex);
|
||||
} else {
|
||||
layer.close(loadIndex);
|
||||
layer.msg(res.msg, { icon: 2, anim: 6 });
|
||||
}
|
||||
layui.use(['form', 'table'], function () {
|
||||
layui.admin.popup({
|
||||
title: '图片设置',
|
||||
area: ['800px', '300px'],
|
||||
id: 'LAY-app-CoreCmsCommon-GetNoticeIds',
|
||||
success: function (layero, indexChild) {
|
||||
layui.view(this.id).render('common/getUpLoad', null).done(function () {
|
||||
layui.form.on('submit(LAY-app-getUpLoad-submit)',
|
||||
function (data) {
|
||||
console.log(data);
|
||||
_that.$set(_that.selectWg.value.list[index], 'image', data.field.imagesUrl)
|
||||
layer.close(indexChild);
|
||||
});
|
||||
});
|
||||
}
|
||||
, btn: ['确定', '取消']
|
||||
, yes: function (index, layero) {
|
||||
layero.contents().find("#LAY-app-getUpLoad-submit").click();
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
},
|
||||
upTopSlideBgImage: function (index, item) {
|
||||
var _that = this;
|
||||
@@ -1188,7 +1188,6 @@ Vue.component('layout-config', {
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
selectNotice: function () {
|
||||
var that = this;
|
||||
layui.use(['form', 'table'], function () {
|
||||
|
||||
76
CoreCms.Net.Web.Admin/wwwroot/views/common/getUpLoad.html
Normal file
76
CoreCms.Net.Web.Admin/wwwroot/views/common/getUpLoad.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<script type="text/html" template lay-done="layui.data.done(d);">
|
||||
<div class="layui-form coreshop-form layui-form-pane">
|
||||
<blockquote class="layui-elem-quote">
|
||||
请选择小于5M的图片进行裁剪上传
|
||||
</blockquote>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">图像地址:</label>
|
||||
<div class="layui-input-inline layui-inline-8">
|
||||
<input name="imagesUrl" id="imagesUrl" type="text" class="layui-input" lay-verify="required|url" lay-reqText="可手动输入地址或点击上传" />
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<img class="coreshop-upload-img" id="viewImgBoximageUrl" src="{{ layui.setter.noImagePicUrl }}">
|
||||
<button type="button" class="layui-btn" id="upBtn" lay-active="doCropperImg">上传图片</button>
|
||||
<div id="viewTextBox"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item core-hidden">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer">
|
||||
<input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-getUpLoad-submit" id="LAY-app-getUpLoad-submit" value="确认添加">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
var debug = layui.setter.debug;
|
||||
layui.data.done = function (d) {
|
||||
//开启调试情况下获取接口赋值数据
|
||||
if (debug) { console.log(d); }
|
||||
layui.use(['index', 'table', 'laydate', 'upload', 'coreHelper'],
|
||||
function () {
|
||||
var $ = layui.$
|
||||
, admin = layui.admin
|
||||
, table = layui.table
|
||||
, form = layui.form
|
||||
, laydate = layui.laydate
|
||||
, setter = layui.setter
|
||||
, coreHelper = layui.coreHelper
|
||||
, upload = layui.upload
|
||||
, view = layui.view;
|
||||
|
||||
//普通图片上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#upBtn'
|
||||
, url: layui.setter.apiUrl + 'Api/Tools/UploadFiles'
|
||||
, before: function (obj) {
|
||||
obj.preview(function (index, file, result) {
|
||||
$('#viewImgBox').attr('src', result);
|
||||
});
|
||||
}
|
||||
, done: function (res) {
|
||||
if (res.code > 0) { return layer.msg('上传失败'); }
|
||||
layer.msg('上传成功');
|
||||
$("#imagesUrl").val(res.data.fileUrl);
|
||||
}
|
||||
, error: function () {
|
||||
var viewTextBox = $('#viewTextBox');
|
||||
viewTextBox.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
|
||||
viewTextBox.find('.demo-reload').on('click', function () {
|
||||
uploadInst.upload();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//重载form
|
||||
form.render();
|
||||
|
||||
});
|
||||
};
|
||||
</script>
|
||||
@@ -57,17 +57,17 @@
|
||||
<PackageReference Include="Hangfire.Core" Version="1.7.28" />
|
||||
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
||||
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.1.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.2" />
|
||||
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
|
||||
<PackageReference Include="NLog" Version="4.7.13" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
<PackageReference Include="Qc.YilianyunSdk" Version="1.0.7" />
|
||||
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
|
||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.26" />
|
||||
<PackageReference Include="Tencent.QCloud.Cos.Sdk" Version="5.4.27" />
|
||||
<PackageReference Include="ToolGood.Words" Version="3.0.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user