|
|
@@ -70,73 +70,56 @@
|
|
|
</uni-forms-item>
|
|
|
</uni-col>
|
|
|
|
|
|
- <uni-col :xs="24" :md="24">
|
|
|
- <uni-forms-item v-if="!isRouteHasId" name="linkValue" :label="t('newSignup.item14')">
|
|
|
- <uni-easyinput v-model.trim="formData.linkValue"
|
|
|
- :disabled="!isAgeValid || !formData.birthDate"
|
|
|
- :placeholder="t('newSignup.item15')"
|
|
|
- @input="limitAgentIdLength"></uni-easyinput>
|
|
|
- </uni-forms-item>
|
|
|
- </uni-col>
|
|
|
-
|
|
|
+ <uni-col :xs="24" :md="24">
|
|
|
+ <uni-forms-item v-if="!isRouteHasId" name="linkValue" :label="t('newSignup.item14')">
|
|
|
+ <uni-easyinput v-model.trim="formData.linkValue"
|
|
|
+ :disabled="!isAgeValid || !formData.birthDate"
|
|
|
+ :placeholder="t('newSignup.item15')"
|
|
|
+ @input="limitAgentIdLength"></uni-easyinput>
|
|
|
+ </uni-forms-item>
|
|
|
+ </uni-col>
|
|
|
+
|
|
|
+
|
|
|
+ </uni-row>
|
|
|
+ <uni-forms-item name="agree">
|
|
|
+ <view class="check-box" @click="toggleAgree">
|
|
|
+ <up-checkbox-group v-model="agreeGroup" @change="onAgreeChange">
|
|
|
+ <up-checkbox size="14" labelSize="14" labelColor="#666666" activeColor="#ea002a"
|
|
|
+ name="agree"
|
|
|
+ class="wcg-checkbox"></up-checkbox>
|
|
|
+ </up-checkbox-group>
|
|
|
+ <text class="checkbox-label">{{ t('signup.agree') }}</text>
|
|
|
+ </view>
|
|
|
+ </uni-forms-item>
|
|
|
+ <uni-forms-item name="isSubscribeEmail">
|
|
|
+ <view class="check-box" @click="toggleSubscribeEmail">
|
|
|
+ <up-checkbox-group v-model="subscribeEmailGroup" @change="onSubscribeEmailChange">
|
|
|
+ <up-checkbox size="14" labelSize="14" labelColor="#666666" activeColor="#ea002a"
|
|
|
+ name="subscribeEmail"
|
|
|
+ class="wcg-checkbox"></up-checkbox>
|
|
|
+ </up-checkbox-group>
|
|
|
+ <text class="checkbox-label">{{ t('signup.agree1') }}</text>
|
|
|
+ </view>
|
|
|
+ </uni-forms-item>
|
|
|
+ </uni-forms>
|
|
|
+ <view>
|
|
|
+ <u-button class="regiset-btn" @click="register">
|
|
|
+ {{ t('signup.button') }}
|
|
|
+ </u-button>
|
|
|
+ </view>
|
|
|
+ <view class="des-bottom">
|
|
|
+ <text v-t="'signup.agreemnet1'"></text>
|
|
|
+ <a @click="openUrl('pdf/Client_Agreement.pdf')" target="_blank" v-t="'signup.agreemnet2'"></a>
|
|
|
+ <text v-t="'signup.agreemnet3'"></text>
|
|
|
+ <a @click="openUrl('pdf/Terms&Conditions.pdf')" target="_blank" v-t="'signup.agreemnet4'"></a>
|
|
|
+ <text v-t="'signup.agreemnet5'"></text>
|
|
|
+ <a @click="openUrl('pdf/Privacy_Policy.pdf')" target="_blank" v-t="'signup.agreemnet6'"></a>
|
|
|
+ <text v-t="'signup.agreemnet7'"></text>
|
|
|
+ </view>
|
|
|
+ </uni-col>
|
|
|
|
|
|
- </uni-row>
|
|
|
- <uni-forms-item name="agree">
|
|
|
- <view class="check-box" @click="toggleAgree">
|
|
|
- <up-checkbox-group v-model="agreeGroup" @change="onAgreeChange">
|
|
|
- <up-checkbox size="14" labelSize="14" labelColor="#666666" activeColor="#ea002a"
|
|
|
- name="agree"
|
|
|
- class="wcg-checkbox"></up-checkbox>
|
|
|
- </up-checkbox-group>
|
|
|
- <text class="checkbox-label">{{ t('signup.agree') }}</text>
|
|
|
- </view>
|
|
|
- </uni-forms-item>
|
|
|
- <uni-forms-item name="isSubscribeEmail">
|
|
|
- <view class="check-box" @click="toggleSubscribeEmail">
|
|
|
- <up-checkbox-group v-model="subscribeEmailGroup" @change="onSubscribeEmailChange">
|
|
|
- <up-checkbox size="14" labelSize="14" labelColor="#666666" activeColor="#ea002a"
|
|
|
- name="subscribeEmail"
|
|
|
- class="wcg-checkbox"></up-checkbox>
|
|
|
- </up-checkbox-group>
|
|
|
- <text class="checkbox-label">{{ t('signup.agree1') }}</text>
|
|
|
- </view>
|
|
|
- </uni-forms-item>
|
|
|
- </uni-forms>
|
|
|
- <view>
|
|
|
- <u-button class="regiset-btn" @click="register">
|
|
|
- {{ t('signup.button') }}
|
|
|
- </u-button>
|
|
|
- </view>
|
|
|
- <view class="des-bottom">
|
|
|
- <text v-t="'signup.agreemnet1'"></text>
|
|
|
- <a @click="openUrl('pdf/Client_Agreement.pdf')" target="_blank" v-t="'signup.agreemnet2'"></a>
|
|
|
- <text v-t="'signup.agreemnet3'"></text>
|
|
|
- <a @click="openUrl('pdf/Terms&Conditions.pdf')" target="_blank" v-t="'signup.agreemnet4'"></a>
|
|
|
- <text v-t="'signup.agreemnet5'"></text>
|
|
|
- <a @click="openUrl('pdf/Privacy_Policy.pdf')" target="_blank" v-t="'signup.agreemnet6'"></a>
|
|
|
- <text v-t="'signup.agreemnet7'"></text>
|
|
|
- </view>
|
|
|
- <!-- <view class="or-title">-->
|
|
|
- <!-- <view class="line"></view>-->
|
|
|
- <!-- <view class="qr-tit2">OR</view>-->
|
|
|
- <!-- <view class="line"></view>-->
|
|
|
- <!-- </view>-->
|
|
|
- <!-- <uni-row :gutter="20">-->
|
|
|
- <!-- <uni-col :xs="24" :md="12">-->
|
|
|
- <!-- <u-button class="login-btn">-->
|
|
|
- <!-- {{ t('signup.button') }}-->
|
|
|
- <!-- </u-button>-->
|
|
|
- <!-- </uni-col>-->
|
|
|
- <!-- <uni-col :xs="24" :md="12">-->
|
|
|
- <!-- <u-button class="login-btn">-->
|
|
|
- <!-- {{ t('signup.button') }}-->
|
|
|
- <!-- </u-button>-->
|
|
|
- <!-- </uni-col>-->
|
|
|
- <!-- </uni-row>-->
|
|
|
- </uni-col>
|
|
|
-
|
|
|
- </uni-row>
|
|
|
- </view>
|
|
|
+ </uni-row>
|
|
|
+ </view>
|
|
|
|
|
|
<!-- <cwg-custom-footer />-->
|
|
|
</cwg-page-wrapper>
|
|
|
@@ -146,7 +129,7 @@
|
|
|
import { useI18n } from 'vue-i18n'
|
|
|
import { useEmailCountdown } from '@/hooks/useEmailCountdown'
|
|
|
import { loginApi } from '@/api/login'
|
|
|
- import { systemApi } from '@/api/system'
|
|
|
+ import { countryApi } from '@/api/country'
|
|
|
import Config from '@/config/index'
|
|
|
import { showToast } from '@/utils/toast'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
@@ -154,8 +137,10 @@
|
|
|
import { userToken } from '@/composables/config'
|
|
|
import { userApi } from '@/api/user'
|
|
|
import { openLocalPdf } from '@/utils/pdf.js'
|
|
|
+ import ImportModel from './components/ImportModel.vue'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
+ const { Code } = Config
|
|
|
const userStore = useUserStore()
|
|
|
|
|
|
const {
|
|
|
@@ -165,6 +150,7 @@
|
|
|
start,
|
|
|
restore,
|
|
|
} = useEmailCountdown()
|
|
|
+ const status = ref(false)
|
|
|
|
|
|
const isRouteHasId = ref(false)
|
|
|
const formData = ref({
|
|
|
@@ -337,13 +323,12 @@
|
|
|
}
|
|
|
})
|
|
|
const ho = ref('')
|
|
|
- // 账号类型
|
|
|
- const accountType = ref(1)
|
|
|
+
|
|
|
|
|
|
const form = ref(null)
|
|
|
const value = ref('')
|
|
|
const mock_options = ref([])
|
|
|
- const countryCode = ref('')
|
|
|
+ const countryCode = ref('my')
|
|
|
const countryOptions = computed(() => {
|
|
|
return mock_options.value.map(item => ({
|
|
|
text: item.name,
|
|
|
@@ -352,16 +337,12 @@
|
|
|
}))
|
|
|
})
|
|
|
|
|
|
- watch(value, (newValue, oldValue) => {
|
|
|
- // console.log('v-model', newValue);
|
|
|
- })
|
|
|
-
|
|
|
+ // 国家列表
|
|
|
async function getCountry() {
|
|
|
try {
|
|
|
- let res = await systemApi.countryGet({})
|
|
|
+ let res = await countryApi.Country({})
|
|
|
if (res.code == 200) { // Code.StatusOK
|
|
|
mock_options.value = res.data
|
|
|
- countryCode.value = res.msg
|
|
|
} else {
|
|
|
showToast(res.msg)
|
|
|
}
|
|
|
@@ -370,6 +351,16 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //获取当前国家编码
|
|
|
+ const getCountryMsg = async () => {
|
|
|
+ let res = await countryApi.CountryGet({})
|
|
|
+ if (res.code == Code.StatusOK) {
|
|
|
+ countryCode.value = res.msg
|
|
|
+ } else {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 获取验证码按钮点击
|
|
|
async function handleGetCode() {
|
|
|
if (!formData.value.birthDate) {
|
|
|
@@ -414,16 +405,17 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const handleModelConfirm = () => {
|
|
|
+ // 弹窗确认后的处理
|
|
|
+ status.value = false
|
|
|
+ }
|
|
|
|
|
|
const register = async () => {
|
|
|
if (countryCode.value == 'MY' || countryCode.value == 'ID') {
|
|
|
status.value = true
|
|
|
return
|
|
|
}
|
|
|
- console.log(123333)
|
|
|
form.value.validate().then(async (res) => {
|
|
|
-
|
|
|
-
|
|
|
// 中国(含港澳台)使用 X-System: B,非中国使用 X-System: A
|
|
|
const chinaCountryCodes = ['CN']
|
|
|
const isChina = chinaCountryCodes.includes(formData.value.country)
|
|
|
@@ -434,12 +426,10 @@
|
|
|
{ ...formData.value },
|
|
|
{ headers: { 'X-System': xSystemValue } },
|
|
|
)
|
|
|
- console.log(resData)
|
|
|
if (resData.code == 200) { // Code.StatusOK
|
|
|
showToast(t('Msg.registerSuc'))
|
|
|
login()
|
|
|
} else {
|
|
|
- console.log(123)
|
|
|
showToast(resData.msg)
|
|
|
}
|
|
|
|
|
|
@@ -490,47 +480,49 @@
|
|
|
|
|
|
onMounted(() => {
|
|
|
getCountry()
|
|
|
+ getCountryMsg()
|
|
|
+
|
|
|
const hostParts = window.location.host.split('.')
|
|
|
ho.value = hostParts.length > 1 ? hostParts[1] : ''
|
|
|
-
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
-<style lang="scss"> .pwd {
|
|
|
- list-style: none;
|
|
|
- padding-left: 0;
|
|
|
- margin: 0;
|
|
|
-
|
|
|
- li {
|
|
|
- font-size: px2rpx(12);
|
|
|
- color: #999;
|
|
|
- line-height: px2rpx(20);
|
|
|
- position: relative;
|
|
|
- padding-left: px2rpx(16);
|
|
|
-
|
|
|
- &::before {
|
|
|
- content: '';
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 50%;
|
|
|
- transform: translateY(-50%);
|
|
|
- width: px2rpx(6);
|
|
|
- height: px2rpx(6);
|
|
|
- border-radius: 50%;
|
|
|
- background-color: #999;
|
|
|
- }
|
|
|
+<style lang="scss">
|
|
|
+ .pwd {
|
|
|
+ list-style: none;
|
|
|
+ padding-left: 0;
|
|
|
+ margin: 0;
|
|
|
|
|
|
- &.fit {
|
|
|
- color: #67c23a;
|
|
|
+ li {
|
|
|
+ font-size: px2rpx(12);
|
|
|
+ color: #999;
|
|
|
+ line-height: px2rpx(20);
|
|
|
+ position: relative;
|
|
|
+ padding-left: px2rpx(16);
|
|
|
|
|
|
&::before {
|
|
|
- background-color: #67c23a;
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ width: px2rpx(6);
|
|
|
+ height: px2rpx(6);
|
|
|
+ border-radius: 50%;
|
|
|
+ background-color: #999;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.fit {
|
|
|
+ color: #67c23a;
|
|
|
+
|
|
|
+ &::before {
|
|
|
+ background-color: #67c23a;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
</style>
|
|
|
<style lang="scss" scoped>
|
|
|
@import "@/uni.scss";
|
|
|
@@ -545,6 +537,17 @@
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
+ .content-wrapper {
|
|
|
+ max-width: px2rpx(1224);
|
|
|
+ width: 100%;
|
|
|
+ margin: 0 auto;
|
|
|
+ padding-top: px2rpx(20);
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ min-height: calc(100vh - 56px);
|
|
|
+ }
|
|
|
.regist-content {
|
|
|
display: flex;
|
|
|
align-items: center;
|