diff --git a/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj b/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj
index 0d8a767f..46c0a429 100644
--- a/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj
+++ b/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj b/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj
index a051e37b..a268e7a6 100644
--- a/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj
+++ b/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/CoreCms.Net.Core/CoreCms.Net.Core.csproj b/CoreCms.Net.Core/CoreCms.Net.Core.csproj
index 43b93f35..dfae7f49 100644
--- a/CoreCms.Net.Core/CoreCms.Net.Core.csproj
+++ b/CoreCms.Net.Core/CoreCms.Net.Core.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/CoreCms.Net.IServices/Message/ICoreCmsSmsServices.cs b/CoreCms.Net.IServices/Message/ICoreCmsSmsServices.cs
index 86be1344..7dad95ae 100644
--- a/CoreCms.Net.IServices/Message/ICoreCmsSmsServices.cs
+++ b/CoreCms.Net.IServices/Message/ICoreCmsSmsServices.cs
@@ -44,7 +44,7 @@ namespace CoreCms.Net.IServices
///
///
///
- string SendSms(string mobile, string contentBody, SMSOptions smsOptions);
+ Task SendSms(string mobile, string contentBody, SMSOptions smsOptions);
///
/// 校验短信验证码
diff --git a/CoreCms.Net.IServices/User/ICoreCmsUserBankCardServices.cs b/CoreCms.Net.IServices/User/ICoreCmsUserBankCardServices.cs
index 5218f967..b766c90f 100644
--- a/CoreCms.Net.IServices/User/ICoreCmsUserBankCardServices.cs
+++ b/CoreCms.Net.IServices/User/ICoreCmsUserBankCardServices.cs
@@ -56,7 +56,7 @@ namespace CoreCms.Net.IServices
///
///
///
- WebApiCallBack BankCardsOrganization(string cardCode);
+ Task BankCardsOrganization(string cardCode);
///
diff --git a/CoreCms.Net.Model/CoreCms.Net.Model.csproj b/CoreCms.Net.Model/CoreCms.Net.Model.csproj
index ae4a0fb8..98e530e9 100644
--- a/CoreCms.Net.Model/CoreCms.Net.Model.csproj
+++ b/CoreCms.Net.Model/CoreCms.Net.Model.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj b/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj
index 33caef19..a63742a4 100644
--- a/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj
+++ b/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj
@@ -5,10 +5,10 @@
-
+
-
+
diff --git a/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj b/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj
index 10d8d5a0..df3146c9 100644
--- a/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj
+++ b/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/CoreCms.Net.Services/Com/ToolsServices.cs b/CoreCms.Net.Services/Com/ToolsServices.cs
index bdf2f8b9..08df4b8d 100644
--- a/CoreCms.Net.Services/Com/ToolsServices.cs
+++ b/CoreCms.Net.Services/Com/ToolsServices.cs
@@ -10,7 +10,6 @@
using System;
-using System.Drawing;
using System.Globalization;
using System.IO;
using System.Threading.Tasks;
@@ -31,6 +30,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.FileProviders;
using Qiniu.Storage;
using Qiniu.Util;
+using SixLabors.ImageSharp;
using ToolGood.Words;
namespace CoreCms.Net.Services
@@ -302,8 +302,11 @@ namespace CoreCms.Net.Services
var newFileName = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + ".jpg";
var today = DateTime.Now.ToString("yyyyMMdd");
- Image mImage = Image.FromStream(memStream);
- Bitmap bp = new Bitmap(mImage);
+ byte[] data = new byte[memStream.Length];
+ memStream.Seek(0, SeekOrigin.Begin);
+ memStream.Read(data, 0, Convert.ToInt32(memStream.Length));
+ SixLabors.ImageSharp.Image image = SixLabors.ImageSharp.Image.Load(new MemoryStream(data));
+
var saveUrl = options.Path + today + "/";
var dirPath = _webHostEnvironment.WebRootPath + saveUrl;
@@ -322,7 +325,8 @@ namespace CoreCms.Net.Services
var filePath = dirPath + newFileName;
var fileUrl = saveUrl + newFileName;
- bp.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);//注意保存路径
+ //保存到图片
+ image.SaveAsync(filePath);
return bucketBindDomain + fileUrl;
}
diff --git a/CoreCms.Net.Services/CoreCms.Net.Services.csproj b/CoreCms.Net.Services/CoreCms.Net.Services.csproj
index 67ab1a7b..1689db4a 100644
--- a/CoreCms.Net.Services/CoreCms.Net.Services.csproj
+++ b/CoreCms.Net.Services/CoreCms.Net.Services.csproj
@@ -6,13 +6,15 @@
-
+
+
+
diff --git a/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs b/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs
index 8a91ce37..49f90512 100644
--- a/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs
+++ b/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs
@@ -20,6 +20,7 @@ using CoreCms.Net.Model.ViewModels.Sms;
using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Utility.Extensions;
using CoreCms.Net.Utility.Helper;
+using Flurl.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
@@ -154,12 +155,19 @@ namespace CoreCms.Net.Services
///
///
/// 配置文件
- public string SendSms(string mobile, string contentBody, SMSOptions smsOptions)
+ public async Task SendSms(string mobile, string contentBody, SMSOptions smsOptions)
{
if (smsOptions.Enabled)
{
- string param = $@"action=send&userid={smsOptions.UserId}&account={smsOptions.Account}&password={smsOptions.Password}&content={"【" + smsOptions.Signature + "】" + contentBody}&mobile={mobile}";
- var str = HttpHelper.PostSend(smsOptions.ApiUrl, param);
+ var str = await smsOptions.ApiUrl.PostUrlEncodedAsync(new
+ {
+ action = "send",
+ userid = smsOptions.UserId,
+ account = smsOptions.Account,
+ password = smsOptions.Password,
+ mobile = mobile,
+ content = "【" + smsOptions.Signature + "】" + contentBody,
+ }).ReceiveString();
return str;
}
else
diff --git a/CoreCms.Net.Services/Share/CoreCmsShareServices.cs b/CoreCms.Net.Services/Share/CoreCmsShareServices.cs
index 5553de66..27f848e9 100644
--- a/CoreCms.Net.Services/Share/CoreCmsShareServices.cs
+++ b/CoreCms.Net.Services/Share/CoreCmsShareServices.cs
@@ -10,11 +10,9 @@
using System;
using System.Collections.Generic;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Drawing.Imaging;
using System.IO;
using System.Linq;
+using System.Net.Http;
using System.Threading.Tasks;
using System.Web;
using CoreCms.Net.Caching.AccressToken;
@@ -31,6 +29,12 @@ using CoreCms.Net.WeChat.Service.Options;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Options;
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;
using SKIT.FlurlHttpClient.Wechat.Api.Models;
@@ -854,7 +858,6 @@ namespace CoreCms.Net.Services
//文件硬地址
var qrCodeDir = _webHostEnvironment.WebRootPath + "/static/qrCode/weChat/" + otherData;
- System.Drawing.Image qrCodeImage = System.Drawing.Image.FromFile(qrCodeDir);
//获取数据来源
var dataObj = JObject.FromObject(data);
@@ -881,58 +884,67 @@ namespace CoreCms.Net.Services
if (images.Any())
{
var image = images[0];
- //创建画布
- //创建 带二维码的图片 大小的 位图
- Bitmap tmpImage = new Bitmap(400, 600);
- System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(tmpImage);
- //下面这个设成High
- g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
- g.SmoothingMode = SmoothingMode.HighQuality;
- g.CompositingQuality = CompositingQuality.HighQuality;
- //清除整个绘图面并以背景色填充
- //g.Clear(Color.Transparent);// 透明(看到的可能是黑色)
- g.Clear(Color.White); //绘制白色
-
+ //创建一个背景宽度为400X600的底图
+ using var imageTemple = new SixLabors.ImageSharp.Image(400, 600);
+ //设置底图的背景色为白色
+ imageTemple.Mutate(x => x.BackgroundColor(SixLabors.ImageSharp.Color.White));
//绘制商品图片(网络下载图片)
- System.Net.WebRequest request = System.Net.WebRequest.Create(image);
- System.Net.WebResponse response = request.GetResponse();
- Stream reader = response.GetResponseStream();
- if (reader != null)
+ HttpClient client = new HttpClient();
+ HttpResponseMessage response = await client.GetAsync(image);
+ response.EnsureSuccessStatusCode();
+ var stream = await response.Content.ReadAsStreamAsync();
+ //载入下载的图片流
+ var imageThumbnail = await SixLabors.ImageSharp.Image.LoadAsync(stream);
+ //将下载的图片压缩至400X400
+ imageThumbnail.Mutate(x =>
{
- System.Drawing.Image imgHeadPhoto = System.Drawing.Image.FromStream(reader);
- g.DrawImage(imgHeadPhoto, 0, 0, 400, 400);
- imgHeadPhoto.Dispose();
- }
- reader.Close();
- reader.Dispose();
-
- //绘制分享二维码
- g.DrawImage(qrCodeImage, 275, 420, 120, 120);
-
- //绘制商品名称
- Font titleFont = new Font("微软雅黑", 14);
-
- RectangleF descRect = new RectangleF();
- descRect.Location = new Point(10, 460);
- descRect.Size = new Size(260, ((int)g.MeasureString(goodModel.name, titleFont, 260, StringFormat.GenericTypographic).Height));
- g.DrawString(goodModel.name, titleFont, Brushes.Black, descRect);
-
- //g.DrawString(goodModel.name, titleFont, new SolidBrush(Color.Black), new PointF(10, 430));
-
+ x.Resize(400, 400);
+ });
+ //将商品大图合并到背景图上
+ imageTemple.Mutate(x => x.DrawImage(imageThumbnail, new SixLabors.ImageSharp.Point(0, 0), 1));
+ //将用户的分享二维码合并大背景图上
+ var imageQrcode = await SixLabors.ImageSharp.Image.LoadAsync(qrCodeDir);
+ //将二维码缩略至120X120
+ imageQrcode.Mutate(x =>
+ {
+ x.Resize(120, 120);
+ });
+ //将二维码图片合并到背景图上
+ 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");
+ //商品名称可能较长,设置为多行文本输出
+ SixLabors.Fonts.Font titleFont = new SixLabors.Fonts.Font(fontFamily, 20, SixLabors.Fonts.FontStyle.Regular);
+ //多行文本输出
+ var textOptions = new TextOptions()
+ {
+ ApplyKerning = true,
+ VerticalAlignment = VerticalAlignment.Top,
+ HorizontalAlignment = HorizontalAlignment.Left,
+ WrapTextWidth = 230
+ };
+ var graphicsOptions = new GraphicsOptions()
+ {
+ Antialias = true
+ };
+ //沿着行尾的绕行路径绘制文本
+ var options = new SixLabors.ImageSharp.Drawing.Processing.DrawingOptions
+ {
+ GraphicsOptions = graphicsOptions,
+ TextOptions = textOptions
+ };
+ //开始绘制商品名称
+ imageTemple.Mutate(ctx => ctx.DrawText(options, goodModel.name, titleFont, SixLabors.ImageSharp.Color.Red, new SixLabors.ImageSharp.PointF(10, 450)));
//绘制商品金额
- Font moneyFont = new Font("微软雅黑", 18);
- g.DrawString("¥" + goodModel.price, moneyFont, new SolidBrush(Color.Crimson), new PointF(10, 420));
-
+ SixLabors.Fonts.Font moneyFont = new SixLabors.Fonts.Font(fontFamily, 18);
+ //获取该文件绘制所需的大小
+ imageTemple.Mutate(ctx => ctx.DrawText("¥" + goodModel.price, moneyFont, SixLabors.ImageSharp.Color.Crimson, new SixLabors.ImageSharp.PointF(10, 410)));
//绘制提示语
- Font tipsFont = new Font("微软雅黑", 8);
- g.DrawString("扫描或长按识别二维码", tipsFont, new SolidBrush(Color.Black), new PointF(278, 555));
-
- //释放资源 并保存要返回 位图
- qrCodeImage.Dispose();
- //图片压缩
- SaveImage2File(_webHostEnvironment.WebRootPath + fileName, tmpImage, 90);
- g.Dispose();
- tmpImage.Dispose();
+ SixLabors.Fonts.Font tipsFont = new SixLabors.Fonts.Font(fontFamily, 10);
+ imageTemple.Mutate(ctx => ctx.DrawText("扫描或长按识别二维码", tipsFont, SixLabors.ImageSharp.Color.Black, new SixLabors.ImageSharp.PointF(283, 555)));
+ //载入流存储在到文件
+ await imageTemple.SaveAsync(_webHostEnvironment.WebRootPath + fileName);
return true;
}
@@ -943,32 +955,6 @@ namespace CoreCms.Net.Services
return false;
}
- ///
- /// 将Image实例保存到文件,注意此方法不执行 img.Dispose()
- /// 图片保存时本可以直接使用destImage.Save(path, ImageFormat.Jpeg),但是这种方法无法进行进一步控制图片质量
- ///
- ///
- ///
- /// 1~100整数,无效值,则取默认值95
- ///
- private void SaveImage2File(string path, Image destImage, int quality, string mimeType = "image/jpeg")
- {
- if (quality <= 0 || quality > 100) quality = 95;
- //创建保存的文件夹
- FileInfo fileInfo = new FileInfo(path);
- if (!Directory.Exists(fileInfo.DirectoryName))
- {
- Directory.CreateDirectory(fileInfo.DirectoryName);
- }
- //设置保存参数,保存参数里进一步控制质量
- EncoderParameters encoderParams = new EncoderParameters();
- long[] qua = new long[] { quality };
- EncoderParameter encoderParam = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, quality);
- encoderParams.Param[0] = encoderParam;
- //获取指定mimeType的mimeType的ImageCodecInfo
- var codecInfo = ImageCodecInfo.GetImageEncoders().FirstOrDefault(ici => ici.MimeType == mimeType);
- destImage.Save(path, codecInfo, encoderParams);
- }
-
+
}
}
diff --git a/CoreCms.Net.Services/User/CoreCmsUserBankCardServices.cs b/CoreCms.Net.Services/User/CoreCmsUserBankCardServices.cs
index f4ec9fca..28f45be7 100644
--- a/CoreCms.Net.Services/User/CoreCmsUserBankCardServices.cs
+++ b/CoreCms.Net.Services/User/CoreCmsUserBankCardServices.cs
@@ -20,6 +20,7 @@ using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Utility.Extensions;
using CoreCms.Net.Utility.Helper;
+using Flurl.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SqlSugar;
@@ -248,12 +249,12 @@ namespace CoreCms.Net.Services
///
///
///
- public WebApiCallBack BankCardsOrganization(string cardCode)
+ public async Task BankCardsOrganization(string cardCode)
{
var jm = new WebApiCallBack();
var url = "https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardNo=" + cardCode + "&cardBinCheck=true";
- var res = HttpHelper.PostSend(url, "");
+ var res = await url.GetStringAsync();
var resObj = JObject.Parse(res);
if (!resObj.ContainsKey("validated"))
{
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/changelog.md b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/changelog.md
index b49f80ba..6dd72f64 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/changelog.md
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/changelog.md
@@ -1,3 +1,41 @@
+## 2.0.19(2021-12-29)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 优化微信小程序包体积可在微信中预览,请升级HbuilderX3.3.4,同时在“运行->运行到小程序模拟器”中勾选“运行时是否压缩代码”
+2. 优化微信小程序setData性能,处理某些方法如$u.route()无法在模板中使用的问题
+3. navbar添加autoBack参数
+4. 允许avatar组件的事件冒泡
+5. 修复cell组件报错问题
+6. 其他修复
+## 2.0.18(2021-12-28)
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 修复app端编译报错问题
+2. 重新处理微信小程序端setData过大的性能问题
+3. 修复边框问题
+4. 修复最大最小月份不大于0则没有数据出现的问题
+5. 修复SwipeAction微信小程序端无法上下滑动问题
+6. 修复input的placeholder在小程序端默认显示为true问题
+7. 修复divider组件click事件无效问题
+8. 修复u-code-input maxlength 属性值为 String 类型时显示异常
+9. 修复当 grid只有 1到2时 在小程序端algin设置无效的问题
+10. 处理form-item的label为top时,取消错误提示的左边距
+11. 其他修复
+## 2.0.17(2021-12-26)
+## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 解决HBuilderX3.3.3.20211225版本导致的样式问题
+2. calendar日历添加monthNum参数
+3. navbar添加center slot
+## 2.0.16(2021-12-25)
+## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
+
+# uView2.0重磅发布,利剑出鞘,一统江湖
+
+1. 解决微信小程序setData性能问题
+2. 修复count-down组件change事件不触发问题
## 2.0.15(2021-12-21)
## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583)
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u--image/u--image.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u--image/u--image.vue
index 50c4d57f..21b7ab19 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u--image/u--image.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u--image/u--image.vue
@@ -20,7 +20,14 @@
@click="$emit('click')"
@error="$emit('error')"
@load="$emit('load')"
- >
+ >
+
+
+
+
+
+
+
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue
index 7852fabb..51175b54 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue
@@ -129,7 +129,7 @@
];
let tmp = [];
// 打乱顺序
- if (this.random) data = this.$u.randomArray(data);
+ if (this.random) data = uni.$u.randomArray(data);
// 切割成二维数组
tmp[0] = data.slice(0, 10);
tmp[1] = data.slice(10, 20);
@@ -177,7 +177,7 @@
'M'
];
let tmp = [];
- if (this.random) data = this.$u.randomArray(data);
+ if (this.random) data = uni.$u.randomArray(data);
tmp[0] = data.slice(0, 10);
tmp[1] = data.slice(10, 20);
tmp[2] = data.slice(20, 30);
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-cell/props.js b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-cell/props.js
index 3c195432..8e1363c1 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-cell/props.js
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-cell/props.js
@@ -77,18 +77,24 @@ export default {
},
// 左侧图标样式
iconStyle: {
- type: Object,
- default: () => {}
+ type: [Object, String],
+ default: () => {
+ return uni.$u.props.cell.iconStyle
+ }
},
// 右侧箭头图标的样式
rightIconStyle: {
- type: Object,
- default: () => uni.$u.props.cell.rightIconStyle
+ type: [Object, String],
+ default: () => {
+ return uni.$u.props.cell.rightIconStyle
+ }
},
// 标题的样式
titleStyle: {
- type: Object,
- default: () => uni.$u.props.cell.titleStyle
+ type: [Object, String],
+ default: () => {
+ return uni.$u.props.cell.titleStyle
+ }
},
// 单位元的大小,可选值为large
size: {
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-cell/u-cell.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-cell/u-cell.vue
index 196c5e7d..03b2462a 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-cell/u-cell.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-cell/u-cell.vue
@@ -11,7 +11,7 @@
- {{ title }}
@@ -58,8 +58,9 @@
* @property {Boolean} required 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件) (默认 false )
* @property {String} rightIcon 右侧的图标箭头 (默认 'arrow-right')
* @property {String} arrowDirection 右侧箭头的方向,可选值为:left,up,down
- * @property {Object} rightIconStyle 右侧箭头图标的样式
- * @property {Object} titleStyle 标题的样式
+ * @property {Object | String} rightIconStyle 右侧箭头图标的样式
+ * @property {Object | String} titleStyle 标题的样式
+ * @property {Object | String} iconStyle 左侧图标样式
* @property {String} size 单位元的大小,可选值为 large,normal,mini
* @property {Boolean} stop 点击cell是否阻止事件传播 (默认 true )
* @property {Object} customStyle 定义需要用到的外部样式
@@ -75,6 +76,11 @@
}
},
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+ computed: {
+ titleTextStyle() {
+ return uni.$u.addStyle(this.titleStyle)
+ }
+ },
methods: {
// 点击cell
clickHandler(e) {
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-code-input/u-code-input.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-code-input/u-code-input.vue
index a8a68578..4754ba03 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-code-input/u-code-input.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-code-input/u-code-input.vue
@@ -84,7 +84,7 @@
computed: {
// 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
codeLength() {
- return new Array(this.maxlength)
+ return new Array(Number(this.maxlength))
},
// 循环item的样式
itemStyle() {
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue
index 347f39b7..2f274a13 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue
@@ -187,7 +187,7 @@
queryRect() {
// #ifndef APP-NVUE
// $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://www.uviewui.com/js/getRect.html
- // 组件内部一般用this.$uGetRect,对外的为this.$u.getRect,二者功能一致,名称不同
+ // 组件内部一般用this.$uGetRect,对外的为uni.$u.getRect,二者功能一致,名称不同
return new Promise(resolve => {
this.$uGetRect(`#${this.elId}`).then(size => {
resolve(size)
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-count-down/u-count-down.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-count-down/u-count-down.vue
index f18365c3..b5e85a63 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-count-down/u-count-down.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-count-down/u-count-down.vue
@@ -97,7 +97,7 @@
if (this.remainTime !== 0) {
this.microTick()
}
- }, 30)
+ }, 50)
},
// 获取剩余的时间
getRemainTime() {
@@ -109,10 +109,7 @@
this.remainTime = remain
// 根据剩余的毫秒时间,得出该有天,小时,分钟等的值,返回一个对象
const timeData = parseTimeData(remain)
- // 如果有传入slot内容,则发出change事件
- if(this.$slots.default || this.$slots.$default) {
- this.$emit('change', timeData)
- }
+ this.$emit('change', timeData)
// 得出格式化后的时间
this.formattedTime = parseFormat(this.format, timeData)
// 如果时间已到,停止倒计时
@@ -123,17 +120,17 @@
},
// 重置倒计时
reset() {
- this.pause()
- this.remainTime = this.time
- this.setRemainTime(this.remainTime)
- if (this.autoStart) {
- this.start()
- }
+ this.pause()
+ this.remainTime = this.time
+ this.setRemainTime(this.remainTime)
+ if (this.autoStart) {
+ this.start()
+ }
},
// 暂停倒计时
pause() {
- this.runing = false;
- this.clearTimeout()
+ this.runing = false;
+ this.clearTimeout()
},
// 清空定时器
clearTimeout() {
@@ -147,16 +144,20 @@
}
-
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-divider/u-divider.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-divider/u-divider.vue
index 4f922552..b629da64 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-divider/u-divider.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-divider/u-divider.vue
@@ -2,6 +2,7 @@
锦瑟无端五十弦
*/
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-form-item/u-form-item.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-form-item/u-form-item.vue
index af977153..1663cf89 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-form-item/u-form-item.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-form-item/u-form-item.vue
@@ -9,6 +9,7 @@
>
+
{{ message }}
@@ -111,6 +112,11 @@
}
},
// 组件创建完成时,将当前实例保存到u-form中
+ computed: {
+ propsLine() {
+ return uni.$u.props.line
+ }
+ },
mounted() {
this.init()
},
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-grid/u-grid.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-grid/u-grid.vue
index 5ac878f5..b43cc270 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-grid/u-grid.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-grid/u-grid.vue
@@ -90,10 +90,8 @@
display: block;
/* #endif */
justify-content: center;
- /* #ifndef MP */
@include flex;
flex-wrap: wrap;
align-items: center;
- /* #endif */
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-icon/u-icon.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-icon/u-icon.vue
index fb120514..ffc9515b 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-icon/u-icon.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-icon/u-icon.vue
@@ -96,7 +96,7 @@
// classes.push(this.customPrefix)
// }
// 主题色,通过类配置
- if (this.color && this.$u.config.type.includes(this.color)) classes.push('u-icon__icon--' + this.color)
+ if (this.color && uni.$u.config.type.includes(this.color)) classes.push('u-icon__icon--' + this.color)
// 阿里,头条,百度小程序通过数组绑定类名时,无法直接使用[a, b, c]的形式,否则无法识别
// 故需将其拆成一个字符串的形式,通过空格隔开各个类名
//#ifdef MP-ALIPAY || MP-TOUTIAO || MP-BAIDU
@@ -107,14 +107,14 @@
iconStyle() {
let style = {}
style = {
- fontSize: this.$u.addUnit(this.size),
- lineHeight: this.$u.addUnit(this.size),
+ fontSize: uni.$u.addUnit(this.size),
+ lineHeight: uni.$u.addUnit(this.size),
fontWeight: this.bold ? 'bold' : 'normal',
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
- top: this.$u.addUnit(this.top)
+ top: uni.$u.addUnit(this.top)
}
// 非主题色值时,才当作颜色值
- if (this.color && !this.$u.config.type.includes(this.color)) style.color = this.color
+ if (this.color && !uni.$u.config.type.includes(this.color)) style.color = this.color
return style
},
@@ -125,8 +125,8 @@
imgStyle() {
let style = {}
// 如果设置width和height属性,则优先使用,否则使用size属性
- style.width = this.width ? this.$u.addUnit(this.width) : this.$u.addUnit(this.size)
- style.height = this.height ? this.$u.addUnit(this.height) : this.$u.addUnit(this.size)
+ style.width = this.width ? uni.$u.addUnit(this.width) : uni.$u.addUnit(this.size)
+ style.height = this.height ? uni.$u.addUnit(this.height) : uni.$u.addUnit(this.size)
return style
},
// 通过图标名,查找对应的图标
@@ -139,7 +139,7 @@
clickHandler(e) {
this.$emit('click', this.index)
// 是否阻止事件冒泡
- this.stop && this.$u.preventEvent(e)
+ this.stop && uni.$u.preventEvent(e)
}
}
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-image/u-image.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-image/u-image.vue
index 9828505b..5bc7cc7d 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-image/u-image.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-image/u-image.vue
@@ -29,7 +29,9 @@
class="u-image__loading"
:style="{
borderRadius: shape == 'circle' ? '50%' : $u.addUnit(radius),
- backgroundColor: this.bgColor
+ backgroundColor: this.bgColor,
+ width: $u.addUnit(width),
+ height: $u.addUnit(height)
}"
>
@@ -44,7 +46,9 @@
v-if="showError && isError && !loading"
class="u-image__error"
:style="{
- borderRadius: shape == 'circle' ? '50%' : $u.addUnit(radius)
+ borderRadius: shape == 'circle' ? '50%' : $u.addUnit(radius),
+ width: $u.addUnit(width),
+ height: $u.addUnit(height)
}"
>
@@ -113,9 +117,10 @@
if (!n) {
// 如果传入null或者'',或者false,或者undefined,标记为错误状态
this.isError = true
- this.loading = false
+
} else {
this.isError = false
+ this.loading = false
}
}
}
@@ -124,7 +129,7 @@
wrapStyle() {
let style = {};
// 如果是显示圆形,设置一个很多的半径值即可
- style.borderRadius = this.shape == 'circle' ? '10000px' : this.$u.addUnit(this.radius)
+ style.borderRadius = this.shape == 'circle' ? '10000px' : uni.$u.addUnit(this.radius)
// 如果设置圆角,必须要有hidden,否则可能圆角无效
style.overflow = this.borderRadius > 0 ? 'hidden' : 'visible'
// if (this.fade) {
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-input/u-input.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-input/u-input.vue
index 235fbeca..0cda49e3 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-input/u-input.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-input/u-input.vue
@@ -188,7 +188,7 @@ export default {
style.paddingLeft = "9px";
style.paddingRight = "9px";
}
- return uni.$u.deepMerge(style, this.$u.addStyle(this.customStyle));
+ return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
},
// 输入框的样式
inputStyle() {
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-line/u-line.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-line/u-line.vue
index eaa39e2a..e0a6d925 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-line/u-line.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-line/u-line.vue
@@ -34,13 +34,13 @@
// 此处采用兼容分开写,兼容nvue的写法
style.borderBottomWidth = '1px'
style.borderBottomStyle = this.dashed ? 'dashed' : 'solid'
- style.width = this.$u.addUnit(this.length)
+ style.width = uni.$u.addUnit(this.length)
if (this.hairline) style.transform = 'scaleY(0.5)'
} else {
// 如果是竖向线条,边框宽度为1px,再通过transform缩小一半,就是0.5px了
style.borderLeftWidth = '1px'
style.borderLeftStyle = this.dashed ? 'dashed' : 'solid'
- style.height = this.$u.addUnit(this.length)
+ style.height = uni.$u.addUnit(this.length)
if (this.hairline) style.transform = 'scaleX(0.5)'
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-navbar/props.js b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-navbar/props.js
index 4921c4de..e139b7ba 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-navbar/props.js
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-navbar/props.js
@@ -64,6 +64,16 @@ export default {
leftIconSize: {
type: [String, Number],
default: uni.$u.props.navbar.leftIconSize
+ },
+ // 左侧返回图标的颜色
+ leftIconColor: {
+ type: String,
+ default: uni.$u.props.navbar.leftIconColor
+ },
+ // 点击左侧区域(返回图标),是否自动返回上一页
+ autoBack: {
+ type: Boolean,
+ default: uni.$u.props.navbar.autoBack
}
}
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-navbar/u-navbar.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-navbar/u-navbar.vue
index 50e7578f..54435aa5 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-navbar/u-navbar.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-navbar/u-navbar.vue
@@ -31,19 +31,25 @@
v-if="leftIcon"
:name="leftIcon"
:size="leftIconSize"
+ :color="leftIconColor"
>
{{ leftText }}
- {{ title }}
+
+ {{ title }}
+
@@ -100,7 +108,11 @@
methods: {
// 点击左侧区域
leftClick() {
+ // 如果配置了autoBack,自动返回上一页
this.$emit('leftClick')
+ if(this.autoBack) {
+ uni.navigateBack()
+ }
},
// 点击右侧区域
rightClick() {
@@ -148,7 +160,7 @@
opacity: 0.7;
}
- &__txet {
+ &__text {
font-size: 15px;
margin-left: 3px;
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-notify/u-notify.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-notify/u-notify.vue
index f011e0fe..30adb72f 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-notify/u-notify.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-notify/u-notify.vue
@@ -135,7 +135,7 @@
methods: {
show(options) {
// 不将结果合并到this.config变量,避免多次调用u-toast,前后的配置造成混乱
- this.tmpConfig = this.$u.deepMerge(this.config, options)
+ this.tmpConfig = uni.$u.deepMerge(this.config, options)
// 任何定时器初始化之前,都要执行清除操作,否则可能会造成混乱
this.clearTimer()
this.open = true
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-number-box/u-number-box.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-number-box/u-number-box.vue
index 90d18652..b3b0fd46 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-number-box/u-number-box.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-number-box/u-number-box.vue
@@ -142,7 +142,7 @@
return (type) => {
const style = {
backgroundColor: this.bgColor,
- height: this.$u.addUnit(this.buttonSize),
+ height: uni.$u.addUnit(this.buttonSize),
color: this.color
}
if (this.isDisabled(type)) {
@@ -157,8 +157,8 @@
const style = {
color: this.color,
backgroundColor: this.bgColor,
- height: this.$u.addUnit(this.buttonSize),
- width: this.$u.addUnit(this.inputWidth)
+ height: uni.$u.addUnit(this.buttonSize),
+ width: uni.$u.addUnit(this.inputWidth)
}
return style
},
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue
index c5824441..4f505c6e 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue
@@ -70,19 +70,19 @@
if (!this.random) {
return [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
} else {
- return this.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
+ return uni.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
}
} else if (!this.dotDisabled && this.mode == 'number') {
if (!this.random) {
return [1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0];
} else {
- return this.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0]);
+ return uni.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0]);
}
} else if (this.mode == 'card') {
if (!this.random) {
return [1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0];
} else {
- return this.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0]);
+ return uni.$u.randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0]);
}
}
},
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-picker/u-picker.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-picker/u-picker.vue
index 79a1cfcf..032305b1 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-picker/u-picker.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-picker/u-picker.vue
@@ -16,10 +16,10 @@
>
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-popup/u-popup.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-popup/u-popup.vue
index 6d634d4f..a04bc796 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-popup/u-popup.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-popup/u-popup.vue
@@ -95,27 +95,27 @@
}
style[this.mode] = 0
if (this.mode === 'left') {
- return this.$u.deepMerge(style, {
+ return uni.$u.deepMerge(style, {
bottom: 0,
top: 0,
})
} else if (this.mode === 'right') {
- return this.$u.deepMerge(style, {
+ return uni.$u.deepMerge(style, {
bottom: 0,
top: 0,
})
} else if (this.mode === 'top') {
- return this.$u.deepMerge(style, {
+ return uni.$u.deepMerge(style, {
left: 0,
right: 0
})
} else if (this.mode === 'bottom') {
- return this.$u.deepMerge(style, {
+ return uni.$u.deepMerge(style, {
left: 0,
right: 0,
})
} else if (this.mode === 'center') {
- return this.$u.deepMerge(style, {
+ return uni.$u.deepMerge(style, {
alignItems: 'center',
'justify-content': 'center',
top: 0,
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-status-bar/u-status-bar.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-status-bar/u-status-bar.vue
index d9c139d9..ed91373a 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-status-bar/u-status-bar.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-status-bar/u-status-bar.vue
@@ -38,6 +38,9 @@
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-sticky/u-sticky.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-sticky/u-sticky.vue
index 68868497..bc93ddf1 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-sticky/u-sticky.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-sticky/u-sticky.vue
@@ -51,7 +51,7 @@
if (this.cssSticky) {
style.position = 'sticky'
style.zIndex = this.uZindex
- style.top = this.$u.addUnit(this.stickyTop)
+ style.top = uni.$u.addUnit(this.stickyTop)
} else {
style.height = this.fixed ? this.height + 'px' : 'auto'
}
@@ -65,7 +65,7 @@
// #endif
}
style.backgroundColor = this.bgColor
- return this.$u.deepMerge(uni.$u.addStyle(this.customStyle), style)
+ return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style)
},
// 吸顶内容的样式
stickyContent() {
@@ -152,7 +152,7 @@
// #endif
// 如果安卓版本高于8.0,依然认为是支持css sticky的(因为安卓7在某些机型,可能不支持sticky)
- if (this.$u.os() === 'android' && Number(this.$u.sys().system) > 8) {
+ if (uni.$u.os() === 'android' && Number(uni.$u.sys().system) > 8) {
this.cssSticky = true
}
@@ -162,7 +162,7 @@
// #endif
// ios上,从ios6开始,都是支持css sticky的
- if (this.$u.os() === 'ios') {
+ if (uni.$u.os() === 'ios') {
this.cssSticky = true
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue
index 3ccc3483..979779e4 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue
@@ -147,7 +147,7 @@
.u-swipe-action-item {
position: relative;
overflow: hidden;
- /* #ifndef APP-NVUE */
+ /* #ifndef APP-NVUE || MP-WEIXIN */
touch-action: none;
/* #endif */
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-tabs/u-tabs.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-tabs/u-tabs.vue
index 1a3e8ccd..426ccf63 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-tabs/u-tabs.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-tabs/u-tabs.vue
@@ -34,16 +34,16 @@
>{{ item[keyName] }}
@@ -147,6 +147,9 @@
}
return uni.$u.deepMerge(customeStyle, style)
}
+ },
+ propsBadge() {
+ return uni.$u.props.badge
}
},
async mounted() {
@@ -275,7 +278,7 @@
queryRect(el, item) {
// #ifndef APP-NVUE
// $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://www.uviewui.com/js/getRect.html
- // 组件内部一般用this.$uGetRect,对外的为this.$u.getRect,二者功能一致,名称不同
+ // 组件内部一般用this.$uGetRect,对外的为uni.$u.getRect,二者功能一致,名称不同
return new Promise(resolve => {
this.$uGetRect(`.${el}`).then(size => {
resolve(size)
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-toast/u-toast.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-toast/u-toast.vue
index 730383f4..f1948303 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-toast/u-toast.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-toast/u-toast.vue
@@ -88,7 +88,7 @@
return '';
}
if (['error', 'warning', 'success', 'primary'].includes(this.tmpConfig.type)) {
- return this.$u.type2icon(this.tmpConfig.type)
+ return uni.$u.type2icon(this.tmpConfig.type)
} else {
return ''
}
@@ -151,7 +151,7 @@
// 显示toast组件,由父组件通过this.$refs.xxx.show(options)形式调用
show(options) {
// 不将结果合并到this.config变量,避免多次调用u-toast,前后的配置造成混乱
- this.tmpConfig = this.$u.deepMerge(this.config, options)
+ this.tmpConfig = uni.$u.deepMerge(this.config, options)
// 清除定时器
this.clearTimer()
this.isShow = true
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-tooltip/u-tooltip.vue b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-tooltip/u-tooltip.vue
index b40fe953..cd34a3e3 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-tooltip/u-tooltip.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/components/u-tooltip/u-tooltip.vue
@@ -218,7 +218,7 @@
queryRect(ref) {
// #ifndef APP-NVUE
// $uGetRect为uView自带的节点查询简化方法,详见文档介绍:https://www.uviewui.com/js/getRect.html
- // 组件内部一般用this.$uGetRect,对外的为this.$u.getRect,二者功能一致,名称不同
+ // 组件内部一般用this.$uGetRect,对外的为uni.$u.getRect,二者功能一致,名称不同
return new Promise(resolve => {
this.$uGetRect(`#${ref}`).then(size => {
resolve(size)
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/config.js b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/config.js
index f866db85..cd473868 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/config.js
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/config.js
@@ -1,5 +1,5 @@
-// 此版本发布于2020-12-21
-const version = '2.0.15'
+// 此版本发布于2020-12-29
+const version = '2.0.19'
export default {
v: version,
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/calendar.js b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/calendar.js
index 7cdb8131..bfd2bd6e 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/calendar.js
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/calendar.js
@@ -36,6 +36,7 @@ export default {
rangePrompt: '',
showRangePrompt: true,
allowSameDay: false,
- round: 0
+ round: 0,
+ monthNum: 3
}
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/cell.js b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/cell.js
index 4f91ee59..2d073dbb 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/cell.js
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/cell.js
@@ -8,28 +8,29 @@
* @FilePath : /u-view2.0/uview-ui/libs/config/props/cell.js
*/
export default {
- // cell组件的props
- cell: {
- customClass: '',
- title: '',
- label: '',
- value: '',
- icon: '',
- titleWidth: '',
- disabled: false,
- border: true,
- center: false,
- url: '',
- linkType: 'navigateTo',
- clickable: false,
- isLink: false,
- required: false,
- arrowDirection: '',
- rightIconStyle: {},
- rightIcon: 'arrow-right',
- titleStyle: {},
- size: '',
- stop: true,
- name: ''
- }
+ // cell组件的props
+ cell: {
+ customClass: '',
+ title: '',
+ label: '',
+ value: '',
+ icon: '',
+ titleWidth: '',
+ disabled: false,
+ border: true,
+ center: false,
+ url: '',
+ linkType: 'navigateTo',
+ clickable: false,
+ isLink: false,
+ required: false,
+ arrowDirection: '',
+ iconStyle: {},
+ rightIconStyle: {},
+ rightIcon: 'arrow-right',
+ titleStyle: {},
+ size: '',
+ stop: true,
+ name: ''
+ }
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/input.js b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/input.js
index 720d5d30..4f0edc60 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/input.js
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/input.js
@@ -18,7 +18,7 @@ export default {
clearable: false,
password: false,
maxlength: -1,
- placeholder: '',
+ placeholder: null,
placeholderClass: 'input-placeholder',
placeholderStyle: 'color: #c0c4cc',
showWordLimit: false,
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/navbar.js b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/navbar.js
index 3052a5ff..a222ca45 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/navbar.js
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/config/props/navbar.js
@@ -7,6 +7,7 @@
* @lastTime : 2021-08-20 17:16:18
* @FilePath : /u-view2.0/uview-ui/libs/config/props/navbar.js
*/
+import color from '../color'
export default {
// navbar 组件
navbar: {
@@ -22,7 +23,9 @@ export default {
bgColor: '#ffffff',
titleWidth: '400rpx',
height: '44px',
- leftIconSize: 20
+ leftIconSize: 20,
+ leftIconColor: color.mainColor,
+ autoBack: false
}
}
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/css/common.scss b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/css/common.scss
index 10100eec..19c6f861 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/css/common.scss
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/css/common.scss
@@ -28,7 +28,6 @@
}
-// /* #ifdef APP-NVUE */
// 此处加上!important并非随意乱用,而是因为目前*.nvue页面编译到H5时,
// App.vue的样式会被uni-app的view元素的自带border属性覆盖,导致无效
// 综上,这是uni-app的缺陷导致我们为了多端兼容,而必须要加上!important
@@ -70,7 +69,6 @@
border-top-style: solid;
border-bottom-style: solid;
}
-// /* #endif */
// 去除button的所有默认样式,让其表现跟普通的view、text元素一样
.u-reset-button {
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/mixin/mixin.js b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/mixin/mixin.js
index 07242af8..fdb8b3c4 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/mixin/mixin.js
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/libs/mixin/mixin.js
@@ -31,13 +31,24 @@ module.exports = {
created() {
// 组件当中,只有created声明周期,为了能在组件使用,故也在created中将方法挂载到$u
this.$u.getRect = this.$uGetRect
- },
+ },
computed: {
// 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
- // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用this.$u.xxx
- $u() {
- return uni.$u
- },
+ // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
+ // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
+ $u() {
+ // #ifndef APP-NVUE
+ // 在非nvue端,移除props,http,mixin等对象,避免在小程序setData时数据过大影响性能
+ return uni.$u.deepMerge(uni.$u, {
+ props: undefined,
+ http: undefined,
+ mixin: undefined
+ })
+ // #endif
+ // #ifdef APP-NVUE
+ return uni.$u
+ // #endif
+ },
/**
* 生成bem规则类名
* 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
@@ -104,7 +115,7 @@ module.exports = {
// 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
// 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
// 此处并不会自动更新子组件的数据,而是依赖父组件u-radio-group去监听data的变化,手动调用更新子组件的方法去重新获取
- this.parent = this.$u.$parent.call(this, parentName)
+ this.parent = uni.$u.$parent.call(this, parentName)
if (this.parent.children) {
// 如果父组件的children不存在本组件的实例,才将本实例添加到父组件的children中
this.parent.children.indexOf(this) === -1 && this.parent.children.push(this)
diff --git a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/package.json b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/package.json
index 469cd02d..771bc3d3 100644
--- a/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/package.json
+++ b/CoreCms.Net.Uni-App/CoreShop/uni_modules/uview-ui/package.json
@@ -2,7 +2,7 @@
"id": "uview-ui",
"name": "uview-ui",
"displayName": "uView2.0重磅发布,利剑出鞘,一统江湖",
- "version": "2.0.15",
+ "version": "2.0.19",
"description": "uView UI已完美兼容nvue,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
"keywords": [
"uview",
diff --git a/CoreCms.Net.Utility/Helper/HttpHelper.cs b/CoreCms.Net.Utility/Helper/HttpHelper.cs
deleted file mode 100644
index 3269358c..00000000
--- a/CoreCms.Net.Utility/Helper/HttpHelper.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/***********************************************************************
- * Project: CoreCms.Net *
- * Web: https://CoreCms.Net *
- * ProjectName: 核心内容管理系统 *
- * Author: 大灰灰 *
- * Email: JianWeie@163.com *
- * CreateTime: 2020-05-12 0:54:53
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Net;
-using System.Text;
-
-namespace CoreCms.Net.Utility.Helper
-{
- ///
- /// 模拟标准表单Post提交
- ///
- public static class HttpHelper
- {
- ///
- /// 模拟标准表单Post提交
- ///
- ///
- ///
- ///
- public static string PostSend(string url, string postdate)
- {
- HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
- myHttpWebRequest.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
- myHttpWebRequest.Method = "POST";
- Stream myRequestStream = myHttpWebRequest.GetRequestStream();
- StreamWriter myStreamWriter = new StreamWriter(myRequestStream);
- myStreamWriter.Write(postdate);
- myStreamWriter.Flush();
- myStreamWriter.Close();
- myRequestStream.Close();
-
- HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
- Stream myResponseStream = myHttpWebResponse.GetResponseStream();
- StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
- String outdata = myStreamReader.ReadToEnd();
- myStreamReader.Close();
- myResponseStream.Close();
- return outdata;
- }
-
- }
-}
diff --git a/CoreCms.Net.WeChat.Service/CoreCms.Net.WeChat.Service.csproj b/CoreCms.Net.WeChat.Service/CoreCms.Net.WeChat.Service.csproj
index c3059e4d..3b9122ff 100644
--- a/CoreCms.Net.WeChat.Service/CoreCms.Net.WeChat.Service.csproj
+++ b/CoreCms.Net.WeChat.Service/CoreCms.Net.WeChat.Service.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj b/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj
index d2ba55bd..8478a987 100644
--- a/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj
+++ b/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj
@@ -55,9 +55,9 @@
-
-
-
+
+
+
diff --git a/CoreCms.Net.Web.WebApi/Controllers/UserController.cs b/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
index 54594a74..2a41e13f 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
@@ -1257,9 +1257,9 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public WebApiCallBack GetBankCardsOrganization([FromBody] FMStringId entity)
+ public async Task GetBankCardsOrganization([FromBody] FMStringId entity)
{
- var jm = _userBankCardServices.BankCardsOrganization(entity.id);
+ var jm = await _userBankCardServices.BankCardsOrganization(entity.id);
return jm;
}
diff --git a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj
index 8db42cd9..c94a5a71 100644
--- a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj
+++ b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj
@@ -50,8 +50,8 @@
-
-
+
+
diff --git a/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Bold.ttf b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Bold.ttf
new file mode 100644
index 00000000..37e3fa7e
Binary files /dev/null and b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Bold.ttf differ
diff --git a/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-ExtraLight.ttf b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-ExtraLight.ttf
new file mode 100644
index 00000000..e8f64c33
Binary files /dev/null and b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-ExtraLight.ttf differ
diff --git a/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Heavy.ttf b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Heavy.ttf
new file mode 100644
index 00000000..9b5f5f70
Binary files /dev/null and b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Heavy.ttf differ
diff --git a/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Light.ttf b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Light.ttf
new file mode 100644
index 00000000..1abae279
Binary files /dev/null and b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Light.ttf differ
diff --git a/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Medium.ttf b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Medium.ttf
new file mode 100644
index 00000000..8d92d092
Binary files /dev/null and b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Medium.ttf differ
diff --git a/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Normal.ttf b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Normal.ttf
new file mode 100644
index 00000000..fa08226d
Binary files /dev/null and b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Normal.ttf differ
diff --git a/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Regular.ttf b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Regular.ttf
new file mode 100644
index 00000000..52a4dec3
Binary files /dev/null and b/CoreCms.Net.Web.WebApi/wwwroot/fonts/SourceHanSansK-Regular.ttf differ