init
- 框架初始化 - 安装插件 - 修复PHP8.4报错
8
public/.htaccess
Normal file
@@ -0,0 +1,8 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
Options +FollowSymlinks -Multiviews
|
||||
RewriteEngine On
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
|
||||
</IfModule>
|
||||
37
public/admin.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
// [ 后台入口文件 ]
|
||||
// 使用此文件可以达到隐藏admin模块的效果
|
||||
// 为了你的安全,强烈不建议将此文件名修改成admin.php
|
||||
// 定义应用目录
|
||||
define('APP_PATH', __DIR__ . '/../application/');
|
||||
|
||||
// 判断是否安装
|
||||
if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) {
|
||||
header("location:./install.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// 加载框架引导文件
|
||||
require __DIR__ . '/../thinkphp/base.php';
|
||||
|
||||
// 绑定到admin模块
|
||||
\think\Route::bind('admin');
|
||||
|
||||
// 关闭路由
|
||||
\think\App::route(false);
|
||||
|
||||
// 设置根url
|
||||
\think\Url::root('');
|
||||
|
||||
// 执行应用
|
||||
\think\App::run()->send();
|
||||
1
public/assets/addons/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
178
public/assets/addons/epay/css/common.css
Normal file
@@ -0,0 +1,178 @@
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
padding-top: 50px;
|
||||
/* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.img-addon {
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.img-hover:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.display-1 {
|
||||
font-size: 44px;
|
||||
}
|
||||
.display-4 {
|
||||
font-size: 24px;
|
||||
line-height: 32px;
|
||||
}
|
||||
/* Home Page Carousel */
|
||||
header.carousel {
|
||||
height: 50%;
|
||||
}
|
||||
header.carousel .item,
|
||||
header.carousel .item.active,
|
||||
header.carousel .carousel-inner {
|
||||
height: 100%;
|
||||
}
|
||||
header.carousel .fill {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.error-404 {
|
||||
font-size: 100px;
|
||||
}
|
||||
/* Pricing Page Styles */
|
||||
.price {
|
||||
display: block;
|
||||
font-size: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.price sup {
|
||||
top: -20px;
|
||||
left: 2px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.period {
|
||||
display: block;
|
||||
font-style: italic;
|
||||
}
|
||||
/* Footer Styles */
|
||||
/* Responsive Styles */
|
||||
@media (max-width: 991px) {
|
||||
.customer-img,
|
||||
.img-related {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.img-addon {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
header.carousel .carousel {
|
||||
height: 70%;
|
||||
}
|
||||
}
|
||||
.carousel-body {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 25%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
.addonlist a > p {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
/* PC扫码支付 */
|
||||
.scanpay {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.scanpay-title {
|
||||
margin: 30px 0 15px 0;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
position: relative;
|
||||
}
|
||||
.scanpay-qrcode {
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
}
|
||||
.scanpay-qrcode img {
|
||||
width: 100%;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.scanpay-qrcode .expired {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
opacity: .95;
|
||||
background: #fff url(../images/expired.png) center center no-repeat;
|
||||
}
|
||||
.scanpay-qrcode .paid {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
opacity: .95;
|
||||
background: #fff url(../images/paid.png) center center no-repeat;
|
||||
}
|
||||
.scanpay-screenshot {
|
||||
padding: 0;
|
||||
}
|
||||
.scanpay-screenshot img {
|
||||
width: 100%;
|
||||
}
|
||||
.scanpay-tips {
|
||||
height: 60px;
|
||||
padding: 8px 0 8px 125px;
|
||||
background: #00c800 url(../images/scan.png) 50px 12px no-repeat;
|
||||
background-size: 36px 36px;
|
||||
}
|
||||
.scanpay-tips p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
.scanpay-time {
|
||||
font-size: 14px;
|
||||
margin-bottom: 15px;
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
font-weight: normal;
|
||||
display: none;
|
||||
}
|
||||
.scanpay-time span {
|
||||
color: red;
|
||||
}
|
||||
.scanpay-order {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.scanpay-order em {
|
||||
font-style: normal;
|
||||
color: #666;
|
||||
}
|
||||
.scanpay-order em.scanpay-price {
|
||||
color: #ff3333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.scanpay-alipay .scanpay-tips {
|
||||
background-color: #4290e8;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.scanpay {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
@media (max-height: 855px) and (min-width: 767px) {
|
||||
.scanpay {
|
||||
width: calc(130vh);
|
||||
min-width: 760px;
|
||||
}
|
||||
}
|
||||
.qrcode canvas,
|
||||
.qrcode img {
|
||||
width: 100%;
|
||||
}
|
||||
BIN
public/assets/addons/epay/images/alipay.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
public/assets/addons/epay/images/expired.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
public/assets/addons/epay/images/logo-alipay.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/assets/addons/epay/images/logo-wechat.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
public/assets/addons/epay/images/paid.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
public/assets/addons/epay/images/scan.png
Normal file
|
After Width: | Height: | Size: 922 B |
BIN
public/assets/addons/epay/images/screenshot-alipay.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
public/assets/addons/epay/images/screenshot-wechat.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
public/assets/addons/epay/images/wechat.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
63
public/assets/addons/epay/js/common.js
Normal file
@@ -0,0 +1,63 @@
|
||||
$(function () {
|
||||
|
||||
if ($('.carousel').length > 0) {
|
||||
$('.carousel').carousel({
|
||||
interval: 5000
|
||||
});
|
||||
}
|
||||
|
||||
if ($(".qrcode").length > 0) {
|
||||
$(".qrcode").qrcode({width: 250, height: 250, text: $(".qrcode").data("text")});
|
||||
}
|
||||
|
||||
var si, xhr;
|
||||
if (typeof queryParams != 'undefined') {
|
||||
var queryResult = function () {
|
||||
xhr && xhr.abort();
|
||||
xhr = $.ajax({
|
||||
url: "",
|
||||
type: "post",
|
||||
data: queryParams,
|
||||
dataType: 'json',
|
||||
success: function (ret) {
|
||||
if (ret.code == 1) {
|
||||
var data = ret.data;
|
||||
if (typeof data.status != 'undefined') {
|
||||
var status = data.status;
|
||||
if (status == 'SUCCESS' || status == 'TRADE_SUCCESS') {
|
||||
$(".scanpay-qrcode .paid").removeClass("hidden");
|
||||
$(".scanpay-tips p").html("支付成功!<br><span>3</span>秒后将自动跳转...");
|
||||
|
||||
var sin = setInterval(function () {
|
||||
$(".scanpay-tips p span").text(parseInt($(".scanpay-tips p span").text()) - 1);
|
||||
}, 1000);
|
||||
|
||||
setTimeout(function () {
|
||||
clearInterval(sin);
|
||||
location.href = queryParams.returnurl;
|
||||
}, 3000);
|
||||
|
||||
clearInterval(si);
|
||||
} else if (status == 'REFUND' || status == 'TRADE_CLOSED') {
|
||||
$(".scanpay-tips p").html("请求失败!<br>请返回重新发起支付");
|
||||
clearInterval(si);
|
||||
} else if (status == 'NOTPAY' || status == 'TRADE_NOT_EXIST') {
|
||||
} else if (status == 'CLOSED' || status == 'TRADE_CLOSED') {
|
||||
$(".scanpay-tips p").html("订单已关闭!<br>请返回重新发起支付");
|
||||
clearInterval(si);
|
||||
} else if (status == 'USERPAYING' || status == 'WAIT_BUYER_PAY') {
|
||||
} else if (status == 'PAYERROR') {
|
||||
clearInterval(si);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
si = setInterval(function () {
|
||||
queryResult();
|
||||
}, 3000);
|
||||
queryResult();
|
||||
}
|
||||
|
||||
});
|
||||
34
public/assets/addons/epay/js/jquery.qrcode.min.js
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* jQuery-qrcode
|
||||
* @url https://github.com/jeromeetienne/jquery-qrcode
|
||||
* @licence MIT
|
||||
*/
|
||||
|
||||
(function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;d<a.length&&0==a[d];)d++;this.num=Array(a.length-d+c);for(var b=0;b<a.length-d;b++)this.num[b]=a[b+d]}function p(a,c){this.totalCount=a;this.dataCount=c}function t(){this.buffer=[];this.length=0}u.prototype={getLength:function(){return this.data.length},
|
||||
write:function(a){for(var c=0;c<this.data.length;c++)a.put(this.data.charCodeAt(c),8)}};o.prototype={addData:function(a){this.dataList.push(new u(a));this.dataCache=null},isDark:function(a,c){if(0>a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e<c.length;e++)b+=c[e].dataCount;
|
||||
for(e=0;e<this.dataList.length;e++)c=this.dataList[e],d.put(c.mode,4),d.put(c.getLength(),j.getLengthInBits(c.mode,a)),c.write(d);if(d.getLengthInBits()<=8*b)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17;this.modules=Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[d][b]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-
|
||||
7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(a,c);7<=this.typeNumber&&this.setupTypeNumber(a);null==this.dataCache&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,c){for(var d=-1;7>=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]=
|
||||
0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c<this.modules.length;c++)for(var d=1*c,b=0;b<this.modules[c].length;b++){var e=1*b;this.modules[c][b]&&(a.beginFill(0,100),a.moveTo(e,d),a.lineTo(e+1,d),a.lineTo(e+1,d+1),a.lineTo(e,d+1),a.endFill())}return a},
|
||||
setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(a=8;a<this.moduleCount-8;a++)null==this.modules[6][a]&&(this.modules[6][a]=0==a%2)},setupPositionAdjustPattern:function(){for(var a=j.getPatternPosition(this.typeNumber),c=0;c<a.length;c++)for(var d=0;d<a.length;d++){var b=a[c],e=a[d];if(null==this.modules[b][e])for(var f=-2;2>=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c=
|
||||
j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount-
|
||||
b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0<i;i-=2)for(6==i&&i--;;){for(var g=0;2>g;g++)if(null==this.modules[b][i-g]){var n=!1;f<a.length&&(n=1==(a[f]>>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a,
|
||||
c),b=new t,e=0;e<d.length;e++){var f=d[e];b.put(f.mode,4);b.put(f.getLength(),j.getLengthInBits(f.mode,a));f.write(b)}for(e=a=0;e<c.length;e++)a+=c[e].dataCount;if(b.getLengthInBits()>8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d=
|
||||
0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g<c.length;g++){var n=c[g].dataCount,h=c[g].totalCount-n,b=Math.max(b,n),e=Math.max(e,h);f[g]=Array(n);for(var k=0;k<f[g].length;k++)f[g][k]=255&a.buffer[k+d];d+=n;k=j.getErrorCorrectPolynomial(h);n=(new q(f[g],k.getLength()-1)).mod(k);i[g]=Array(k.getLength()-1);for(k=0;k<i[g].length;k++)h=k+n.getLength()-i[g].length,i[g][k]=0<=h?n.get(h):0}for(k=g=0;k<c.length;k++)g+=c[k].totalCount;d=Array(g);for(k=n=0;k<b;k++)for(g=0;g<c.length;g++)k<f[g].length&&
|
||||
(d[n++]=f[g][k]);for(k=0;k<e;k++)for(g=0;g<c.length;g++)k<i[g].length&&(d[n++]=i[g][k]);return d};s=4;for(var j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,
|
||||
78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var c=a<<10;0<=j.getBCHDigit(c)-j.getBCHDigit(j.G15);)c^=j.G15<<j.getBCHDigit(c)-j.getBCHDigit(j.G15);return(a<<10|c)^j.G15_MASK},getBCHTypeNumber:function(a){for(var c=a<<12;0<=j.getBCHDigit(c)-
|
||||
j.getBCHDigit(j.G18);)c^=j.G18<<j.getBCHDigit(c)-j.getBCHDigit(j.G18);return a<<12|c},getBCHDigit:function(a){for(var c=0;0!=a;)c++,a>>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+
|
||||
a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;d<a;d++)c=c.multiply(new q([1,l.gexp(d)],0));return c},getLengthInBits:function(a,c){if(1<=c&&10>c)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+
|
||||
a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b<c;b++)for(var e=0;e<c;e++){for(var f=0,i=a.isDark(b,e),g=-1;1>=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5<f&&(d+=3+f-5)}for(b=0;b<c-1;b++)for(e=0;e<c-1;e++)if(f=0,a.isDark(b,e)&&f++,a.isDark(b+1,e)&&f++,a.isDark(b,e+1)&&f++,a.isDark(b+1,e+1)&&f++,0==f||4==f)d+=3;for(b=0;b<c;b++)for(e=0;e<c-6;e++)a.isDark(b,e)&&!a.isDark(b,e+1)&&a.isDark(b,e+
|
||||
2)&&a.isDark(b,e+3)&&a.isDark(b,e+4)&&!a.isDark(b,e+5)&&a.isDark(b,e+6)&&(d+=40);for(e=0;e<c;e++)for(b=0;b<c-6;b++)a.isDark(b,e)&&!a.isDark(b+1,e)&&a.isDark(b+2,e)&&a.isDark(b+3,e)&&a.isDark(b+4,e)&&!a.isDark(b+5,e)&&a.isDark(b+6,e)&&(d+=40);for(e=f=0;e<c;e++)for(b=0;b<c;b++)a.isDark(b,e)&&f++;a=Math.abs(100*f/c/c-50)/5;return d+10*a}},l={glog:function(a){if(1>a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256),
|
||||
LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<<m;for(m=8;256>m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var b=0;b<a.getLength();b++)c[d+b]^=l.gexp(l.glog(this.get(d))+l.glog(a.get(b)));return new q(c,0)},mod:function(a){if(0>
|
||||
this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b<this.getLength();b++)d[b]=this.get(b);for(b=0;b<a.getLength();b++)d[b]^=l.gexp(l.glog(a.get(b))+c);return(new q(d,0)).mod(a)}};p.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],
|
||||
[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,
|
||||
116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,
|
||||
43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,
|
||||
3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,
|
||||
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
|
||||
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
|
||||
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
|
||||
correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
||||
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
|
||||
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;jQuery(a).appendTo(this)})}})(jQuery);
|
||||
224
public/assets/addons/epay/less/common.less
Normal file
@@ -0,0 +1,224 @@
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 50px; /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
|
||||
}
|
||||
|
||||
.img-addon {
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.img-hover:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.display-1 {
|
||||
font-size: 44px;
|
||||
}
|
||||
|
||||
.display-4 {
|
||||
font-size: 24px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
/* Home Page Carousel */
|
||||
|
||||
header.carousel {
|
||||
height: 50%;
|
||||
}
|
||||
|
||||
header.carousel .item,
|
||||
header.carousel .item.active,
|
||||
header.carousel .carousel-inner {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
header.carousel .fill {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.error-404 {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
/* Pricing Page Styles */
|
||||
|
||||
.price {
|
||||
display: block;
|
||||
font-size: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.price sup {
|
||||
top: -20px;
|
||||
left: 2px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.period {
|
||||
display: block;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Footer Styles */
|
||||
|
||||
footer {
|
||||
}
|
||||
|
||||
/* Responsive Styles */
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.customer-img,
|
||||
.img-related {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.img-addon {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
header.carousel .carousel {
|
||||
height: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
.carousel-body {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 25%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.addonlist a > p {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
/* PC扫码支付 */
|
||||
|
||||
.scanpay {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.scanpay-title {
|
||||
margin: 30px 0 15px 0;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.scanpay-qrcode {
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.expired {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
opacity: .95;
|
||||
background: #fff url(../images/expired.png) center center no-repeat;
|
||||
}
|
||||
|
||||
.paid {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
opacity: .95;
|
||||
background: #fff url(../images/paid.png) center center no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.scanpay-screenshot {
|
||||
padding: 0;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.scanpay-tips {
|
||||
height: 60px;
|
||||
padding: 8px 0 8px 125px;
|
||||
background: #00c800 url(../images/scan.png) 50px 12px no-repeat;
|
||||
background-size: 36px 36px;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #fff;
|
||||
font-weight: 700
|
||||
}
|
||||
}
|
||||
|
||||
.scanpay-time {
|
||||
font-size: 14px;
|
||||
margin-bottom: 15px;
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
font-weight: normal;
|
||||
display: none;
|
||||
|
||||
span {
|
||||
color: red;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.scanpay-order {
|
||||
margin-bottom: 5px;
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
color: #666;
|
||||
|
||||
&.scanpay-price {
|
||||
color: #ff3333;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scanpay-alipay {
|
||||
.scanpay-tips {
|
||||
background-color: #4290e8;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.scanpay {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 855px) and (min-width: 767px) {
|
||||
.scanpay {
|
||||
width: calc(~ '130vh');
|
||||
min-width: 760px;
|
||||
}
|
||||
}
|
||||
|
||||
.qrcode canvas, .qrcode img {
|
||||
width: 100%;
|
||||
}
|
||||
1069
public/assets/addons/shopro/chat/index.html
Normal file
1197
public/assets/addons/shopro/chat/index.js
Normal file
187
public/assets/addons/shopro/components/decorate/center/header.js
Normal file
@@ -0,0 +1,187 @@
|
||||
const CenterHeader = {
|
||||
template: `
|
||||
<div v-if="platform == 'WechatMiniProgram' || platform == 'App'" class="center-header" :style="headerStyle()">
|
||||
<img class="system" :src="'/assets/addons/shopro/img/decorate/header-' + system + '.png'" />
|
||||
<div class="WechatMiniProgram-wrap sa-flex sa-row-right">
|
||||
<center-navbar :header="header" :platform="platform" :isScroll="isScroll" :page="page"></center-navbar>
|
||||
<img v-if="platform == 'WechatMiniProgram'" class="WechatMiniProgram"
|
||||
:src="'/assets/addons/shopro/img/decorate/header-' + platform + '.png'" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="platform == 'WechatOfficialAccount' || platform == 'H5'" class="center-header">
|
||||
<img class="system" :src="'/assets/addons/shopro/img/decorate/header-' + system + '.png'" />
|
||||
<img v-if="platform == 'WechatOfficialAccount'" class="WechatOfficialAccount"
|
||||
:src="'/assets/addons/shopro/img/decorate/header-' + platform + '.png'" />
|
||||
<center-navbar :style="headerStyle()" :header="header" :platform="platform" :isScroll="isScroll" :page="page">
|
||||
</center-navbar>
|
||||
</div>`,
|
||||
emit: ['update:modelValue', 'update:show'],
|
||||
props: {
|
||||
header: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
page: String,
|
||||
system: String,
|
||||
platform: String,
|
||||
isScroll: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, watch } = Vue
|
||||
|
||||
console.log(props.header, 'header')
|
||||
|
||||
const sys1 = {
|
||||
ios: '78px',
|
||||
android: '72px',
|
||||
};
|
||||
const sys2 = {
|
||||
ios: '34px',
|
||||
android: '28px',
|
||||
};
|
||||
|
||||
function headerStyle() {
|
||||
let mode = {};
|
||||
if (props.platform == 'WechatMiniProgram') {
|
||||
if (props.header) {
|
||||
if (props.header.navbar.mode == 'inner') {
|
||||
mode = {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
right: 0,
|
||||
'z-index': 20,
|
||||
};
|
||||
if (props.isScroll) {
|
||||
mode = {
|
||||
...mode,
|
||||
background:
|
||||
props.header.navbar.type == 'color'
|
||||
? props.header.navbar.color
|
||||
: props.header.navbar.src
|
||||
? 'url(' + Fast.api.cdnurl(props.header.navbar.src) + ')'
|
||||
: props.header.navbar.src,
|
||||
};
|
||||
}
|
||||
}
|
||||
if (props.header.navbar.mode == 'normal') {
|
||||
mode = {
|
||||
background:
|
||||
props.header.navbar.type == 'color'
|
||||
? props.header.navbar.color
|
||||
: props.header.navbar.src
|
||||
? 'url(' + Fast.api.cdnurl(props.header.navbar.src) + ')'
|
||||
: props.header.navbar.src,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
if (props.platform == 'WechatOfficialAccount') {
|
||||
if (props.header) {
|
||||
if (props.header.navbar.mode == 'inner') {
|
||||
mode = {
|
||||
position: 'absolute',
|
||||
top: sys1[props.systemType],
|
||||
left: 0,
|
||||
'z-index': 20,
|
||||
};
|
||||
if (props.isScroll) {
|
||||
mode = {
|
||||
...mode,
|
||||
background:
|
||||
props.header.navbar.type == 'color'
|
||||
? props.header.navbar.color
|
||||
: props.header.navbar.src
|
||||
? 'url(' + Fast.api.cdnurl(props.header.navbar.src) + ')'
|
||||
: props.header.navbar.src,
|
||||
};
|
||||
}
|
||||
} else if (props.header.navbar.mode == 'normal') {
|
||||
mode = {
|
||||
background:
|
||||
props.header.navbar.type == 'color'
|
||||
? props.header.navbar.color
|
||||
: props.header.navbar.src
|
||||
? 'url(' + Fast.api.cdnurl(props.header.navbar.src) + ')'
|
||||
: props.header.navbar.src,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
if (props.platform == 'H5') {
|
||||
if (props.header) {
|
||||
if (props.header.navbar.mode == 'inner') {
|
||||
mode = {
|
||||
position: 'absolute',
|
||||
top: sys2[props.systemType],
|
||||
right: 0,
|
||||
'z-index': 20,
|
||||
};
|
||||
if (props.isScroll) {
|
||||
mode = {
|
||||
...mode,
|
||||
background:
|
||||
props.header.navbar.type == 'color'
|
||||
? props.header.navbar.color
|
||||
: props.header.navbar.src
|
||||
? 'url(' + Fast.api.cdnurl(props.header.navbar.src) + ')'
|
||||
: props.header.navbar.src,
|
||||
};
|
||||
}
|
||||
}
|
||||
if (props.header.navbar.mode == 'normal') {
|
||||
mode = {
|
||||
background:
|
||||
props.header.navbar.type == 'color'
|
||||
? props.header.navbar.color
|
||||
: props.header.navbar.src
|
||||
? 'url(' + Fast.api.cdnurl(props.header.navbar.src) + ')'
|
||||
: props.header.navbar.src,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
if (props.platform == 'App') {
|
||||
if (props.header) {
|
||||
if (props.header.navbar.mode == 'inner') {
|
||||
mode = {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
right: 0,
|
||||
'z-index': 20,
|
||||
};
|
||||
if (props.isScroll) {
|
||||
mode = {
|
||||
...mode,
|
||||
background:
|
||||
props.header.navbar.type == 'color'
|
||||
? props.header.navbar.color
|
||||
: props.header.navbar.src
|
||||
? 'url(' + Fast.api.cdnurl(props.header.navbar.src) + ')'
|
||||
: props.header.navbar.src,
|
||||
};
|
||||
}
|
||||
}
|
||||
if (props.header.navbar.mode == 'normal') {
|
||||
mode = {
|
||||
background:
|
||||
props.header.navbar.type == 'color'
|
||||
? props.header.navbar.color
|
||||
: props.header.navbar.src
|
||||
? 'url(' + Fast.api.cdnurl(props.header.navbar.src) + ')'
|
||||
: props.header.navbar.src,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return mode
|
||||
}
|
||||
|
||||
return {
|
||||
headerStyle,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
const CenterNavbar = {
|
||||
template: `
|
||||
<div class="center-navbar" v-if="
|
||||
header.navbar.mode == 'normal' ||
|
||||
(header.navbar.mode == 'inner' && header.navbar.alwaysShow) ||
|
||||
isScroll
|
||||
">
|
||||
<div class="navbar-wrap">
|
||||
<div v-if="page == 'diypage'" class="item"
|
||||
:style="{ width: scale + 'px', height: 32 + 'px', top: 0 + 'px', left: 0 + 'px' }">
|
||||
<img class="header-diypage" src="/assets/addons/shopro/img/decorate/header-diypage.png" />
|
||||
</div>
|
||||
<template v-for="l in header.navbar.list[pType]" :key="l">
|
||||
<div class="item" :style="{
|
||||
width: l.width * scale + 'px',
|
||||
height: 32 + 'px',
|
||||
top: 0 + 'px',
|
||||
left: l.left * scale + 'px',
|
||||
}">
|
||||
<div v-if="l.type == 'text'" class="text sa-table-line-1" :style="{ color: l.textColor }">
|
||||
{{ l.text }}
|
||||
</div>
|
||||
<sa-image v-if="l.type == 'image'" :url="l.src" :size="20" :suffix="null"></sa-image>
|
||||
<div v-if="l.type == 'search'" class="search sa-line-1"
|
||||
:style="{ borderRadius: l.borderRadius + 'px' }">
|
||||
<el-icon class="sa-m-r-8">
|
||||
<Search />
|
||||
</el-icon>
|
||||
{{ l.placeholder }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>`,
|
||||
emit: ['update:modelValue', 'update:show'],
|
||||
props: ['header', 'page', 'platform', 'isScroll'],
|
||||
setup(props) {
|
||||
|
||||
const { computed } = Vue
|
||||
|
||||
const scale = (375 - 12) / 8;
|
||||
|
||||
const pType = computed(() => (props.platform == 'WechatMiniProgram' ? 'mp' : 'app'));
|
||||
return {
|
||||
scale,
|
||||
pType
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
const DColorPicker = {
|
||||
template: `
|
||||
<div class="d-color-picker sa-flex">
|
||||
<img class="empty" src="/assets/addons/shopro/img/decorate/picker.png" />
|
||||
<el-color-picker v-model="color" @change="onChangeColor"></el-color-picker>
|
||||
<el-input v-model="color" @input="onChangeColor"></el-input>
|
||||
<el-checkbox v-if="isshow" class="sa-m-l-16" v-model="flag" :true-label="1" :false-label="0" @change="onChangeFlag">
|
||||
</el-checkbox>
|
||||
</div>`,
|
||||
emit: ['update:modelValue', 'update:show'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
show: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
isshow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, watch } = Vue
|
||||
|
||||
const color = ref(props.modelValue);
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
() => {
|
||||
color.value = props.modelValue;
|
||||
},
|
||||
);
|
||||
|
||||
function onChangeColor() {
|
||||
emit('update:modelValue', color.value);
|
||||
}
|
||||
|
||||
const flag = ref(props.show);
|
||||
watch(
|
||||
() => props.show,
|
||||
() => {
|
||||
flag.value = props.show;
|
||||
},
|
||||
);
|
||||
|
||||
function onChangeFlag() {
|
||||
emit('update:show', flag.value);
|
||||
}
|
||||
return {
|
||||
color,
|
||||
onChangeColor,
|
||||
flag,
|
||||
onChangeFlag
|
||||
}
|
||||
}
|
||||
}
|
||||
218
public/assets/addons/shopro/components/decorate/d-cube.js
Normal file
@@ -0,0 +1,218 @@
|
||||
const DCube = {
|
||||
template: `
|
||||
<div>
|
||||
<div class="d-cube">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr v-for="trItem in map.tr" :key="trItem">
|
||||
<td class="image-cube-item" :class="
|
||||
state.item.minRow <= trItem &&
|
||||
trItem <= state.item.maxRow &&
|
||||
state.item.minCol <= tdItem &&
|
||||
tdItem <= state.item.maxCol
|
||||
? 'is-active'
|
||||
: ''
|
||||
" :style="{
|
||||
width: scale + 'px',
|
||||
height: scale + 'px',
|
||||
}" v-for="tdItem in map.td" :key="tdItem" @click.stop="onSelectImageCube(trItem, tdItem)"
|
||||
@mouseover="onMouseoverImageCube(trItem, tdItem)">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div v-if="type=='page' && page == 'diypage'" class="position-left" :style="{
|
||||
width: scale * 2 + 'px',
|
||||
}">
|
||||
<img src="/assets/addons/shopro/img/decorate/header-diypage.png" />
|
||||
</div>
|
||||
<div v-if="type=='page' && platform == 'WechatMiniProgram'" class="WechatMiniProgram">
|
||||
<img :src="'/assets/addons/shopro/img/decorate/header-' + platform + '.png'" />
|
||||
</div>
|
||||
<div class="position-item sa-flex sa-row-center" :class="state.active == sindex ? 'is-active' : ''"
|
||||
v-for="(style, sindex) in state.cubeData" :style="{
|
||||
width: style.width * scale + 'px',
|
||||
height: style.height * scale + 'px',
|
||||
top: style.top * scale + 'px',
|
||||
left: style.left * scale + 'px',
|
||||
}" :key="style" @mouseover="onCancelImageCubeSelect" @click.stop="onSelectImageCubePosition(sindex)">
|
||||
{{ style.width }}*{{ style.height }}
|
||||
<el-icon class="circle-close-filled" @click.stop="onDeleteImageCube(sindex)">
|
||||
<circle-close-filled />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="state.cubeData.length>0">
|
||||
<slot name="item" :item="state.cubeData[state.active]"></slot>
|
||||
</div>
|
||||
</div>`,
|
||||
emit: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
type: String, // 组件类型
|
||||
page: String, // template类型
|
||||
platform: String, // 平台
|
||||
item: Object, // 列表item
|
||||
scale: {
|
||||
type: Number,
|
||||
default: 66
|
||||
},
|
||||
map: {
|
||||
type: Object,
|
||||
default: {
|
||||
tr: 4,
|
||||
td: 4
|
||||
}
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { computed, reactive, watch } = Vue
|
||||
|
||||
const cubeType = computed(() => props.platform == 'WechatMiniProgram' ? 'mp' : 'app')
|
||||
|
||||
// 修改平台
|
||||
watch(
|
||||
() => props.platform,
|
||||
() => {
|
||||
if (props.type == 'imageCube') {
|
||||
state.cubeData = props.modelValue || [];
|
||||
state.selectedIndex = props.modelValue.length > 0 ? 0 : null;
|
||||
} else if (props.type == 'page') {
|
||||
state.cubeData = props.modelValue[cubeType.value] || [];
|
||||
state.selectedIndex = props.modelValue[cubeType.value].length > 0 ? 0 : null;
|
||||
}
|
||||
})
|
||||
|
||||
const state = reactive({
|
||||
start: { row: 0, col: 0 },
|
||||
isFlag: false,
|
||||
item: props.item,
|
||||
cubeData: [],
|
||||
active: 0,
|
||||
})
|
||||
|
||||
if (props.type == 'imageCube') {
|
||||
state.cubeData = props.modelValue || []
|
||||
} else if (props.type == 'page') {
|
||||
state.cubeData = props.modelValue[cubeType.value] || []
|
||||
}
|
||||
watch(() => props.modelValue, () => {
|
||||
if (props.type == 'imageCube') {
|
||||
state.cubeData = props.modelValue || []
|
||||
} else if (props.type == 'page') {
|
||||
state.cubeData = props.modelValue[cubeType.value] || []
|
||||
}
|
||||
})
|
||||
|
||||
// 广告魔方
|
||||
function onSelectImageCube(row, col) {
|
||||
// 开始的坐标
|
||||
if (!state.isFlag) {
|
||||
state.start.row = row;
|
||||
state.start.col = col;
|
||||
}
|
||||
// 结束存储数据
|
||||
if (state.isFlag) {
|
||||
state.cubeData.push(JSON.parse(JSON.stringify(state.item)));
|
||||
state.active = state.cubeData.length - 1;
|
||||
onClearImageCubeItem();
|
||||
onUpdateImageCube();
|
||||
}
|
||||
state.isFlag = !state.isFlag;
|
||||
onMouseoverImageCube(row, col);
|
||||
}
|
||||
function onMouseoverImageCube(row, col) {
|
||||
if (state.isFlag) {
|
||||
let squaresArr = [
|
||||
state.start.row + '*' + state.start.col,
|
||||
row + '*' + col,
|
||||
state.start.row + '*' + col,
|
||||
row + '*' + state.start.col,
|
||||
];
|
||||
let min = squaresArr.sort()[0].split('*');
|
||||
let max = squaresArr.sort()[3].split('*');
|
||||
// 面积不可重叠
|
||||
const flag = state.cubeData.some((f) => {
|
||||
return isOverlap(f, {
|
||||
width: Math.abs(state.start.col - col) + 1,
|
||||
height: Math.abs(state.start.row - row) + 1,
|
||||
left: min[1] - 1,
|
||||
top: min[0] - 1,
|
||||
});
|
||||
});
|
||||
if (!flag) {
|
||||
// 宽高
|
||||
state.item = {
|
||||
...props.item,
|
||||
width: Math.abs(state.start.col - col) + 1,
|
||||
height: Math.abs(state.start.row - row) + 1,
|
||||
top: min[0] - 1, // 定位
|
||||
left: min[1] - 1,
|
||||
minRow: min[0], // xy轴最大最小值
|
||||
maxRow: max[0],
|
||||
minCol: min[1],
|
||||
maxCol: max[1],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function onDeleteImageCube(index) {
|
||||
state.cubeData.splice(index, 1);
|
||||
state.active = state.cubeData.length - 1;
|
||||
onUpdateImageCube();
|
||||
}
|
||||
function onCancelImageCubeSelect() {
|
||||
state.isFlag = false;
|
||||
onClearImageCubeItem();
|
||||
}
|
||||
function onSelectImageCubePosition(index) {
|
||||
state.active = index;
|
||||
}
|
||||
function onUpdateImageCube() {
|
||||
let deleteData = ['minRow', 'maxRow', 'minCol', 'maxCol'];
|
||||
state.cubeData.forEach((item) => {
|
||||
deleteData.forEach((d) => {
|
||||
delete item[d];
|
||||
});
|
||||
});
|
||||
if (props.type == 'imageCube') {
|
||||
emit('update:modelValue', state.cubeData)
|
||||
} else if (props.type == 'page') {
|
||||
emit('update:modelValue', {
|
||||
mp: props.platform == 'WechatMiniProgram' ? state.cubeData : props.modelValue.mp,
|
||||
app: props.platform != 'WechatMiniProgram' ? state.cubeData : props.modelValue.app
|
||||
})
|
||||
}
|
||||
|
||||
// console.log(state.cubeData, '广告魔方数据')
|
||||
}
|
||||
function onClearImageCubeItem() {
|
||||
state.item = props.item
|
||||
}
|
||||
function isOverlap(obj1, obj2) {
|
||||
const l1 = { x: obj1.left, y: obj1.top };
|
||||
const r1 = { x: obj1.left + obj1.width, y: obj1.top + obj1.height };
|
||||
const l2 = { x: obj2.left, y: obj2.top };
|
||||
const r2 = { x: obj2.left + obj2.width, y: obj2.top + obj2.height };
|
||||
if (l1.x >= r2.x || l2.x >= r1.x || l1.y >= r2.y || l2.y >= r1.y) return false;
|
||||
return true;
|
||||
}
|
||||
return {
|
||||
state,
|
||||
onSelectImageCube,
|
||||
onMouseoverImageCube,
|
||||
onDeleteImageCube,
|
||||
onCancelImageCubeSelect,
|
||||
onSelectImageCubePosition,
|
||||
onUpdateImageCube,
|
||||
onClearImageCubeItem,
|
||||
isOverlap
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
const DGoodsSelect = {
|
||||
template: `
|
||||
<div class="d-goods-select">
|
||||
<div class="card">
|
||||
<div class="title">
|
||||
<slot name="title">商品选择</slot>
|
||||
</div>
|
||||
<div class="wrap">
|
||||
<draggable
|
||||
class="sa-flex sa-flex-wrap"
|
||||
v-model="listData"
|
||||
item-key="element"
|
||||
:animation="300"
|
||||
@end="onEnd"
|
||||
>
|
||||
<template #item="{ element, index }">
|
||||
<div class="goods-item">
|
||||
<sa-image :url="type=='goods'?element.image:element.feeds_img" size="44"></sa-image>
|
||||
<div class="goods-delete" @click="onDelete(index)">
|
||||
<el-icon>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
<slot name="add">
|
||||
<el-button class="add-button" icon="Plus" @click="onAdd">添加</el-button>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
emit: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
max: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'goods',
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, watch } = Vue
|
||||
|
||||
const listData = ref(props.modelValue || []);
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
() => {
|
||||
listData.value = props.modelValue;
|
||||
},
|
||||
);
|
||||
|
||||
function onAdd() {
|
||||
let multiple = true
|
||||
let ids = []
|
||||
listData.value.forEach(item => {
|
||||
ids.push(item.id)
|
||||
})
|
||||
if (props.type == 'goods') {
|
||||
Fast.api.open(`shopro/goods/goods/select?multiple=${multiple}&ids=${ids.join(',')}`, "选择商品", {
|
||||
callback(data) {
|
||||
emit('update:modelValue', data);
|
||||
}
|
||||
})
|
||||
} else if (props.type == 'mplive') {
|
||||
Fast.api.open(`shopro/app/mplive/room/select`, "选择直播间", {
|
||||
callback(data) {
|
||||
emit('update:modelValue', data);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
function onDelete(index) {
|
||||
listData.value.splice(index, 1);
|
||||
}
|
||||
function onEnd() {
|
||||
emit('update:modelValue', listData.value);
|
||||
}
|
||||
return {
|
||||
listData,
|
||||
onAdd,
|
||||
onDelete,
|
||||
onEnd
|
||||
}
|
||||
}
|
||||
}
|
||||
69
public/assets/addons/shopro/components/decorate/d-list.js
Normal file
@@ -0,0 +1,69 @@
|
||||
const DList = {
|
||||
template: `
|
||||
<div class="d-list">
|
||||
<div class="title">
|
||||
<slot name="title">数据</slot>
|
||||
</div>
|
||||
<div class="wrap">
|
||||
<draggable v-model="listData" item-key="element" :animation="300" handle=".sortable-drag" @end="onEnd">
|
||||
<template #item="{ element, index }">
|
||||
<div class="list-item">
|
||||
<div class="move sa-flex">
|
||||
<i class="iconfont iconmove sortable-drag"></i>
|
||||
<slot name="deleteIcon">
|
||||
<span class="list-delete" @click="onDelete(index)">删除</span>
|
||||
</slot>
|
||||
</div>
|
||||
<slot name="listitem" :element="element"></slot>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
<slot name="add" v-if="listData.length != leng">
|
||||
<el-button class="add-button" icon="Plus" @click="onAdd">添加</el-button>
|
||||
</slot>
|
||||
</div>
|
||||
</div>`,
|
||||
emit: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
item: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
leng: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, watch } = Vue
|
||||
|
||||
const listData = ref(props.modelValue);
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
() => {
|
||||
listData.value = props.modelValue;
|
||||
},
|
||||
);
|
||||
|
||||
function onAdd() {
|
||||
listData.value.push(JSON.parse(JSON.stringify(props.item)));
|
||||
}
|
||||
function onDelete(index) {
|
||||
listData.value.splice(index, 1);
|
||||
}
|
||||
|
||||
function onEnd() {
|
||||
emit('update:modelValue', listData.value);
|
||||
}
|
||||
return {
|
||||
listData,
|
||||
onAdd,
|
||||
onDelete,
|
||||
onEnd
|
||||
}
|
||||
}
|
||||
}
|
||||
48
public/assets/addons/shopro/components/decorate/d-slider.js
Normal file
@@ -0,0 +1,48 @@
|
||||
const DSlider = {
|
||||
template: `
|
||||
<div class="d-slider sa-flex">
|
||||
<el-slider v-model="sliderValue" :show-tooltip="false" @input="onChangeSlider"></el-slider>
|
||||
<el-input v-model="sliderInput" type="number" @input="onChangeInput">
|
||||
<template #suffix>
|
||||
<span class="el-input__icon">PX</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>`,
|
||||
emit: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
mult: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, watch } = Vue
|
||||
|
||||
const sliderValue = ref(props.modelValue / props.mult);
|
||||
const sliderInput = ref(props.modelValue);
|
||||
watch(() => props.modelValue, () => {
|
||||
sliderValue.value = props.modelValue / props.mult;
|
||||
sliderInput.value = props.modelValue;
|
||||
})
|
||||
|
||||
function onChangeSlider(sv) {
|
||||
sliderInput.value = Number(sv * props.mult);
|
||||
emit('update:modelValue', Number(sv * props.mult));
|
||||
}
|
||||
|
||||
function onChangeInput(si) {
|
||||
sliderValue.value = Number(si / props.mult);
|
||||
emit('update:modelValue', Number(si));
|
||||
}
|
||||
return {
|
||||
sliderValue,
|
||||
sliderInput,
|
||||
onChangeSlider,
|
||||
onChangeInput
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
const DTextColor = {
|
||||
template: `
|
||||
<div class="d-text-color sa-flex">
|
||||
<el-input v-model="modelValue.text" :placeholder="placeholder" :maxlength="maxlength"
|
||||
:show-word-limit="showWordLimit" @input="onChange"></el-input>
|
||||
<div class="color sa-flex">
|
||||
<img class="empty" src="/assets/addons/shopro/img/decorate/picker.png" />
|
||||
<el-color-picker v-model="modelValue.color" @change="onChange" />
|
||||
</div>
|
||||
</div>`,
|
||||
emit: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Object,
|
||||
default: {
|
||||
text: '',
|
||||
color: ''
|
||||
}
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请输入',
|
||||
},
|
||||
maxlength: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
showWordLimit: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, watch } = Vue
|
||||
|
||||
const textColor = ref(props.modelValue);
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
() => {
|
||||
textColor.value = props.modelValue;
|
||||
},
|
||||
);
|
||||
|
||||
function onChange() {
|
||||
emit('update:modelValue', textColor.value);
|
||||
}
|
||||
return {
|
||||
textColor,
|
||||
onChange
|
||||
}
|
||||
}
|
||||
}
|
||||
48
public/assets/addons/shopro/components/decorate/d-url.js
Normal file
@@ -0,0 +1,48 @@
|
||||
const DUrl = {
|
||||
template: `
|
||||
<div class="d-url sa-flex">
|
||||
<el-input v-model="path" :placeholder="placeholder" @input="onChangeUrl">
|
||||
<template #append>
|
||||
<span class="cursor-pointer" @click="onSelectUrl">选择</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>`,
|
||||
emit: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请输入或选择',
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, watch } = Vue
|
||||
|
||||
const path = ref(props.modelValue);
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
() => {
|
||||
path.value = props.modelValue;
|
||||
},
|
||||
);
|
||||
|
||||
function onChangeUrl() {
|
||||
emit('update:modelValue', path.value);
|
||||
}
|
||||
function onSelectUrl() {
|
||||
Fast.api.open("shopro/data/page/select", "选择链接", {
|
||||
callback(data) {
|
||||
emit('update:modelValue', data.path);
|
||||
}
|
||||
})
|
||||
}
|
||||
return {
|
||||
path,
|
||||
onChangeUrl,
|
||||
onSelectUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
const SaFilterCondition = {
|
||||
template: `
|
||||
<div class="condition-wrap">
|
||||
<div class="condition-item" v-for="(value,key) in filter.condition">
|
||||
{{value}}
|
||||
<el-icon class="close">
|
||||
<close />
|
||||
</el-icon>
|
||||
<el-icon class="circle-close-filled" @click="onDeleteFilter(key)">
|
||||
<circle-close-filled />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>`,
|
||||
emit: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Object,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, watch } = Vue
|
||||
const filter = ref(props.modelValue)
|
||||
|
||||
watch(() => props.modelValue, () => {
|
||||
filter.value = props.modelValue
|
||||
})
|
||||
|
||||
function onDeleteFilter(key) {
|
||||
filter.value.data[key] = JSON.parse(JSON.stringify(filter.value.tools[key].value))
|
||||
delete filter.value.condition[key]
|
||||
emit('update:modelValue', filter.value)
|
||||
emit('filter-delete', key)
|
||||
}
|
||||
return {
|
||||
filter,
|
||||
onDeleteFilter,
|
||||
}
|
||||
}
|
||||
}
|
||||
233
public/assets/addons/shopro/components/sa-filter.js
Normal file
@@ -0,0 +1,233 @@
|
||||
/**
|
||||
* @description 搜索
|
||||
* @param { Object } modelValue
|
||||
* modelValue = {
|
||||
drawer: false,
|
||||
data: {
|
||||
title: '',
|
||||
order: { field: 'id', value: '' },
|
||||
type: '',
|
||||
category_ids: [],
|
||||
create_time: [],
|
||||
},
|
||||
tools: {
|
||||
title: {
|
||||
type: 'tinput',
|
||||
label: '商品名称',
|
||||
placeholder: '',
|
||||
value: '',
|
||||
},
|
||||
order: {
|
||||
type: 'tinputprepend',
|
||||
label: '查询内容',
|
||||
placeholder: '请输入查询内容',
|
||||
value: {
|
||||
field: 'id',
|
||||
value: '',
|
||||
},
|
||||
options: {
|
||||
data: [{
|
||||
label: '订单ID',
|
||||
value: 'id',
|
||||
},
|
||||
{
|
||||
label: '订单编号',
|
||||
value: 'order_sn',
|
||||
},
|
||||
{
|
||||
label: '售后单号',
|
||||
value: 'aftersale.aftersale_sn',
|
||||
}]
|
||||
},
|
||||
},
|
||||
type: {
|
||||
type: 'tselect',
|
||||
label: '订单类型',
|
||||
placeholder: '',
|
||||
value: '',
|
||||
options: {
|
||||
data: [{
|
||||
name: '订单ID',
|
||||
type: 'id',
|
||||
}],
|
||||
props: {
|
||||
label: 'name',
|
||||
value: 'type',
|
||||
},
|
||||
},
|
||||
},
|
||||
category_ids: {
|
||||
type: 'tcascader',
|
||||
label: '商品分类',
|
||||
placeholder: '',
|
||||
value: [],
|
||||
options: {
|
||||
data: [],
|
||||
props: {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
checkStrictly: true,
|
||||
emitPath: false,
|
||||
multiple: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
create_time: {
|
||||
type: 'tdatetimerange',
|
||||
label: '下单时间',
|
||||
placeholder: '',
|
||||
value: [],
|
||||
},
|
||||
},
|
||||
condition: {}
|
||||
}
|
||||
* @function filter-change
|
||||
*/
|
||||
|
||||
const SaFilter = {
|
||||
template: `
|
||||
<el-drawer custom-class="sa-filter" v-model="filter.drawer" direction="rtl">
|
||||
<el-container>
|
||||
<el-header class="sa-filter-header sa-flex sa-row-between">
|
||||
<div>筛选</div>
|
||||
<el-icon @click="onClose">
|
||||
<Close />
|
||||
</el-icon>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-form label-position="top" label-width="120px">
|
||||
<el-form-item v-for="(value,key) in filter.tools" :label="value.label">
|
||||
<template v-if="value.type=='tinput'">
|
||||
<el-input v-model="filter.data[key]" :placeholder="value.placeholder || value.label"></el-input>
|
||||
</template>
|
||||
<template v-if="value.type=='tinputprepend'">
|
||||
<el-input v-model="filter.data[key].value" :placeholder="value.placeholder || value.label">
|
||||
<template #prepend>
|
||||
<el-select v-model="filter.data[key].field" placeholder="Select">
|
||||
<el-option v-for="option in value.options.data" :key="option.value"
|
||||
:label="option.label || option[value.options.props.label]"
|
||||
:value="option.value || option[value.options.props.value]">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-if="value.type=='tselect'">
|
||||
<el-select v-model="filter.data[key]" :placeholder="value.placeholder || value.label">
|
||||
<el-option v-for="option in value.options.data" :key="option.value"
|
||||
:label="option.label || option[value.options.props.label]"
|
||||
:value="option.value || option[value.options.props.value]">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-if="value.type=='tcascader'">
|
||||
<el-cascader :ref="(el) => setCascaderRef(el, key)" v-model="filter.data[key]"
|
||||
:options="value.options.data" :props="value.options.props"
|
||||
:placeholder="value.placeholder || value.label" size="default" clearable></el-cascader>
|
||||
</template>
|
||||
<template v-if="value.type == 'tdatetimerange'">
|
||||
<el-date-picker v-model="filter.data[key]" type="datetimerange"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
|
||||
:default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)]"
|
||||
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :editable="false">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<slot name="supplement"></slot>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer class="sa-footer--submit sa-flex sa-row-right">
|
||||
<el-button @click="onReset">重置</el-button>
|
||||
<el-button type="primary" @click="onConfirm">提交</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-drawer>`,
|
||||
emit: ['update:modelValue', 'filter-change'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Object,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref } = Vue
|
||||
const filter = ref(props.modelValue)
|
||||
|
||||
let tempFilter = JSON.parse(JSON.stringify(filter.value))
|
||||
|
||||
let cascaderRef = {};
|
||||
const setCascaderRef = (el, key) => {
|
||||
if (el) {
|
||||
cascaderRef[key] = el;
|
||||
}
|
||||
};
|
||||
|
||||
function onConfirm() {
|
||||
filter.value.condition = {}
|
||||
for (key in filter.value.tools) {
|
||||
let props = {
|
||||
label: 'label',
|
||||
value: 'value'
|
||||
}
|
||||
if (filter.value.tools[key].type == 'tinput') {
|
||||
if (filter.value.data[key]) {
|
||||
filter.value.condition[key] = `${filter.value.tools[key].label}:${filter.value.data[key]}`
|
||||
}
|
||||
} else if (filter.value.tools[key].type == 'tinputprepend') {
|
||||
if (filter.value.tools[key].options.props) {
|
||||
props = { ...props, ...filter.value.tools[key].options.props }
|
||||
}
|
||||
let findItem = filter.value.tools[key].options.data.find(item => item[props.value] == filter.value.data[key].field)
|
||||
if (filter.value.data[key].value && findItem) {
|
||||
filter.value.condition[key] = `${findItem[props.label]}:${filter.value.data[key].value}`
|
||||
}
|
||||
} else if (filter.value.tools[key].type == 'tselect') {
|
||||
if (filter.value.data[key] && filter.value.data[key] != 'all') {
|
||||
if (filter.value.tools[key].options.props) {
|
||||
props = { ...props, ...filter.value.tools[key].options.props }
|
||||
}
|
||||
let findItem = filter.value.tools[key].options.data.find(item => item[props.value] == filter.value.data[key])
|
||||
if (findItem) {
|
||||
filter.value.condition[key] = `${filter.value.tools[key].label}:${findItem[props.label]}`
|
||||
}
|
||||
}
|
||||
} else if (filter.value.tools[key].type == 'tcascader') {
|
||||
let text = []
|
||||
cascaderRef[key].getCheckedNodes().forEach(item => {
|
||||
text.push(item.text)
|
||||
})
|
||||
if (text.length > 0) {
|
||||
filter.value.condition[key] = `${filter.value.tools[key].label}:${text.join(',')}`
|
||||
}
|
||||
} else if (filter.value.tools[key].type == 'tdatetimerange') {
|
||||
if (filter.value.data[key].length > 0) {
|
||||
filter.value.condition[key] = `${filter.value.tools[key].label}:${filter.value.data[key].join(' - ')}`
|
||||
}
|
||||
}
|
||||
}
|
||||
emit('update:modelValue', filter.value)
|
||||
emit('filter-change')
|
||||
}
|
||||
function onReset() {
|
||||
for (key in filter.value.tools) {
|
||||
filter.value.data[key] = JSON.parse(JSON.stringify(tempFilter.tools[key].value))
|
||||
}
|
||||
filter.value.condition = {}
|
||||
emit('update:modelValue', filter.value)
|
||||
emit('filter-change')
|
||||
}
|
||||
function onClose() {
|
||||
filter.value.drawer = false
|
||||
emit('update:modelValue', filter.value)
|
||||
}
|
||||
return {
|
||||
filter,
|
||||
cascaderRef,
|
||||
setCascaderRef,
|
||||
onConfirm,
|
||||
onReset,
|
||||
onClose
|
||||
}
|
||||
}
|
||||
}
|
||||
60
public/assets/addons/shopro/components/sa-image.js
Normal file
@@ -0,0 +1,60 @@
|
||||
const SaImage = {
|
||||
template: `
|
||||
<div class="sa-image" :style="itemStyle">
|
||||
<el-image v-for="item in urlList" :src="Fast.api.cdnurl(item)" :fit="fit"
|
||||
:preview-src-list="ispreview?[Fast.api.cdnurl(item)]:[]" :preview-teleported="true">
|
||||
<template #error>
|
||||
<el-icon>
|
||||
<Picture />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-image>
|
||||
</div>`,
|
||||
props: {
|
||||
url: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
fit: {
|
||||
type: String,
|
||||
default: 'contain'
|
||||
},
|
||||
radius: {
|
||||
type: [String, Number],
|
||||
default: 4
|
||||
},
|
||||
ispreview: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const { ref, watch, computed } = Vue
|
||||
|
||||
const urlList = ref(props.url ? props.url.split(',') : [''])
|
||||
watch(() => props.url, () => {
|
||||
urlList.value = props.url ? props.url.split(',') : ['']
|
||||
})
|
||||
|
||||
const itemStyle = computed(() => {
|
||||
let style = {}
|
||||
if (props.size) {
|
||||
style = {
|
||||
width: `${props.size}px`,
|
||||
height: `${props.size}px`,
|
||||
'border-radius': `${props.radius}px`
|
||||
}
|
||||
}
|
||||
return style
|
||||
})
|
||||
return {
|
||||
Fast,
|
||||
urlList,
|
||||
itemStyle,
|
||||
}
|
||||
}
|
||||
}
|
||||
41
public/assets/addons/shopro/components/sa-pagination.js
Normal file
@@ -0,0 +1,41 @@
|
||||
const SaPagination = {
|
||||
template: `
|
||||
<el-pagination class="sa-pagination" v-model:current-page="paginationData.page" v-model:page-size="paginationData.list_rows"
|
||||
:page-sizes="[10, 50, 100]" :pager-count="5" layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="paginationData.total" @size-change="onChangeSize" @current-change="onChangeCurrent">
|
||||
</el-pagination>`,
|
||||
emit: ['update:modelValue', 'pagination-change'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Object,
|
||||
default: {
|
||||
page: 1,
|
||||
list_rows: 10,
|
||||
total: 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref } = Vue
|
||||
|
||||
const paginationData = ref(props.modelValue)
|
||||
|
||||
function onChangeSize(e) {
|
||||
paginationData.value.list_rows = e
|
||||
emit('update:modelValue', paginationData.value)
|
||||
emit('pagination-change')
|
||||
}
|
||||
|
||||
function onChangeCurrent(e) {
|
||||
paginationData.value.page = e
|
||||
emit('update:modelValue', paginationData.value)
|
||||
emit('pagination-change')
|
||||
}
|
||||
|
||||
return {
|
||||
paginationData,
|
||||
onChangeSize,
|
||||
onChangeCurrent
|
||||
}
|
||||
}
|
||||
}
|
||||
121
public/assets/addons/shopro/components/sa-uploader.js
Normal file
@@ -0,0 +1,121 @@
|
||||
const SaUploader = {
|
||||
template: `
|
||||
<div class="sa-uploader">
|
||||
<draggable class="sa-flex sa-flex-wrap" v-model="urlList" :animation="300" item-key="element"
|
||||
handle=".sortable-drag" @end="emit('update:modelValue', multiple ? urlList : urlList.join(','))">
|
||||
<template #item="{ element, index }">
|
||||
<div class="sa-uploader-item" :style="itemStyle">
|
||||
<template v-if="element.includes('.avi') || element.includes('.mov') || element.includes('.rmvb') || element.includes('.rm')
|
||||
|| element.includes('.flv') || element.includes('.mp4') || element.includes('.3gp')
|
||||
">
|
||||
<el-dialog class="sa-dialog-video sa-dialog" v-model="previewVisible" fullscreen>123
|
||||
<video :src="Fast.api.cdnurl(element)" controls></video>
|
||||
</el-dialog>
|
||||
<video class="sa-video" :src="Fast.api.cdnurl(element)" @click.stop="previewVisible = true"></video>
|
||||
</template>
|
||||
<el-image v-else :ref="'imageRef_'+index" :src="Fast.api.cdnurl(element)" fit="contain"
|
||||
:preview-src-list="[Fast.api.cdnurl(element)]" :preview-teleported="true"
|
||||
@load="onImageLoaded"
|
||||
>
|
||||
<template #error>
|
||||
<el-icon>
|
||||
<Picture />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-image>
|
||||
<div class="mask">
|
||||
<el-icon v-if="multiple" class="sortable-drag">
|
||||
<Rank />
|
||||
</el-icon>
|
||||
<el-icon @click="onDeleteFile(index)">
|
||||
<CircleCloseFilled />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
<div v-if="multiple || (!multiple && urlList.length==0)" class="sa-uploader-item add" :style="itemStyle"
|
||||
@click="onSelectFile">
|
||||
<el-image fit="contain">
|
||||
<template #error>
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-image>
|
||||
</div>
|
||||
</div>`,
|
||||
emit: ['update:modelValue', 'success'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: [Array, String],
|
||||
default: ''
|
||||
},
|
||||
size: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const { ref, computed, watch, nextTick, getCurrentInstance } = Vue
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const urlList = ref(props.modelValue ? isArray(props.modelValue) ? props.modelValue : props.modelValue.split(',') : [])
|
||||
watch(() => props.modelValue, () => {
|
||||
urlList.value = props.modelValue ? isArray(props.modelValue) ? props.modelValue : props.modelValue.split(',') : []
|
||||
})
|
||||
|
||||
const itemStyle = computed(() => ({
|
||||
width: `${props.size}px`,
|
||||
height: `${props.size}px`
|
||||
}))
|
||||
|
||||
const previewVisible = ref(false)
|
||||
|
||||
// 图片加载完毕
|
||||
function onImageLoaded() {
|
||||
nextTick(() => {
|
||||
if (props.type === 'size') {
|
||||
emit('success', { image_width: proxy.$refs.imageRef_0._.refs.container.firstChild.naturalWidth, image_height: proxy.$refs.imageRef_0._.refs.container.firstChild.naturalHeight })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function onSelectFile() {
|
||||
Fast.api.open(`general/attachment/select?multiple=${props.multiple}`, "选择", {
|
||||
callback: function (data) {
|
||||
data.url.split(',').forEach(item => {
|
||||
urlList.value.push(item)
|
||||
});
|
||||
emit('update:modelValue', props.multiple ? urlList.value : urlList.value.join(','))
|
||||
}
|
||||
});
|
||||
}
|
||||
function onDeleteFile(index) {
|
||||
urlList.value.splice(index, 1)
|
||||
emit('update:modelValue', props.multiple ? urlList.value : urlList.value.join(','))
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
Fast,
|
||||
props,
|
||||
emit,
|
||||
urlList,
|
||||
itemStyle,
|
||||
previewVisible,
|
||||
onSelectFile,
|
||||
onDeleteFile,
|
||||
onImageLoaded
|
||||
}
|
||||
}
|
||||
}
|
||||
136
public/assets/addons/shopro/components/sa-user-profile.js
Normal file
@@ -0,0 +1,136 @@
|
||||
const SaUserProfile = {
|
||||
template: `
|
||||
<div class="sa-user-profile" :class="type != 'oper' ? 'mode-'+mode : ''">
|
||||
<template v-if="type != 'oper'">
|
||||
<template v-if="userData">
|
||||
<template v-if="ishover">
|
||||
<el-popover placement="top" trigger="hover" popper-class="profile-popover sa-user-profile sa-popper">
|
||||
<div class="sa-flex">
|
||||
<div class="avatar">
|
||||
<sa-image v-if="userData.avatar" :url="userData.avatar"></sa-image>
|
||||
<img v-else class="default-avatar" src="/assets/addons/shopro/img/default-avatar.png" />
|
||||
<!-- 0未知 1男 -->
|
||||
<img v-if="userData && (userData.gender || userData.gender==0)" class="gender"
|
||||
:src="'/assets/addons/shopro/img/gender-'+userData.gender+'.png'">
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-name sa-table-line-1">
|
||||
{{ userData.nickname }}
|
||||
</div>
|
||||
<div class="sa-flex">
|
||||
<div class="id" @click="onOpenUserDetail(id)">#{{ id }}</div>
|
||||
<div class="text-desc">
|
||||
{{ userData.username || userData.account }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #reference>
|
||||
<div class="wrap">
|
||||
<div v-if="isavatar" class="avatar">
|
||||
<sa-image v-if="userData.avatar" :url="userData.avatar"></sa-image>
|
||||
<img v-else class="default-avatar" src="/assets/addons/shopro/img/default-avatar.png" />
|
||||
</div>
|
||||
<div class="text-name is-hover sa-table-line-1">
|
||||
{{ userData.nickname }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
<div v-else class="wrap">
|
||||
<div v-if="isavatar" class="avatar">
|
||||
<sa-image v-if="userData.avatar" :url="userData.avatar"></sa-image>
|
||||
<img v-else class="default-avatar" src="/assets/addons/shopro/img/default-avatar.png" />
|
||||
</div>
|
||||
<div class="text-name sa-table-line-1">
|
||||
{{ userData.nickname }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="type == 'agent'">
|
||||
{{ id ? '未找到用户' : id == 0 ? '平台直推' : '暂无推荐人' }}
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="type == 'oper'">
|
||||
<div class="wrap">
|
||||
<template v-if="userData">
|
||||
<div class="avatar mr-2">
|
||||
<sa-image v-if="userData.type != 'system' && userData.avatar" :url="userData.avatar"></sa-image>
|
||||
<img v-else class="default-avatar" src="/assets/addons/estore/img/default-avatar.png" />
|
||||
</div>
|
||||
<div>
|
||||
<template v-if="userData.type != 'system'">
|
||||
<div class="text-name sa-table-line-1">
|
||||
{{ userData.name || '未找到' }}
|
||||
</div>
|
||||
<div class="sa-flex">
|
||||
<div class="id">#{{ id }}</div>
|
||||
<div class="text-desc">
|
||||
{{ userData.type_text }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>{{ userData.type_text }}</template>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>#{{id}}</template>
|
||||
</div>
|
||||
</template>
|
||||
</div>`,
|
||||
props: {
|
||||
user: Object,
|
||||
id: [Number, String],
|
||||
type: {
|
||||
type: String,
|
||||
default: 'user',
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'row',
|
||||
},
|
||||
isavatar: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
ishover: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const { ref, computed } = Vue
|
||||
|
||||
const userData = computed(() => {
|
||||
let obj = props.user;
|
||||
|
||||
if (props.type == 'user' && !props.user) {
|
||||
obj = {
|
||||
avatar: '',
|
||||
nickname: '未找到用户',
|
||||
username: '',
|
||||
};
|
||||
}
|
||||
if (props.type == 'admin' && !props.user) {
|
||||
obj = {
|
||||
avatar: '',
|
||||
nickname: '未找到用户',
|
||||
account: '',
|
||||
};
|
||||
}
|
||||
|
||||
return obj;
|
||||
});
|
||||
|
||||
function onOpenUserDetail(id) {
|
||||
Fast.api.open(`shopro/user/user/detail?id=${id}`, "会员详情")
|
||||
}
|
||||
return {
|
||||
Fast,
|
||||
userData,
|
||||
onOpenUserDetail,
|
||||
}
|
||||
}
|
||||
}
|
||||
214
public/assets/addons/shopro/css/dark.css
Normal file
@@ -0,0 +1,214 @@
|
||||
body,
|
||||
div,
|
||||
span,
|
||||
header,
|
||||
footer,
|
||||
nav,
|
||||
section,
|
||||
aside,
|
||||
article,
|
||||
ul,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
li,
|
||||
a,
|
||||
p,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
em,
|
||||
i,
|
||||
b,
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
figure,
|
||||
figcaption {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
font-style: normal;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
background: none;
|
||||
font-weight: normal;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei,
|
||||
Source Han Sans SC, Noto Sans CJK SC, sans-serif;
|
||||
box-sizing: border-box;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: var(--t-btn-focus);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--t-btn-hover);
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: var(--t-btn-active);
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: normal;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* fast open样式重置 */
|
||||
.is-dialog .content {
|
||||
padding: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.is-dialog .content .panel-block {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
body.darktheme {
|
||||
/* color-scheme: dark; */
|
||||
|
||||
--sa-title: #d6d6d6;
|
||||
--sa-subtitle: #c2c2c2;
|
||||
--sa-font: #adadad;
|
||||
--sa-subfont: #7e7e7e;
|
||||
--sa-place: #525252;
|
||||
|
||||
--sa-border: #464646;
|
||||
--sa-border-secondary: #3e3e3e;
|
||||
--sa-space: #363636;
|
||||
|
||||
--sa-table-header-bg: #323232;
|
||||
--sa-table-striped: #303030;
|
||||
|
||||
--sa-page-background: #121212;
|
||||
--sa-card-background: #2c2c2c;
|
||||
|
||||
--sa-background-assist: #2c2c2c;
|
||||
--sa-bg-assist-1: #404040;
|
||||
|
||||
--sa-box-shadow: rgba(0, 0, 0, 0.24);
|
||||
--sa-mask-background: rgba(46, 46, 46, 0.8);
|
||||
|
||||
--sa-footer-bg: #2c2c2c;
|
||||
--sa-footer-color: #c2c2c2;
|
||||
--sa-footer-color-1: #525252;
|
||||
|
||||
--t-bg-hover: #33313c;
|
||||
--t-bg-focus: #363344;
|
||||
--t-bg-active: #39364c;
|
||||
--t-bg-disabled: #313038;
|
||||
--t-btn-hover: #6d60c7;
|
||||
--t-btn-focus: #7560e2;
|
||||
--t-btn-active: #806af6;
|
||||
--sa-background-hex-hover: #33313c;
|
||||
--sa-background-hex-active: #403b5c;
|
||||
|
||||
/* --el-color-primary: #409eff;
|
||||
--el-color-primary-light-3: #3375b9;
|
||||
--el-color-primary-light-5: #2a598a;
|
||||
--el-color-primary-light-7: #213d5b;
|
||||
--el-color-primary-light-8: #1d3043;
|
||||
--el-color-primary-light-9: #18222c;
|
||||
--el-color-primary-dark-2: #66b1ff; */
|
||||
--el-color-success: #67c23a;
|
||||
--el-color-success-light-3: #4e8e2f;
|
||||
--el-color-success-light-5: #3e6b27;
|
||||
--el-color-success-light-7: #2d481f;
|
||||
--el-color-success-light-8: #25371c;
|
||||
--el-color-success-light-9: #1c2518;
|
||||
--el-color-success-dark-2: #85ce61;
|
||||
--el-color-warning: #e6a23c;
|
||||
--el-color-warning-light-3: #a77730;
|
||||
--el-color-warning-light-5: #7d5b28;
|
||||
--el-color-warning-light-7: #533f20;
|
||||
--el-color-warning-light-8: #3e301c;
|
||||
--el-color-warning-light-9: #292218;
|
||||
--el-color-warning-dark-2: #ebb563;
|
||||
--el-color-danger: #f56c6c;
|
||||
--el-color-danger-light-3: #b25252;
|
||||
--el-color-danger-light-5: #854040;
|
||||
--el-color-danger-light-7: #582e2e;
|
||||
--el-color-danger-light-8: #412626;
|
||||
--el-color-danger-light-9: #2b1d1d;
|
||||
--el-color-danger-dark-2: #f78989;
|
||||
--el-color-error: #f56c6c;
|
||||
--el-color-error-light-3: #b25252;
|
||||
--el-color-error-light-5: #854040;
|
||||
--el-color-error-light-7: #582e2e;
|
||||
--el-color-error-light-8: #412626;
|
||||
--el-color-error-light-9: #2b1d1d;
|
||||
--el-color-error-dark-2: #f78989;
|
||||
--el-color-info: #909399;
|
||||
--el-color-info-light-3: #6b6d71;
|
||||
--el-color-info-light-5: #525457;
|
||||
--el-color-info-light-7: #393a3c;
|
||||
--el-color-info-light-8: #2d2d2f;
|
||||
--el-color-info-light-9: #202121;
|
||||
--el-color-info-dark-2: #a6a9ad;
|
||||
--el-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.36), 0px 8px 20px rgba(0, 0, 0, 0.72);
|
||||
--el-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, 0.72);
|
||||
--el-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, 0.72);
|
||||
--el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, 0.72), 0px 12px 32px #000000, 0px 8px 16px -8px #000000;
|
||||
--el-bg-color-page: #0a0a0a;
|
||||
--el-bg-color: #141414;
|
||||
--el-bg-color-overlay: #1d1e1f;
|
||||
--el-text-color-primary: #E5EAF3;
|
||||
--el-text-color-regular: #CFD3DC;
|
||||
--el-text-color-secondary: #A3A6AD;
|
||||
--el-text-color-placeholder: #8D9095;
|
||||
--el-text-color-disabled: #6C6E72;
|
||||
--el-border-color-darker: #636466;
|
||||
--el-border-color-dark: #58585B;
|
||||
--el-border-color: #4C4D4F;
|
||||
--el-border-color-light: #414243;
|
||||
--el-border-color-lighter: #363637;
|
||||
--el-border-color-extra-light: #2B2B2C;
|
||||
--el-fill-color-darker: #424243;
|
||||
--el-fill-color-dark: #39393A;
|
||||
--el-fill-color: #303030;
|
||||
--el-fill-color-light: #262727;
|
||||
--el-fill-color-lighter: #1D1D1D;
|
||||
--el-fill-color-extra-light: #191919;
|
||||
--el-fill-color-blank: transparent;
|
||||
--el-mask-color: rgba(0, 0, 0, 0.8);
|
||||
--el-mask-color-extra-light: rgba(0, 0, 0, 0.3);
|
||||
--el-disabled-bg-color: var(--sa-background-hex-hover);
|
||||
--el-disabled-text-color: var(--sa-place);
|
||||
--el-disabled-border-color: var(--el-border-color-light);
|
||||
}
|
||||
|
||||
body.darktheme .el-button {
|
||||
--el-button-disabled-text-color: rgba(255, 255, 255, 0.5)
|
||||
}
|
||||
|
||||
body.darktheme .el-card {
|
||||
--el-card-bg-color: var(--el-bg-color-overlay)
|
||||
}
|
||||
|
||||
body.darktheme .el-empty {
|
||||
--el-empty-fill-color-0: var(--el-color-black);
|
||||
--el-empty-fill-color-1: #4b4b52;
|
||||
--el-empty-fill-color-2: #36383d;
|
||||
--el-empty-fill-color-3: #1e1e20;
|
||||
--el-empty-fill-color-4: #262629;
|
||||
--el-empty-fill-color-5: #202124;
|
||||
--el-empty-fill-color-6: #212224;
|
||||
--el-empty-fill-color-7: #1b1c1f;
|
||||
--el-empty-fill-color-8: #1c1d1f;
|
||||
--el-empty-fill-color-9: #18181a
|
||||
}
|
||||
89
public/assets/addons/shopro/css/index.css
Normal file
@@ -0,0 +1,89 @@
|
||||
body,
|
||||
div,
|
||||
span,
|
||||
header,
|
||||
footer,
|
||||
nav,
|
||||
section,
|
||||
aside,
|
||||
article,
|
||||
ul,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
li,
|
||||
a,
|
||||
p,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
em,
|
||||
i,
|
||||
b,
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
figure,
|
||||
figcaption {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style-type: none;
|
||||
font-style: normal;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
background: none;
|
||||
font-weight: normal;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei,
|
||||
Source Han Sans SC, Noto Sans CJK SC, sans-serif;
|
||||
box-sizing: border-box;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: var(--t-btn-focus);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--t-btn-hover);
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: var(--t-btn-active);
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: normal;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* fast open样式重置 */
|
||||
.is-dialog .content {
|
||||
padding: 0;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.is-dialog .content .panel-block {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* 修复css 弹窗 */
|
||||
.layui-layer-content {
|
||||
height: calc(100% - 45px);
|
||||
}
|
||||
|
||||
.layui-layer-iframe iframe {
|
||||
height: 100% !important;
|
||||
}
|
||||
BIN
public/assets/addons/shopro/img/activity/free_shipping.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
public/assets/addons/shopro/img/activity/full_coupon.png
Normal file
|
After Width: | Height: | Size: 572 B |
BIN
public/assets/addons/shopro/img/activity/full_discount.png
Normal file
|
After Width: | Height: | Size: 657 B |
BIN
public/assets/addons/shopro/img/activity/full_gift.png
Normal file
|
After Width: | Height: | Size: 595 B |
BIN
public/assets/addons/shopro/img/activity/full_reduce.png
Normal file
|
After Width: | Height: | Size: 680 B |
BIN
public/assets/addons/shopro/img/activity/groupon.png
Normal file
|
After Width: | Height: | Size: 686 B |
BIN
public/assets/addons/shopro/img/activity/groupon_ladder.png
Normal file
|
After Width: | Height: | Size: 571 B |
BIN
public/assets/addons/shopro/img/activity/score_shop.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
public/assets/addons/shopro/img/activity/seckill.png
Normal file
|
After Width: | Height: | Size: 680 B |
BIN
public/assets/addons/shopro/img/activity/signin.png
Normal file
|
After Width: | Height: | Size: 494 B |
BIN
public/assets/addons/shopro/img/activity/wechat_mplive.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
public/assets/addons/shopro/img/admin/apply_agent.png
Normal file
|
After Width: | Height: | Size: 377 KiB |
BIN
public/assets/addons/shopro/img/admin/default_avatar.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
public/assets/addons/shopro/img/admin/default_logo.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
public/assets/addons/shopro/img/admin/forward_image.png
Normal file
|
After Width: | Height: | Size: 298 KiB |
BIN
public/assets/addons/shopro/img/admin/goods_bg.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/assets/addons/shopro/img/admin/groupon_bg.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
public/assets/addons/shopro/img/admin/user_bg.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/assets/addons/shopro/img/alipay.png
Normal file
|
After Width: | Height: | Size: 420 B |
BIN
public/assets/addons/shopro/img/bank.png
Normal file
|
After Width: | Height: | Size: 942 B |
BIN
public/assets/addons/shopro/img/category/first_one.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
public/assets/addons/shopro/img/category/first_two.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
public/assets/addons/shopro/img/category/second_one.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
public/assets/addons/shopro/img/category/third_one.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
public/assets/addons/shopro/img/chat/chat-empty.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
public/assets/addons/shopro/img/chat/chat-reconnect-failed.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/assets/addons/shopro/img/chat/chat.mp3
Normal file
BIN
public/assets/addons/shopro/img/chat/emoji/a.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/aini.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/aixin.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/baiyan.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/bizui.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/buhaoyisi.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/bukesiyi.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/dajing.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/danao.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/daxiao.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/dianzan.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/emo.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/esi.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/fadai.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/fankun.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/feiwen.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/fennu.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/ganga.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/ganmao.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/hanyan.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/haochi.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/hongxin.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/huaixiao.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/jingkong.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/jingshu.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/jingya.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/kaixin.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/keai.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/keshui.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/kun.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/lengku.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/liuhan.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/liukoushui.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/liulei.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/mengbi.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/mianwubiaoqing.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/nanguo.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/assets/addons/shopro/img/chat/emoji/outu.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |