!78 增加几处hook,用于实现其他登录方式及登录后的数据展示控制

* Merge branch 'dev' of https://gitee.com/what520/beikeshop into dev
* 增加 @hookwrapper('account.sidebar.email')
* 增加 hook_filter('account.edit.index', $data);拦截展示数据
* @hookwrapper('account.edit.email')
* 增加@stack('login.vue.data'),@stack('login.vue.method')
* 图片翻译插件增加hook
* 增加2个hook  admin.product.name.after   admin.product.content.after 用于实现翻译插件按钮
* 1.增加 @hook('file_manager.content.head.btns.after')
* 1.增加 @hook('file_manager.content.head.btns.after')
* 在文件管理器上加入@hook('file_manager.content.head.btns.after')
This commit is contained in:
what_村长 2023-04-11 06:23:12 +00:00 committed by Edward Yang
parent d8027054bc
commit d4b8c148a1
4 changed files with 9 additions and 3 deletions

View File

@ -22,7 +22,7 @@ class EditController extends Controller
{
$customer = current_customer();
$data['customer'] = $customer;
$data = hook_filter('account.edit.index', $data);
return view('account/edit', $data);
}

View File

@ -50,6 +50,7 @@
<span class="invalid-feedback"
role="alert">{{ $errors->has('name') ? $errors->first('name') : __('common.error_required', ['name' => __('shop/account.edit.name')]) }}</span>
</div>
@hookwrapper('account.edit.email')
<div class="col-sm-6">
<label class="form-label">{{ __('shop/account.edit.email') }}</label>
<input class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}" type="email"
@ -57,6 +58,7 @@
<span class="invalid-feedback"
role="alert">{{ $errors->has('email') ? $errors->first('email') : __('common.error_required', ['name' => __('shop/account.edit.email')]) }}</span>
</div>
@endhookwrapper
<div class="col-12 mt-4">
<button class="btn btn-primary mt-sm-0" type="submit">{{ __('common.submit') }}</button>
</div>

View File

@ -156,7 +156,8 @@
password_confirmation: [
{required: true, validator: validatePass2, trigger: 'change'}
]
}
},
@stack('login.vue.data')
},
beforeMount () {
@ -192,7 +193,8 @@
@endif
})
});
}
},
@stack('login.vue.method')
}
})

View File

@ -3,7 +3,9 @@
<div class="head">
<div class="portrait"><img src="{{ image_resize($customer->avatar, 200, 200) }}" class="img-fluid"></div>
<div class="account-name">{{ $customer->name }}</div>
@hookwrapper('account.sidebar.email')
<div class="account-email">{{ $customer->email }}</div>
@endhookwrapper
</div>
<nav class="list-group account-links">