Compare commits

..

2 Commits

8 changed files with 90 additions and 59 deletions
+33 -7
View File
@@ -249,10 +249,16 @@ page { -ms-overflow-style: none; scrollbar-width: none; }
border-color: rgba(98, 132, 255, 0.5);
}
/* 一题一屏:卡片更突出,题目/选项更大 */
/* 一题一屏:不再包大卡片,题目直接融入页面背景(选项保留玻璃药丸),题目/选项更大 */
.ot-qcard.one {
margin-top: 8px;
padding: 44px 32px;
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
border: none;
box-shadow: none;
border-radius: 0;
margin-top: 0;
padding: 12px 8px 0;
}
.ot-qcard.one .ot-qtext {
@@ -304,9 +310,15 @@ page { -ms-overflow-style: none; scrollbar-width: none; }
padding: 20px 22px;
}
/* 选中态全站统一:蓝紫渐变 + 白字 */
.ot-opt.sel {
border-color: #6284ff;
background: rgba(99, 132, 255, 0.08);
border-color: transparent;
background: linear-gradient(135deg, #6b8bff, #8f7bff);
box-shadow: 0 8rpx 24rpx rgba(98, 132, 255, 0.28);
}
.ot-opt.sel .opt-text {
color: #ffffff;
}
.opt-key {
@@ -317,7 +329,7 @@ page { -ms-overflow-style: none; scrollbar-width: none; }
}
.ot-opt.sel .opt-key {
color: #6284ff;
color: #ffffff;
}
.opt-text {
@@ -405,7 +417,21 @@ page { -ms-overflow-style: none; scrollbar-width: none; }
}
.page-navbar-col { display: flex; flex-direction: column; }
.page-navbar-no { font-family: 'BubbledotICG', monospace; color: #a3abc9; font-size: 26rpx; letter-spacing: 2rpx; line-height: 1.15; }
.page-navbar-titlerow { display: flex; align-items: baseline; gap: 16rpx; line-height: 1.15; }
.page-navbar-titlerow { display: flex; align-items: center; gap: 16rpx; line-height: 1.15; }
/* 标题区返回按钮:玻璃圆形 + 线性箭头(沉浸式导航下唯一返回入口) */
.page-navbar-back {
width: 56rpx; height: 56rpx; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
background: rgba(255, 255, 255, 0.55);
backdrop-filter: blur(20rpx) saturate(160%);
-webkit-backdrop-filter: blur(20rpx) saturate(160%);
border: 1px solid rgba(99, 132, 255, 0.22);
color: #5a6aa3;
box-shadow: 0 4rpx 14rpx rgba(59, 79, 125, 0.10);
flex-shrink: 0;
}
.page-navbar-back .ic { width: 30rpx; height: 30rpx; }
.page-navbar-back.pressed { opacity: 0.65; }
.page-navbar-title {
font-size: 40rpx; font-weight: 800; letter-spacing: -0.5rpx; line-height: 1.15;
background: linear-gradient(120deg, #8fc3ff 0%, #a8a0ff 45%, #e0a0ff 80%, #7fe0ff 100%);
+15 -2
View File
@@ -25,8 +25,9 @@ export function getTopInset() {
}
/** 统一固定标题区(fixed 不随滚动):像素字 kicker + 彩虹渐变标题 + 像素字注脚。
* back:传入函数=自定义返回;true=自动返回(无上一页则回首页 Tab)。
* 占位高度由 createSelectorQuery 实测 navbar 真实高度,绝无空白/覆盖/重复。 */
export function PageHeader({ no, title, en, sub }) {
export function PageHeader({ no, title, en, sub, back }) {
const { navH, windowWidth } = getTopInset();
// 标题区整体上移 65rpx:从状态栏让位空间中扣除(不是容器偏移,占位实测自动跟随,无空白)
const SHIFT_PX = Math.round((65 * (windowWidth || 375)) / 750);
@@ -40,7 +41,14 @@ export function PageHeader({ no, title, en, sub }) {
.boundingClientRect((r) => { if (r && r.height) setH(r.height); })
.exec();
});
}, [no, title, en, sub]);
}, [no, title, en, sub, back]);
const goBack = () => {
if (typeof back === 'function') { back(); return; }
const pages = Taro.getCurrentPages ? Taro.getCurrentPages() : [];
if (pages.length > 1) Taro.navigateBack({ delta: 1 });
else Taro.switchTab({ url: '/pages/index/index' });
};
return (
<>
@@ -48,6 +56,11 @@ export function PageHeader({ no, title, en, sub }) {
<View className="page-navbar-col">
{no ? <Text className="page-navbar-no">{no}</Text> : null}
<View className="page-navbar-titlerow">
{back ? (
<View className="page-navbar-back" hoverClass="pressed" onClick={goBack}>
<Text className="ic ic-arrow-left" aria-hidden />
</View>
) : null}
<Text className="page-navbar-title">{title}</Text>
{sub ? <Text className="page-navbar-sub">{sub}</Text> : null}
</View>
+1 -1
View File
@@ -1 +1 @@
export default { navigationBarTitleText: '政策测评' };
export default { navigationBarTitleText: '政策测评', navigationStyle: 'custom' };
+4 -1
View File
@@ -5,6 +5,7 @@ import { getUser } from '@/utils/auth';
import { request, cachedRequest } from '@/utils/api';
import { useTabIndex } from '@/utils/tab';
import Skeleton from '@/components/skeleton';
import { PageHeader } from '@/components/TopInset';
import './index.scss';
export default function Policy() {
@@ -76,6 +77,7 @@ export default function Policy() {
if (!loaded) {
return (
<View className="policy page-in">
<PageHeader no="00" title="政策适配测评" en="Policy" back />
<Text className="muted">正在加载测评</Text>
<View style={{ marginTop: 20 }}><Skeleton.Rows n={4} gap={18} /></View>
</View>
@@ -85,6 +87,7 @@ export default function Policy() {
if (result) {
return (
<View className="policy page-in">
<PageHeader no="02" title="适配结果" en="Result" back />
<View className="summary">{result.summary}</View>
<Text className="section-head">适配政策</Text>
@@ -141,9 +144,9 @@ export default function Policy() {
return (
<View className="policy quiz-center">
<PageHeader no="01" title="政策适配测评" en="Policy" back />
<View className="ot-quiz-head">
<View className="ot-quiz-top">
<Text className="ot-quiz-title">政策适配测评<Text className="ot-quiz-tag">5 </Text></Text>
<Text className="ot-progress-text">{current + 1} / {QUESTIONS.length} </Text>
</View>
<View className="ot-progress"><View className="ot-progress-fill" style={{ width: pct + '%' }} /></View>
+1 -1
View File
@@ -1 +1 @@
export default { navigationBarTitleText: 'OPC 创业伙伴调研' };
export default { navigationBarTitleText: 'OPC 创业伙伴调研', navigationStyle: 'custom' };
+4 -11
View File
@@ -4,6 +4,7 @@ import { useState, useEffect } from 'react';
import { getUser } from '@/utils/auth';
import { request, cachedRequest } from '@/utils/api';
import Skeleton from '@/components/skeleton';
import { PageHeader } from '@/components/TopInset';
import './index.scss';
/* 题目/区域/Likert 由后端 /api/survey/questions 下发填充 */
@@ -113,11 +114,7 @@ export default function Survey() {
if (stage === 'welcome') {
return (
<View className="sv page-in">
<View className="sv-head">
<Text className="sv-no">00</Text>
<Text className="sv-title">云南 OPC 创业伙伴调研</Text>
<Text className="sv-en">Survey</Text>
</View>
<PageHeader no="00" title="OPC 创业伙伴调研" en="Survey" back />
<Text className="sv-intro">
聊聊你在云南做的行业遇到的难题AI 赋能与政策诉求 {loaded ? SURVEY_QUESTIONS.length : '…'} 58 分钟匿名提交用于云南 OPC 创业生态建设与政策研究
</Text>
@@ -141,11 +138,7 @@ export default function Survey() {
if (stage === 'done') {
return (
<View className="sv page-in">
<View className="sv-head">
<Text className="sv-no">06</Text>
<Text className="sv-title">提交成功感谢参与</Text>
<Text className="sv-en">Thank you</Text>
</View>
<PageHeader no="06" title="提交成功,感谢参与!" en="Thank you" back />
<View className="sv-thanks">
<Text>你的回答已匿名记录将用于云南 OPC 创业生态建设与政策研究我们正在组织 OPC 伙伴社群与调研回访欢迎继续参与</Text>
</View>
@@ -165,9 +158,9 @@ export default function Survey() {
return (
<View className="sv">
<PageHeader no="01" title="创业伙伴调研" en="Quiz" back={() => { setStage('welcome'); scrollTop(); }} />
<View className="sv-quiz-head">
<View className="sv-quiz-top">
<Text className="sv-quiz-title">OPC 创业伙伴调研</Text>
<Text className="sv-progress-text">{current + 1} / {SURVEY_QUESTIONS.length}</Text>
</View>
<View className="sv-progress"><View className="sv-progress-fill" style={{ width: pct + '%' }} /></View>
+29 -25
View File
@@ -97,7 +97,7 @@
.sv-progress {
height: 12rpx;
border-radius: 999px;
background: rgba(255, 255, 255, 0.1);
background: rgba(99, 132, 255, 0.14);
margin: 22rpx 0 18rpx;
overflow: hidden;
}
@@ -111,7 +111,7 @@
.sv-part {
display: block;
font-size: 24rpx;
color: #a8c4ff;
color: #6284ff;
margin-bottom: 8rpx;
}
@@ -128,14 +128,16 @@
margin: 8rpx 0 20rpx;
}
/* ---------- 问题卡片 ---------- */
/* ---------- 题目区(不包大卡片,直接融入页面背景) ---------- */
.sv-qcard {
background: rgba(255,255,255,0.55); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
border: 1rpx solid rgba(99, 132, 255, 0.14);
border-radius: 20px;
padding: 34rpx 32rpx;
margin-top: 8rpx;
box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.45);
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
border: none;
border-radius: 0;
padding: 16rpx 8rpx 0;
margin-top: 0;
box-shadow: none;
}
.sv-qnum {
display: flex;
@@ -147,11 +149,11 @@
}
.sv-qnum .sv-flag {
font-size: 20rpx;
color: #a8c4ff;
color: #6284ff;
font-weight: 600;
}
.sv-check {
color: #a8c4ff;
color: #6284ff;
font-size: 24rpx;
display: inline-flex;
align-items: center;
@@ -188,15 +190,15 @@
transition: all 0.2s ease;
}
.sv-opt.sel {
border-color: #a8c4ff;
background: rgba(160, 180, 255,0.08);
box-shadow: 0 0 0 1rpx rgba(160, 180, 255,0.5), 0 0 22rpx rgba(160, 180, 255,0.14);
border-color: transparent;
background: linear-gradient(135deg, #6b8bff, #8f7bff);
box-shadow: 0 8rpx 24rpx rgba(98, 132, 255, 0.28);
}
.sv-opt-dot {
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 2rpx solid #5b5b5b;
border: 2rpx solid #8a94c0;
flex-shrink: 0;
margin-top: 4rpx;
display: flex;
@@ -206,11 +208,11 @@
color: transparent;
transition: all 0.2s ease;
}
.sv-opt.sel .sv-opt-text { color: #fff; }
.sv-opt.sel .sv-opt-dot {
border-color: #a8c4ff;
background: #a8c4ff;
color: #000;
box-shadow: 0 0 10rpx rgba(160, 180, 255,0.6);
border-color: #fff;
background: transparent;
color: #fff;
}
.sv-opt-text {
font-size: 27rpx;
@@ -236,9 +238,9 @@
transition: all 0.2s ease;
}
.sv-lk.sel {
border-color: #a8c4ff;
background: rgba(160, 180, 255,0.08);
box-shadow: 0 0 0 1rpx rgba(160, 180, 255,0.5), 0 0 22rpx rgba(160, 180, 255,0.14);
border-color: transparent;
background: linear-gradient(135deg, #6b8bff, #8f7bff);
box-shadow: 0 8rpx 24rpx rgba(98, 132, 255, 0.28);
}
.sv-lk-v {
width: 48rpx;
@@ -255,9 +257,11 @@
transition: all 0.2s ease;
}
.sv-lk.sel .sv-lk-v {
background: linear-gradient(135deg, #5b8cff, #9d6bff);
color: #000;
box-shadow: 0 0 14rpx rgba(160, 180, 255,0.55);
background: rgba(255, 255, 255, 0.22);
color: #fff;
}
.sv-lk.sel .sv-lk-l {
color: #fff;
}
.sv-lk-l {
font-size: 28rpx;
+3 -11
View File
@@ -143,12 +143,9 @@ export default function Test() {
return (
<View className="ot quiz-center page-in">
<PageHeader no="01" title="OPC 创业基因测评" sub={version === 'quick' ? '快速版' : '完整版'} en="Assessment" back={backToWelcome} />
<View className="ot-quiz-head">
<View className="ot-quiz-top">
<View className="ot-quiz-left">
<View className="ot-back" onClick={backToWelcome}> 返回</View>
<Text className="ot-quiz-title">OPC 创业基因测评<Text className="ot-quiz-tag">{version === 'quick' ? '快速版' : '完整版'}</Text></Text>
</View>
<Text className="ot-progress-text">{current + 1} / {questions.length} </Text>
</View>
<View className="ot-progress"><View className="ot-progress-fill" style={{ width: pct + '%' }} /></View>
@@ -191,13 +188,8 @@ export default function Test() {
const level = r.adaptLevel || {};
return (
<View className="ot page-in">
<TopInset />
{/* 头部:类型码 + 人设 + 适配指数 */}
<View className="ot-head">
<Text className="ot-no">02</Text>
<Text className="ot-title">你的 OPC 画像</Text>
<Text className="ot-en">Report</Text>
</View>
{/* 头部:类型码 + 人设 + 适配指数(复用统一标题区) */}
<PageHeader no="02" title="你的 OPC 画像" en="Report" back={backToWelcome} />
<View className="ot-result-hero">
<View className="ot-hero-left">
<Text className="ot-code">{r.typeCode}</Text>