用户协议默认不勾选
This commit is contained in:
@@ -5,6 +5,8 @@ export default defineAppConfig({
|
||||
'pages/settlement/index',
|
||||
'pages/tickets/index',
|
||||
'pages/login/index',
|
||||
'pages/user-agreement/index',
|
||||
'pages/privacy-policy/index',
|
||||
'pages/stores/detail',
|
||||
'pages/orders/index',
|
||||
'pages/orders/detail',
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function LoginPage() {
|
||||
const [phone, setPhone] = useState(remembered.phone || DEMO_PHONE);
|
||||
const [code, setCode] = useState('123456');
|
||||
const [rememberAccount, setRememberAccount] = useState(remembered.remember);
|
||||
const [agreed, setAgreed] = useState(true);
|
||||
const [agreed, setAgreed] = useState(false);
|
||||
const [cooldown, setCooldown] = useState(0);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [wxLoading, setWxLoading] = useState(false);
|
||||
@@ -234,9 +234,25 @@ export default function LoginPage() {
|
||||
<View className={`login-checkbox${agreed ? ' is-checked' : ''}`} />
|
||||
<Text className="login-agreement-text">
|
||||
我已阅读并同意
|
||||
<Text className="login-agreement-link">《用户协议》</Text>
|
||||
<Text
|
||||
className="login-agreement-link"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
Taro.navigateTo({ url: '/pages/user-agreement/index' });
|
||||
}}
|
||||
>
|
||||
《用户协议》
|
||||
</Text>
|
||||
与
|
||||
<Text className="login-agreement-link">《隐私政策》</Text>
|
||||
<Text
|
||||
className="login-agreement-link"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
Taro.navigateTo({ url: '/pages/privacy-policy/index' });
|
||||
}}
|
||||
>
|
||||
《隐私政策》
|
||||
</Text>
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '隐私政策',
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { View, Text, ScrollView } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
import { getLegalDocument } from '@dukang/shared-types';
|
||||
import '../user-agreement/legal.css';
|
||||
|
||||
export default function PrivacyPolicyPage() {
|
||||
const doc = getLegalDocument('privacy-policy');
|
||||
return (
|
||||
<View className="hq-legal-page">
|
||||
<View className="hq-legal-header">
|
||||
<Text className="hq-legal-back" onClick={() => Taro.navigateBack()}>
|
||||
‹
|
||||
</Text>
|
||||
<Text className="hq-legal-title">{doc.title}</Text>
|
||||
</View>
|
||||
<ScrollView scrollY className="hq-legal-body">
|
||||
<Text className="hq-legal-updated">更新日期:{doc.updatedAt}</Text>
|
||||
<Text className="hq-legal-intro">{doc.intro}</Text>
|
||||
{doc.sections.map((section) => (
|
||||
<View key={section.heading} className="hq-legal-section">
|
||||
<Text className="hq-legal-heading">{section.heading}</Text>
|
||||
{section.paragraphs.map((p, i) => (
|
||||
<Text key={`${section.heading}-${i}`} className="hq-legal-paragraph">
|
||||
{p}
|
||||
</Text>
|
||||
))}
|
||||
</View>
|
||||
))}
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '用户协议',
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { View, Text, ScrollView } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
import { getLegalDocument } from '@dukang/shared-types';
|
||||
import './legal.css';
|
||||
|
||||
export default function UserAgreementPage() {
|
||||
const doc = getLegalDocument('user-agreement');
|
||||
return (
|
||||
<View className="hq-legal-page">
|
||||
<View className="hq-legal-header">
|
||||
<Text className="hq-legal-back" onClick={() => Taro.navigateBack()}>
|
||||
‹
|
||||
</Text>
|
||||
<Text className="hq-legal-title">{doc.title}</Text>
|
||||
</View>
|
||||
<ScrollView scrollY className="hq-legal-body">
|
||||
<Text className="hq-legal-updated">更新日期:{doc.updatedAt}</Text>
|
||||
<Text className="hq-legal-intro">{doc.intro}</Text>
|
||||
{doc.sections.map((section) => (
|
||||
<View key={section.heading} className="hq-legal-section">
|
||||
<Text className="hq-legal-heading">{section.heading}</Text>
|
||||
{section.paragraphs.map((p, i) => (
|
||||
<Text key={`${section.heading}-${i}`} className="hq-legal-paragraph">
|
||||
{p}
|
||||
</Text>
|
||||
))}
|
||||
</View>
|
||||
))}
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
.hq-legal-page {
|
||||
min-height: 100vh;
|
||||
background: #faf9f7;
|
||||
}
|
||||
|
||||
.hq-legal-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
height: 52px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #faf9f7;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.hq-legal-back {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
font-size: 28px;
|
||||
line-height: 1;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.hq-legal-title {
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.hq-legal-body {
|
||||
height: calc(100vh - 52px);
|
||||
padding: 16px 20px 40px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.hq-legal-updated {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: #8d706e;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.hq-legal-intro {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 1.7;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.hq-legal-section {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.hq-legal-heading {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.hq-legal-paragraph {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
color: #5c504c;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
Reference in New Issue
Block a user