去掉协会 WebView 和魔方账密页,微信登录与咨询接口共用同一 token 和拦截器。 Co-authored-by: Cursor <cursoragent@cursor.com>
71 lines
2.1 KiB
Vue
71 lines
2.1 KiB
Vue
<template>
|
|
<view class="hti" :class="'hti-' + name" :style="boxStyle">
|
|
<text class="hti-txt">{{ mark }}</text>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
const props = defineProps({
|
|
name: { type: String, default: 'mbti' },
|
|
size: { type: Number, default: 48 },
|
|
})
|
|
|
|
const MARK = {
|
|
mbti: 'I/E',
|
|
star: '★',
|
|
portrait: '解',
|
|
rhythm: '律',
|
|
synastry: '合',
|
|
astro: '盘',
|
|
companion: '节',
|
|
ask: '问',
|
|
cards: '卡',
|
|
reports: '报',
|
|
growth: '长',
|
|
relation: '配',
|
|
nine: '9',
|
|
eq: '情',
|
|
stress: '压',
|
|
sleep: '眠',
|
|
}
|
|
|
|
const mark = computed(() => MARK[props.name] || '·')
|
|
const boxStyle = computed(() => {
|
|
const px = Math.round(props.size * 1.15)
|
|
return `width:${px}px;height:${px}px;`
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
.hti {
|
|
border-radius: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
|
|
}
|
|
.hti-txt {
|
|
color: #fff;
|
|
font-weight: 800;
|
|
font-size: 15px;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
.hti-mbti { background: linear-gradient(145deg, #ffe9a0, #f0b020); }
|
|
.hti-star { background: linear-gradient(145deg, #b8deff, #2f7fe0); }
|
|
.hti-portrait { background: linear-gradient(145deg, #ffe8b0, #d4922a); }
|
|
.hti-rhythm { background: linear-gradient(145deg, #c8f5d4, #2fa866); }
|
|
.hti-synastry { background: linear-gradient(145deg, #ffd0e0, #e84880); }
|
|
.hti-astro { background: linear-gradient(145deg, #e4d4ff, #7c5ce0); }
|
|
.hti-companion { background: linear-gradient(145deg, #ffe9a0, #f0b020); }
|
|
.hti-ask { background: linear-gradient(145deg, #ffe0b8, #e87830); }
|
|
.hti-cards { background: linear-gradient(145deg, #c8f5f0, #2a9d8f); }
|
|
.hti-reports { background: linear-gradient(145deg, #e8f4ff, #2f7fe0); }
|
|
.hti-growth { background: linear-gradient(145deg, #ffe0b8, #e87830); }
|
|
.hti-relation { background: linear-gradient(145deg, #ffd0e0, #e84880); }
|
|
.hti-nine { background: linear-gradient(145deg, #e4d4ff, #7c5ce0); }
|
|
.hti-eq { background: linear-gradient(145deg, #c8f5f0, #2a9d8f); }
|
|
.hti-stress { background: linear-gradient(145deg, #ffc8b8, #e54d42); }
|
|
.hti-sleep { background: linear-gradient(145deg, #b8deff, #2f7fe0); }
|
|
</style>
|