优化后台 vip 到期时间显示

wip

wip
This commit is contained in:
pushuo 2023-02-17 17:38:49 +08:00 committed by Edward Yang
parent 33cb20d436
commit e0c2acc630
12 changed files with 22 additions and 5 deletions

View File

@ -3,7 +3,7 @@
* @link https://beikeshop.com
* @Author pu shuo <pushuo@guangda.work>
* @Date 2022-08-22 18:32:26
* @LastEditTime 2023-02-13 14:29:46
* @LastEditTime 2023-02-17 17:57:40
*/
export default {
@ -119,7 +119,7 @@ export default {
$('.update-btn').hide();
}
} else {
$http.get(`${config.api_url}/api/version?version=${config.beike_version}`).then((res) => {
$http.get(`${config.api_url}/api/version?version=${config.beike_version}`, null, {hload: true}).then((res) => {
Cookies.set('beike_version', res, { expires: 1 });
bk.versionUpdateTips();
@ -134,9 +134,13 @@ export default {
if (data) {
if (data.vip) {
$('.vip-serve').addClass('active');
if (data.expiring) {
$('.vip-serve .expired-text').show().find('span').text(data.expired_at);
}
}
} else {
$http.get(`${config.api_url}/api/vip?domain=${config.app_url}`).then((res) => {
$http.get(`${config.api_url}/api/vip?domain=${config.app_url}`, null, {hload: true}).then((res) => {
Cookies.set('beike_vip', res, { expires: 1 });
bk.vipUpdateTips();

View File

@ -20,7 +20,11 @@
@hookwrapper('admin.header.vip')
<li class="nav-item vip-serve">
<a href="javascript:void(0)" class="nav-link"><img src="/image/vip-icon.png" class="img-fluid"> <span>VIP</span></a>
<a href="javascript:void(0)" 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

View File

@ -232,7 +232,7 @@
// 获取省份
const getZones = (country_id) => {
$http.get(`countries/${country_id}/zones`).then((res) => {
$http.get(`countries/${country_id}/zones`, null, {hload: true}).then((res) => {
if (res.data.zones.length > 0) {
$('select[name="zone_id"]').html('');
res.data.zones.forEach((zone) => {

View File

@ -81,4 +81,5 @@ return [
'update_old_version' => 'aktuelle Version',
'update_date' => 'Aktualisierungsdatum',
'update_btn' => 'zum Download gehen',
'expired_at' => 'Ablaufzeit',
];

View File

@ -85,4 +85,5 @@ return [
'update_old_version' => 'Current version',
'update_date' => 'Update date',
'update_btn' => 'Download',
'expired_at' => 'Expired',
];

View File

@ -81,4 +81,5 @@ return [
'update_old_version' => 'versión actual',
'update_date' => 'fecha de actualización',
'update_btn' => 'ir a descargar',
'expired_at' => 'fecha de caducidad',
];

View File

@ -81,4 +81,5 @@ return [
'update_old_version' => 'version actuelle',
'update_date' => 'date de mise à jour',
'update_btn' => 'aller au téléchargement',
'expired_at' => 'délai d\'expiration',
];

View File

@ -81,4 +81,5 @@ return [
'update_old_version' => 'versione corrente',
'update_date' => 'data di aggiornamento',
'update_btn' => 'vai al download',
'expired_at' => 'ora di scadenza',
];

View File

@ -81,4 +81,5 @@ return [
'update_old_version' => '現在のバージョン',
'update_date' => '更新日',
'update_btn' => 'ダウンロードする',
'expired_at' => '有効期限',
];

View File

@ -81,4 +81,5 @@ return [
'update_old_version' => 'текущая версия',
'update_date' => 'дата обновления',
'update_btn' => 'перейти к загрузке',
'expired_at' => 'срок действия',
];

View File

@ -85,4 +85,5 @@ return [
'update_old_version' => '当前版本',
'update_date' => '更新日期',
'update_btn' => '前往下载',
'expired_at' => '到期时间',
];

View File

@ -85,4 +85,5 @@ return [
'update_old_version' => '當前版本',
'update_date' => '更新日期',
'update_btn' => '前往下載',
'expired_at' => '到期時間',
];