lhl 3 lat temu
rodzic
commit
616280c07e

+ 19 - 1
api/index.js

@@ -77,4 +77,22 @@ export function purchase(data) {
 		method: 'get',
 		data
 	});
-}
+}
+
+// 订单支付http://sxg.frp.liuniu946.com/api/zfpay?type=1&page=1&limit=10
+export function zfpay(data) {
+	return request({
+		url: '/api/zfpay',
+		method: 'post',
+		data
+	});
+}
+
+// 挂售http://sxg.frp.liuniu946.com/api/hanging_sale
+export function hanging_sale(data) {
+	return request({
+		url: '/api/hanging_sale',
+		method: 'post',
+		data
+	});
+}

+ 2 - 2
api/order.js

@@ -147,7 +147,7 @@ export function computedOrderkey(data) {
 //买单订单列表
 export function user_auction_order(data) {
 	return request({
-		url: '/api/auction/user_auction_order',
+		url: '/api/user_auction_order',
 		method: 'get',
 		data
 	});
@@ -156,7 +156,7 @@ export function user_auction_order(data) {
 //卖单订单列表
 export function seller(data) {
 	return request({
-		url: '/api/auction/seller',
+		url: '/api/seller',
 		method: 'get',
 		data
 	});

+ 43 - 9
pages/category/mall.vue

@@ -36,30 +36,31 @@
 		</view>
 		<!-- 商品列表 -->
 		<view class="good-list">
-			<view class="good flex" v-for="item in 10">
+			<view class="good flex" v-for="item in goodList" @click="navto('/pages/product/product?id=' + item.id)">
 				<view class="good-img">
-					<image src="../../static/img/afternoon.png" mode=""></image>
+					<image :src="item.image" mode=""></image>
 				</view>
 				<view class="good-info flex">
 					<view class="good-name clamp2">
-						法国空运高端82年拉菲陈酿红葡萄酒法国空运高端82年拉菲陈酿红葡萄酒
+						{{item.store_name}}
 					</view>
 					<view class="good-price">
-						<view class="old-price">
-							<text class="old-left">¥2000</text> <image src="../../static/icon/down.png" mode="widthFix"></image><text class="old-right">直降40元</text>
+						<view class="old-price" v-if="item.ot_price*1 > item.price*1">
+							<text class="old-left">¥{{item.ot_price}}</text> <image src="../../static/icon/down.png" mode="widthFix"></image><text class="old-right">直降{{item.ot_price*1 - item.price*1}}元</text>
 						</view>
 						<view class="new-price flex">
 							<view class="">
-								¥1960
+								¥{{item.price}}
 							</view>
-							<view class="good-tip">
+							<!-- <view class="good-tip">
 								1960提货券
-							</view>
+							</view> -->
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
 	</view>
 </template>
 
@@ -70,6 +71,7 @@
 	import {
 		loadIndexs
 	} from '@/api/index.js';
+	import { getProducts } from '@/api/product.js'
 	import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
 	export default {
 		components: {
@@ -90,13 +92,26 @@
 					stopTimeM: 24,
 					stopTimeS: 59
 				},
-				bzb: 30
+				bzb: 30,
+				goodList: [],
+				page: 1,
+				limit: 10,
+				loadingType: 'more'
 			};
 		},
 		onLoad() {
 			this.loadData();
+			this.getProList()
+		},
+		onReachBottom() {
+			this.getProList()
 		},
 		methods: {
+			navto(url) {
+				uni.navigateTo({
+					url
+				})
+			},
 			loadData() {
 				loadIndexs({})
 					.then(({
@@ -143,6 +158,25 @@
 				uni.navigateTo({
 					url: '/pages/product/product?id=' + id
 				});
+			},
+			getProList() {
+				let obj =this
+				if(obj.loadingType == 'loading' || obj.loadingType == 'noMore' ) {
+					return
+				}
+				obj.loadingType = 'loading' 
+				getProducts({
+					page: obj.page,
+					limit: obj.limit
+				}).then(res => {
+					obj.goodList = obj.goodList.concat(res.data)
+					obj.page++
+					if(obj.limit == res.data.length ) {
+						obj.loadingType = 'more'
+					}else {
+						obj.loadingType = 'noMore'
+					}
+				})
 			}
 		}
 	};

+ 1 - 1
pages/index/index.vue

@@ -100,7 +100,7 @@
 					{{ yuyueInfo.advert }}
 				</view>
 				<view class="" style="margin-top: 50rpx;">
-					消费账户不低于{{yuyueInfo.lowest }}
+					消费积分不低于{{yuyueInfo.lowest }}
 				</view>
 				<view class="" style="color: #FF4C4C;margin-top: 15rpx;">
 					广告值不低于{{yuyueInfo.minimum }}

+ 2 - 1
pages/index/yuyuechang.vue

@@ -37,7 +37,7 @@
 		</view>
 		<uni-popup ref="popupyyok" type="center">
 			<view class="popupyyok-wrap">
-				<image :src="good.image" mode="widthFix"></image>
+				<image :src="good.image" mode=""></image>
 				<view class="clamp2" style="padding: 20rpx 80rpx;color: #999999;font-size: 26rpx;">
 					{{good.name}}
 				</view>
@@ -149,6 +149,7 @@
 		text-align: center;
 		image {
 			width: 100%;
+			height: 429rpx;
 		}
 		.btn {
 			width: 295rpx;

+ 6 - 6
pages/money/pay.vue

@@ -5,14 +5,14 @@
 			<text class="price">{{ money }}</text>
 		</view>
 		<view class="pay-type-list">
-			<view class="type-item b-b" @click="changePayType(1)">
+			<!-- <view class="type-item b-b" @click="changePayType(1)">
 				<text class="icon iconfont iconweixin"></text>
 				<view class="con">
 					<text class="tit">微信支付</text>
 					<text>推荐使用微信支付</text>
 				</view>
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
-			</view>
+			</view> -->
 			<!-- #ifdef APP-PLUS -->
 			<view class="type-item b-b" @click="changePayType(2)">
 				<text class="icon iconfont iconzhifubao"></text>
@@ -23,7 +23,7 @@
 			<view class="type-item" @click="changePayType(3)">
 				<text class="icon iconfont iconyue"></text>
 				<view class="con">
-					<text class="tit">余额支付</text>
+					<text class="tit">消费积分支付</text>
 					<text>可用余额 ¥{{ now_money }}</text>
 				</view>
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 3"></radio></label>
@@ -40,12 +40,12 @@ import { mapState } from 'vuex';
 export default {
 	data() {
 		return {
-			payType: 1, //支付类型
+			payType: 3, //支付类型
 			// #ifdef H5
-			payName: 'weixin',
+			payName: 'yue',
 			// #endif
 			// #ifdef MP-WEIXIN
-			payName: 'weixin',
+			payName: 'yue',
 			// #endif
 			orderInfo: {},
 			money: 0.0, //订单金额

+ 9 - 9
pages/order/createOrder.vue

@@ -1,8 +1,8 @@
 <template>
 	<view>
-		<view class="navbar">
+<!-- 		<view class="navbar">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
+		</view> -->
 
 		<!-- 地址 -->
 		<navigator v-if="tabCurrentIndex == 0" url="/pages/set/address?source=1" class="address-section">
@@ -72,7 +72,7 @@
 		</view>
 
 		<!-- 优惠明细 -->
-		<view class="yt-list">
+		<!-- <view class="yt-list">
 			<view class="yt-list-cell b-b" @click="couponListshow ? toggleMask('show') : ''">
 				<view class="cell-icon">券</view>
 				<text class="cell-tit clamp">优惠券</text>
@@ -86,7 +86,7 @@
 				<text class="cell-tit clamp">商家促销</text>
 				<text class="cell-tip disabled">满{{ moneyAll.storeFreePostage }}包邮</text>
 			</view>
-		</view>
+		</view> -->
 		<!-- 金额明细 -->
 		<view class="yt-list">
 			<!-- <view class="yt-list-cell b-b">
@@ -94,8 +94,8 @@
 				<text class="cell-tip red">-¥35</text>
 			</view> -->
 			<view class="yt-list-cell b-b">
-				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
-				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
+				<text class="cell-tit clamp">提货券抵扣{{ '(当前提货券:' + integralAll + ')' }}</text>
+				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #dc262b" :checked="checkedPoints" /></view>
 			</view>
 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">运费</text>
@@ -111,10 +111,10 @@
 				<text class="cell-tit clamp">商品金额</text>
 				<text class="cell-tip">¥{{ payAllMoney }}</text>
 			</view>
-			<view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
-				<text class="cell-tit clamp">积分抵扣</text>
+			<!-- <view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
+				<text class="cell-tit clamp">提货券抵扣</text>
 				<text class="cell-tip">-¥{{ integralMoney }}</text>
-			</view>
+			</view> -->
 			<view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
 				<text class="cell-tit clamp">VIP优惠</text>
 				<text class="cell-tip">-¥{{ moneyAll.vipPrice }}</text>

+ 82 - 75
pages/order/order.vue

@@ -97,20 +97,18 @@
 								</view>
 							</view>
 						</view>
-						<view class="upimg" v-if="item.status == 2 || item.status == 3">
+						<!-- <view class="upimg" v-if="item.status == 2 || item.status == 3">
 							<view class="up-tit">打款凭证:</view>
 							<view class="img-wrap" v-if="item.upload_image" @click="lookimg(item.upload_image)"><image :src="item.upload_image" mode=""></image></view>
 							<view class="" style="color: #0F253A;font-weight: bold;font-size: 26rpx;" v-else>买家未上传支付凭证</view>
-						</view>
-						<view class="action-box b-t" v-if="item.status == 1"><button @click.stop="orderPay(item)" class="action-btn recom">联系买家</button></view>
-						<view class="action-box b-t" v-if="item.status == 2">
-							<!-- <button @click.stop="orderPay(item)" class="refuse recom">拒绝</button> -->
+						</view> -->
+						<!-- <view class="action-box b-t" v-if="item.status == 1"><button @click.stop="orderPay(item)" class="action-btn recom">联系买家</button></view> -->
+<!-- 						<view class="action-box b-t" v-if="item.status == 2">
 							<button @click.stop="orderPay(item)" class="action-btn recom">通过</button>
-						</view>
-						<view class="action-box b-t" v-if="!item.status">
-							<!-- <button @click.stop="orderPay(item)" class="refuse recom">拒绝</button> -->
+						</view> -->
+<!-- 						<view class="action-box b-t" v-if="!item.status">
 							<button @click.stop="cancel(item)" class="action-btn recom">取消挂售</button>
-						</view>
+						</view> -->
 					</view>
 
 					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
@@ -125,7 +123,8 @@
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
 import { orderList, orderCancel, orderDel, orderTake, adopt, user_auction_order, seller, cancel, untreated } from '@/api/order.js';
-import { tabbar } from '@/utils/tabbar.js';
+import { tabbar } from '@/utils/tabbar.js';
+import { zfpay, hanging_sale } from '@/api/index.js'
 export default {
 	components: {
 		uniLoadMore,
@@ -168,7 +167,7 @@ export default {
 				},
 				{
 					state: 2,
-					text: '待审核',
+					text: '已完成',
 					loadingType: 'more',
 					orderList: [],
 					isnew:1,//判断是否有新的订单
@@ -176,7 +175,7 @@ export default {
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 4,
+					state: 3,
 					text: '待挂售',
 					loadingType: 'more',
 					orderList: [],
@@ -184,62 +183,53 @@ export default {
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
-				{
-					state: 3,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					isnew:1,//判断是否有新的订单
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
+				// {
+				// 	state: 3,
+				// 	text: '已完成',
+				// 	loadingType: 'more',
+				// 	orderList: [],
+				// 	isnew:1,//判断是否有新的订单
+				// 	page: 1, //当前页数
+				// 	limit: 10 //每次信息条数
+				// }
 			],
 			navList1: [
-				{
-					state: 0,
-					text: '已过期',
-					loadingType: 'more',
-					orderList: [],
-					isnew:1,//判断是否有新的订单
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
-					text: '售卖中',
-					loadingType: 'more',
-					orderList: [],
-					isnew:1,//判断是否有新的订单
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
+				{
+					state: 0,
+					text: '已过期',
+					loadingType: 'more',
+					orderList: [],
+					isnew:1,//判断是否有新的订单
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '待支付',
+					loadingType: 'more',
+					orderList: [],
+					isnew:1,//判断是否有新的订单
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 2,
+					text: '已完成',
+					loadingType: 'more',
+					orderList: [],
+					isnew:1,//判断是否有新的订单
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 3,
+					text: '挂售商品',
+					loadingType: 'more',
+					orderList: [],
+					isnew:1,//判断是否有新的订单
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
 				},
-				{
-					state: 1,
-					text: '待支付',
-					loadingType: 'more',
-					orderList: [],
-					isnew:1,//判断是否有新的订单
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '待审核',
-					loadingType: 'more',
-					orderList: [],
-					isnew:1,//判断是否有新的订单
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 3,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					isnew:1,//判断是否有新的订单
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
 			]
 		};
 	},
@@ -384,14 +374,31 @@ export default {
 		},
 		// 订单支付
 		pay(item) {
-			uni.navigateTo({
-				url: '/pages/hall/hallpay?ordid=' + item.order_id
-			});
+			// uni.navigateTo({
+			// 	url: '/pages/hall/hallpay?ordid=' + item.order_id
+			// });
+			let obj = this
+			zfpay({
+				order_id: item.order_id
+			}).then(res => {
+				obj.$api.msg('支付成功')
+				let s = obj.navList[obj.tabCurrentIndex].orderList.indexOf(item);
+				obj.navList[obj.tabCurrentIndex].orderList.splice(s, 1);
+			})
 		},
-		gsell(item) {
-			uni.navigateTo({
-				url: '/pages/hall/gsell?id=' + item.product_id
-			});
+		gsell(item) {
+			console.log(item)
+			// uni.navigateTo({
+			// 	url: '/pages/hall/gsell?id=' + item.product_id
+			// });
+			let obj = this
+			hanging_sale({
+				id: item.id
+			}).then(res => {
+				obj.$api.msg('挂售成功')
+				let s = obj.navList[obj.tabCurrentIndex].orderList.indexOf(item);
+				obj.navList[obj.tabCurrentIndex].orderList.splice(s, 1);
+			})
 		},
 		orderPay(e) {
 			adopt({ order_id: e.order_id }).then(({ data }) => {
@@ -448,7 +455,7 @@ export default {
 					.then(({ data }) => {
 						let arr = data.map(e => {
 							console.log(state == 4);
-							if (state == 4) {
+							if (state == 3) {
 								e.stateTip = '待挂售';
 								e.stateTipColor = '#fa436a';
 							} else {
@@ -583,10 +590,10 @@ export default {
 					stateTip = '待支付';
 					break;
 				case 2:
-					stateTip = '待审核';
+					stateTip = '已完成';
 					break;
 				case 3:
-					stateTip = '已完成';
+					stateTip = '待挂售';
 					break;
 				case 4:
 					stateTip = '待挂售';

+ 27 - 7
pages/product/product.vue

@@ -46,14 +46,14 @@
 				<text style="text-align: right;">{{ storeObjact.address | address }}</text>
 			</view>
 		</view>
-		<view class="c-list">
+		<!-- <view class="c-list">
 			<view class="c-row b-b">
 				<text class="tit">赠送</text>
 				<view class="con">
 					<text class="selected-text">购买赠送<text class="num">200</text>艺金券</text>
 				</view>
 			</view>
-		</view>
+		</view> -->
 		<view class="c-list">
 			<view class="c-row b-b" @click="toggleSpec">
 				<text class="tit">购买数量</text>
@@ -107,8 +107,14 @@
 				<text>收藏</text>
 			</view> -->
 
-			<view class="action-btn-group">
-				<button type="primary" class=" action-btn no-border buy-now-btn" @click="toggleSpec(2)">加入购物车</button>
+			<view class="action-btn-group">
+				<view class="shoucang flex" @click="toFavorite(goodsObjact)">
+					<image src="../../static/icon/sc-ico.png" mode=""></image>
+					<view class="">
+						收藏
+					</view>
+				</view>
+				<!-- <button type="primary" class=" action-btn no-border buy-now-btn" @click="toggleSpec(2)">加入购物车</button> -->
 				<button type="primary" class=" action-btn no-border  add-cart-btn" @click="toggleSpec(1)">立即购买</button>
 			</view>
 			<!-- <view class="action-btn-group">
@@ -1111,12 +1117,26 @@ page {
 		// 	height: 28rpx;
 		// 	width: 0;
 		// 	border-right: 1px solid rgba(255, 255, 255, 0.5);
-		// }
-		.action-btn {
+		// }
+		.shoucang {
+			width: 170rpx;
+			height: 100rpx;
+			background: #FFFFFF;
+			flex-direction: column;
+			justify-content: center;
+			image {
+				width: 36rpx;
+				height: 35rpx;
+			}
+			// box-shadow: 0px 0px 40px 0px rgba(50, 50, 52, 0.06);
+		}
+		.action-btn {
+			flex-shrink: 0;
+			flex-grow: 1;
 			display: flex;
 			align-items: center;
 			justify-content: center;
-			width: 375rpx;
+			width: 580rpx;
 			height: 100%;
 			font-size: 34rpx;
 			padding: 0;

BIN
static/icon/sc-ico.png