From 087e304d5adc1a809257f803ff0bef636a41f189 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E8=B1=AA?= <781521347@qq.com>
Date: Wed, 29 Sep 2021 17:29:59 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/demandHall/needsContact/index.wxml | 2 +-
pages/demandHall/resourcesContact/index.wxml | 4 +-
pages/demandHall/resourcesContact/index.wxss | 3 +-
pages/release/companyAuth/index.js | 16 +++++--
pages/release/companyAuth/index.wxml | 6 ++-
pages/release/perfectPersonInfo/index.js | 23 ++++++++-
pages/release/perfectPersonInfo/index.wxml | 7 ++-
pages/user/needsManage/index.js | 44 +++++++++++++++++-
pages/user/needsManage/index.wxml | 2 +-
pages/user/needsOrder/index.wxml | 8 ++--
pages/user/needsOrder/index.wxss | 1 -
pages/user/resourcesManage/index.js | 49 ++++++++++++++++++--
pages/user/resourcesManage/index.wxml | 2 +-
project.private.config.json | 6 +++
14 files changed, 147 insertions(+), 26 deletions(-)
diff --git a/pages/demandHall/needsContact/index.wxml b/pages/demandHall/needsContact/index.wxml
index cc1f4d1..1c42eae 100644
--- a/pages/demandHall/needsContact/index.wxml
+++ b/pages/demandHall/needsContact/index.wxml
@@ -27,7 +27,7 @@
{{item.title}}
- 网站建设
+ {{item.cname}}
{{item.enterprise.enterpriseName}}
diff --git a/pages/demandHall/resourcesContact/index.wxml b/pages/demandHall/resourcesContact/index.wxml
index d9c9574..02de2e8 100644
--- a/pages/demandHall/resourcesContact/index.wxml
+++ b/pages/demandHall/resourcesContact/index.wxml
@@ -21,11 +21,11 @@
发送需求给企业(个人)
- 我需要公司官网设计-网红餐饮网红餐饮
+ {{item.title}}
发布中
- 场地租赁
+ {{item.cname}}
-
+
+ {{resourcesList[resourcesIdx].cagetoryName || '请选择'}}
+
diff --git a/pages/release/perfectPersonInfo/index.js b/pages/release/perfectPersonInfo/index.js
index 225d0ad..cbaf6ae 100644
--- a/pages/release/perfectPersonInfo/index.js
+++ b/pages/release/perfectPersonInfo/index.js
@@ -17,7 +17,8 @@ Page({
longitude: '',
enterprisePhone: '',
imgPaths: [],
- }
+ },
+ resourcesList:[]
},
showMap(){
let that = this;
@@ -50,6 +51,7 @@ Page({
*/
onLoad: function (options) {
this.initValidate()//验证规则函数
+ this.getResourcesCagetory()
},
initValidate(){
const rules = {
@@ -88,6 +90,25 @@ Page({
}
this.WxValidate = new WxValidate(rules, messages)
},
+ //获取供应、需求类型
+ getResourcesCagetory(){
+ app.http('GET','ResourcesCagetory/listResourcesCagetory').then((res)=>{
+ // console.log(res)
+ if(res.data.success){
+ this.setData({
+ resourcesList: res.data.data
+ })
+ }
+ })
+ },
+ resourcesChange(e){
+ // console.log(e)
+ let idx = Number(e.detail.value)
+ this.setData({
+ resourcesIdx: idx,
+ ['form.resourceCagetoryId']: this.data.resourcesList[idx].id
+ })
+ },
upImgs(){
util.chooseImages2(img => {
let imgs = this.data.form.imgPaths
diff --git a/pages/release/perfectPersonInfo/index.wxml b/pages/release/perfectPersonInfo/index.wxml
index 6892b13..e38490e 100644
--- a/pages/release/perfectPersonInfo/index.wxml
+++ b/pages/release/perfectPersonInfo/index.wxml
@@ -14,8 +14,11 @@
主要承接类型*
-
-
+
+
+ {{resourcesList[resourcesIdx].cagetoryName || '请选择'}}
+
diff --git a/pages/user/needsManage/index.js b/pages/user/needsManage/index.js
index 7cc46a5..4d7cbca 100644
--- a/pages/user/needsManage/index.js
+++ b/pages/user/needsManage/index.js
@@ -67,8 +67,48 @@ Page({
},
// 下架
xiajiaClick(e){
- let id = e.currentTarget.dataset.id;
- console.log(id)
+ let id = e.currentTarget.dataset.item.id;
+ let status = e.currentTarget.dataset.item.status;
+ let that = this;
+ if(status == 1){
+ wx.showModal({
+ title: '提示',
+ content: '是否确定下架需求',
+ success(res){
+ if(res.confirm){
+ app.http('GET','Resources/withdrawResource',{id: id}).then((res)=>{
+ if(res.data.success){
+ wx.showToast({
+ title: '操作成功',
+ })
+ setTimeout(()=>{
+ that.getList()
+ },1500)
+ }
+ })
+ }
+ }
+ })
+ } else{
+ wx.showModal({
+ title: '提示',
+ content: '是否确定上架需求',
+ success(res){
+ if(res.confirm){
+ app.http('GET','Resources/putOnResource',{id: id}).then((res)=>{
+ if(res.data.success){
+ wx.showToast({
+ title: '操作成功',
+ })
+ setTimeout(()=>{
+ that.getList()
+ },1500)
+ }
+ })
+ }
+ }
+ })
+ }
},
// 撤回
withdrawClick(e){
diff --git a/pages/user/needsManage/index.wxml b/pages/user/needsManage/index.wxml
index 6901aa4..d2bef90 100644
--- a/pages/user/needsManage/index.wxml
+++ b/pages/user/needsManage/index.wxml
@@ -34,7 +34,7 @@
{{item.resourceStartTime}}申请
- 下架需求
+ {{item.status == 1 ? '下架' : '上架' }}需求
撤回审核
编辑发布
删除需求
diff --git a/pages/user/needsOrder/index.wxml b/pages/user/needsOrder/index.wxml
index adb3671..869b7e5 100644
--- a/pages/user/needsOrder/index.wxml
+++ b/pages/user/needsOrder/index.wxml
@@ -21,11 +21,11 @@
{{item.resourceInfo.content}}
-
+
+
@@ -53,7 +53,7 @@
-
+
diff --git a/pages/user/needsOrder/index.wxss b/pages/user/needsOrder/index.wxss
index 7ed74a7..832d980 100644
--- a/pages/user/needsOrder/index.wxss
+++ b/pages/user/needsOrder/index.wxss
@@ -3,7 +3,6 @@
.needs-info-box{
border: none !important;
- margin-bottom: 0 !important;
}
.info2{
width: calc(100% - 120rpx);
diff --git a/pages/user/resourcesManage/index.js b/pages/user/resourcesManage/index.js
index 7ca1662..170e3bd 100644
--- a/pages/user/resourcesManage/index.js
+++ b/pages/user/resourcesManage/index.js
@@ -67,10 +67,51 @@ Page({
})
},
// 下架
- xiajiaClick(e){
- let id = e.currentTarget.dataset.id;
- console.log(id)
- },
+ // 下架
+ xiajiaClick(e){
+ let id = e.currentTarget.dataset.item.id;
+ let status = e.currentTarget.dataset.item.status;
+ let that = this;
+ if(status == 1){
+ wx.showModal({
+ title: '提示',
+ content: '是否确定下架需求',
+ success(res){
+ if(res.confirm){
+ app.http('GET','Resources/withdrawResource',{id: id}).then((res)=>{
+ if(res.data.success){
+ wx.showToast({
+ title: '操作成功',
+ })
+ setTimeout(()=>{
+ that.getList()
+ },1500)
+ }
+ })
+ }
+ }
+ })
+ } else{
+ wx.showModal({
+ title: '提示',
+ content: '是否确定上架需求',
+ success(res){
+ if(res.confirm){
+ app.http('GET','Resources/putOnResource',{id: id}).then((res)=>{
+ if(res.data.success){
+ wx.showToast({
+ title: '操作成功',
+ })
+ setTimeout(()=>{
+ that.getList()
+ },1500)
+ }
+ })
+ }
+ }
+ })
+ }
+ },
// 撤回
withdrawClick(e){
let id = e.currentTarget.dataset.id;
diff --git a/pages/user/resourcesManage/index.wxml b/pages/user/resourcesManage/index.wxml
index f1e839d..08d4e43 100644
--- a/pages/user/resourcesManage/index.wxml
+++ b/pages/user/resourcesManage/index.wxml
@@ -30,7 +30,7 @@
赚取 50000元
{{item.createTime}}申请
- 下架资源
+ 下架资源
撤回审核
编辑发布
删除项目
diff --git a/project.private.config.json b/project.private.config.json
index 8591a0b..e8dbea6 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -23,6 +23,12 @@
"pathName": "pages/release/perfectPersonInfo/index",
"query": "",
"scene": null
+ },
+ {
+ "name": "pages/release/companyAuth/index",
+ "pathName": "pages/release/companyAuth/index",
+ "query": "",
+ "scene": null
}
]
}