初始化项目

This commit is contained in:
2026-09-01 22:15:50 +08:00
commit b5a26a8848
11217 changed files with 1710987 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
</IfModule>
@@ -0,0 +1 @@
202507120109461k8kkinls8iznjvb8dor570tygmod1p3dq1fhwbaebtbgwk4uy
+1
View File
@@ -0,0 +1 @@
c8a5bc49ddac2ff72002ee809bf6ee85
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="1361px" height="609px" viewBox="0 0 1361 609" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
<title>Group 21</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Ant-Design-Pro-3.0" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="账户密码登录-校验" transform="translate(-79.000000, -82.000000)">
<g id="Group-21" transform="translate(77.000000, 73.000000)">
<g id="Group-18" opacity="0.8" transform="translate(74.901416, 569.699158) rotate(-7.000000) translate(-74.901416, -569.699158) translate(4.901416, 525.199158)">
<ellipse id="Oval-11" fill="#CFDAE6" opacity="0.25" cx="63.5748792" cy="32.468367" rx="21.7830479" ry="21.766008"></ellipse>
<ellipse id="Oval-3" fill="#CFDAE6" opacity="0.599999964" cx="5.98746479" cy="13.8668601" rx="5.2173913" ry="5.21330997"></ellipse>
<path d="M38.1354514,88.3520215 C43.8984227,88.3520215 48.570234,83.6838647 48.570234,77.9254015 C48.570234,72.1669383 43.8984227,67.4987816 38.1354514,67.4987816 C32.3724801,67.4987816 27.7006688,72.1669383 27.7006688,77.9254015 C27.7006688,83.6838647 32.3724801,88.3520215 38.1354514,88.3520215 Z" id="Oval-3-Copy" fill="#CFDAE6" opacity="0.45"></path>
<path d="M64.2775582,33.1704963 L119.185836,16.5654915" id="Path-12" stroke="#CFDAE6" stroke-width="1.73913043" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M42.1431708,26.5002681 L7.71190162,14.5640702" id="Path-16" stroke="#E0B4B7" stroke-width="0.702678964" opacity="0.7" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
<path d="M63.9262187,33.521561 L43.6721326,69.3250951" id="Path-15" stroke="#BACAD9" stroke-width="0.702678964" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="1.405357899873153,2.108036953469981"></path>
<g id="Group-17" transform="translate(126.850922, 13.543654) rotate(30.000000) translate(-126.850922, -13.543654) translate(117.285705, 4.381889)" fill="#CFDAE6">
<ellipse id="Oval-4" opacity="0.45" cx="9.13482653" cy="9.12768076" rx="9.13482653" ry="9.12768076"></ellipse>
<path d="M18.2696531,18.2553615 C18.2696531,13.2142826 14.1798519,9.12768076 9.13482653,9.12768076 C4.08980114,9.12768076 0,13.2142826 0,18.2553615 L18.2696531,18.2553615 Z" id="Oval-4" transform="translate(9.134827, 13.691521) scale(-1, -1) translate(-9.134827, -13.691521) "></path>
</g>
</g>
<g id="Group-14" transform="translate(216.294700, 123.725600) rotate(-5.000000) translate(-216.294700, -123.725600) translate(106.294700, 35.225600)">
<ellipse id="Oval-2" fill="#CFDAE6" opacity="0.25" cx="29.1176471" cy="29.1402439" rx="29.1176471" ry="29.1402439"></ellipse>
<ellipse id="Oval-2" fill="#CFDAE6" opacity="0.3" cx="29.1176471" cy="29.1402439" rx="21.5686275" ry="21.5853659"></ellipse>
<ellipse id="Oval-2-Copy" stroke="#CFDAE6" opacity="0.4" cx="179.019608" cy="138.146341" rx="23.7254902" ry="23.7439024"></ellipse>
<ellipse id="Oval-2" fill="#BACAD9" opacity="0.5" cx="29.1176471" cy="29.1402439" rx="10.7843137" ry="10.7926829"></ellipse>
<path d="M29.1176471,39.9329268 L29.1176471,18.347561 C23.1616351,18.347561 18.3333333,23.1796097 18.3333333,29.1402439 C18.3333333,35.1008781 23.1616351,39.9329268 29.1176471,39.9329268 Z" id="Oval-2" fill="#BACAD9"></path>
<g id="Group-9" opacity="0.45" transform="translate(172.000000, 131.000000)" fill="#E6A1A6">
<ellipse id="Oval-2-Copy-2" cx="7.01960784" cy="7.14634146" rx="6.47058824" ry="6.47560976"></ellipse>
<path d="M0.549019608,13.6219512 C4.12262681,13.6219512 7.01960784,10.722722 7.01960784,7.14634146 C7.01960784,3.56996095 4.12262681,0.670731707 0.549019608,0.670731707 L0.549019608,13.6219512 Z" id="Oval-2-Copy-2" transform="translate(3.784314, 7.146341) scale(-1, 1) translate(-3.784314, -7.146341) "></path>
</g>
<ellipse id="Oval-10" fill="#CFDAE6" cx="218.382353" cy="138.685976" rx="1.61764706" ry="1.61890244"></ellipse>
<ellipse id="Oval-10-Copy-2" fill="#E0B4B7" opacity="0.35" cx="179.558824" cy="175.381098" rx="1.61764706" ry="1.61890244"></ellipse>
<ellipse id="Oval-10-Copy" fill="#E0B4B7" opacity="0.35" cx="180.098039" cy="102.530488" rx="2.15686275" ry="2.15853659"></ellipse>
<path d="M28.9985381,29.9671598 L171.151018,132.876024" id="Path-11" stroke="#CFDAE6" opacity="0.8"></path>
</g>
<g id="Group-10" opacity="0.799999952" transform="translate(1054.100635, 36.659317) rotate(-11.000000) translate(-1054.100635, -36.659317) translate(1026.600635, 4.659317)">
<ellipse id="Oval-7" stroke="#CFDAE6" stroke-width="0.941176471" cx="43.8135593" cy="32" rx="11.1864407" ry="11.2941176"></ellipse>
<g id="Group-12" transform="translate(34.596774, 23.111111)" fill="#BACAD9">
<ellipse id="Oval-7" opacity="0.45" cx="9.18534718" cy="8.88888889" rx="8.47457627" ry="8.55614973"></ellipse>
<path d="M9.18534718,17.4450386 C13.8657264,17.4450386 17.6599235,13.6143199 17.6599235,8.88888889 C17.6599235,4.16345787 13.8657264,0.332739156 9.18534718,0.332739156 L9.18534718,17.4450386 Z" id="Oval-7"></path>
</g>
<path d="M34.6597385,24.809694 L5.71666084,4.76878945" id="Path-2" stroke="#CFDAE6" stroke-width="0.941176471"></path>
<ellipse id="Oval" stroke="#CFDAE6" stroke-width="0.941176471" cx="3.26271186" cy="3.29411765" rx="3.26271186" ry="3.29411765"></ellipse>
<ellipse id="Oval-Copy" fill="#F7E1AD" cx="2.79661017" cy="61.1764706" rx="2.79661017" ry="2.82352941"></ellipse>
<path d="M34.6312443,39.2922712 L5.06366663,59.785082" id="Path-10" stroke="#CFDAE6" stroke-width="0.941176471"></path>
</g>
<g id="Group-19" opacity="0.33" transform="translate(1282.537219, 446.502867) rotate(-10.000000) translate(-1282.537219, -446.502867) translate(1142.537219, 327.502867)">
<g id="Group-17" transform="translate(141.333539, 104.502742) rotate(275.000000) translate(-141.333539, -104.502742) translate(129.333539, 92.502742)" fill="#BACAD9">
<circle id="Oval-4" opacity="0.45" cx="11.6666667" cy="11.6666667" r="11.6666667"></circle>
<path d="M23.3333333,23.3333333 C23.3333333,16.8900113 18.1099887,11.6666667 11.6666667,11.6666667 C5.22334459,11.6666667 0,16.8900113 0,23.3333333 L23.3333333,23.3333333 Z" id="Oval-4" transform="translate(11.666667, 17.500000) scale(-1, -1) translate(-11.666667, -17.500000) "></path>
</g>
<circle id="Oval-5-Copy-6" fill="#CFDAE6" cx="201.833333" cy="87.5" r="5.83333333"></circle>
<path d="M143.5,88.8126685 L155.070501,17.6038544" id="Path-17" stroke="#BACAD9" stroke-width="1.16666667"></path>
<path d="M17.5,37.3333333 L127.466252,97.6449735" id="Path-18" stroke="#BACAD9" stroke-width="1.16666667"></path>
<polyline id="Path-19" stroke="#CFDAE6" stroke-width="1.16666667" points="143.902597 120.302281 174.935455 231.571342 38.5 147.510847 126.366941 110.833333"></polyline>
<path d="M159.833333,99.7453842 L195.416667,89.25" id="Path-20" stroke="#E0B4B7" stroke-width="1.16666667" opacity="0.6"></path>
<path d="M205.333333,82.1372105 L238.719406,36.1666667" id="Path-24" stroke="#BACAD9" stroke-width="1.16666667"></path>
<path d="M266.723424,132.231988 L207.083333,90.4166667" id="Path-25" stroke="#CFDAE6" stroke-width="1.16666667"></path>
<circle id="Oval-5" fill="#C1D1E0" cx="156.916667" cy="8.75" r="8.75"></circle>
<circle id="Oval-5-Copy-3" fill="#C1D1E0" cx="39.0833333" cy="148.75" r="5.25"></circle>
<circle id="Oval-5-Copy-2" fill-opacity="0.6" fill="#D1DEED" cx="8.75" cy="33.25" r="8.75"></circle>
<circle id="Oval-5-Copy-4" fill-opacity="0.6" fill="#D1DEED" cx="243.833333" cy="30.3333333" r="5.83333333"></circle>
<circle id="Oval-5-Copy-5" fill="#E0B4B7" cx="175.583333" cy="232.75" r="5.25"></circle>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.7 KiB

