消息验证实名
This commit is contained in:
parent
88d6c7746e
commit
3deaf329cd
|
@ -0,0 +1,121 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
export {};
|
||||||
|
|
||||||
|
; declare global {
|
||||||
|
const __VLS_intrinsicElements: __VLS_IntrinsicElements;
|
||||||
|
const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any };
|
||||||
|
const __VLS_unref: typeof import('vue').unref;
|
||||||
|
const __VLS_placeholder: any;
|
||||||
|
|
||||||
|
type __VLS_NativeElements = __VLS_SpreadMerge<SVGElementTagNameMap, HTMLElementTagNameMap>;
|
||||||
|
type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
|
||||||
|
type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
|
||||||
|
type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
||||||
|
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
|
||||||
|
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
||||||
|
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
||||||
|
type __VLS_SpreadMerge<A, B> = Omit<A, keyof B> & B;
|
||||||
|
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string, N3 extends string> =
|
||||||
|
N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
|
||||||
|
N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
|
||||||
|
N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N3] } :
|
||||||
|
Self extends object ? { [K in N0]: Self } :
|
||||||
|
N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } :
|
||||||
|
N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } :
|
||||||
|
N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } :
|
||||||
|
{ [K in N0]: unknown };
|
||||||
|
type __VLS_FunctionalComponentProps<T, K> =
|
||||||
|
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
||||||
|
: T extends (props: infer P, ...args: any) => any ? P :
|
||||||
|
{};
|
||||||
|
type __VLS_IsFunction<T, K> = K extends keyof T
|
||||||
|
? __VLS_IsAny<T[K]> extends false
|
||||||
|
? unknown extends T[K]
|
||||||
|
? false
|
||||||
|
: true
|
||||||
|
: false
|
||||||
|
: false;
|
||||||
|
type __VLS_NormalizeComponentEvent<Props, Events, onEvent extends keyof Props, Event extends keyof Events, CamelizedEvent extends keyof Events> = (
|
||||||
|
__VLS_IsFunction<Props, onEvent> extends true
|
||||||
|
? Props
|
||||||
|
: __VLS_IsFunction<Events, Event> extends true
|
||||||
|
? { [K in onEvent]?: Events[Event] }
|
||||||
|
: __VLS_IsFunction<Events, CamelizedEvent> extends true
|
||||||
|
? { [K in onEvent]?: Events[CamelizedEvent] }
|
||||||
|
: Props
|
||||||
|
) & Record<string, unknown>;
|
||||||
|
// fix https://github.com/vuejs/language-tools/issues/926
|
||||||
|
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
|
||||||
|
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
|
||||||
|
? U extends T
|
||||||
|
? never
|
||||||
|
: __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
|
||||||
|
: never;
|
||||||
|
type __VLS_OverloadUnion<T> = Exclude<
|
||||||
|
__VLS_OverloadUnionInner<(() => never) & T>,
|
||||||
|
T extends () => never ? never : () => never
|
||||||
|
>;
|
||||||
|
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
|
||||||
|
? F extends (event: infer E, ...args: infer A) => any
|
||||||
|
? { [K in E & string]: (...args: A) => void; }
|
||||||
|
: never
|
||||||
|
: never;
|
||||||
|
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
|
||||||
|
__VLS_UnionToIntersection<
|
||||||
|
__VLS_ConstructorOverloads<T> & {
|
||||||
|
[K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
|
||||||
|
}
|
||||||
|
>
|
||||||
|
>;
|
||||||
|
type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
|
||||||
|
type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<
|
||||||
|
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
|
||||||
|
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
||||||
|
>>;
|
||||||
|
type __VLS_OmitStringIndex<T> = {
|
||||||
|
[K in keyof T as string extends K ? never : K]: T[K];
|
||||||
|
};
|
||||||
|
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
||||||
|
|
||||||
|
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
|
||||||
|
item: T extends number ? number
|
||||||
|
: T extends string ? string
|
||||||
|
: T extends any[] ? T[number]
|
||||||
|
: T extends Iterable<infer T1> ? T1
|
||||||
|
: any,
|
||||||
|
index: number,
|
||||||
|
][];
|
||||||
|
function __VLS_getVForSourceType<T>(source: T): [
|
||||||
|
item: T[keyof T],
|
||||||
|
key: keyof T,
|
||||||
|
index: number,
|
||||||
|
][];
|
||||||
|
// @ts-ignore
|
||||||
|
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
||||||
|
// @ts-ignore
|
||||||
|
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
||||||
|
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
|
||||||
|
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
|
||||||
|
: T extends (...args: any) => any
|
||||||
|
? T
|
||||||
|
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
||||||
|
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
||||||
|
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
||||||
|
T extends new (...args: any) => any
|
||||||
|
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
|
||||||
|
__ctx?: {
|
||||||
|
attrs?: any;
|
||||||
|
slots?: K extends { $slots: infer Slots } ? Slots : any;
|
||||||
|
emit?: K extends { $emit: infer Emit } ? Emit : any;
|
||||||
|
expose?(exposed: K): void;
|
||||||
|
props?: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
||||||
|
: T extends (...args: any) => any ? T
|
||||||
|
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
|
||||||
|
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
||||||
|
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
|
||||||
|
function __VLS_asFunctionalSlot<S>(slot: S): (props: NonNullable<S> extends (props: infer P) => any ? P : {}) => void;
|
||||||
|
function __VLS_tryAsConstant<const T>(t: T): T;
|
||||||
|
}
|
|
@ -6,9 +6,9 @@ const config = {
|
||||||
// host: 'h5api',
|
// host: 'h5api',
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
// host: 'http://91f.xyz:8080',
|
host: 'http://91f.xyz:8080',
|
||||||
// host: 'https://1a880cd5.r24.cpolar.top/',
|
// host: 'https://1a880cd5.r24.cpolar.top/',
|
||||||
host: 'http://aere2w.natappfree.cc',
|
// host: 'http://aere2w.natappfree.cc',
|
||||||
// #endif
|
// #endif
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<script setup>
|
||||||
|
/**
|
||||||
|
* 未实名认证组件
|
||||||
|
*/
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="nologin pr fmid fdc">
|
||||||
|
<view class="title f40 b">请先实名认证</view>
|
||||||
|
<navigator url="/pages/mine/realname" class="button btn pro bar black mt60">去实名认证</navigator>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
//
|
||||||
|
.nologin {
|
||||||
|
.button {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -7,18 +7,14 @@ export {};
|
||||||
const __VLS_unref: typeof import('vue').unref;
|
const __VLS_unref: typeof import('vue').unref;
|
||||||
const __VLS_placeholder: any;
|
const __VLS_placeholder: any;
|
||||||
|
|
||||||
const __VLS_nativeElements = {
|
type __VLS_NativeElements = __VLS_SpreadMerge<SVGElementTagNameMap, HTMLElementTagNameMap>;
|
||||||
...{} as SVGElementTagNameMap,
|
|
||||||
...{} as HTMLElementTagNameMap,
|
|
||||||
};
|
|
||||||
|
|
||||||
type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
|
type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
|
||||||
type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
|
type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
|
||||||
type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
||||||
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
|
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
|
||||||
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
||||||
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
||||||
type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
type __VLS_SpreadMerge<A, B> = Omit<A, keyof B> & B;
|
||||||
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string, N3 extends string> =
|
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string, N3 extends string> =
|
||||||
N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
|
N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
|
||||||
N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
|
N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
|
||||||
|
@ -81,19 +77,12 @@ export {};
|
||||||
};
|
};
|
||||||
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
||||||
|
|
||||||
function __VLS_getVForSourceType(source: number): [number, number][];
|
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
|
||||||
function __VLS_getVForSourceType(source: string): [string, number][];
|
item: T extends number ? number
|
||||||
function __VLS_getVForSourceType<T extends any[]>(source: T): [
|
: T extends string ? string
|
||||||
item: T[number],
|
: T extends any[] ? T[number]
|
||||||
index: number,
|
: T extends Iterable<infer T1> ? T1
|
||||||
][];
|
: any,
|
||||||
function __VLS_getVForSourceType<T extends { [Symbol.iterator](): Iterator<any> }>(source: T): [
|
|
||||||
item: T extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never,
|
|
||||||
index: number,
|
|
||||||
][];
|
|
||||||
// #3845
|
|
||||||
function __VLS_getVForSourceType<T extends number | { [Symbol.iterator](): Iterator<any> }>(source: T): [
|
|
||||||
item: number | (Exclude<T, number> extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never),
|
|
||||||
index: number,
|
index: number,
|
||||||
][];
|
][];
|
||||||
function __VLS_getVForSourceType<T>(source: T): [
|
function __VLS_getVForSourceType<T>(source: T): [
|
||||||
|
@ -109,21 +98,24 @@ export {};
|
||||||
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
|
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
|
||||||
: T extends (...args: any) => any
|
: T extends (...args: any) => any
|
||||||
? T
|
? T
|
||||||
: __VLS_unknownDirective;
|
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
||||||
function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
|
|
||||||
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
||||||
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
||||||
T extends new (...args: any) => any
|
T extends new (...args: any) => any
|
||||||
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & { __ctx?: {
|
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
|
||||||
attrs?: any,
|
__ctx?: {
|
||||||
slots?: K extends { $slots: infer Slots } ? Slots : any,
|
attrs?: any;
|
||||||
emit?: K extends { $emit: infer Emit } ? Emit : any
|
slots?: K extends { $slots: infer Slots } ? Slots : any;
|
||||||
} & { props?: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>; expose?(exposed: K): void; } }
|
emit?: K extends { $emit: infer Emit } ? Emit : any;
|
||||||
|
expose?(exposed: K): void;
|
||||||
|
props?: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>;
|
||||||
|
}
|
||||||
|
}
|
||||||
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
||||||
: T extends (...args: any) => any ? T
|
: T extends (...args: any) => any ? T
|
||||||
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
|
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
|
||||||
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (_: T & Record<string, unknown>) => void;
|
|
||||||
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
||||||
function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
|
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
|
||||||
|
function __VLS_asFunctionalSlot<S>(slot: S): (props: NonNullable<S> extends (props: infer P) => any ? P : {}) => void;
|
||||||
function __VLS_tryAsConstant<const T>(t: T): T;
|
function __VLS_tryAsConstant<const T>(t: T): T;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,22 +99,6 @@ function getLst() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 重载视频列表
|
|
||||||
function refreshVideoList() {
|
|
||||||
list.pageNum = 1
|
|
||||||
list.total = 0
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取更多视频列表
|
|
||||||
function getMoreVideoList() {
|
|
||||||
if (list.data.length >= list.total) return
|
|
||||||
list.pageNum++
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取我的评论
|
// 获取我的评论
|
||||||
function getList(id) {
|
function getList(id) {
|
||||||
api.mine.myComment({
|
api.mine.myComment({
|
||||||
|
|
|
@ -295,10 +295,8 @@ function emojiTap(val) {
|
||||||
|
|
||||||
// 点击工具栏
|
// 点击工具栏
|
||||||
function handleTool(val) {
|
function handleTool(val) {
|
||||||
if (toolStatus.value === val) {
|
if (toolStatus.value === val) toolStatus.value = 'input'
|
||||||
toolStatus.value = 'input'
|
else toolStatus.value = val
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取更多消息记录
|
// 获取更多消息记录
|
||||||
|
@ -412,9 +410,7 @@ function onFocus() {
|
||||||
// 输入语音
|
// 输入语音
|
||||||
function voiceSend(message) {
|
function voiceSend(message) {
|
||||||
console.log('handlePlusSend', message)
|
console.log('handlePlusSend', message)
|
||||||
sendMsg({
|
sendMsg(message)
|
||||||
message,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听滚动
|
// 监听滚动
|
||||||
|
|
|
@ -16,265 +16,274 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
defineEmits
|
defineEmits
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
// 腾讯云聊天
|
// 腾讯云聊天
|
||||||
import TencentCloudChat from '@tencentcloud/chat';
|
import TencentCloudChat from '@tencentcloud/chat';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
msg: {
|
msg: {
|
||||||
type: Object
|
type: Object
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['send'])
|
const emit = defineEmits(['send'])
|
||||||
//录音
|
//录音
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
const recorderManager = uni.getRecorderManager();
|
const recorderManager = uni.getRecorderManager();
|
||||||
// #endif
|
// #endif
|
||||||
// 录音时长
|
// 录音时长
|
||||||
const voiceLength = ref(0);
|
const voiceLength = ref(0);
|
||||||
// 录音定时器
|
// 录音定时器
|
||||||
const voiceTimer = ref(null);
|
const voiceTimer = ref(null);
|
||||||
// 录音文本
|
// 录音文本
|
||||||
const voiceText = ref('按住 说话');
|
const voiceText = ref('按住 说话');
|
||||||
// 录音提示
|
// 录音提示
|
||||||
const voiceTis = ref('手指上滑 取消发送');
|
const voiceTis = ref('手指上滑 取消发送');
|
||||||
// 录音图标显示
|
// 录音图标显示
|
||||||
const voiceFlg = ref(false);
|
const voiceFlg = ref(false);
|
||||||
// 录音开始Y坐标
|
// 录音开始Y坐标
|
||||||
const voicePageY = ref(0);
|
const voicePageY = ref(0);
|
||||||
// 录音结束
|
// 录音结束
|
||||||
const voiceStop = ref(false);
|
const voiceStop = ref(false);
|
||||||
const str = '';
|
const str = '';
|
||||||
// 录音相关
|
// 录音相关
|
||||||
const sv = {
|
const sv = {
|
||||||
// 按下触发
|
// 按下触发
|
||||||
touchstartVoice: (e) => {
|
touchstartVoice: (e) => {
|
||||||
voicePageY.value = (e.changedTouches[0].pageY).toFixed(2);
|
voicePageY.value = (e.changedTouches[0].pageY).toFixed(2);
|
||||||
recorderManager.start({
|
recorderManager.start({
|
||||||
duration: 60000, // 录音的时长,单位 ms,最大值 600000(10 分钟)
|
duration: 60000, // 录音的时长,单位 ms,最大值 600000(10 分钟)
|
||||||
sampleRate: 44100, // 采样率
|
sampleRate: 44100, // 采样率
|
||||||
numberOfChannels: 1, // 录音通道数
|
numberOfChannels: 1, // 录音通道数
|
||||||
encodeBitRate: 192000, // 编码码率
|
encodeBitRate: 192000, // 编码码率
|
||||||
format: "mp3"
|
format: "mp3"
|
||||||
});
|
});
|
||||||
voiceLength.value = 0;
|
voiceLength.value = 0;
|
||||||
voiceFlg.value = true
|
voiceFlg.value = true
|
||||||
console.log('recorder start success');
|
console.log('recorder start success');
|
||||||
//录音开始,
|
//录音开始,
|
||||||
voiceTimer.value = setInterval(() => {
|
voiceTimer.value = setInterval(() => {
|
||||||
voiceLength.value += 0.1;
|
voiceLength.value += 0.1;
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
console.log('touchstartVoice', voicePageY.value);
|
console.log('touchstartVoice', voicePageY.value);
|
||||||
},
|
},
|
||||||
// 滑动触发
|
// 滑动触发
|
||||||
touchmoveVoice: (e) => {
|
touchmoveVoice: (e) => {
|
||||||
// 没有展示UI不触发
|
// 没有展示UI不触发
|
||||||
if (!voiceFlg.value) {
|
if (!voiceFlg.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let numTemp = voicePageY.value - ((e.changedTouches[0].pageY).toFixed(2));
|
let numTemp = voicePageY.value - ((e.changedTouches[0].pageY).toFixed(2));
|
||||||
if (numTemp >= 60) {
|
if (numTemp >= 60) {
|
||||||
console.log('取消发送');
|
console.log('取消发送');
|
||||||
voiceStop.value = true
|
|
||||||
voiceTis.value = '松开手指 取消发送'
|
|
||||||
} else {
|
|
||||||
console.log('继续发送');
|
|
||||||
voiceStop.value = false
|
|
||||||
voiceTis.value = '手指上滑 取消发送'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 松开触发
|
|
||||||
touchendVoice: () => {
|
|
||||||
// 没有展示UI不触发
|
|
||||||
if (!voiceFlg.value) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
clearInterval(voiceTimer.value);
|
|
||||||
voiceText.value = '按住 说话'
|
|
||||||
voiceTis.value = "手指上滑 取消发送"
|
|
||||||
console.log('touchendVoice');
|
|
||||||
sv.stop();
|
|
||||||
},
|
|
||||||
// 打断触发
|
|
||||||
touchcancelVoice: () => {
|
|
||||||
clearInterval(voiceTimer.value);
|
|
||||||
// 关闭UI
|
|
||||||
voiceText.value = '按住 说话'
|
|
||||||
voiceTis.value = "手指上滑 取消发送"
|
|
||||||
// 不发送语音
|
|
||||||
voiceStop.value = true
|
voiceStop.value = true
|
||||||
console.log('touchcancelVoice');
|
voiceTis.value = '松开手指 取消发送'
|
||||||
sv.stop();
|
} else {
|
||||||
},
|
console.log('继续发送');
|
||||||
stop: () => {
|
voiceStop.value = false
|
||||||
voiceTimer.value = null;
|
voiceTis.value = '手指上滑 取消发送'
|
||||||
voiceFlg.value = false
|
|
||||||
recorderManager.stop(); // 录音结束
|
|
||||||
console.log('录音结束');
|
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
// #ifdef APP-PLUS
|
// 松开触发
|
||||||
// 监听录音停止事件
|
touchendVoice: () => {
|
||||||
recorderManager.onStop((res) => {
|
// 没有展示UI不触发
|
||||||
// 被打断等情况不发送
|
if (!voiceFlg.value) {
|
||||||
if (voiceStop.value) {
|
return;
|
||||||
return
|
|
||||||
}
|
}
|
||||||
// 正常情况
|
clearInterval(voiceTimer.value);
|
||||||
if (voiceStop.value) {
|
voiceText.value = '按住 说话'
|
||||||
uni.showToast({
|
voiceTis.value = "手指上滑 取消发送"
|
||||||
icon: "none",
|
console.log('touchendVoice');
|
||||||
title: "取消发送",
|
sv.stop();
|
||||||
duration: 2000
|
},
|
||||||
})
|
// 打断触发
|
||||||
return
|
touchcancelVoice: () => {
|
||||||
}
|
clearInterval(voiceTimer.value);
|
||||||
if (voiceLength.value < 1) {
|
// 关闭UI
|
||||||
uni.showToast({
|
voiceText.value = '按住 说话'
|
||||||
icon: "none",
|
voiceTis.value = "手指上滑 取消发送"
|
||||||
title: "语音时长过短",
|
// 不发送语音
|
||||||
duration: 2000
|
voiceStop.value = true
|
||||||
})
|
console.log('touchcancelVoice');
|
||||||
return
|
sv.stop();
|
||||||
}
|
},
|
||||||
if (voiceLength.value > 60) {
|
stop: () => {
|
||||||
uni.showToast({
|
voiceTimer.value = null;
|
||||||
icon: "none",
|
voiceFlg.value = false
|
||||||
title: "语音时长过长",
|
recorderManager.stop(); // 录音结束
|
||||||
duration: 2000
|
console.log('录音结束');
|
||||||
})
|
}
|
||||||
return
|
};
|
||||||
}
|
// #ifdef APP-PLUS
|
||||||
console.log('file', res)
|
// 监听录音停止事件
|
||||||
|
recorderManager.onStop((res) => {
|
||||||
|
// 被打断等情况不发送
|
||||||
|
if (voiceStop.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 正常情况
|
||||||
|
if (voiceStop.value) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "取消发送",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (voiceLength.value < 1) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "语音时长过短",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (voiceLength.value > 60) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "语音时长过长",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log('file', res)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let message = uni.$chat.createAudioMessage({
|
let message = uni.$chat.createAudioMessage({
|
||||||
to: props.msg.id,
|
to: props.msg.id,
|
||||||
conversationType: props.msg.type,
|
conversationType: props.msg.type,
|
||||||
payload: {
|
payload: {
|
||||||
file: res
|
file: res
|
||||||
},
|
},
|
||||||
// 音频上传进度回调
|
// 音频上传进度回调
|
||||||
onProgress: function(event) {
|
onProgress: function (event) {
|
||||||
console.log('file uploading:', event)
|
console.log('file uploading:', event)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
emit('send', message)
|
|
||||||
} catch (e) {
|
|
||||||
console.log('message catch', e)
|
|
||||||
}
|
|
||||||
//
|
|
||||||
|
|
||||||
})
|
let obj = {
|
||||||
// #endif
|
query: {
|
||||||
|
toUserId: message.to,
|
||||||
|
formId: message.from,
|
||||||
|
msgType: message.type,
|
||||||
|
},
|
||||||
|
data: message
|
||||||
|
}
|
||||||
|
emit('send', obj)
|
||||||
|
} catch (e) {
|
||||||
|
console.log('message catch', e)
|
||||||
|
}
|
||||||
|
//
|
||||||
|
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.voice_box {
|
.voice_box {
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
margin: 0 20rpx;
|
margin: 0 20rpx;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record {
|
||||||
|
width: 40vw;
|
||||||
|
height: 40vw;
|
||||||
|
position: fixed;
|
||||||
|
top: 55%;
|
||||||
|
left: 30%;
|
||||||
|
background-color: rgba(0, 0, 0, .6);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
|
||||||
|
.ing {
|
||||||
|
width: 100%;
|
||||||
|
height: 30vw;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
align-items: center;
|
||||||
|
|
||||||
.hidden {
|
// 模拟录音音效动画
|
||||||
display: none !important;
|
@keyframes volatility {
|
||||||
}
|
0% {
|
||||||
|
background-position: 0% 130%;
|
||||||
.record {
|
|
||||||
width: 40vw;
|
|
||||||
height: 40vw;
|
|
||||||
position: fixed;
|
|
||||||
top: 55%;
|
|
||||||
left: 30%;
|
|
||||||
background-color: rgba(0, 0, 0, .6);
|
|
||||||
border-radius: 20rpx;
|
|
||||||
|
|
||||||
.ing {
|
|
||||||
width: 100%;
|
|
||||||
height: 30vw;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
// 模拟录音音效动画
|
|
||||||
@keyframes volatility {
|
|
||||||
0% {
|
|
||||||
background-position: 0% 130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
20% {
|
|
||||||
background-position: 0% 150%;
|
|
||||||
}
|
|
||||||
|
|
||||||
30% {
|
|
||||||
background-position: 0% 155%;
|
|
||||||
}
|
|
||||||
|
|
||||||
40% {
|
|
||||||
background-position: 0% 150%;
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
background-position: 0% 145%;
|
|
||||||
}
|
|
||||||
|
|
||||||
70% {
|
|
||||||
background-position: 0% 150%;
|
|
||||||
}
|
|
||||||
|
|
||||||
80% {
|
|
||||||
background-position: 0% 155%;
|
|
||||||
}
|
|
||||||
|
|
||||||
90% {
|
|
||||||
background-position: 0% 140%;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
background-position: 0% 135%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
background-image: linear-gradient(to bottom, #f09b37, #fff 50%);
|
20% {
|
||||||
background-size: 100% 200%;
|
background-position: 0% 150%;
|
||||||
animation: volatility 1.5s ease-in-out -1.5s infinite alternate;
|
}
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
30% {
|
||||||
font-size: 150rpx;
|
background-position: 0% 155%;
|
||||||
|
}
|
||||||
|
|
||||||
|
40% {
|
||||||
|
background-position: 0% 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
background-position: 0% 145%;
|
||||||
|
}
|
||||||
|
|
||||||
|
70% {
|
||||||
|
background-position: 0% 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
80% {
|
||||||
|
background-position: 0% 155%;
|
||||||
|
}
|
||||||
|
|
||||||
|
90% {
|
||||||
|
background-position: 0% 140%;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
background-position: 0% 135%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
background-image: linear-gradient(to bottom, #f09b37, #fff 50%);
|
||||||
|
background-size: 100% 200%;
|
||||||
|
animation: volatility 1.5s ease-in-out -1.5s infinite alternate;
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
font-size: 150rpx;
|
||||||
|
color: #f09b37;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancel {
|
||||||
|
width: 100%;
|
||||||
|
height: 30vw;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
color: #fff;
|
||||||
|
font-size: 150rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.tis {
|
||||||
|
width: 100%;
|
||||||
|
height: 10vw;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
&.change {
|
||||||
color: #f09b37;
|
color: #f09b37;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.cancel {
|
|
||||||
width: 100%;
|
|
||||||
height: 30vw;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
color: #fff;
|
|
||||||
font-size: 150rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.tis {
|
|
||||||
width: 100%;
|
|
||||||
height: 10vw;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
&.change {
|
|
||||||
color: #f09b37;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -2,6 +2,8 @@
|
||||||
// 我的二维码
|
// 我的二维码
|
||||||
import uQRCode from '@/common/js/uqrcode.js'
|
import uQRCode from '@/common/js/uqrcode.js'
|
||||||
|
|
||||||
|
// 未实名认证
|
||||||
|
import noAuth from '@/components/mine/noAuth.vue'
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
|
@ -60,7 +62,11 @@ function init() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="app">
|
<view class="page" v-if="!userinfo.isRealName">
|
||||||
|
<noAuth class="f1" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="app" v-else>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<view class="container ver mtb30 mlr30 tac">
|
<view class="container ver mtb30 mlr30 tac">
|
||||||
<!-- 二维码插件 width height设置宽高 -->
|
<!-- 二维码插件 width height设置宽高 -->
|
||||||
|
|
|
@ -20,6 +20,8 @@ import TencentCloudChat from '@tencentcloud/chat';
|
||||||
import apex from '@/components/header/apex'
|
import apex from '@/components/header/apex'
|
||||||
// 未登录
|
// 未登录
|
||||||
import noLogin from '@/components/login/noLogin.vue'
|
import noLogin from '@/components/login/noLogin.vue'
|
||||||
|
// 未实名认证
|
||||||
|
import noAuth from '@/components/mine/noAuth.vue'
|
||||||
// 通讯录
|
// 通讯录
|
||||||
import book from '@/components/news/book'
|
import book from '@/components/news/book'
|
||||||
// 群聊列表
|
// 群聊列表
|
||||||
|
@ -107,7 +109,7 @@ function imLoading() {
|
||||||
// 移除监听
|
// 移除监听
|
||||||
function removeListener() {
|
function removeListener() {
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
uni.$chat.off(TencentCloudChat.EVENT.SDK_READY,()=>{});
|
uni.$chat.off(TencentCloudChat.EVENT.SDK_READY, () => { });
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,6 +180,10 @@ function getUserInfos(userRecommend) {
|
||||||
<noLogin class="f1" />
|
<noLogin class="f1" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="page" v-else-if="!userinfo.isRealName">
|
||||||
|
<noAuth class="f1" />
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="page" v-else>
|
<view class="page" v-else>
|
||||||
<apex>
|
<apex>
|
||||||
<template #left>
|
<template #left>
|
||||||
|
|
|
@ -3,9 +3,9 @@ import {
|
||||||
} from 'vite';
|
} from 'vite';
|
||||||
import uni from '@dcloudio/vite-plugin-uni';
|
import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
// let target = 'http://91f.xyz:8080'
|
let target = 'http://91f.xyz:8080'
|
||||||
// let target = 'https://1a880cd5.r24.cpolar.top/'
|
// let target = 'https://1a880cd5.r24.cpolar.top/'
|
||||||
let target = 'http://aere2w.natappfree.cc'
|
// let target = 'http://aere2w.natappfree.cc'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue