浏览代码

Merge remote-tracking branch 'origin/productization2' into productization2

LAPTOP-UBJMM5MG\user 9 月之前
父节点
当前提交
5eaa0481fb

+ 7 - 0
js_sdk/http.js

@@ -1061,3 +1061,10 @@ export function parkSystemMsgReadAdd(data) {
         data, {}
     )
 }
+
+export function parkServiceEvaluationAdd(data) {
+    return $http.post(
+        '/wx/parkServiceEvaluation/add',
+        data, {}
+    )
+}

+ 2 - 2
pages/index/components/activity.vue

@@ -62,7 +62,7 @@ export default {
         // },
       ],
       search: {
-        createdBy: getUserLocalStorageInfo().userId,
+        // createdBy: getUserLocalStorageInfo().userId,
         pageNum: 1,
         pageSize: 10
       },
@@ -122,7 +122,7 @@ export default {
           }else{
             console.log(2222)
             uni.navigateTo({
-              url:'/pages/subPackages/parkActivity/activeApplication?activityId=' + item.id
+              url:'/pages/subPackages/parkActivity/activeApplication?activityId=' + item.id + '&url=' + item.annexArray[0]
             })
           }
         }

+ 475 - 2
pages/subPackages/minePages/mineInfo.vue

@@ -265,7 +265,7 @@
   </div>
 </template>
 <script>
