Selaa lähdekoodia

Merge branch 'master' of http://git.liuniu946.com/lhl/duck

Lina 3 vuotta sitten
vanhempi
commit
202330b66a
3 muutettua tiedostoa jossa 34 lisäystä ja 11 poistoa
  1. 14 2
      api/user.js
  2. 2 1
      pages/product/product.vue
  3. 18 8
      pages/user/extension.vue

+ 14 - 2
api/user.js

@@ -125,8 +125,9 @@ export function delcollect(data) {
 
 export function getExtensionData(data) {
 	return request({
-		url: '/api/spread/people',
-		method: 'post',
+		// url: '/api/spread/people',
+		url: '/api/user/spread_list',
+		method: 'get',
 		data
 	})
 }
@@ -161,4 +162,15 @@ export function spreadInfo(data) {
 		data
 	})
 	// return request.get("user/spread_info");
+}
+
+/*
+ * 推广数据
+ * */
+export function getSpreadInfo() {
+	// return request.get("/commission");
+	return request({
+		url: '/api/commission',
+		method: 'get'
+	})
 }

+ 2 - 1
pages/product/product.vue

@@ -340,6 +340,7 @@ export default {
 		},
 		// 打開彈窗
 		specOPne(type = 1) {
+			console.log(type,'type+++++++++++++++++++++')
 			let obj = this;
 			obj.specClass = 'show';
 			obj.type = type;
@@ -510,7 +511,7 @@ export default {
 			// };
 			let is_new = 0
 			if(obj.type == 1){
-				is_new = 0
+				is_new = 1
 			}
 			let data = {
 				product_id: goodId,

+ 18 - 8
pages/user/extension.vue

@@ -42,7 +42,7 @@
  									<text>{{ item.nickname }}</text>
  								</view>
  								<view class="time">
- 									<text>{{ item.time }}</text>
+ 									<text>{{ item.spread_time }}</text>
  								</view>
  							</view>
  						</view>
@@ -54,7 +54,7 @@
  	</view>
  </template>
  <script>
- import { getExtensionData } from '@/api/user.js';
+ import { getExtensionData,spreadInfo } from '@/api/user.js';
  import { mapState, mapMutations } from 'vuex';
  import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  import empty from '@/components/empty';
@@ -108,12 +108,14 @@
  			list:'',
  			total:'',
  			totalLevel:'',
- 			img:'http://kaifa.crmeb.net/uploads/attach/2019/08/20190807/723adbdd4e49a0f9394dfc700ab5dba3.png'
+ 			img:'http://kaifa.crmeb.net/uploads/attach/2019/08/20190807/723adbdd4e49a0f9394dfc700ab5dba3.png',
+			userInfo: {}
  		};
  	},
  	onLoad(options) {},
  	onShow() {
- 		this.loadData();	
+ 		this.loadData();
+		this.loadAll()
  	},
  	methods: {
  		// 页面跳转
@@ -147,8 +149,10 @@
  					page: navItem.page,
  					limit: navItem.limit,
  					keyword:'',
- 					sort:'uid desc',
- 					grade:state
+					level: index,
+ 					// sort:'uid desc'
+					sort: 'pay_price ASC'
+ 					// grade:state
  				},
  			)
  				.then(({ data }) => {
@@ -156,7 +160,7 @@
  					
  					this.total = data.total;
  					this.totalLevel =data.totalLevel;
- 					this.all = this.total + this.totalLevel;
+ 					// this.all = this.total + this.totalLevel;
  					if (data.list.length > 0) {
  						this.list = data.list;
  						navItem.orderList = navItem.orderList.concat(data.list);
@@ -192,7 +196,13 @@
  			uni.switchTab({
  				url:'/pages/user/user'
  			})
- 		}
+ 		},
+		loadAll(){
+			spreadInfo().then(res => {
+				this.userInfo = res.data
+				console.log(res,'6666666666666666666')
+			});
+		}
  	}
  };
  </script>