This commit is contained in:
pushuo 2022-10-14 17:35:55 +08:00 committed by Edward Yang
parent b818cb8037
commit aeb6312f4c
13 changed files with 133 additions and 17 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -4,7 +4,7 @@
"description": "Stripe 支付 <a href='https://stripe.com/' target='_blank'>Stripe</a>",
"type": "payment",
"version": "v1.0.0",
"icon": "/image/logo.png",
"icon": "plugin/stripe/image/logo.png",
"author": {
"name": "成都光大网络科技有限公司",
"email": "yangjin@beikeshop.com"

View File

@ -60,8 +60,8 @@
class="img-fluid"></a></div>
<div class="plugin-name fw-bold mb-2">@{{ plugin.name }}</div>
<div class="d-flex align-items-center justify-content-between">
<span class="text-success">免费</span>
<span class="text-secondary">下载数@{{ plugin.downloaded }}</span>
<span class="text-success">{{ __('admin/marketing.text_free') }}</span>
<span class="text-secondary">@{{ plugin.downloaded }}</span>
</div>
</div>
</div>
@ -79,6 +79,7 @@
<el-dialog
title="{{ __('admin/marketing.set_token') }}"
:close-on-click-modal="false"
:visible.sync="setTokenDialog.show"
width="500px">
<el-input
@ -174,7 +175,6 @@
},
submitToken() {
console.log(this.setTokenDialog.token)
if (!this.setTokenDialog.token) {
return;
}

View File

@ -8,24 +8,24 @@
@php
$data = $plugin['data'];
@endphp
<div class="card mb-4">
<div class="card mb-4" id="app">
<div class="card-body">
<div class="d-flex mb-5">
<div class="border wp-400 hp-400 d-flex justify-content-between align-items-center"><img src="{{ $data['icon_big'] }}" class="img-fluid"></div>
<div class="ms-5 mt-2">
<h3 class="card-title mb-4">{{ $data['name'] }}</h3>
<div class="plugin-item d-flex align-items-center mb-4 lh-1 text-secondary">
<div class="mx-3 ms-0">下载次数{{ $data['downloaded'] }}</div><span class="vr lh-1 bg-secondary"></span>
<div class="mx-3">最后更新{{ $data['updated_at'] }}</div><span class="vr lh-1 bg-secondary"></span>
<div class="mx-3">版本{{ $data['version'] }}</div>
<div class="mx-3 ms-0">{{ __('admin/marketing.download_count') }}{{ $data['downloaded'] }}</div><span class="vr lh-1 bg-secondary"></span>
<div class="mx-3">{{ __('admin/marketing.last_update') }}{{ $data['updated_at'] }}</div><span class="vr lh-1 bg-secondary"></span>
<div class="mx-3">{{ __('admin/marketing.text_version') }}{{ $data['version'] }}</div>
</div>
<div class="mb-4">
<div class="mb-2 fw-bold">兼容性</div>
<div class="mb-2 fw-bold">{{ __('admin/marketing.text_compatibility') }}</div>
<div>{{ $data['version_name_format'] }}</div>
</div>
<div class="mb-5">
<div class="mb-2 fw-bold">插件作者</div>
<div class="mb-2 fw-bold">{{ __('admin/marketing.text_author') }}</div>
<div class="d-flex">
<div class="border wh-60 d-flex justify-content-between align-items-center"><img src="{{ $data['developer']['avatar'] }}" class="img-fluid"></div>
<div class="ms-3">
@ -36,27 +36,71 @@
</div>
<div>
<button class="btn btn-primary btn-lg download-plugin"><i class="bi bi-cloud-arrow-down-fill"></i> 下载插件</button>
<button class="btn btn-primary btn-lg" @click="downloadPlugin"><i class="bi bi-cloud-arrow-down-fill"></i> {{ __('admin/marketing.download_plugin') }}</button>
<div class="mt-3 d-none download-help"><a href="{{ admin_route('plugins.index') }}" class=""><i class="bi bi-cursor-fill"></i> <span></span></a></div>
</div>
</div>
</div>
<div>
<h5 class="text-center">插件描述</h5>
<h5 class="text-center">{{ __('admin/marketing.download_description') }}</h5>
<div>{{ $data['description'] }}</div>
</div>
</div>
<el-dialog
title="{{ __('admin/marketing.set_token') }}"
:close-on-click-modal="false"
:visible.sync="setTokenDialog.show"
width="500px">
<el-input
type="textarea"
:rows="4"
placeholder="{{ __('admin/marketing.set_token') }}"
v-model="setTokenDialog.token">
</el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="setTokenDialog.show = false">{{ __('common.cancel') }}</el-button>
<el-button type="primary" @click="submitToken">{{ __('common.confirm') }}</el-button>
</span>
</el-dialog>
</div>
@endsection
@push('footer')
<script>
$('.download-plugin').click(function(e) {
$http.post('{{ admin_route('marketing.download', ['code' => $data['code']]) }}').then((res) => {
$('.download-help').removeClass('d-none').find('span').text(res.message);
})
let app = new Vue({
el: '#app',
data: {
setTokenDialog: {
show: false,
token: @json(system_setting('base.developer_token') ?? ''),
}
},
methods: {
downloadPlugin() {
if (!this.setTokenDialog.token) {
return this.setTokenDialog.show = true;
}
$http.post('{{ admin_route('marketing.download', ['code' => $data['code']]) }}').then((res) => {
$('.download-help').removeClass('d-none').find('span').text(res.message);
})
},
submitToken() {
if (!this.setTokenDialog.token) {
return;
}
$http.post('{{ admin_route('settings.store_token') }}', {developer_token: this.setTokenDialog.token}).then((res) => {
this.setTokenDialog.show = false;
layer.msg(res.message);
})
}
}
})
// {{ admin_route('marketing.download', ['code' => $data['code']]) }}
</script>
@endpush

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => 'Plug-in-Markt',
'marketing_show' => 'Plug-in-Details',
'set_token' => 'Token setzen',
'download_count' => 'Download-Zähler',
'last_update' => 'letzte Aktualisierung',
'text_version' => 'Version',
'text_compatibility' => 'Kompatibilität',
'text_author' => 'Plugin-Autor',
'download_plugin' => 'Plugin herunterladen',
'download_description' => 'Plugin-Beschreibung',
'text_free' => 'kostenlos',
];

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => 'Plugin Marketing',
'marketing_show' => 'Plugin Detail',
'set_token' => 'Set Token',
'download_count' => 'download count',
'last_update' => 'last update',
'text_version' => 'version',
'text_compatibility' => 'compatibility',
'text_author' => 'plug-in author',
'download_plugin' => 'download plugin',
'download_description' => 'Plugin description',
'text_free' => 'free',
];

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => 'mercado complementario',
'marketing_show' => 'detalles del complemento',
'set_token' => 'Establecer ficha',
'download_count' => 'recuento de descargas',
'last_update' => 'última actualización',
'text_version' => 'versión',
'text_compatibility' => 'compatibilidad',
'text_author' => 'autor del complemento',
'download_plugin' => 'descargar complemento',
'download_description' => 'Descripción del complemento',
'text_free' => 'gratis',
];

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => 'marché des plug-ins',
'marketing_show' => 'détails du plug-in',
'set_token' => 'Définir le jeton',
'download_count' => 'nombre de téléchargements',
'last_update' => 'dernière mise à jour',
'text_version' => 'version',
'text_compatibility' => 'compatibilité',
'text_author' => 'auteur du plug-in',
'download_plugin' => 'télécharger le plugin',
'download_description' => 'Description de l\'extension',
'text_free' => 'gratuit',
];

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => 'mercato dei plug-in',
'marketing_show' => 'dettagli plug-in',
'set_token' => 'Imposta token',
'download_count' => 'conteggio download',
'last_update' => 'ultimo aggiornamento',
'text_version' => 'versione',
'text_compatibility' => 'compatibilità',
'text_author' => 'autore plug-in',
'download_plugin' => 'scarica plugin',
'download_description' => 'Descrizione plug-in',
'text_free' => 'gratuito',
];

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => 'プラグイン市場',
'marketing_show' => 'プラグインの詳細',
'set_token' => 'セットトークン',
'download_count' => 'ダウンロード数',
'last_update' => '最終更新',
'text_version' => 'バージョン',
'text_compatibility' => '互換性',
'text_author' => 'プラグイン作成者',
'download_plugin' => 'プラグインをダウンロード',
'download_description' => 'プラグインの説明',
'text_free' => '無料',
];

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => 'рынок плагинов',
'marketing_show' => 'детали плагина',
'set_token' => 'Установить токен',
'download_count' => 'количество загрузок',
'last_update' => 'последнее обновление',
'text_version' => 'версия',
'text_compatibility' => 'совместимость',
'text_author' => 'автор плагина',
'download_plugin' => 'скачать плагин',
'download_description' => 'Описание плагина',
'text_free' => 'бесплатно',
];

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => '插件市场',
'marketing_show' => '插件详情',
'set_token' => '设置 Token',
'download_count' => '下载次数',
'last_update' => '最后更新',
'text_version' => '版本',
'text_compatibility' => '兼容性',
'text_author' => '插件作者',
'download_plugin' => '下载插件',
'download_description' => '插件描述',
'text_free' => '免费',
];

View File

@ -13,4 +13,12 @@ return [
'marketing_list' => '插件市場',
'marketing_show' => '插件詳情',
'set_token' => '設置 Token',
'download_count' => '下載次數',
'last_update' => '最後更新',
'text_version' => '版本',
'text_compatibility' => '兼容性',
'text_author' => '插件作者',
'download_plugin' => '下載插件',
'download_description' => '插件描述',
'text_free' => '免費',
];