-import { isFinishComInfo, getById, addCompanyExamine,upload } from "@/js_sdk/http.js"
+import { isFinishComInfo, getById, addCompanyExamine,upload,getUserLocalStorageInfo } from "@/js_sdk/http.js"
 // import auth from '@/js_sdk/auth.js'
 import constant from '@/pages/utils/constant.js'
 export default {
@@ -329,9 +329,482 @@ export default {
     }
   },
   mounted() {
+    // this.getCommit()
   },
   methods: {
-
+    takeshow() {
+      if (this.isnew) {
+        this.show = true
+      }
+    },
+    takeshow2() {
+      if (this.isnew) {
+        // console.log(123)
+        this.show2 = true
+      }
+    },
+    turnOff() {
+      this.$router.push('/home/home')
+    },
+    getInfo() {
+      getById({ id: auth.currUser().id }).then(res => {
+        console.log('res', res)
+        if (res && res.key == 200) {
+          this.company = res.data
+          this.qybqList = this.company.qybq.split(',')
+          // this.getTagList()
+          if (res.data.yyzzfbzp) {
+            const a = res.data.yyzzfbzp.split(',')
+            this.fileList.push(
+                JSON.parse(
+                    '{"url":"' +
+                    constant.BASE_URI +
+                    '/wx/fileController/download/' +
+                    a +
+                    '","isImage": true}'
+                )
+            )
+          }
+          if (res.data.ryxxzp) {
+            this.fileIdList2 = res.data.ryxxzp.split(',')
+            // console.log(this.fileIdList2);
+            this.fileIdList2.forEach(item => {
+              this.fileList2.push(
+                  JSON.parse(
+                      '{"url":"' +
+                      constant.BASE_URI +
+                      '/wx/fileController/download/' +
+                      item +
+                      '","isImage": true}'
+                  )
+              )
+            })
+          }
+          if (res.data.frsfzh) {
+            this.fileIdList5 = res.data.frsfzh.split(',')
+            this.frsfzzm = this.fileIdList5[0]
+            this.fileList3.push(
+                JSON.parse(
+                    '{"url":"' +
+                    constant.BASE_URI +
+                    '/wx/fileController/download/' +
+                    this.frsfzzm +
+                    '","isImage": true}'
+                )
+            )
+            if (this.fileIdList5[1]) {
+              this.frsfzfm = this.fileIdList5[1]
+              this.fileList4.push(
+                  JSON.parse(
+                      '{"url":"' +
+                      constant.BASE_URI +
+                      '/wx/fileController/download/' +
+                      this.frsfzfm +
+                      '","isImage": true}'
+                  )
+              )
+            }
+          }
+        } else if (res.key == 426) {
+          Toast(res.msg)
+          this.$router.push('/login')
+        } else {
+          Toast(res.msg)
+        }
+        if (this.company.shxydm && this.company.rzsj) {
+          this.isnew = false
+        }
+      }).then(() => {
+        isFinishComInfo({ comId: auth.currUser().id }).then(res => {
+          if (res.errno === 0) {
+            this.btnShow = false
+          } else if (res.errno === -1) {
+            this.btnShow = true
+          }
+        })
+      })
+    },
+    // 获取企业标签信息
+    // getTagList() {
+    //     getTagInfo().then(res => {
+    //         this.tagList = res.data
+    //         this.checkBoxList = res.data[0].children
+    //         this.checkBoxList.forEach(item => {
+    //             if (this.qybqList.findIndex(e => e == item.id) !== -1) {
+    //                 item.checked = true
+    //             }
+    //         })
+    //     })
+    // },
+    // clickTag(item, index) {
+    //     this.selectTag = index
+    //     this.selectTagId = item.id
+    //     this.tagList.forEach(item => {
+    //         if (this.selectTagId == item.id) {
+    //             this.checkBoxList = item.children
+    //         }
+    //     })
+    //     this.checkBoxList.forEach(item => {
+    //         if (this.company.qybq.split(',').findIndex(e => e == item.id) !== -1) {
+    //             item.checked = true
+    //         }
+    //     })
+    // },
+    // changeCheck(item) {
+    //     console.log(this.qybqList)
+    //     if (item.checked == true) {
+    //         if (this.qybqList.findIndex(e => e == item.id) == -1) {
+    //             this.qybqList.push(item.id)
+    //         }
+    //     } else {
+    //         const i = this.qybqList.findIndex(e => e == item.id)
+    //         if (i !== -1) {
+    //             this.qybqList.splice(i, 1)
+    //         }
+    //     }
+    //     this.$nextTick(() => {
+    //         this.company.qybq = this.qybqList.toString()
+    //         console.log(this.company.qybq)
+    //     })
+    // },
+    getCommit() {
+      const local = localStorage.getItem('company' + auth.currUser().id)
+      if (local) {
+        this.company = JSON.parse(local)
+        this.qybqList = this.company.qybq.split(',')
+        // this.getTagList()
+        if (this.company.yyzzfbzp) {
+          const a = this.company.yyzzfbzp.split(',')
+          console.log(this.company.yyzzfbzp)
+          this.fileList.push(
+              JSON.parse(
+                  '{"url":"' +
+                  constant.BASE_URI +
+                  '/wx/fileController/download/' +
+                  a +
+                  '","isImage": true}'
+              )
+          )
+        }
+        if (this.company.ryxxzp) {
+          this.fileIdList2 = this.company.ryxxzp.split(',')
+          // console.log(this.fileIdList2);
+          this.fileIdList2.forEach(item => {
+            this.fileList2.push(
+                JSON.parse(
+                    '{"url":"' +
+                    constant.BASE_URI +
+                    '/wx/fileController/download/' +
+                    item +
+                    '","isImage": true}'
+                )
+            )
+          })
+        }
+        if (this.company.frsfzh) {
+          this.fileIdList5 = this.company.frsfzh.split(',')
+          this.frsfzzm = this.fileIdList5[0]
+          this.fileList3.push(
+              JSON.parse(
+                  '{"url":"' +
+                  constant.BASE_URI +
+                  '/wx/fileController/download/' +
+                  this.frsfzzm +
+                  '","isImage": true}'
+              )
+          )
+          if (this.fileIdList5[1]) {
+            this.frsfzfm = this.fileIdList5[1]
+            this.fileList4.push(
+                JSON.parse(
+                    '{"url":"' +
+                    constant.BASE_URI +
+                    '/wx/fileController/download/' +
+                    this.frsfzfm +
+                    '","isImage": true}'
+                )
+            )
+          }
+        }
+      } else {
+        this.getInfo()
+      }
+    },
+    // 暂存本地
+    commit() {
+      if (this.frsfzzm || this.frsfzfm) {
+        this.company.frsfzh = this.frsfzzm + ',' + this.frsfzfm
+      } else {
+        this.company.frsfzh = null
+      }
+      this.company.czrid = auth.currUser().id
+      this.company.czr = auth.currUser().qymc
+      this.$delete(this.company, 'czsj')
+      localStorage.setItem('company' + auth.currUser().id, JSON.stringify(this.company))
+      this.$nextTick(() => {
+        const local = localStorage.getItem('company' + auth.currUser().id)
+        if (local) {
+          Toast('暂存成功')
+        } else {
+          Toast('暂存失败')
+        }
+      })
+    },
+    // 提交
+    submit() {
+      // console.log(this.company.frsfzh)
+      if (!this.company.shxydm) {
+        Toast('请填写统一社会信用代码')
+      } else if (!this.company.zczj) {
+        Toast('请填写注册资金')
+      } else if (!this.company.zcsj) {
+        Toast('请填写注册时间')
+      } else if (!this.company.fddbr) {
+        Toast('请填写法定代表人')
+      } else if (!this.company.qylxr) {
+        Toast('请填写企业联系人')
+      } else if (!this.company.lxdh) {
+        Toast('请填写手机号')
+      } else if (!this.company.email) {
+        Toast('请填写联系人邮箱')
+      } else if (!this.company.cwfzr) {
+        Toast('请填写财务负责人')
+      } else if (!this.company.cwfzrdh) {
+        Toast('请填写财务负责人电话')
+      } else if (!this.company.zcdz) {
+        Toast('请填写注册地址')
+      } else if (!this.company.jydz) {
+        Toast('请填写经营地址')
+      } else if (this.fileList.length == 0) {
+        Toast('请上传营业执照副本')
+      } else if (!this.frsfzzm) {
+        Toast('请上传法人身份证正面')
+      } else if (!this.frsfzfm) {
+        Toast('请上传法人身份证反面')
+      } else {
+        this.company.frsfzh = this.frsfzzm + ',' + this.frsfzfm
+        this.company.czrid = auth.currUser().id
+        this.company.czr = auth.currUser().qymc
+        this.$delete(this.company, 'czsj')
+        this.$delete(this.company, 'gxsj')
+        add(this.company).then(res => {
+          if (res.key == 200) {
+            Toast('提交成功')
+            this.btnShow = false
+            localStorage.removeItem('company' + auth.currUser().id)
+          } else {
+            Toast(res.msg)
+          }
+        })
+      }
+    },
+    selectTime(e) {
+      const dayjs = require('dayjs')
+      this.company.zcsj = dayjs(e).format('YYYY-MM-DD')
+      this.show = false
+    },
+    selectTime2(e) {
+      const dayjs = require('dayjs')
+      this.company.rzsj = dayjs(e).format('YYYY-MM-DD')
+      this.show2 = false
+    },
+    afterRead(file) {
+      Toast.loading({
+        message: '上传中...',
+        forbidClick: true,
+        duration: 0
+      })
+      if (file instanceof Array) {
+        file.map(v => {
+          this.uploadImg(v)
+        })
+      } else {
+        this.uploadImg(file)
+      }
+    },
+    afterRead2(file) {
+      Toast.loading({
+        message: '上传中...',
+        forbidClick: true,
+        duration: 0
+      })
+      if (file instanceof Array) {
+        file.map(v => {
+          this.uploadImg2(v)
+        })
+      } else {
+        this.uploadImg2(file)
+      }
+    },
+    afterRead3(file) {
+      Toast.loading({
+        message: '上传中...',
+        forbidClick: true,
+        duration: 0
+      })
+      if (file instanceof Array) {
+        file.map(v => {
+          this.uploadImg3(v)
+        })
+      } else {
+        this.uploadImg3(file)
+      }
+    },
+    afterRead4(file) {
+      Toast.loading({
+        message: '上传中...',
+        forbidClick: true,
+        duration: 0
+      })
+      if (file instanceof Array) {
+        file.map(v => {
+          this.uploadImg4(v)
+        })
+      } else {
+        this.uploadImg4(file)
+      }
+    },
+    beforeDelete(file, detail) {
+      const vm = this
+      // name.index代表图片的索引
+      vm.company.yyzzfbzp = ''
+      this.fileList = []
+    },
+    beforeDelete2(file, detail) {
+      const vm = this
+      // name.index代表图片的索引
+      vm.fileIdList2.splice(detail.index, 1)
+      vm.company.ryxxzp = vm.fileIdList2.toString()
+      console.log(vm.company.ryxxzp)
+      return (file, name) => {
+        const fileIndex = name.index
+        vm.fileIdList2[detail.index].splice(fileIndex, 1)
+      }
+    },
+    beforeDelete3(file, detail) {
+      const vm = this
+      // name.index代表图片的索引
+      vm.frsfzzm = ''
+      this.fileList3 = []
+      this.fileIdList3 = []
+    },
+    beforeDelete4(file, detail) {
+      const vm = this
+      // name.index代表图片的索引
+      vm.frsfzfm = ''
+      this.fileList4 = []
+      this.fileIdList4 = []
+    },
+    uploadImg(file) {
+      const _this = this
+      const formParam = new FormData() // 创建form对象
+      formParam.append('file', file.file) // 通过append向form对象添加数据
+      const config = {
+        headers: {
+          'Content-Type': 'multipart/form-data',
+          'MVVM-Key': String(new Date().getTime()),
+          xx: 'anything'
+        } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
+      } // 添加请求头
+      return new Promise((resolve, reject) => {
+        // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
+        upload(formParam, config)
+            .then(response => {
+              if (response.data.length) {
+                _this.company.yyzzfbzp = response.data[0]
+              }
+              Toast.clear()
+            })
+            .catch((err, x) => {
+              reject(err, x)
+            })
+      })
+    },
+    uploadImg2(file) {
+      const _this = this
+      const formParam = new FormData() // 创建form对象
+      formParam.append('file', file.file) // 通过append向form对象添加数据
+      const config = {
+        headers: {
+          'Content-Type': 'multipart/form-data',
+          'MVVM-Key': String(new Date().getTime()),
+          xx: 'anything'
+        } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
+      } // 添加请求头
+      return new Promise((resolve, reject) => {
+        // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
+        upload(formParam, config)
+            .then(response => {
+              if (response.data.length) {
+                response.data.forEach(element => {
+                  _this.fileIdList2.push(element)
+                })
+                _this.company.ryxxzp = _this.fileIdList2.toString()
+                // console.log(_this.company.ryxxzp);
+              }
+              Toast.clear()
+            })
+            .catch((err, x) => {
+              reject(err, x)
+            })
+      })
+    },
+    uploadImg3(file) {
+      const _this = this
+      const formParam = new FormData() // 创建form对象
+      formParam.append('file', file.file) // 通过append向form对象添加数据
+      const config = {
+        headers: {
+          'Content-Type': 'multipart/form-data',
+          'MVVM-Key': String(new Date().getTime()),
+          xx: 'anything'
+        } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
+      } // 添加请求头
+      return new Promise((resolve, reject) => {
+        // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
+        upload(formParam, config)
+            .then(response => {
+              if (response.data.length) {
+                response.data.forEach(element => {
+                  _this.fileIdList3.push(element)
+                })
+                _this.frsfzzm = _this.fileIdList3.toString()
+              }
+              Toast.clear()
+            })
+            .catch((err, x) => {
+              reject(err, x)
+            })
+      })
+    },
+    uploadImg4(file) {
+      const _this = this
+      const formParam = new FormData() // 创建form对象
+      formParam.append('file', file.file) // 通过append向form对象添加数据
+      const config = {
+        headers: {
+          'Content-Type': 'multipart/form-data',
+          'MVVM-Key': String(new Date().getTime()),
+          xx: 'anything'
+        } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
+      } // 添加请求头
+      return new Promise((resolve, reject) => {
+        // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
+        upload(formParam, config)
+            .then(response => {
+              if (response.data.length) {
+                response.data.forEach(element => {
+                  _this.fileIdList4.push(element)
+                })
+                _this.frsfzfm = _this.fileIdList4.toString()
+              }
+              Toast.clear()
+            })
+            .catch((err, x) => {
+              reject(err, x)
+            })
+      })
+    }
   }
 }
 </script>

