diff --git a/src/pages.json b/src/pages.json
index 903b803..895b295 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -438,7 +438,15 @@
{
"path": "AwardWinningWork/AwardWinningWork",
"style": {
- "navigationBarTitleText": "艺起战疫获奖作品",
+ "navigationBarTitleText": "文创展厅",
+ "enablePullDownRefresh": true,
+ "onReachBottomDistance": 20
+ }
+ },
+ {
+ "path": "AwardWinningWork/AwardDetail",
+ "style": {
+ "navigationBarTitleText": "文创展厅作品详情",
"enablePullDownRefresh": false
}
},
diff --git a/src/pagesA/my/My.vue b/src/pagesA/my/My.vue
index 1190808..298d449 100644
--- a/src/pagesA/my/My.vue
+++ b/src/pagesA/my/My.vue
@@ -119,12 +119,12 @@
-
+
diff --git a/src/pagesA/my/logOut.vue b/src/pagesA/my/logOut.vue
index 4071653..fe54714 100644
--- a/src/pagesA/my/logOut.vue
+++ b/src/pagesA/my/logOut.vue
@@ -20,7 +20,8 @@
this.http.request('/auth/logout', {}, "GET").then(res => {
if (res.code == 200) {
uni.redirectTo({
- url: "/pagesC/Login/Login"
+ url: "/pages/pageHome/shwxLogin",
+ // url: '/pagesC/Login/Login'
})
}
}).catch(e => {
diff --git a/src/pagesA/my/myWorks.vue b/src/pagesA/my/myWorks.vue
index 46d33d5..df493d2 100644
--- a/src/pagesA/my/myWorks.vue
+++ b/src/pagesA/my/myWorks.vue
@@ -16,6 +16,10 @@
+
+
+ 发起聊天
+
关注
@@ -252,6 +256,15 @@
});
})
},
+ goTalk() {
+ uni.navigateTo({
+ url: "/pagesA/msg/chat/chat?name=" + this.userName + '&linkId=' + '' + '&toUser=' + this
+ .userId + '&toUserImg=' + this.userImg
+ })
+ // uni.showToast({
+ // title:"发起聊天"
+ // })
+ }
},
}
@@ -318,6 +331,25 @@
}
}
}
+ .talkss {
+ border: 1px solid #99241B;
+ font-size: 24rpx;
+ font-weight: 600;
+ border-radius: 10rpx;
+ color: #99241B;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 16rpx;
+ box-sizing: border-box;
+
+ .concat_ico {
+ width: 32rpx;
+ height: 32rpx;
+ margin-right: 8rpx;
+ }
+
+ }
.talk {
border: 1px solid #99241B;
diff --git a/src/pagesB/ArtRace/ArtRaceDetail.vue b/src/pagesB/ArtRace/ArtRaceDetail.vue
index b9a3ba3..7e6705e 100644
--- a/src/pagesB/ArtRace/ArtRaceDetail.vue
+++ b/src/pagesB/ArtRace/ArtRaceDetail.vue
@@ -103,12 +103,13 @@
- 参赛作品展示
+ 获奖作品展示
+ 参赛作品展示
- NO.{{ i+1 }}
+ {{ v.awards }}
{{ v.averageScore }}
diff --git a/src/pagesB/ArtRace/raceWork.vue b/src/pagesB/ArtRace/raceWork.vue
index dd8d518..ef0142b 100644
--- a/src/pagesB/ArtRace/raceWork.vue
+++ b/src/pagesB/ArtRace/raceWork.vue
@@ -53,11 +53,11 @@
- 请打分
+ 请打分(满分100)
-
+
@@ -165,8 +165,8 @@
},
changeNum(value) {
let aaa = Number(value)
- if(aaa > 10){
- this.value = '10'
+ if(aaa > 100){
+ this.value = '100'
}
}
},
diff --git a/src/pagesB/PersonalCenter/PersonalCenter.vue b/src/pagesB/PersonalCenter/PersonalCenter.vue
index cdb43ab..5ec76a1 100644
--- a/src/pagesB/PersonalCenter/PersonalCenter.vue
+++ b/src/pagesB/PersonalCenter/PersonalCenter.vue
@@ -105,10 +105,10 @@
-
+
住宅电话
- {{userInfoObj.hometTel}}
+ {{userInfoObj.homeTel}}
diff --git a/src/pagesB/PersonalCenter/ReEditSingleInfo.vue b/src/pagesB/PersonalCenter/ReEditSingleInfo.vue
index d56f241..34f6d46 100644
--- a/src/pagesB/PersonalCenter/ReEditSingleInfo.vue
+++ b/src/pagesB/PersonalCenter/ReEditSingleInfo.vue
@@ -172,7 +172,7 @@
'密码': 'password',
'学历': 'education',
'兴趣爱好': 'hobby',
- '住宅电话': 'hometTel',
+ '住宅电话': 'homeTel',
'办公室电话': 'officeTel',
'单位名称': 'unitName',
'通讯地址': 'mailAddress',
@@ -653,13 +653,13 @@
if (this.Edkey == '是否已入协会') {
this.isSubmit = true
} else {
- if (n) {
- console.log("n",n);
- this.isSubmit = true
- }else{
- uni.$u.toast('值不能为空')
- this.isSubmit = false
- }
+ // if (n) {
+ // console.log("n",n);
+ // this.isSubmit = true
+ // }else{
+ // uni.$u.toast('值不能为空')
+ // this.isSubmit = false
+ // }
}
}
},
diff --git a/src/pagesB/literFamily/literFamily.vue b/src/pagesB/literFamily/literFamily.vue
index b2bf8af..07979a0 100644
--- a/src/pagesB/literFamily/literFamily.vue
+++ b/src/pagesB/literFamily/literFamily.vue
@@ -16,12 +16,12 @@
-
+
@@ -132,8 +132,8 @@
item.picture = picArr[0]
})
this.jianAct = res.data.records
- // this.getZTData()
- this.load = false
+ this.getZTData()
+ // this.load = false
}
}).catch(e => {
uni.showToast({
@@ -145,16 +145,10 @@
//文创展厅数据
getZTData() {
let _this = this
- this.http.request('/silhouette/worksList', {}, "GET").then(res => {
+ this.http.request('/culturalCreativity/list', {}, "GET").then(res => {
if (res.code == 200) {
- // res.data.records.forEach(function(item){
- // let picArr = item.picture.split(',')
- // item.picture = picArr[0]
- // })
- // this.jianAct = res.data.records
+ this.list2 = res.data.records.splice(0,3)
this.load = false
- console.log(res.data)
-
}
}).catch(e => {
uni.showToast({
@@ -174,11 +168,16 @@
page: this.pages,
size: this.size
}, "GET").then(res => {
- res.data.records.forEach(function(item){
- let picArr = item.picture.split(',')
- item.picture = picArr[0]
- this.jianAct.push(item)
- })
+ if(res.data.records.length > 0){
+ res.data.records.forEach(function(item){
+ let picArr = item.picture.split(',')
+ item.picture = picArr[0]
+ this.jianAct.push(item)
+ })
+ }else{
+ this.pages--
+ }
+
setTimeout(() => {
// 模拟执行完毕
// 改变 requestStatus
@@ -194,9 +193,14 @@
back() {
uni.navigateBack()
},
- GoWorksShow(id) {
+ GoWorksShow() {
uni.navigateTo({
- url: "/pagesC/AwardWinningWork/AwardWinningWork?id=" + String(id)
+ url: "/pagesC/AwardWinningWork/AwardWinningWork"
+ })
+ },
+ GoWorksDetail(id) {
+ uni.navigateTo({
+ url: "/pagesC/AwardWinningWork/AwardDetail?id=" + String(id)
})
}
},
diff --git a/src/pagesC/AwardWinningWork/AwardDetail.vue b/src/pagesC/AwardWinningWork/AwardDetail.vue
new file mode 100644
index 0000000..6aef476
--- /dev/null
+++ b/src/pagesC/AwardWinningWork/AwardDetail.vue
@@ -0,0 +1,203 @@
+
+
+
+
+
+
+ currentNum = e.current" indicatorStyle="right: 20px" height="300px">
+
+ {{ currentNum + 1 }}/{{ list.length }}
+
+
+
+
+
+
+ {{actDetObj.name}}
+
+
+
+
+
+
+
+
+ {{actDetObj.releaseTime}}
+
+
+
+
+
+
+
+ {{actDetObj.views}}浏览
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pagesC/AwardWinningWork/AwardWinningWork.vue b/src/pagesC/AwardWinningWork/AwardWinningWork.vue
index faf84db..11c2262 100644
--- a/src/pagesC/AwardWinningWork/AwardWinningWork.vue
+++ b/src/pagesC/AwardWinningWork/AwardWinningWork.vue
@@ -3,16 +3,11 @@
-
+
- {{v.workTitle}}
-
-
-
- {{v.author}}
-
+ {{v.name}}
@@ -23,6 +18,10 @@
export default {
data() {
return {
+ pages: 1,
+ size: 20,
+ // 请求状态识别变量
+ requestStatus: false,
fightVirusList: [{
id: 1,
author: "谢万里",
@@ -56,9 +55,73 @@
]
};
},
- onLoad(opt) {
- console.log(opt.id);
- }
+ onLoad() {
+ this.getData()
+ this.pages = 1
+ },
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.pages = 1
+ this.getData()
+ setTimeout(function() {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ //上拉
+ onReachBottom() {
+ this.pages++
+ this.getMoreData();
+ },
+ methods: {
+ //活动剪影数据
+ getData() {
+ let _this = this
+ this.http.request('/culturalCreativity/list', {
+ page: this.pages,
+ size: this.size
+ }, "GET").then(res => {
+ if (res.code == 200) {
+ this.fightVirusList = res.data.records
+ this.load = false
+ }
+ }).catch(e => {
+ uni.showToast({
+ title: e.data.message,
+ icon: "none",
+ });
+ })
+ },
+ //上拉数据
+ getMoreData() {
+ if (this.requestStatus) {
+ // 利用 return 终止函数继续运行
+ return false;
+ }
+ this.requestStatus = true;
+ this.http.request('/culturalCreativity/list', {
+ page: this.pages,
+ size: this.size
+ }, "GET").then(res => {
+ if(res.data.records.length > 0){
+ res.data.records.forEach(function(item){
+ this.fightVirusList.push(item)
+ })
+ }else{
+ this.pages--
+ }
+ setTimeout(() => {
+ // 模拟执行完毕
+ // 改变 requestStatus
+ this.requestStatus = false;
+ }, 500);
+ }).catch(e => {
+ uni.showToast({
+ title: e.data.message,
+ icon: "none",
+ });
+ })
+ },
+ },
}
diff --git a/src/pagesC/DataSearch/DataSearch.vue b/src/pagesC/DataSearch/DataSearch.vue
index 9eab2a0..22ce62e 100644
--- a/src/pagesC/DataSearch/DataSearch.vue
+++ b/src/pagesC/DataSearch/DataSearch.vue
@@ -9,7 +9,8 @@
返回
+ @search="searchList" @change="searchList" shape="square" :showAction="false" v-model="dataVal"
+ placeholder="请输入资料名称">
@@ -25,32 +26,46 @@
-
-
-
-
-
-
- {{ v.name }}
-
-
- {{ v.createdAt }}
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ v.name }}
+
+
+ {{ v.createdAt }}
+
+
+
+
+ {{ v.name }}
+
+
+ {{ v.createdAt }}
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
+
+
+
+
+
{{ item.name }}
@@ -59,8 +74,17 @@
{{ item.createdAt }}
-
-
+
+
+
+ {{ item.name }}
+
+
+ {{ item.createdAt }}
+
+
+
+
-
+
+
-
+
+
+
+
+
+
+ 编辑
+
+
@@ -157,11 +190,23 @@
parentId: '',
oldID: [],
isWlAdmin: true,
+ isWx: true,
+ delOne: false,
};
},
// onLoad() {
// this.getList()
// },
+ onReady() {
+ // #ifdef MP-WEIXIN
+ this.isWx = true
+ // #endif
+
+ // #ifndef MP-WEIXIN
+ //除了小程序
+ this.isWx = false
+ // #endif
+ },
onShow() {
this.isWlAdmin = uni.getStorageSync('isWlAdmin');
this.folderList = []
@@ -179,6 +224,11 @@
this.checkboxData = []
this.load = false
this.showDir = false
+ uni.showToast({
+ icon: 'success',
+ title: '删除成功',
+ duration: 2000
+ })
this.getList()
}
}).catch(e => {
@@ -188,24 +238,26 @@
});
})
},
+ toEdit() {
+ let id = this.checkedArr[0]
+ this.folderList.forEach(item => {
+ if(item.id == id){
+ uni.navigateTo({
+ url: "/pagesC/DataSearch/addNew?editId=" + id
+ })
+ }
+ })
+ this.checkboxData.forEach(ele => {
+ if(ele.id == id){
+ uni.navigateTo({
+ url: "/pagesC/DataSearch/upload?editId=" + id
+ })
+ }
+ })
+ },
clickDot(num) {
- this.dotNum = num
- this.delDir()
- // this.showDir = true
- },
- delFile(index) {
- this.dotNum = index
- this.showModel = true
- },
- selectClick(index) {
- if (index.name == '编辑文件夹') {
-
- } else {
- this.delDir()
- }
- },
- delDir() {
- this.showModel = true
+ this.isSelect = false
+ this.checkedArr.push(num)
},
moreSelected() {
this.allSelect = !this.allSelect
@@ -213,8 +265,9 @@
// 多选复选框改变事件
changeCheckbox(e) {
this.checkedArr = e.detail.value;
+ let len = this.checkboxData.length + this.folderList.length
// 如果选择的数组中有值,并且长度等于列表的长度,就是全选
- if (this.checkedArr.length > 0 && this.checkedArr.length == this.checkboxData.length) {
+ if (this.checkedArr.length > 0 && this.checkedArr.length == len) {
this.allChecked = true;
} else {
this.allChecked = false;
@@ -226,6 +279,12 @@
// 全选
if (chooseItem[0] == 'all') {
this.allChecked = true;
+ for (let item of this.folderList) {
+ let itemVal = item.id;
+ if (!this.checkedArr.includes(itemVal)) {
+ this.checkedArr.push(itemVal);
+ }
+ }
for (let item of this.checkboxData) {
let itemVal = item.id;
if (!this.checkedArr.includes(itemVal)) {
@@ -238,55 +297,25 @@
this.checkedArr = [];
}
},
- // 下载
- // outList() {
- // let urlPath = http.config.baseUrl + '/activityUser/sign_export/' + this.activityId + '/' + this.type
- // const token = uni.getStorageSync('token')
- // if (this.isWx) {
- // wx.downloadFile({
- // url: urlPath, //仅为示例,并非真实的资源
- // header: {
- // 'Authorization': "Bearer " + token,
- // 'x-token': token
- // },
- // success(res) {
- // // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
- // if (res.statusCode === 200) {
- // const filePath = res.tempFilePath;
- // wx.openDocument({
- // filePath: filePath,
- // showMenu: true,
- // success: function(res) {
- // console.log(res, '打开文档成功');
- // }
- // });
- // }
- // }
- // })
- // } else {
- // window.location.href = urlPath
- // }
- // }
delAll() {
this.dotNum = this.checkedArr.join(',')
- this.confirmModel()
+ this.showModel = true
},
GofileDetail(id) {
this.oldID.push(this.parentId)
- console.log(this.oldID)
this.parentId = id
this.dirIds = id
this.folderList = []
this.checkboxData = []
this.getList()
},
- backTo(){
+ backTo() {
this.parentId = this.oldID.slice(-1).join(',')
this.dirIds = this.oldID.slice(-1).join(',')
- this.oldID.splice(-1,1)
+ this.oldID.splice(-1, 1)
this.folderList = []
this.checkboxData = []
-
+
this.getList()
},
addDir(val) {
@@ -300,6 +329,12 @@
})
}
},
+ searchList() {
+ this.folderList = []
+ this.checkboxData = []
+
+ this.getList()
+ },
getList() {
let that = this
this.dotNum = []
@@ -330,19 +365,48 @@
},
// 多张 图片预览
previewImage(val) { // index 索引 如果 需要复用方法 可以使用 类型来进行区分(val)
- console.log(val)
- let photoList = []
- if(val.type == 'photo'){
- photoList.push(val.url)
+ console.log(val)
+ let photoList = []
+ if (val.type == 'photo') {
+ photoList.push(val.url)
uni.previewImage({
- current: 0, // 当前显示图片的索引值
- urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
- loop:true, // 是否可循环预览
+ current: 0, // 当前显示图片的索引值
+ urls: photoList, // 需要预览的图片列表,photoList要求必须是数组
+ loop: true, // 是否可循环预览
+ })
+ } else {
+ uni.downloadFile({
+ url: val.url, //仅为示例,并非真实的资源
+ success(res) {
+ // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
+ if (res.statusCode === 200) {
+ const filePath = res.tempFilePath;
+ uni.openDocument({
+ filePath: filePath,
+ showMenu: true,
+ success: function(res) {
+ console.log(res, '打开文档成功');
+ },
+ fail: (res) => {
+ uni.showToast({
+ icon: 'none',
+ title: '文件打开失败',
+ duration: 2000
+ })
+ }
+ });
+ }
+ }
})
}
-
+ },
+ noPermission(){
+ uni.showToast({
+ icon: 'none',
+ title: '您没有权限浏览此文件',
+ duration: 2000
+ })
}
-
}
}
diff --git a/src/pagesC/DataSearch/addNew.vue b/src/pagesC/DataSearch/addNew.vue
index 7ad4581..da54ada 100644
--- a/src/pagesC/DataSearch/addNew.vue
+++ b/src/pagesC/DataSearch/addNew.vue
@@ -1,14 +1,29 @@
-
+
+
+
+
+
+
+
+
+
+
+ 确认
+
+
-
@@ -19,32 +34,109 @@
tips: '',
registInfo: {
name: '',
- userRole: 'zyz,wyrc',
parentId: '',
isExtent: '',
dirIds: '/',
- }
+ },
+ checkboxValue1: [],
+ checkboxList1: [{
+ name: '文艺工作者',
+ id: 'wyrc'
+ }, {
+ name: '文艺爱好者',
+ id: 'zyz'
+ }],
+ showRole: false,
+ role: '',
+ roleList: '',
+ editId:'',
+ editDis: false
};
},
onLoad(op) {
- this.registInfo.parentId = op.id
- if(op.id){
+ if(op.editId){
+ this.editId = op.editId
+ this.editDis = true
+ this.getEdit()
+ }
+ else if(op.id){
+ this.registInfo.parentId = op.id
this.registInfo.dirIds = op.id
}else{
+ this.registInfo.parentId = op.id
this.registInfo.dirIds = '/'
}
},
methods: {
submitNext() {
- let data = {
- name: this.registInfo.name,
- userRole: this.registInfo.userRole,
- parentId: this.registInfo.parentId,
- dirIds: this.registInfo.dirIds,
+ if(this.editDis){
+ this.http.request('/information/update',{id:this.editId,userRole:this.roleList}, "GET").then(res => {
+ if (res.code == 200) {
+ uni.navigateBack()
+ }
+ }).catch(e => {
+ uni.showToast({
+ title: e.data.message,
+ icon: "none",
+ });
+ })
+ }else{
+ let data = {
+ name: this.registInfo.name,
+ parentId: this.registInfo.parentId,
+ dirIds: this.registInfo.dirIds,
+ userRole: this.roleList
+ }
+ this.http.request('/information/add', data, "POST").then(res => {
+ if (res.code == 200) {
+ uni.navigateBack()
+ }
+ }).catch(e => {
+ uni.showToast({
+ title: e.data.message,
+ icon: "none",
+ });
+ })
}
- this.http.request('/information/add', data, "POST").then(res => {
+ },
+ checkboxChange(n) {
+ console.log('change', n);
+ let _this = this
+ this.role = n.join(',')
+ let arr = []
+ n.forEach(function(item) {
+ _this.checkboxList1.forEach(function(ele) {
+ if (ele.name == item) {
+ arr.push(ele.id)
+ }
+ })
+ })
+ this.roleList = arr.join(',')
+ },
+ // selectForm1(e) {
+ // const value = e.detail.value
+ // console.log(this.radiovalue1)
+ // },
+ close() {
+ this.showRole = false
+ },
+ getEdit() {
+ this.http.request('/information/detail/' + this.editId,{}, "GET").then(res => {
if (res.code == 200) {
- uni.navigateBack()
+ let _this = this
+ this.registInfo.userRole = res.data.userRole
+ let nff = res.data.userRole.split(',')
+ let arr = []
+ nff.forEach(function(item) {
+ _this.checkboxList1.forEach(function(ele) {
+ if (ele.id == item) {
+ arr.push(ele.name)
+ }
+ })
+ })
+ this.checkboxValue1 = arr
+ this.role = arr.join(',')
+ this.registInfo.name = res.data.name
}
}).catch(e => {
uni.showToast({
diff --git a/src/pagesC/DataSearch/upload.vue b/src/pagesC/DataSearch/upload.vue
index 7a1f496..4cdb66e 100644
--- a/src/pagesC/DataSearch/upload.vue
+++ b/src/pagesC/DataSearch/upload.vue
@@ -6,17 +6,38 @@
+ style="color: #251B1D;" :disabled="editDis">
+
+
+ 查看权限
+
+
+
+
+
+
+
+
+
+
+
+ 确认
+
+
类型
-
-
+
+
@@ -34,15 +55,15 @@
文件上传
-
-
-
+
发布
@@ -62,30 +83,47 @@
radiolist1: [{
name: '图片',
id: 'photo'
- },{
+ }, {
name: '其他',
id: 'other'
- }
- ],
+ }],
+ checkboxValue1: [],
+ checkboxList1: [{
+ name: '文艺工作者',
+ id: 'wyrc'
+ }, {
+ name: '文艺爱好者',
+ id: 'zyz'
+ }],
ok: true,
isWx: true,
showType: false,
- type: ''
+ showRole: false,
+ type: '',
+ role: '',
+ roleList: '',
+ editId:'',
+ editDis: false
}
},
- onLoad(op){
- if(op.id){
- this.id = op.id
- }else{
+ onLoad(op) {
+ if(op.editId){
+ this.editId = op.editId
+ this.editDis = true
+ this.getEdit()
+ }
+ else if (op.id) {
+ this.id = op.id
+ } else {
this.id = '/'
}
},
onReady() {
-
+
// #ifdef MP-WEIXIN
this.isWx = true
// #endif
-
+
// #ifndef MP-WEIXIN
//除了小程序
this.isWx = false
@@ -149,38 +187,8 @@
})
},
next() {
- this.ok = true
- if(this.name == ''){
- uni.showToast({
- title: '请输入名称',
- icon: "none",
- });
- this.ok = false
- return
- }
- if(this.type == ''){
- uni.showToast({
- title: '请输入类型',
- icon: "none",
- });
- this.ok = false
- return
- }
- if(this.fileList3.length == 0){
- uni.showToast({
- title: '请上传文件',
- icon: "none",
- });
- this.ok = false
- return
- }
- if(this.ok){
- let image = []
- this.fileList3.forEach(function(item) {
- image.push(item.url)
- })
- let data = image.join(',')
- this.http.request('/information/upload?dirIds=' + this.id + '&type=' + this.radiovalue1 + '&name=' + this.name + '&url=' + data , {}, "POST").then(res => {
+ if(this.editDis){
+ this.http.request('/information/update',{id:this.editId,userRole:this.roleList}, "GET").then(res => {
if (res.code == 200) {
uni.navigateBack()
}
@@ -190,11 +198,70 @@
icon: "none",
});
})
+ }else{
+ this.ok = true
+ if (this.name == '') {
+ uni.showToast({
+ title: '请输入名称',
+ icon: "none",
+ });
+ this.ok = false
+ return
+ }
+ if (this.roleList == '') {
+ uni.showToast({
+ title: '请选择查看权限',
+ icon: "none",
+ });
+ this.ok = false
+ return
+ }
+ if (this.type == '') {
+ uni.showToast({
+ title: '请选择类型',
+ icon: "none",
+ });
+ this.ok = false
+ return
+ }
+ if (this.fileList3.length == 0) {
+ uni.showToast({
+ title: '请上传文件',
+ icon: "none",
+ });
+ this.ok = false
+ return
+ }
+ if (this.ok) {
+ let image = []
+ this.fileList3.forEach(function(item) {
+ image.push(item.url)
+ })
+ let data = image.join(',')
+ this.http.request('/information/upload?dirIds=' + this.id + '&type=' + this.radiovalue1 + '&name=' +
+ this.name + '&url=' + data + '&userRole=' + this.roleList, {}, "POST").then(res => {
+ if (res.code == 200) {
+ uni.navigateBack()
+ }
+ }).catch(e => {
+ uni.showToast({
+ title: e.data.message,
+ icon: "none",
+ });
+ })
+ }
}
+
},
selectType() {
this.$refs.picker.show()
},
+ chooseType() {
+ if(this.editDis){}
+ else{
+ this.showType=true
+ }
+ },
selectForm1(form) {
let _this = this
this.radiolist1.forEach(function(item) {
@@ -203,30 +270,78 @@
}
})
},
+ checkboxChange(n) {
+ console.log('change', n);
+ let _this = this
+ this.role = n.join(',')
+ let arr = []
+ n.forEach(function(item) {
+ _this.checkboxList1.forEach(function(ele) {
+ if (ele.name == item) {
+ arr.push(ele.id)
+ }
+ })
+ })
+ this.roleList = arr.join(',')
+ },
// selectForm1(e) {
// const value = e.detail.value
// console.log(this.radiovalue1)
// },
close() {
+ this.showRole = false
this.showType = false
},
-
+ getEdit() {
+ this.http.request('/information/detail/' + this.editId,{}, "GET").then(res => {
+ if (res.code == 200) {
+ let _this = this
+ this.fileList3.push({url: res.data.url})
+ this.radiolist1.forEach(function(item) {
+ if (item.id == res.data.type) {
+ _this.type = item.name
+ }
+ })
+ this.radiovalue1 = res.data.type
+ this.roleList = res.data.userRole
+ let nff = res.data.userRole.split(',')
+ let arr = []
+ nff.forEach(function(item) {
+ _this.checkboxList1.forEach(function(ele) {
+ if (ele.id == item) {
+ arr.push(ele.name)
+ }
+ })
+ })
+ this.checkboxValue1 = arr
+ this.role = arr.join(',')
+ this.name = res.data.name
+ }
+ }).catch(e => {
+ uni.showToast({
+ title: e.data.message,
+ icon: "none",
+ });
+ })
+ }
}
}
+
\ No newline at end of file
diff --git a/src/pagesD/wyxx/addindex.vue b/src/pagesD/wyxx/addindex.vue
index 0bfa79a..d6c1aad 100644
--- a/src/pagesD/wyxx/addindex.vue
+++ b/src/pagesD/wyxx/addindex.vue
@@ -80,6 +80,16 @@
-->
+
+
+ 下乡地址
+
+
+
+
+
+
发布
@@ -118,14 +128,15 @@
program: [],
programs: '',
programsId: '',
- showTypes: false
+ showTypes: false,
+ address:''
}
},
onShow() {
},
async onLoad() {
- await this.getCurrentTime()
+ // await this.getCurrentTime()
await this.teamandprogram()
},
methods: {
@@ -225,7 +236,15 @@
}
if (this.wTime.length < 12) {
uni.showToast({
- title: '请选择活动时间',
+ title: '请选择开始时间',
+ icon: "none",
+ });
+ this.ok = false
+ return
+ }
+ if (this.address == '') {
+ uni.showToast({
+ title: '请输入下乡地址',
icon: "none",
});
this.ok = false
@@ -239,6 +258,7 @@
teamId: this.teamsId,
endTime: this.eTime,
startTime: this.wTime,
+ address: this.address,
}, "POST").then(res => {
if (res.code == 200) {
uni.navigateBack()
diff --git a/src/pagesD/wyxx/detail.vue b/src/pagesD/wyxx/detail.vue
index 2fdd25f..07c791e 100644
--- a/src/pagesD/wyxx/detail.vue
+++ b/src/pagesD/wyxx/detail.vue
@@ -30,7 +30,7 @@
- 下乡地址:
+ 团队所属:
{{ data.villageName }}
@@ -48,6 +48,13 @@
{{ data.endTime }}
+
+
+
+ 下乡地址:
+
+ {{ data.address }}
+
diff --git a/src/request/interface.js b/src/request/interface.js
index f286812..279a254 100644
--- a/src/request/interface.js
+++ b/src/request/interface.js
@@ -5,10 +5,10 @@
export default {
config: {
- baseUrl: "http://192.168.2.39:8080/h5/api", //俞燕红-小程序不能配跨域
+ // baseUrl: "http://192.168.2.39:8080/h5/api", //俞燕红-小程序不能配跨域
// baseUrl: "/pre", //俞燕红-跨域
// baseUrl: "https://yxx.ydool.net/h5/api", //线上
- // baseUrl: "/h5/api", //h5
+ baseUrl: "/h5/api", //h5
header: {
'Content-Type': 'application/json;charset=UTF-8',
// 'Content-Type':'application/x-www-form-urlencoded'
@@ -104,8 +104,8 @@ export default {
});
setTimeout(() => {
uni.navigateTo({
- url: '/pagesC/Login/Login'
- // url: '/pages/pageHome/shwxLogin'
+ // url: '/pagesC/Login/Login'
+ url: '/pages/pageHome/shwxLogin'
})
}, 1200)