From caa650d8a7618d304ff277ddca82d25cc3e4b88b Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 17 Mar 2023 10:15:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E5=85=A5=E6=9B=B2=E9=9D=96=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E5=92=8C=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common.scss | 42 +++++++++++++++++++++++++++++---- src/components/utils/modules.js | 8 +++++-- src/pages/home.vue | 13 +++++----- 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/components/common.scss b/src/components/common.scss index 23b1714..a344d4e 100644 --- a/src/components/common.scss +++ b/src/components/common.scss @@ -4,18 +4,51 @@ /** 常用内外边距样式 */ -@each $padMar, $pm in (mar:margin, pad:padding) { - @each $pos, $p in (l:left, r:right, t:top, b:bottom) { - @each $v in (8, 10, 16, 20, 32, 48, 64) { +@each $v in (8, 10, 12, 14, 16, 20, 24, 32, 48, 56, 64, 80) { + //gap + .gap-#{$v} { + gap: #{$v}px + } + .font-#{$v} { + font-size: #{$v}px; + } + @each $padMar, $pm in (mar:margin, pad:padding) { + .#{$padMar}-#{$v} { + #{$pm}: #{$v}px + } + //纵向 + .#{$padMar}-v#{$v} { + #{$pm}-top: #{$v}px; + #{$pm}-bottom: #{$v}px; + } + //横向 + .#{$padMar}-h#{$v} { + #{$pm}-left: #{$v}px; + #{$pm}-right: #{$v}px; + } + @each $pos, $p in (l:left, r:right, t:top, b:bottom) { .#{$padMar}-#{$pos+$v} { #{$pm}-#{$p}: #{$v}px } } } } -.bg-fff{ + +@each $where in (sticky, fixed) { + @each $pos, $p in (l:left, r:right, t:top, b:bottom) { + .#{$where}-#{$pos} { + position: fixed; + #{$p}: 0; + z-index: 202301031019; + width: 100%; + } + } +} + +.bg-fff { background-color: #fff; } + @font-face { font-family: 'iconfont'; /* project id 1862352 */ @@ -63,6 +96,7 @@ page { .bg-hover { background: #eee !important; } + .flex { display: flex; align-items: center; diff --git a/src/components/utils/modules.js b/src/components/utils/modules.js index 5c002ca..43af3b8 100644 --- a/src/components/utils/modules.js +++ b/src/components/utils/modules.js @@ -14,10 +14,14 @@ export const user = { }, }, actions: { - getUserInfo({commit}) { + getUserInfo({commit}, way = "std") { //获取企业微信后台账号信息 //党员认证状态 partyStatusForWX:0、未认证 1、认证中 2、已认证 - return http.post("/app/appwechatuser/check").then(res => { + const actions = { + std: "/app/appwechatuser/check", + qujing: "/app/appwechatuserqujing/check", + } + return http.post(actions[way]).then(res => { if (res?.data) { commit('setUser', res.data) return Promise.all([]) diff --git a/src/pages/home.vue b/src/pages/home.vue index 7f07d57..707f7a3 100644 --- a/src/pages/home.vue +++ b/src/pages/home.vue @@ -67,16 +67,17 @@ export default { uni.navigateTo({url: `${app.path}`}) }, getApps() { - this.apps = config.apps.map(e => ({...e, path: e.libPath})) + this.apps = config.apps.map(e => { + if (/\/project\//.test(e.libPath)) { + e.project = e.libPath.replace(/.*project\/([^\/]+)\/.+/, '$1') + } + return {...e, path: e.libPath} + }) }, }, onShow() { - if (this.token) { - this.getUserInfo(); - } else { - this.autoLogin().then(() => this.getUserInfo()) - } this.getApps() + Promise.all([this.token ? 0 : this.autoLogin()]).then(() => this.getUserInfo()) }, }