+ 87 - 12
pages/subPackages/minePages/myActivities.vue

@@ -1,41 +1,116 @@
 <template>
     <div class="myActivities">
-      <div class="actItem" v-for="item in actList" @click="toDetail(item)">
+      <div class="actItem" v-for="item in activityList" @click="toDetail(item)">
         <div class="actTop">
-           <img src="https://www.idea-co-sf.com/gardenProduct/image/img1.png" class="actImg">
+           <img :src="item.annexArray[0]" class="actImg">
           <div class="actRight">
-            <span class="actTitle">{{ item.name }}</span>
-            <span class="actTime2">报名时间:2024/02/01~2024/02/16</span>
-            <span class="actTime2">报名人数:23</span>
+            <span class="actTitle">{{ item.activityName }}</span>
+            <span class="actTime2">报名时间:{{ item.startAndEndTime }}</span>
+            <span class="actTime2">报名人数:{{item.registrationNumbers}}</span>
           </div>
         </div>
         <div class="actTime">
-          <span class="time">开始时间:<span style="color: #666666">{{item.time}}</span></span>
-          <span :class="item.type==='已结束'?'yjs':'dks'">{{item.type}}</span>
+          <span class="time">开始时间:<span style="color: #666666">{{item.activityStartTime}}</span></span>
+          <span :class="item.statusName==='活动结束'?'yjs':'dks'">{{item.statusName}}</span>
         </div>
       </div>
     </div>
 </template>
 
 <script>
