!132 Delete the background vip button and change it to License & Services
* Delete the background vip button and change it to License & Services
This commit is contained in:
parent
b4ddf33810
commit
391f28ede7
|
|
@ -3,7 +3,7 @@
|
|||
* @link https://beikeshop.com
|
||||
* @Author pu shuo <pushuo@guangda.work>
|
||||
* @Date 2022-08-26 18:18:22
|
||||
* @LastEditTime 2023-06-08 19:18:24
|
||||
* @LastEditTime 2023-06-14 14:30:05
|
||||
*/
|
||||
|
||||
import http from "../../../js/http";
|
||||
|
|
@ -52,7 +52,6 @@ if (typeof Vue != 'undefined') {
|
|||
|
||||
$(document).ready(function ($) {
|
||||
bk.versionUpdateTips();
|
||||
bk.vipUpdateTips();
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
|
||||
|
|
|
|||
|
|
@ -131,34 +131,6 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
// 设置vip更新提示
|
||||
vipUpdateTips() {
|
||||
let data = JSON.parse(Cookies.get('beike_vip') || null);
|
||||
const isHome = document.body.classList.contains('admin-home');
|
||||
|
||||
if (!data || isHome) {
|
||||
$http.get(`${config.api_url}/api/vip?domain=${config.app_url}`, null, {hload: true}).then((res) => {
|
||||
setVipUi(res)
|
||||
Cookies.set('beike_vip', res, { expires: 1 });
|
||||
})
|
||||
}
|
||||
|
||||
setVipUi(data)
|
||||
|
||||
function setVipUi(data) {
|
||||
if (data && data.vip) {
|
||||
$('.vip-serve').addClass('active');
|
||||
|
||||
if (data.expiring) {
|
||||
$('.vip-serve .expired-text').show().find('span').text(data.expired_at);
|
||||
}
|
||||
} else {
|
||||
$('.vip-serve').removeClass('active');
|
||||
$('.vip-serve .expired-text').hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 列表页使用 vue ajax 分页,点击浏览起前进后退按钮时,重新加载数据
|
||||
ajaxPageReloadData(app) {
|
||||
window.addEventListener('popstate', () => {
|
||||
|
|
|
|||
|
|
@ -51,20 +51,10 @@
|
|||
</li>
|
||||
@endhookwrapper
|
||||
|
||||
@hookwrapper('admin.header.vip')
|
||||
<li class="nav-item vip-serve">
|
||||
<a href="{{ config('beike.api_url') }}/vip/subscription?domain={{ config('app.url') }}&developer_token={{ system_setting('base.developer_token') }}&type=tab-vip" target="_blank" class="nav-link">
|
||||
<img src="/image/vip-icon.png" class="img-fluid">
|
||||
<span class="vip-text ms-1">VIP</span>
|
||||
<div class="expired-text text-danger ms-2" style="display: none">@lang('admin/common.expired_at'):<span class="ms-0"></span></div>
|
||||
</a>
|
||||
</li>
|
||||
@endhookwrapper
|
||||
|
||||
@hookwrapper('admin.header.license')
|
||||
<li class="nav-item">
|
||||
<a href="{{ config('beike.api_url') }}/vip/subscription?domain={{ config('app.url') }}&developer_token={{ system_setting('base.developer_token') }}&type=tab-license" target="_blank" class="nav-link">
|
||||
@lang('admin/common.copyright_buy')
|
||||
<i class="bi bi-gem text-primary"></i> @lang('admin/common.license_services')
|
||||
</a>
|
||||
</li>
|
||||
@endhookwrapper
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ return [
|
|||
'common_link' => 'Common Links',
|
||||
'header_search_input' => 'Search Features',
|
||||
'header_search_title' => 'Search Results',
|
||||
'license_services' => 'License & Services',
|
||||
|
||||
// sidebar
|
||||
'account_index' => 'Personal Center',
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ return [
|
|||
'common_link' => '常用链接',
|
||||
'header_search_input' => '搜索后台功能',
|
||||
'header_search_title' => '搜索结果',
|
||||
'license_services' => '版权与服务',
|
||||
|
||||
// sidebar
|
||||
'account_index' => '个人中心',
|
||||
|
|
|
|||
Loading…
Reference in New Issue