hwq 4 سال پیش
والد
کامیت
59665a4803
12فایلهای تغییر یافته به همراه171 افزوده شده و 33 حذف شده
  1. 8 0
      api/order.js
  2. 1 0
      api/set.js
  3. 9 0
      api/user.js
  4. 8 1
      pages.json
  5. 91 0
      pages/index/fugou.vue
  6. 9 5
      pages/index/index.vue
  7. 5 7
      pages/money/wallet.vue
  8. 40 20
      pages/user/jiedian.vue
  9. BIN
      static/img/weixin.png
  10. BIN
      static/img/x.png
  11. BIN
      static/img/yong.png
  12. BIN
      static/img/yue.png

+ 8 - 0
api/order.js

@@ -144,3 +144,11 @@ export function computedOrderkey(data) {
 	});
 }
 
+//复购
+export function fugou(data) {
+	return request({
+		url: '/api/rebuy',
+		method: 'post',
+		data
+	});
+}

+ 1 - 0
api/set.js

@@ -69,3 +69,4 @@ export function getAddressDetail(data,id) {
 		data
 	});
 }
+

+ 9 - 0
api/user.js

@@ -137,4 +137,13 @@ export function getSpreadCount(data,type) {
 		method:'get',
 		data
 	})
+}
+
+//接点人信息
+export function getjiedian(data,uid) {
+	return request({
+		url:'/api/children/parent/'+uid,
+		method:'get',
+		data
+	})
 }

+ 8 - 1
pages.json

@@ -256,7 +256,14 @@
 			"style": {
 				"navigationBarTitleText": "创建订单"
 			}