+import { getUserPower, getUserLocalStorageInfo, activityList, homeActivityClickCollect,getByCodes} from "@/js_sdk/http";
+
 export default {
   name: "myActivities",
+  onShow(){
+  },
+  mounted(){
+    this.getList()
+  },
   data(){
     return{
-      actList:[
+      activityList:[
         {name:'互联网私募如何入门?',time:'2021-1-21  13:00',type:'待开始'},
         {name:'公募基金中的大数据挖掘',time:'2021-1-21  13:00',type:'待开始'},
         {name:'年度小艾杯篮球赛开始啦',time:'2021-1-21  13:00',type:'已结束'},
-      ]
+      ],
+      search: {
+        // companyId: getUserLocalStorageInfo().userId,
+        pageNum: 1,
+        pageSize: 10
+
+      },
     }
+
   },
   methods:{
-    toDetail(){
+    clickColl(index) {
+      if (this.activityList[index].collectorsStatus==='2'){
+        this.activityList[index].collectorsStatus='1'
+      }else{
+        this.activityList[index].collectorsStatus='2'
+      }
+
+      homeActivityClickCollect({
+        id: this.activityList[index].id,
+        createdBy: getUserLocalStorageInfo().userId,
+        collectorsStatus: this.activityList[index].collectorsStatus
+      }).then(res => {
+      });
+    },
+    getList(){
+      this.activityList = []
+      activityList(this.search).then(res=>{
+        if (res.errno == 0){
+          res.data.rows.forEach(item=>{
+            const json = this.getItemJson(item)
+            this.activityList.push(json)
+          })
+
+        }
+        // console.log(res)
+      })
+    },
+    getItemJson(item) {
+      item.startAndEndTime = item.registrationStartTime + '~' + item.registrationEndTime
+      return item
+    },
+    baoming(item) {
+      if (item.statusName === '报名中') {
+        if (getUserLocalStorageInfo().userType == 3) {
+          uni.showModal({
+            title: "提示",
+            cancelText: "暂不",
+            confirmText: "去切换",
+            content: "您还不是企业用户,请切换登录身份后再进行相关操作。",
+            success: function (res) {
+              if (res.confirm) {
+                uni.navigateTo({
+                  url: "/pages/login2/login",
+                  success: function (e) {
+                    // uni.$emit('userType', 'OK')
+                  },
+                });
+              } else if (res.cancel) {
+                console.log("用户点击取消");
+              }
+            },
+          });
+        }else{
+          console.log(2222)
+          uni.navigateTo({
+            url:'/pages/subPackages/parkActivity/activeApplication?activityId=' + item.id
+          })
+        }
+      }
+    },
+    toDetail(item){
       uni.navigateTo({
-        url:"/pages/subPackages/minePages/registrationDetails",
+        url:"/pages/subPackages/minePages/registrationDetails?activityId=" + item.id + '&url=' + item.annexArray[0],
       })
     }
-  }
+  },
+
 }
 </script>
 