+10
View File
@@ -0,0 +1,10 @@
window.serverConfig = {
// 系统名称
APP_NAME: '萤火商城系统2.0',
// 必填: api地址, 换成自己的域名即可
// 例如: https://www.你的域名.com/index.php?s=/admin
BASE_API: '../index.php?s=/admin',
// 必填: store模块的入口地址
// 例如: https://www.你的域名.com/store
STORE_URL: '../store'
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
.ant-tag[data-v-b7200bca]{cursor:pointer}.ant-tag[data-v-b7200bca]:hover{border:1px solid #fb9a9a;color:#fb9a9a}
@@ -0,0 +1 @@
.ant-table-wrapper[data-v-4de45856] .normal .status-icon{color:#4db14d}.ant-table-wrapper[data-v-4de45856] .warning{background-color:#ffd!important}.ant-table-wrapper[data-v-4de45856] .danger{color:#dd514c;background-color:rgba(221,81,76,.115)}.ant-table-wrapper[data-v-4de45856] .danger .status-icon{color:red}
@@ -0,0 +1 @@
.header[data-v-ecb9b698]{height:44px;line-height:44px;margin-bottom:40px;text-align:center}.header .badge[data-v-ecb9b698]{position:absolute;display:inline-block;line-height:1;vertical-align:middle;margin-left:-12px;margin-top:-10px;opacity:.8}.header .logo[data-v-ecb9b698]{height:44px;vertical-align:top;margin-right:10px;margin-left:-12px;border-style:none}.header .title[data-v-ecb9b698]{font-size:30px;color:rgba(0,0,0,.85);font-family:Avenir,Helvetica Neue,Arial,Helvetica,sans-serif;font-weight:600;position:relative;top:2px}.user-layout-login label[data-v-ecb9b698]{font-size:14px}.user-layout-login button.login-button[data-v-ecb9b698]{padding:0 15px;font-size:16px;height:40px;width:100%}
+1
View File
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>超级管理后台</title><style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><link href="css/menu.60d77172.css" rel="prefetch"><link href="css/setting.f40851ed.css" rel="prefetch"><link href="css/user.359d5405.css" rel="prefetch"><link href="js/fail.d2e50570.js" rel="prefetch"><link href="js/menu.717c059b.js" rel="prefetch"><link href="js/setting.abb7a4ea.js" rel="prefetch"><link href="js/store.3262476c.js" rel="prefetch"><link href="js/user.1009d890.js" rel="prefetch"><link href="css/app.38802d90.css" rel="preload" as="style"><link href="css/chunk-vendors.91b23277.css" rel="preload" as="style"><link href="js/app.6ee67261.js" rel="preload" as="script"><link href="js/chunk-vendors.62fbd43f.js" rel="preload" as="script"><link href="css/chunk-vendors.91b23277.css" rel="stylesheet"><link href="css/app.38802d90.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loading-mask"><div class="loading-wrapper"><span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script src="config.js"></script><script src="js/chunk-vendors.62fbd43f.js"></script><script src="js/app.6ee67261.js"></script></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["fail"],{cc89:function(e,t,n){"use strict";n.r(t);var c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("exception-page",{attrs:{type:"404"}})},a=[],o=n("2af9"),p={components:{ExceptionPage:o["c"]}},s=p,i=n("2877"),r=Object(i["a"])(s,c,a,!1,null,"1f038743",null);t["default"]=r.exports}}]);
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["setting"],{"38d5":function(e,t,a){"use strict";a("9482")},7334:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-card",{attrs:{bordered:!1}},[a("content-header",{attrs:{title:"服务器信息"}}),a("a-table",{attrs:{rowKey:"key",size:"middle",columns:e.columns.server,"data-source":e.scienceInfo.server,loading:e.isLoading,rowClassName:e.rowClassName,pagination:!1},scopedSlots:e._u([{key:"remark",fn:function(t,n){return a("span",{},["normal"!==n.status?[e._v(e._s(t))]:e._e()],2)}}])}),a("content-header",{staticStyle:{"margin-top":"50px"},attrs:{title:"PHP环境要求"}}),a("a-table",{attrs:{rowKey:"key",size:"middle",columns:e.columns.phpinfo,"data-source":e.scienceInfo.phpinfo,loading:e.isLoading,rowClassName:e.rowClassName,pagination:!1},scopedSlots:e._u([{key:"status",fn:function(e){return a("span",{},[a("a-icon",{class:["icon","status-icon"],attrs:{type:"normal"===e?"check":"close"}})],1)}},{key:"remark",fn:function(t,n){return a("span",{},["normal"!==n.status?[e._v(e._s(t))]:e._e()],2)}}])}),a("content-header",{staticStyle:{"margin-top":"50px"},attrs:{title:"目录权限监测"}}),a("a-table",{attrs:{rowKey:"key",size:"middle",columns:e.columns.writeable,"data-source":e.scienceInfo.writeable,loading:e.isLoading,rowClassName:e.rowClassName,pagination:!1},scopedSlots:e._u([{key:"status",fn:function(e){return a("span",{},[a("a-icon",{class:["icon","status-icon"],attrs:{type:"normal"===e?"check":"close"}})],1)}}])})],1)},o=[],s=(a("d3b7"),a("f6ae")),r=a("b775");function i(){return Object(r["b"])({url:s["a"].store.setting.science,method:"get"})}var c=a("2af9"),l={name:"TableList",components:{ContentHeader:c["a"]},data:function(){return{isLoading:!1,scienceInfo:{server:[],phpinfo:[],writeable:[]},columns:{server:[{title:"参数",dataIndex:"name",width:"30%"},{title:"值",dataIndex:"value"},{title:"备注",dataIndex:"remark",scopedSlots:{customRender:"remark"}}],phpinfo:[{title:"选项",dataIndex:"name"},{title:"要求",dataIndex:"value"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"备注",dataIndex:"remark",scopedSlots:{customRender:"remark"}}],writeable:[{title:"名称",dataIndex:"name"},{title:"路径",dataIndex:"value"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}}]}}},created:function(){var e=this;this.$nextTick((function(){e.getScienceInfo()}))},methods:{getScienceInfo:function(){var e=this;this.isLoading=!0,i().then((function(t){e.scienceInfo=t.data.scienceInfo})).finally((function(){e.isLoading=!1}))},rowClassName:function(e){return e.status}}},d=l,u=(a("38d5"),a("2877")),m=Object(u["a"])(d,n,o,!1,null,"4de45856",null);t["default"]=m.exports},9482:function(e,t,a){},"9b7d":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-card",{attrs:{bordered:!1}},[a("content-header",{attrs:{title:"清理缓存"}}),a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"缓存项目",labelCol:{span:6},wrapperCol:{span:13}}},[a("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["item",{initialValue:["data","temp"]}],expression:"['item', { initialValue: ['data', 'temp'] }]"}]},[a("a-checkbox",{attrs:{value:"data"}},[e._v("数据缓存")]),a("a-checkbox",{attrs:{value:"temp"}},[e._v("临时图片")])],1)],1),a("a-form-item",{attrs:{label:"强制模式",labelCol:{span:6},wrapperCol:{span:13},extra:"强制清空所有缓存文件,包含用户授权登录状态的数据,正式运营环境中请勿勾选"}},[a("a-switch",{directives:[{name:"decorator",rawName:"v-decorator",value:["isForce",{valuePropName:"checked"}],expression:"['isForce', { valuePropName: 'checked' }]"}]})],1),a("a-form-item",{attrs:{wrapperCol:{span:13,offset:6}}},[a("a-button",{attrs:{type:"primary",loading:e.isLoading,disabled:e.isLoading},on:{click:e.handleSubmit}},[e._v("提交")])],1)],1)],1)},o=[],s=(a("d3b7"),a("f6ae")),r=a("b775");function i(e){return Object(r["b"])({url:s["a"].store.setting.cache.clear,method:"post",data:e})}var c=a("2af9"),l=a("4360"),d={name:"TableList",components:{ContentHeader:c["a"],STable:c["d"]},data:function(){return{isLoading:!1,form:this.$form.createForm(this)}},created:function(){},methods:{handleSubmit:function(){var e=this,t=this.form.validateFields;t((function(t,a){t||(e.isLoading=!0,e.onFormSubmit(a).finally((function(){e.isLoading=!1})))}))},onFormSubmit:function(e){var t=this;return i({form:e}).then((function(a){t.$message.success(a.message),!0===e.isForce&&l["a"].dispatch("Logout").then((function(){setTimeout((function(){window.location.reload()}),1200)}))}))}}},u=d,m=a("2877"),f=Object(m["a"])(u,n,o,!1,null,null,null);t["default"]=f.exports}}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
#preloadingAnimation{position:fixed;left:0;top:0;height:100%;width:100%;background:#ffffff;user-select:none;z-index: 9999;overflow: hidden}.lds-roller{display:inline-block;position:relative;left:50%;top:50%;transform:translate(-50%,-50%);width:64px;height:64px;}.lds-roller div{animation:lds-roller 1.2s cubic-bezier(0.5,0,0.5,1) infinite;transform-origin:32px 32px;}.lds-roller div:after{content:" ";display:block;position:absolute;width:6px;height:6px;border-radius:50%;background:#13c2c2;margin:-3px 0 0 -3px;}.lds-roller div:nth-child(1){animation-delay:-0.036s;}.lds-roller div:nth-child(1):after{top:50px;left:50px;}.lds-roller div:nth-child(2){animation-delay:-0.072s;}.lds-roller div:nth-child(2):after{top:54px;left:45px;}.lds-roller div:nth-child(3){animation-delay:-0.108s;}.lds-roller div:nth-child(3):after{top:57px;left:39px;}.lds-roller div:nth-child(4){animation-delay:-0.144s;}.lds-roller div:nth-child(4):after{top:58px;left:32px;}.lds-roller div:nth-child(5){animation-delay:-0.18s;}.lds-roller div:nth-child(5):after{top:57px;left:25px;}.lds-roller div:nth-child(6){animation-delay:-0.216s;}.lds-roller div:nth-child(6):after{top:54px;left:19px;}.lds-roller div:nth-child(7){animation-delay:-0.252s;}.lds-roller div:nth-child(7):after{top:50px;left:14px;}.lds-roller div:nth-child(8){animation-delay:-0.288s;}.lds-roller div:nth-child(8):after{top:45px;left:10px;}#preloadingAnimation .load-tips{color: #13c2c2;font-size:2rem;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin-top:80px;text-align:center;width:400px;height:64px;} @keyframes lds-roller{0%{transform:rotate(0deg);} 100%{transform:rotate(360deg);}}
@@ -0,0 +1 @@
<div id="preloadingAnimation"><div class=lds-roller><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div><div class=load-tips>Loading</div></div>
@@ -0,0 +1,5 @@
<div class="preloading-animate">
<div class="preloading-wrapper">
<svg class="preloading-balls" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="67.802" cy="59.907" r="6" fill="#51CACC"><animate attributeName="cx" values="75;57.72542485937369" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="50;73.77641290737884" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#51CACC;#9DF871" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle><circle cx="46.079" cy="69.992" r="6" fill="#9DF871"><animate attributeName="cx" values="57.72542485937369;29.774575140626318" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="73.77641290737884;64.69463130731182" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#9DF871;#E0FF77" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle><circle cx="29.775" cy="52.449" r="6" fill="#E0FF77"><animate attributeName="cx" values="29.774575140626318;29.774575140626315" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="64.69463130731182;35.30536869268818" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#E0FF77;#DE9DD6" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle><circle cx="41.421" cy="31.521" r="6" fill="#DE9DD6"><animate attributeName="cx" values="29.774575140626315;57.72542485937368" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="35.30536869268818;26.22358709262116" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#DE9DD6;#FF708E" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle><circle cx="64.923" cy="36.13" r="6" fill="#FF708E"><animate attributeName="cx" values="57.72542485937368;75" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="26.22358709262116;49.99999999999999" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#FF708E;#51CACC" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle></svg>
</div>
</div>
@@ -0,0 +1 @@
.preloading-animate{background:#ffffff;width:100%;height:100%;position:fixed;left:0;top:0;z-index:299;}.preloading-animate .preloading-wrapper{position:absolute;width:5rem;height:5rem;left:50%;top:50%;transform:translate(-50%,-50%);}.preloading-animate .preloading-wrapper .preloading-balls{font-size:5rem;}
@@ -0,0 +1 @@
<svg class="preloading-balls" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="67.802" cy="59.907" r="6" fill="#51CACC"><animate attributeName="cx" values="75;57.72542485937369" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="50;73.77641290737884" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#51CACC;#9DF871" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle><circle cx="46.079" cy="69.992" r="6" fill="#9DF871"><animate attributeName="cx" values="57.72542485937369;29.774575140626318" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="73.77641290737884;64.69463130731182" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#9DF871;#E0FF77" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle><circle cx="29.775" cy="52.449" r="6" fill="#E0FF77"><animate attributeName="cx" values="29.774575140626318;29.774575140626315" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="64.69463130731182;35.30536869268818" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#E0FF77;#DE9DD6" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle><circle cx="41.421" cy="31.521" r="6" fill="#DE9DD6"><animate attributeName="cx" values="29.774575140626315;57.72542485937368" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="35.30536869268818;26.22358709262116" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#DE9DD6;#FF708E" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle><circle cx="64.923" cy="36.13" r="6" fill="#FF708E"><animate attributeName="cx" values="57.72542485937368;75" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="cy" values="26.22358709262116;49.99999999999999" keyTimes="0;1" dur="1s" repeatCount="indefinite"/><animate attributeName="fill" values="#FF708E;#51CACC" keyTimes="0;1" dur="1s" repeatCount="indefinite"/></circle></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

+2
View File
@@ -0,0 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>加油</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=./static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=./static/js/chunk-vendors.2d543954.js></script><script src=./static/js/index.a18d945d.js></script></body></html>
+20
View File
@@ -0,0 +1,20 @@
<?php
// [ 应用入口文件 ]
namespace think;
// 检测PHP环境
if (version_compare(PHP_VERSION, '7.1.0', '<')) die('require PHP > 7.1.0 !');
// 加载核心文件
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
$response = $http->run();
$response->send();
$http->end($response);
+1
View File
@@ -0,0 +1 @@
APP_DEBUG = false [APP] DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = ~db_host~ DATABASE = ~db_name~ USERNAME = ~db_user~ PASSWORD = ~db_pwd~ HOSTPORT = ~db_port~ CHARSET = ~db_charset~ DEBUG = false [CACHE] DRIVER = file [REDIS] HOSTNAME = 127.0.0.1 HOSTPORT = 6379 PASSWORD = SELECT = 0 [LANG] default_lang = zh-cn
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,960 @@
DROP TABLE IF EXISTS `yoshop_admin_user`;
CREATE TABLE `yoshop_admin_user` (
`admin_user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(255) NOT NULL DEFAULT '' COMMENT '登录密码',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) NOT NULL COMMENT '更新时间',
PRIMARY KEY (`admin_user_id`),
KEY `user_name` (`user_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='超管用户记录表';
DROP TABLE IF EXISTS `yoshop_article`;
CREATE TABLE `yoshop_article` (
`article_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章ID',
`title` varchar(300) NOT NULL DEFAULT '' COMMENT '文章标题',
`show_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '列表显示方式(10小图展示 20大图展示)',
`category_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文章分类ID',
`image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '封面图ID',
`content` longtext NOT NULL COMMENT '文章内容',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文章排序(数字越小越靠前)',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '文章状态(0隐藏 1显示)',
`virtual_views` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '虚拟阅读量(仅用作展示)',
`actual_views` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '实际阅读量',
`is_delete` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`article_id`),
KEY `category_id` (`category_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='文章记录表';
DROP TABLE IF EXISTS `yoshop_article_category`;
CREATE TABLE `yoshop_article_category` (
`category_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章分类ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '分类名称',
`status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态(1显示 0隐藏)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`category_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='文章分类表';
DROP TABLE IF EXISTS `yoshop_cart`;
CREATE TABLE `yoshop_cart` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`goods_sku_id` varchar(255) NOT NULL COMMENT '商品sku唯一标识',
`goods_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品数量',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `goods_id` (`goods_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`),
KEY `goods_id_2` (`goods_id`,`goods_sku_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='购物车记录表';
DROP TABLE IF EXISTS `yoshop_category`;
CREATE TABLE `yoshop_category` (
`category_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品分类ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '分类名称',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上级分类ID',
`image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类图片ID',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1显示 0隐藏)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`category_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品分类表';
DROP TABLE IF EXISTS `yoshop_comment`;
CREATE TABLE `yoshop_comment` (
`comment_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '评价ID',
`score` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '评分 (10好评 20中评 30差评)',
`content` text NOT NULL COMMENT '评价内容',
`is_picture` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否为图片评价',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(0隐藏 1显示)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '评价排序',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`order_goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单商品ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`is_delete` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '软删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`comment_id`),
KEY `user_id` (`user_id`),
KEY `order_id` (`order_id`),
KEY `goods_id` (`goods_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品评价记录表';
DROP TABLE IF EXISTS `yoshop_comment_image`;
CREATE TABLE `yoshop_comment_image` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`comment_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '评价ID',
`image_id` int(11) NOT NULL DEFAULT '0' COMMENT '图片id(关联文件记录表)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `comment_id` (`comment_id`) USING BTREE,
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品评价图片记录表';
DROP TABLE IF EXISTS `yoshop_coupon`;
CREATE TABLE `yoshop_coupon` (
`coupon_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券名称',
`coupon_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '优惠券类型(10满减券 20折扣券)',
`reduce_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '满减券-减免金额',
`discount` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '折扣券-折扣率(0-100)',
`min_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费金额',
`expire_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '到期类型(10领取后生效 20固定时间)',
`expire_day` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '领取后生效-有效天数',
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '固定时间-开始时间',
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '固定时间-结束时间',
`apply_range` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '适用范围(10全部商品 20指定商品 30排除商品)',
`apply_range_config` text COMMENT '适用范围配置(json格式)',
`total_num` int(11) NOT NULL DEFAULT '0' COMMENT '发放总数量(-1为不限制)',
`receive_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '已领取数量',
`describe` varchar(500) NOT NULL DEFAULT '' COMMENT '优惠券描述',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1显示 0隐藏)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '软删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`coupon_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='优惠券记录表';
DROP TABLE IF EXISTS `yoshop_delivery`;
CREATE TABLE `yoshop_delivery` (
`delivery_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '模板ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '模板名称',
`method` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '计费方式(10按件数 20按重量)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序d',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`delivery_id`,`is_delete`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='配送模板主表';
DROP TABLE IF EXISTS `yoshop_delivery_rule`;
CREATE TABLE `yoshop_delivery_rule` (
`rule_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '规则ID',
`delivery_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '配送模板ID',
`region` text NOT NULL COMMENT '可配送区域(城市id集)',
`region_text` text NOT NULL COMMENT '可配送区域(文字展示)',
`first` double unsigned NOT NULL DEFAULT '0' COMMENT '首件(个)/首重(Kg)',
`first_fee` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费(元)',
`additional` double unsigned NOT NULL DEFAULT '0' COMMENT '续件/续重',
`additional_fee` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '续费(元)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
PRIMARY KEY (`rule_id`),
KEY `delivery_id` (`delivery_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='配送模板区域及运费表';
DROP TABLE IF EXISTS `yoshop_express`;
CREATE TABLE `yoshop_express` (
`express_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '物流公司ID',
`express_name` varchar(255) NOT NULL DEFAULT '' COMMENT '物流公司名称',
`kuaidi100_code` varchar(30) NOT NULL DEFAULT '' COMMENT '物流公司编码 (快递100)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`express_id`),
KEY `store_id` (`store_id`),
KEY `kuaidi100_code` (`kuaidi100_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='物流公司记录表';
DROP TABLE IF EXISTS `yoshop_goods`;
CREATE TABLE `yoshop_goods` (
`goods_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品ID',
`goods_name` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
`goods_no` varchar(50) NOT NULL DEFAULT '' COMMENT '商品编码',
`selling_point` varchar(500) NOT NULL DEFAULT '' COMMENT '商品卖点',
`spec_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '商品规格(10单规格 20多规格)',
`goods_price_min` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格(最低)',
`goods_price_max` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格(最高)',
`line_price_min` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '划线价格(最低)',
`line_price_max` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '划线价格(最高)',
`stock_total` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存总量(包含所有sku)',
`deduct_stock_type` tinyint(3) unsigned NOT NULL DEFAULT '20' COMMENT '库存计算方式(10下单减库存 20付款减库存)',
`content` longtext NOT NULL COMMENT '商品详情',
`sales_initial` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '初始销量',
`sales_actual` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '实际销量',
`delivery_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '配送模板ID',
`is_points_gift` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启积分赠送(1开启 0关闭)',
`is_points_discount` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否允许使用积分抵扣(1允许 0不允许)',
`is_alone_points_discount` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '积分抵扣设置(0默认抵扣 1单独设置抵扣)',
`points_discount_config` varchar(500) NOT NULL DEFAULT '' COMMENT '单独设置积分抵扣的配置',
`is_enable_grade` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启会员折扣(1开启 0关闭)',
`is_alone_grade` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '会员折扣设置(0默认等级折扣 1单独设置折扣)',
`alone_grade_equity` text COMMENT '单独设置折扣的配置',
`status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '商品状态(10上架 20下架)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`goods_id`),
KEY `goods_no` (`goods_no`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品记录表';
DROP TABLE IF EXISTS `yoshop_goods_category_rel`;
CREATE TABLE `yoshop_goods_category_rel` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL COMMENT '商品ID',
`category_id` int(11) unsigned NOT NULL COMMENT '商品分类ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_id` (`store_id`),
KEY `goods_id` (`goods_id`),
KEY `category_id` (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品与分类关系记录表';
DROP TABLE IF EXISTS `yoshop_goods_image`;
CREATE TABLE `yoshop_goods_image` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`image_id` int(11) NOT NULL COMMENT '图片id(关联文件记录表)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `goods_id` (`goods_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品图片记录表';
DROP TABLE IF EXISTS `yoshop_goods_service`;
CREATE TABLE `yoshop_goods_service` (
`service_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品服务ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '服务名称',
`summary` varchar(500) NOT NULL DEFAULT '' COMMENT '概述',
`is_default` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否默认(新增商品时)',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1显示 0隐藏)',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序方式(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除(1已删除)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`service_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品服务与承诺记录表';
DROP TABLE IF EXISTS `yoshop_goods_service_rel`;
CREATE TABLE `yoshop_goods_service_rel` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL COMMENT '商品ID',
`service_id` int(11) unsigned NOT NULL COMMENT '服务承诺ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_id` (`store_id`),
KEY `goods_id` (`goods_id`),
KEY `service_id` (`service_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品与服务承诺关系记录表';
DROP TABLE IF EXISTS `yoshop_goods_sku`;
CREATE TABLE `yoshop_goods_sku` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`goods_sku_id` varchar(255) NOT NULL DEFAULT '0' COMMENT '商品sku唯一标识 (由规格id组成)',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '规格图片ID',
`goods_sku_no` varchar(100) NOT NULL DEFAULT '' COMMENT '商品sku编码',
`goods_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格',
`line_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品划线价',
`stock_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '当前库存数量',
`goods_weight` double unsigned NOT NULL DEFAULT '0' COMMENT '商品重量(Kg)',
`goods_props` varchar(255) NOT NULL DEFAULT '' COMMENT 'SKU的规格属性(json格式)',
`spec_value_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '规格值ID集(json格式)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `sku_idx` (`goods_id`,`goods_sku_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品规格表';
DROP TABLE IF EXISTS `yoshop_goods_spec_rel`;
CREATE TABLE `yoshop_goods_spec_rel` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`spec_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '规格组ID',
`spec_value_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '规格值ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品与规格值关系记录表';
DROP TABLE IF EXISTS `yoshop_help`;
CREATE TABLE `yoshop_help` (
`help_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '帮助标题',
`content` text NOT NULL COMMENT '帮助内容',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除(1已删除)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`help_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='帮助中心记录表';
DROP TABLE IF EXISTS `yoshop_order`;
CREATE TABLE `yoshop_order` (
`order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID',
`order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单号',
`total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品总金额(不含优惠折扣)',
`order_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单金额(含优惠折扣)',
`coupon_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券ID',
`coupon_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券抵扣金额',
`points_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '积分抵扣金额',
`points_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '积分抵扣数量',
`pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际付款金额(包含运费)',
`update_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '后台修改的订单金额(差价)',
`buyer_remark` varchar(255) NOT NULL DEFAULT '' COMMENT '买家留言',
`pay_type` tinyint(3) unsigned NOT NULL DEFAULT '20' COMMENT '支付方式(10余额支付 20微信支付)',
`pay_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '付款状态(10未付款 20已付款)',
`pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '付款时间',
`delivery_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '配送方式(10快递配送)',
`express_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费金额',
`express_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '物流公司ID',
`express_company` varchar(50) NOT NULL DEFAULT '' COMMENT '物流公司',
`express_no` varchar(50) NOT NULL DEFAULT '' COMMENT '物流单号',
`delivery_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '发货状态(10未发货 20已发货)',
`delivery_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发货时间',
`receipt_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '收货状态(10未收货 20已收货)',
`receipt_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '收货时间',
`order_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '订单状态(10进行中 20取消 21待取消 30已完成)',
`points_bonus` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '赠送的积分数量',
`is_settled` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '订单是否已结算(0未结算 1已结算)',
`transaction_id` varchar(30) NOT NULL DEFAULT '' COMMENT '微信支付交易号',
`is_comment` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否已评价(0否 1是)',
`order_source` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '订单来源(10普通订单)',
`order_source_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源记录ID',
`platform` varchar(20) NOT NULL DEFAULT '' COMMENT '来源客户端 (APP、H5、小程序等)',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_id`),
UNIQUE KEY `order_no` (`order_no`) USING BTREE,
KEY `store_id` (`store_id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单记录表';
DROP TABLE IF EXISTS `yoshop_order_address`;
CREATE TABLE `yoshop_order_address` (
`order_address_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '地址ID',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '收货人姓名',
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份ID',
`city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市ID',
`region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '区/县ID',
`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`order_address_id`) USING BTREE,
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单收货地址记录表';
DROP TABLE IF EXISTS `yoshop_order_goods`;
CREATE TABLE `yoshop_order_goods` (
`order_goods_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`goods_name` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
`image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品封面图ID',
`deduct_stock_type` tinyint(3) unsigned NOT NULL DEFAULT '20' COMMENT '库存计算方式(10下单减库存 20付款减库存)',
`spec_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '规格类型(10单规格 20多规格)',
`goods_sku_id` varchar(255) NOT NULL DEFAULT '' COMMENT '商品sku唯一标识',
`goods_props` varchar(255) NOT NULL DEFAULT '' COMMENT 'SKU的规格属性(json格式)',
`content` longtext NOT NULL COMMENT '商品详情',
`goods_no` varchar(100) NOT NULL DEFAULT '' COMMENT '商品编码',
`goods_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格(单价)',
`line_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品划线价',
`goods_weight` double unsigned NOT NULL DEFAULT '0' COMMENT '商品重量(Kg)',
`is_user_grade` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否存在会员等级折扣',
`grade_ratio` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '会员折扣比例(0-10)',
`grade_goods_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '会员折扣的商品单价',
`grade_total_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '会员折扣的总额差',
`coupon_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券折扣金额',
`points_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '积分金额',
`points_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '积分抵扣数量',
`points_bonus` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '赠送的积分数量',
`total_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '购买数量',
`total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品总价(数量×单价)',
`total_pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际付款价(折扣和优惠后)',
`is_comment` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否已评价(0否 1是)',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`goods_source_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源记录ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`order_goods_id`) USING BTREE,
KEY `goods_id` (`goods_id`),
KEY `order_id` (`order_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单商品记录表';
DROP TABLE IF EXISTS `yoshop_order_refund`;
CREATE TABLE `yoshop_order_refund` (
`order_refund_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '售后单ID',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`order_goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单商品ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '售后类型(10退货退款 20换货)',
`apply_desc` varchar(1000) NOT NULL DEFAULT '' COMMENT '用户申请原因(说明)',
`audit_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '商家审核状态(0待审核 10已同意 20已拒绝)',
`refuse_desc` varchar(1000) NOT NULL DEFAULT '' COMMENT '商家拒绝原因(说明)',
`refund_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际退款金额',
`is_user_send` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '用户是否发货(0未发货 1已发货)',
`send_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户发货时间',
`express_id` varchar(32) NOT NULL DEFAULT '' COMMENT '用户发货物流公司ID',
`express_no` varchar(32) NOT NULL DEFAULT '' COMMENT '用户发货物流单号',
`is_receipt` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '商家收货状态(0未收货 1已收货)',
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '售后单状态(0进行中 10已拒绝 20已完成 30已取消)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_refund_id`),
KEY `order_id` (`order_id`),
KEY `order_goods_id` (`order_goods_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='售后单记录表';
DROP TABLE IF EXISTS `yoshop_order_refund_address`;
CREATE TABLE `yoshop_order_refund_address` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_refund_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '售后单ID',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '收货人姓名',
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在省份ID',
`city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在城市ID',
`region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在区/县ID',
`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='售后单退货地址记录表';
DROP TABLE IF EXISTS `yoshop_order_refund_image`;
CREATE TABLE `yoshop_order_refund_image` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_refund_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '售后单ID',
`image_id` int(11) NOT NULL DEFAULT '0' COMMENT '图片id(关联文件记录表)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `order_refund_id` (`order_refund_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='售后单图片记录表';
DROP TABLE IF EXISTS `yoshop_page`;
CREATE TABLE `yoshop_page` (
`page_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '页面ID',
`page_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '页面类型(10首页 20自定义页)',
`page_name` varchar(255) NOT NULL DEFAULT '' COMMENT '页面名称',
`page_data` longtext NOT NULL COMMENT '页面数据',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '软删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`page_id`),
KEY `store_id` (`store_id`),
KEY `page_type` (`page_type`,`store_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='店铺页面记录表';
DROP TABLE IF EXISTS `yoshop_recharge_order`;
CREATE TABLE `yoshop_recharge_order` (
`order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID',
`order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单号',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`recharge_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '充值方式(10自定义金额 20套餐充值)',
`plan_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '充值套餐ID',
`pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '用户支付金额',
`gift_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '赠送金额',
`actual_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际到账金额',
`pay_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '支付状态(10待支付 20已支付)',
`pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '付款时间',
`transaction_id` varchar(30) NOT NULL DEFAULT '' COMMENT '微信支付交易号',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_id`),
KEY `order_no` (`order_no`),
KEY `user_id` (`user_id`),
KEY `plan_id` (`plan_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='会员充值订单表';
DROP TABLE IF EXISTS `yoshop_recharge_order_plan`;
CREATE TABLE `yoshop_recharge_order_plan` (
`order_plan_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`plan_id` int(11) unsigned NOT NULL COMMENT '主键ID',
`plan_name` varchar(255) NOT NULL DEFAULT '' COMMENT '方案名称',
`money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '充值金额',
`gift_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '赠送金额',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_plan_id`),
KEY `order_id` (`order_id`),
KEY `plan_id` (`plan_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='会员充值订单套餐快照表';
DROP TABLE IF EXISTS `yoshop_recharge_plan`;
CREATE TABLE `yoshop_recharge_plan` (
`plan_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`plan_name` varchar(255) NOT NULL DEFAULT '' COMMENT '套餐名称',
`money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '充值金额',
`gift_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '赠送金额',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`plan_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='会员充值套餐表';
DROP TABLE IF EXISTS `yoshop_region`;
CREATE TABLE `yoshop_region` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '区划信息ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '区划名称',
`pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`code` varchar(255) NOT NULL DEFAULT '' COMMENT '区划编码',
`level` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '层级(1省级 2市级 3区/县级)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='省市区数据表';
DROP TABLE IF EXISTS `yoshop_spec`;
CREATE TABLE `yoshop_spec` (
`spec_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '规格组ID',
`spec_name` varchar(255) NOT NULL DEFAULT '' COMMENT '规格组名称',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`spec_id`),
KEY `spec_name` (`spec_name`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品规格组记录表';
DROP TABLE IF EXISTS `yoshop_spec_value`;
CREATE TABLE `yoshop_spec_value` (
`spec_value_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '规格值ID',
`spec_value` varchar(255) NOT NULL COMMENT '规格值',
`spec_id` int(11) NOT NULL COMMENT '规格组ID',
`store_id` int(11) NOT NULL COMMENT '商城ID',
`create_time` int(11) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`spec_value_id`),
KEY `spec_value` (`spec_value`),
KEY `spec_id` (`spec_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品规格值记录表';
DROP TABLE IF EXISTS `yoshop_store`;
CREATE TABLE `yoshop_store` (
`store_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商城ID',
`store_name` varchar(50) NOT NULL DEFAULT '' COMMENT '商城名称',
`describe` varchar(500) NOT NULL DEFAULT '' COMMENT '商城简介',
`logo_image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城logo文件ID',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_recycle` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否回收',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家(商户)记录表';
DROP TABLE IF EXISTS `yoshop_store_address`;
CREATE TABLE `yoshop_store_address` (
`address_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '地址ID',
`type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '地址类型(10发货地址 20退货地址)',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '联系人姓名',
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份ID',
`city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市ID',
`region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '区/县ID',
`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`address_id`),
KEY `type` (`type`),
KEY `store_id` (`store_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家地址记录表';
DROP TABLE IF EXISTS `yoshop_store_api`;
CREATE TABLE `yoshop_store_api` (
`api_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '权限名称',
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '权限url',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`api_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家后台api权限表';
DROP TABLE IF EXISTS `yoshop_store_menu`;
CREATE TABLE `yoshop_store_menu` (
`menu_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
`module` tinyint(3) NOT NULL DEFAULT '10' COMMENT '模块类型(10菜单 20操作)',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '菜单名称',
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '菜单路径(唯一)',
`action_mark` varchar(255) NOT NULL DEFAULT '' COMMENT '操作标识',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上级菜单ID',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家后台菜单记录表';
DROP TABLE IF EXISTS `yoshop_store_menu_api`;
CREATE TABLE `yoshop_store_menu_api` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`menu_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '菜单ID',
`api_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户角色ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `menu_id` (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家后台用户角色与菜单权限关系表';
DROP TABLE IF EXISTS `yoshop_store_role`;
CREATE TABLE `yoshop_store_role` (
`role_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '角色ID',
`role_name` varchar(50) NOT NULL DEFAULT '' COMMENT '角色名称',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级角色ID',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家用户角色表';
DROP TABLE IF EXISTS `yoshop_store_role_menu`;
CREATE TABLE `yoshop_store_role_menu` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`role_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户角色ID',
`menu_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '菜单ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `role_id` (`role_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家后台用户角色与菜单权限关系表';
DROP TABLE IF EXISTS `yoshop_store_setting`;
CREATE TABLE `yoshop_store_setting` (
`key` varchar(30) NOT NULL COMMENT '设置项标示',
`describe` varchar(255) NOT NULL DEFAULT '' COMMENT '设置项描述',
`values` mediumtext NOT NULL COMMENT '设置内容(json格式)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
UNIQUE KEY `unique_key` (`key`,`store_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商家设置记录表';
DROP TABLE IF EXISTS `yoshop_store_user`;
CREATE TABLE `yoshop_store_user` (
`store_user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(255) NOT NULL DEFAULT '' COMMENT '登录密码',
`real_name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名',
`is_super` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否为超级管理员',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`store_user_id`),
KEY `user_name` (`user_name`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家用户记录表';
DROP TABLE IF EXISTS `yoshop_store_user_role`;
CREATE TABLE `yoshop_store_user_role` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`store_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '超管用户ID',
`role_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '角色ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_user_id` (`store_user_id`) USING BTREE,
KEY `role_id` (`role_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家用户角色记录表';
DROP TABLE IF EXISTS `yoshop_upload_file`;
CREATE TABLE `yoshop_upload_file` (
`file_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '文件ID',
`group_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文件分组ID',
`channel` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '上传来源(10商户后台 20用户端)',
`storage` varchar(10) NOT NULL DEFAULT '' COMMENT '存储方式',
`domain` varchar(255) NOT NULL DEFAULT '' COMMENT '存储域名',
`file_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '文件类型(10图片 20附件 30视频)',
`file_name` varchar(255) NOT NULL DEFAULT '' COMMENT '文件名称(仅显示)',
`file_path` varchar(255) NOT NULL DEFAULT '' COMMENT '文件路径',
`file_size` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小(字节)',
`file_ext` varchar(20) NOT NULL DEFAULT '' COMMENT '文件扩展名',
`cover` varchar(255) NOT NULL DEFAULT '' COMMENT '文件封面',
`uploader_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上传者用户ID',
`is_recycle` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否在回收站',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`file_id`),
KEY `group_id` (`group_id`),
KEY `is_recycle` (`is_recycle`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='文件库记录表';
DROP TABLE IF EXISTS `yoshop_upload_group`;
CREATE TABLE `yoshop_upload_group` (
`group_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '分组ID',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '分组名称',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上级分组ID',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`group_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='文件库分组记录表';
DROP TABLE IF EXISTS `yoshop_user`;
CREATE TABLE `yoshop_user` (
`user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '用户手机号',
`nick_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户昵称',
`avatar_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '头像文件ID',
`gender` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
`country` varchar(50) NOT NULL DEFAULT '' COMMENT '国家',
`province` varchar(50) NOT NULL DEFAULT '' COMMENT '省份',
`city` varchar(50) NOT NULL DEFAULT '' COMMENT '城市',
`address_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '默认收货地址',
`balance` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '用户可用余额',
`points` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户可用积分',
`pay_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '用户总支付的金额',
`expend_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际消费的金额(不含退款)',
`grade_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员等级ID',
`platform` varchar(20) NOT NULL DEFAULT '' COMMENT '注册来源的平台 (APP、H5、小程序等)',
`last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`user_id`),
KEY `mobile` (`mobile`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户记录表';
DROP TABLE IF EXISTS `yoshop_user_address`;
CREATE TABLE `yoshop_user_address` (
`address_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '收货人姓名',
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份ID',
`city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市ID',
`region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '区/县ID',
`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`address_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户收货地址表';
DROP TABLE IF EXISTS `yoshop_user_balance_log`;
CREATE TABLE `yoshop_user_balance_log` (
`log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`scene` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '余额变动场景(10用户充值 20用户消费 30管理员操作 40订单退款)',
`money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动金额',
`describe` varchar(500) NOT NULL DEFAULT '' COMMENT '描述/说明',
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '管理员备注',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`log_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户余额变动明细表';
DROP TABLE IF EXISTS `yoshop_user_coupon`;
CREATE TABLE `yoshop_user_coupon` (
`user_coupon_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`coupon_id` int(11) unsigned NOT NULL COMMENT '优惠券ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券名称',
`coupon_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '优惠券类型(10满减券 20折扣券)',
`reduce_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '满减券-减免金额',
`discount` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '折扣券-折扣率(0-100)',
`min_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费金额',
`expire_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '到期类型(10领取后生效 20固定时间)',
`expire_day` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '领取后生效-有效天数',
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效期开始时间',
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效期结束时间',
`apply_range` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '适用范围(10全部商品 20指定商品)',
`apply_range_config` text COMMENT '适用范围配置(json格式)',
`is_expire` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否过期(0未过期 1已过期)',
`is_use` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否已使用(0未使用 1已使用)',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`user_coupon_id`),
KEY `coupon_id` (`coupon_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户优惠券记录表';
DROP TABLE IF EXISTS `yoshop_user_grade`;
CREATE TABLE `yoshop_user_grade` (
`grade_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '等级ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '等级名称',
`weight` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '等级权重(1-9999)',
`upgrade` text NOT NULL COMMENT '升级条件',
`equity` text NOT NULL COMMENT '等级权益(折扣率0-100)',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1启用 0禁用)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`grade_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户会员等级表';
DROP TABLE IF EXISTS `yoshop_user_grade_log`;
CREATE TABLE `yoshop_user_grade_log` (
`log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`old_grade_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '变更前的等级ID',
`new_grade_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '变更后的等级ID',
`change_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '变更类型(10后台管理员设置 20自动升级)',
`remark` varchar(500) DEFAULT '' COMMENT '管理员备注',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`log_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户会员等级变更记录表';
DROP TABLE IF EXISTS `yoshop_user_oauth`;
CREATE TABLE `yoshop_user_oauth` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`oauth_type` varchar(255) NOT NULL DEFAULT '' COMMENT '第三方登陆类型(MP-WEIXIN)',
`oauth_id` varchar(100) NOT NULL DEFAULT '' COMMENT '第三方用户唯一标识 (uid openid)',
`unionid` varchar(100) NOT NULL DEFAULT '' COMMENT '微信unionID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `oauth_type` (`oauth_type`),
KEY `store_id` (`store_id`),
KEY `oauth_type_2` (`oauth_type`,`oauth_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10108 DEFAULT CHARSET=utf8 COMMENT='第三方用户信息表';
DROP TABLE IF EXISTS `yoshop_user_points_log`;
CREATE TABLE `yoshop_user_points_log` (
`log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`value` int(11) NOT NULL DEFAULT '0' COMMENT '变动数量',
`describe` varchar(500) NOT NULL DEFAULT '' COMMENT '描述/说明',
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '管理员备注',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`log_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户积分变动明细表';
DROP TABLE IF EXISTS `yoshop_wxapp`;
CREATE TABLE `yoshop_wxapp` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '微信小程序ID',
`app_id` varchar(50) NOT NULL DEFAULT '' COMMENT '小程序AppID',
`app_secret` varchar(50) NOT NULL DEFAULT '' COMMENT '小程序AppSecret',
`mchid` varchar(50) NOT NULL DEFAULT '' COMMENT '微信商户号ID',
`apikey` varchar(255) NOT NULL DEFAULT '' COMMENT '微信支付密钥',
`cert_pem` longtext COMMENT '证书文件cert',
`key_pem` longtext COMMENT '证书文件key',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `store_id` (`store_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='微信小程序记录表(已废弃)';
DROP TABLE IF EXISTS `yoshop_order_export`;
CREATE TABLE `yoshop_order_export` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间(开始)',
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间(结束)',
`file_path` varchar(255) NOT NULL DEFAULT '' COMMENT 'excel文件路径',
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '导出状态(10进行中 20已完成 30失败)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单导出Excel记录表';
DROP TABLE IF EXISTS `yoshop_wxapp_setting`;
CREATE TABLE `yoshop_wxapp_setting` (
`key` varchar(30) NOT NULL DEFAULT '' COMMENT '设置项标示',
`describe` varchar(255) NOT NULL DEFAULT '' COMMENT '设置项描述',
`values` mediumtext NOT NULL COMMENT '设置内容(json格式)',
`store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
UNIQUE KEY `unique_key` (`key`,`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信小程序设置表';
DROP TABLE IF EXISTS `yoshop_h5_setting`;
CREATE TABLE `yoshop_h5_setting` (
`key` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '设置项标示',
`describe` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '设置项描述',
`values` mediumtext CHARACTER SET utf8 NOT NULL COMMENT '设置内容(json格式)',
`store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
UNIQUE KEY `unique_key` (`key`,`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='H5端设置表';
ALTER TABLE `yoshop_goods`
ADD COLUMN `video_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '主图视频ID' AFTER `goods_no`,
ADD COLUMN `video_cover_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '主图视频ID' AFTER `video_id`;
+369
View File
@@ -0,0 +1,369 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
header('Content-Type:text/html; charset=utf-8');
// 检测php版本号
if (phpversion() < '7.1') {
exit('很抱歉,由于您的PHP版本过低,不能安装本软件,为了系统功能全面可用,请升级到PHP7.1或更高版本再安装,谢谢!');
}
// 不限制响应时间
// error_reporting(0);
set_time_limit(0);
// 设置系统路径
define('IN_INSTALL', true);
define('INSTALL_PATH', str_replace('\\', '/', dirname(__FILE__)));
define('ROOT_PATH', dirname(INSTALL_PATH, 2));
// 版权信息设置
$cfg_copyright = '© 2018-2023';
// 获取当前步骤
$s = getStep();
// 提示已经安装
if (is_file(INSTALL_PATH . '/install.lock') && $s != md5('done')) {
require_once(INSTALL_PATH . '/templates/step_5.php');
exit();
}
// 执行相应操作
$GLOBALS['isNext'] = true;
// 获取当前步骤
function getStep()
{
$s1 = $_GET['s'] ?? 0;
// 初始化参数
$s2 = $_POST['s'] ?? 0;
// 如果有GET值则覆盖POST值
if ($s1 > 0 && in_array($s1, [1, 63832, md5('done')])) {
$s2 = $s1;
}
return $s2;
}
// 协议说明
if ($s == 0) {
require_once(INSTALL_PATH . '/templates/step_0.php');
exit();
}
// 环境检测
if ($s == 1) {
// 获取检测的路径数据
$iswrite_array = getIsWriteArray();
// 获取检测的函数数据
$exists_array = getExistsFuncArray();
// 获取扩展要求数据
$extendArray = getExtendArray();
// 引入环境检测html
require_once(INSTALL_PATH . '/templates/step_1.php');
exit();
}
// 配置文件
if ($s == 2) {
require_once(INSTALL_PATH . '/templates/step_2.php');
exit();
}
// 正在安装
if ($s == 3) {
require_once(INSTALL_PATH . '/templates/step_3.php');
if ($_POST['s'] == 3) {
// 初始化信息
$dbhost = $_POST['dbhost'] ?? '';
$dbname = $_POST['dbname'] ?? '';
$dbuser = $_POST['dbuser'] ?? '';
$dbpwd = $_POST['dbpwd'] ?? '';
$dbport = $_POST['dbport'] ?? 3306;
$testdata = $_POST['testdata'] ?? '';
// 连接证数据库
try {
$dsn = "mysql:host={$dbhost};port={$dbport};charset=utf8";
$pdo = new PDO($dsn, $dbuser, $dbpwd);
$pdo->query("SET NAMES utf8"); // 设置数据库编码
} catch (Exception $e) {
insError('数据库连接错误,请检查!');
}
// 查询数据库
$res = $pdo->query('show Databases');
// 遍历所有数据库,存入数组
$dbnameArr = [];
foreach ($res->fetchAll(PDO::FETCH_ASSOC) as $row) {
$dbnameArr[] = $row['Database'];
}
// 检查数据库是否存在,没有则创建数据库
if (!in_array(trim($dbname), $dbnameArr)) {
if (!$pdo->exec("CREATE DATABASE `$dbname`")) {
insError("创建数据库失败,请检查权限或联系管理员!");
}
}
// 数据库创建完成,开始连接
$pdo->query("USE `$dbname`");
// 取出.env模板内容
$config_str = readDataFile('.env.tpl');
// 进行替换
$config_str = str_replace('~db_host~', $dbhost, $config_str);
$config_str = str_replace('~db_name~', $dbname, $config_str);
$config_str = str_replace('~db_user~', $dbuser, $config_str);
$config_str = str_replace('~db_pwd~', $dbpwd, $config_str);
$config_str = str_replace('~db_port~', $dbport, $config_str);
$config_str = str_replace('~db_charset~', 'utf8', $config_str);
// 将替换后的内容写入.env文件
$fp = fopen(ROOT_PATH . '/.env', 'w');
fwrite($fp, $config_str);
fclose($fp);
// 防止浏览器缓存
$buffer = ini_get('output_buffering');
echo str_repeat(' ', $buffer + 1);
insInfo("数据库连接文件创建完成!");
ob_flush();
flush();
// 创建表结构
$tbstruct = readDataFile('install_struct.sql');
$pdo->exec(trim($tbstruct));
insInfo("数据库结构导入完成!");
ob_flush();
flush();
// 导入其他安装数据
$data_str = readDataFile('install_data.sql');
$pdo->exec(trim($data_str));
insInfo("商城默认数据导入完成!");
ob_flush();
flush();
// 查看是否需要安装测试数据
if ($testdata == 'true') {
insInfo("正在加载测试数据!");
ob_flush();
flush();
$sqlstr_file = readDataFile('install_testdata.sql');
$pdo->exec(trim($sqlstr_file));
insInfo("测试数据导入完成!");
ob_flush();
flush();
}
// 结束缓存区
ob_end_flush();
// 安装完成进行跳转
echo '<script>setTimeout(function () { location.href="?s=' . md5('done') . '"; }, 2000)</script>';
exit();
}
exit();
}
// 检测数据库信息
if ($s == 63832) {
$dbhost = $_GET['dbhost'] ?? '';
$dbuser = $_GET['dbuser'] ?? '';
$dbpwd = $_GET['dbpwd'] ?? '';
$dbport = $_GET['dbport'] ?? '';
try {
$dsn = "mysql:host=$dbhost;port={$dbport};charset=utf8";
$pdo = new PDO($dsn, $dbuser, $dbpwd);
echo 'true';
} catch (Exception $e) {
echo 'false';
}
exit();
}
// 安装完成
if ($s == md5('done')) {
require_once(INSTALL_PATH . '/templates/step_4.php');
$fp = fopen(INSTALL_PATH . '/install.lock', 'w');
fwrite($fp, '程序已正确安装,重新安装请删除本文件');
fclose($fp);
exit();
}
// 获取扩展要求数据
function getExtendArray()
{
$data = [
[
'name' => 'PDO Mysql',
'status' => extension_loaded('PDO') && extension_loaded('pdo_mysql'),
],
[
'name' => 'Mysqlnd',
'status' => extension_loaded('mysqlnd'),
],
[
'name' => 'JSON',
'status' => extension_loaded('json')
],
[
'name' => 'Fileinfo',
'status' => extension_loaded('fileinfo')
],
[
'name' => 'CURL',
'status' => extension_loaded('curl'),
],
[
'name' => 'OpenSSL',
'status' => extension_loaded('openssl'),
],
[
'name' => 'GD',
'status' => extension_loaded('gd'),
],
[
'name' => 'BCMath',
'status' => extension_loaded('bcmath'),
],
[
'name' => 'Mbstring',
'status' => extension_loaded('mbstring'),
],
[
'name' => 'SimpleXML',
'status' => extension_loaded('SimpleXML'),
],
];
foreach ($data as $item) {
!$item['status'] && setIsNext(false);
}
return $data;
}
// 检测php版本号
function getPHPVersion()
{
$version = phpversion();
$versionInt = versionToInteger(phpversion());
if ($versionInt < 70400 || $versionInt >= 70500) {
echo "<span class=\"col-red\"><strong>{$version}</strong> (请使用php7.4)</span>";
setIsNext(false);
} else {
echo "<span>{$version}</span>";
}
}
/**
* 将版本转为数字
* @param string $version
* @return int
*/
function versionToInteger(string $version): int
{
list($major, $minor, $sub) = explode('.', $version);
return intval($major * 10000 + $minor * 100 + $sub);
}
// 获取检测的路径数据
function getIsWriteArray()
{
return [
'/.env',
// '/data/',
'/public/install/',
'/public/uploads/',
'/public/temp/',
];
}
// 获取检测的函数数据
function getExistsFuncArray()
{
return ['curl_init', 'bcadd', 'mb_substr', 'simplexml_load_string'];
}
// 测试可写性
function isWrite($file)
{
if (is_writable(ROOT_PATH . $file)) {
echo '<span>可写</span>';
} else {
echo '<span class="col-red">不可写</span>';
setIsNext(false);
}
}
// 测试函数是否存在
function isFunExists($func)
{
$state = function_exists($func);
if ($state === false) {
setIsNext(false);
}
return $state;
}
// 测试函数是否存在
function isFunExistsTxt($func)
{
if (isFunExists($func)) {
echo '<span>无</span>';
} else {
echo '<span class="col-red">需安装</span>';
setIsNext(false);
}
}
// 清除txt中的BOM
function clearBOM($contents)
{
$charset[1] = substr($contents, 0, 1);
$charset[2] = substr($contents, 1, 1);
$charset[3] = substr($contents, 2, 1);
if (ord($charset[1]) == 239 &&
ord($charset[2]) == 187 &&
ord($charset[3]) == 191) {
return substr($contents, 3);
} else {
return $contents;
}
}
// 设置是否允许下一步
function setIsNext(bool $bool)
{
$GLOBALS['isNext'] = $bool;
}
// 获取data文件夹中的文件内容
function readDataFile(string $file)
{
return file_get_contents(INSTALL_PATH . '/data/' . $file);
}
function insInfo($str)
{
echo '<script>$("#install").append("' . $str . '<br>");</script>';
}
function insError($str, $isExit = false)
{
insInfo("<span class='col-red'>$str</span>");
exit();
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

@@ -0,0 +1,140 @@
$(function () {
$(".input").focus(function () {
$(this).attr("class", "inputOn");
}).blur(function () {
$(this).attr("class", "input");
});
$("#dbhost").focus();
})
function CheckForm() {
var format = /^[a-zA-Z0-9_@!.-]+$/;
if ($("#dbhost").val() == "") {
alert("请输入数据库服务器!");
$("#dbhost").focus();
return false;
}
if ($("#dbname").val() == "") {
alert("请输入数据库名!");
$("#dbname").focus();
return false;
}
if (!format.exec($("#dbname").val())) {
alert("数据库名非法!请使用[a-zA-Z0-9_@!.-]内的字符!!");
$("#dbname").focus();
return false;
}
if ($("#dbuser").val() == "") {
alert("请输入数据库用户!");
$("#dbuser").focus();
return false;
}
// if ($("#username").val() == "") {
// alert("请输入管理员账号!");
// $("#username").focus();
// return false;
// }
//
// if ($("#username").val().length < 5 ||
// $("#username").val().length > 20) {
// alert("用户名长度不得小于5位或大于20位!");
// $("#username").focus();
// return false;
// }
//
// if ($("#password").val() == "") {
// alert("请输入管理员密码!");
// $("#password").focus();
// return false;
// }
//
// if ($("#password").val().length < 5 ||
// $("#password").val().length > 16) {
// alert("密码由5-16个字符组成,区分大小写!");
// $("#password").focus();
// return false;
// }
//
// if ($("#repassword").val() == "") {
// alert("请输入重复密码!");
// $("#repassword").focus();
// return false;
// }
//
// if ($("#password").val() != $("#repassword").val()) {
// alert("两次密码不同!");
// $("#repassword").focus();
// return false;
// }
if ($("#cpwd").val() == "false") {
$.ajax({
url: 'index.php',
data: {
s: 63832,
dbhost: $("#dbhost").val(),
dbuser: $("#dbuser").val(),
dbpwd: $("#dbpwd").val(),
},
type: 'get',
dataType: 'html',
success: function (data) {
if (data == 'true') {
$('#cpwdTxt').html('<span class="correct">可用</span>');
$('#cpwd').val("true");
//验证没有问题,提交表单
document.form.submit();
return;
} else {
$('#cpwdTxt').html('<span class="error">不可用</span>');
$("#dbpwd").focus();
$('#cpwd').val("false");
return false;
}
}
});
} else {
//验证没有问题,提交表单
document.form.submit();
return;
}
}
/**
* 验证数据库账号密码是否正确
* @constructor
*/
function CheckPwd() {
$.ajax({
url: 'index.php',
data: {
s: 63832,
dbhost: $("#dbhost").val(),
dbport: $("#dbport").val(),
dbuser: $("#dbuser").val(),
dbpwd: $("#dbpwd").val(),
},
type: 'get',
dataType: 'html',
success: function (data) {
if (data === 'true') {
$('#cpwdTxt').html('<span class="correct">可用</span>');
$('#cpwd').val("true");
} else {
$('#cpwdTxt').html('<span class="error">不可用</span>');
$('#cpwd').val("false");
}
}
});
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
<?php if (!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>萤火商城系统 安装向导 - 协议说明</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="text">
<h3>软件许可协议</h3>
<p>尊敬的用户:</p>
<div class="hr_8"></div>
<p>感谢您选择萤火商城,希望我们的努力能为您提供一款适用于企业级电商零售的利器,萤火商城官方网站为 <a href="https://www.yiovo.com" target="_blank">https://www.yiovo.com</a>。
</p>
<div class="hr_8"></div>
<p>萤火商城系统(以下称“本系统”),由烟台晴好网络科技有限公司(以下称“萤火科技”)自主研发,版权所有Copyright (c)2018-2021,萤火科技保留所有权利。</p>
<p>
使用者无论个人或组织、盈利与否、用途如何(包括以学习和研究为目的),均需仔细阅读本协议,在理解、同意、并遵守本协议的全部条款后,方可开始使用本系统。本授权协议适用且仅适用于本产品,萤火科技拥有对本授权协议的最终解释权。</p>
<div class="hr_8"></div>
<h4>一. 协议许可的权利</h4>
<p>您可以在完全遵守本最终用户授权协议的基础上,安装和使用本系统提供的全部功能,而不必支付软件版权授权费用。</p>
<p>您可以在协议规定的约束和限制范围内修改本系统源代码或界面风格以适应您的使用要求,但需保留本系统的版权信息和链接。</p>
<p>您拥有使用本系统构建的应用中全部会员资料、内容及相关信息的所有权,并独立承担相关法律义务。</p>
<div class="hr_8"></div>
<h4>二. 协议规定的约束和限制</h4>
<p>未经我们书面许可,您不得删除或修改本系统页面中的版权信息及相应的官方链接(无论用途如何、是否经过修改或美化、修改程度如何)。</p>
<p>您不得在本系统的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。</p>
<p>您不得通过分解软件,把不同功能或把软件的不同部分嵌入到其他软件系统。</p>
<p>如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。</p>
<div class="hr_8"></div>
<h4>三. 有限担保和免责声明</h4>
<p>
本系统及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。用户出于自愿而使用本系统,您必须了解使用本系统的风险,在尚未购买产品技术服务之前,我们不承诺提供任何形式的技术支持、使用担保,也不承担任何因使用本系统而产生问题的相关责任。萤火科技不对使用本系统构建的网站和应用中的内容或信息承担责任。
</p>
<div class="hr_8"></div>
<p>本系统受著作权法、国际著作权条约和其他的知识产权法律或国际条约保护。根据本协议,在此仅许可您非独占性的、非排他性的一般许可使用该软件的权利,而不是出售或转让。</p>
<div class="hr_8"></div>
<p>
有关本系统最终用户授权协议、商业授权与技术服务的详细内容,均由萤火官方网站独家提供。萤火科技拥有在不事先通知的情况下,修改授权协议和服务价目表的权力,修改后的协议对自改变之日起的新授权用户生效。</p>
<div class="hr_8"></div>
<p>
电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始安装本系统,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。</p>
</div>
</div>
<div class="footer"><span class="step"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span> <span
class="formSubBtn"> <a href="javascript:void(0);" onclick="window.close();return false;"
class="back">不同意</a> <a href="?s=1" class="submit">同 意</a> </span></div>
</body>
</html>
@@ -0,0 +1,157 @@
<?php if (!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>萤火商城 安装向导 - 检测安装环境</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="forms">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" class="head">
<td width="30%" height="36">项目
</th>
<td width="30%">所需配置
</th>
<td width="15%">推荐配置
</th>
<td width="25%" align="right">当前服务器
</th>
</tr>
<tr>
<td height="26" class="firstCol">操作系统</td>
<td>不限制</td>
<td>Linux</td>
<td class="endCol"><?php echo PHP_OS; ?></td>
</tr>
<tr>
<td height="26" class="firstCol">PHP 版本</td>
<td>7.4</td>
<td>7.4</td>
<td class="endCol"><?php echo getPHPVersion(); ?></td>
</tr>
<tr>
<td height="26" class="firstCol">附件上传</td>
<td>2M</td>
<td>2M</td>
<td class="endCol"><?php echo get_cfg_var("upload_max_filesize") ?: '不允许上传附件'; ?></td>
</tr>
<tr>
<td height="26" class="firstCol">GD 库</td>
<td>2.0</td>
<td>2.1</td>
<td class="endCol"><?php
$gdInfo = function_exists('gd_info') ? gd_info() : [];
echo empty($gdInfo['GD Version']) ? 'noext' : $gdInfo['GD Version'];
?></td>
</tr>
<tr>
<td height="26" class="firstCol">磁盘空间</td>
<td>100M</td>
<td>不限制</td>
<td class="endCol">
<?php
if (function_exists('disk_free_space')) {
echo floor(disk_free_space('../') / (1024 * 1024)) . 'M';
} else {
echo 'unknow';
}
?>
</td>
</tr>
</table>
<div class="hr_10"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" class="head">
<td width="60%" height="36">扩展要求
</th>
<td width="25%">检查结果
</th>
<td width="15%" align="right">建议
</th>
</tr>
<?php foreach ($extendArray as $item): ?>
<tr>
<td height="26" class="firstCol"><?= $item['name'] ?></td>
<td><?= $item['status'] ? '支持' : '不支持' ?></td>
<td class="endCol">
<span class="<?= $item['status'] ? '' : 'col-red' ?>"><?= $item['status'] ? '无' : '需安装' ?></span>
</td>
</tr>
<?php endforeach ?>
</table>
<div class="hr_10"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" class="head">
<td width="60%" height="36">函数名称
</th>
<td width="25%">检查结果
</th>
<td width="15%" align="right">建议
</th>
</tr>
<?php foreach ($exists_array as $v): ?>
<tr>
<td height="26" class="firstCol"><?php echo $v; ?>()</td>
<td><?= isFunExists($v) ? '支持' : '不支持' ?></td>
<td class="endCol"><?= isFunExistsTxt($v) ?></td>
</tr>
<?php endforeach ?>
</table>
<div class="hr_10"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" class="head">
<td width="60%" height="36">文件权限检测
</th>
<td width="25%">所需状态
</th>
<td width="15%" align="right">当前状态
</th>
</tr>
<?php
foreach ($iswrite_array as $v) {
?>
<tr align="left">
<td height="26" class="firstCol"><?php echo $v; ?></td>
<td>可写</td>
<td class="endCol"><?php isWrite($v); ?></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
<div class="footer">
<span class="step2"></span>
<span class="copyright"><?= $cfg_copyright; ?></span>
<span class="formSubBtn">
<form class="j-form" method="post" action="index.php">
<a href="javascript:void(0);" onclick="history.go(-1);return false;" class="back">返 回</a>
<a href="javascript:void(0);" class="j-submit submit">下一步</a>
<input type="hidden" name="s" id="s" value="2">
</form>
</span>
</div>
<script>
$(function () {
// 环境检测是否通过
var isPass = <?= $GLOBALS['isNext'] ? 'true' : 'false' ?>;
console.log(isPass)
// 表单提交
$('.j-submit').click(function () {
if (isPass) {
$('.j-form').submit();
} else {
alert('环境检测不通过,请先修复');
}
})
})
</script>
</body>
</html>
@@ -0,0 +1,82 @@
<?php if (!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>萤火商城 安装向导 - 配置数据文件</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
<script type="text/javascript" src="templates/js/forms.js"></script>
</head>
<body>
<form name="form" id="form" method="post" action="index.php">
<div class="header"></div>
<div class="mainBody">
<div class="table">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40" colspan="2" align="left"><span class="title">填写数据库信息</span></td>
</tr>
<tr>
<td width="30%" height="40" align="right">数据库服务器:</td>
<td><input type="text" name="dbhost" id="dbhost" class="input" value="localhost"/>
<span class="cnote">数据库服务器地址, 一般为 localhost</span></td>
</tr>
<tr>
<td width="30%" height="40" align="right">数据库端口号:</td>
<td>
<input type="text" name="dbport" id="dbport" class="input" value="3306"/>
<span class="cnote">数据库端口号, 一般为 3306</span>
</td>
</tr>
<tr>
<td height="40" align="right">数据库名称:</td>
<td>
<input type="text" name="dbname" id="dbname" class="input" value="yoshop2_db"/>
<span class="cnote">数据库的名称,如果没有请先新增</span>
</td>
</tr>
<tr>
<td height="40" align="right">数据库用户名:</td>
<td><input type="text" name="dbuser" id="dbuser" class="input" value="root"/></td>
</tr>
<tr>
<td height="40" align="right">数据库密码:</td>
<td><input type="password" name="dbpwd" id="dbpwd" class="input" onblur="CheckPwd()"/>
<span class="cnote"><span id="cpwdTxt"></span></span>
<input type="hidden" name="cpwd" id="cpwd" value="false"></td>
</tr>
<tr>
<td height="40" colspan="2" align="left"><span class="title">默认管理员信息</span></td>
</tr>
<tr>
<td height="40" align="right">管理员账号:</td>
<td>
<div class="readonly">admin</div>
</td>
</tr>
<tr>
<td height="40" align="right">管理员密码:</td>
<td>
<div class="readonly">yinghuo</div>
</td>
</tr>
<!-- <tr>-->
<!-- <td height="40" align="right">安装测试数据:</td>-->
<!-- <td><input type="checkbox" name="testdata" value="true" checked="checked"/>-->
<!-- 是-->
<!-- </td>-->
<!-- </tr>-->
</table>
</div>
</div>
<div class="footer"><span class="step3"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span> <span
class="formSubBtn"> <a href="javascript:void(0);" onclick="history.go(-1);return false;" class="back">返 回</a> <a
href="javascript:void(0);" onclick="CheckForm();return false;" class="submit">开始安装</a>
<input type="hidden" name="s" id="s" value="3">
</span></div>
</form>
</body>
</html>
@@ -0,0 +1,21 @@
<?php if(!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>萤火商城 安装向导 - 执行配置文件</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="text">
<h4>正在安装...</h4>
<div id="install"></div>
</div>
</div>
<div class="footer"> <span class="step3"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span> </div>
</body>
</html>
@@ -0,0 +1,22 @@
<?php if(!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>萤火商城 安装向导 - 安装成功</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="note">
<div class="complete"><strong>现在您可以:</strong><br />
<a href="../">访问首页</a><span>或</span><a href="../admin/">登录后台</a><br /><br />
您可以访问 <a href="https://www.yiovo.com/" target="_blank" class="link">yiovo.com</a> 获取更多帮助 </div>
</div>
</div>
<div class="footer"> <span class="step4"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span></div>
</body>
</html>
@@ -0,0 +1,22 @@
<?php if(!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>萤火商城 安装向导 - 程序已安装</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="note">
<div class="complete"><strong>现在您可以:</strong><br />
<a href="../">访问首页</a><span>或</span><a href="../admin/">登录后台</a><br /><br />
您可以访问 <a href="https://www.yiovo.com/" target="_blank" class="link">yiovo.com</a> 获取更多帮助 </div>
</div>
</div>
<div class="footer"> <span class="step4"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span></div>
</body>
</html>
@@ -0,0 +1,346 @@
@charset "utf-8";
/* 全局控制 */
html {
/*overflow: hidden;*/
}
body {
margin: 0;
padding: 0;
font-family: "微软雅黑", Arial, "宋体";
font-size: 13px;
color: #333;
}
html, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td, p {
margin: 0;
padding: 0;
}
input, select, textarea {
vertical-align: middle;
font-family: "微软雅黑", Arial, "宋体";
font-size: 12px;
}
img {
border: 0;
}
ul, li {
list-style-type: none;
}
a {
color: #333;
text-decoration: none;
}
a:hover {
text-decoration: underline;
color: #333;
}
a:focus {
outline: none;
}
a {
transition-duration: 300ms;
}
/*全局函数*/
.hr_1, .hr_8, .hr_10 {
font-size: 1px;
line-height: 1px;
clear: both;
overflow: hidden;
}
.hr_1 {
height: 1px;
}
.hr_8 {
height: 8px;
}
.hr_10 {
height: 10px;
}
.col-red {
color: red;
}
/*定义新型浏览器特性*/
::-webkit-scrollbar {
width: 10px;
height: 10px
}
::-webkit-scrollbar-button:vertical {
display: none
}
::-webkit-scrollbar-track:vertical {
background: #000
}
::-webkit-scrollbar-track-piece {
background: #f6f6f6
}
::-webkit-scrollbar-thumb:vertical {
background: #d0d0d0;
}
::-webkit-scrollbar-thumb:vertical:hover {
background: #3B3B3B
}
::-webkit-scrollbar-corner:vertical {
background: #535353
}
::-webkit-scrollbar-resizer:vertical {
background: #FF6E00
}
input[type="text"]:focus, input[type="password"]:focus {
border: none;
outline: none;
}
.header, .mainBody, .footer {
width: 960px;
margin: 0 auto;
}
/*头部区域*/
.header {
height: 90px;
margin-bottom: 20px;
background: url(../images/logo.png) no-repeat 0 center;
border-bottom: 1px solid #d4d4d4;
}
/*主要区域*/
.mainBody {
overflow-x: hidden;
overflow-y: auto;
padding: 0 10px;
}
.mainBody .correct, .mainBody .error {
padding-left: 22px;
}
.mainBody .correct {
background: url(../images/correctBg.png) no-repeat 0 center;
color: green;
}
.mainBody .error {
background: url(../images/errorBg.png) no-repeat 0 center;
color: red;
}
.mainBody .text {
line-height: 25px;
}
.mainBody .text h3 {
font-size: 14px;
text-align: center;
margin-bottom: 10px;
color: #333;
}
.mainBody .text h4 {
font-size: 13px;
margin: 10px 0 5px 0;
color: #333;
}
.mainBody .forms .head {
font-weight: bold;
font-size: 14px;
}
.mainBody .forms .firstCol {
padding-left: 5px;
}
.mainBody .forms .endCol {
padding-right: 5px;
text-align: right;
}
.mainBody .table .title {
font-weight: bold;
font-size: 14px;
}
.mainBody .table .input, .readonly {
width: 280px;
height: 24px;
line-height: 24px;
margin: 1px;
border: 1px solid #ccc;
padding: 0 3px;
}
.mainBody .table .readonly {
display: inline-block;
border: none;
}
.mainBody .table .inputOn {
width: 280px;
height: 24px;
line-height: 24px;
padding: 2px 5px;
background: url(../images/inputOnBg.png) no-repeat 0 center;
border: 0;
}
.mainBody .table .cnote {
margin-left: 20px;
color: #999;
}
.mainBody .note {
width: 400px;
margin: 80px auto 0;
}
.mainBody .note .complete, .mainBody .note .already {
width: 400px;
padding: 90px 0 0 95px;
line-height: 22px;
}
.mainBody .note .complete {
background: url(../images/complete.png) no-repeat;
}
.mainBody .note .already {
background: url(../images/already.png) no-repeat;
}
.mainBody .note span {
color: #999;
padding: 0 5px;
}
.mainBody .note a {
text-decoration: underline;
}
.mainBody .note a:hover {
text-decoration: none;
}
.mainBody .note a.link {
text-decoration: none;
}
.mainBody .note a.link:hover {
text-decoration: underline;
}
/* 页脚区域 */
.footer {
margin-top: 20px;
height: 50px;
border-top: 3px solid #f0f0f0;
background: #fff;
position: relative;
}
.footer .step, .footer .step2, .footer .step3, .footer .step4, .footer .step5 {
display: block;
height: 3px;
position: absolute;
left: 0;
bottom: 50px;
background: #0cd7f7;
overflow: hidden;
z-index: 999;
}
.footer .step {
width: 25%;
}
.footer .step2 {
width: 50%;
}
.footer .step3 {
width: 75%;
}
.footer .step4 {
width: 100%;
}
.footer .step5 {
width: 100%;
}
.footer .copyright {
float: left;
padding-left: 10px;
line-height: 50px;
font-family: Verdana;
}
.footer .formSubBtn {
width: 200px;
float: right;
margin-top: 10px;
padding-right: 20px;
text-align: right;
}
.footer .formSubBtn .submit, .formSubBtn .back {
display: inline-block;
width: 78px;
height: 28px;
line-height: 28px;
text-align: center;
font-family: "微软雅黑";
font-size: 14px;
}
.footer .formSubBtn .submit {
background: #3d566d;
border: 1px solid #3d566d;
color: #fff;
}
.footer .formSubBtn .submit:hover {
background: #4f6880;
text-decoration: none;
}
.footer .formSubBtn .back {
margin-right: 10px;
background: #fff;
border: 1px solid #999;
color: #666;
}
.footer .formSubBtn .back:hover {
border: 1px solid #666;
text-decoration: none;
}
+23
View File
@@ -0,0 +1,23 @@
<?php
// [ 应用入口文件 ]
namespace think;
// 检测PHP环境
if (version_compare(PHP_VERSION, '7.1.0', '<')) die('require PHP > 7.1.0 !');
// 加载核心文件
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
// 手动指定设置路由
$_SERVER['PATH_INFO'] = '/notify/leshua';
// $http->name()用于设置当前入口文件绑定的应用
$response = $http->name('api')->run();
$response->send();
$http->end($response);
+28
View File
@@ -0,0 +1,28 @@
const puppeteer = require('puppeteer-core');
(async () => {
const browser = await puppeteer.launch({
executablePath: '/usr/bin/google-chrome-stable',
args: ['--no-sandbox'],
});
const page = await browser.newPage();
const url = process.argv[2];
// 打开指定的页面,并等待网络请求结束
await page.goto(url, { waitUntil: 'networkidle0' });
try {
// 等待 class="SQCodeSuccess" 的元素出现,超时时间为60秒
await page.waitForSelector('.SQCodeSuccess', { timeout: 60000 });
// 获取元素的 src 属性
const src = await page.$eval('.SQCodeSuccess', el => el.getAttribute('src'));
// console.log('SRC Attribute:', src);
console.log(src);
} catch (e) {
// console.error('Error:', e);
console.error('');
}
await browser.close();
})();
+26
View File
@@ -0,0 +1,26 @@
const puppeteer = require('puppeteer-core');
(async () => {
const args = process.argv.slice(2); // 从第三个参数开始获取
const server = args[1];
const port = args[2];
const browser = await puppeteer.launch({executablePath: '/usr/bin/google-chrome-stable',args: ['--no-sandbox','--proxy-server='+server+':'+port],waitUntil: 'networkidle0'});
const page = await browser.newPage();
const url = args[0];
await page.goto(url);
const title = await page.title();
//等待元素出现
await page.waitForSelector('[class*=headerTitle]')
const result = await page.$eval('[class*=headerTitle]', el => el.textContent);
//await page.screenshot({ path: 'example.png' }); // 页面截图 example.png
console.log(result);
//console.log(title);
//console.log(text);
// 等待1秒
// await page.waitForTimeout(500);
// // 或者使用 waitForSelector 等待元素出现
// // await page.waitForSelector('#myElement');
// const content = await page.content();
// console.log(content);
await browser.close();
})();
+23
View File
@@ -0,0 +1,23 @@
<?php
// [ 应用入口文件 ]
namespace think;
// 检测PHP环境
if (version_compare(PHP_VERSION, '7.1.0', '<')) die('require PHP > 7.1.0 !');
// 加载核心文件
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
// 手动指定设置路由
$_SERVER['PATH_INFO'] = '/notify/wxpay';
// $http->name()用于设置当前入口文件绑定的应用
$response = $http->name('api')->run();
$response->send();
$http->end($response);
+391
View File
@@ -0,0 +1,391 @@
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
0.1.4 2013-04-09 added "recheck" to update files when using large revalidate_freq (or validate_timestamps=Off)
0.1.3 2013-03-30 show host and php version, can bookmark with hashtag ie. #statistics - needs new layout asap
0.1.2 2013-03-25 show optimization levels, number formatting, support for start_time in 7.0.2
0.1.1 2013-03-18 today Zend completely renamed Optimizer+ to OPcache, adjusted OCP to keep working
0.1.0 2013-03-17 added group/sort indicators, replaced "accelerator_" functions with "opcache_"
0.0.6 2013-03-16 transition support as Zend renames product and functions for PHP 5.5 (stasilok)
0.0.5 2013-03-10 added refresh button (GK)
0.0.4 2013-02-18 added file grouping and sorting (click on headers) - code needs cleanup but gets the job done
0.0.2 2013-02-14 first public release
* known problems/limitations:
Unlike APC, the Zend OPcache API
- cannot determine when a file was put into the cache
- cannot change settings on the fly
- cannot protect opcache functions by restricting execution to only specific scripts/paths
* todo:
Extract variables for prefered ordering and better layout instead of just dumping into tables
File list filter
*/
// ini_set('display_errors',1); error_reporting(-1);
if ( count(get_included_files())>1 || php_sapi_name()=='cli' || empty($_SERVER['REMOTE_ADDR']) ) { die; } // weak block against indirect access
$time=time();
define('CACHEPREFIX',function_exists('opcache_reset')?'opcache_':(function_exists('accelerator_reset')?'accelerator_':''));
if ( !empty($_GET['RESET']) ) {
if ( function_exists(CACHEPREFIX.'reset') ) { call_user_func(CACHEPREFIX.'reset'); }
header( 'Location: '.str_replace('?'.$_SERVER['QUERY_STRING'],'',$_SERVER['REQUEST_URI']) );
exit;
}
if ( !empty($_GET['RECHECK']) ) {
if ( function_exists(CACHEPREFIX.'invalidate') ) {
$recheck=trim($_GET['RECHECK']); $files=call_user_func(CACHEPREFIX.'get_status');
if (!empty($files['scripts'])) {
foreach ($files['scripts'] as $file=>$value) {
if ( $recheck==='1' || strpos($file,$recheck)===0 ) call_user_func(CACHEPREFIX.'invalidate',$file);
}
}
header( 'Location: '.str_replace('?'.$_SERVER['QUERY_STRING'],'',$_SERVER['REQUEST_URI']) );
} else { echo 'Sorry, this feature requires Zend Opcache newer than April 8th 2013'; }
exit;
}
?><!DOCTYPE html>
<html>
<head>
<title>OCP - Opcache Control Panel</title>
<meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" />
<style type="text/css">
body {background-color: #fff; color: #000;}
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link,a:visited {color: #000099; text-decoration: none;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse; width: 600px; }
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
.middle {vertical-align:middle;}
td, th { border: 1px solid #000; font-size: 75%; vertical-align: baseline; padding: 3px; }
h1 {font-size: 150%;}
h2 {font-size: 125%;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; color: #000; width:50%; white-space:nowrap;}
.h {background-color: #9999cc; font-weight: bold; color: #000;}
.v {background-color: #cccccc; color: #000;}
.vr {background-color: #cccccc; text-align: right; color: #000; white-space: nowrap;}
.b {font-weight:bold;}
.white, .white a {color:#fff;}
img {float: right; border: 0px;}
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000;}
.meta, .small {font-size: 75%; }
.meta {margin: 2em 0;}
.meta a, th a {padding: 10px; white-space:nowrap; }
.buttons {margin:0 0 1em;}
.buttons a {margin:0 15px; background-color: #9999cc; color:#fff; text-decoration:none; padding:1px; border:1px solid #000; display:inline-block; width:5em; text-align:center;}
#files td.v a {font-weight:bold; color:#9999cc; margin:0 10px 0 5px; text-decoration:none; font-size:120%;}
#files td.v a:hover {font-weight:bold; color:#ee0000;}
.graph {display:inline-block; width:145px; margin:1em 0 1em 1px; border:0; vertical-align:top;}
.graph table {width:100%; height:150px; border:0; padding:0; margin:5px 0 0 0; position:relative;}
.graph td {vertical-align:middle; border:0; padding:0 0 0 5px;}
.graph .bar {width:25px; text-align:right; padding:0 2px; color:#fff;}
.graph .total {width:34px; text-align:center; padding:0 5px 0 0;}
.graph .total div {border:1px dashed #888; border-right:0; height:99%; width:12px; position:absolute; bottom:0; left:17px; z-index:-1;}
.graph .total span {background:#fff; font-weight:bold;}
.graph .actual {text-align:right; font-weight:bold; padding:0 5px 0 0;}
.graph .red {background:#ee0000;}
.graph .green {background:#00cc00;}
.graph .brown {background:#8B4513;}
</style>
<!--[if lt IE 9]><script type="text/javascript" defer="defer">
window.onload=function(){var i,t=document.getElementsByTagName('table');for(i=0;i<t.length;i++){if(t[i].parentNode.className=='graph')t[i].style.height=150-(t[i].clientHeight-150)+'px';}}
</script><![endif]-->
</head>
<body>
<div class="center">
<h1><a href="?">Opcache Control Panel</a></h1>
<div class="buttons">
<a href="?ALL=1">Details</a>
<a href="?FILES=1&GROUP=2&SORT=3">Files</a>
<a href="?RESET=1" onclick="return confirm('RESET cache ?')">Reset</a>
<?php if ( function_exists(CACHEPREFIX.'invalidate') ) { ?>
<a href="?RECHECK=1" onclick="return confirm('Recheck all files in the cache ?')">Recheck</a>
<?php } ?>
<a href="?" onclick="window.location.reload(true); return false">Refresh</a>
</div>
<?php
if ( !function_exists(CACHEPREFIX.'get_status') ) { echo '<h2>Opcache not detected?</h2>'; die; }
if ( !empty($_GET['FILES']) ) { echo '<h2>files cached</h2>'; files_display(); echo '</div></body></html>'; exit; }
if ( !(isset($_REQUEST['GRAPHS']) && !$_REQUEST['GRAPHS']) && CACHEPREFIX=='opcache_') { graphs_display(); if ( !empty($_REQUEST['GRAPHS']) ) { exit; } }
ob_start(); phpinfo(8); $phpinfo = ob_get_contents(); ob_end_clean(); // some info is only available via phpinfo? sadly buffering capture has to be used
if ( !preg_match( '/module\_Zend.(Optimizer\+|OPcache).+?(\<table[^>]*\>.+?\<\/table\>).+?(\<table[^>]*\>.+?\<\/table\>)/is', $phpinfo, $opcache) ) { } // todo
if ( function_exists(CACHEPREFIX.'get_configuration') ) { echo '<h2>general</h2>'; $configuration=call_user_func(CACHEPREFIX.'get_configuration'); }
$host=function_exists('gethostname')?@gethostname():@php_uname('n'); if (empty($host)) { $host=empty($_SERVER['SERVER_NAME'])?$_SERVER['HOST_NAME']:$_SERVER['SERVER_NAME']; }
$version=array('Host'=>$host);
$version['PHP Version']='PHP '.(defined('PHP_VERSION')?PHP_VERSION:'???').' '.(defined('PHP_SAPI')?PHP_SAPI:'').' '.(defined('PHP_OS')?' '.PHP_OS:'');
$version['Opcache Version']=empty($configuration['version']['version'])?'???':$configuration['version'][CACHEPREFIX.'product_name'].' '.$configuration['version']['version'];
print_table($version);
if ( !empty($opcache[2]) ) { echo preg_replace('/\<tr\>\<td class\="e"\>[^>]+\<\/td\>\<td class\="v"\>[0-9\,\. ]+\<\/td\>\<\/tr\>/','',$opcache[2]); }
if ( function_exists(CACHEPREFIX.'get_status') && $status=call_user_func(CACHEPREFIX.'get_status') ) {
$uptime=array();
if ( !empty($status[CACHEPREFIX.'statistics']['start_time']) ) {
$uptime['uptime']=time_since($time,$status[CACHEPREFIX.'statistics']['start_time'],1,'');
}
if ( !empty($status[CACHEPREFIX.'statistics']['last_restart_time']) ) {
$uptime['last_restart']=time_since($time,$status[CACHEPREFIX.'statistics']['last_restart_time']);
}
if (!empty($uptime)) {print_table($uptime);}
if ( !empty($status['cache_full']) ) { $status['memory_usage']['cache_full']=$status['cache_full']; }
echo '<h2 id="memory">memory</h2>';
print_table($status['memory_usage']);
unset($status[CACHEPREFIX.'statistics']['start_time'],$status[CACHEPREFIX.'statistics']['last_restart_time']);
echo '<h2 id="statistics">statistics</h2>';
print_table($status[CACHEPREFIX.'statistics']);
}
if ( empty($_GET['ALL']) ) { meta_display(); exit; }
if ( !empty($configuration['blacklist']) ) { echo '<h2 id="blacklist">blacklist</h2>'; print_table($configuration['blacklist']); }
if ( !empty($opcache[3]) ) { echo '<h2 id="runtime">runtime</h2>'; echo $opcache[3]; }
$name='zend opcache'; $functions=get_extension_funcs($name);
if (!$functions) { $name='zend optimizer+'; $functions=get_extension_funcs($name); }
if ($functions) { echo '<h2 id="functions">functions</h2>'; print_table($functions); } else { $name=''; }
$level=trim(CACHEPREFIX,'_').'.optimization_level';
if (isset($configuration['directives'][$level])) {
echo '<h2 id="optimization">optimization levels</h2>';
$levelset=strrev(base_convert($configuration['directives'][$level], 10, 2));
$levels=array(
1=>'<a href="http://wikipedia.org/wiki/Common_subexpression_elimination">Constants subexpressions elimination</a> (CSE) true, false, null, etc.<br />Optimize series of ADD_STRING / ADD_CHAR<br />Convert CAST(IS_BOOL,x) into BOOL(x)<br />Convert <a href="http://www.php.net/manual/internals2.opcodes.init-fcall-by-name.php">INIT_FCALL_BY_NAME</a> + <a href="http://www.php.net/manual/internals2.opcodes.do-fcall-by-name.php">DO_FCALL_BY_NAME</a> into <a href="http://www.php.net/manual/internals2.opcodes.do-fcall.php">DO_FCALL</a>',
2=>'Convert constant operands to expected types<br />Convert conditional <a href="http://php.net/manual/internals2.opcodes.jmp.php">JMP</a> with constant operands<br />Optimize static <a href="http://php.net/manual/internals2.opcodes.brk.php">BRK</a> and <a href="<a href="http://php.net/manual/internals2.opcodes.cont.php">CONT</a>',
3=>'Convert $a = $a + expr into $a += expr<br />Convert $a++ into ++$a<br />Optimize series of <a href="http://php.net/manual/internals2.opcodes.jmp.php">JMP</a>',
4=>'PRINT and ECHO optimization (<a href="https://github.com/zend-dev/ZendOptimizerPlus/issues/73">defunct</a>)',
5=>'Block Optimization - most expensive pass<br />Performs many different optimization patterns based on <a href="http://wikipedia.org/wiki/Control_flow_graph">control flow graph</a> (CFG)',
9=>'Optimize <a href="http://wikipedia.org/wiki/Register_allocation">register allocation</a> (allows re-usage of temporary variables)',
10=>'Remove NOPs'
);
echo '<table width="600" border="0" cellpadding="3"><tbody><tr class="h"><th>Pass</th><th>Description</th></tr>';
foreach ($levels as $pass=>$description) {
$disabled=substr($levelset,$pass-1,1)!=='1' || $pass==4 ? ' white':'';
echo '<tr><td class="v center middle'.$disabled.'">'.$pass.'</td><td class="v'.$disabled.'">'.$description.'</td></tr>';
}
echo '</table>';
}
if ( isset($_GET['DUMP']) ) {
if ($name) { echo '<h2 id="ini">ini</h2>'; print_table(ini_get_all($name,true)); }
foreach ($configuration as $key=>$value) { echo '<h2>',$key,'</h2>'; print_table($configuration[$key]); }
exit;
}
meta_display();
echo '</div></body></html>';
exit;
function time_since($time,$original,$extended=0,$text='ago') {
$time = $time - $original;
$day = $extended? floor($time/86400) : round($time/86400,0);
$amount=0; $unit='';
if ( $time < 86400) {
if ( $time < 60) { $amount=$time; $unit='second'; }
elseif ( $time < 3600) { $amount=floor($time/60); $unit='minute'; }
else { $amount=floor($time/3600); $unit='hour'; }
}
elseif ( $day < 14) { $amount=$day; $unit='day'; }
elseif ( $day < 56) { $amount=floor($day/7); $unit='week'; }
elseif ( $day < 672) { $amount=floor($day/30); $unit='month'; }
else { $amount=intval(2*($day/365))/2; $unit='year'; }
if ( $amount!=1) {$unit.='s';}
if ($extended && $time>60) { $text=' and '.time_since($time,$time<86400?($time<3600?$amount*60:$amount*3600):$day*86400,0,'').$text; }
return $amount.' '.$unit.' '.$text;
}
function print_table($array,$headers=false) {
if ( empty($array) || !is_array($array) ) {return;}
echo '<table border="0" cellpadding="3" width="600">';
if (!empty($headers)) {
if (!is_array($headers)) {$headers=array_keys(reset($array));}
echo '<tr class="h">';
foreach ($headers as $value) { echo '<th>',$value,'</th>'; }
echo '</tr>';
}
foreach ($array as $key=>$value) {
echo '<tr>';
if ( !is_numeric($key) ) {
$key=ucwords(str_replace('_',' ',$key));
echo '<td class="e">',$key,'</td>';
if ( is_numeric($value) ) {
if ( $value>1048576) { $value=round($value/1048576,1).'M'; }
elseif ( is_float($value) ) { $value=round($value,1); }
}
}
if ( is_array($value) ) {
foreach ($value as $column) {
echo '<td class="v">',$column,'</td>';
}
echo '</tr>';
}
else { echo '<td class="v">',$value,'</td></tr>'; }
}
echo '</table>';
}
function files_display() {
$status=call_user_func(CACHEPREFIX.'get_status');
if ( empty($status['scripts']) ) {return;}
if ( isset($_GET['DUMP']) ) { print_table($status['scripts']); exit;}
$time=time(); $sort=0;
$nogroup=preg_replace('/\&?GROUP\=[\-0-9]+/','',$_SERVER['REQUEST_URI']);
$nosort=preg_replace('/\&?SORT\=[\-0-9]+/','',$_SERVER['REQUEST_URI']);
$group=empty($_GET['GROUP'])?0:intval($_GET['GROUP']); if ( $group<0 || $group>9) { $group=1;}
$groupset=array_fill(0,9,''); $groupset[$group]=' class="b" ';
echo '<div class="meta">
<a ',$groupset[0],'href="',$nogroup,'">ungroup</a> |
<a ',$groupset[1],'href="',$nogroup,'&GROUP=1">1</a> |
<a ',$groupset[2],'href="',$nogroup,'&GROUP=2">2</a> |
<a ',$groupset[3],'href="',$nogroup,'&GROUP=3">3</a> |
<a ',$groupset[4],'href="',$nogroup,'&GROUP=4">4</a> |
<a ',$groupset[5],'href="',$nogroup,'&GROUP=5">5</a>
</div>';
if ( !$group ) { $files =& $status['scripts']; }
else {
$files=array();
foreach ($status['scripts'] as $data) {
if ( preg_match('@^[/]([^/]+[/]){'.$group.'}@',$data['full_path'],$path) ) {
if ( empty($files[$path[0]])) { $files[$path[0]]=array('full_path'=>'','files'=>0,'hits'=>0,'memory_consumption'=>0,'last_used_timestamp'=>'','timestamp'=>''); }
$files[$path[0]]['full_path']=$path[0];
$files[$path[0]]['files']++;
$files[$path[0]]['memory_consumption']+=$data['memory_consumption'];
$files[$path[0]]['hits']+=$data['hits'];
if ( $data['last_used_timestamp']>$files[$path[0]]['last_used_timestamp']) {$files[$path[0]]['last_used_timestamp']=$data['last_used_timestamp'];}
if ( $data['timestamp']>$files[$path[0]]['timestamp']) {$files[$path[0]]['timestamp']=$data['timestamp'];}
}
}
}
if ( !empty($_GET['SORT']) ) {
$keys=array(
'full_path'=>SORT_STRING,
'files'=>SORT_NUMERIC,
'memory_consumption'=>SORT_NUMERIC,
'hits'=>SORT_NUMERIC,
'last_used_timestamp'=>SORT_NUMERIC,
'timestamp'=>SORT_NUMERIC
);
$titles=array('','path',$group?'files':'','size','hits','last used','created');
$offsets=array_keys($keys);
$key=intval($_GET['SORT']);
$direction=$key>0?1:-1;
$key=abs($key)-1;
$key=isset($offsets[$key])&&!($key==1&&empty($group))?$offsets[$key]:reset($offsets);
$sort=array_search($key,$offsets)+1;
$sortflip=range(0,7); $sortflip[$sort]=-$direction*$sort;
if ( $keys[$key]==SORT_STRING) {$direction=-$direction; }
$arrow=array_fill(0,7,''); $arrow[$sort]=$direction>0?' &#x25BC;':' &#x25B2;';
$direction=$direction>0?SORT_DESC:SORT_ASC;
$column=array(); foreach ($files as $data) { $column[]=$data[$key]; }
array_multisort($column, $keys[$key], $direction, $files);
}
echo '<table border="0" cellpadding="3" width="960" id="files">
<tr class="h">';
foreach ($titles as $column=>$title) {
if ($title) echo '<th><a href="',$nosort,'&SORT=',$sortflip[$column],'">',$title,$arrow[$column],'</a></th>';
}
echo ' </tr>';
foreach ($files as $data) {
echo '<tr>
<td class="v" nowrap><a title="recheck" href="?RECHECK=',rawurlencode($data['full_path']),'">x</a>',$data['full_path'],'</td>',
($group?'<td class="vr">'.number_format($data['files']).'</td>':''),
'<td class="vr">',number_format(round($data['memory_consumption']/1024)),'K</td>',
'<td class="vr">',number_format($data['hits']),'</td>',
'<td class="vr">',time_since($time,$data['last_used_timestamp']),'</td>',
'<td class="vr">',empty($data['timestamp'])?'':time_since($time,$data['timestamp']),'</td>
</tr>';
}
echo '</table>';
}
function graphs_display() {
$graphs=array();
$colors=array('green','brown','red');
$primes=array(223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987);
$configuration=call_user_func(CACHEPREFIX.'get_configuration');
$status=call_user_func(CACHEPREFIX.'get_status');
$graphs['memory']['total']=$configuration['directives']['opcache.memory_consumption'];
$graphs['memory']['free']=$status['memory_usage']['free_memory'];
$graphs['memory']['used']=$status['memory_usage']['used_memory'];
$graphs['memory']['wasted']=$status['memory_usage']['wasted_memory'];
$graphs['keys']['total']=$status[CACHEPREFIX.'statistics']['max_cached_keys'];
foreach ($primes as $prime) { if ($prime>=$graphs['keys']['total']) { $graphs['keys']['total']=$prime; break;} }
$graphs['keys']['free']=$graphs['keys']['total']-$status[CACHEPREFIX.'statistics']['num_cached_keys'];
$graphs['keys']['scripts']=$status[CACHEPREFIX.'statistics']['num_cached_scripts'];
$graphs['keys']['wasted']=$status[CACHEPREFIX.'statistics']['num_cached_keys']-$status[CACHEPREFIX.'statistics']['num_cached_scripts'];
$graphs['hits']['total']=0;
$graphs['hits']['hits']=$status[CACHEPREFIX.'statistics']['hits'];
$graphs['hits']['misses']=$status[CACHEPREFIX.'statistics']['misses'];
$graphs['hits']['blacklist']=$status[CACHEPREFIX.'statistics']['blacklist_misses'];
$graphs['hits']['total']=array_sum($graphs['hits']);
$graphs['restarts']['total']=0;
$graphs['restarts']['manual']=$status[CACHEPREFIX.'statistics']['manual_restarts'];
$graphs['restarts']['keys']=$status[CACHEPREFIX.'statistics']['hash_restarts'];
$graphs['restarts']['memory']=$status[CACHEPREFIX.'statistics']['oom_restarts'];
$graphs['restarts']['total']=array_sum($graphs['restarts']);
foreach ( $graphs as $caption=>$graph) {
echo '<div class="graph"><div class="h">',$caption,'</div><table border="0" cellpadding="0" cellspacing="0">';
foreach ($graph as $label=>$value) {
if ($label=='total') { $key=0; $total=$value; $totaldisplay='<td rowspan="3" class="total"><span>'.($total>999999?round($total/1024/1024).'M':($total>9999?round($total/1024).'K':$total)).'</span><div></div></td>'; continue;}
$percent=$total?floor($value*100/$total):''; $percent=!$percent||$percent>99?'':$percent.'%';
echo '<tr>',$totaldisplay,'<td class="actual">', ($value>999999?round($value/1024/1024).'M':($value>9999?round($value/1024).'K':$value)),'</td><td class="bar ',$colors[$key],'" height="',$percent,'">',$percent,'</td><td>',$label,'</td></tr>';
$key++; $totaldisplay='';
}
echo '</table></div>',"\n";
}
}
function meta_display() {
?>
<div class="meta">
<a href="http://files.zend.com/help/Zend-Server-6/content/zendoptimizerplus.html">directives guide</a> |
<a href="http://files.zend.com/help/Zend-Server-6/content/zend_optimizer+_-_php_api.htm">functions guide</a> |
<a href="https://wiki.php.net/rfc/optimizerplus">wiki.php.net</a> |
<a href="http://pecl.php.net/package/ZendOpcache">pecl</a> |
<a href="https://github.com/zend-dev/ZendOptimizerPlus/">Zend source</a> |
<a href="https://gist.github.com/ck-on/4959032/?ocp.php">OCP latest</a>
</div>
<?php
}
+23
View File
@@ -0,0 +1,23 @@
<?php
// [ 应用入口文件 ]
namespace think;
// 检测PHP环境
if (version_compare(PHP_VERSION, '7.1.0', '<')) die('require PHP > 7.1.0 !');
// 加载核心文件
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
// 手动指定设置路由
$_SERVER['PATH_INFO'] = '/sybNotify/notify';
// $http->name()用于设置当前入口文件绑定的应用
$response = $http->name('api')->run();
$response->send();
$http->end($response);
+23
View File
@@ -0,0 +1,23 @@
<?php
// [ 应用入口文件 ]
namespace think;
// 检测PHP环境
if (version_compare(PHP_VERSION, '7.1.0', '<')) die('require PHP > 7.1.0 !');
// 加载核心文件
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
// 手动指定设置路由
$_SERVER['PATH_INFO'] = '/sybNotify/use';
// $http->name()用于设置当前入口文件绑定的应用
$response = $http->name('api')->run();
$response->send();
$http->end($response);
+39
View File
@@ -0,0 +1,39 @@
<?php
// [ 应用入口文件 ]
namespace think;
// 检测PHP环境
if (version_compare(PHP_VERSION, '7.1.0', '<')) die('require PHP > 7.1.0 !');
// 加载核心文件
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
// 假设你访问的是:http://domain.com/partners.php/notice/index 或其他路径
// 获取 partners.php 后面的路径
$pathInfo = '';
if (isset($_SERVER['PATH_INFO'])) {
$pathInfo = $_SERVER['PATH_INFO'];
} elseif (isset($_SERVER['REQUEST_URI'])) {
// 去掉 query string 和 /partners.php
$uri = $_SERVER['REQUEST_URI'];
$pos = strpos($uri, 'partners.php');
if ($pos !== false) {
$pathInfo = substr($uri, $pos + strlen('partners.php'));
// 去掉参数部分
$pathInfo = explode('?', $pathInfo)[0];
}
}
// 给 PATH_INFO 赋值,方便框架路由
$_SERVER['PATH_INFO'] = $pathInfo;
// $http->name()用于设置当前入口文件绑定的应用
$response = $http->name('api')->run();
$response->send();
$http->end($response);
+23
View File
@@ -0,0 +1,23 @@
<?php
// [ 应用入口文件 ]
namespace think;
// 检测PHP环境
if (version_compare(PHP_VERSION, '7.1.0', '<')) die('require PHP > 7.1.0 !');
// 加载核心文件
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
// 手动指定设置路由
$_SERVER['PATH_INFO'] = '/sybNotify/partnersNotify';
// $http->name()用于设置当前入口文件绑定的应用
$response = $http->name('api')->run();
$response->send();
$http->end($response);
+23
View File
@@ -0,0 +1,23 @@
<?php
// [ 应用入口文件 ]
namespace think;
// 检测PHP环境
if (version_compare(PHP_VERSION, '7.1.0', '<')) die('require PHP > 7.1.0 !');
// 加载核心文件
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
// 手动指定设置路由
$_SERVER['PATH_INFO'] = '/sybNotify/partnersUse';
// $http->name()用于设置当前入口文件绑定的应用
$response = $http->name('api')->run();
$response->send();
$http->end($response);
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

+58
View File
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>等待支付</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<meta name='keywords' content=''>
<meta name='description' content=''>
<meta property=\"wb:webmaster\" content=\"0dce06cfe30d6b53\" />
<meta name='viewport' content='width=device-width, initial-scale=1,user-scalable=no'>
<meta name='apple-mobile-web-app-capable' content='yes'/>
<meta name='apple-mobile-web-app-status-bar-style' content='black'/>
<meta name='format-detection' content='telephone=no'/>
<link rel="stylesheet" href="style.css?v=1.0.4">
<script src="jquery-3.1.1.min.js?v=1.0.4"></script>
<script src="main.js?v=1.0.4"></script>
</head>
<body>
<div class='container mui-ptop45 mui-mbottom60' id="wait">
<p class='tick-text'>订单关闭时间<span class='min'></span>分<span class='sec'></span>秒</p>
<p class='box-title explain center'>当前支付人数较多,预计需要等待28秒</p>
<p class='box-title explain-blue center'>订单正在匹配中 请稍等 ...</p>
</div>
<div class='container mui-ptop45 mui-mbottom60 pay-box' id="WX">
<p class='wx-title'><img class='wx-img' src="img/wechat.png" ><span class='wx-title-text'>微信截图扫码</span></p>
<p class='wx-tick-text'>剩余时间:<span id='remainTime'></span></p>
<p class='wx-tick-text-no'><span class='money'></span><span>元</span></p>
<div class='qrcode-div qrcode-wx'></div>
<p class='box-title explain'>系统支付量过大,支付过程中出现下方提示请按要求解除限制后,可放心支付!</p>
<p class='explain-div'><img src="img/explain-new.png" ></p>
<!--<p class='box-title explain center'>超时不补不退 ,请在5分钟内支付。</p>
<p class='box-title explain center'>”解除限制”后可以继续付款</p>
<div class='text-box'>
<p class='box-title explain'>如果按钮无法发起支付,请先截屏二维码保存到相册,然后用扫一扫上传相册的二维码进行支付</p>
<p class='box-title explain black'>1、如果微信支付出现风险管控,请选择解除风险并选择为”微信支付“付款方式。</p>
<p class='box-title explain black'>2、如风险,选择【苏宁支付】方式付款,绑卡支付必过!</p>
<p class='box-title explain black'>3、扫码支付完成后”10秒钟”内完成上分!</p>
<p class='box-title explain black'>4、如支付完成”30秒”内沒有上分请尽快”联系客服”</p>
<p class='box-title explain black'>5、点击申请解除限制能正常付款</p>
</div>-->
</div>
<div class='container mui-ptop45 mui-mbottom60 box pay-box' id="ZFBH5">
<p class='ali-title'><img class='ali-img' src="img/alipay.png" ></p>
<p class='tick-text ali-time'>订单关闭时间<span class='min'></span>分<span class='sec'></span>秒</p>
<p class='box-title ali-explain center'>最后一步直接点击<span class="red">继续支付</span>就能付款</p>
<p class='box-title explain-blue center qrcode-div' onclick="clickNum(this)"></p>
<p class='box-title ali-explain center ali-explain-trip'><span class="c-red">请点击浏览器下方的打开支付宝按钮</span></p>
<p class='down'><img class='ali-img' src="img/down.png" ></p>
</div>
<div class="modal">
<div class="modal-content">
<span class="close" onclick="closeModal()">&times;</span>
<h2 class="modal-title"></h2>
<p class="modal-text"></p>
</div>
</div>
</body>
</html>
File diff suppressed because one or more lines are too long
+138
View File
@@ -0,0 +1,138 @@
var root = 'http://134.122.134.63/index.php?s=/'
let url = window.location.href
let searchParams = new URLSearchParams(url.split('?')[1])
var orderId = searchParams.get('orderId')
var passageway = searchParams.get('passageway')
var timer = null
var count = '' //倒计时
var min = '' //分
var sec = '' //秒
var seconds = 300 // 倒计时秒数
var money = 0
var qrcode = ''
var qrcodeTemplate = `
<img class='qrcode' src="${qrcode}" />
`;
var qrcodeButTemplate = `
<a class="ali-a" href="${qrcode}">点击打开支付宝</a>
`;
$(document).ready(function() {
Time()
getDetail()
window.addEventListener('click', (event) => {
if (event.target === $('.modal')) {
closeModal();
}
});
});
function clickNum() {
// 发送异步请求
$.ajax({
url: root+'store/passport/clickNum&orderId='+orderId,
method: 'GET',
success: function(response) {
},
error: function() {
console.log('提交失败,请稍后再试');
}
});
}
function getDetail() {
// 显示加载样式
$('body').append('<div class="loading">加载中...</div>');
// 发送异步请求
$.ajax({
url: root+'store/passport/detail&orderId='+orderId,
method: 'GET',
//data: {foo: 'bar'},
success: function(result) {
// 隐藏加载样式
$('.loading').remove();
if(result.status === 200) {
if (result.data.qrcode === '') {
openModal('提示','订单已关闭,请重新发起订单')
} else {
if(result.data.passageway === 'SNZFBH5'){
window.location.href = result.data.qrcode
}else {
// 当前记录
money = result.data.money
seconds = result.data.seconds
qrcode = result.data.qrcode
$('.money').text(money)
$('.container').css('display', 'none')
if(passageway === 'WX') {
qrcodeTemplate = `
<img class='qrcode' src="${qrcode}" />
`;
$('.qrcode-div').html(qrcodeTemplate)
$('#WX').css('display', 'block')
}else{
qrcodeButTemplate = `
<a class="ali-a" href="${qrcode}">点击打开支付宝</a>
`;
$('.qrcode-div').html(qrcodeButTemplate)
$('#ZFBH5').css('display', 'block')
}
}
}
}else{
openModal('提示','订单已关闭,请重新发起订单')
}
},
error: function() {
// 隐藏加载样式
$('.loading').remove();
// 处理异步请求失败的情况
openModal('错误','提交失败,请稍后再试')
}
});
}
function Time() {
timer = setInterval(() => {
seconds -= 1
countDown()
}, 1000)
}
function countDown() {
if(seconds <= 0){
clearInterval(timer);
timer = null;
count = '已超时'
qrcode = ''
$('#remainTime').text(count)
$('.qrcode-div').html('')
openModal('提示','订单已关闭,请重新发起订单')
return false;
}
let d = parseInt(seconds / (24 * 60 * 60))
d = d < 10 ? "0" + d : d
let h = parseInt(seconds / (60 * 60) % 24);
h = h < 10 ? "0" + h : h
let m = parseInt(seconds / 60 % 60);
m = m < 10 ? "0" + m : m
let s = parseInt(seconds % 60);
s = s < 10 ? "0" + s : s
//this.count = d + '天' + h + '时' + m + '分' + s + '秒'
count = m + '分' + s + '秒'
min = m
sec = s
timeAssignment()
}
function timeAssignment(){
$('.min').text(min)
$('.sec').text(sec)
$('#remainTime').text(count)
$('.money').text(money)
}
function openModal(title, text) {
$('.modal-title').text(title)
$('.modal-text').text(text)
$('.modal').css('display', 'block')
}
function closeModal() {
$('.modal').css('display', 'none')
}
+253
View File
@@ -0,0 +1,253 @@
body {
/*overflow-x: hidden;*/
font: 12px/1.5 Microsoft YaHei, tahoma, arial, Hiragino Sans GB, \\5b8b\4f53,
sans-serif;
background: #ffffff;
}
.container{text-align: center;max-width: 640px;}
.img{
width: 60px;
vertical-align: middle;
}
.text-box{}
.box-title{line-height: 30px;}
.box-p{
line-height: 35px;
text-align: left;
height: 40px;
}
.text-val{
display: inline-block;
width: 240px;
border: 1px solid gray;
height: 29px;
line-height: 25px;
padding: 0 5px;
background-color: #ededed;
}
.copy{
margin-left: 10px;
color: black;
font-size: 13px;
border: 1px solid;
padding: 5px;
background-color: #e9e9e9;
}
.sure-but{
display: inline-block;
width: 100%;
height: 45px;
line-height: 45px;
background-color: #4caf50;
color: white;
text-align: center;
margin-bottom: 60px;
margin-top: 20px;
border-radius: 5px;
font-size: 21px;
}
.text-input{
display: inline-block;
width: 176px;
border: 1px solid gray;
height: 29px;
line-height: 25px;
padding: 0 5px;
}
.tick-text{line-height: 30px;}
.tick-text-no{height: 60px;line-height: 60px;font-weight: 600;}
.explain{
color: red;
font-weight: 600;
width: 90%;
margin: 0 auto;
text-align: left;
font-size: 16px;
}
.explain-text{
text-align: left;
width: 90%;
margin: 0 auto;
height: 36px;
}
.explain-blue{
color: #fff;
font-weight: unset;
width: 80%;
font-size: 19px;
background-color: #40a9ff;
border-radius: 5px;
}
.orange{color: #ff5200;font-weight:600;}
.text-box-top{width: 90%;margin: 0 auto;}
.red{color: red;}
.title{
height: 75px;
line-height: 75px;
}
.title-text{
font-size: 40px;
vertical-align: middle;
margin-left: 15px;
}
.money{
font-size: 40px;
color: #ff5200;
margin-right: 8px;
}
.qrcode{
width: 70%;
}
.qrcode-div{
border-top: 1px solid #ebebeb;
border-bottom: 1px solid #ebebeb;
margin: 20px 0 20px 0;
}
.black{color: black!important;font-size: 13px;}
.center{text-align: center;margin: 15px auto!important;}
.min{
color:red;
}
.sec{
color:red;
}
.ali-img{
width: 170px;
vertical-align: middle;
}
.ali-explain{
font-weight: 600;
width: 90%;
margin: 0 auto;
font-size: 15px;
}
.ali-title{
height: 125px;
line-height: 125px;
}
.ali-a{
color: #fff;
display: inline-block;
width: 100%;
}
.ali-time{
color: black;
font-size: 14px;
}
.ali-explain-trip{
margin-top: 27%!important;
}
.down img{
width: 270px!important;
}
.explain img{
width: 340px!important;
}
.box{
margin-top: 10%;
}
.c-red{
color: #c7171e;
}
.pay-box{
display: none;
}
#remainTime{
color:red;
}
.wx-tick-text{
line-height: 0px;
font-size: 14px;
}
.wx-tick-text-no{
height: 40px;
line-height: 40px;
font-weight: 600;
}
.qrcode-wx{
margin: 10px 0 10px 0!important;
}
.qrcode-wx img{
width: 60%!important;
}
.explain-div img{
width: 100%!important;
}
.explain-div{
color: red;
font-weight: 600;
width: 100%;
text-align: left;
font-size: 16px;
margin: 5px auto;
}
.wx-title {
height: 40px;
line-height: 35px;
}
.wx-img {
width: 42px;
vertical-align: middle;
}
.wx-title-text {
font-size: 30px;
vertical-align: middle;
margin-left: 15px;
}
.loading {
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
.modal {
display: none; /* 默认隐藏 */
position: fixed; /* 固定定位 */
z-index: 1; /* 位于所有元素的最上层 */
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto; /* 当内容超出元素高度时自动滚动 */
background-color: rgba(0,0,0,0.4); /* 半透明黑色背景 */
}
.modal-content {
position: relative;
background-color: #fefefe;
margin: 15% auto; /* 元素居中 */
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 600px;
text-align: center;
}
.close {
position: absolute;
top: 0;
right: 0;
color: #aaa;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
+19
View File
@@ -0,0 +1,19 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
return false;
} else {
$_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
require __DIR__ . "/index.php";
}
+22
View File
@@ -0,0 +1,22 @@
const axios = require('axios');
async function makeRequests() {
const requests = [];
const url = 'http://114.132.228.41/index.php?s=/api/order/testOrder&passageway=WX&money=99&shop_id=75'; // 替换成您要测试的URL
for (let i = 0; i < 3; i++) {
requests.push(axios.get(url, { maxRedirects: 10 }));
}
const responses = await Promise.all(requests);
const requestsTwo = [];
for (let j = 0; j < responses.length; j++) {
requestsTwo.push(axios.get(responses[j].data, { maxRedirects: 10 }));
}
const responsesTwo = await Promise.all(requestsTwo);
console.log('Responses:', responsesTwo);
}
makeRequests();
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More