fix
13404089107
2026-04-07 6dee8f6cf39f07d9d72c6bf17b11567ea7489120
fix
1个文件已修改
103 ■■■■■ 已修改文件
traditionalApp/pages/register/register.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
traditionalApp/pages/register/register.vue
@@ -121,6 +121,14 @@
                <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>
@@ -130,6 +138,7 @@
    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: '',
@@ -146,6 +155,10 @@
        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') => {
@@ -180,21 +193,17 @@
    };
    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 = () => {
@@ -308,10 +317,13 @@
            border-radius: 16rpx;
            font-size: 32rpx;
            & + .tab {
                margin-left: 30rpx;
            }
            &.active {
                background-color: #C63520;
                color: #fff;
                margin-right: 30rpx;
            }
            &.normal {
@@ -344,8 +356,13 @@
                .input {
                    flex: 1;
                    height: 100%;
                    font-size: 32rpx;
                    font-size: 28rpx;
                    color: #333;
                    &.placeholder-style {
                        color: #868686;
                        font-size: 28rpx;
                    }
                }
                .get-code-btn {
@@ -467,4 +484,58 @@
        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>