+ 81 - 20
pages/subPackages/minePages/registrationDetails.vue

@@ -1,19 +1,20 @@
 <template>
   <div class="registrationDetails">
     <div class="appFirstBox">
-      <img src="https://www.idea-co-sf.com/gardenProduct/image/img1.png" class="firstImg"/>
+      <img :src="url" class="firstImg"/>
       <div class="appTitle">
-        <span class="titleName">互联网私募如何入门?</span>
-        <span class="titleType">进行中</span>
+        <span class="titleName">{{ form.activityName }}</span>
+        <span class="titleType">{{ form.statusName }}</span>
       </div>
       <div @tap.stop="clickColl()" class="joinBox">
-        <span class="joinName">26人参加</span>
-        <span class="shoucang"><img :src="isColl ? heartSel : heart" class="scImg" /> 收藏</span>
+        <span class="joinName">{{ form.registrationNumbers }}人参加</span>
+<!--        <span class="shoucang"><img :src="isColl ? heartSel : heart" class="scImg" /> 收藏</span>-->
+        <span class="shoucang"><img :src="form.collectorsStatus==='2' ? heartSel : heart" class="scImg"/> 收藏</span>
       </div>
       <div class="contactBox">
           <span class="contackLeft">
             <span style="color: #666666;font-size: 28rpx">联系电话:</span>
