Compare commits
3 Commits
b05f96fddd
...
67a047c313
Author | SHA1 | Date | |
---|---|---|---|
![]() |
67a047c313 | ||
![]() |
a7ede5a6cc | ||
![]() |
849675a408 |
@ -43,3 +43,12 @@ export function initCouponList() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//------------------通用查询分类树方法-----------------------
|
||||
export function categoryTreeData(params) {
|
||||
return request({
|
||||
url: '/base/category/treeData',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
@ -54,6 +54,14 @@ export function closeNotice(params) {
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 博主举报通告主
|
||||
export function saveReport(data) {
|
||||
return request({
|
||||
url: '/busi/report/saveReport',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 我报名查询通告列表
|
||||
export function myNoticeList(params) {
|
||||
@ -72,3 +80,21 @@ export function saveNotice(data) {
|
||||
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
|
||||
})
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// 应用全局配置
|
||||
module.exports = {
|
||||
baseUrl: 'http://192.168.1.17:8080',
|
||||
baseUrl: 'http://192.168.1.4:8080',
|
||||
// baseUrl: 'http://localhost:8080',
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
|
@ -267,7 +267,7 @@
|
||||
* 跳转建议列表
|
||||
*/
|
||||
goSuggest() {
|
||||
this.$tab.navigateTo('/pages/mine/set/suggest')
|
||||
this.$tab.navigateTo('/pages/mine/set/suggest?userType='+this.localUserType)
|
||||
},
|
||||
/**
|
||||
* 跳转地址列表
|
||||
|
@ -27,12 +27,18 @@
|
||||
|
||||
<script>
|
||||
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 {
|
||||
components: {
|
||||
navigationBarVue
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
uploadUrl: config.baseUrl,
|
||||
dataList: [{
|
||||
createTime: "2024-02-10 12:22:44",
|
||||
content: "我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见我的意见",
|
||||
@ -48,13 +54,41 @@
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId:null
|
||||
},
|
||||
total: 0,
|
||||
//下来刷新状态
|
||||
isTriggered: false
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
this.initData();
|
||||
},
|
||||
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 => ({ url: 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 => ({ url: this.uploadUrl + image.trim() }));
|
||||
return item;
|
||||
});
|
||||
}
|
||||
this.total = res.data.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 上滑加载数据
|
||||
*/
|
||||
@ -66,6 +100,7 @@
|
||||
}
|
||||
//页码+1,调用获取数据的方法获取第二页数据
|
||||
this.queryParams.pageNum++
|
||||
this.initData()
|
||||
},
|
||||
/**
|
||||
* 下拉刷新数据
|
||||
@ -74,6 +109,7 @@
|
||||
this.isTriggered = true
|
||||
this.queryParams.pageNum = 1
|
||||
this.total = 0
|
||||
this.initData()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -7,11 +7,12 @@
|
||||
<view class="item-lable">
|
||||
举报类型
|
||||
</view>
|
||||
<view class="item-value">
|
||||
<uni-data-select v-model="firstCode" :localdata="firstList" @change="change"></uni-data-select>
|
||||
<uni-data-select v-if="ifShowSecond" v-model="secondCode" :localdata="secondList"
|
||||
@change="changeSecond"></uni-data-select>
|
||||
</view>
|
||||
<view class="item-value">
|
||||
<uni-data-picker placeholder="请选择" popup-title="请选择" :localdata="dataTree"
|
||||
v-model="dataObj.reportType" @change="onchange" @nodeclick="onnodeclick"
|
||||
@popupopened="onpopupopened" @popupclosed="onpopupclosed">
|
||||
</uni-data-picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-field">
|
||||
<view class="item-lable is-required">
|
||||
@ -48,16 +49,23 @@
|
||||
|
||||
<script>
|
||||
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 {
|
||||
components: {
|
||||
navigationBarVue
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
uploadUrl: config.baseUrl,
|
||||
dataObj: {
|
||||
content: ""
|
||||
},
|
||||
sizeType: ['compressed'],
|
||||
dataTree:[],
|
||||
firstList: [{
|
||||
value: 0,
|
||||
text: "篮球"
|
||||
@ -92,9 +100,46 @@
|
||||
secondCode: "",
|
||||
//是否需要选择二级举报类型
|
||||
ifShowSecond: false,
|
||||
//被举报id
|
||||
reportUserId:'',
|
||||
//通告主id
|
||||
reportNoticeId:''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(option){
|
||||
this.reportUserId = option.userId
|
||||
this.reportNoticeId = option.noticeId
|
||||
},
|
||||
|
||||
onShow(){
|
||||
//获取分类树
|
||||
this.getCategory()
|
||||
},
|
||||
|
||||
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) {
|
||||
console.log('switch1 发生 change 事件,携带值为', e.detail.value)
|
||||
},
|
||||
@ -106,18 +151,40 @@
|
||||
}).then((res) => {
|
||||
console.log(res, '215')
|
||||
this.fileList.push({
|
||||
url: config.baseUrl + res.data
|
||||
url: res.url
|
||||
})
|
||||
console.log(this.fileList, 'fileList')
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteFile(file, index) {
|
||||
console.log('删除文件');
|
||||
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 class="item-value">
|
||||
<textarea v-model="dataObj.content" placeholder="请输入" />
|
||||
<uni-easyinput type="textarea" v-model="dataObj.content" placeholder="请输入" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-field">
|
||||
@ -37,20 +37,29 @@
|
||||
|
||||
<script>
|
||||
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 {
|
||||
components: {
|
||||
navigationBarVue
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
uploadUrl: config.baseUrl,
|
||||
dataObj: {
|
||||
content: ""
|
||||
},
|
||||
sizeType: ['compressed'],
|
||||
//图片数组
|
||||
fileList: [],
|
||||
userType:"",
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
this.userType = option.userType
|
||||
},
|
||||
methods: {
|
||||
afterRead(file) {
|
||||
for (let i = 0; i < file.tempFilePaths.length; i++) {
|
||||
@ -60,9 +69,8 @@
|
||||
}).then((res) => {
|
||||
console.log(res, '215')
|
||||
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);
|
||||
},
|
||||
/**提交*/
|
||||
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;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
color: #686868;
|
||||
padding: 10rpx 0 10rpx 20rpx;
|
||||
border: 1rpx solid #dcdfe6;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.submit-box {
|
||||
|
@ -392,7 +392,7 @@
|
||||
})
|
||||
},
|
||||
goReportForm() {
|
||||
this.$tab.navigateTo('/pages/mine/set/report-form')
|
||||
this.$tab.navigateTo('/pages/mine/set/report-form?userId='+this.userDetail.userId+'¬iceId='+this.noticeId)
|
||||
},
|
||||
goMemberIndex() {
|
||||
this.$tab.navigateTo('/pages/mine/member/member-index')
|
||||
|
Loading…
Reference in New Issue
Block a user