1
This commit is contained in:
parent
569a62b530
commit
849675a408
@ -43,3 +43,12 @@ export function initCouponList() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//------------------通用查询分类树方法-----------------------
|
||||||
|
export function categoryTreeData(params) {
|
||||||
|
return request({
|
||||||
|
url: '/base/category/treeData',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -54,3 +54,29 @@ export function closeNotice(params) {
|
|||||||
params: params
|
params: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 博主举报通告主
|
||||||
|
export function saveReport(data) {
|
||||||
|
return request({
|
||||||
|
url: '/busi/report/saveReport',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//平台意见反馈
|
||||||
|
export function uniAddFeedBack(data) {
|
||||||
|
return request({
|
||||||
|
url: '/busi/feedback/uniAddFeedBack',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询意见反馈列表
|
||||||
|
export function feedbackList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/busi/feedback/list',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
@ -267,7 +267,7 @@
|
|||||||
* 跳转建议列表
|
* 跳转建议列表
|
||||||
*/
|
*/
|
||||||
goSuggest() {
|
goSuggest() {
|
||||||
this.$tab.navigateTo('/pages/mine/set/suggest')
|
this.$tab.navigateTo('/pages/mine/set/suggest?userType='+this.localUserType)
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转地址列表
|
* 跳转地址列表
|
||||||
|
@ -27,12 +27,18 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
||||||
|
import {toast} from '@/utils/common.js'
|
||||||
|
import config from '@/config';
|
||||||
|
import {feedbackList} from '@/api/business/notice.js'
|
||||||
|
import constant from '@/utils/constant';
|
||||||
|
import {getJSONData} from '@/utils/auth.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
navigationBarVue
|
navigationBarVue
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
uploadUrl: config.baseUrl,
|
||||||
dataList: [{
|
dataList: [{
|
||||||
createTime: "2024-02-10 12:22:44",
|
createTime: "2024-02-10 12:22:44",
|
||||||
content: "我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见",
|
content: "我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见",
|
||||||
@ -48,13 +54,42 @@
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
userId:null
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
//下来刷新状态
|
//下来刷新状态
|
||||||
isTriggered: false
|
isTriggered: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow(){
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
/**初始化数据*/
|
||||||
|
initData(){
|
||||||
|
this.queryParams.userId = getJSONData(constant.userInfo).userId
|
||||||
|
feedbackList(this.queryParams).then(res=>{
|
||||||
|
this.isTriggered = false
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (this.queryParams.pageNum == 1) {
|
||||||
|
this.dataList = res.data.records
|
||||||
|
this.dataList = this.dataList.map(item => {
|
||||||
|
item.imagesList = item.images.split(',').map(image => this.uploadUrl + image.trim());
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.dataList = this.dataList.concat(res.data.records)
|
||||||
|
this.dataList = this.dataList.map(item => {
|
||||||
|
item.imagesList = item.images.split(',').map(image => this.uploadUrl + image.trim());
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log(this.dataList)
|
||||||
|
this.total = res.data.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 上滑加载数据
|
* 上滑加载数据
|
||||||
*/
|
*/
|
||||||
@ -66,6 +101,7 @@
|
|||||||
}
|
}
|
||||||
//页码+1,调用获取数据的方法获取第二页数据
|
//页码+1,调用获取数据的方法获取第二页数据
|
||||||
this.queryParams.pageNum++
|
this.queryParams.pageNum++
|
||||||
|
this.initData()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 下拉刷新数据
|
* 下拉刷新数据
|
||||||
@ -74,6 +110,7 @@
|
|||||||
this.isTriggered = true
|
this.isTriggered = true
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.total = 0
|
this.total = 0
|
||||||
|
this.initData()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,12 @@
|
|||||||
<view class="item-lable">
|
<view class="item-lable">
|
||||||
举报类型
|
举报类型
|
||||||
</view>
|
</view>
|
||||||
<view class="item-value">
|
<view class="item-value">
|
||||||
<uni-data-select v-model="firstCode" :localdata="firstList" @change="change"></uni-data-select>
|
<uni-data-picker placeholder="请选择" popup-title="请选择" :localdata="dataTree"
|
||||||
<uni-data-select v-if="ifShowSecond" v-model="secondCode" :localdata="secondList"
|
v-model="dataObj.reportType" @change="onchange" @nodeclick="onnodeclick"
|
||||||
@change="changeSecond"></uni-data-select>
|
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
|
||||||
</view>
|
</uni-data-picker>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-field">
|
<view class="item-field">
|
||||||
<view class="item-lable is-required">
|
<view class="item-lable is-required">
|
||||||
@ -48,16 +49,23 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
||||||
|
import {categoryTreeData} from '@/api/business/base.js';
|
||||||
|
import {saveReport} from '@/api/business/notice.js';
|
||||||
|
import upload from '@/utils/upload'
|
||||||
|
import {toast} from '@/utils/common.js'
|
||||||
|
import config from '@/config';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
navigationBarVue
|
navigationBarVue
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
uploadUrl: config.baseUrl,
|
||||||
dataObj: {
|
dataObj: {
|
||||||
content: ""
|
content: ""
|
||||||
},
|
},
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
|
dataTree:[],
|
||||||
firstList: [{
|
firstList: [{
|
||||||
value: 0,
|
value: 0,
|
||||||
text: "篮球"
|
text: "篮球"
|
||||||
@ -92,9 +100,46 @@
|
|||||||
secondCode: "",
|
secondCode: "",
|
||||||
//是否需要选择二级举报类型
|
//是否需要选择二级举报类型
|
||||||
ifShowSecond: false,
|
ifShowSecond: false,
|
||||||
|
//被举报id
|
||||||
|
reportUserId:'',
|
||||||
|
//通告主id
|
||||||
|
reportNoticeId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onLoad(option){
|
||||||
|
this.reportUserId = option.userId
|
||||||
|
this.reportNoticeId = option.noticeId
|
||||||
|
},
|
||||||
|
|
||||||
|
onShow(){
|
||||||
|
//获取分类树
|
||||||
|
this.getCategory()
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
onnodeclick(e) {
|
||||||
|
console.log(e, 135);
|
||||||
|
},
|
||||||
|
onpopupopened(e) {
|
||||||
|
console.log('popupopened');
|
||||||
|
},
|
||||||
|
onpopupclosed(e) {
|
||||||
|
console.log('popupclosed');
|
||||||
|
},
|
||||||
|
onchange(e) {
|
||||||
|
console.log('onchange:', e);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**获取分类树*/
|
||||||
|
getCategory(){
|
||||||
|
categoryTreeData({code:'report_type'}).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.dataTree = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
switch1Change: function(e) {
|
switch1Change: function(e) {
|
||||||
console.log('switch1 发生 change 事件,携带值为', e.detail.value)
|
console.log('switch1 发生 change 事件,携带值为', e.detail.value)
|
||||||
},
|
},
|
||||||
@ -106,18 +151,40 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res, '215')
|
console.log(res, '215')
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: config.baseUrl + res.data
|
url: res.url
|
||||||
})
|
})
|
||||||
console.log(this.fileList, 'fileList')
|
console.log(this.fileList, 'fileList')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteFile(file, index) {
|
deleteFile(file, index) {
|
||||||
console.log('删除文件');
|
|
||||||
this.fileList.splice(index, 1);
|
this.fileList.splice(index, 1);
|
||||||
},
|
},
|
||||||
/**提交*/
|
/**提交*/
|
||||||
submitForm() {},
|
submitForm() {
|
||||||
|
//凭证图片
|
||||||
|
if (this.fileList.length > 0) {
|
||||||
|
this.dataObj.images = this.fileList
|
||||||
|
.map(item => item.url.replace(this.uploadUrl, ''))
|
||||||
|
.join(',');
|
||||||
|
}
|
||||||
|
this.dataObj.userType = '02'
|
||||||
|
this.dataObj.reportUserId = this.reportUserId
|
||||||
|
this.dataObj.reportUserType = '01'
|
||||||
|
this.dataObj.reportNoticeId = this.reportNoticeId
|
||||||
|
saveReport(this.dataObj).then(res=>{
|
||||||
|
if (res.code ==200) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000,
|
||||||
|
title: '举报成功'
|
||||||
|
});
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}).catch((e)=>{
|
||||||
|
toast(e)
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 去我的建议列表
|
* 去我的建议列表
|
||||||
*/
|
*/
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
写下你的建议
|
写下你的建议
|
||||||
</view>
|
</view>
|
||||||
<view class="item-value">
|
<view class="item-value">
|
||||||
<textarea v-model="dataObj.content" placeholder="请输入" />
|
<uni-easyinput type="textarea" v-model="dataObj.content" placeholder="请输入" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-field">
|
<view class="item-field">
|
||||||
@ -37,20 +37,29 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
import navigationBarVue from '@/components/navigation/navigationBar.vue';
|
||||||
|
import upload from '@/utils/upload'
|
||||||
|
import {toast} from '@/utils/common.js'
|
||||||
|
import config from '@/config';
|
||||||
|
import {uniAddFeedBack} from '@/api/business/notice.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
navigationBarVue
|
navigationBarVue
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
uploadUrl: config.baseUrl,
|
||||||
dataObj: {
|
dataObj: {
|
||||||
content: ""
|
content: ""
|
||||||
},
|
},
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
//图片数组
|
//图片数组
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
userType:"",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(option){
|
||||||
|
this.userType = option.userType
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
afterRead(file) {
|
afterRead(file) {
|
||||||
for (let i = 0; i < file.tempFilePaths.length; i++) {
|
for (let i = 0; i < file.tempFilePaths.length; i++) {
|
||||||
@ -60,9 +69,8 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res, '215')
|
console.log(res, '215')
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: config.baseUrl + res.data
|
url: res.url
|
||||||
})
|
})
|
||||||
console.log(this.fileList, 'fileList')
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -71,7 +79,27 @@
|
|||||||
this.fileList.splice(index, 1);
|
this.fileList.splice(index, 1);
|
||||||
},
|
},
|
||||||
/**提交*/
|
/**提交*/
|
||||||
submitForm() {},
|
submitForm() {
|
||||||
|
//凭证图片
|
||||||
|
if (this.fileList.length > 0) {
|
||||||
|
this.dataObj.images = this.fileList
|
||||||
|
.map(item => item.url.replace(this.uploadUrl, ''))
|
||||||
|
.join(',');
|
||||||
|
}
|
||||||
|
this.dataObj.userType = this.userType
|
||||||
|
uniAddFeedBack(this.dataObj).then(res => {
|
||||||
|
if (res.code == 200){
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000,
|
||||||
|
title: '举报成功'
|
||||||
|
});
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}).catch((e)=>{
|
||||||
|
toast(e)
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 去我的建议列表
|
* 去我的建议列表
|
||||||
*/
|
*/
|
||||||
@ -144,14 +172,7 @@
|
|||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
height: 150rpx;
|
|
||||||
color: #686868;
|
|
||||||
padding: 10rpx 0 10rpx 20rpx;
|
|
||||||
border: 1rpx solid #dcdfe6;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-box {
|
.submit-box {
|
||||||
|
@ -377,7 +377,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goReportForm() {
|
goReportForm() {
|
||||||
this.$tab.navigateTo('/pages/mine/set/report-form')
|
this.$tab.navigateTo('/pages/mine/set/report-form?userId='+this.userDetail.userId+'¬iceId='+this.noticeId)
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 去报名列表
|
* 去报名列表
|
||||||
|
Loading…
Reference in New Issue
Block a user