feat:聊天后台撤回消息
fix:聊天禁用bug
This commit is contained in:
1 parent
107946c964
commit
4f3b7ba3b4
3 files changed
+72
-84
No files matched your search
@@ -13,8 +13,8 @@ SHOPRO_VERSION=v2.4.1
|
||||
SHOPRO_API_PATH=/app-api
|
||||
|
||||
# 后端接口 - 测试环境(通过 process.env.NODE_ENV == development)
|
||||
SHOPRO_DEV_BASE_URL = https://api.htysapp.com
|
||||
# SHOPRO_DEV_BASE_URL=https://baac9a029ea84f36ba28c023fed4fc5f.hd.takin.cc
|
||||
# SHOPRO_DEV_BASE_URL = https://api.htysapp.com
|
||||
SHOPRO_DEV_BASE_URL=https://324e01b5211c41c7a8fc9f7854195f30.hn.takin.cc
|
||||
# SHOPRO_DEV_BASE_URL=http://localhost:48083
|
||||
|
||||
# 后端接口 - 正式环境(通过 process.env.NODE_ENV != development)
|
||||
|
||||
+5
-2
@@ -2,10 +2,13 @@
|
||||
"name" : "荷塘月色",
|
||||
"appid" : "__UNI__0A84F60",
|
||||
"description" : "聊天交友app",
|
||||
"versionName" : "1.1.2",
|
||||
"versionCode" : 112,
|
||||
"versionName" : "1.1.3",
|
||||
"versionCode" : 113,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
<template>
|
||||
<page-meta :page-style="$statusBarPageStyle" />
|
||||
<wd-config-provider theme="dark">
|
||||
<wd-navbar
|
||||
title="精英男士认证"
|
||||
safeAreaInsetTop
|
||||
fixed
|
||||
placeholder
|
||||
:bordered="false"
|
||||
style="z-index: 999"
|
||||
>
|
||||
<wd-navbar title="精英男士认证" safeAreaInsetTop fixed placeholder :bordered="false" style="z-index: 999">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#D29E52" />
|
||||
@@ -21,24 +14,16 @@
|
||||
<view class="text-sm my-2 mx-8 c-#949494">上传本人头像,女生更放心与你见面~</view>
|
||||
<view class="h-60rpx"></view>
|
||||
<view class="flex-col-center">
|
||||
<s-uploader
|
||||
v-model:url="userinfo.avatar"
|
||||
fileMediatype="image"
|
||||
limit="1"
|
||||
mode="grid"
|
||||
:imageStyles="{
|
||||
width: '268rpx',
|
||||
height: '268rpx',
|
||||
border: { width: '6rpx', color: '#D29E52', radius: '50rpx' },
|
||||
}"
|
||||
/>
|
||||
<s-uploader v-model:url="userinfo.avatar" fileMediatype="image" limit="1" mode="grid" :imageStyles="{
|
||||
width: '268rpx',
|
||||
height: '268rpx',
|
||||
border: { width: '6rpx', color: '#D29E52', radius: '50rpx' },
|
||||
}" />
|
||||
<image class="w-260rpx" src="@/static/face-auth-prompt.png" mode="aspectFit" />
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="mx-auto w-200rpx rounded-full p-3 text-center bg-color-theme-dark active:bg-color-theme"
|
||||
@click="createFaceVerify"
|
||||
>
|
||||
<view class="mx-auto w-200rpx rounded-full p-3 text-center bg-color-theme-dark active:bg-color-theme"
|
||||
@click="createFaceVerify">
|
||||
开始认证
|
||||
</view>
|
||||
|
||||
@@ -50,68 +35,68 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
// @ts-ignore
|
||||
import UserApi from '@/sheep/api/member/user';
|
||||
import { reactive } from 'vue';
|
||||
import verify from './ali-face-verify';
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
// @ts-ignore
|
||||
import UserApi from '@/sheep/api/member/user';
|
||||
import { reactive } from 'vue';
|
||||
import verify from './ali-face-verify';
|
||||
|
||||
// 用户信息
|
||||
const userinfo = reactive<any>({
|
||||
avatar: '',
|
||||
nickname: '',
|
||||
birthday: '',
|
||||
height: '',
|
||||
weight: '',
|
||||
occ: '',
|
||||
description: '',
|
||||
photo: [],
|
||||
// 用户信息
|
||||
const userinfo = reactive<any>({
|
||||
avatar: '',
|
||||
nickname: '',
|
||||
birthday: '',
|
||||
height: '',
|
||||
weight: '',
|
||||
occ: '',
|
||||
description: '',
|
||||
photo: [],
|
||||
});
|
||||
|
||||
onLoad(async () => {
|
||||
uni.showLoading({ title: '加载中...' });
|
||||
const { data } = await UserApi.getUserInfo();
|
||||
Object.assign(userinfo, {
|
||||
avatar: data.avatar,
|
||||
birthday: data.birthday ?? '',
|
||||
description: data.description,
|
||||
height: data.height ?? '',
|
||||
weight: data.weight ?? '',
|
||||
mobile: data.mobile,
|
||||
nickname: data.nickname,
|
||||
occ: data.occ ?? '',
|
||||
sex: data.sex,
|
||||
});
|
||||
uni.hideLoading();
|
||||
});
|
||||
|
||||
onLoad(async () => {
|
||||
uni.showLoading({ title: '加载中...' });
|
||||
const { data } = await UserApi.getUserInfo();
|
||||
Object.assign(userinfo, {
|
||||
avatar: data.avatar,
|
||||
birthday: data.birthday ?? '',
|
||||
description: data.description,
|
||||
height: data.height ?? '',
|
||||
weight: data.weight ?? '',
|
||||
mobile: data.mobile,
|
||||
nickname: data.nickname,
|
||||
occ: data.occ ?? '',
|
||||
sex: data.sex,
|
||||
});
|
||||
uni.hideLoading();
|
||||
// 创建人脸认证
|
||||
const createFaceVerify = async () => {
|
||||
// #ifndef APP-PLUS
|
||||
return uni.showToast({ title: '人脸认证仅支持 App', icon: 'none' });
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
if (!userinfo.avatar) return uni.showToast({ title: '请先上传人脸照片', icon: 'error' });
|
||||
|
||||
const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
|
||||
const metaInfo = JSON.stringify(aliyunVerify.getMetaInfo());
|
||||
|
||||
// 创建男生人脸认证
|
||||
const { code, data } = await RecentApi.createBoyFaceVerify({
|
||||
authPic: userinfo.avatar,
|
||||
metaInfoJson: metaInfo,
|
||||
});
|
||||
console.log('男 创建人脸认证接口responseData:', code, data);
|
||||
|
||||
// 创建人脸认证
|
||||
const createFaceVerify = async () => {
|
||||
// #ifndef APP-PLUS
|
||||
return uni.showToast({ title: '人脸认证仅支持 App', icon: 'none' });
|
||||
// #endif
|
||||
if (code !== 0)
|
||||
return uni.showToast({ title: '请上传包含人脸的头像', icon: 'none', duration: 6000 });
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
if (!userinfo.avatar) return uni.showToast({ title: '请先上传人脸照片', icon: 'error' });
|
||||
const { code: userResCode } = await UserApi.updateUser(userinfo);
|
||||
if (userResCode !== 0) return;
|
||||
|
||||
const aliyunVerify = uni.requireNativePlugin('AP-FaceDetectModule');
|
||||
const metaInfo = JSON.stringify(aliyunVerify.getMetaInfo());
|
||||
|
||||
// 创建男生人脸认证
|
||||
const { code, data } = await RecentApi.createBoyFaceVerify({
|
||||
authPic: userinfo.avatar,
|
||||
metaInfoJson: metaInfo,
|
||||
});
|
||||
console.log('男 创建人脸认证接口responseData:', code, data);
|
||||
|
||||
if (code !== 0)
|
||||
return uni.showToast({ title: '请上传包含人脸的头像', icon: 'none', duration: 6000 });
|
||||
|
||||
const { code: userResCode } = await UserApi.updateUser(userinfo);
|
||||
if (userResCode !== 0) return;
|
||||
|
||||
verify(data.bizId, data.id);
|
||||
// #endif
|
||||
};
|
||||
verify(data.bizId, data.id);
|
||||
// #endif
|
||||
};
|
||||
</script>
|
||||
Reference in new issue
Block a user