sys 1 an în urmă
părinte
comite
44505a03e7
4 a modificat fișierele cu 31 adăugiri și 5 ștergeri
  1. 1 0
      api/my.js
  2. 1 0
      api/utility.js
  3. 28 4
      pages/common/call/call.vue
  4. 1 1
      pages/my/model/my-praise.vue

+ 1 - 0
api/my.js

@@ -5,4 +5,5 @@ const goodsUrl = '/admin/'
 export const getMemberInfo = (data) => request(goodsUrl + 'myself', 'get', {  })
 export const getMyMoments = (data) => request(goodsUrl + 'myself/myMoments', 'get', data)
 export const getMyLikeMoments = (data) => request(goodsUrl + 'myself/moments', 'get', data)
+export const getRechargePage = (data) => request(goodsUrl + 'myself/getRechargePage', 'get', data)
 

+ 1 - 0
api/utility.js

@@ -3,4 +3,5 @@ import { request } from '@/service/ajax'
 const goodsUrl = '/admin/'
 // 猜你喜欢
 export const getScreenDict = (data) => request(goodsUrl + 'utility/getDict/app_user_filter_hobby,%20app_user_filter_constellation,%20app_user_filter_purpose', 'get', {  })
+export const sayHi = (data) => request(goodsUrl + 'utility/sayHi/'+data, 'post', {  })
 

+ 28 - 4
pages/common/call/call.vue

@@ -1,5 +1,5 @@
 <template>
-  <view class="call-box">
+  <view class="call-box" @click.stop="sayHi">
     <view class="call-icon">
       <image class="call-img" src="/static/img/circle/Group-100243@2x.png" mode="aspectFill"></image>
     </view>
@@ -8,18 +8,42 @@
 </template>
 
 <script>
+import {sayHi} from "@/api/utility";
+import tools from "@/service/tools";
+
 export default {
   name: "call",
   components: {},
-  props: {},
+  props: {
+    userId:{
+      default:''
+    }
+  },
   data() {
-    return {}
+    return {
+      isAjax:false
+    }
   },
   watch: {},
   mounted() {
 
   },
-  methods: {}
+  methods: {
+    sayHi(){
+      if(this.isAjax){
+        return false
+      }
+      this.isAjax=true
+      sayHi(this.userId).then((res)=>{
+        this.isAjax=false
+        if(res.code===0){
+          tools.success('打招呼成功')
+        }else {
+          tools.error(res.msg)
+        }
+      })
+    }
+  }
 }
 </script>
 

+ 1 - 1
pages/my/model/my-praise.vue

@@ -61,7 +61,7 @@
             <view class="left-title-time sys-color-gray-9">{{item.createdAt}}发布</view>
           </view>
           <view class="praise-top-right">
-           <call></call>
+           <call :user-id="item.userId"></call>
           </view>
         </view>