Compare commits
5 Commits
8e2a23ed69
...
ce71b7942c
Author | SHA1 | Date |
---|---|---|
|
ce71b7942c | |
|
3deaf329cd | |
|
88d6c7746e | |
|
e0f2b6be60 | |
|
4e88cbdefc |
|
@ -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;
|
||||||
|
}
|
|
@ -366,7 +366,6 @@ const mine = {
|
||||||
load: true,
|
load: true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加银行卡
|
* 添加银行卡
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
|
@ -393,6 +392,30 @@ const mine = {
|
||||||
load: true,
|
load: true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拉黑
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
blockUser(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/video/statistics/block`,
|
||||||
|
data: param,
|
||||||
|
method: 'POST',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解锁他人评论
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
unlockComment(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/video/comment/unlockOthersComment`,
|
||||||
|
data: param,
|
||||||
|
method: 'POST',
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default mine
|
export default mine
|
|
@ -426,7 +426,7 @@ const video = {
|
||||||
*/
|
*/
|
||||||
reportVideo(param) {
|
reportVideo(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/report/reportVideo`,
|
url: `/video/videoReport`,
|
||||||
data: param.data,
|
data: param.data,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 视频菜单组件
|
* 视频菜单组件
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted
|
onMounted
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import video from '../../api/video';
|
import video from '../../api/video';
|
||||||
import util from '../../common/js/util';
|
import util from '../../common/js/util';
|
||||||
|
|
||||||
// 传参
|
// 传参
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 列表数据
|
// 列表数据
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
@ -38,37 +38,40 @@
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
// 子触发父
|
// 子触发父
|
||||||
const emit = defineEmits(['item'])
|
const emit = defineEmits(['item'])
|
||||||
// 已选择的视频id
|
// 已选择的视频id
|
||||||
const ids = defineModel('ids')
|
const videoInfo = reactive({
|
||||||
// 视频上下文对象
|
videoId: '',
|
||||||
const videoContext = ref(null)
|
coverUrl: '',
|
||||||
// 视频播放路径
|
})
|
||||||
const videoUrl = ref('')
|
// 视频上下文对象
|
||||||
|
const videoContext = ref(null)
|
||||||
|
// 视频播放路径
|
||||||
|
const videoUrl = ref('')
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 创建视频上下文对象
|
// 创建视频上下文对象
|
||||||
videoContext.value = uni.createVideoContext('video')
|
videoContext.value = uni.createVideoContext('video')
|
||||||
})
|
})
|
||||||
|
|
||||||
// 进入全屏
|
// 进入全屏
|
||||||
function requestFullScreen() {
|
function requestFullScreen() {
|
||||||
videoContext.value.requestFullScreen()
|
videoContext.value.requestFullScreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 暂停
|
// 暂停
|
||||||
function pause() {
|
function pause() {
|
||||||
// 暂停当前视频
|
// 暂停当前视频
|
||||||
videoContext.value.pause()
|
videoContext.value.pause()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点击视频播放
|
* 点击视频播放
|
||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
*/
|
*/
|
||||||
function handleVideo(item) {
|
function handleVideo(item) {
|
||||||
// 列表模式
|
// 列表模式
|
||||||
if (props.mode == 'list') {
|
if (props.mode == 'list') {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -86,53 +89,50 @@
|
||||||
else if (props.mode == 'menu') {
|
else if (props.mode == 'menu') {
|
||||||
emit('item', item)
|
emit('item', item)
|
||||||
}
|
}
|
||||||
// 多选模式
|
// 单选模式
|
||||||
else if (props.mode == 'checkbox') {
|
else if (props.mode == 'checkbox') {
|
||||||
const findIndex = ids.value.findIndex(node => node == item.videoId)
|
videoInfo.videoId = item.id
|
||||||
if (findIndex >= 0) ids.value.splice(findIndex, 1)
|
videoInfo.coverUrl = item.coverUrl
|
||||||
else {
|
videoUrl.value = item.videoUrl
|
||||||
// 如果有限制 且 数量到达上限
|
emit('videoInfo', videoInfo)
|
||||||
if (props.limit != 0 && props.limit <= ids.value.length) return
|
|
||||||
ids.value.push(item.videoId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 视频进入退出全屏
|
* 视频进入退出全屏
|
||||||
* @param {Object} ev
|
* @param {Object} ev
|
||||||
*/
|
*/
|
||||||
function videoFullscreenchange(ev) {
|
function videoFullscreenchange(ev) {
|
||||||
// 根据全屏状态决定是否播放盒暂停
|
// 根据全屏状态决定是否播放盒暂停
|
||||||
if (ev.detail.fullScreen) videoContext.value.play()
|
if (ev.detail.fullScreen) videoContext.value.play()
|
||||||
else pause()
|
else pause()
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
videoContext,
|
videoContext,
|
||||||
pause,
|
pause,
|
||||||
requestFullScreen,
|
requestFullScreen,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- 视频菜单 -->
|
<!-- 视频菜单 -->
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item pr" v-for="(item,index) in list" :key="index" @click="handleVideo(item)">
|
<view class="item pr" v-for="(item, index) in list" :key="index" @click="handleVideo(item)">
|
||||||
<image :src="item.coverUrl" mode="aspectFill" />
|
<image :src="item.coverUrl" mode="aspectFill" />
|
||||||
|
|
||||||
<view class="window pfull"></view>
|
<view class="window pfull"></view>
|
||||||
|
|
||||||
<!-- 选项 -->
|
<!-- 选项 -->
|
||||||
<view class="amount pa r0 t0 df ptb10 plr10" v-if="mode == 'checkbox'">
|
<view class="amount pa r0 t0 df ptb10 plr10" v-if="mode == 'checkbox'">
|
||||||
<uni-icons type="circle-filled" size="50rpx" color="#20D200" v-if="ids.includes(item.videoId)" />
|
<uni-icons type="circle-filled" size="50rpx" color="#20D200" v-if="videoInfo.videoId == item.id" />
|
||||||
<uni-icons type="circle" color="#fff" size="50rpx" v-else />
|
<uni-icons type="circle" color="#fff" size="50rpx" v-else />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="amount pa l0 r0 b0 df ptb10 plr10" v-if="item.play">
|
<view class="amount pa l0 r0 b0 df ptb10 plr10" v-if="item.play">
|
||||||
<image class="wh24" src="/static/amount.png" mode="aspectFit" />
|
<image class="wh24" src="/static/amount.png" mode="aspectFit" />
|
||||||
<view class="txt f1 ml10 cfff f20">{{item.play}}</view>
|
<view class="txt f1 ml10 cfff f20">{{ item.play }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -145,8 +145,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
//
|
//
|
||||||
.list {
|
.list {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
grid-gap: 5rpx;
|
grid-gap: 5rpx;
|
||||||
|
@ -170,12 +170,12 @@
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 视频上下文对象
|
// 视频上下文对象
|
||||||
.videoContext {
|
.videoContext {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,108 +1,101 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 视频举报
|
* 视频举报
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
computed,
|
computed,
|
||||||
getCurrentInstance
|
getCurrentInstance
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
// api
|
// api
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// 视频菜单
|
// 视频菜单
|
||||||
import videoMenu from '@/components/index/videoMenu.vue';
|
import videoMenu from '@/components/index/videoMenu.vue';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
// 举报列表
|
// 举报列表
|
||||||
const reportList = reactive([{
|
const reportList = reactive([{
|
||||||
name: '发布不正当的内容或信息',
|
name: '发布不正当的内容或信息',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '传播涩情资源',
|
name: '传播涩情资源',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '冒充他人',
|
name: '冒充他人',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '涉嫌诈骗',
|
name: '涉嫌诈骗',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '侵犯权益',
|
name: '侵犯权益',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '其他',
|
name: '其他',
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
// 举报下标
|
// 举报下标
|
||||||
const reportIndex = ref('')
|
const reportIndex = ref('')
|
||||||
// 表单
|
// 表单
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
userId: '',
|
userId: '',
|
||||||
videoId: [],
|
videoId: '',
|
||||||
reason: '',
|
reasonForReporting: '',
|
||||||
context: '',
|
particulars: '',
|
||||||
pic: [],
|
videoPictureUrl: '',
|
||||||
})
|
coverUrl: ''
|
||||||
// 列表数据
|
})
|
||||||
const list = reactive({
|
// 列表数据
|
||||||
|
const list = reactive({
|
||||||
data: [],
|
data: [],
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
total: 0,
|
total: 0,
|
||||||
})
|
})
|
||||||
// 已选择的视频列表
|
// 已选择的视频列表
|
||||||
const videos = computed(() => {
|
const videos = computed(() => {
|
||||||
let result = form.videoId.map(item => {
|
let result = form.videoId.map(item => {
|
||||||
return list.data.find(node => node.videoId == item) || {}
|
return list.data.find(node => node.videoId == item) || {}
|
||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
// 被举报的用户id
|
// 被举报的用户id
|
||||||
if (option.userId) form.userId = option.userId
|
if (option.userId) form.userId = option.userId
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选择举报列表
|
* 选择举报列表
|
||||||
* @param {Object} ev 携带参数
|
* @param {Object} ev 携带参数
|
||||||
*/
|
*/
|
||||||
function handleReportList(ev) {
|
function handleReportList(ev) {
|
||||||
const index = ev.detail.value
|
const index = ev.detail.value
|
||||||
if (reportIndex.value === index) return
|
if (reportIndex.value === index) return
|
||||||
reportIndex.value = index
|
reportIndex.value = index
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
function refreshList() {
|
function refreshList() {
|
||||||
list.pageNum = 1
|
list.pageNum = 1
|
||||||
list.total = 0
|
list.total = 0
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取更多列表
|
// 获取列表
|
||||||
function getMoreList() {
|
function getList() {
|
||||||
if (list.data.length >= list.rows) return
|
|
||||||
list.pageNum++
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取列表
|
|
||||||
function getList() {
|
|
||||||
//
|
//
|
||||||
api.video.myVideoList({
|
api.video.myWorks({
|
||||||
query: {
|
query: {
|
||||||
isDraft: 0,
|
|
||||||
userId: form.userId,
|
userId: form.userId,
|
||||||
pageSize: list.pageSize,
|
pageSize: list.pageSize,
|
||||||
pageNum: list.pageNum,
|
pageNum: list.pageNum,
|
||||||
|
@ -123,30 +116,37 @@
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上传图片
|
// 上传图片
|
||||||
function uploadImg() {
|
function uploadImg() {
|
||||||
util.upload_image({
|
util.upload_image({
|
||||||
value: form.pic,
|
type: 1,
|
||||||
})
|
success: rs => {
|
||||||
|
form.videoPictureUrl = rs.value
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除多媒体
|
* 删除多媒体
|
||||||
* @param {Number} index 列表下标
|
* @param {Number} index 列表下标
|
||||||
* @param {String} key 操作的键
|
* @param {String} key 操作的键
|
||||||
*/
|
*/
|
||||||
function removeMedia(index, key) {
|
function removeMedia(key) {
|
||||||
util.alert({
|
util.alert({
|
||||||
content: '确认要删除吗?',
|
content: '确认要删除吗?',
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.confirm) form[key].splice(index, 1)
|
if (key == 'videoId') {
|
||||||
})
|
form.videoId = null
|
||||||
|
form.coverUrl = null
|
||||||
}
|
}
|
||||||
|
if (key == 'videoPictureUrl') form.videoPictureUrl = null
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 视频举报
|
// 视频举报
|
||||||
function handleSubmit() {
|
function handleSubmit() {
|
||||||
//
|
//
|
||||||
const data = {
|
const data = {
|
||||||
...form
|
...form
|
||||||
|
@ -157,30 +157,24 @@
|
||||||
util.alert('请选择举报理由')
|
util.alert('请选择举报理由')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!data.context) {
|
if (!data.particulars) {
|
||||||
util.alert('详细描述不能为空')
|
util.alert('详细描述不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (data.context.length > 100) {
|
if (data.particulars.length > 100) {
|
||||||
util.alert('详细描述自述超过100')
|
util.alert('详细描述自述超过100')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!data.pic[0]) {
|
if (!data.videoPictureUrl) {
|
||||||
util.alert('请上传举报图片')
|
util.alert('请上传举报图片')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!data.videoId[0]) {
|
if (!data.videoId) {
|
||||||
util.alert('请选择举报视频')
|
util.alert('请选择举报视频')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
data.reasonForReporting = reportList[reportIndex.value].name
|
||||||
data.reason = reportList[reportIndex.value].name
|
|
||||||
data.pic = data.pic.map(node => {
|
|
||||||
node = util.replace_url('node')
|
|
||||||
return node
|
|
||||||
}).join(',')
|
|
||||||
data.videoId = data.videoId.join(',')
|
|
||||||
|
|
||||||
api.video.reportVideo({
|
api.video.reportVideo({
|
||||||
data: data,
|
data: data,
|
||||||
|
@ -197,7 +191,14 @@
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 选中视频信息
|
||||||
|
function videoInfo(param) {
|
||||||
|
console.log('选中视频信息', param);
|
||||||
|
form.videoId = param.videoId;
|
||||||
|
form.coverUrl = param.coverUrl;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -208,7 +209,7 @@
|
||||||
<view class="key mr20">举报理由</view>
|
<view class="key mr20">举报理由</view>
|
||||||
<picker class="f1" :range="reportList" rangeKey="name" @change="handleReportList">
|
<picker class="f1" :range="reportList" rangeKey="name" @change="handleReportList">
|
||||||
<view class="inputBox ptb10 plr10">
|
<view class="inputBox ptb10 plr10">
|
||||||
<text v-if="reportList[reportIndex]">{{reportList[reportIndex].name}}</text>
|
<text v-if="reportList[reportIndex]">{{ reportList[reportIndex].name }}</text>
|
||||||
<text v-else class="placeholderStyle">请选择举报理由</text>
|
<text v-else class="placeholderStyle">请选择举报理由</text>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
|
@ -218,10 +219,10 @@
|
||||||
<view class="key">详细描述</view>
|
<view class="key">详细描述</view>
|
||||||
|
|
||||||
<view class="inputBox mt20 ptb15 plr15">
|
<view class="inputBox mt20 ptb15 plr15">
|
||||||
<textarea v-model="form.context" placeholder="请详细填写,以提高举报成功率。" />
|
<textarea v-model="form.particulars" placeholder="请详细填写,以提高举报成功率。" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="hint mt10 tar f20">{{form.context.length}}/100</view>
|
<view class="hint mt10 tar f20">{{ form.particulars.length }}/100</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line mtb50 uploadBox">
|
<view class="line mtb50 uploadBox">
|
||||||
|
@ -233,14 +234,15 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="imgList images mt20">
|
<view class="imgList images mt20">
|
||||||
<view class="item upload fmid pr mr20 br10" @click="uploadImg">
|
<view v-if="!form.videoPictureUrl" class="item upload fmid pr mr20 br10" @click="uploadImg">
|
||||||
<uni-icons type="plusempty" color="#D8D8D8" size="100rpx" />
|
<uni-icons type="plusempty" color="#D8D8D8" size="100rpx" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="imgs item mr20 br10" v-for="(item,index) in form.pic" :key="index">
|
<view v-else class="imgs item mr20 br10">
|
||||||
<image class="br10" :src="item" mode="aspectFill" />
|
<image class="br10" :src="form.videoPictureUrl" mode="aspectFill" />
|
||||||
<view class="close">
|
<view class="close">
|
||||||
<uni-icons type="clear" size="30rpx" color="red" @click="removeMedia(index,'pic')" />
|
<uni-icons type="clear" size="30rpx" color="red"
|
||||||
|
@click="removeMedia('videoPictureUrl')" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -251,15 +253,15 @@
|
||||||
<view class="key">选择视频</view>
|
<view class="key">选择视频</view>
|
||||||
|
|
||||||
<view class="list pr mt20">
|
<view class="list pr mt20">
|
||||||
<view class="item fmid oh br10" @click="$refs.select.open()">
|
<view v-if="!form.coverUrl" class="item fmid oh br10" @click="$refs.select.open()">
|
||||||
<uni-icons type="plusempty" color="#D8D8D8" size="100rpx" />
|
<uni-icons type="plusempty" color="#D8D8D8" size="100rpx" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item pr br10" v-for="(item,index) in videos" :key="index">
|
<view v-else class="item pr br10">
|
||||||
<image :src="item.format_imageUrl" mode="aspectFill" />
|
<image :src="form.coverUrl" mode="aspectFill" />
|
||||||
|
|
||||||
<view class="close">
|
<view class="close">
|
||||||
<uni-icons type="clear" size="30rpx" color="red" @click="removeMedia(index,'videoId')" />
|
<uni-icons type="clear" size="30rpx" color="red" @click="removeMedia('videoId')" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -279,7 +281,7 @@
|
||||||
<view class="header rows ptb20 plr20">
|
<view class="header rows ptb20 plr20">
|
||||||
<view class="title plr30 c333 f34">
|
<view class="title plr30 c333 f34">
|
||||||
<text>作品</text>
|
<text>作品</text>
|
||||||
<text class="ml10">{{list.total}}</text>
|
<text class="ml10">{{ list.total }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="fmid c999 f28" @click="refreshList">
|
<view class="fmid c999 f28" @click="refreshList">
|
||||||
|
@ -290,7 +292,7 @@
|
||||||
|
|
||||||
<!-- 视频菜单 -->
|
<!-- 视频菜单 -->
|
||||||
<scroll-view scroll-y="true" class="scroll">
|
<scroll-view scroll-y="true" class="scroll">
|
||||||
<videoMenu :list="list.data" v-model:ids="form.videoId" mode="checkbox" />
|
<videoMenu :list="list.data" @videoInfo="videoInfo" mode="checkbox" />
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -300,21 +302,21 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单
|
// 表单
|
||||||
.form {
|
.form {
|
||||||
|
|
||||||
.hint {
|
.hint {
|
||||||
color: #a7a7a7;
|
color: #a7a7a7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上传图片
|
// 上传图片
|
||||||
.uploadBox {
|
.uploadBox {
|
||||||
|
|
||||||
//
|
//
|
||||||
.uploads {
|
.uploads {
|
||||||
|
@ -354,12 +356,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 作品数量
|
// 作品数量
|
||||||
.product {
|
.product {
|
||||||
.scroll {
|
.scroll {
|
||||||
height: 80vh;
|
height: 80vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,85 +1,85 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 他人用户视频主页
|
* 他人用户视频主页
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
computed,
|
computed,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onPageScroll,
|
onPageScroll,
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
onHide
|
onHide
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import {
|
import {
|
||||||
useStore
|
useStore
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
// api
|
// api
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// 顶部状态栏
|
// 顶部状态栏
|
||||||
import statusBar from '@/components/header/statusBar.vue'
|
import statusBar from '@/components/header/statusBar.vue'
|
||||||
// 顶部
|
// 顶部
|
||||||
import apex from '@/components/header/apex.vue'
|
import apex from '@/components/header/apex.vue'
|
||||||
// 视频菜单
|
// 视频菜单
|
||||||
import videoMenu from '@/components/index/videoMenu.vue'
|
import videoMenu from '@/components/index/videoMenu.vue'
|
||||||
|
|
||||||
// 代理
|
// 代理
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
//
|
//
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
// 滚动头部
|
// 滚动头部
|
||||||
const scrollTop = ref(false)
|
const scrollTop = ref(false)
|
||||||
// 用户id
|
// 用户id
|
||||||
const userId = ref('')
|
const userId = ref('')
|
||||||
// 详情
|
// 详情
|
||||||
const detail = reactive({})
|
const detail = reactive({})
|
||||||
// 列表对象
|
// 列表对象
|
||||||
const listProperty = reactive({
|
const listProperty = reactive({
|
||||||
data: [],
|
data: [],
|
||||||
pageSize: 9,
|
pageSize: 9,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
total: 0,
|
total: 0,
|
||||||
})
|
})
|
||||||
// 用户信息
|
// 用户信息
|
||||||
let userinfo = computed(() => {
|
let userinfo = computed(() => {
|
||||||
let result = store.state.userinfo
|
let result = store.state.userinfo
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
//
|
//
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
// 用户id
|
// 用户id
|
||||||
if (option.userId) userId.value = option.userId
|
if (option.userId) userId.value = option.userId
|
||||||
// 他人用户主页
|
// 他人用户主页
|
||||||
getUserinfo()
|
getUserinfo()
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
|
|
||||||
onHide(() => {
|
onHide(() => {
|
||||||
// 暂停当前视频
|
// 暂停当前视频
|
||||||
proxy.$refs.videoMenuRef.pause()
|
proxy.$refs.videoMenuRef.pause()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 滚动
|
// 滚动
|
||||||
onPageScroll((ev) => {
|
onPageScroll((ev) => {
|
||||||
scrollTop.value = ev.scrollTop > 44 ? true : false
|
scrollTop.value = ev.scrollTop > 44 ? true : false
|
||||||
})
|
})
|
||||||
|
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
// 获取更多列表
|
// 获取更多列表
|
||||||
getMoreList()
|
getMoreList()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
function getUserinfo() {
|
function getUserinfo() {
|
||||||
api.video.getUserInfo({
|
api.video.getUserInfo({
|
||||||
query: {
|
query: {
|
||||||
userId: userId.value,
|
userId: userId.value,
|
||||||
|
@ -97,17 +97,17 @@
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取更多列表
|
// 获取更多列表
|
||||||
function getMoreList() {
|
function getMoreList() {
|
||||||
if (listProperty.total <= listProperty.data.length) return
|
if (listProperty.total <= listProperty.data.length) return
|
||||||
listProperty.pageNum++
|
listProperty.pageNum++
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取用户作品
|
// 获取用户作品
|
||||||
function getList() {
|
function getList() {
|
||||||
//
|
//
|
||||||
api.video.myWorks({
|
api.video.myWorks({
|
||||||
query: {
|
query: {
|
||||||
|
@ -128,10 +128,10 @@
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 举报
|
// 举报
|
||||||
function handleReport() {
|
function handleReport() {
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
proxy.$refs.menuRef.close()
|
proxy.$refs.menuRef.close()
|
||||||
|
|
||||||
|
@ -142,14 +142,38 @@
|
||||||
const index = rs.tapIndex
|
const index = rs.tapIndex
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/report',
|
url: util.setUrl('/pages/index/report', {
|
||||||
|
userId: userId.value,
|
||||||
|
}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 复制账号
|
// 拉黑
|
||||||
function handleCopyAccount() {
|
function handleBlack() {
|
||||||
|
// let text = detail.isBlock ? '取消拉黑' : '拉黑'
|
||||||
|
// util.alert({
|
||||||
|
// content: `确认要${text}用户${detail.userNickname}吗?`,
|
||||||
|
// }).then(rs => {
|
||||||
|
// let obj = {
|
||||||
|
// blockUserId: detail.id,
|
||||||
|
// status: detail.isBlock ? 1 : 0
|
||||||
|
// }
|
||||||
|
// api.mine.blockUser(obj).then(res => {
|
||||||
|
// if (res.code == 200) {
|
||||||
|
// util.alert('操作成功!')
|
||||||
|
// getUserinfo()
|
||||||
|
|
||||||
|
// // 关闭弹窗
|
||||||
|
// proxy.$refs.menuRef.close()
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 复制账号
|
||||||
|
function handleCopyAccount() {
|
||||||
// 复制用户账号
|
// 复制用户账号
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data: detail.account,
|
data: detail.account,
|
||||||
|
@ -158,10 +182,10 @@
|
||||||
util.alert('复制成功')
|
util.alert('复制成功')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关注用户
|
// 关注用户
|
||||||
function handleAttention() {
|
function handleAttention() {
|
||||||
let targetAtt = detail.isAttention == 0 ? 1 : 0
|
let targetAtt = detail.isAttention == 0 ? 1 : 0
|
||||||
api.video.attention({
|
api.video.attention({
|
||||||
data: {
|
data: {
|
||||||
|
@ -181,7 +205,7 @@
|
||||||
getUserinfo()
|
getUserinfo()
|
||||||
// 修改了他人关注状态
|
// 修改了他人关注状态
|
||||||
uni.$emit('focusUser', {
|
uni.$emit('focusUser', {
|
||||||
userId: detail.userId,
|
userId: detail.id,
|
||||||
result: detail.isAttention,
|
result: detail.isAttention,
|
||||||
})
|
})
|
||||||
// 重载关注列表
|
// 重载关注列表
|
||||||
|
@ -193,41 +217,73 @@
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 操作不让看
|
// 操作不让看
|
||||||
function handleBlock() {
|
function handleBlock() {
|
||||||
// 反选状态
|
// // 反选状态
|
||||||
detail.isBlock = !detail.isBlock
|
// detail.isBlock = !detail.isBlock
|
||||||
|
|
||||||
//
|
// api.video.videoBlock({
|
||||||
api.video.videoBlock({
|
// query: {
|
||||||
query: {
|
// type: detail.isBlock ? 0 : 1,
|
||||||
type: detail.isBlock ? 0 : 1,
|
// userId: detail.id,
|
||||||
userId: detail.userId,
|
// }
|
||||||
}
|
// }).then(rs => {
|
||||||
}).then(rs => {
|
// if (rs.code == 200) {
|
||||||
if (rs.code == 200) {
|
// return
|
||||||
return
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
detail.isBlock = !detail.isBlock
|
// detail.isBlock = !detail.isBlock
|
||||||
util.alert({
|
// util.alert({
|
||||||
content: rs.msg,
|
// content: rs.msg,
|
||||||
showCancel: false,
|
// showCancel: false,
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 私信
|
// 私信
|
||||||
function handleMessage() {
|
function handleMessage() {
|
||||||
util.toChat({
|
util.toChat({
|
||||||
name: detail.userNickname,
|
name: detail.userNickname,
|
||||||
msgId: detail.userId,
|
msgId: detail.id,
|
||||||
type: 'C2C',
|
type: 'C2C',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
// 评论
|
||||||
|
function userComments() {
|
||||||
|
if (detail.isLock) {
|
||||||
|
toCommentsList()
|
||||||
|
} else {
|
||||||
|
// 解锁提示
|
||||||
|
util.alert({
|
||||||
|
content: `确认消耗${detail.consumeFruit}个榴莲果解锁评论吗?`,
|
||||||
|
}).then(rs => {
|
||||||
|
unlockComments()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// 解锁评论列表
|
||||||
|
function unlockComments() {
|
||||||
|
api.mine.unlockComment({ userId: detail.id }).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
util.alert('解锁成功!')
|
||||||
|
if (res.data.isLock) {
|
||||||
|
toCommentsList()
|
||||||
|
getUserinfo()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 跳转到评论列表
|
||||||
|
function toCommentsList() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: util.setUrl('/pages/mine/myComment', {
|
||||||
|
userId: detail.id,
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -239,9 +295,9 @@
|
||||||
<view class="window pfull"></view>
|
<view class="window pfull"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<apex :bgColor="scrollTop?'#fff':'#fff0'" :color="scrollTop ? '#333' : '#fff'">
|
<apex :bgColor="scrollTop ? '#fff' : '#fff0'" :color="scrollTop ? '#333' : '#fff'">
|
||||||
<template #content v-if="scrollTop">
|
<template #content v-if="scrollTop">
|
||||||
<view class="">{{detail.userNickname}}</view>
|
<view class="">{{ detail.userNickname }}</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #right>
|
<template #right>
|
||||||
|
@ -258,8 +314,8 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="user f1 ml20 cfff">
|
<view class="user f1 ml20 cfff">
|
||||||
<view class="f36 b">{{detail.userNickname}}</view>
|
<view class="f36 b">{{ detail.userNickname }}</view>
|
||||||
<view class="f24">账号:{{detail.account}}</view>
|
<view class="f24">账号:{{ detail.account }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -270,25 +326,25 @@
|
||||||
|
|
||||||
<view class="number df">
|
<view class="number df">
|
||||||
<view class="option mr40" v-if="0">
|
<view class="option mr40" v-if="0">
|
||||||
<text class="value f36">{{detail.userPraised}}</text>
|
<text class="value f36">{{ detail.userPraised }}</text>
|
||||||
<text class="key ml10 c666 f24">获赞</text>
|
<text class="key ml10 c666 f24">获赞</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="option mr40">
|
<view class="option mr40">
|
||||||
<text class="value f36">{{detail.userFans}}</text>
|
<text class="value f36">{{ detail.userFans }}</text>
|
||||||
<text class="key ml10 c666 f24">粉丝</text>
|
<text class="key ml10 c666 f24">粉丝</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="option mr40">
|
<view class="option mr40">
|
||||||
<text class="value f36">{{detail.userAttention}}</text>
|
<text class="value f36">{{ detail.userAttention }}</text>
|
||||||
<text class="key ml10 c666 f24">关注</text>
|
<text class="key ml10 c666 f24">关注</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">他的评论</view>
|
<view class="" @click="userComments">他的评论</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 个人介绍 -->
|
<!-- 个人介绍 -->
|
||||||
<view class="desc mtb20 c333 f28">{{detail.userBrief}}</view>
|
<view class="desc mtb20 c333 f28">{{ detail.userBrief }}</view>
|
||||||
|
|
||||||
<!-- 橱窗 -->
|
<!-- 橱窗 -->
|
||||||
<view class="shopwindow df aic mtb30" v-if="detail.isShop == 1 && 0">
|
<view class="shopwindow df aic mtb30" v-if="detail.isShop == 1 && 0">
|
||||||
|
@ -312,7 +368,7 @@
|
||||||
<view class="product mt30">
|
<view class="product mt30">
|
||||||
<view class="title plr30 c333 f32">
|
<view class="title plr30 c333 f32">
|
||||||
<text>作品</text>
|
<text>作品</text>
|
||||||
<text class="ml10">{{listProperty.total}}</text>
|
<text class="ml10">{{ listProperty.total }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="list mt20">
|
<view class="list mt20">
|
||||||
|
@ -326,9 +382,9 @@
|
||||||
<view class="menuAlt ptb50 plr40 ">
|
<view class="menuAlt ptb50 plr40 ">
|
||||||
<view class="header df">
|
<view class="header df">
|
||||||
<view class="user f1 c111">
|
<view class="user f1 c111">
|
||||||
<view class="nickname f28">{{detail.userNickname}}</view>
|
<view class="nickname f28">{{ detail.userNickname }}</view>
|
||||||
<view class="df aic mt10">
|
<view class="df aic mt10">
|
||||||
<text class="f20">账号:{{detail.account}}</text>
|
<text class="f20">账号:{{ detail.account }}</text>
|
||||||
<image class="wh30 ml10" src="/static/copy.png" mode="aspectFit" @click="handleCopyAccount" />
|
<image class="wh30 ml10" src="/static/copy.png" mode="aspectFit" @click="handleCopyAccount" />
|
||||||
<view class="f1"></view>
|
<view class="f1"></view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -345,7 +401,7 @@
|
||||||
<view class="txt mt20 c111 f20">分享主页</view>
|
<view class="txt mt20 c111 f20">分享主页</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="option ver jcc bfff br10">
|
<view class="option ver jcc bfff br10" @click="handleMessage">
|
||||||
<image class="wh50" src="/static/email.png" mode="aspectFit" />
|
<image class="wh50" src="/static/email.png" mode="aspectFit" />
|
||||||
<view class="txt mt20 c111 f20">私信Ta</view>
|
<view class="txt mt20 c111 f20">私信Ta</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -358,14 +414,14 @@
|
||||||
<view class="option ver jcc bfff br10" @click="handleBlack">
|
<view class="option ver jcc bfff br10" @click="handleBlack">
|
||||||
<image class="wh50" src="/static/blackList.png" mode="aspectFit" />
|
<image class="wh50" src="/static/blackList.png" mode="aspectFit" />
|
||||||
<view class="txt mt20 c111 f20">
|
<view class="txt mt20 c111 f20">
|
||||||
<text>拉黑</text>
|
<text>{{ detail.isBlock ? '取消拉黑' : '拉黑' }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view class="list mtb20 plr20 c111 f24 bfff br10">
|
<view class="list mtb20 plr20 c111 f24 bfff br10" v-if="0">
|
||||||
<view class="item rows ptb25" v-if="0">
|
<view class="item rows ptb25">
|
||||||
<view class="key">设置备注</view>
|
<view class="key">设置备注</view>
|
||||||
<view class="inputBox tac">
|
<view class="inputBox tac">
|
||||||
<input class="c111 f24" type="text" placeholder="请输入备注" />
|
<input class="c111 f24" type="text" placeholder="请输入备注" />
|
||||||
|
@ -385,8 +441,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
// 头部
|
// 头部
|
||||||
.apex {
|
.apex {
|
||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
.userinfo {
|
.userinfo {
|
||||||
|
@ -395,17 +451,17 @@
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 内容
|
// 内容
|
||||||
.container {
|
.container {
|
||||||
margin-top: -30rpx;
|
margin-top: -30rpx;
|
||||||
border-radius: 15rpx 15rpx 0 0;
|
border-radius: 15rpx 15rpx 0 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 菜单弹窗
|
// 菜单弹窗
|
||||||
.menuAlt {
|
.menuAlt {
|
||||||
border-radius: 24rpx 24rpx 0 0;
|
border-radius: 24rpx 24rpx 0 0;
|
||||||
background: #F2F2F2;
|
background: #F2F2F2;
|
||||||
|
|
||||||
|
@ -427,5 +483,5 @@
|
||||||
width: 220rpx;
|
width: 220rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,60 +1,77 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
// 我的评论
|
// 我的评论
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
computed,
|
computed,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onReady,
|
onReady,
|
||||||
onUnload,
|
onUnload,
|
||||||
onPageScroll,
|
onPageScroll,
|
||||||
onReachBottom,
|
onReachBottom,
|
||||||
} from '@dcloudio/uni-app'
|
onPullDownRefresh
|
||||||
import {
|
} from '@dcloudio/uni-app'
|
||||||
|
import {
|
||||||
useStore,
|
useStore,
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
|
|
||||||
// 仓库
|
// 仓库
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
// 数据列表
|
// 数据列表
|
||||||
const list = reactive({
|
const list = reactive({
|
||||||
data: [],
|
data: [],
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
total: 0,
|
total: 0,
|
||||||
})
|
})
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userinfo = computed(() => {
|
const userinfo = computed(() => {
|
||||||
let result = store.state.userinfo
|
return store.state.userinfo
|
||||||
return result
|
})
|
||||||
})
|
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad((option) => {
|
||||||
getLst()
|
if (option.userId) {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: '他的评论'
|
||||||
})
|
})
|
||||||
|
getList(option.userId)
|
||||||
|
} else {
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// 重载视频列表
|
onReachBottom(() => {
|
||||||
function refreshVideoList() {
|
// 获取更多列表
|
||||||
|
getMoreVideoList()
|
||||||
|
})
|
||||||
|
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
// 刷新
|
||||||
|
refreshVideoList()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 重载视频列表
|
||||||
|
function refreshVideoList() {
|
||||||
list.pageNum = 1
|
list.pageNum = 1
|
||||||
list.total = 0
|
list.total = 0
|
||||||
getLst()
|
getLst()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取更多视频列表
|
// 获取更多视频列表
|
||||||
function getMoreVideoList() {
|
function getMoreVideoList() {
|
||||||
if (list.data.length >= list.total) return
|
if (list.data.length >= list.total) return
|
||||||
list.pageNum++
|
list.pageNum++
|
||||||
getLst()
|
getLst()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取我的评论
|
// 获取我的评论
|
||||||
function getLst() {
|
function getLst() {
|
||||||
api.mine.myComment({
|
api.mine.myComment({
|
||||||
query: {
|
query: {
|
||||||
userId: userinfo.value.id,
|
userId: userinfo.value.id,
|
||||||
|
@ -80,18 +97,48 @@
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取我的评论
|
||||||
|
function getList(id) {
|
||||||
|
api.mine.myComment({
|
||||||
|
query: {
|
||||||
|
userId: id ? id : userinfo.value.id,
|
||||||
|
pageNum: list.pageNum,
|
||||||
|
pageSize: list.pageSize,
|
||||||
}
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
if (list.pageNum) list.data.length = 0
|
||||||
|
// 追加视频列表
|
||||||
|
list.data.push(...rs.data[0].CommentVo.map(item => {
|
||||||
|
return item
|
||||||
|
}))
|
||||||
|
// 视频列表
|
||||||
|
list.total = rs.total
|
||||||
|
console.log('list', list.data)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="appbw">
|
<view class="appbw">
|
||||||
<view class="listBox plr30 ">
|
<view class="listBox plr30 ">
|
||||||
<view class="list ptb30 plr10" v-for="(item,index) in list.data" :key="index">
|
<view class="list ptb30 plr10" v-for="(item, index) in list.data" :key="index">
|
||||||
<view class="rows">
|
<view class="rows">
|
||||||
<view class="message">
|
<view class="message">
|
||||||
<view class="title f32 c333">评论了 视频</view>
|
<view class="title f32 c333">评论了{{ item.commentType }}</view>
|
||||||
<view class="content t2hd mtb15 c333 f32">{{item.content}}</view>
|
<view class="content t2hd mtb15 c333 f32">{{ item.content }}</view>
|
||||||
<view class="time mt15 f28 c999">{{item.createTime}}</view>
|
<view class="time mt15 f28 c999">{{ item.createTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="image ml20" v-if="item.imageUrl">
|
<view class="image ml20" v-if="item.imageUrl">
|
||||||
<image class="wh120 br10" :src="item.imageUrl" mode="aspectFill" />
|
<image class="wh120 br10" :src="item.imageUrl" mode="aspectFill" />
|
||||||
|
@ -106,12 +153,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
//
|
//
|
||||||
.listBox {
|
.listBox {
|
||||||
|
|
||||||
// 列表
|
// 列表
|
||||||
.list+.list {
|
.list+.list {
|
||||||
border-top: 2rpx solid #eee;
|
border-top: 2rpx solid #eee;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,10 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 聊天页面
|
* 聊天页面
|
||||||
*/
|
*/
|
||||||
// 腾讯云聊天
|
// 腾讯云聊天
|
||||||
import TencentCloudChat from '@tencentcloud/chat';
|
import TencentCloudChat from '@tencentcloud/chat';
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
nextTick,
|
nextTick,
|
||||||
|
@ -13,37 +13,37 @@
|
||||||
computed,
|
computed,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
watch,
|
watch,
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
// api
|
// api
|
||||||
import api from '@/api/index.js'
|
import api from '@/api/index.js'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util.js'
|
import util from '@/common/js/util.js'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onReady,
|
onReady,
|
||||||
onPageScroll,
|
onPageScroll,
|
||||||
onUnload
|
onUnload
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
|
|
||||||
// 单条消息
|
// 单条消息
|
||||||
import newsTemplate from './components/news-temp'
|
import newsTemplate from './components/news-temp'
|
||||||
// 表情
|
// 表情
|
||||||
import emoji from './emoji.vue'
|
import emoji from './emoji.vue'
|
||||||
// 语音条
|
// 语音条
|
||||||
import JyVoice from './jy-voice.vue'
|
import JyVoice from './jy-voice.vue'
|
||||||
// 加号菜单
|
// 加号菜单
|
||||||
import JyPlus from './jy-plus.vue'
|
import JyPlus from './jy-plus.vue'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
useStore
|
useStore
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
|
||||||
// 聊天对象
|
// 聊天对象
|
||||||
const msg = reactive({
|
const msg = reactive({
|
||||||
// 聊天对象
|
// 聊天对象
|
||||||
id: '',
|
id: '',
|
||||||
// 聊天类型 C2C单聊 GROUP群聊
|
// 聊天类型 C2C单聊 GROUP群聊
|
||||||
|
@ -52,41 +52,41 @@
|
||||||
num: '',
|
num: '',
|
||||||
// 是否客服聊天
|
// 是否客服聊天
|
||||||
isCustomer: false,
|
isCustomer: false,
|
||||||
})
|
})
|
||||||
// 输入的内容
|
// 输入的内容
|
||||||
const content = ref('')
|
const content = ref('')
|
||||||
// 加载
|
// 加载
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userinfo = computed(() => {
|
const userinfo = computed(() => {
|
||||||
let result = store.state.userinfo
|
let result = store.state.userinfo
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
// 列表数据
|
// 列表数据
|
||||||
const list = reactive({
|
const list = reactive({
|
||||||
// 列表条数
|
// 列表条数
|
||||||
limit: 20,
|
limit: 20,
|
||||||
//显示的数据
|
//显示的数据
|
||||||
data: [],
|
data: [],
|
||||||
//
|
//
|
||||||
total: 0,
|
total: 0,
|
||||||
})
|
})
|
||||||
// 滚动条位置
|
// 滚动条位置
|
||||||
const top = ref(0)
|
const top = ref(0)
|
||||||
// 工具条的高度
|
// 工具条的高度
|
||||||
const toolHeight = ref(0)
|
const toolHeight = ref(0)
|
||||||
// 当前操作的元素
|
// 当前操作的元素
|
||||||
const messageItem = ref({})
|
const messageItem = ref({})
|
||||||
// 工具栏状态 voice录音 input输入框 emoji表情 plus加号菜单
|
// 工具栏状态 voice录音 input输入框 emoji表情 plus加号菜单
|
||||||
const toolStatus = ref('input')
|
const toolStatus = ref('input')
|
||||||
// video路径
|
// video路径
|
||||||
const videoUrl = ref('')
|
const videoUrl = ref('')
|
||||||
// 视频上下文
|
// 视频上下文
|
||||||
const videoContext = ref(null)
|
const videoContext = ref(null)
|
||||||
// 红包对象
|
// 红包对象
|
||||||
const redPacket = reactive({})
|
const redPacket = reactive({})
|
||||||
|
|
||||||
onLoad(option => {
|
onLoad(option => {
|
||||||
// 标题
|
// 标题
|
||||||
let title = ''
|
let title = ''
|
||||||
// 聊天类型
|
// 聊天类型
|
||||||
|
@ -121,30 +121,30 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
})
|
})
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
uni.createSelectorQuery().in(proxy).select('#tool').boundingClientRect((rect) => {
|
uni.createSelectorQuery().in(proxy).select('#tool').boundingClientRect((rect) => {
|
||||||
toolHeight.value = rect.height
|
toolHeight.value = rect.height
|
||||||
}).exec();
|
}).exec();
|
||||||
//
|
//
|
||||||
videoContext.value = uni.createVideoContext('video')
|
videoContext.value = uni.createVideoContext('video')
|
||||||
})
|
})
|
||||||
|
|
||||||
onPageScroll((ev) => {
|
onPageScroll((ev) => {
|
||||||
onContentScroll(ev)
|
onContentScroll(ev)
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
uni.offKeyboardHeightChange(() => {})
|
uni.offKeyboardHeightChange(() => { })
|
||||||
// #endif
|
// #endif
|
||||||
videoContext.value.stop()
|
videoContext.value.stop()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 开启监听消息
|
// 开启监听消息
|
||||||
function addListener() {
|
function addListener() {
|
||||||
let onMessageReceived = function(event) {
|
let onMessageReceived = function (event) {
|
||||||
console.log('TencentCloudChat.EVENT.MESSAGE_RECEIVED', event)
|
console.log('TencentCloudChat.EVENT.MESSAGE_RECEIVED', event)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 获取历史记录
|
// 获取历史记录
|
||||||
|
@ -158,18 +158,18 @@
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
uni.$chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived);
|
uni.$chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived);
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听内容滚动
|
// 监听内容滚动
|
||||||
function onContentScroll(ev) {
|
function onContentScroll(ev) {
|
||||||
if (ev.scrollTop == 50) getMoreHistroy()
|
if (ev.scrollTop == 50) getMoreHistroy()
|
||||||
debounce(() => {
|
debounce(() => {
|
||||||
top.value = ev.detail.scrollTop
|
top.value = ev.detail.scrollTop
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击发送
|
// 点击发送
|
||||||
function handleSend() {
|
function handleSend() {
|
||||||
// 发送消息
|
// 发送消息
|
||||||
sendMsg({
|
sendMsg({
|
||||||
query: {
|
query: {
|
||||||
|
@ -185,21 +185,21 @@
|
||||||
content.value = ''
|
content.value = ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加号菜单发送
|
* 加号菜单发送
|
||||||
* @param {Object} message 消息对象
|
* @param {Object} message 消息对象
|
||||||
*/
|
*/
|
||||||
function handlePlusSend(message) {
|
function handlePlusSend(message) {
|
||||||
sendMsg(message)
|
sendMsg(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送消息
|
* 发送消息
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
*/
|
*/
|
||||||
function sendMsg(param) {
|
function sendMsg(param) {
|
||||||
//
|
//
|
||||||
let request = api.news.sendUserMsg
|
let request = api.news.sendUserMsg
|
||||||
//
|
//
|
||||||
|
@ -226,13 +226,13 @@
|
||||||
}).catch((rs) => {
|
}).catch((rs) => {
|
||||||
console.log('sendMsg error:', rs);
|
console.log('sendMsg error:', rs);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打开红包详情
|
* 打开红包详情
|
||||||
* @param {Object} ev
|
* @param {Object} ev
|
||||||
*/
|
*/
|
||||||
function handleRedPacket(ev) {
|
function handleRedPacket(ev) {
|
||||||
messageItem.value = ev
|
messageItem.value = ev
|
||||||
api.news.getRedPacketInfo({
|
api.news.getRedPacketInfo({
|
||||||
query: {
|
query: {
|
||||||
|
@ -250,10 +250,10 @@
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 领取红包
|
// 领取红包
|
||||||
function handleOpenReadPacket() {
|
function handleOpenReadPacket() {
|
||||||
// 如果不能领取
|
// 如果不能领取
|
||||||
if (redPacket.redStatus == false) return
|
if (redPacket.redStatus == false) return
|
||||||
// 红包过期
|
// 红包过期
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
sendType: {
|
sendType: {
|
||||||
'C2C': '1',
|
'C2C': '1',
|
||||||
'GROUP': '2',
|
'GROUP': '2',
|
||||||
} [msg.type],
|
}[msg.type],
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
|
@ -286,38 +286,38 @@
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择的emoji
|
// 选择的emoji
|
||||||
function emojiTap(val) {
|
function emojiTap(val) {
|
||||||
content.value = content.value + val
|
content.value = content.value + val
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击工具栏
|
// 点击工具栏
|
||||||
function handleTool(val) {
|
function handleTool(val) {
|
||||||
if (toolStatus.value === val) toolStatus.value = 'input'
|
if (toolStatus.value === val) toolStatus.value = 'input'
|
||||||
else toolStatus.value = val
|
else toolStatus.value = val
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取更多消息记录
|
// 获取更多消息记录
|
||||||
function getMoreHistroy() {
|
function getMoreHistroy() {
|
||||||
// 获取第一条消息记录
|
// 获取第一条消息记录
|
||||||
if (list.total <= list.data.length) return
|
if (list.total <= list.data.length) return
|
||||||
getHistory({
|
getHistory({
|
||||||
msgId: list.data[0].id
|
msgId: list.data[0].id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取历史记录
|
* 获取历史记录
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
*/
|
*/
|
||||||
function getHistory(param = {}) {
|
function getHistory(param = {}) {
|
||||||
// 验证sdk是否准备完毕
|
// 验证sdk是否准备完毕
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
let isReady = uni.$chat.isReady();
|
let isReady = uni.$chat.isReady();
|
||||||
if (!isReady && userinfo.value.id) {
|
if (!isReady && userinfo.value.id) {
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
getHistory()
|
getHistory()
|
||||||
}, 200);
|
}, 200);
|
||||||
return
|
return
|
||||||
|
@ -376,10 +376,10 @@
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 滚动至底部
|
// 滚动至底部
|
||||||
function scrollToBottom() {
|
function scrollToBottom() {
|
||||||
uni.createSelectorQuery().in(proxy).select('#scroll-content').boundingClientRect((res) => {
|
uni.createSelectorQuery().in(proxy).select('#scroll-content').boundingClientRect((res) => {
|
||||||
top.value = res.height
|
top.value = res.height
|
||||||
|
|
||||||
|
@ -389,70 +389,68 @@
|
||||||
})
|
})
|
||||||
// console.log('top.value', top.value)
|
// console.log('top.value', top.value)
|
||||||
}).exec();
|
}).exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 防抖
|
// 防抖
|
||||||
function debounce(func, wait = 500) {
|
function debounce(func, wait = 500) {
|
||||||
let timeout = null;
|
let timeout = null;
|
||||||
return function(...args) {
|
return function (...args) {
|
||||||
clearTimeout(timeout)
|
clearTimeout(timeout)
|
||||||
timeout = setTimeout(() => {
|
timeout = setTimeout(() => {
|
||||||
func.apply(this, args)
|
func.apply(this, args)
|
||||||
}, wait);
|
}, wait);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 输入框聚焦
|
// 输入框聚焦
|
||||||
function onFocus() {
|
function onFocus() {
|
||||||
handleTool('input')
|
handleTool('input')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 输入语音
|
// 输入语音
|
||||||
function voiceSend(message) {
|
function voiceSend(message) {
|
||||||
console.log('handlePlusSend', message)
|
console.log('handlePlusSend', message)
|
||||||
sendMsg({
|
sendMsg(message)
|
||||||
message,
|
}
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 监听滚动
|
// 监听滚动
|
||||||
const handleScroll = (e) => {
|
const handleScroll = (e) => {
|
||||||
if (e.detail.scrollTop === 0) {
|
if (e.detail.scrollTop === 0) {
|
||||||
getHistory()
|
getHistory()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 撑起键盘的高度 打开该元素
|
// 撑起键盘的高度 打开该元素
|
||||||
const showGhost = ref(false)
|
const showGhost = ref(false)
|
||||||
// 给元素加高度
|
// 给元素加高度
|
||||||
const ghostBox = ref({
|
const ghostBox = ref({
|
||||||
height: '0px',
|
height: '0px',
|
||||||
duration: '0.25s'
|
duration: '0.25s'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 监听键盘高度变化
|
// 监听键盘高度变化
|
||||||
function keyboardheightchange(res) {
|
function keyboardheightchange(res) {
|
||||||
ghostBox.value = res.detail
|
ghostBox.value = res.detail
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
showGhost.value = res.detail.height > 0 ? true : false
|
showGhost.value = res.detail.height > 0 ? true : false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 看视频
|
* 看视频
|
||||||
* @param {Object} item 聊天消息对象
|
* @param {Object} item 聊天消息对象
|
||||||
*/
|
*/
|
||||||
function handleViewVideo(item) {
|
function handleViewVideo(item) {
|
||||||
videoUrl.value = item.payload.videoUrl
|
videoUrl.value = item.payload.videoUrl
|
||||||
// 进入全屏
|
// 进入全屏
|
||||||
videoContext.value.requestFullScreen()
|
videoContext.value.requestFullScreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听视频是否全屏
|
// 监听视频是否全屏
|
||||||
function onScreenChange(ev) {
|
function onScreenChange(ev) {
|
||||||
console.log('onScreenChange', ev)
|
console.log('onScreenChange', ev)
|
||||||
if (!ev.fullScreen) videoContext.value.pause()
|
if (!ev.fullScreen) videoContext.value.pause()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -572,17 +570,17 @@
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './index.scss';
|
@import './index.scss';
|
||||||
|
|
||||||
//
|
//
|
||||||
#video {
|
#video {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
.red-bag {
|
.red-bag {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 528rpx;
|
width: 528rpx;
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
|
@ -714,5 +712,5 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -16,39 +16,39 @@
|
||||||
</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);
|
||||||
|
@ -115,10 +115,10 @@
|
||||||
recorderManager.stop(); // 录音结束
|
recorderManager.stop(); // 录音结束
|
||||||
console.log('录音结束');
|
console.log('录音结束');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 监听录音停止事件
|
// 监听录音停止事件
|
||||||
recorderManager.onStop((res) => {
|
recorderManager.onStop((res) => {
|
||||||
// 被打断等情况不发送
|
// 被打断等情况不发送
|
||||||
if (voiceStop.value) {
|
if (voiceStop.value) {
|
||||||
return
|
return
|
||||||
|
@ -158,21 +158,30 @@
|
||||||
file: res
|
file: res
|
||||||
},
|
},
|
||||||
// 音频上传进度回调
|
// 音频上传进度回调
|
||||||
onProgress: function(event) {
|
onProgress: function (event) {
|
||||||
console.log('file uploading:', event)
|
console.log('file uploading:', event)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
emit('send', message)
|
|
||||||
|
let obj = {
|
||||||
|
query: {
|
||||||
|
toUserId: message.to,
|
||||||
|
formId: message.from,
|
||||||
|
msgType: message.type,
|
||||||
|
},
|
||||||
|
data: message
|
||||||
|
}
|
||||||
|
emit('send', obj)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('message catch', e)
|
console.log('message catch', e)
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
||||||
})
|
})
|
||||||
// #endif
|
// #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;
|
||||||
|
@ -181,13 +190,13 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.record {
|
.record {
|
||||||
width: 40vw;
|
width: 40vw;
|
||||||
height: 40vw;
|
height: 40vw;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -276,5 +285,5 @@
|
||||||
color: #f09b37;
|
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>
|
||||||
|
|
Loading…
Reference in New Issue