-            <span style="color: #18172A;font-size: 36rpx;font-weight: 600">0510-680**808</span>
+            <span style="color: #18172A;font-size: 36rpx;font-weight: 600">{{ form.activityPhone }}</span>
           </span>
         <img src="https://www.idea-co-sf.com/gardenProduct/image/phoneIcon.png" class="phoneIcon">
       </div>
@@ -21,39 +22,39 @@
     <div class="appSecondBox">
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动举办</span>
-        <span class="secondBoxInfo">活动举办</span>
+        <span class="secondBoxInfo">{{ form.activitiesNotice }}</span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动内容</span>
-        <span class="secondBoxInfo">这是活动内容,这是活动内容,这是活动内容,这是活动内容,这是活动内容,这是活动内容。</span>
+        <span class="secondBoxInfo">{{ form.activityContent }}</span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动时间</span>
-        <span class="secondBoxInfo">2024-06-15  09:00  ~  2024-06-15  17:00</span>
+        <span class="secondBoxInfo">{{ form.activityStartTime }}  ~  {{ form.activityEndTime }}</span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动地址</span>
         <span class="secondBoxInfo dhInfo">
-             <span>无锡市经开区基金PARK E栋203会议室</span>
+             <span>{{ form.activityAddress }} - {{ form.activityAddressDetail }}</span>
              <img src="../parkActivity/image/dhIcon.png" class="dhIcon">
            </span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">报名条件</span>
         <span class="secondBoxInfo">
