From 226ad75f45e34512c2c8bff6fac7538d6742f7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E6=9C=9D=E4=BC=9F?= <2211960668@qq.com> Date: Mon, 30 May 2022 16:31:49 +0800 Subject: [PATCH 1/2] fix --- .../pages/userEntityGrant/detail/index.less | 44 ++++++++++++++++++- .../pages/userEntityGrant/detail/index.ts | 13 ++---- .../pages/userEntityGrant/detail/index.wxml | 14 +++++- .../pages/userEntityGrant/upsert/index.wxml | 2 +- 4 files changed, 60 insertions(+), 13 deletions(-) diff --git a/wechatMp/pages/userEntityGrant/detail/index.less b/wechatMp/pages/userEntityGrant/detail/index.less index b7159df3e..6a0bae3b6 100644 --- a/wechatMp/pages/userEntityGrant/detail/index.less +++ b/wechatMp/pages/userEntityGrant/detail/index.less @@ -5,14 +5,56 @@ .page-body { height: 100vh; display: flex; + justify-content: center; flex: 1; flex-direction: column; - background-color: @background-color-base; + background-color: @primary-color; box-sizing: border-box; .safe-area-inset-bottom(); } +.qrcode_view { + display: flex; + flex-direction: column; + background-color: #fff; + margin: 0 @size-spacing-large; + padding: @size-spacing-large; + border-radius: 8px; + box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12); +} +.icon-view { + position: absolute; + right: 0; + width: 50rpx; + height: 50rpx; + display: flex; + align-items: center; + justify-content: center; + background: #f5f5f5; + border-radius: 50%; +} +.image { + width: 400rpx; + height: 400rpx; + margin: @size-spacing-large 0rpx; + background-color: @background-color-base; +} +.row { + position: relative; + margin-bottom: @size-spacing-large; + display: flex; + flex: 1; + align-items: center; + justify-content: center; +} .col { display: flex; flex-direction: column; align-items: center; + flex: 1; +} +.text { + color: @text-color; +} +.relation { + font-size: 42rpx; } diff --git a/wechatMp/pages/userEntityGrant/detail/index.ts b/wechatMp/pages/userEntityGrant/detail/index.ts index e1e2cc147..6b7d581bb 100644 --- a/wechatMp/pages/userEntityGrant/detail/index.ts +++ b/wechatMp/pages/userEntityGrant/detail/index.ts @@ -21,10 +21,8 @@ OakPage({ type: 1,//类型 expiresAt: 1,// 过期时间 expired: 1, //是否过期 - autoExtend: 1, - sceneStr: 1, - ticket: 1, url: 1, + buffer: 1, isPermanent: 1, //是否永久码 }, filter: { @@ -37,17 +35,14 @@ OakPage({ }, isList: false, formData: async ([userEntityGrant]) => ({ - ...userEntityGrant, + relation: userEntityGrant && userEntityGrant.relation, + qrcodeUrl: userEntityGrant && userEntityGrant.wechatQrCode$entity[0] + && userEntityGrant.wechatQrCode$entity[0].url || 'data:image/jpeg;base64,' + wx.arrayBufferToBase64(userEntityGrant.wechatQrCode$entity[0].buffer) }), }, { data: { }, lifetimes: { - ready() { - if (!this.data.wechatQrCode$entity[0] || this.data.wechatQrCode$entity[0].expiresAt) { - //请求创建wechatQrcode - } - } }, methods: { } diff --git a/wechatMp/pages/userEntityGrant/detail/index.wxml b/wechatMp/pages/userEntityGrant/detail/index.wxml index 8feb31ab6..07104430e 100644 --- a/wechatMp/pages/userEntityGrant/detail/index.wxml +++ b/wechatMp/pages/userEntityGrant/detail/index.wxml @@ -1,6 +1,16 @@ - - + + + 邀请权限 + + + + + + {{relation}} + + 微信扫一扫 添加用户权限 + \ No newline at end of file diff --git a/wechatMp/pages/userEntityGrant/upsert/index.wxml b/wechatMp/pages/userEntityGrant/upsert/index.wxml index 5cd54f4bc..feea2c120 100644 --- a/wechatMp/pages/userEntityGrant/upsert/index.wxml +++ b/wechatMp/pages/userEntityGrant/upsert/index.wxml @@ -4,7 +4,7 @@ From 3baa956a1afb2a0470359a5403c66ef0f6cc5316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E6=9C=9D=E4=BC=9F?= <2211960668@qq.com> Date: Mon, 30 May 2022 17:12:21 +0800 Subject: [PATCH 2/2] fox --- wechatMp/pages/userEntityGrant/detail/index.less | 10 +++++++++- wechatMp/pages/userEntityGrant/detail/index.wxml | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/wechatMp/pages/userEntityGrant/detail/index.less b/wechatMp/pages/userEntityGrant/detail/index.less index 6a0bae3b6..137d7ee6a 100644 --- a/wechatMp/pages/userEntityGrant/detail/index.less +++ b/wechatMp/pages/userEntityGrant/detail/index.less @@ -29,7 +29,15 @@ display: flex; align-items: center; justify-content: center; - background: #f5f5f5; + background: @background-color-base; + border-radius: 50%; +} +.icon-view2 { + width: 100rpx; + height: 100rpx; + display: flex; + align-items: center; + justify-content: center; border-radius: 50%; } .image { diff --git a/wechatMp/pages/userEntityGrant/detail/index.wxml b/wechatMp/pages/userEntityGrant/detail/index.wxml index 07104430e..5a34a6621 100644 --- a/wechatMp/pages/userEntityGrant/detail/index.wxml +++ b/wechatMp/pages/userEntityGrant/detail/index.wxml @@ -8,8 +8,8 @@ - {{relation}} - + {{relation || '-'}} + 微信扫一扫 添加用户权限