| | |
| | | <text class="link" @tap="goProtocol('privacy')">《隐私协议》</text> |
| | | </text> |
| | | </view> |
| | | |
| | | <u-picker |
| | | v-model="showRegionPicker" |
| | | mode="region" |
| | | title="选择机构地址" |
| | | :default-region="defaultRegion" |
| | | @confirm="handleRegionConfirm" |
| | | ></u-picker> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | const registerType = ref<'user' | 'operator'>('user'); |
| | | const currentStep = ref(1); // 1: step 1, 2: step 2 (only for operator) |
| | | const isAgreed = ref(false); |
| | | const showRegionPicker = ref(false); |
| | | |
| | | const form = reactive({ |
| | | phone: '', |
| | |
| | | if (registerType.value === 'user') return '提交确定'; |
| | | if (registerType.value === 'operator' && currentStep.value === 1) return '下一步'; |
| | | return '提交确定'; |
| | | }); |
| | | |
| | | const defaultRegion = computed(() => { |
| | | return form.region ? form.region.split(' ') : []; |
| | | }); |
| | | |
| | | const switchTab = (type : 'user' | 'operator') => { |
| | |
| | | }; |
| | | |
| | | const goProtocol = (type: string) => { |
| | | uni.navigateTo({ |
| | | url: `/pages/protocol/protocol?type=${type}` |
| | | }); |
| | | }; |
| | | uni.navigateTo({ |
| | | url: `/pages/protocol/protocol?type=${type}` |
| | | }); |
| | | }; |
| | | |
| | | const chooseRegion = () => { |
| | | // Example region picker implementation. You might need to use a specific uni-app picker component |
| | | uni.showToast({ |
| | | title: '打开地区选择器', |
| | | icon: 'none' |
| | | }); |
| | | // Mock selecting region |
| | | setTimeout(() => { |
| | | form.region = '四川省 成都市 锦江区'; |
| | | }, 500); |
| | | showRegionPicker.value = true; |
| | | }; |
| | | |
| | | const handleRegionConfirm = (value: { province?: { label?: string }; city?: { label?: string }; area?: { label?: string } }) => { |
| | | form.region = [value.province?.label, value.city?.label, value.area?.label].filter(Boolean).join(' '); |
| | | }; |
| | | |
| | | const uploadLicense = () => { |
| | |
| | | border-radius: 16rpx; |
| | | font-size: 32rpx; |
| | | |
| | | & + .tab { |
| | | margin-left: 30rpx; |
| | | } |
| | | |
| | | &.active { |
| | | background-color: #C63520; |
| | | color: #fff; |
| | | margin-right: 30rpx; |
| | | } |
| | | |
| | | &.normal { |
| | |
| | | .input { |
| | | flex: 1; |
| | | height: 100%; |
| | | font-size: 32rpx; |
| | | font-size: 28rpx; |
| | | color: #333; |
| | | |
| | | &.placeholder-style { |
| | | color: #868686; |
| | | font-size: 28rpx; |
| | | } |
| | | } |
| | | |
| | | .get-code-btn { |
| | |
| | | height: 25rpx; |
| | | display: block; |
| | | } |
| | | </style> |
| | | |
| | | :deep(.u-popup__content) { |
| | | background: #ffffff !important; |
| | | } |
| | | |
| | | :deep(.u-datetime-picker) { |
| | | background: #ffffff !important; |
| | | border-radius: 32rpx 32rpx 0 0; |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | :deep(.u-picker-header), |
| | | :deep(.u-picker-body) { |
| | | background: #ffffff !important; |
| | | } |
| | | |
| | | :deep(.u-picker-header) { |
| | | display: contents; |
| | | } |
| | | |
| | | :deep(.u-picker__title) { |
| | | order: 1; |
| | | text-align: center; |
| | | font-weight: 700; |
| | | font-size: 34rpx; |
| | | color: #333333; |
| | | padding-top: 24rpx; |
| | | } |
| | | |
| | | :deep(.u-btn-picker--tips) { |
| | | display: none; |
| | | } |
| | | |
| | | :deep(.u-btn-picker--primary) { |
| | | order: 3; |
| | | height: 96rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background: #C63520; |
| | | border-radius: 16rpx; |
| | | color: #ffffff !important; |
| | | font-size: 34rpx; |
| | | font-weight: 500; |
| | | padding: 0; |
| | | margin: 24rpx 40rpx 40rpx; |
| | | } |
| | | |
| | | :deep(.u-picker-body) { |
| | | order: 2; |
| | | height: 420rpx; |
| | | } |
| | | </style> |