-		}, {
+		},
+		{
+			"path": "pages/index/fugou",
+			"style": {
+				"navigationBarTitleText": "复购"
+			}
+		},
+		{
 			"path": "pages/money/pay",
 			"style": {
 				"navigationBarTitleText": "支付"

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 91 - 0
pages/index/fugou.vue


+ 9 - 5
pages/index/index.vue

@@ -30,15 +30,15 @@
 				</view>
 				<view class="box">
 					<view class="customs-img">
-						<image src="../../static/img/reduce.png" mode=""></image>
+						<image :src="fugou.image" mode=""></image>
 					</view>
 					<view class="customstext">
 						<view class="customstext1">
 							<view class="customstext-title clamp">
-								竹胎酵素健康饮竹胎酵素健康饮竹胎酵素健康饮
+								{{fugou.store_name}}
 							</view>
 							<view class="customstext-product clamp">
-								健康生态饮品纯植物无香精竹胎酵素健康饮竹胎酵素健康饮
+								{{fugou.store_info}}
 							</view>
 						</view>
 						<view class="customsprice">
@@ -46,9 +46,9 @@
 								健康价:¥
 							</view>
 							<view class="customsprice-between">
-								199
+								{{price}}
 							</view>
-							<view class="customsprice-right">
+							<view class="customsprice-right" @click="navTo('/pages/index/fugou')">
 								立即复购
 							</view>
 						</view>
@@ -124,6 +124,8 @@
 				carouselList: [], //轮播列表
 				couponArray: '',
 				bastList: [],//精品推荐
+				fugou:'',//复购商品
+				price:'',//复购价格
 			}
 		},
 		onLoad() {
@@ -135,6 +137,8 @@
 				loadIndexs({})
 					.then(({ data }) => {
 						console.log(data,'dddd')
+						this.fugou = data.register_order;
+						this.price = data.register_price;
 						let goods = data.info;
 						this.carouselList = data.banner;
 						this.swiperLength = this.carouselList.length;

+ 5 - 7
pages/money/wallet.vue

@@ -139,14 +139,12 @@ export default {
 				state
 			)
 				.then(({ data }) => {
-					console.log(data);
-					// if (data.count > 0) {
-					// 	navItem.orderList = navItem.orderList.concat(data.list);
-					// 	console.log(navItem.orderList);
-					// 	navItem.page++;
-					// }
 					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data[0].list);
+						data.forEach(e =>{
+							console.log(e);
+							navItem.orderList = navItem.orderList.concat(e.list);
+						})
+						
 						console.log(navItem.orderList);
 						navItem.page++;
 					}

+ 40 - 20
pages/user/jiedian.vue

@@ -8,7 +8,7 @@
 			</view>
 			<view class="number-box">
 				<view class="number">
-					<text>{{people}}</text>人
+					<text>{{userInfo.A_count + userInfo.B_count + userInfo.C_count}}</text>人
 				</view>
 				<view class="renshu">
 					我的接点人数
@@ -21,21 +21,21 @@
 					<view class="yeji-top">
 						A区业绩
 					</view>
-					<view class="yeji-buttom">¥{{a}}</view>
+					<view class="yeji-buttom">¥{{userInfo.A_achievement}}</view>
 				</view>
 				<view class="border"></view>
 				<view class="yeji-a">
 					<view class="yeji-top">
 						B区业绩
 					</view>
-					<view class="yeji-buttom">¥{{b}}</view>
+					<view class="yeji-buttom">¥{{userInfo.B_achievement}}</view>
 				</view>
 				<view class="border"></view>
 				<view class="yeji-a">
 					<view class="yeji-top">
 						C区业绩
 					</view>
-					<view class="yeji-buttom">¥{{c}}</view>
+					<view class="yeji-buttom">¥{{userInfo.C_achievement}}</view>
 				</view>
 			</view>
 			<view class="relation-box">
@@ -43,7 +43,7 @@
 					<view class="headbox">
 						<view class="head">
 							<view class="photo">
-								<image src="../../static/image/photo.jpg" mode=""></image>
+								<image :src=" avatar || '../../static/error/missing-face.png' "></image>
 							</view>
 						</view>
 						<view class="head-title">
@@ -51,11 +51,11 @@
 						</view>
 					</view>
 					<view class="information">
-						<view class="name">
-							徐浩岚
+						<view class="name clamp">
+							{{name}}
 						</view>
-						<view class="cell">
-							18252757278
+						<view class="cell clamp">
+							{{phone}}
 						</view>
 					</view>
 				</view>
@@ -101,7 +101,8 @@
 </template>
 
 <script>
-	
+	import { getjiedian } from '@/api/user.js'
+	import { mapState, mapMutations } from 'vuex';
 	export default {
 		data() {
 			return {
@@ -109,10 +110,33 @@
 				b: 2,
 				c: 3,
 				people: 255,
-				manList:''
+				listA:'',
+				listB:'',
+				listC:'',
+				name:'',
+				phone:'',
+				avatar:'',
+				id:''
 			}
 		},
-		methods: {}
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
+		onLoad() {
+			this.name = this.userInfo.nickname;
+			this.phone = this.userInfo.phone;
+			this.avatar = this.userInfo.avatar
+			this.id = this.userInfo.uid
+			this.loadData()
+		},
+		methods: {
+			loadData(){
+				const obj = this
+				getjiedian({},this.id).then(({data}) => {
+					console.log(data)
+				})
+			}
+		}
 	}
 </script>
 
@@ -123,9 +147,6 @@
 		height: 100%;
 		background-color: #FFFFFF;
 	}
-
-	.content {}
-
 	.container {
 		width: 750rpx;
 		height: 400rpx;
@@ -230,30 +251,29 @@
 				.information {
 					margin-left: 77rpx;
 					display: flex;
-					justify-content: center;
+					padding: 20rpx 10rpx;
 					flex-direction: column;
 					width: 297rpx;
 					height: 137rpx;
-					align-items: center;
 					background: #FFFFFF;
 					border: 4rpx solid #6EAB4E;
 					border-radius: 10rpx;
-
 					.name {
+						text-align: left;
+						margin-left: 70rpx;
 						font-size: 32rpx;
 						font-family: PingFang SC;
 						font-weight: bold;
 						color: #3F7C1F;
-						line-height: 48rpx;
 					}
 
 					.cell {
+						text-align: left;
 						margin-left: 70rpx;
 						font-size: 26rpx;
 						font-family: PingFang SC;
 						font-weight: 500;
 						color: #ABD56F;
-						line-height: 48rpx;
 					}
 				}
 

BIN
static/img/weixin.png


BIN
static/img/x.png


BIN
static/img/yong.png


BIN
static/img/yue.png


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است