hrjy 3 年之前
父節點
當前提交
816ece1ef8
共有 11 個文件被更改,包括 211 次插入449 次删除
  1. 19 0
      api/index.js
  2. 0 1
      api/user.js
  3. 9 1
      api/wallet.js
  4. 35 24
      pages.json
  5. 10 3
      pages/cart/cart.vue
  6. 23 6
      pages/index/child/recommend.vue
  7. 53 337
      pages/index/index.vue
  8. 16 37
      pages/money/USDT.vue
  9. 0 2
      pages/money/USDThuzhuan.vue
  10. 44 38
      pages/product/classify.vue
  11. 2 0
      pages/user/jifen.vue

+ 19 - 0
api/index.js

@@ -1,5 +1,23 @@
 import request from '@/utils/request'
 
+// 首页产品
+export function groom(data,type) {
+	return request({
+		url: '/api/groom/list/'+type,
+		method: 'get',
+		data
+	});
+}
+
+// 为你推荐
+export function getHot(data) {
+	return request({
+		url: '/api/product/hot',
+		method: 'get',
+		data
+	});
+}
+
 // 促销商品
 export function groom4(data) {
 	return request({
@@ -16,6 +34,7 @@ export function groom1(data) {
 		data
 	});
 }
+
 // 新品首发
 export function groom3(data) {
 	return request({

+ 0 - 1
api/user.js

@@ -101,4 +101,3 @@ export function delcollect(data) {
 	});
 }
 
-

+ 9 - 1
api/wallet.js

@@ -88,7 +88,6 @@ export function setBankInfo(data) {
 	});
 }
 
