no message
This commit is contained in:
parent
ad49e97200
commit
6074f08c6f
|
|
@ -47,6 +47,7 @@ class MarketingController
|
|||
$data = [
|
||||
'plugin' => $plugin,
|
||||
];
|
||||
|
||||
return view('admin::pages.marketing.show', $data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,4 +33,7 @@ body.page-marketing {
|
|||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body.page-marketing-info {
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<div class="col-xl-3 col-md-4 col-6" v-for="plugin, index in plugins.data" :key="index">
|
||||
<div class="card mb-4 marketing-item">
|
||||
<div class="card-body">
|
||||
<div class="plugin-img mb-3"><a href=""><img :src="plugin.icon_big" class="img-fluid"></a></div>
|
||||
<div class="plugin-img mb-3"><a :href="'admin/marketing/' + plugin.code"><img :src="plugin.icon_big" 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>
|
||||
|
|
@ -93,6 +93,36 @@
|
|||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
url: function() {
|
||||
let filter = {};
|
||||
// if (this.orderBy != 'products.id:desc') {
|
||||
// filter.order_by = this.orderBy;
|
||||
// }
|
||||
|
||||
if (this.page > 1) {
|
||||
filter.page = this.page;
|
||||
}
|
||||
|
||||
for (key in this.filter) {
|
||||
const value = this.filter[key];
|
||||
if (value !== '' && value !== null) {
|
||||
filter[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
const query = Object.keys(filter).map(key => key + '=' + filter[key]).join('&');
|
||||
|
||||
const url = @json(admin_route('marketing.index'));
|
||||
|
||||
if (query) {
|
||||
return url + '?' + query;
|
||||
}
|
||||
|
||||
return url;
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
page: function() {
|
||||
this.loadData();
|
||||
|
|
@ -101,6 +131,7 @@
|
|||
|
||||
methods: {
|
||||
loadData() {
|
||||
window.history.pushState('', '', this.url);
|
||||
$http.get(`marketing?page=${this.page}`).then((res) => {
|
||||
this.marketing = res.data.marketing;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,12 +1,62 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title', __('admin/marketing.marketing_list'))
|
||||
@section('title', __('admin/marketing.marketing_show'))
|
||||
|
||||
@section('body-class', 'page-marketing-info')
|
||||
|
||||
@section('content')
|
||||
@dump($plugin)
|
||||
@php
|
||||
$data = $plugin['data'];
|
||||
@endphp
|
||||
<div class="card mb-4">
|
||||
<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['number'] }}</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>
|
||||
|
||||
<div class="mb-4">
|
||||
<div class="mb-2 fw-bold">兼容性:</div>
|
||||
<div>{{ $data['version_name_format'] }}</div>
|
||||
</div>
|
||||
<div class="mb-5">
|
||||
<div class="mb-2 fw-bold">插件作者:</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">
|
||||
<div class="mb-2 fw-bold">{{ $data['developer']['name'] }}</div>
|
||||
<div>{{ $data['developer']['email'] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-primary btn-lg download-plugin"><i class="bi bi-cloud-arrow-down-fill"></i> 下载插件</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h5 class="text-center">插件描述</h5>
|
||||
<div>{{ $data['description'] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('footer')
|
||||
<script>
|
||||
$('.download-plugin').click(function(e) {
|
||||
$http.post('{{ admin_route('marketing.download', ['code' => $data['code']]) }}').then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
})
|
||||
// {{ admin_route('marketing.download', ['code' => $data['code']]) }}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* marketing.php
|
||||
* header.php
|
||||
*
|
||||
* @copyright 2022 beikeshop.com - All Rights Reserved
|
||||
* @link https://beikeshop.com
|
||||
* @author Edward Yang <yangjin@guangda.work>
|
||||
* @created 2022-09-26 18:45:53
|
||||
* @modified 2022-09-26 18:45:53
|
||||
* @created 2022-08-02 19:03:19
|
||||
* @modified 2022-08-02 19:03:19
|
||||
*/
|
||||
|
||||
return [
|
||||
'marketing_list' => '可用插件'
|
||||
'marketing_list' => '插件中心',
|
||||
'marketing_show' => '插件详情',
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue