xuhaolan 3 yıl önce
ebeveyn
işleme
1e43c2d7eb
2 değiştirilmiş dosya ile 26 ekleme ve 5 silme
  1. 8 1
      api/index.js
  2. 18 4
      pages/index/share.vue

+ 8 - 1
api/index.js

@@ -8,7 +8,14 @@ export function addSpread(data) {
 		data
 	});
 }
-
+//获取推荐人列表
+export function spreadList(data){
+	return request({
+		url:'/api/user/spreadList',
+		method:'get',
+		data
+	})
+}
 //首页
 export function index(data) {
 	return request({

+ 18 - 4
pages/index/share.vue

@@ -30,7 +30,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="tj-look" @click="button()">
+		<view class="tj-look" @click="getReferrer()">
 			查看推荐
 		</view>
 		<uni-popup ref="yeji" type="center">
@@ -93,7 +93,7 @@
 			</view>
 
 		</uni-popup>
-		<uni-popup  ref="yeji1" type="center">
+		<uni-popup ref="yeji1" type="center">
 			<view class="yj-wrap">
 				<view class="yj-tit">
 					我的推荐
@@ -133,6 +133,9 @@
 
 <script>
 	import top from '@/components/top/top.vue';
+	import {
+		spreadList
+	} from '@/api/index.js'
 	export default {
 		comments: {
 			top,
@@ -160,14 +163,25 @@
 			}
 		},
 		methods: {
+			//查看推荐人
+			getReferrer() {
+				spreadList({}).then(
+					({
+						data
+					}) => {
+						console.log(data, '1111111');
+					}
+
+				)
+			},
 			qrR() {
 
 			},
 			opneYj() {
 				this.$refs.yeji.open()
 			},
-			button(){
-						this.$refs.yeji1.open()
+			button() {
+				this.$refs.yeji1.open()
 			},
 			// 点击切换
 			navClick(index) {