liuyg
2021-07-03 9a7d014d8e664042686368ebd18b5daa78e0b6ea
components/contacts/contacts.vue
@@ -1,6 +1,18 @@
<template>
   <view class="pColumn">
      <view class="inPColumn" >
   <view class="pColumn" >
      <view class="inPColumn" v-if="fromW == 0">
         <view class="left" @click="chating">
            <view class="top">
               <view class="userImg">
                  <img class="img" :src=Pdata.avatar>
               </view>
               <view class="t-type">{{Pdata.recipientName}}</view>
               <view class="t-id">{{Pdata.postTime}}</view>
            </view>
            <view class="bottom">{{Pdata.postMessage}}</view>
         </view>
      </view>
      <view class="inPColumn" v-if="fromW == 1">
         <view class="left" @click="chating">
            <view class="top">
               <view class="userImg">
@@ -31,30 +43,6 @@
            this.bmainb = '0';
            //#endif
         },
         receives() {
            var url = this.$store.state.piAPI + "/alarm/alarm/APP-setAlarm",
               Pid = this.Pdata.id,
               id = this.$store.state.puserID, //警察id
               name = this.$store.state.puserName, //警察id
               data = {
                  id: Pid,
                  securityId: id,
                  alarmPeople: name
               },
               that = this;
            // console.log(data);
            wx.request({
               url: url,
               data: data,
               header: {
                  "content-type": "application/x-www-form-urlencoded"
               },
               method: 'POST',
               success(res) {
                  // console.log(res.data.msg);
               }
            })
         },
         chating(){
         //发起聊天
         var datas = this.Pdata;
@@ -68,17 +56,6 @@
               popuShow: false
            });
         },
         popupBY() {
            this.receives();
            // console.log('接收成功');
            this.$emit('refreshTask', this.fromW)
            // this.triggerEvent('myevent', this.data.fromW);
            this.popuShow = false;
         },
         popupBN() {
            // console.log('接收取消');
            this.popuShow = false;
         }
      },
      mounted() {
         this.beginObj();