-
 // 账户余额
 export function balance(data) {
 	return request({
@@ -98,5 +97,14 @@ export function balance(data) {
 	});
 }
 
+// 账户余额
+export function exchange(data) {
+	return request({
+		url: '/api/exchange/list',
+		method: 'get',
+		data
+	});
+}
+
 
 

+ 35 - 24
pages.json

@@ -347,15 +347,14 @@
 		{
 			"path": "pages/user/scoreAccumulate",
 			"style": {
-				"navigationBarTitleText": "我的积分",
 				"navigationBarBackgroundColor": "transparent",
 				"navigationBarTextStyle": "white",
-					"app-plus": {
-						"titleNView": {
-							"type": "float",
-							"titleText": "我的积分"
-						}
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的积分"
 					}
+				}
 			}
 		},
 		{
@@ -626,30 +625,42 @@
       
         ,{
             "path" : "pages/user/jifen",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的购物积分",
-                "enablePullDownRefresh": false
-            }
-            
+			"style": {
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的购物积分"
+					}
+				}
+			}
         }
         ,{
             "path" : "pages/user/yongjin",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的佣金",
-                "enablePullDownRefresh": false
-            }
-            
+			"style": {
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的佣金"
+					}
+				}
+			}
         }
         ,{
             "path" : "pages/user/balance",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的余额",
-                "enablePullDownRefresh": false
-            }
-            
+			"style": {
+				"navigationBarBackgroundColor": "transparent",
+				"navigationBarTextStyle": "white",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的余额"
+					}
+				}
+			}
         }
     ],
 	"subPackages": [

+ 10 - 3
pages/cart/cart.vue

@@ -15,7 +15,7 @@
 		<view v-else>
 			<view class="header">
 				<view class="">
-					购物车共3件商品
+					购物车共{{cartList.length}}件商品
 				</view>
 				<view class=""  @click="allChecked ? clearCart() : ''">
 					清空购物车
@@ -224,9 +224,16 @@ export default {
 				cartList.cart_num >= cartList.trueStock || cartList.cart_num++
 			}else if(type == "del") {
 				if(cartList.cart_num <=1) {
-					this.deleteCartItem(index)
-					// this.cartList.splice(index, 1);
+						uni.showModal({
+							content: '删除该商品?',
+							success: e => {
+								if (e.confirm) {
+									this.deleteCartItem(index)
+								}
+							}
+						});
 				}
+				
 				cartList.cart_num <= 1 || cartList.cart_num--
 			}
 			const data = {

+ 23 - 6
pages/index/child/recommend.vue

@@ -30,22 +30,38 @@
 </template>
 
 <script>
+import { getHot } from '@/api/index.js';
 	export default {
 		data() {
 			return {
 				defaultImg: 'this.src="' + require('@/static/error/errorImage.jpg') + '"',
+				page: 1,
+				limit: 10,
+				bastList: []
 			}
 		},
+		mounted() {
+			this.loadData()
+		},
 		methods: {
 			//详情页
 			navToDetailPage(item) {
 				this.$parent.$parent.$parent.navToDetailPage(item)
 			},
-		},
-		mounted() {
-			// this.getList()
-		},
-		props: ["bastList"]
+			// 为你推荐
+			async loadData() {
+				let obj = this;
+				let data = {
+					page: obj.page,
+					limit: obj.limit
+				}
+				getHot({data}).then(res => {
+					console.log(res.data)
+					this.bastList = res.data
+				})
+			}
+			
+		}
 	}
 </script>
 
@@ -112,13 +128,14 @@
 					.ot-price {
 						color: #999999;
 						text-decoration: line-through;
-						margin-right: 15rpx;
+						margin-right: 5rpx;
 					}
 					.price {
 						color: #EF3A55;
 						font-size: 35rpx;
 					}
 					.button {
+						min-width: 125rpx;
 						background: linear-gradient(90deg, #438BED 0%,  #44BFEC 100%);
 						background-color: #438BED;
 						height: 50rpx;

+ 53 - 337
pages/index/index.vue

@@ -7,17 +7,12 @@
 				<view class="iconfont iconsearch"></view>
 				<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
 			</view>
-		</view>
-		<view class="mp-height"></view> -->
+		</view> -->
 		<!-- #endif -->
 		<!-- 头部轮播 -->
-		<!-- <view class="headerInput" >
-			<input type="text" placeholder="请输入搜索内容"/>
-		</view> -->
 		<view class="carousel-section" style="background-color: #fff;">
 			<view class="headerInput" @click="clickSearch">
 				<image src="../../static/img/is.png" mode=""></image>请输入搜索内容
-				<!-- <input type="text" value="" placeholder="请输入搜索内容" /> -->
 			</view>
 			<!-- 标题栏和状态栏占位符 -->
 			<view class="titleNview-placing"></view>
@@ -28,12 +23,6 @@
 			<swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
 				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="bannerNavToUrl(item)"><image :src="item.pic" /></swiper-item>
 			</swiper>
-			<!-- 自定义swiper指示器 -->
-			<!-- <view class="swiper-dots">
-				<text class="num">{{ swiperCurrent + 1 }}</text>
-				<text class="sign">/</text>
-				<text class="num">{{ swiperLength }}</text>
-			</view> -->
 		</view>
 		<!-- 分类 -->
 		<view class="cate-section">
@@ -53,290 +42,19 @@
 					<text>充值送积分</text>
 				</view>
 			</navigator>
-			<!-- <navigator url="/pages/index/sign"> -->
 				<view class="cate-item" @click="Toshare">
 					<image src="/static/icon/in4.png"></image>
 					<text>邀请有礼</text>
 				</view>
-			<!-- </navigator> -->
 		</view>
-		
 		<!-- 精选好物 -->
 		<view class="goods">
 			<hot-goods :goodsList="goodsList"></hot-goods>
 		</view>
-		<!-- <br> -->
 		<!-- 为你推荐 -->
 		<view class="recommend-h">
 			<recommend :bastList="bastList"></recommend>
 		</view>
-		<!-- <view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view> -->
-		<!-- 可领取优惠券 -->
-		<!-- <scroll-view class="coupon-box clamp" :scroll-x="true">
-			<view v-for="(item, index) in couponArray" :key="item.id" class="coupon-list">
-				<view class="row flex">
-					<view class="list-money flex">
-						<image :src="item.is_use ? '/static/img/img02.png' : '/static/img/img03.png'" mode="scaleToFill"></image>
-						<view class="list-money-text">
-							<view class="tit" :class="{ noAction: item.is_use }">
-								<text>{{ item.coupon_price }}</text>
-							</view>
-						</view>
-					</view>
-					<view class="list-interval position-relative">
-						<view class="bottom"></view>
-						<view class="top"></view>
-					</view>
-					<view class="row_list_right">
-						<view class="right_top"><text class="right_title" :class="{ noAction: item.is_use }">满减券</text></view>
-						<view class="right_time">
-							<text>满{{ item.use_min_price }}使用</text>
-						</view>
-					</view>
-					<view class="right_use" :class="{ noAction: item.is_use }" @click="setCoupons(item)">
-						<text>{{ item.is_use ? '已领取' : '立即领取' }}</text>
-					</view>
-				</view>
-			</view>
-		</scroll-view>
- -->
-		<!-- 秒杀楼层 -->
-		<!-- <seckill></seckill> -->
-		<!-- 砍价 -->
-		<!-- <view class="hot-goods"> -->
-			<!-- <view class="hot-headers flex-upDown-center"> -->
-				<!-- <image class="img" src="../../static/img/img44.png"></image> -->
-				<!-- <view class="hot-title">超值砍价</view>
-				<view><view class="more" @click.stop="navTo('/pages/activity/goods_bargain/index')">更多</view></view>
-			</view> -->
-			<!-- <view class="hot-lists" v-for="(baritem, barindex) in bargainlist" :key="barindex" @click.stop="navToDetailPages(baritem)">
-				<view class="hot-produce">
-					<view class="produce-image"><image :src="baritem.image"></image></view>
-					<view class="produce-content">
-						<view class="produce-price1 ">
-							<view class="produce-name line2">{{ baritem.title }}</view>
-							<view class="produce-info">
-								已抢
-								<text style="color: #FF383E">{{ baritem.sales }}</text>
-								箱/仅剩
-								<text style="color:#FF383E">{{ baritem.stock }}</text>
-								箱
-							</view>
-							<view class="produce-center">
-								<view class="kanjia_word">
-									<view class="word-1">原价:¥{{ baritem.price }}</view>
-									<view class="word-2">
-										砍后价
-										<text style="font-size: 24rpx;">¥</text>
-										<text style="font-size: 36rpx;">{{ baritem.min_price }}</text>
-									</view>
-								</view>
-								<view
-									class="kanjia_button flex-center"
-									@tap.stop="openSubscribe('/pages/activity/goods_bargain_details/index?id=' + baritem.id + '&bargain=' + userInfo.uid)"
-								>
-									<view>查看详情</view>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view> -->
-			<!-- </view> -->
-		<!-- </view> -->
-		<!-- 拼团楼层 -->
-
-		<!-- <view class="recommend flex">
-			<view class="recommend_list" @click="change(ls.id)" v-for="ls in recommend">
-				<view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
-				<view class="re_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
-				<image class="selected_icon" v-bind:class="{ active: ls.id == checkid }" src="/static/img/img04.png"></image>
-			</view>
-		</view>
-		<swiper id="list-box" @change="listChange" :style="{ height: swiperHeight + 'px' }" :current="checkid">
-			<swiper-item> -->
-				<!-- <scroll-view scroll-y="true" class="list-box-h"> -->
-				<!-- <view class="guess-section">
-					<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-						<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-						<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-						<view class="cmy-hr"></view>
-						<view class="price margin-c-20 flex">
-							<view>
-								<text class="font-size-sm ">¥</text>
-								{{ item.price }}
-							</view>
-							<view class="font-size-sm">
-								<text class="font-color-gray">{{ item.sales }}人购买</text>
-							</view>
-						</view>
-					</view>
-				</view> -->
-				<!-- </scroll-view> -->
-			<!-- </swiper-item> -->
-			<!-- <swiper-item>
-				<scroll-view scroll-y="true" class="list-box-h">
-					<view class="guess-section">
-						<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-							<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-							<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-							<view class="cmy-hr"></view>
-							<view class="price margin-c-20 flex">
-								<view>
-									<text class="font-size-sm ">¥</text>
-									{{ item.price }}
-								</view>
-								<view class="font-size-sm">
-									<text class="font-color-gray">{{ item.sales }}人购买</text>
-								</view>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</swiper-item>
-			<swiper-item>
-				<scroll-view scroll-y="true">
-					<view class="guess-section">
-						<view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
-							<navigator :url="item.link">
-								<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-								<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-								<view class="cmy-hr"></view>
-								<view class="price margin-c-20 flex">
-									<view>
-										<text class="font-size-sm ">¥</text>
-										{{ item.price }}
-									</view>
-									<view class="font-size-sm">
-										<text class="font-color-gray">库存{{ item.stock + item.unit_name }}</text>
-									</view>
-								</view>
-							</navigator>
-						</view>
-					</view>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
- -->
-		<!-- 精品 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">精品推荐</text></view>
-			<navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- 最新 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">最新商品</text></view>
-			<navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- 促销 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">促销商品</text></view>
-			<navigator url="/pages/product/classify?type=4"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- 会员升级专区 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">会员升级专区</text></view>
-			<text class="iconfont iconenter">更多</text>
-		</view> -->
-		<!-- <view class="uservip flex">
-			<image @error="onImageError('userServant', 0)" lazy-load :src="userServant[0].image" mode="aspectFill"></image>
-			<view class="detail">
-				<view class="title">满园春1999元会员升级礼包</view>
-				<view class="icon">自营</view>
-				<view class="flex price-box">
-					<view class="price">
-						<text class="font-size-sm">¥</text>
-						18888
-					</view>
-					<view class="text">115人购买</view>
-				</view>
-			</view>
-		</view> -->
-
-		<!-- 精品推荐 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">精品推荐</text></view>
-			<text class="iconfont iconenter">更多</text>
-		</view> -->
-		<!-- <view class="guess-section">
-			<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image @error="onImageError('goodsList', index)" lazy-load :src="item.image" mode="aspectFill"></image></view>
-				<text class="title clamp margin-c-20">
-					<text class="icon">自营</text>
-					{{ item.title }}
-				</text>
-				<view class="hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<view class='detail'>
-							<text class="icon">代理价</text>
-							<text></text>
-						</view>
-						<view class="detail">
-							<text class="font-color-yellow">会员价</text>
-							<text class="font-color-yellow">7.5折</text>
-						</view>
-					</view>
-				</view>
-				<view class="tip">兑换价¥44+44积分</view>
-			</view>
-		</view> -->
 		<view class="Mask" v-show="shareShow">
 			<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
 			<view class="Toshare" @click="Toshare"></view>
@@ -349,7 +67,7 @@
 import seckill from '../../components/seckill/seckill.vue';
 import hotGoods from './child/hotGoods.vue';
 import recommend from './child/recommend.vue'
-import { loadIndexs } from '@/api/index.js';
+import { loadIndexs,getHot } from '@/api/index.js';
 import { getUserInfo } from '@/api/user.js';
 import { setCoupons } from '@/api/functionalUnit.js';
 import { getBargainList } from '@/api/product.js';
@@ -470,7 +188,7 @@ export default {
 			interceptor();
 		}
 		this.loadData();
-		this.getBargainList();
+		// this.getBargainList();
 	},
 	//下拉刷新
 	onPullDownRefresh() {
@@ -478,29 +196,29 @@ export default {
 	},
 	// #ifndef MP
 	// 监听导航栏输入框点击事件
-	onNavigationBarSearchInputClicked(e) {
-		//跳转到搜索页面
-		this.clickSearch();
-	},
+	// onNavigationBarSearchInputClicked(e) {
+	// 	//跳转到搜索页面
+	// 	this.clickSearch();
+	// },
 	//点击导航栏 buttons 时触发
-	onNavigationBarButtonTap(e) {
-		const index = e.index;
-		if (index === 0) {
-			this.$api.msg('点击了扫描');
-		} else if (index === 1) {
-			// #ifdef APP-PLUS
-			const pages = getCurrentPages();
-			const page = pages[pages.length - 1];
-			const currentWebview = page.$getAppWebview();
-			currentWebview.hideTitleNViewButtonRedDot({
-				index
-			});
-			// #endif
-			uni.navigateTo({
-				url: '/pages/user/notice'
-			});
-		}
-	},
+	// onNavigationBarButtonTap(e) {
+	// 	const index = e.index;
+	// 	if (index === 0) {
+	// 		this.$api.msg('点击了扫描');
+	// 	} else if (index === 1) {
+	// 		// #ifdef APP-PLUS
+	// 		const pages = getCurrentPages();
+	// 		const page = pages[pages.length - 1];
+	// 		const currentWebview = page.$getAppWebview();
+	// 		currentWebview.hideTitleNViewButtonRedDot({
+	// 			index
+	// 		});
+	// 		// #endif
+	// 		uni.navigateTo({
+	// 			url: '/pages/user/notice'
+	// 		});
+	// 	}
+	// },
 	// #endif
 	methods: {
 		//跳转
@@ -541,20 +259,20 @@ export default {
 				});
 			// #endif
 		},
-		getBargainList() {
-			let that = this;
+		// getBargainList() {
+		// 	let that = this;
 		
-			getBargainList({
-				page: that.page,
-				limit: that.limit
-			})
-				.then(function(res) {
-					that.$set(that, 'bargainlist', res.data.slice(0, 2));
-				})
-				.catch(res => {
-					console.log(res, 'getBargainList');
-				});
-		},
+		// 	getBargainList({
+		// 		page: that.page,
+		// 		limit: that.limit
+		// 	})
+		// 		.then(function(res) {
+		// 			that.$set(that, 'bargainlist', res.data.slice(0, 2));
+		// 		})
+		// 		.catch(res => {
+		// 			console.log(res, 'getBargainList');
+		// 		});
+		// },
 		Mask() {
 			this.MaskShow = false;
 			this.shareShow = true;
@@ -616,19 +334,19 @@ export default {
 			});
 		},
 		//商品种类切换
-		change(item) {
-			let id = item;
-			this.checkid = id;
-			if (this.checkid == 1) {
-				// console.log(1);
-				this.detail = this.selected_detail;
-			} else if (this.checkid == 2) {
-				// console.log(2);
-				this.detail = this.new_product;
-			} else {
-				this.detail = this.cheap_good;
-			}
-		},
+		// change(item) {
+		// 	let id = item;
+		// 	this.checkid = id;
+		// 	if (this.checkid == 1) {
+		// 		// console.log(1);
+		// 		this.detail = this.selected_detail;
+		// 	} else if (this.checkid == 2) {
+		// 		// console.log(2);
+		// 		this.detail = this.new_product;
+		// 	} else {
+		// 		this.detail = this.cheap_good;
+		// 	}
+		// },
 		// 监听图片加载完成
 		onImageError(key, index) {
 			this[key][index].image = '/static/error/errorImage.jpg';
@@ -638,13 +356,11 @@ export default {
 			loadIndexs({})
 				.then(({ data }) => {
 					let goods = data.info;
+					console.log(goods)
 					this.carouselList = data.banner;
 					this.swiperLength = this.carouselList.length;
-					this.menusList = data.menus;
 					this.goodsList = goods.firstList; //最新商品
-					console.log(goods.firstList)
-					this.bastList = goods.bastList; //精品推荐
-					this.bastBanner = data.benefit; //促销单品
+					// this.bastList = goods.bastList; //精品推荐
 					this.$set(this, 'couponArray', data.couponList); //保存卡包券
 
 					uni.stopPullDownRefresh();

+ 16 - 37
pages/money/USDT.vue

@@ -40,7 +40,7 @@
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
 // #ifdef H5
-import { rechargeWechat } from '@/api/wallet.js';
+import { rechargeWechat,exchange } from '@/api/wallet.js';
 // #endif
 // #ifdef MP
 import { rechargeRoutine } from '@/api/wallet.js';
@@ -59,42 +59,9 @@ export default {
 				type: "充币",
 				time: "2018-05-12 16:24:45",
 				money: 9898,
-			},
-			{
-				type: "提币",
-				time: "2020-05-12 16:24:45",
-				money: 99,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			},
-			{
-				type: "充币",
-				time: "2018-05-12 16:24:45",
-				money: 9898,
-			}]
+			}],
+			page: 1,
+			limit: 10
 		};
 	},
 	onLoad(options) {},
