Merge remote-tracking branch 'origin/v2.x' into v2.x

pull/68/head
猿小天 2022-08-14 19:11:31 +08:00
commit 53e00f93ad
2 changed files with 5 additions and 2 deletions

View File

@ -80,6 +80,9 @@ class CustomModelSerializer(DynamicFieldsMixin, ModelSerializer):
def update(self, instance, validated_data): def update(self, instance, validated_data):
if self.request: if self.request:
if str(self.request.user) != "AnonymousUser":
if self.modifier_field_id in self.fields.fields:
validated_data[self.modifier_field_id] = self.get_request_user_id()
if hasattr(self.instance, self.modifier_field_id): if hasattr(self.instance, self.modifier_field_id):
setattr( setattr(
self.instance, self.modifier_field_id, self.get_request_user_id() self.instance, self.modifier_field_id, self.get_request_user_id()

View File

@ -160,8 +160,8 @@ export default {
routerViewKey () { routerViewKey () {
// key __transition-n-/foo // key __transition-n-/foo
// key __transition-n-__stamp-time-/foo // key __transition-n-__stamp-time-/foo
const stamp = this.$route.meta[`__stamp-${this.$route.path}`] || '' const stamp = this.$route.meta[`__stamp-${this.$route.fullpath}`] || ''
return `${stamp ? `__stamp-${stamp}-` : ''}${this.$route.path}` return `${stamp ? `__stamp-${stamp}-` : ''}${this.$route.fullpath}`
}, },
/** /**
* @description 最外层容器的背景图片样式 * @description 最外层容器的背景图片样式