举报拉黑
This commit is contained in:
parent
0fb5844b6a
commit
770ac45b0e
@ -16,7 +16,7 @@ export function checkText({
|
|||||||
Content,
|
Content,
|
||||||
}) {
|
}) {
|
||||||
return http.request({
|
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,
|
method: Method.POST,
|
||||||
params: {
|
params: {
|
||||||
sdkappid: '1600080789',
|
sdkappid: '1600080789',
|
||||||
@ -26,7 +26,7 @@ export function checkText({
|
|||||||
contenttype: 'json'
|
contenttype: 'json'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
AuditName: '1600080789_1745821176_amtwGf'
|
AuditName: '1600080789_1745821176_amtwGf',
|
||||||
ContentType: 'Text',
|
ContentType: 'Text',
|
||||||
Content,
|
Content,
|
||||||
ExtSender
|
ExtSender
|
||||||
|
81
api/login.js
81
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";
|
import api from "@/config/api.js";
|
||||||
|
|
||||||
@ -7,22 +9,22 @@ import api from "@/config/api.js";
|
|||||||
* @param mobile
|
* @param mobile
|
||||||
*/
|
*/
|
||||||
export function resetByMobile(params) {
|
export function resetByMobile(params) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: `/passport/member/resetByMobile`,
|
url: `/passport/member/resetByMobile`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送验证码
|
* 发送验证码
|
||||||
* @param mobile
|
* @param mobile
|
||||||
*/
|
*/
|
||||||
export function sendMobile(mobile,type='LOGIN') {
|
export function sendMobile(mobile, type = 'LOGIN') {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: `${api.common}/common/sms/${type}/${mobile}`,
|
url: `${api.common}/common/sms/${type}/${mobile}`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,15 +33,15 @@ export function sendMobile(mobile,type='LOGIN') {
|
|||||||
* @param smsCode
|
* @param smsCode
|
||||||
*/
|
*/
|
||||||
export function smsLogin(params, clientType) {
|
export function smsLogin(params, clientType) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: `/passport/member/smsLogin`,
|
url: `/passport/member/smsLogin`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
"content-type": "application/x-www-form-urlencoded",
|
"content-type": "application/x-www-form-urlencoded",
|
||||||
clientType: clientType,
|
clientType: clientType,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,28 +51,37 @@ export function smsLogin(params, clientType) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export function modifyPass(params) {
|
export function modifyPass(params) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: `/passport/member/modifyPass`,
|
url: `/passport/member/modifyPass`,
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新token
|
* 刷新token
|
||||||
*/
|
*/
|
||||||
export function refreshTokenFn(refresh_token) {
|
export function refreshTokenFn(refresh_token) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: `/passport/member/refresh/${refresh_token}`,
|
url: `/passport/member/refresh/${refresh_token}`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取密码状态
|
// 获取密码状态
|
||||||
export function logout () {
|
export function logout() {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: '/passport/member/logout',
|
url: '/passport/member/logout',
|
||||||
method: "POST",
|
method: "POST",
|
||||||
needToken: true,
|
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({
|
return http.request({
|
||||||
url: api.vlog + "/vlog/" + path,
|
url: api.vlog + "/vlog/" + path,
|
||||||
method: Method.GET,
|
method: Method.GET,
|
||||||
@ -263,7 +263,8 @@ export function vlogMeTag(path, page, pageSize, userId) {
|
|||||||
params: {
|
params: {
|
||||||
page,
|
page,
|
||||||
pageSize,
|
pageSize,
|
||||||
userId
|
userId,
|
||||||
|
myId
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -492,4 +493,76 @@ export function vlogQueryDoIFollowVloger({
|
|||||||
vlogerId
|
vlogerId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 举报
|
||||||
|
*/
|
||||||
|
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>
|
></image>
|
||||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
||||||
</view>
|
</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">
|
<block v-if="platform == 'ios' && false">
|
||||||
<view
|
<view
|
||||||
v-if="item.isShowProgressBarTime == false"
|
v-if="item.isShowProgressBarTime == false"
|
||||||
@ -594,6 +606,16 @@ export default {
|
|||||||
// 刷新点赞数据
|
// 刷新点赞数据
|
||||||
this.refreshVlogCounts();
|
this.refreshVlogCounts();
|
||||||
}
|
}
|
||||||
|
// 初始化视频数据,处理举报
|
||||||
|
if (data.init == 'guanzhu') {
|
||||||
|
console.log('触发guanzhu初始化视频数据');
|
||||||
|
this.get();
|
||||||
|
}
|
||||||
|
// 处理拉黑
|
||||||
|
if (data.lahei == true) {
|
||||||
|
console.log('触发初始化视频数据');
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.platform = uni.getSystemInfoSync().platform;
|
this.platform = uni.getSystemInfoSync().platform;
|
||||||
@ -633,6 +655,20 @@ export default {
|
|||||||
},
|
},
|
||||||
onReady() {},
|
onReady() {},
|
||||||
methods: {
|
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) {
|
refreshLike(vlogId, flag) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -201,7 +201,19 @@
|
|||||||
></image>
|
></image>
|
||||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
||||||
</view>
|
</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">
|
<block v-if="platform == 'ios' && false">
|
||||||
<view
|
<view
|
||||||
v-if="item.isShowProgressBarTime == false"
|
v-if="item.isShowProgressBarTime == false"
|
||||||
@ -595,6 +607,16 @@ export default {
|
|||||||
// 刷新点赞数据
|
// 刷新点赞数据
|
||||||
this.refreshVlogCounts();
|
this.refreshVlogCounts();
|
||||||
}
|
}
|
||||||
|
// 初始化视频数据,处理举报
|
||||||
|
if (data.init == 'local') {
|
||||||
|
console.log('触发local初始化视频数据');
|
||||||
|
this.get();
|
||||||
|
}
|
||||||
|
// 处理拉黑
|
||||||
|
if (data.lahei == true) {
|
||||||
|
console.log('触发初始化视频数据');
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.platform = uni.getSystemInfoSync().platform;
|
this.platform = uni.getSystemInfoSync().platform;
|
||||||
@ -635,6 +657,20 @@ export default {
|
|||||||
},
|
},
|
||||||
onReady() {},
|
onReady() {},
|
||||||
methods: {
|
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) {
|
refreshLike(vlogId, flag) {
|
||||||
var me = this;
|
var me = this;
|
||||||
@ -1344,4 +1380,4 @@ export default {
|
|||||||
/* background-color: #000000; */
|
/* background-color: #000000; */
|
||||||
background-color: #00ffff;
|
background-color: #00ffff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -194,7 +194,19 @@
|
|||||||
></image>
|
></image>
|
||||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
||||||
</view>
|
</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">
|
<block v-if="platform == 'ios' && false">
|
||||||
<view
|
<view
|
||||||
v-if="item.isShowProgressBarTime == false"
|
v-if="item.isShowProgressBarTime == false"
|
||||||
@ -589,6 +601,16 @@ export default {
|
|||||||
// 刷新点赞数据
|
// 刷新点赞数据
|
||||||
this.refreshVlogCounts();
|
this.refreshVlogCounts();
|
||||||
}
|
}
|
||||||
|
// 初始化视频数据,处理举报
|
||||||
|
if (data.init == 'tuijian') {
|
||||||
|
console.log('触发初始化视频数据');
|
||||||
|
this.get();
|
||||||
|
}
|
||||||
|
// 处理拉黑
|
||||||
|
if (data.lahei == true) {
|
||||||
|
console.log('触发初始化视频数据');
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.platform = uni.getSystemInfoSync().platform;
|
this.platform = uni.getSystemInfoSync().platform;
|
||||||
@ -629,6 +651,20 @@ export default {
|
|||||||
},
|
},
|
||||||
onReady() {},
|
onReady() {},
|
||||||
methods: {
|
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() {
|
async refreshVlogCounts() {
|
||||||
// 查询当前点赞数,重新赋值给当前视频
|
// 查询当前点赞数,重新赋值给当前视频
|
||||||
var me = this;
|
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 |
486
manifest.json
486
manifest.json
@ -1,243 +1,243 @@
|
|||||||
{
|
{
|
||||||
"name" : "无终街",
|
"name": "无终街",
|
||||||
"appid" : "__UNI__6DB512D",
|
"appid": "__UNI__6DB512D",
|
||||||
"description" : "admin",
|
"description": "admin",
|
||||||
"versionName" : "4.0.0",
|
"versionName": "4.0.0",
|
||||||
"versionCode" : 402,
|
"versionCode": 403,
|
||||||
"transformPx" : false,
|
"transformPx": false,
|
||||||
"app-plus" : {
|
"app-plus": {
|
||||||
"android" : {
|
"android": {
|
||||||
"versionCode" : 4000049, // Android 版本号
|
"versionCode": 4000049, // Android 版本号
|
||||||
"versionName" : "4.0.0" // 用户看到的版本号
|
"versionName": "4.0.0" // 用户看到的版本号
|
||||||
},
|
},
|
||||||
"compatible" : {
|
"compatible": {
|
||||||
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
"ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||||
},
|
},
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler": "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion": 3,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"usingComponents" : true,
|
"usingComponents": true,
|
||||||
"splashscreen" : {
|
"splashscreen": {
|
||||||
"alwaysShowBeforeRender" : true,
|
"alwaysShowBeforeRender": true,
|
||||||
"waiting" : true,
|
"waiting": true,
|
||||||
"autoclose" : true,
|
"autoclose": true,
|
||||||
"delay" : 0
|
"delay": 0
|
||||||
},
|
},
|
||||||
"screenOrientation" : [ "portrait-primary" ],
|
"screenOrientation": ["portrait-primary"],
|
||||||
"modules" : {
|
"modules": {
|
||||||
"Payment" : {},
|
"Payment": {},
|
||||||
"Share" : {},
|
"Share": {},
|
||||||
"Geolocation" : {},
|
"Geolocation": {},
|
||||||
"Maps" : {},
|
"Maps": {},
|
||||||
"Camera" : {},
|
"Camera": {},
|
||||||
"Barcode" : {},
|
"Barcode": {},
|
||||||
"VideoPlayer" : {},
|
"VideoPlayer": {},
|
||||||
"Push" : {},
|
"Push": {},
|
||||||
"OAuth" : {}
|
"OAuth": {}
|
||||||
},
|
},
|
||||||
"error" : {
|
"error": {
|
||||||
/* 404错误页面*/
|
/* 404错误页面*/
|
||||||
"url" : "hybrid/html/error.html"
|
"url": "hybrid/html/error.html"
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"distribute" : {
|
"distribute": {
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"android" : {
|
"android": {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
"permissions" : [
|
"permissions": [
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
|
"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
|
"<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
],
|
],
|
||||||
"abiFilters" : [ "arm64-v8a" ],
|
"abiFilters": ["arm64-v8a"],
|
||||||
"schemes" : "wuzhongjie",
|
"schemes": "wuzhongjie",
|
||||||
"minSdkVersion" : 30,
|
"minSdkVersion": 30,
|
||||||
"targetSdkVersion" : 34
|
"targetSdkVersion": 34
|
||||||
},
|
},
|
||||||
"ios" : {
|
"ios": {
|
||||||
"idfa" : false,
|
"idfa": false,
|
||||||
"privacyDescription" : {
|
"privacyDescription": {
|
||||||
"NSPhotoLibraryUsageDescription" : "需要用与评论上传,头像上传功能",
|
"NSPhotoLibraryUsageDescription": "需要用与评论上传,头像上传功能",
|
||||||
"NSPhotoLibraryAddUsageDescription" : "保存商品图片到本地",
|
"NSPhotoLibraryAddUsageDescription": "保存商品图片到本地",
|
||||||
"NSCameraUsageDescription" : "需要用与扫描二维码和商品评论图片拍摄",
|
"NSCameraUsageDescription": "需要用与扫描二维码和商品评论图片拍摄",
|
||||||
"NSLocationAlwaysAndWhenInUseUsageDescription" : "可根据位置向您介绍附近的视频信息,提升浏览体验,或帮助你在发布的信息中展示位置,不授权不影响app正常使用",
|
"NSLocationAlwaysAndWhenInUseUsageDescription": "可根据位置向您介绍附近的视频信息,提升浏览体验,或帮助你在发布的信息中展示位置,不授权不影响app正常使用",
|
||||||
"NSMicrophoneUsageDescription" : "用户上传视频时需使用音频信息"
|
"NSMicrophoneUsageDescription": "用户上传视频时需使用音频信息"
|
||||||
},
|
},
|
||||||
"capabilities" : {
|
"capabilities": {
|
||||||
"entitlements" : {
|
"entitlements": {
|
||||||
"com.apple.developer.associated-domains" : [ "applinks:wuzhongjie.com.cn" ]
|
"com.apple.developer.associated-domains": ["applinks:wuzhongjie.com.cn"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"urltypes" : "wuzhongjie",
|
"urltypes": "wuzhongjie",
|
||||||
"dSYMs" : false
|
"dSYMs": false
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"sdkConfigs" : {
|
"sdkConfigs": {
|
||||||
"payment" : {
|
"payment": {
|
||||||
"weixin" : {
|
"weixin": {
|
||||||
"__platform__" : [ "ios", "android" ],
|
"__platform__": ["ios", "android"],
|
||||||
"appid" : "wxebcdaea31881caab",
|
"appid": "wxebcdaea31881caab",
|
||||||
"UniversalLinks" : "https://wuzhongjie.com.cn/ulink/"
|
"UniversalLinks": "https://wuzhongjie.com.cn/ulink/"
|
||||||
},
|
},
|
||||||
"alipay" : {
|
"alipay": {
|
||||||
"__platform__" : [ "ios", "android" ]
|
"__platform__": ["ios", "android"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ad" : {},
|
"ad": {},
|
||||||
"share" : {
|
"share": {
|
||||||
"weixin" : {
|
"weixin": {
|
||||||
"appid" : "wxebcdaea31881caab",
|
"appid": "wxebcdaea31881caab",
|
||||||
"UniversalLinks" : "https://wuzhongjie.com.cn/ulink/"
|
"UniversalLinks": "https://wuzhongjie.com.cn/ulink/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oauth" : {
|
"oauth": {
|
||||||
"weixin" : {
|
"weixin": {
|
||||||
"appid" : "wxebcdaea31881caab",
|
"appid": "wxebcdaea31881caab",
|
||||||
"UniversalLinks" : "https://wuzhongjie.com.cn/ulink/"
|
"UniversalLinks": "https://wuzhongjie.com.cn/ulink/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"geolocation" : {
|
"geolocation": {
|
||||||
"amap" : {
|
"amap": {
|
||||||
"__platform__" : [ "ios", "android" ],
|
"__platform__": ["ios", "android"],
|
||||||
"appkey_ios" : "f463d3350efe63f8be5d9a62f24d0aab",
|
"appkey_ios": "f463d3350efe63f8be5d9a62f24d0aab",
|
||||||
"appkey_android" : "fb3f1ccb34616c70f068aa950f3e27df"
|
"appkey_android": "fb3f1ccb34616c70f068aa950f3e27df"
|
||||||
},
|
},
|
||||||
"system" : {
|
"system": {
|
||||||
"__platform__" : [ "ios", "android" ]
|
"__platform__": ["ios", "android"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"maps" : {
|
"maps": {
|
||||||
"amap" : {
|
"amap": {
|
||||||
"appkey_ios" : "f463d3350efe63f8be5d9a62f24d0aab",
|
"appkey_ios": "f463d3350efe63f8be5d9a62f24d0aab",
|
||||||
"appkey_android" : "fb3f1ccb34616c70f068aa950f3e27df"
|
"appkey_android": "fb3f1ccb34616c70f068aa950f3e27df"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"push" : {}
|
"push": {}
|
||||||
},
|
},
|
||||||
"icons" : {
|
"icons": {
|
||||||
"android" : {
|
"android": {
|
||||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
"hdpi": "unpackage/res/icons/72x72.png",
|
||||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||||
},
|
},
|
||||||
"ios" : {
|
"ios": {
|
||||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||||
"ipad" : {
|
"ipad": {
|
||||||
"app" : "unpackage/res/icons/76x76.png",
|
"app": "unpackage/res/icons/76x76.png",
|
||||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
"app@2x": "unpackage/res/icons/152x152.png",
|
||||||
"notification" : "unpackage/res/icons/20x20.png",
|
"notification": "unpackage/res/icons/20x20.png",
|
||||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||||
"settings" : "unpackage/res/icons/29x29.png",
|
"settings": "unpackage/res/icons/29x29.png",
|
||||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
"spotlight": "unpackage/res/icons/40x40.png",
|
||||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||||
},
|
},
|
||||||
"iphone" : {
|
"iphone": {
|
||||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
"app@2x": "unpackage/res/icons/120x120.png",
|
||||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
"app@3x": "unpackage/res/icons/180x180.png",
|
||||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"splashscreen" : {
|
"splashscreen": {
|
||||||
"iosStyle" : "common",
|
"iosStyle": "common",
|
||||||
"ios" : {
|
"ios": {
|
||||||
"storyboard" : "CustomStoryboard.zip"
|
"storyboard": "CustomStoryboard.zip"
|
||||||
},
|
},
|
||||||
"androidStyle" : "default",
|
"androidStyle": "default",
|
||||||
"android" : {
|
"android": {
|
||||||
"hdpi" : "CustomStartPage/start-page.9.png",
|
"hdpi": "CustomStartPage/start-page.9.png",
|
||||||
"xhdpi" : "CustomStartPage/start-page.9.png",
|
"xhdpi": "CustomStartPage/start-page.9.png",
|
||||||
"xxhdpi" : "CustomStartPage/start-page.9.png"
|
"xxhdpi": "CustomStartPage/start-page.9.png"
|
||||||
},
|
},
|
||||||
"useOriginalMsgbox" : true
|
"useOriginalMsgbox": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nativePlugins" : {}
|
"nativePlugins": {}
|
||||||
},
|
},
|
||||||
"permission" : {
|
"permission": {
|
||||||
"scope.userLocation" : {
|
"scope.userLocation": {
|
||||||
"desc" : "你的位置信息将用于高德地图的效果展示"
|
"desc": "你的位置信息将用于高德地图的效果展示"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"quickapp" : {},
|
"quickapp": {},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin": {
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"usingComponents" : true,
|
"usingComponents": true,
|
||||||
"appid" : "wx6f10f29075dc1b0b",
|
"appid": "wx6f10f29075dc1b0b",
|
||||||
"optimization" : {
|
"optimization": {
|
||||||
"subPackages" : true
|
"subPackages": true
|
||||||
},
|
},
|
||||||
"setting" : {
|
"setting": {
|
||||||
"urlCheck" : false,
|
"urlCheck": false,
|
||||||
"minified" : true,
|
"minified": true,
|
||||||
"postcss" : false,
|
"postcss": false,
|
||||||
"es6" : true
|
"es6": true
|
||||||
},
|
},
|
||||||
"permission" : {
|
"permission": {
|
||||||
"scope.userLocation" : {
|
"scope.userLocation": {
|
||||||
"desc" : "位置信息将用于高德地图的效果展示"
|
"desc": "位置信息将用于高德地图的效果展示"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"plugins" : {
|
"plugins": {
|
||||||
"myPlugin" : {
|
"myPlugin": {
|
||||||
"version" : "1.1.0",
|
"version": "1.1.0",
|
||||||
"provider" : "wx738958e0f4c894f9"
|
"provider": "wx738958e0f4c894f9"
|
||||||
},
|
},
|
||||||
"live-player-plugin" : {
|
"live-player-plugin": {
|
||||||
"version" : "1.3.0",
|
"version": "1.3.0",
|
||||||
"provider" : "wx2b03c6e691cd7370"
|
"provider": "wx2b03c6e691cd7370"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"h5" : {
|
"h5": {
|
||||||
"devServer" : {
|
"devServer": {
|
||||||
"disableHostCheck" : true
|
"disableHostCheck": true
|
||||||
},
|
},
|
||||||
"router" : {
|
"router": {
|
||||||
"mode" : "history",
|
"mode": "history",
|
||||||
"base" : ""
|
"base": ""
|
||||||
},
|
},
|
||||||
"sdkConfigs" : {
|
"sdkConfigs": {
|
||||||
"maps" : {}
|
"maps": {}
|
||||||
},
|
},
|
||||||
"optimization" : {
|
"optimization": {
|
||||||
"treeShaking" : {
|
"treeShaking": {
|
||||||
"enable" : true
|
"enable": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title" : "lilishop",
|
"title": "lilishop",
|
||||||
"template" : ""
|
"template": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -487,6 +487,14 @@
|
|||||||
"titleNView": false //禁用原生导航栏
|
"titleNView": false //禁用原生导航栏
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/report/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "举报",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#181b27"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
|
@ -204,7 +204,19 @@
|
|||||||
></image>
|
></image>
|
||||||
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
<text style="color: #ffffff; margin-top: 5px; font-size: 14px; text-align: center; font-weight: bold; margin-top: 40px">分享</text>
|
||||||
</view>
|
</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">
|
<block v-if="platform == 'ios' && false">
|
||||||
<view
|
<view
|
||||||
v-if="item.isShowProgressBarTime == false"
|
v-if="item.isShowProgressBarTime == false"
|
||||||
@ -635,6 +647,20 @@ export default {
|
|||||||
},
|
},
|
||||||
onReady() {},
|
onReady() {},
|
||||||
methods: {
|
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() {
|
async refreshVlogCounts() {
|
||||||
// 查询当前点赞数,重新赋值给当前视频
|
// 查询当前点赞数,重新赋值给当前视频
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -128,10 +128,27 @@
|
|||||||
>
|
>
|
||||||
<text class="follow-text">关注我</text>
|
<text class="follow-text">关注我</text>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
|
|
||||||
<view class="tab-wrapper">
|
<view
|
||||||
|
class="tab-wrapper"
|
||||||
|
v-if="!block"
|
||||||
|
>
|
||||||
<view
|
<view
|
||||||
class="tab-item"
|
class="tab-item"
|
||||||
@click="switchTab(0)"
|
@click="switchTab(0)"
|
||||||
@ -170,7 +187,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="vlog-list">
|
<view
|
||||||
|
class="vlog-list"
|
||||||
|
v-if="!block"
|
||||||
|
>
|
||||||
<view
|
<view
|
||||||
class="vlogBox"
|
class="vlogBox"
|
||||||
v-for="(vlog, index) in vlogList"
|
v-for="(vlog, index) in vlogList"
|
||||||
@ -193,14 +213,14 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
v-if="vlogList.length == 0"
|
v-if="vlogList.length == 0 && block == false"
|
||||||
class="empty"
|
class="empty"
|
||||||
>
|
>
|
||||||
<text class="empty-text">~ 空空如也 ~</text>
|
<text class="empty-text">~ 空空如也 ~</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
v-if="vlogList.length > 0"
|
v-if="vlogList.length > 0 && block == false"
|
||||||
class="not-empty"
|
class="not-empty"
|
||||||
>
|
>
|
||||||
<text class="not-empty-text">~ 没有更多了 ~</text>
|
<text class="not-empty-text">~ 没有更多了 ~</text>
|
||||||
@ -214,7 +234,19 @@ let system = uni.getSystemInfoSync();
|
|||||||
import { clickFeedBack } from '@/utils/tools.js';
|
import { clickFeedBack } from '@/utils/tools.js';
|
||||||
import api from '@/config/api.js';
|
import api from '@/config/api.js';
|
||||||
import storage from '@/utils/storage.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';
|
import { getAstro, getAnimal, dateFormat, graceNumber, isStrEmpty } from '@/utils/tools.js';
|
||||||
export default {
|
export default {
|
||||||
@ -253,7 +285,8 @@ export default {
|
|||||||
page: 0,
|
page: 0,
|
||||||
totalpage: 0,
|
totalpage: 0,
|
||||||
vlogList: [],
|
vlogList: [],
|
||||||
channelComment: null
|
channelComment: null,
|
||||||
|
block: false //true=拉黑,false=没拉黑
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
@ -333,9 +366,64 @@ export default {
|
|||||||
duration: 3000
|
duration: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 查询我是否拉黑博主
|
||||||
|
var isblock = await queryBlockVloger({ myId: myUserId, vlogerId: userPageId });
|
||||||
|
if (isblock.data.status == 200) {
|
||||||
|
this.block = isblock.data.data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
setBasicUserInfo(myUserInfo) {
|
||||||
// 根据生日判断星座
|
// 根据生日判断星座
|
||||||
let birthday = myUserInfo.birthday;
|
let birthday = myUserInfo.birthday;
|
||||||
@ -376,7 +464,12 @@ export default {
|
|||||||
page = page + 1;
|
page = page + 1;
|
||||||
me.page = page;
|
me.page = page;
|
||||||
let userId = me.userPageId;
|
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) {
|
if (result.data.status == 200) {
|
||||||
let vlogList = result.data.data.rows;
|
let vlogList = result.data.data.rows;
|
||||||
console.log(vlogList);
|
console.log(vlogList);
|
||||||
|
@ -44,6 +44,11 @@
|
|||||||
:title="`关于我们`"
|
:title="`关于我们`"
|
||||||
@click="navigateTo('/pages/mine/set/editionIntro')"
|
@click="navigateTo('/pages/mine/set/editionIntro')"
|
||||||
></u-cell-item>
|
></u-cell-item>
|
||||||
|
<u-cell-item
|
||||||
|
title="用户注销"
|
||||||
|
v-if="userInfo.id"
|
||||||
|
@click="logoff"
|
||||||
|
></u-cell-item>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
<view
|
<view
|
||||||
class="submit"
|
class="submit"
|
||||||
@ -105,6 +110,13 @@ export default {
|
|||||||
this.$options.filters.navigateToLogin('redirectTo');
|
this.$options.filters.navigateToLogin('redirectTo');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户注销
|
||||||
|
*/
|
||||||
|
logoff() {
|
||||||
|
this.$options.filters.logoff();
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认退出
|
* 确认退出
|
||||||
* 清除缓存重新登录
|
* 清除缓存重新登录
|
||||||
|
@ -82,6 +82,15 @@
|
|||||||
>
|
>
|
||||||
<text class="btn-text">发布视频</text>
|
<text class="btn-text">发布视频</text>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</template>
|
</template>
|
||||||
@ -92,6 +101,7 @@ import storage from '@/utils/storage.js'; //缓存
|
|||||||
// graceNumber
|
// graceNumber
|
||||||
// } from '@/utils/tools.js'
|
// } from '@/utils/tools.js'
|
||||||
import api from '@/config/api.js';
|
import api from '@/config/api.js';
|
||||||
|
import { checkText } from '@/api/checkInfo.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -162,7 +172,7 @@ export default {
|
|||||||
let event = e;
|
let event = e;
|
||||||
this.title = e.detail.value;
|
this.title = e.detail.value;
|
||||||
},
|
},
|
||||||
doPublich() {
|
async doPublich() {
|
||||||
if (!this.upFlage) {
|
if (!this.upFlage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -189,7 +199,20 @@ export default {
|
|||||||
height: me.height,
|
height: me.height,
|
||||||
cityCode: storage.getCityCode()
|
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;
|
let serverUrl = api.vlog;
|
||||||
uni.request({
|
uni.request({
|
||||||
@ -304,6 +327,12 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.pubInfo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
.prpage {
|
.prpage {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
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() {
|
onShow() {
|
||||||
|
console.log('首页');
|
||||||
var prop = this.pageList[this.curIndex];
|
var prop = this.pageList[this.curIndex];
|
||||||
if (storage.getRefreshVlogIndex() == '1') {
|
if (storage.getRefreshVlogIndex() == '1') {
|
||||||
// 登录后需要刷新数据
|
// 登录后需要刷新数据
|
||||||
@ -247,8 +248,15 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
console.log('index刷新子组件');
|
console.log('index刷新子组件');
|
||||||
this.$refs[prop].showVd();
|
var lst = this.$refs[prop].dataList;
|
||||||
} catch {}
|
if (lst.length) {
|
||||||
|
this.$refs[prop].showVd();
|
||||||
|
} else {
|
||||||
|
this.$refs[prop].get();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log('首页刷新异常');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onHide() {
|
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>
|
<script>
|
||||||
import storage from '@/utils/storage.js'; //缓存
|
import storage from '@/utils/storage.js'; //缓存
|
||||||
|
import { checkText } from '@/api/checkInfo.js';
|
||||||
import { vlogCommentCounts, vlogCommentUnLike, vlogCommentLike, vlogCommentDelete, vlogCommentList, vlogCommentCreate } from '@/api/vlog';
|
import { vlogCommentCounts, vlogCommentUnLike, vlogCommentLike, vlogCommentDelete, vlogCommentList, vlogCommentCreate } from '@/api/vlog';
|
||||||
import { dateFormat, graceNumber, getDateBeforeNow } from '@/utils/tools.js';
|
import { dateFormat, graceNumber, getDateBeforeNow } from '@/utils/tools.js';
|
||||||
|
|
||||||
@ -695,6 +696,21 @@ export default {
|
|||||||
content: me.currentComment
|
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);
|
var result = await vlogCommentCreate(pendingCommentObject);
|
||||||
console.log(result);
|
console.log(result);
|
||||||
if (result.data.status == 200) {
|
if (result.data.status == 200) {
|
||||||
|
267
utils/filters.js
267
utils/filters.js
@ -1,5 +1,11 @@
|
|||||||
import Foundation from "./Foundation.js";
|
import Foundation from "./Foundation.js";
|
||||||
import storage from "@/utils/storage.js";
|
import storage from "@/utils/storage.js";
|
||||||
|
import {
|
||||||
|
logoffConfirm
|
||||||
|
} from "@/api/login";
|
||||||
|
import {
|
||||||
|
clearIm
|
||||||
|
} from "@/utils/handleim.js";
|
||||||
/**
|
/**
|
||||||
* 金钱单位置换 2999 --> 2,999.00
|
* 金钱单位置换 2999 --> 2,999.00
|
||||||
* @param val
|
* @param val
|
||||||
@ -8,15 +14,15 @@ import storage from "@/utils/storage.js";
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function unitPrice(val, unit, location) {
|
export function unitPrice(val, unit, location) {
|
||||||
if (!val) val = 0;
|
if (!val) val = 0;
|
||||||
let price = Foundation.formatPrice(val);
|
let price = Foundation.formatPrice(val);
|
||||||
if (location === "before") {
|
if (location === "before") {
|
||||||
return price.substr(0, price.length - 3);
|
return price.substr(0, price.length - 3);
|
||||||
}
|
}
|
||||||
if (location === "after") {
|
if (location === "after") {
|
||||||
return price.substr(-2);
|
return price.substr(-2);
|
||||||
}
|
}
|
||||||
return (unit || "") + price;
|
return (unit || "") + price;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,17 +30,17 @@ export function unitPrice(val, unit, location) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export function noPassByName(str) {
|
export function noPassByName(str) {
|
||||||
if (null != str && str != undefined) {
|
if (null != str && str != undefined) {
|
||||||
if (str.length <= 3) {
|
if (str.length <= 3) {
|
||||||
return "*" + str.substring(1, str.length);
|
return "*" + str.substring(1, str.length);
|
||||||
} else if (str.length > 3 && str.length <= 6) {
|
} else if (str.length > 3 && str.length <= 6) {
|
||||||
return "**" + str.substring(2, str.length);
|
return "**" + str.substring(2, str.length);
|
||||||
} else if (str.length > 6) {
|
} else if (str.length > 6) {
|
||||||
return str.substring(0, 2) + "****" + str.substring(6, str.length);
|
return str.substring(0, 2) + "****" + str.substring(6, str.length);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,29 +50,29 @@ export function noPassByName(str) {
|
|||||||
* @returns {*|string}
|
* @returns {*|string}
|
||||||
*/
|
*/
|
||||||
export function unixToDate(unix, format) {
|
export function unixToDate(unix, format) {
|
||||||
let _format = format || "yyyy-MM-dd hh:mm:ss";
|
let _format = format || "yyyy-MM-dd hh:mm:ss";
|
||||||
const d = new Date(unix * 1000);
|
const d = new Date(unix * 1000);
|
||||||
const o = {
|
const o = {
|
||||||
"M+": d.getMonth() + 1,
|
"M+": d.getMonth() + 1,
|
||||||
"d+": d.getDate(),
|
"d+": d.getDate(),
|
||||||
"h+": d.getHours(),
|
"h+": d.getHours(),
|
||||||
"m+": d.getMinutes(),
|
"m+": d.getMinutes(),
|
||||||
"s+": d.getSeconds(),
|
"s+": d.getSeconds(),
|
||||||
"q+": Math.floor((d.getMonth() + 3) / 3),
|
"q+": Math.floor((d.getMonth() + 3) / 3),
|
||||||
S: d.getMilliseconds(),
|
S: d.getMilliseconds(),
|
||||||
};
|
};
|
||||||
if (/(y+)/.test(_format))
|
if (/(y+)/.test(_format))
|
||||||
_format = _format.replace(
|
_format = _format.replace(
|
||||||
RegExp.$1,
|
RegExp.$1,
|
||||||
(d.getFullYear() + "").substr(4 - RegExp.$1.length)
|
(d.getFullYear() + "").substr(4 - RegExp.$1.length)
|
||||||
);
|
);
|
||||||
for (const k in o)
|
for (const k in o)
|
||||||
if (new RegExp("(" + k + ")").test(_format))
|
if (new RegExp("(" + k + ")").test(_format))
|
||||||
_format = _format.replace(
|
_format = _format.replace(
|
||||||
RegExp.$1,
|
RegExp.$1,
|
||||||
RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
|
RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
|
||||||
);
|
);
|
||||||
return _format;
|
return _format;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,11 +81,11 @@ export function unixToDate(unix, format) {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function secrecyMobile(mobile) {
|
export function secrecyMobile(mobile) {
|
||||||
mobile = String(mobile);
|
mobile = String(mobile);
|
||||||
if (!/\d{11}/.test(mobile)) {
|
if (!/\d{11}/.test(mobile)) {
|
||||||
return mobile;
|
return mobile;
|
||||||
}
|
}
|
||||||
return mobile.replace(/(\d{3})(\d{4})(\d{4})/, "$1****$3");
|
return mobile.replace(/(\d{3})(\d{4})(\d{4})/, "$1****$3");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -87,8 +93,39 @@ export function secrecyMobile(mobile) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function clearStrComma(str) {
|
export function clearStrComma(str) {
|
||||||
str = str.replace(/,/g, ""); //取消字符串中出现的所有逗号
|
str = str.replace(/,/g, ""); //取消字符串中出现的所有逗号
|
||||||
return 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");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -97,12 +134,12 @@ export function clearStrComma(str) {
|
|||||||
* 如果传入 auth 则为判断是否登录
|
* 如果传入 auth 则为判断是否登录
|
||||||
*/
|
*/
|
||||||
export function isLogin(val) {
|
export function isLogin(val) {
|
||||||
let userInfo = storage.getUserInfo();
|
let userInfo = storage.getUserInfo();
|
||||||
if (val == "auth") {
|
if (val == "auth") {
|
||||||
return userInfo.id ? true : false;
|
return userInfo.id ? true : false;
|
||||||
} else {
|
} else {
|
||||||
return storage.getUserInfo();
|
return storage.getUserInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -112,24 +149,24 @@ export function isLogin(val) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export function forceLogin() {
|
export function forceLogin() {
|
||||||
let userInfo = storage.getUserInfo();
|
let userInfo = storage.getUserInfo();
|
||||||
if (!userInfo.id) {
|
if (!userInfo.id) {
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/passport/wechatMPLogin",
|
url: "/pages/passport/wechatMPLogin",
|
||||||
});
|
});
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/passport/login",
|
url: "/pages/passport/login",
|
||||||
});
|
});
|
||||||
|
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -137,68 +174,68 @@ export function forceLogin() {
|
|||||||
* @param val
|
* @param val
|
||||||
*/
|
*/
|
||||||
export function getPages(val) {
|
export function getPages(val) {
|
||||||
const pages = getCurrentPages(); //获取加载的页面
|
const pages = getCurrentPages(); //获取加载的页面
|
||||||
const currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
const currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
||||||
const url = currentPage.route; //当前页面url
|
const url = currentPage.route; //当前页面url
|
||||||
|
|
||||||
return val ? currentPage : url;
|
return val ? currentPage : url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转到登录页面
|
* 跳转到登录页面
|
||||||
*/
|
*/
|
||||||
export function navigateToLogin(type = "navigateTo") {
|
export function navigateToLogin(type = "navigateTo") {
|
||||||
/**
|
/**
|
||||||
* 此处进行条件编译判断
|
* 此处进行条件编译判断
|
||||||
* 微信小程序跳转到微信小程序登录页面
|
* 微信小程序跳转到微信小程序登录页面
|
||||||
* H5/App跳转到普通登录页面
|
* H5/App跳转到普通登录页面
|
||||||
*/
|
*/
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
uni[type]({
|
uni[type]({
|
||||||
url: "/pages/passport/wechatMPLogin",
|
url: "/pages/passport/wechatMPLogin",
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
uni[type]({
|
uni[type]({
|
||||||
url: "/pages/passport/login",
|
url: "/pages/passport/login",
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务状态列表
|
* 服务状态列表
|
||||||
*/
|
*/
|
||||||
export function serviceStatusList(val) {
|
export function serviceStatusList(val) {
|
||||||
let statusList = {
|
let statusList = {
|
||||||
APPLY: "申请售后",
|
APPLY: "申请售后",
|
||||||
PASS: "通过售后",
|
PASS: "通过售后",
|
||||||
REFUSE: "拒绝售后",
|
REFUSE: "拒绝售后",
|
||||||
BUYER_RETURN: "买家退货,待卖家收货",
|
BUYER_RETURN: "买家退货,待卖家收货",
|
||||||
SELLER_RE_DELIVERY: "商家换货/补发",
|
SELLER_RE_DELIVERY: "商家换货/补发",
|
||||||
SELLER_CONFIRM: "卖家确认收货",
|
SELLER_CONFIRM: "卖家确认收货",
|
||||||
SELLER_TERMINATION: "卖家终止售后",
|
SELLER_TERMINATION: "卖家终止售后",
|
||||||
BUYER_CONFIRM: "买家确认收货",
|
BUYER_CONFIRM: "买家确认收货",
|
||||||
BUYER_CANCEL: "买家取消售后",
|
BUYER_CANCEL: "买家取消售后",
|
||||||
WAIT_REFUND: "等待平台退款",
|
WAIT_REFUND: "等待平台退款",
|
||||||
COMPLETE: "完成售后",
|
COMPLETE: "完成售后",
|
||||||
};
|
};
|
||||||
return statusList[val];
|
return statusList[val];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单状态列表
|
* 订单状态列表
|
||||||
*/
|
*/
|
||||||
export function orderStatusList(val) {
|
export function orderStatusList(val) {
|
||||||
let orderStatusList = {
|
let orderStatusList = {
|
||||||
UNDELIVERED: "待发货",
|
UNDELIVERED: "待发货",
|
||||||
UNPAID: "未付款",
|
UNPAID: "未付款",
|
||||||
PAID: "已付款",
|
PAID: "已付款",
|
||||||
DELIVERED: "已发货",
|
DELIVERED: "已发货",
|
||||||
CANCELLED: "已取消",
|
CANCELLED: "已取消",
|
||||||
COMPLETED: "已完成",
|
COMPLETED: "已完成",
|
||||||
COMPLETE: "已完成",
|
COMPLETE: "已完成",
|
||||||
TAKE: "待核验",
|
TAKE: "待核验",
|
||||||
REFUNDED: "已退款",
|
REFUNDED: "已退款",
|
||||||
};
|
};
|
||||||
return orderStatusList[val];
|
return orderStatusList[val];
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user