@@ -103,6 +70,9 @@ export default {
 		...mapState(['weichatObj'])
 		// #endif
 	},
+	mounted() {
+		this.getExchange()
+	},
 	methods: {
 		// 跳转
 		navTo(url) {
@@ -110,6 +80,15 @@ export default {
 				url: url
 			});
 		},
+		getExchange() {
+			let data = {
+				page: this.page,
+				limit: this.limit
+			}
+			exchange( data ).then(res => {
+				console.log(res.data)
+			})
+		},
 		// 切换选中对象
 		tabRadio(e) {
 			this.type = e;

+ 0 - 2
pages/money/USDThuzhuan.vue

@@ -109,9 +109,7 @@
 			margin: 0 auto;
 			text-align: center;
 			border: 1rpx solid #44BFEC;
-			background: linear-gradient(90deg, #44BFEC, #438BED);
 			border-radius: 10rpx;
-			font-size: 36rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
 			color: #FFFFFF;

+ 44 - 38
pages/product/classify.vue

@@ -8,20 +8,9 @@
 				</swiper-item>
 			</swiper>
 		</view> -->
-		<!-- <view class="type-title-box flex">
-			<view class="title-border"></view>
-			<view class="title-content">
-				<text v-if="type == 1">精品推荐</text>
-				<text v-if="type == 2">热门榜单</text>
-				<text v-if="type == 3">首发新品</text>
-				<text v-if="type == 4">促销单品</text>
-			</view>
-			<view class="title-border"></view>
-		</view> -->
-
 		<view class="goodsList-box">
 			<view class="goodsList-item flex" :key="ind" v-for="(ls, ind) in list">
-				<image :src="ls.image || errImg" mode=" scaleToFill"></image>
+				<image :src="ls.image" mode=" scaleToFill"></image>
 				<view class="goodsList-content">
 					<view class="title">
 						<text class="clamp2">{{ ls.store_name }}</text>
@@ -38,7 +27,6 @@
 							<!-- </view> -->
 						</view>
 						<view class="button" @click="navTo(ls)">立即购买</view>
-						<!-- <view @click="navTo(ls)" class="cart iconfont iconcart"></view> -->
 					</view>
 				</view>
 			</view>
@@ -47,14 +35,16 @@
 </template>
 
 <script>
-import { groomList } from '@/api/product.js';
+import { loadIndexs,groom } from '@/api/index.js';
 export default {
 	data() {
 		return {
 			list: [],
 			bannerImg: [],
 			title: '',
-			errImg: require('@/static/error/errorImage.jpg')
+			goods: [],
+			page: 1,
+			limit: 10
 		};
 	},
 	onLoad(option) {
@@ -64,7 +54,7 @@ export default {
 		this.loadData();
 	},
 	created() {
-		this.getTitle()
+		
 	},
 	mounted() {
 		
@@ -75,8 +65,10 @@ export default {
 			let title = ''
 			if(this.type == 1) {
 				title = "精选好货"
+				// this.list = this.goods.bastList
 			}else if(this.type == 2) {
 				title = "热销专区"
+				// this.list = this.goods.likeInfo
 			}else if(this.type == 3) {
 				title = "收藏夹"
 			}else {
@@ -93,30 +85,44 @@ export default {
 		},
 		// 请求载入数据
 		async loadData() {
-			groomList({}, this.type)
-				.then(({ data }) => {
-					// 保存轮播图
-					this.bannerImg = data.banner;
-					// 保存商品信息
-					this.list = data.list;
-				})
-				.catch(e => {
-					console.log(e);
-				});
+			// loadIndexs({})
+			// 	.then(({ data }) => {
+			// 		let goods = data.info;
+			// 		console.log(data)
+			// 		this.goods = goods
+			// 		this.goods.likeInfo = data.likeInfo
+			// 		// this.goodsList = goods.firstList; //最新商品
+			// 		// this.bastList = goods.bastList; //精品推荐
+			// 		this.getTitle()
+			// 		uni.stopPullDownRefresh();
+			// 	})
+			// 	.catch(e => {
+			// 		uni.stopPullDownRefresh();
+			// 	});
+			let data = {
+				page: this.page,
+				limit: this.limit
+			}
+			let type = this.type
+			groom(data,type).then(res => {
+				this.list = res.data.list
+				this.getTitle()
+				console.log(res.data)
+			})
 		},
 		// 轮播图跳转
-		bannerNavToUrl(item) {
-			// #ifdef H5
-			if (item.wap_link.indexOf('http') > 0) {
-				window.location.href = item.wap_link;
-			}
-			// #endif
-			if (item.wap_link) {
-				uni.navigateTo({
-					url: item.wap_link
-				});
-			}
-		}
+		// bannerNavToUrl(item) {
+		// 	// #ifdef H5
+		// 	if (item.wap_link.indexOf('http') > 0) {
+		// 		window.location.href = item.wap_link;
+		// 	}
+		// 	// #endif
+		// 	if (item.wap_link) {
+		// 		uni.navigateTo({
+		// 			url: item.wap_link
+		// 		});
+		// 	}
+		// }
 	}
 };
 </script>

+ 2 - 0
pages/user/jifen.vue

@@ -116,8 +116,10 @@ export default {
 				state
 			)
 				.then(({ data }) => {
+					console.log(data)
 					if (data.length > 0) {
 						navItem.orderList = navItem.orderList.concat(data);
+						console.log(navItem.orderList)
 						navItem.page++;
 					}
 					if (navItem.limit == data.length) {