feat
This commit is contained in:
1 parent
05f921349a
commit
1cad4d5b87
8 files changed
+89
-34
No files matched your search
@@ -233,6 +233,13 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "verify-status",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人脸认证",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "face-verify",
|
||||
"style": {
|
||||
|
||||
@@ -9,13 +9,18 @@
|
||||
<swiper
|
||||
class="h-300rpx mt-2"
|
||||
indicator-dots
|
||||
indicator-color="#fff"
|
||||
indicator-active-color="#D29E52"
|
||||
indicator-color="#777"
|
||||
indicator-active-color="#F9C26F"
|
||||
autoplay
|
||||
circular
|
||||
>
|
||||
<swiper-item v-for="(item, index) in bannerList" :key="index" class="text-center">
|
||||
<image class="w-90% h-full rounded-20rpx" :src="item.picUrl" mode="aspectFill" />
|
||||
<image
|
||||
class="w-90% h-full rounded-20rpx"
|
||||
:src="item.picUrl"
|
||||
mode="aspectFill"
|
||||
@click="clickSwiperImage(item.url)"
|
||||
/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
@@ -69,6 +74,7 @@
|
||||
getBannerList();
|
||||
});
|
||||
|
||||
// 获取轮播图
|
||||
const getBannerList = async () => {
|
||||
const { code, data = null } = await RecentApi.getBannerList();
|
||||
if (code !== 0) return;
|
||||
@@ -84,6 +90,13 @@
|
||||
},
|
||||
);
|
||||
|
||||
// 点击轮播图
|
||||
const clickSwiperImage = (url: string) => {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
});
|
||||
};
|
||||
|
||||
// 查看用户详情
|
||||
const goDetail = (user: any) => {
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
userInfoStore.sex == 2 ? '魅力女生认证' : userInfoStore.sex == 1 ? '精英男士认证' : ''
|
||||
"
|
||||
safeAreaInsetTop
|
||||
fixed
|
||||
placeholder
|
||||
:bordered="false"
|
||||
style="z-index: 999"
|
||||
>
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
@@ -14,7 +17,7 @@
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
<view v-if="userInfoStore.sex == 2" class="py-6 h-[calc(100vh - 44rpx - 200rpx)]">
|
||||
<view v-if="userInfoStore.sex == 2" class="pt-20" style="height: calc(100vh - 44rpx - 200rpx)">
|
||||
<wd-steps :active="stepActive" align-center>
|
||||
<wd-step v-for="index in 4" :key="index" />
|
||||
</wd-steps>
|
||||
@@ -185,7 +188,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="userInfoStore.sex == 1" class="py-6 h-[calc(100vh - 44rpx - 200rpx)]">
|
||||
<view v-if="userInfoStore.sex == 1" class="py-6" style="height: calc(100vh - 44rpx - 200rpx)">
|
||||
<view class="text-xl my-2 mx-8 c-#FCFBFE">基本资料</view>
|
||||
<view class="text-sm my-2 mx-8 c-#949494">上传本人头像,女生更放心与你见面~</view>
|
||||
<view class="h-60rpx"></view>
|
||||
@@ -262,30 +265,7 @@
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
};
|
||||
|
||||
// 查询用户人脸认证状态
|
||||
const getFaceVerify = async () => {
|
||||
const { code, data } = await RecentApi.getFaceVerify();
|
||||
|
||||
console.log('查询用户人脸认证状态', code, data);
|
||||
|
||||
if (code !== 0) return uni.showToast({ title: '查询用户人脸认证失败', icon: 'none' });
|
||||
switch (data?.authStatus) {
|
||||
case '1':
|
||||
// 待认证
|
||||
break;
|
||||
case '2':
|
||||
return uni.showToast({ title: '你的人脸审核中', icon: 'error' });
|
||||
case '3':
|
||||
// 审核通过
|
||||
break;
|
||||
case '4':
|
||||
// 审核失败
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
onLoad(async () => {
|
||||
await getFaceVerify();
|
||||
const { data } = await UserApi.getUserInfo();
|
||||
Object.assign(userinfo, {
|
||||
avatar: data.avatar,
|
||||
@@ -359,7 +339,6 @@
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param certifyId 阿里人脸认证id
|
||||
* @param authId 发起认证的id
|
||||
*/
|
||||
@@ -392,6 +371,9 @@
|
||||
UserApi.updateUser(userinfo).then(() => {
|
||||
sheep.$store('user').getInfo();
|
||||
uni.showToast({ title: '您已认证成功', icon: 'none' });
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 300);
|
||||
});
|
||||
break;
|
||||
case 1001:
|
||||
@@ -428,7 +410,7 @@
|
||||
if (imageFileList.value.length > 2 && imageFileList.value.length < 6) {
|
||||
return true;
|
||||
} else {
|
||||
uni.showToast({ title: '请上传3~5张最美的图片', icon: 'none' });
|
||||
uni.showToast({ title: '请上传照片', icon: 'none' });
|
||||
return false;
|
||||
}
|
||||
case 2:
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
const MenuCellList = [
|
||||
{ title: '我的收益', value: '', icon: 'wallet', to: '/pages/wechat/index' },
|
||||
{ title: '访客记录√', value: '', icon: 'browse', to: '/pages/profile/view-record' },
|
||||
{ title: '认证中心', value: '', icon: 'user', to: '/pages/profile/face-verify' },
|
||||
{ title: '认证中心', value: '', icon: 'user', to: '/pages/profile/verify-status' },
|
||||
{ title: '我的动态√', value: '', icon: 'star', to: '/pages/profile/my-moment' },
|
||||
{ title: '我的评价√', value: '', icon: 'view-module', to: '', onClick: lookMyEvaluation },
|
||||
{ title: '问题反馈√', value: '', icon: 'backtop-rectangle', to: '', onClick: goFeedback },
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<wd-config-provider theme="dark">
|
||||
<wd-navbar title="人脸认证" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#D29E52" />
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
<view class="bg-color-light size-300rpx mx-auto flex-row-center rounded-full mt-10">
|
||||
<image
|
||||
v-if="authData?.authStatus == '3'"
|
||||
class="size-150rpx"
|
||||
src="@/static/has-auth.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<image v-else class="size-150rpx" src="@/static/no-auth.png" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="text-center mt-4 text-base text-color-theme">
|
||||
<view v-if="authData?.authStatus == '2'">认证审核中</view>
|
||||
<view v-else-if="authData?.authStatus == '3'">审核通过</view>
|
||||
<view v-else-if="authData?.authStatus == '4'">审核失败</view>
|
||||
<view v-else>待认证</view>
|
||||
</view>
|
||||
|
||||
<navigator url="/pages/profile/face-verify" open-type="navigate" hover-class="navigator-hover">
|
||||
<view class="flex-row-center mt-40">
|
||||
<wd-button size="large" :disabled="authData?.authStatus == '2'">开始认证</wd-button>
|
||||
</view>
|
||||
</navigator>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const authData = ref<any>({});
|
||||
|
||||
onShow(async () => {
|
||||
await getFaceVerify();
|
||||
});
|
||||
|
||||
// 查询用户人脸认证状态
|
||||
const getFaceVerify = async () => {
|
||||
const { code, data } = await RecentApi.getFaceVerify();
|
||||
|
||||
console.log('查询用户人脸认证状态', code, data);
|
||||
|
||||
if (code !== 0) return uni.showToast({ title: '查询用户人脸认证失败', icon: 'none' });
|
||||
authData.value = data;
|
||||
};
|
||||
</script>
|
||||
@@ -10,7 +10,6 @@
|
||||
@refresherrefresh="onRefresherRefresh"
|
||||
@scrolltolower="onScrollToLower"
|
||||
@scroll="scroll"
|
||||
v-bind="attrs"
|
||||
>
|
||||
<slot />
|
||||
<uni-load-more
|
||||
@@ -23,9 +22,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, useAttrs } from 'vue';
|
||||
import { reactive, ref } from 'vue';
|
||||
|
||||
const attrs = useAttrs();
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
loadMoreStatus?: 'more' | 'loading' | 'noMore';
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Reference in new issue
Block a user