初始化

This commit is contained in:
2026-08-08 18:27:38 +08:00
parent efc150c937
commit 060eb79c09
336 changed files with 24613 additions and 15 deletions
+21
View File
@@ -0,0 +1,21 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
+1096
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

+23
View File
@@ -0,0 +1,23 @@
<?php
use Illuminate\Foundation\Application;
define('LARAVEL_START', microtime(true));
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
require $maintenance;
}
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
+95
View File
@@ -0,0 +1,95 @@
(function () {
'use strict';
if (typeof Vue === 'undefined') {
return;
}
var createApp = Vue.createApp;
var productEl = document.getElementById('product-app');
if (productEl) {
createApp({
data: function () {
return {
q: '',
products: window.PRODUCTS || []
};
},
computed: {
filtered: function () {
var kw = this.q.trim().toLowerCase();
if (!kw) {
return this.products;
}
return this.products.filter(function (p) {
return (p.name + ' ' + p.code + ' ' + p.desc).toLowerCase().indexOf(kw) !== -1;
});
}
}
}).mount(productEl);
}
var contactEl = document.getElementById('contact-app');
if (contactEl) {
createApp({
data: function () {
return {
form: { name: '', email: '', phone: '', company: '', subject: '', message: '' },
errors: {},
submitting: false,
message: '',
ok: false
};
},
computed: {
remaining: function () {
return 1000 - this.form.message.length;
},
messageClass: function () {
return this.ok
? 'rounded-lg border border-success bg-success-soft px-4 py-3 text-sm text-success'
: 'rounded-lg border border-danger bg-danger-soft px-4 py-3 text-sm text-danger';
}
},
methods: {
submit: function () {
var self = this;
self.submitting = true;
self.message = '';
self.errors = {};
var tokenEl = document.querySelector('meta[name="csrf-token"]');
var token = tokenEl ? tokenEl.getAttribute('content') : '';
fetch('/contact', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-CSRF-TOKEN': token
},
body: JSON.stringify(self.form)
})
.then(function (res) { return res.json(); })
.then(function (data) {
self.ok = !!data.ok;
self.message = data.message || (self.ok ? '提交成功。' : '提交失败。');
if (self.ok) {
self.form = { name: '', email: '', phone: '', company: '', subject: '', message: '' };
} else if (data.errors) {
self.errors = data.errors;
}
})
.catch(function () {
self.ok = false;
self.message = '网络异常,请稍后重试。';
})
.finally(function () {
self.submitting = false;
});
}
}
}).mount(contactEl);
}
})();
File diff suppressed because one or more lines are too long
+3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long