Explorar o código

推广收益和统计

LuoDLeo %!s(int64=2) %!d(string=hai) anos
pai
achega
d2dcb62581
Modificáronse 2 ficheiros con 23 adicións e 4 borrados
  1. 7 1
      common/js/api.js
  2. 16 3
      myPages/promotionCenter/index.vue

+ 7 - 1
common/js/api.js

@@ -714,7 +714,13 @@ export default {
 		})
 	},
 
-
+	// 推广统计
+	spreadCount() {
+		return request({
+			url: '/member/memberEarnings/appSpreadCount',
+			method: 'GET'
+		})
+	},
 
 
 

+ 16 - 3
myPages/promotionCenter/index.vue

@@ -11,7 +11,7 @@
                     <text>奖励金额</text>
                 </view>
                 <view class="title1">
-                    <text>¥1122</text>
+                    <text>¥{{earningsAmount}}</text>
                 </view>
             </view>
 
@@ -24,7 +24,7 @@
                     <text>注册人数</text>
                 </view>
                 <view class="title1">
-                    <text>11552</text>
+                    <text>{{registerNum}}</text>
                 </view>
             </view>
 
@@ -45,11 +45,24 @@ export default {
     },
     data() {
         return {
-
+          earningsAmount:'',
+          registerNum:''
         };
     },
     onLoad() {
 
+    },
+    onShow(){
+      this.$api.spreadCount().then(res=>{
+         if (res.data.code==200){
+           this.earningsAmount=res.data.data.earningsAmount
+           this.registerNum=res.data.data.registerNum
+         }else {
+           uni.showToast({
+             title: "获取失败"
+           })
+         }
+      })
     },
     methods: {
         goStatisticalPanel(){