举报拉黑
This commit is contained in:
parent
0fb5844b6a
commit
770ac45b0e
@ -16,7 +16,7 @@ export function checkText({
|
||||
Content,
|
||||
}) {
|
||||
return http.request({
|
||||
url: 'https://console.tim.qq.com/v4/im_msg_audit/content_moderation'
|
||||
url: 'https://console.tim.qq.com/v4/im_msg_audit/content_moderation',
|
||||
method: Method.POST,
|
||||
params: {
|
||||
sdkappid: '1600080789',
|
||||
@ -26,7 +26,7 @@ export function checkText({
|
||||
contenttype: 'json'
|
||||
},
|
||||
data: {
|
||||
AuditName: '1600080789_1745821176_amtwGf'
|
||||
AuditName: '1600080789_1745821176_amtwGf',
|
||||
ContentType: 'Text',
|
||||
Content,
|
||||
ExtSender
|
||||
|
13
api/login.js
13
api/login.js
@ -1,4 +1,6 @@
|
||||
import { http } from "@/utils/request.js";
|
||||
import {
|
||||
http
|
||||
} from "@/utils/request.js";
|
||||
|
||||
import api from "@/config/api.js";
|
||||
|
||||
@ -74,3 +76,12 @@ export function logout () {
|
||||
needToken: true,
|
||||
})
|
||||
}
|
||||
|
||||
// 注销用户
|
||||
export function logoffConfirm() {
|
||||
return http.request({
|
||||
url: '/passport/member/cancellation',
|
||||
method: "PUT",
|
||||
needToken: true,
|
||||
})
|
||||
}
|
77
api/vlog.js
77
api/vlog.js
@ -255,7 +255,7 @@ export function vlogMyLikedList(page, pageSize, userId) {
|
||||
/**
|
||||
* 查询我喜欢的视频
|
||||
*/
|
||||
export function vlogMeTag(path, page, pageSize, userId) {
|
||||
export function vlogMeTag(path, page, pageSize, userId, myId = '') {
|
||||
return http.request({
|
||||
url: api.vlog + "/vlog/" + path,
|
||||
method: Method.GET,
|
||||
@ -263,7 +263,8 @@ export function vlogMeTag(path, page, pageSize, userId) {
|
||||
params: {
|
||||
page,
|
||||
pageSize,
|
||||
userId
|
||||
userId,
|
||||
myId
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -493,3 +494,75 @@ export function vlogQueryDoIFollowVloger({
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 举报
|
||||
*/
|
||||
export function reportVideo({
|
||||
myId,
|
||||
vlogId,
|
||||
reason,
|
||||
description
|
||||
}) {
|
||||
return http.request({
|
||||
url: api.vlog + "/fans/blockVideo",
|
||||
method: Method.POST,
|
||||
params: {
|
||||
myId,
|
||||
vlogId,
|
||||
reason,
|
||||
description
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉黑
|
||||
*/
|
||||
export function blockUser({
|
||||
myId,
|
||||
vlogerId
|
||||
}) {
|
||||
return http.request({
|
||||
url: api.vlog + "/fans/block",
|
||||
method: Method.POST,
|
||||
params: {
|
||||
myId,
|
||||
vlogerId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户是否拉黑博主
|
||||
*/
|
||||
export function queryBlockVloger({
|
||||
myId,
|
||||
vlogerId
|
||||
}) {
|
||||
return http.request({
|
||||
url: api.vlog + "/fans/queryBlockVloger",
|
||||
method: Method.GET,
|
||||
params: {
|
||||
myId,
|
||||
vlogerId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消拉黑
|
||||
*/
|
||||
export function cancelBlock({
|
||||
myId,
|
||||
vlogerId
|
||||
}) {
|
||||
return http.request({
|
||||
url: api.vlog + "/fans/cancelBlock",
|
||||
method: Method.POST,
|
||||
params: {
|
||||
myId,
|
||||
vlogerId
|
||||
}
|
||||
});
|
||||
}
|
@ -201,7 +201,19 @@
|
||||
></image>
|
||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
||||
</view>
|
||||
<!-- 5.转轮 -->
|
||||
<!-- 5.举报 -->
|
||||
<view
|
||||
v-if="item.isShowProgressBarTime == false"
|
||||
@click="toJubao(item)"
|
||||
style="opacity: 0.9; margin-top: 17px"
|
||||
>
|
||||
<image
|
||||
src="@/static/img/jubao.png"
|
||||
style="width: 40px; height: 40px; position: absolute; right: 5px"
|
||||
></image>
|
||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">举报</text>
|
||||
</view>
|
||||
<!-- 6.转轮 -->
|
||||
<block v-if="platform == 'ios' && false">
|
||||
<view
|
||||
v-if="item.isShowProgressBarTime == false"
|
||||
@ -594,6 +606,16 @@ export default {
|
||||
// 刷新点赞数据
|
||||
this.refreshVlogCounts();
|
||||
}
|
||||
// 初始化视频数据,处理举报
|
||||
if (data.init == 'guanzhu') {
|
||||
console.log('触发guanzhu初始化视频数据');
|
||||
this.get();
|
||||
}
|
||||
// 处理拉黑
|
||||
if (data.lahei == true) {
|
||||
console.log('触发初始化视频数据');
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
};
|
||||
this.platform = uni.getSystemInfoSync().platform;
|
||||
@ -633,6 +655,20 @@ export default {
|
||||
},
|
||||
onReady() {},
|
||||
methods: {
|
||||
toJubao(item) {
|
||||
var myUserInfo = storage.getVlogUserInfo();
|
||||
if (myUserInfo == null) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/passport/login',
|
||||
animationType: 'slide-in-bottom'
|
||||
});
|
||||
return;
|
||||
}
|
||||
//举报
|
||||
uni.navigateTo({
|
||||
url: `/pages/report/index?vlogId=${item.vlogId}&from=guanzhu`
|
||||
});
|
||||
},
|
||||
// 点赞取消点赞,后刷新点赞状态
|
||||
refreshLike(vlogId, flag) {
|
||||
var me = this;
|
||||
|
@ -201,7 +201,19 @@
|
||||
></image>
|
||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
||||
</view>
|
||||
<!-- 5.转轮 -->
|
||||
<!-- 5.举报 -->
|
||||
<view
|
||||
v-if="item.isShowProgressBarTime == false"
|
||||
@click="toJubao(item)"
|
||||
style="opacity: 0.9; margin-top: 17px"
|
||||
>
|
||||
<image
|
||||
src="@/static/img/jubao.png"
|
||||
style="width: 40px; height: 40px; position: absolute; right: 5px"
|
||||
></image>
|
||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">举报</text>
|
||||
</view>
|
||||
<!-- 6.转轮 -->
|
||||
<block v-if="platform == 'ios' && false">
|
||||
<view
|
||||
v-if="item.isShowProgressBarTime == false"
|
||||
@ -595,6 +607,16 @@ export default {
|
||||
// 刷新点赞数据
|
||||
this.refreshVlogCounts();
|
||||
}
|
||||
// 初始化视频数据,处理举报
|
||||
if (data.init == 'local') {
|
||||
console.log('触发local初始化视频数据');
|
||||
this.get();
|
||||
}
|
||||
// 处理拉黑
|
||||
if (data.lahei == true) {
|
||||
console.log('触发初始化视频数据');
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
};
|
||||
this.platform = uni.getSystemInfoSync().platform;
|
||||
@ -635,6 +657,20 @@ export default {
|
||||
},
|
||||
onReady() {},
|
||||
methods: {
|
||||
toJubao(item) {
|
||||
var myUserInfo = storage.getVlogUserInfo();
|
||||
if (myUserInfo == null) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/passport/login',
|
||||
animationType: 'slide-in-bottom'
|
||||
});
|
||||
return;
|
||||
}
|
||||
//举报
|
||||
uni.navigateTo({
|
||||
url: `/pages/report/index?vlogId=${item.vlogId}&from=local`
|
||||
});
|
||||
},
|
||||
// 点赞取消点赞,后刷新点赞状态
|
||||
refreshLike(vlogId, flag) {
|
||||
var me = this;
|
||||
|
@ -194,7 +194,19 @@
|
||||
></image>
|
||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
||||
</view>
|
||||
<!-- 5.转轮 -->
|
||||
<!-- 5.举报 -->
|
||||
<view
|
||||
v-if="item.isShowProgressBarTime == false"
|
||||
@click="toJubao(item)"
|
||||
style="opacity: 0.9; margin-top: 17px"
|
||||
>
|
||||
<image
|
||||
src="@/static/img/jubao.png"
|
||||
style="width: 40px; height: 40px; position: absolute; right: 5px"
|
||||
></image>
|
||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">举报</text>
|
||||
</view>
|
||||
<!-- 6.转轮 -->
|
||||
<block v-if="platform == 'ios' && false">
|
||||
<view
|
||||
v-if="item.isShowProgressBarTime == false"
|
||||
@ -589,6 +601,16 @@ export default {
|
||||
// 刷新点赞数据
|
||||
this.refreshVlogCounts();
|
||||
}
|
||||
// 初始化视频数据,处理举报
|
||||
if (data.init == 'tuijian') {
|
||||
console.log('触发初始化视频数据');
|
||||
this.get();
|
||||
}
|
||||
// 处理拉黑
|
||||
if (data.lahei == true) {
|
||||
console.log('触发初始化视频数据');
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
};
|
||||
this.platform = uni.getSystemInfoSync().platform;
|
||||
@ -629,6 +651,20 @@ export default {
|
||||
},
|
||||
onReady() {},
|
||||
methods: {
|
||||
toJubao(item) {
|
||||
var myUserInfo = storage.getVlogUserInfo();
|
||||
if (myUserInfo == null) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/passport/login',
|
||||
animationType: 'slide-in-bottom'
|
||||
});
|
||||
return;
|
||||
}
|
||||
//举报
|
||||
uni.navigateTo({
|
||||
url: `/pages/report/index?vlogId=${item.vlogId}&from=tuijian`
|
||||
});
|
||||
},
|
||||
async refreshVlogCounts() {
|
||||
// 查询当前点赞数,重新赋值给当前视频
|
||||
var me = this;
|
||||
|
BIN
icon.png
Executable file → Normal file
BIN
icon.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 360 KiB |
@ -3,7 +3,7 @@
|
||||
"appid": "__UNI__6DB512D",
|
||||
"description": "admin",
|
||||
"versionName": "4.0.0",
|
||||
"versionCode" : 402,
|
||||
"versionCode": 403,
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"android": {
|
||||
|
@ -487,6 +487,14 @@
|
||||
"titleNView": false //禁用原生导航栏
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/report/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "举报",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#181b27"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
|
@ -204,7 +204,19 @@
|
||||
></image>
|
||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
||||
</view>
|
||||
<!-- 5.转轮 -->
|
||||
<!-- 5.举报 -->
|
||||
<view
|
||||
v-if="item.isShowProgressBarTime == false"
|
||||
@click="toJubao(item)"
|
||||
style="opacity: 0.9; margin-top: 17px"
|
||||
>
|
||||
<image
|
||||
src="@/static/img/jubao.png"
|
||||
style="width: 40px; height: 40px; position: absolute; right: 5px"
|
||||
></image>
|
||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">举报</text>
|
||||
</view>
|
||||
<!-- 6.转轮 -->
|
||||
<block v-if="platform == 'ios' && false">
|
||||
<view
|
||||
v-if="item.isShowProgressBarTime == false"
|
||||
@ -635,6 +647,20 @@ export default {
|
||||
},
|
||||
onReady() {},
|
||||
methods: {
|
||||
toJubao(item) {
|
||||
var myUserInfo = storage.getVlogUserInfo();
|
||||
if (myUserInfo == null) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/passport/login',
|
||||
animationType: 'slide-in-bottom'
|
||||
});
|
||||
return;
|
||||
}
|
||||
//举报
|
||||
uni.navigateTo({
|
||||
url: `/pages/report/index?vlogId=${item.vlogId}&from=detail`
|
||||
});
|
||||
},
|
||||
async refreshVlogCounts() {
|
||||
// 查询当前点赞数,重新赋值给当前视频
|
||||
var me = this;
|
||||
|
@ -128,10 +128,27 @@
|
||||
>
|
||||
<text class="follow-text">关注我</text>
|
||||
</view>
|
||||
<view
|
||||
v-if="block"
|
||||
class="follow-btn"
|
||||
@click="quxiaolahei"
|
||||
>
|
||||
<text class="follow-text">解除拉黑</text>
|
||||
</view>
|
||||
<view
|
||||
@click="lahei"
|
||||
v-if="!block"
|
||||
class="follow-btn"
|
||||
>
|
||||
<text class="follow-text">拉黑</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tab-wrapper">
|
||||
<view
|
||||
class="tab-wrapper"
|
||||
v-if="!block"
|
||||
>
|
||||
<view
|
||||
class="tab-item"
|
||||
@click="switchTab(0)"
|
||||
@ -170,7 +187,10 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="vlog-list">
|
||||
<view
|
||||
class="vlog-list"
|
||||
v-if="!block"
|
||||
>
|
||||
<view
|
||||
class="vlogBox"
|
||||
v-for="(vlog, index) in vlogList"
|
||||
@ -193,14 +213,14 @@
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-if="vlogList.length == 0"
|
||||
v-if="vlogList.length == 0 && block == false"
|
||||
class="empty"
|
||||
>
|
||||
<text class="empty-text">~ 空空如也 ~</text>
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-if="vlogList.length > 0"
|
||||
v-if="vlogList.length > 0 && block == false"
|
||||
class="not-empty"
|
||||
>
|
||||
<text class="not-empty-text">~ 没有更多了 ~</text>
|
||||
@ -214,7 +234,19 @@ let system = uni.getSystemInfoSync();
|
||||
import { clickFeedBack } from '@/utils/tools.js';
|
||||
import api from '@/config/api.js';
|
||||
import storage from '@/utils/storage.js'; //缓存
|
||||
import { vlogUserInfo, vlogQueryDoIFollowVloger, vlogMyPublicList, vlogMyPrivateList, vlogMyLikedList, vlogMeTag, vlogFansCancel, vlogFansFollow } from '@/api/vlog';
|
||||
import {
|
||||
queryBlockVloger,
|
||||
cancelBlock,
|
||||
blockUser,
|
||||
vlogUserInfo,
|
||||
vlogQueryDoIFollowVloger,
|
||||
vlogMyPublicList,
|
||||
vlogMyPrivateList,
|
||||
vlogMyLikedList,
|
||||
vlogMeTag,
|
||||
vlogFansCancel,
|
||||
vlogFansFollow
|
||||
} from '@/api/vlog';
|
||||
|
||||
import { getAstro, getAnimal, dateFormat, graceNumber, isStrEmpty } from '@/utils/tools.js';
|
||||
export default {
|
||||
@ -253,7 +285,8 @@ export default {
|
||||
page: 0,
|
||||
totalpage: 0,
|
||||
vlogList: [],
|
||||
channelComment: null
|
||||
channelComment: null,
|
||||
block: false //true=拉黑,false=没拉黑
|
||||
};
|
||||
},
|
||||
destroyed() {
|
||||
@ -333,9 +366,64 @@ export default {
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
// 查询我是否拉黑博主
|
||||
var isblock = await queryBlockVloger({ myId: myUserId, vlogerId: userPageId });
|
||||
if (isblock.data.status == 200) {
|
||||
this.block = isblock.data.data;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async quxiaolahei() {
|
||||
var myUserInfo = storage.getVlogUserInfo();
|
||||
if (myUserInfo == null) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/passport/login',
|
||||
animationType: 'slide-in-bottom'
|
||||
});
|
||||
return;
|
||||
}
|
||||
var res = await cancelBlock({
|
||||
myId: myUserInfo.id, //我的id
|
||||
vlogerId: this.userPageId // 博主id
|
||||
});
|
||||
if (res.data.status == 200) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '已解除拉黑'
|
||||
});
|
||||
this.channelComment.postMessage({
|
||||
type: 'comment-counts',
|
||||
data: { lahei: true }
|
||||
});
|
||||
this.block = false;
|
||||
}
|
||||
},
|
||||
async lahei() {
|
||||
var myUserInfo = storage.getVlogUserInfo();
|
||||
if (myUserInfo == null) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/passport/login',
|
||||
animationType: 'slide-in-bottom'
|
||||
});
|
||||
return;
|
||||
}
|
||||
var res = await blockUser({
|
||||
myId: myUserInfo.id, //我的id
|
||||
vlogerId: this.userPageId // 博主id
|
||||
});
|
||||
if (res.data.status == 200) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '已拉黑'
|
||||
});
|
||||
this.block = true;
|
||||
this.channelComment.postMessage({
|
||||
type: 'comment-counts',
|
||||
data: { lahei: true }
|
||||
});
|
||||
}
|
||||
},
|
||||
setBasicUserInfo(myUserInfo) {
|
||||
// 根据生日判断星座
|
||||
let birthday = myUserInfo.birthday;
|
||||
@ -376,7 +464,12 @@ export default {
|
||||
page = page + 1;
|
||||
me.page = page;
|
||||
let userId = me.userPageId;
|
||||
var result = await vlogMeTag(requrl, page, 10, userId);
|
||||
var myUserInfo = storage.getVlogUserInfo();
|
||||
var myId = '';
|
||||
if (myUserInfo != null) {
|
||||
myId = myUserInfo.id;
|
||||
}
|
||||
var result = await vlogMeTag(requrl, page, 10, userId, myId);
|
||||
if (result.data.status == 200) {
|
||||
let vlogList = result.data.data.rows;
|
||||
console.log(vlogList);
|
||||
|
@ -44,6 +44,11 @@
|
||||
:title="`关于我们`"
|
||||
@click="navigateTo('/pages/mine/set/editionIntro')"
|
||||
></u-cell-item>
|
||||
<u-cell-item
|
||||
title="用户注销"
|
||||
v-if="userInfo.id"
|
||||
@click="logoff"
|
||||
></u-cell-item>
|
||||
</u-cell-group>
|
||||
<view
|
||||
class="submit"
|
||||
@ -105,6 +110,13 @@ export default {
|
||||
this.$options.filters.navigateToLogin('redirectTo');
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户注销
|
||||
*/
|
||||
logoff() {
|
||||
this.$options.filters.logoff();
|
||||
},
|
||||
|
||||
/**
|
||||
* 确认退出
|
||||
* 清除缓存重新登录
|
||||
|
@ -82,6 +82,15 @@
|
||||
>
|
||||
<text class="btn-text">发布视频</text>
|
||||
</view>
|
||||
<view class="pubInfo">
|
||||
<text style="color: #fff; font-size: 24rpx">欢迎使用本应用。为保障所有用户良好的使用体验,您必须同意以下内容:</text>
|
||||
<text style="color: #fff; font-size: 24rpx">1. 禁止上传或传播任何违法、淫秽、暴力、骚扰、恐吓、辱骂、仇恨等内容;</text>
|
||||
<text style="color: #fff; font-size: 24rpx">2. 禁止骚扰、恶意攻击或冒充他人;</text>
|
||||
<text style="color: #fff; font-size: 24rpx">3. 对于举报内容,我们将在24小时内进行审核处理;</text>
|
||||
<text style="color: #fff; font-size: 24rpx">4. 严重违规者,我们将删除其内容并永久封禁账号;</text>
|
||||
<text style="color: #fff; font-size: 24rpx">5.用户可通过设置页面提交账号注销申请,我们将在合理时间内完成数据清除。</text>
|
||||
<text style="color: #fff; font-size: 24rpx">继续使用本应用即表示您已阅读并同意本协议。</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
@ -92,6 +101,7 @@ import storage from '@/utils/storage.js'; //缓存
|
||||
// graceNumber
|
||||
// } from '@/utils/tools.js'
|
||||
import api from '@/config/api.js';
|
||||
import { checkText } from '@/api/checkInfo.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -162,7 +172,7 @@ export default {
|
||||
let event = e;
|
||||
this.title = e.detail.value;
|
||||
},
|
||||
doPublich() {
|
||||
async doPublich() {
|
||||
if (!this.upFlage) {
|
||||
return;
|
||||
}
|
||||
@ -189,7 +199,20 @@ export default {
|
||||
height: me.height,
|
||||
cityCode: storage.getCityCode()
|
||||
};
|
||||
|
||||
// 校验文本内容
|
||||
var checkData = {
|
||||
ExtSender: userId,
|
||||
Content: this.title
|
||||
};
|
||||
var checkRes = await checkText(checkData);
|
||||
console.log(checkRes);
|
||||
if (checkRes.data.Result == 'Block') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '标题内容违规'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 发布视频
|
||||
let serverUrl = api.vlog;
|
||||
uni.request({
|
||||
@ -304,6 +327,12 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pubInfo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.prpage {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
158
pages/report/index.vue
Normal file
158
pages/report/index.vue
Normal file
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-alert-tips
|
||||
:show-icon="true"
|
||||
type="info"
|
||||
:description="description"
|
||||
></u-alert-tips>
|
||||
<view style="margin-top: 20rpx; padding: 0 40rpx">
|
||||
<u-radio-group
|
||||
:width="'50%'"
|
||||
size="50"
|
||||
v-model="jubaoType"
|
||||
>
|
||||
<u-radio
|
||||
style="margin-top: 20rpx"
|
||||
:label-disabled="false"
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
:name="item.content"
|
||||
>
|
||||
{{ item.content }}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
<!-- -->
|
||||
<view style="margin-top: 40rpx">
|
||||
<view style="margin-bottom: 20rpx">举报描述(选填)</view>
|
||||
<u-input
|
||||
maxlength="32"
|
||||
v-model="des"
|
||||
:type="'textarea'"
|
||||
:border="true"
|
||||
:height="200"
|
||||
:auto-height="true"
|
||||
/>
|
||||
<view style="text-align: right">{{ des.length }}/32</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<u-button
|
||||
class="custom-style"
|
||||
:ripple="true"
|
||||
type="error"
|
||||
@click="sub"
|
||||
>
|
||||
提交
|
||||
</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reportVideo } from '@/api/vlog';
|
||||
import storage from '@/utils/storage.js'; //缓存
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
vlogId: '',
|
||||
channelComment: null,
|
||||
description: '您的举报我们将尽快受理,核实后我们将第一时间告知受理结果,请尽量提交完整的举报描述',
|
||||
jubaoType: '',
|
||||
des: '',
|
||||
list: [
|
||||
{
|
||||
id: 1,
|
||||
content: '低俗色情'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
content: '违法犯罪'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
content: '涉政信息'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
content: '虚假宣传'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
content: '不良向导'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
content: '侵犯个人隐私'
|
||||
}
|
||||
],
|
||||
flag: true
|
||||
};
|
||||
},
|
||||
destroyed() {
|
||||
console.log('举报页面销毁');
|
||||
// 销毁时关闭 BroadcastChannel
|
||||
if (this.channelComment) {
|
||||
this.channelComment.close();
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.channelComment = new BroadcastChannel('comment-counts');
|
||||
this.vlogId = e.vlogId;
|
||||
this.init = e.from;
|
||||
},
|
||||
methods: {
|
||||
async sub() {
|
||||
if (!this.flag) return;
|
||||
this.flag = false;
|
||||
console.log(this.jubaoType);
|
||||
if (this.jubaoType) {
|
||||
var data = {
|
||||
myId: storage.getVlogUserInfo().id,
|
||||
vlogId: this.vlogId,
|
||||
reason: this.jubaoType,
|
||||
description: this.des
|
||||
};
|
||||
console.log(data);
|
||||
var res = await reportVideo(data);
|
||||
console.log(res);
|
||||
if (res.data.status == 200) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '举报成功'
|
||||
});
|
||||
// 刷新对应的videoList
|
||||
this.channelComment.postMessage({
|
||||
type: 'comment-counts',
|
||||
data: { lahei: true }
|
||||
});
|
||||
setTimeout(() => {
|
||||
if (this.init == 'detail') {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/vlog/index'
|
||||
});
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
this.flag = true;
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请选择举报原因'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.custom-style {
|
||||
width: 680rpx;
|
||||
margin: 0 auto;
|
||||
position: fixed;
|
||||
bottom: 50rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
</style>
|
@ -236,6 +236,7 @@ export default {
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
console.log('首页');
|
||||
var prop = this.pageList[this.curIndex];
|
||||
if (storage.getRefreshVlogIndex() == '1') {
|
||||
// 登录后需要刷新数据
|
||||
@ -247,8 +248,15 @@ export default {
|
||||
} else {
|
||||
try {
|
||||
console.log('index刷新子组件');
|
||||
var lst = this.$refs[prop].dataList;
|
||||
if (lst.length) {
|
||||
this.$refs[prop].showVd();
|
||||
} catch {}
|
||||
} else {
|
||||
this.$refs[prop].get();
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('首页刷新异常');
|
||||
}
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
|
BIN
static/img/jubao.png
Normal file
BIN
static/img/jubao.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -364,6 +364,7 @@
|
||||
|
||||
<script>
|
||||
import storage from '@/utils/storage.js'; //缓存
|
||||
import { checkText } from '@/api/checkInfo.js';
|
||||
import { vlogCommentCounts, vlogCommentUnLike, vlogCommentLike, vlogCommentDelete, vlogCommentList, vlogCommentCreate } from '@/api/vlog';
|
||||
import { dateFormat, graceNumber, getDateBeforeNow } from '@/utils/tools.js';
|
||||
|
||||
@ -695,6 +696,21 @@ export default {
|
||||
content: me.currentComment
|
||||
};
|
||||
|
||||
// 校验文本内容
|
||||
var checkData = {
|
||||
ExtSender: userId,
|
||||
Content: me.currentComment
|
||||
};
|
||||
var checkRes = await checkText(checkData);
|
||||
console.log(checkRes);
|
||||
if (checkRes.data.Result == 'Block') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '内容违规'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var result = await vlogCommentCreate(pendingCommentObject);
|
||||
console.log(result);
|
||||
if (result.data.status == 200) {
|
||||
|
@ -1,5 +1,11 @@
|
||||
import Foundation from "./Foundation.js";
|
||||
import storage from "@/utils/storage.js";
|
||||
import {
|
||||
logoffConfirm
|
||||
} from "@/api/login";
|
||||
import {
|
||||
clearIm
|
||||
} from "@/utils/handleim.js";
|
||||
/**
|
||||
* 金钱单位置换 2999 --> 2,999.00
|
||||
* @param val
|
||||
@ -91,6 +97,37 @@ export function clearStrComma(str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户注销
|
||||
*
|
||||
*/
|
||||
export function logoff() {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "确认注销用户么?注销用户将无法再次登录并失去当前数据。",
|
||||
confirmColor: Vue.prototype.$mainColor,
|
||||
async success(res) {
|
||||
if (res.confirm) {
|
||||
// 退出im登录
|
||||
clearIm()
|
||||
await logoffConfirm();
|
||||
storage.setHasLogin(false);
|
||||
storage.setAccessToken("");
|
||||
storage.setRefreshToken("");
|
||||
storage.setUuid("");
|
||||
storage.setUserInfo({});
|
||||
// 清理vlog信息
|
||||
storage.setVlogToken("");
|
||||
storage.setVlogUserInfo(null);
|
||||
// 清除初始化数据内容
|
||||
storage.setRefreshVlogIndex("1"); //需要刷新
|
||||
|
||||
navigateToLogin("redirectTo");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断用户是否登录
|
||||
* @param val 如果为auth则判断是否登录
|
||||
|
Loading…
x
Reference in New Issue
Block a user