-             企业营销部门主管、有兴趣人事
+             {{ form.registrationConditions }}
            </span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">报名时间</span>
         <span class="secondBoxInfo">
-             2024-06-06  ~  2024-06-12
+             {{ form.registrationStartTime }}  ~  {{ form.registrationEndTime }}
            </span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动参与</span>
         <span class="secondBoxInfo">
-             还有 15 个名额
+             {{ form.activityQuota }}
            </span>
       </div>
     </div>
@@ -62,23 +63,83 @@
 </template>
 
 <script>
+import {getHomeCommunityActivityById, getByCodes, isRegistration, getUserLocalStorageInfo, homeActivityClickCollect} from "../../../js_sdk/http";
+
 export default {
   name: "activeApplication",
+  created() {
+    this.getByCodes()
+  },
+  onLoad(options) {
+    this.activityId = options.activityId
+    this.url = options.url
+    this.getById()
+  },
   data(){
     return{
+      dc_key: ['activity_stat'],
       heartSel: "https://www.idea-co-sf.com/gardenProduct/image/heartSel.png",
       heart: "https://www.idea-co-sf.com/gardenProduct/image/heart.png",
       isColl: true,
+      form: {},
+      dic_SelectList: [],
+      statusList: [],
+      activityId: '',
+      registrationFlag: false,
+      url:''
     }
   },
-  methods:{
-    clickColl(){
-      this.isColl = !this.isColl
-    },
-    toApplication(){
-      uni.navigateTo({
-        url:'/pages/subPackages/parkActivity/applicationInfo'
+  methods: {
+    getById(){
+      const data = {
+        id : this.activityId,
+        createdBy: getUserLocalStorageInfo().userId,
+      }
+      getHomeCommunityActivityById(data).then(res => {
+        if (res.errno === 0) {
+          this.form = res.data
+          this.statusList.forEach(item => {
+            if (this.form.status == item.value) {
+              this.form.statusName = item.label
+            }
+          })
+
+          const data = {
+            activityId: this.activityId,
+            companyId: getUserLocalStorageInfo().userId
+          }
+          isRegistration(data).then(res => {
+            if (res.errno === 0) {
+              this.registrationFlag = res.data
+            }
+          })
+        }
       })
+    },
+    async getByCodes() {
+      let data = await getByCodes(JSON.stringify(this.dc_key));
+      this.dic_SelectList = this.$common.handleDicList(data);
+      this.statusList = this.dic_SelectList.activity_stat
+      console.log('this.statusList', this.statusList)
+    },
+    clickColl() {
+      if (this.form.collectorsStatus==='2'){
+        this.form.collectorsStatus='1'
+      }else{
+        this.form.collectorsStatus='2'
+      }
+
+      homeActivityClickCollect({
+        id: this.activityId,
+        createdBy: getUserLocalStorageInfo().userId,
+        collectorsStatus: this.form.collectorsStatus
+      }).then(res => {
+      });
+    },
+    toApplication() {
+      // uni.navigateTo({
+      //   url: '/pages/subPackages/parkActivity/applicationInfo?activityId=' + this.form.id + "&registrationFlag=" + this.registrationFlag
+      // })
     }
   }
 }

+ 5 - 6
pages/subPackages/parkActivity/activeApplication.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="activeApplication">
     <div class="appFirstBox">
-      <img src="https://www.idea-co-sf.com/gardenProduct/image/img1.png" class="firstImg"/>
+      <img :src="url" class="firstImg"/>
       <div class="appTitle">
         <span class="titleName">{{ form.activityName }}</span>
         <span class="titleType">{{ form.statusName }}</span>
       </div>
       <div @tap.stop="clickColl()" class="joinBox">
-        <span class="joinName">{{ form.registrationNumbers }}参加</span>
+        <span class="joinName">{{ form.registrationNumbers }}参加</span>
         <span class="shoucang"><img :src="form.collectorsStatus==='2' ? heartSel : heart" class="scImg"/> 收藏</span>
       </div>
       <div class="contactBox">
@@ -78,17 +78,16 @@ export default {
       dic_SelectList: [],
       statusList: [],
       activityId: '',
-      registrationFlag: false
+      registrationFlag: false,
+      url: ''
     }
   },
   created() {
     this.getByCodes()
   },
-  onShow() {
-    this.getById()
-  },
   onLoad(options) {
     this.activityId = options.activityId
+    this.url = url
     this.getById()
   },
   methods: {

+ 45 - 8
pages/subPackages/serviceEvaluation/index.vue

@@ -5,7 +5,7 @@
          <div class="evaluationBox" >
            <span class="evaName">园区保洁</span>
            <van-rate
-               :value="value"
+               :value="cleaningService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -16,7 +16,7 @@
          <div class="evaluationBox" >
            <span class="evaName">园区绿化</span>
            <van-rate
-               :value="value"
+               :value="greeningService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -27,7 +27,7 @@
          <div class="evaluationBox" >
            <span class="evaName">维修服务</span>
            <van-rate
-               :value="value"
+               :value="maintenanceService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -38,7 +38,7 @@
          <div class="evaluationBox" >
            <span class="evaName">停车服务</span>
            <van-rate
-               :value="value"
+               :value="parkingService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -49,7 +49,7 @@
          <div class="evaluationBox" >
            <span class="evaName">园区配套</span>
            <van-rate
-               :value="value"
+               :value="supportingService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -60,7 +60,7 @@
          <div class="evaluationBox" >
            <span class="evaName">服务态度</span>
            <van-rate
-               :value="value"
+               :value="attitudeService"
                :size="24"
                gutter="32rpx"
                void-color="#eee"
@@ -71,29 +71,66 @@
        </div>
       <div class="serviceBody">
         <van-field
-            :value="form.contant"
+            :value="commentsOrSuggestions"
             autosize
             type="textarea"
             placeholder="请输入文字进行报事报修描述"
             class="myField"
             maxlength="2000"
             show-word-limit
+            @change="changeMsg"
         />
       </div>
-      <button class="submitBtn">提交</button>
+      <button class="submitBtn" @click="confirm">提交</button>
     </div>
 </template>
 
 <script>
+import { parkServiceEvaluationAdd, getUserLocalStorageInfo } from "@/js_sdk/http";
+
 export default {
   name: "index",
   data(){
     return{
       value: "5",
+      cleaningService: 0,
+      greeningService: 0,
+      maintenanceService: 0,
+      parkingService: 0,
+      supportingService: 0,
+      attitudeService: 0,
+      commentsOrSuggestions: '',
       form:{
 
       }
     }
+  },
+  methods: {
+    changeMsg(e){
+      console.log(e)
+      this.commentsOrSuggestions = e.detail
+    },
+    confirm() {
+      const _this = this
+      parkServiceEvaluationAdd({
+        cleaningService: this.cleaningService,
+        greeningService: this.greeningService,
+        maintenanceService: this.maintenanceService,
+        parkingService: this.parkingService,
+        supportingService: this.supportingService,
+        attitudeService: this.attitudeService,
+        userId: getUserLocalStorageInfo().userId,
+        commentsOrSuggestions: this.commentsOrSuggestions
+      }).then((res) => {
+        uni.showToast({
+          title: res.msg,
+          icon: 'success',
+          mask: true,
+          duration: 1000
+        });
+        uni.navigateBack({});
+      })
+    },
   }
 }
 </script>