cmy преди 2 години
родител
ревизия
6626f48425
променени са 8 файла, в които са добавени 124 реда и са изтрити 2420 реда
  1. 1 38
      pages.json
  2. 0 495
      pages/cart/carts.vue
  3. 123 17
      pages/index/Vipgift.vue
  4. 0 697
      pages/order/adminOrder.vue
  5. 0 751
      pages/order/order.vue
  6. 0 233
      pages/product/jmszg.vue
  7. 0 189
      pages/recommend/recommend.vue
  8. BIN
      static/img/domIcon.png

+ 1 - 38
pages.json

@@ -108,15 +108,6 @@
 				"navigationBarTitleText": "商品列表"
 			}
 		},
-		// #ifndef MP
-		{
-			"path": "pages/product/jmszg",
-			"style": {
-				"enablePullDownRefresh": true,
-				"navigationBarTitleText": "加盟商专供"
-			}
-		},
-		// #endif
 		{
 			"path": "pages/product/search",
 			"style": {
@@ -260,24 +251,7 @@
 		},
 		{
 			"root": "pages/order",
-			"pages": [{
-					"path": "order",
-					"style": {
-						"navigationBarTitleText": "我的订单",
-						"app-plus": {
-							"bounce": "none"
-						}
-					}
-				},
-				{
-					"path": "adminOrder",
-					"style": {
-						"navigationBarTitleText": "我的订单",
-						"app-plus": {
-							"bounce": "none"
-						}
-					}
-				},
+			"pages": [
 
 				{
 					"path": "orderDetail",
@@ -331,17 +305,6 @@
 			]
 		},
 		{
-			"root": "pages/recommend",
-			"pages": [{
-				"path": "recommend",
-				"style": {
-					"navigationBarTitleText": "为你推荐",
-					"app-plus": {
-						"bounce": "none"
-					}
-				}
-			}]
-		}, {
 			"root": "pages/exchange",
 			"pages": [{
 				"path": "exchange",

+ 0 - 495
pages/cart/carts.vue

@@ -1,495 +0,0 @@
-<template>
-	<view class="container">
-		<!-- 空白页 -->
-		<view v-if="!hasLogin || empty === true" class="empty">
-			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
-			<view v-if="hasLogin" class="empty-tips">
-				空空如也
-				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
-			</view>
-			<view v-else class="empty-tips">
-				空空如也
-				<view class="navigator" @click="navToLogin">去登陆></view>
-			</view>
-		</view>
-		<view v-else>
-			<!-- 列表 -->
-			<view class="cart-list">
-				<block v-for="(item, index) in cartList" :key="item.id">
-					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
-						<view class="image-wrapper">
-							<image
-								:src="item.productInfo.image"
-								:class="[item.loaded]"
-								mode="aspectFill"
-								lazy-load
-								@load="onImageLoad('cartList', index)"
-								@error="onImageError('cartList', index)"
-							></image>
-							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
-						</view>
-						<view class="item-right">
-							<text class="clamp title">{{ item.productInfo.store_name }}</text>
-							<!-- <text class="attr">{{ item.attr_val }}</text> -->
-							<!-- <view class="ex-addr">
-								<image src="../../static/img/shop.png" mode="" class="name-img"></image>
-								子臣旗舰店
-								<image src="../../static/img/point.png" mode="" class="point-img"></image>
-								200m
-							</view> -->
-							<text class="attr">已选: {{item.productInfo.attrInfo.suk }}</text>
-							<text class="price">¥{{ item.productInfo.price }} <text class="oldprice">¥{{item.productInfo.ot_price}}</text></text>
-							<uni-number-box
-								class="step"
-								:min="1"
-								:max="item.productInfo.stock"
-								:value="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"
-								:isMax="item.cart_num >= item.productInfo.stock ? true : false"
-								:isMin="item.cart_num === 1"
-								:index="index"
-								@eventChange="numberChange"
-							></uni-number-box>
-							<text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text>
-						</view>
-						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
-					</view>
-					<view class="jg"></view>
-				</block>
-			</view>
-			<!-- 底部菜单栏 -->
-			<view class="action-section">
-				<view class="checkbox">
-					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
-					<view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view>
-				</view>
-				<view class="total-box">
-					<text class="price">¥{{ total }}</text>
-					<!-- <text class="coupon">
-						已优惠
-						<text>74.35</text>
-						元
-					</text> -->
-				</view>
-				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { getCartList, getCartNum, cartDel } from '@/api/user.js';
-import { mapState } from 'vuex';
-import uniNumberBox from '@/components/uni-number-box.vue';
-import { saveUrl, interceptor } from '@/utils/loginUtils.js';
-export default {
-	components: {
-		uniNumberBox
-	},
-	data() {
-		return {
-			total: 0, //总价格
-			allChecked: false, //全选状态  true|false
-			empty: false, //空白页现实  true|false
-			cartList: []
-		};
-	},
-	onShow() {
-		// 只有登录时才加载数据
-		this.cartList = []
-		if (this.hasLogin) {
-			this.loadData();
-		}
-	},
-	watch: {
-		//显示空白页
-		cartList(e) {
-			let empty = e.length === 0 ? true : false;
-			if (this.empty !== empty) {
-				this.empty = empty;
-			}
-		}
-	},
-	computed: {
-		...mapState('user', ['hasLogin'])
-	},
-	methods: {
-		//请求数据
-		loadData() {
-			let obj = this;
-			getCartList({})
-				.then(function(e) {
-					// 获取当前购物车物品增加数量
-					let nub = obj.cartList.length;
-					// 获取之前对象数组
-					let aArray = obj.cartList.reverse();
-					// 获取返回数据对象数组
-					let bArray = e.data.valid.reverse();
-					obj.cartList = bArray
-						.map((item, ind) => {
-							// 设置返回数据默认为勾选状态
-							item.checked = true;
-							// 获取相同数组之前对象的数据
-							let carlist = aArray[ind];
-							// 判断之前是否已经加载完毕
-							if (carlist && carlist.loaded == 'loaded') {
-								item.loaded = 'loaded';
-							}
-							return item;
-						})
-						.reverse();
-					obj.calcTotal(); //计算总价
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//监听image加载完成
-		onImageLoad(key, index) {
-			// 修改载入完成后图片class样式
-			this.$set(this[key][index], 'loaded', 'loaded');
-		},
-		//监听image加载失败
-		onImageError(key, index) {
-			this[key][index].image = '/static/error/errorImage.jpg';
-		},
-		// 跳转到登录页
-		navToLogin() {
-			// 保存地址
-			saveUrl();
-			// 登录拦截
-			interceptor();
-		},
-		//选中状态处理
-		check(type, index) {
-			if (type === 'item') {
-				this.cartList[index].checked = !this.cartList[index].checked;
-			} else {
-				const checked = !this.allChecked;
-				const list = this.cartList;
-				list.forEach(item => {
-					item.checked = checked;
-				});
-				this.allChecked = checked;
-			}
-			this.calcTotal(type);
-		},
-		//数量
-		numberChange(data) {
-			let arr = this.cartList[data.index];
-			arr.cart_num = data.number;
-			getCartNum({ id: arr.id, number: data.number })
-				.then(e => {
-					console.log(e);
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-			this.calcTotal();
-		},
-		//删除
-		deleteCartItem(index) {
-			let list = this.cartList;
-			let row = list[index];
-			let id = row.id;
-			cartDel({
-				ids: id
-			});
-			this.cartList.splice(index, 1);
-			uni.hideLoading();
-			this.calcTotal();
-		},
-		//清空
-		clearCart() {
-			uni.showModal({
-				content: '清空购物车?',
-				success: e => {
-					if (e.confirm) {
-						let st = this.cartList.map(e => {
-							return e.id;
-						});
-						cartDel({
-							ids: st.join(',')
-						}).then(e => {
-							console.log(e);
-						});
-						this.cartList = [];
-					}
-				}
-			});
-		},
-		//计算总价
-		calcTotal() {
-			let list = this.cartList;
-			if (list.length === 0) {
-				this.empty = true;
-				return;
-			}
-			let total = 0;
-			let checked = true;
-			list.forEach(item => {
-				if (item.checked === true) {
-					total += item.productInfo.price * item.cart_num;
-				} else if (checked === true) {
-					checked = false;
-				}
-			});
-			this.allChecked = checked;
-			this.total = Number(total.toFixed(2));
-		},
-		//创建订单
-		createOrder() {
-			let list = this.cartList;
-			let goodsData = [];
-			list.forEach(item => {
-				if (item.checked) {
-					goodsData.push(item.id);
-				}
-			});
-
-			uni.navigateTo({
-				url: '/pages/order/createOrder?id=' + goodsData.join(',')
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.container {
-	padding-bottom: 134rpx;
-	background-color: $page-color-base;
-	/* 空白页 */
-	.empty {
-		position: fixed;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100vh;
-		padding-bottom: 100rpx;
-		display: flex;
-		justify-content: center;
-		flex-direction: column;
-		align-items: center;
-		background: #fff;
-		.emptyImg {
-			width: 300rpx;
-			height: 250rpx;
-			margin-bottom: 30rpx;
-		}
-		.empty-tips {
-			display: flex;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-disabled;
-
-			.navigator {
-				// color: $uni-color-primary;
-				margin-left: 16rpx;
-				color: #901b21;
-			}
-		}
-	}
-}
-/* 购物车列表项 */
-.cart-item {
-	display: flex;
-	position: relative;
-	padding: 30rpx 38rpx 27rpx 92rpx;
-	.image-wrapper {
-		width: 160rpx;
-		height: 160rpx;
-		flex-shrink: 0;
-		position: relative;
-		image {
-			border-radius: 8rpx;
-		}
-	}
-	.checkbox {
-		position: absolute;
-		left: -67rpx;
-		top: 57rpx;
-		// bottom: 0;
-		margin: auto 0;
-		z-index: 8;
-		font-size: 44rpx;
-		line-height: 1;
-		padding: 4rpx;
-		color: $font-color-disabled;
-		background: #fff;
-		border-radius: 50px;
-	}
-	.item-right {
-		display: flex;
-		flex-direction: column;
-		flex: 1;
-		overflow: hidden;
-		position: relative;
-		padding-left: 30rpx;
-		.ex-addr {
-			// margin-top: 16rpx;
-			// padding-left: 22rpx;
-			height: 22rpx;
-			font-size: 22rpx;
-			font-weight: 500;
-			color: #dcb876;
-			image {
-				height: 22rpx;
-			}
-			.name-img {
-				// vertical-align: ;
-				width: 26rpx;
-				margin: 0 4rpx -3rpx 0;
-			}
-			.point-img {
-				width: 16rpx;
-				margin: 0 4rpx -3rpx 14rpx;
-			}
-		}
-		.title,
-		.price {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			height: 40rpx;
-			line-height: 40rpx;
-			font-weight: bold;
-			color: #333333;
-			.oldprice {
-				font-size: 24rpx;
-				color: #9a9a9a;
-				text-decoration:line-through;
-				display: inline-block;
-				padding-left: 10rpx;
-			}
-		}
-		.title {
-			
-			width: 350rpx;
-		}
-		.attr {
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-			height: 50rpx;
-			line-height: 50rpx;
-		}
-		.price {
-			position: absolute;
-			bottom: 0;
-			height: 50rpx;
-			line-height: 50rpx;
-		}
-		.step {
-			position: absolute;
-			bottom: 0;
-			right: 0rpx;
-			// z-index: 999;
-			// margin-top: 20rpx;
-			// border: 1px red solid;
-		}
-		.del-btn {
-			
-			padding: 4rpx 10rpx;
-			font-size: 34rpx;
-			height: 50rpx;
-			color: $font-color-light;
-			position: absolute;
-			top: 0;
-			right: 0;
-		}
-		
-	}
-	// .del-btn {
-	// 	padding: 4rpx 10rpx;
-	// 	font-size: 34rpx;
-	// 	height: 50rpx;
-	// 	color: $font-color-light;
-	// }
-}
-/* 底部栏 */
-.action-section {
-	/* #ifdef H5 */
-	margin-bottom: 100rpx;
-	/* #endif */
-	position: fixed;
-	left: 30rpx;
-	bottom: 30rpx;
-	z-index: 95;
-	display: flex;
-	align-items: center;
-	width: 690rpx;
-	height: 100rpx;
-	padding: 0 30rpx;
-	background: rgba(255, 255, 255, 0.9);
-	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	border-radius: 16rpx;
-	.checkbox {
-		height: 52rpx;
-		position: relative;
-		.icon-checked-box {
-			border-radius: 50rpx;
-			background-color: #ffffff;
-			width: 52rpx;
-			height: 100%;
-			position: relative;
-			z-index: 5;
-			font-size: 53rpx;
-			line-height: 1;
-			color: $font-color-light;
-		}
-		.icon-checked {
-			color: $base-color;
-		}
-	}
-	.clear-btn {
-		position: absolute;
-		left: 26rpx;
-		top: 0;
-		z-index: 4;
-		width: 0;
-		height: 52rpx;
-		line-height: 52rpx;
-		padding-left: 38rpx;
-		font-size: $font-base;
-		color: #fff;
-		background: $font-color-disabled;
-		border-radius: 0 50px 50px 0;
-		opacity: 0;
-		transition: 0.2s;
-		&.show {
-			opacity: 1;
-			width: 120rpx;
-		}
-	}
-	.total-box {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		text-align: right;
-		padding-right: 40rpx;
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-		}
-		.coupon {
-			font-size: $font-sm;
-			color: $font-color-light;
-			text {
-				color: $font-color-dark;
-			}
-		}
-	}
-	.confirm-btn {
-		padding: 0 38rpx;
-		margin: 0;
-		border-radius: 100px;
-		height: 76rpx;
-		line-height: 76rpx;
-		font-size: $font-base + 2rpx;
-		background: $base-color;
-	}
-}
-/* 复选框选中状态 */
-.action-section .checkbox.checked,
-.cart-item .checkbox.checked {
-	color: $base-color;
-}
-
-</style>

+ 123 - 17
pages/index/Vipgift.vue

@@ -1,24 +1,130 @@
 <template>
-	<view class="content"></view>
+	<view class="content padding-t-20">
+		<view class="flex item padding-v-20 padding-c-20">
+			<view class="imgbox">
+				<image class="img" src="" mode="scaleToFill"></image>
+			</view>
+			<view class="contentbox padding-l-20 flex">
+				<view class="clamp2 title">
+					法国空运高端82年拉菲陈酿 红葡萄酒...
+				</view>
+				<view class="oldMoneyBox ">
+					<view class="flex-start padding-b-10">
+						<text class="oldMoney">¥200</text>
+						<image class="icon padding-l-10" src="../../static/img/domIcon.png" mode="scaleToFill"></image>
+						<text class="domMoney font-size-sm">
+							直降40元
+						</text>
+					</view>
+					<view class="flex">
+						<view class="money">¥200</view>
+						<view class="buttomPay">立即购买</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-export default {
-	data() {
-		return {};
-	},
-	onLoad() {},
-	onShow() {},
-	onReachBottom() {},
-	onReady() {},
-	methods: {}
-};
+	export default {
+		data() {
+			return {
+				
+				
+				
+			};
+		},
+		onLoad() {},
+		onShow() {},
+		onReachBottom() {},
+		onReady() {},
+		methods: {
+			navto(url) {
+				// #ifdef H5
+				console.log(url.indexOf('http'), 'banner');
+				if (url.indexOf('http') >= 0) {
+					window.location.href = url;
+				}
+				// #endif
+				//测试数据没有写id,用title代替
+				uni.navigateTo({
+					url: url
+				});
+			}
+			
+		}
+	};
 </script>
 
 <style lang="scss">
-page,
-.content {
-	min-height: 100%;
-	height: auto;
-}
-</style>
+	page,
+	.content {
+		min-height: 100%;
+		height: auto;
+	}
+
+	.item {
+		border-radius: 10rpx;
+		background-color: #FFFFFF;
+		width: 690rpx;
+		margin: 0 30rpx 20rpx 30rpx;
+		align-items: stretch;
+		line-height: 1;
+
+		.imgbox {
+			background-color: #EE2F72;
+			border-radius: 10rpx;
+			.img {
+				height: 246rpx;
+				width: 246rpx;
+			}
+		}
+
+		.contentbox {
+			flex-wrap: wrap;
+
+			.title {
+				width: 100%;
+				align-self: flex-start;
+				font-size: $font-lg;
+				color: $font-color-dark;
+				line-height: 1.5;
+			}
+
+			.money {
+				font-size: $font-lg + 4rpx;
+				font-weight: bold;
+				color: #EE2F72;
+			}
+
+			.oldMoneyBox {
+				align-self: flex-end;
+				width: 100%;
+
+				.oldMoney {
+					font-size: $font-sm;
+					text-decoration: line-through;
+					color: $font-color-light;
+				}
+
+				.domMoney {
+					color: #B59467;
+				}
+
+				.icon {
+					width: 14rpx;
+					height: 16rpx;
+				}
+
+				.buttomPay {
+					padding: 14rpx 26rpx;
+					font-size: $font-base;
+					color: #fff;
+					background: linear-gradient(90deg, #FF4A8A, #FF77A7);
+					border-radius: 26px;
+				}
+			}
+		}
+	}
+</style>

+ 0 - 697
pages/order/adminOrder.vue

@@ -1,697 +0,0 @@
-<template>
-	<view class="content">
-		<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>
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
-						<view class="i-top b-b">
-							<!-- <view class=""></view> -->
-							<text class="time">订单编号:{{ item.order_id }}</text>
-							<text class="state" style=" color: #901b21; ">{{ item.status_name }}</text>
-							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
-						</view>
-
-						<!-- 		<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
-							<view v-for="(goodsItem, goodsIndex) in item._info" :key="goodsIndex" class="goods-item">
-								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							</view>
-						</scroll-view> -->
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item._info" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.cart_info.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex-start">
-									<text class="title clamp2">{{ goodsItem.cart_info.productInfo.store_name }}</text>
-									<text class="price" style="flex-grow: 1;text-align: right;color: #901B21;font-size: 30rpx;font-weight: bold;">
-										{{ goodsItem.cart_info.productInfo.price | moneyNum }}
-									</text>
-								</view>
-								<view class="row flex">
-									<!-- <view class="row_title" v-if="item.shipping_type === 1">送货上门</view>
-									<view class="row_title" v-else>门店自提</view> -->
-									<!-- <text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text> -->
-									<text class="attr-box">x {{ goodsItem.cart_info.cart_num }}</text>
-								</view>
-							</view>
-						</view>
-
-						<view class="price-box">
-							共
-							<text class="num">{{ item._info.length }}</text>
-							件商品 邮费 合计
-							<text class="price">{{ moneyNum(item.pay_price) }}</text>
-							(含运费
-							<text class="price">{{ moneyNum(item.pay_postage) }}</text>
-							)
-						</view>
-						<!-- <view class="action-box b-t" v-if="item.status != 5">
-							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
-							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
-							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
-							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
-							<button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
-						</view> -->
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-import { orderList, orderCancel, orderDel, orderTake, GetAdminOrderList } from '@/api/order.js';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	filters: {
-		moneyNum(value) {
-			return +value;
-		}
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '未支付',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '待接单',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '进行中',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				// {
-				// 	state: 3,
-				// 	text: '待自提',
-				// 	loadingType: 'more',
-				// 	orderList: [],
-				// 	page: 1, //当前页数
-				// 	limit: 10 //每次信息条数
-				// },
-				{
-					state: 4,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-			],
-			isUser: true
-		};
-	},
-	onLoad(options) {
-		/**
-		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-		 * 替换onLoad下代码即可
-		 */
-		console.log(options);
-		this.isUser = options.isUser;
-		console.log(this.isUser);
-		this.tabCurrentIndex = +options.state;
-		// if(options.state == '4') {
-		// 	this.tabCurrentIndex = 3
-		// }
-		// #ifndef MP
-		this.loadData();
-		// #endif
-		// #ifdef MP
-		if (options.state == 0) {
-			this.loadData();
-		}
-		// #endif
-	},
-	// #ifdef APP-PLUS || H5
-	onBackPress(e) {
-		uni.switchTab({
-			url: '/pages/user/user'
-		});
-		return true;
-	},
-	// #endif
-	methods: {
-		// 转换金额为数字
-		moneyNum(value) {
-			return +value;
-		},
-		// 确认收货
-		orderTake(item, index) {
-			let obj = this;
-			uni.showModal({
-				title: '是否确认收货?',
-				success: res => {
-					if (res.confirm) {
-						orderTake({
-							uni: item.order_id
-						})
-							.then(e => {
-								obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
-								uni.showToast({
-									title: '收货成功'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-					} else if (res.cancel) {
-						console.log('取消');
-					}
-				}
-			});
-		},
-		//跳转到订单详情
-		goToOrderDetail(e) {
-			// uni.navigateTo({
-			// 	url: '/pages/order/orderDetail?id=' + e.order_id
-			// });
-		},
-		// 申请退款
-		orderRefund(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderRefund?id=' + e.order_id
-			});
-		},
-		// 订单支付
-		orderPay(e) {
-			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
-			});
-		},
-		//获取订单列表
-		loadData(source) {
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			if (navItem.loadingType === 'noMore') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			GetAdminOrderList({
-				status: state,
-				page: navItem.page,
-				limit: navItem.limit
-			})
-				.then(({ data }) => {
-					console.log(data, 'ddddddddddd');
-					let arr = data.map(e => {
-						let b = this.orderStateExp(e.status);
-						e.stateTip = b.stateTip;
-						e.stateTipColor = b.stateTipColor;
-						return e;
-					});
-					navItem.orderList = navItem.orderList.concat(arr);
-					console.log(navItem.orderList);
-					navItem.page++;
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					this.$set(navItem, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			console.log(index);
-			this.tabCurrentIndex = index;
-		},
-		//删除订单
-		deleteOrder(index) {
-			uni.showLoading({
-				title: '请稍后'
-			});
-			setTimeout(() => {
-				this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-				uni.hideLoading();
-			}, 600);
-		},
-		//取消订单
-		cancelOrder(item) {
-			uni.showModal({
-				title: '订单取消',
-				content: '是否取消订单?',
-				success: e => {
-					if (e.confirm) {
-						uni.showLoading({
-							title: '请稍后'
-						});
-						orderCancel({ id: item.order_id })
-							.then(e => {
-								uni.showToast({
-									title: '取消成功',
-									duration: 2000,
-									position: 'top'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-						//取消订单后删除待付款中该项
-						let list = this.navList[this.tabCurrentIndex].orderList;
-						let index = list.findIndex(val => val.id === item.id);
-						index !== -1 && list.splice(index, 1);
-						uni.hideLoading();
-					}
-				}
-			});
-		},
-
-		//订单状态文字和颜色
-		orderStateExp(state) {
-			let stateTip = '',
-				stateTipColor = '#fa436a';
-			switch (+state) {
-				case 0:
-					stateTip = '待付款';
-					break;
-				case 1:
-					stateTip = '待发货';
-					break;
-				case 2:
-					stateTip = '待收货';
-					break;
-				case 3:
-					stateTip = '待评价';
-					break;
-				case 4:
-					stateTip = '已完成';
-					stateTipColor = '#901b21';
-					break;
-				case 9:
-					stateTip = '订单已关闭';
-					stateTipColor = '#909399';
-					break;
-
-				//更多自定义
-			}
-			return { stateTip, stateTipColor };
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	background: $page-color-base;
-	height: 100%;
-}
-
-.swiper-box {
-	height: calc(100% - 40px);
-}
-.list-scroll-content {
-	height: 100%;
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-
-.uni-swiper-item {
-	height: auto;
-}
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding-left: 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.i-top {
-		display: flex;
-		align-items: center;
-		height: 80rpx;
-		padding-right: 30rpx;
-		font-size: $font-base;
-		color: $font-color-dark;
-		position: relative;
-		.time {
-			flex: 1;
-		}
-		.state {
-			color: $base-color;
-		}
-		.del-btn {
-			padding: 10rpx 0 10rpx 36rpx;
-			font-size: $font-lg;
-			color: $font-color-light;
-			position: relative;
-			&:after {
-				content: '';
-				width: 0;
-				height: 30rpx;
-				border-left: 1px solid $border-color-dark;
-				position: absolute;
-				left: 20rpx;
-				top: 50%;
-				transform: translateY(-50%);
-			}
-		}
-	}
-	/* 多条商品 */
-	.goods-box {
-		height: 160rpx;
-		padding: 20rpx 0;
-		white-space: nowrap;
-		.goods-item {
-			width: 120rpx;
-			height: 120rpx;
-			display: inline-block;
-			margin-right: 24rpx;
-		}
-		.goods-img {
-			display: block;
-			width: 100%;
-			height: 100%;
-		}
-	}
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			padding: 0 30rpx 0 24rpx;
-			overflow: hidden;
-			.row {
-				margin-top: 10rpx;
-				justify-content: space-between;
-			}
-			.row_title {
-				// padding:5rpx 10rpx;
-				// background-color: #dddddd;
-				// border-radius: 10rpx;
-				// font-size: 22rpx;
-				// color: #ffffff;
-				display: inline-block;
-				padding: 7rpx 11rpx;
-				font-size: 20rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #fd5b23;
-				background: #ffeae5;
-				border-radius: 5rpx;
-			}
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				line-height: 1;
-				width: 80%;
-			}
-			.attr-box {
-				display: flex;
-				justify-content: flex-end;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-			}
-			.price {
-				display: inline;
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-				}
-			}
-		}
-	}
-	.price-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: baseline;
-		padding: 20rpx 30rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-light;
-		.num {
-			margin: 0 8rpx;
-			color: $font-color-dark;
-		}
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			&:before {
-				content: '¥';
-				font-size: $font-sm;
-				margin: 0 2rpx 0 8rpx;
-			}
-		}
-	}
-	.action-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: center;
-		height: 100rpx;
-		position: relative;
-		padding-right: 30rpx;
-	}
-	.action-btn {
-		width: 160rpx;
-		height: 60rpx;
-		margin: 0;
-		margin-left: 24rpx;
-		padding: 0;
-		text-align: center;
-		line-height: 60rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		background: #fff;
-		border-radius: 100px;
-		&:after {
-			border-radius: 100px;
-		}
-		&.recom {
-			color: $base-color;
-			&:after {
-				border-color: $base-color;
-			}
-		}
-		&.evaluate {
-			color: $color-yellow;
-			&:after {
-				border-color: $color-yellow;
-			}
-		}
-	}
-}
-
-/* load-more */
-.uni-load-more {
-	display: flex;
-	flex-direction: row;
-	height: 80rpx;
-	align-items: center;
-	justify-content: center;
-}
-
-.uni-load-more__text {
-	font-size: 28rpx;
-	color: #999;
-}
-
-.uni-load-more__img {
-	height: 24px;
-	width: 24px;
-	margin-right: 10px;
-}
-
-.uni-load-more__img > view {
-	position: absolute;
-}
-
-.uni-load-more__img > view view {
-	width: 6px;
-	height: 2px;
-	border-top-left-radius: 1px;
-	border-bottom-left-radius: 1px;
-	background: #999;
-	position: absolute;
-	opacity: 0.2;
-	transform-origin: 50%;
-	animation: load 1.56s ease infinite;
-}
-
-.uni-load-more__img > view view:nth-child(1) {
-	transform: rotate(90deg);
-	top: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(2) {
-	transform: rotate(180deg);
-	top: 11px;
-	right: 0;
-}
-
-.uni-load-more__img > view view:nth-child(3) {
-	transform: rotate(270deg);
-	bottom: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(4) {
-	top: 11px;
-	left: 0;
-}
-
-.load1,
-.load2,
-.load3 {
-	height: 24px;
-	width: 24px;
-}
-
-.load2 {
-	transform: rotate(30deg);
-}
-
-.load3 {
-	transform: rotate(60deg);
-}
-
-.load1 view:nth-child(1) {
-	animation-delay: 0s;
-}
-
-.load2 view:nth-child(1) {
-	animation-delay: 0.13s;
-}
-
-.load3 view:nth-child(1) {
-	animation-delay: 0.26s;
-}
-
-.load1 view:nth-child(2) {
-	animation-delay: 0.39s;
-}
-
-.load2 view:nth-child(2) {
-	animation-delay: 0.52s;
-}
-
-.load3 view:nth-child(2) {
-	animation-delay: 0.65s;
-}
-
-.load1 view:nth-child(3) {
-	animation-delay: 0.78s;
-}
-
-.load2 view:nth-child(3) {
-	animation-delay: 0.91s;
-}
-
-.load3 view:nth-child(3) {
-	animation-delay: 1.04s;
-}
-
-.load1 view:nth-child(4) {
-	animation-delay: 1.17s;
-}
-
-.load2 view:nth-child(4) {
-	animation-delay: 1.3s;
-}
-
-.load3 view:nth-child(4) {
-	animation-delay: 1.43s;
-}
-
-@-webkit-keyframes load {
-	0% {
-		opacity: 1;
-	}
-
-	100% {
-		opacity: 0.2;
-	}
-}
-</style>

+ 0 - 751
pages/order/order.vue

@@ -1,751 +0,0 @@
-<template>
-	<view class="content">
-		<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>
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
-						<view class="i-top b-b">
-							<!-- <view class=""></view> -->
-							<text class="time">订单编号:{{ item.order_id}}</text>
-							<text class="state" style=" color: #901b21; " >{{ item._status._title }}</text>
-							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
-						</view>
-
-						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
-							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
-								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							</view>
-						</scroll-view>
-						<!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							<view class="right">
-								<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-								<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
-								<text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
-							</view>
-						</view> -->
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex-start">
-									<text class="title clamp2">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price" style="flex-grow: 1;text-align: right;color: #901B21;font-size: 30rpx;font-weight: bold;">{{ goodsItem.productInfo.price|moneyNum }}</text>
-								</view>
-								<view class="row flex">
-									<view class="row_title" v-if="item.shipping_type === 1">送货上门</view>
-									<view class="row_title" v-if="item.shipping_type === 2 && item.store_id != 0">门店自提</view>
-									<!-- <text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text> -->
-									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
-								</view>
-							</view>
-						</view>
-
-						<view class="price-box">
-							共
-							<text class="num">{{ item.cartInfo.length }}</text>
-							件商品 邮费
-							
-							合计
-							<text class="price">{{ moneyNum(item.pay_price)}}</text>
-							(含运费
-							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
-							)
-						</view>
-						<view class="action-box b-t" v-if="item.status != 5">
-							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
-							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
-							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
-							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
-							<button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
-						</view>
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	filters: {
-		moneyNum(value) {
-			return +value
-		}
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '待付款',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '待发货',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '待收货',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 3,
-					text: '待评价',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-				
-			],
-			navShopList: [
-				{
-					state: 0,
-					text: '全部',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '待接单',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '进行中',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 3,
-					text: '待自提',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-			],
-      isUser: true
-		};
-	},
-	onLoad(options) {
-		/**
-		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-		 * 替换onLoad下代码即可
-		 */
-    console.log(options)
-    this.isUser = options.isUser
-    console.log(this.isUser)
-		this.tabCurrentIndex = +options.state;
-		// #ifndef MP
-		this.loadData();
-		// #endif
-		// #ifdef MP
-		if (options.state == 0) {
-			this.loadData();
-		}
-		// #endif
-	},
-	// #ifdef APP-PLUS || H5
-	onBackPress(e){
-		uni.switchTab({
-			url: '/pages/user/user',
-		});
-		return true;
-	},
-	// #endif
-	methods: {
-		// 转换金额为数字
-		moneyNum(value){
-				return +value;
-		},
-		// 确认收货
-		orderTake(item, index) {
-			let obj = this;
-			uni.showModal({
-				title: '是否确认收货?',
-				success: (res) => {
-					if(res.confirm) {
-						orderTake({
-							uni: item.order_id
-						})
-							.then(e => {
-								obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
-								uni.showToast({
-									title: '收货成功'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-					}else if(res.cancel) {
-						console.log('取消')
-					}
-					
-				}
-			});
-		},
-		//跳转到订单详情
-		goToOrderDetail(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderDetail?id=' + e.order_id
-			});
-		},
-		// 申请退款
-		orderRefund(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderRefund?id=' + e.order_id
-			});
-		},
-		// 订单支付
-		orderPay(e) {
-			let yajin = 0 
-			e.cartInfo.forEach(item => {
-				console.log(item.deposit)
-				yajin += item.deposit*1
-			})
-			console.log(yajin)
-			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + (e.pay_price*1 + yajin)
-			});
-		},
-		//获取订单列表
-		loadData(source) {
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			if (navItem.loadingType === 'noMore') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			orderList({
-				type: state,
-				page: navItem.page,
-				limit: navItem.limit
-			})
-				.then(({ data }) => {
-					let arr = data.map(e => {
-						let b = this.orderStateExp(e.status);
-						e.stateTip = b.stateTip;
-						e.stateTipColor = b.stateTipColor;
-						return e;
-					});
-					navItem.orderList = navItem.orderList.concat(arr);
-					// console.log(navItem.orderList);
-					navItem.page++;
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					this.$set(navItem, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			this.tabCurrentIndex = index;
-		},
-		//删除订单
-		deleteOrder(index) {
-			uni.showLoading({
-				title: '请稍后'
-			});
-			setTimeout(() => {
-				this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-				uni.hideLoading();
-			}, 600);
-		},
-		//取消订单
-		cancelOrder(item) {
-			uni.showModal({
-				title: '订单取消',
-				content: '是否取消订单?',
-				success: e => {
-					if (e.confirm) {
-						uni.showLoading({
-							title: '请稍后'
-						});
-						orderCancel({ id: item.order_id })
-							.then(e => {
-								uni.showToast({
-									title: '取消成功',
-									duration: 2000,
-									position: 'top'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-						//取消订单后删除待付款中该项
-						let list = this.navList[this.tabCurrentIndex].orderList;
-						let index = list.findIndex(val => val.id === item.id);
-						index !== -1 && list.splice(index, 1);
-						uni.hideLoading();
-					}
-				}
-			});
-		},
-
-		//订单状态文字和颜色
-		orderStateExp(state) {
-			let stateTip = '',
-				stateTipColor = '#fa436a';
-			switch (+state) {
-				case 0:
-					stateTip = '待付款';
-					break;
-				case 1:
-					stateTip = '待发货';
-					break;
-				case 2:
-					stateTip = '待收货';
-					break;
-				case 3:
-					stateTip = '待评价';
-					break;
-				case 4:
-					stateTip = '已完成';
-					stateTipColor = '#901b21';
-					break;
-				case 9:
-					stateTip = '订单已关闭';
-					stateTipColor = '#909399';
-					break;
-
-				//更多自定义
-			}
-			return { stateTip, stateTipColor };
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	background: $page-color-base;
-	height: 100%;
-}
-
-.swiper-box {
-	height: calc(100% - 40px);
-}
-.list-scroll-content {
-	height: 100%;
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-
-.uni-swiper-item {
-	height: auto;
-}
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding-left: 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.i-top {
-		display: flex;
-		align-items: center;
-		height: 80rpx;
-		padding-right: 30rpx;
-		font-size: $font-base;
-		color: $font-color-dark;
-		position: relative;
-		.time {
-			flex: 1;
-		}
-		.state {
-			color: $base-color;
-		}
-		.del-btn {
-			padding: 10rpx 0 10rpx 36rpx;
-			font-size: $font-lg;
-			color: $font-color-light;
-			position: relative;
-			&:after {
-				content: '';
-				width: 0;
-				height: 30rpx;
-				border-left: 1px solid $border-color-dark;
-				position: absolute;
-				left: 20rpx;
-				top: 50%;
-				transform: translateY(-50%);
-			}
-		}
-	}
-	/* 多条商品 */
-	.goods-box {
-		height: 160rpx;
-		padding: 20rpx 0;
-		white-space: nowrap;
-		.goods-item {
-			width: 120rpx;
-			height: 120rpx;
-			display: inline-block;
-			margin-right: 24rpx;
-		}
-		.goods-img {
-			display: block;
-			width: 100%;
-			height: 100%;
-		}
-	}
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			padding: 0 30rpx 0 24rpx;
-			overflow: hidden;
-			.row{
-				margin-top: 10rpx;
-				justify-content: space-between;
-			}
-			.row_title{
-				// padding:5rpx 10rpx;
-				// background-color: #dddddd;
-				// border-radius: 10rpx;
-				// font-size: 22rpx;
-				// color: #ffffff;
-				display: inline-block;
-				padding: 7rpx 11rpx;
-				font-size: 20rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #FD5B23;
-				background: #FFEAE5;
-				border-radius: 5rpx;
-			}
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				line-height: 1;
-				width: 80%;
-			}
-			.attr-box {
-				display: flex;
-				justify-content: flex-end;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-			}
-			.price {
-				display: inline;
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					
-				}
-			}
-		}
-	}
-	.price-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: baseline;
-		padding: 20rpx 30rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-light;
-		.num {
-			margin: 0 8rpx;
-			color: $font-color-dark;
-		}
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			&:before {
-				content: '¥';
-				font-size: $font-sm;
-				margin: 0 2rpx 0 8rpx;
-			}
-		}
-	}
-	.action-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: center;
-		height: 100rpx;
-		position: relative;
-		padding-right: 30rpx;
-	}
-	.action-btn {
-		width: 160rpx;
-		height: 60rpx;
-		margin: 0;
-		margin-left: 24rpx;
-		padding: 0;
-		text-align: center;
-		line-height: 60rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		background: #fff;
-		border-radius: 100px;
-		&:after {
-			border-radius: 100px;
-		}
-		&.recom {
-			color: $base-color;
-			&:after {
-				border-color: $base-color;
-			}
-		}
-		&.evaluate {
-			color: $color-yellow;
-			&:after {
-				border-color: $color-yellow;
-			}
-		}
-	}
-}
-
-/* load-more */
-.uni-load-more {
-	display: flex;
-	flex-direction: row;
-	height: 80rpx;
-	align-items: center;
-	justify-content: center;
-}
-
-.uni-load-more__text {
-	font-size: 28rpx;
-	color: #999;
-}
-
-.uni-load-more__img {
-	height: 24px;
-	width: 24px;
-	margin-right: 10px;
-}
-
-.uni-load-more__img > view {
-	position: absolute;
-}
-
-.uni-load-more__img > view view {
-	width: 6px;
-	height: 2px;
-	border-top-left-radius: 1px;
-	border-bottom-left-radius: 1px;
-	background: #999;
-	position: absolute;
-	opacity: 0.2;
-	transform-origin: 50%;
-	animation: load 1.56s ease infinite;
-}
-
-.uni-load-more__img > view view:nth-child(1) {
-	transform: rotate(90deg);
-	top: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(2) {
-	transform: rotate(180deg);
-	top: 11px;
-	right: 0;
-}
-
-.uni-load-more__img > view view:nth-child(3) {
-	transform: rotate(270deg);
-	bottom: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(4) {
-	top: 11px;
-	left: 0;
-}
-
-.load1,
-.load2,
-.load3 {
-	height: 24px;
-	width: 24px;
-}
-
-.load2 {
-	transform: rotate(30deg);
-}
-
-.load3 {
-	transform: rotate(60deg);
-}
-
-.load1 view:nth-child(1) {
-	animation-delay: 0s;
-}
-
-.load2 view:nth-child(1) {
-	animation-delay: 0.13s;
-}
-
-.load3 view:nth-child(1) {
-	animation-delay: 0.26s;
-}
-
-.load1 view:nth-child(2) {
-	animation-delay: 0.39s;
-}
-
-.load2 view:nth-child(2) {
-	animation-delay: 0.52s;
-}
-
-.load3 view:nth-child(2) {
-	animation-delay: 0.65s;
-}
-
-.load1 view:nth-child(3) {
-	animation-delay: 0.78s;
-}
-
-.load2 view:nth-child(3) {
-	animation-delay: 0.91s;
-}
-
-.load3 view:nth-child(3) {
-	animation-delay: 1.04s;
-}
-
-.load1 view:nth-child(4) {
-	animation-delay: 1.17s;
-}
-
-.load2 view:nth-child(4) {
-	animation-delay: 1.3s;
-}
-
-.load3 view:nth-child(4) {
-	animation-delay: 1.43s;
-}
-
-@-webkit-keyframes load {
-	0% {
-		opacity: 1;
-	}
-
-	100% {
-		opacity: 0.2;
-	}
-}
-</style>

+ 0 - 233
pages/product/jmszg.vue

@@ -1,233 +0,0 @@
-<template>
-	<view class="content">
-		<scroll-view scroll-y="true" class="scroll-wrapper">
-			<view class="spgood"  v-for="(items, ind) in list" :key="ind">
-				<view class="left-wrapper"><image :src="items.product_info.image" mode="scaleToFill"></image></view>
-				<view class="right-wrapper">
-					<view class="right-title clamp">{{ items.product_info.store_name }}</view>
-					<!-- <view class="ex-addr">
-					
-					</view> -->
-					<view class="right-bottom">
-						<view class="sp-price">
-							<view class="now-price">¥{{ items.product_info.price * 1 }}</view>
-							<view class="old-price">¥{{ items.product_info.ot_price * 1 }}</view>
-						</view>
-						<view class="sp-btn">马上购</view>
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import { getOrderStock } from '@/api/product.js';
-export default {
-	data() {
-		return {
-			list: [],
-			page: 1,
-			limit: 10,
-			loadType: 'more',
-			loaded: false
-		};
-	},
-	onReady() {
-		//初始化获取页面宽度
-		uni.createSelectorQuery().select('.scroll-wrapper')
-			.fields(
-			{
-				size:true
-			},
-			data => {
-				console.log(data);
-				console.log(Math.floor((data.width /750) * 300));
-				//保存头部高度
-				this.maxheight =data.height - Math.floor((data.width / 750) * 570);
-				console.log(this.maxheight);
-				}
-			)
-			.exec();
-	},
-	onLoad() {
-		this.loadData();
-	},
-	methods: {
-		loadData() {
-			let obj = this;
-			if (obj.loadType == 'loading') {
-				return;
-			}
-			if (obj.loadType == 'noMore') {
-				return;
-			}
-			obj.loadType = 'loading';
-			getOrderStock({
-				page: obj.page,
-				limit: obj.limit
-			}).then(({ data }) => {
-				// this.list = this.list.concat()
-				obj.page++;
-				console.log(data.data.data, 'ddddddddddddddddddddddddddddddd');
-				this.list = this.list.concat(data.data.data)
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped>
-.spgood {
-	margin: 0 auto;
-	width: 710rpx;
-	height: 280rpx;
-	background: #ffffff;
-	box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
-	border-radius: 8rpx;
-	padding: 40rpx 20rpx;
-	display: flex;
-	margin-bottom: 21rpx;
-	position: relative;
-	.left-wrapper {
-		width: 190rpx;
-		height: 200rpx;
-		border-radius: 10rpx;
-		image {
-			width: 190rpx;
-			height: 200rpx;
-			border-radius: 10rpx;
-		}
-	}
-	.right-wrapper {
-		padding-left: 22rpx;
-		width: 100%;
-		height: 200rpx;
-		// background-color: red;
-		.right-title {
-			padding-top: 8rpx;
-			width: 400rpx;
-			// height: 29rpx;
-			font-size: 30rpx;
-			font-weight: bold;
-			color: #333333;
-		}
-		.right-addr {
-			margin-top: 18rpx;
-			display: flex;
-			.shop-img {
-				width: 26rpx;
-				height: 23rpx;
-				margin: 0 4rpx 0 0;
-				image {
-					width: 100%;
-					height: 100%;
-				}
-			}
-			.shop-name {
-				// height: 22rpx;
-				font-size: 22rpx;
-				font-weight: 500;
-				color: #dcb876;
-			}
-			.point-img {
-				width: 16rpx;
-				height: 23rpx;
-				margin: 0 4rpx 0 14rpx;
-				image {
-					width: 100%;
-					height: 21rpx;
-				}
-			}
-			.point-disc {
-				font-size: 24rpx;
-				font-weight: 500;
-				padding-top: 3rpx;
-				color: #dcb876;
-			}
-		}
-		.ex-addr {
-			margin-top: 16rpx;
-			// padding-left: 22rpx;
-			height: 24rpx;
-			font-size: 24rpx;
-			font-weight: 500;
-			color: #dcb876;
-			image {
-				height: 22rpx;
-			}
-			.name-img {
-				// vertical-align: ;
-				width: 26rpx;
-				margin: 0 4rpx -3rpx 0;
-			}
-			.point-img {
-				width: 16rpx;
-				margin: 0 4rpx -3rpx 14rpx;
-			}
-		}
-		.pepple-num {
-			// width: 99rpx;
-			display: inline-block;
-			padding-right: 15rpx;
-			height: 36rpx;
-			// color: #ff3366;
-			// background: #FC7A0C;
-			background-color: #fee4ce;
-			// opacity: 0.2;
-			border-radius: 18rpx;
-			font-size: 20rpx;
-			font-weight: 500;
-			color: #ff3366;
-			line-height: 36rpx;
-			padding-left: 12rpx;
-			margin-top: 33rpx;
-			image {
-				width: 17rpx;
-				height: 20rpx;
-				margin-right: 10rpx;
-				// padding-right: rpx;
-			}
-		}
-		.right-bottom {
-			margin-top: 2rpx;
-			// justify-items: flex-end;
-			display: flex;
-			justify-content: space-between;
-			.sp-price {
-				height: 60rpx;
-				display: flex;
-				vertical-align: bottom;
-				line-height: 60rpx;
-				.now-price {
-					font-size: 30rpx;
-					font-weight: bold;
-					color: #901b21;
-					margin-right: 16rpx;
-				}
-				.old-price {
-					font-size: 22rpx;
-					font-weight: 500;
-					text-decoration: line-through;
-					color: #aaaaaa;
-				}
-			}
-			.sp-btn {
-				width: 160rpx;
-				height: 60rpx;
-				border-radius: 30rpx;
-				font-size: 26rpx;
-				text-align: center;
-				line-height: 60rpx;
-				font-weight: 400;
-				color: #ffffff;
-				background-color: #901b21;
-				position: absolute;
-				bottom: 40rpx;
-				right: 20rpx;
-			}
-		}
-	}
-}
-</style>

+ 0 - 189
pages/recommend/recommend.vue

@@ -1,189 +0,0 @@
-<template>
-	<view class="recommend">
-		<view class="re-list" v-for="b in bastList" :key="b.id">
-			<view class="re-img">
-				<image :src="b.image" mode=""></image>
-			</view>
-			<view class="re-right">
-				<view class="re-right-top">
-					<view class="good-name clamp2">{{b.store_name}}</view>
-					<view class="store-name clamp">
-						门店:{{checkedStore.name}}
-					</view>
-					<text>距离:{{checkedStore.distance | des}}</text>
-				</view>
-				<view class="re-right-bottom">
-					<view class="re-right-bottom-left">
-						<text>¥{{b.price}}</text><text class="ot-price" v-if="b.ot_price*1 > b.price*1">¥{{b.ot_price}}</text>
-					</view>
-					<view class="re-right-bottom-right" @click="navTo('/pages/product/product?id=' + b.id + '&type=0')">
-						立即购买
-					</view>
-				</view>
-			</view>
-		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
-	</view>
-</template>
-
-<script>
-import { mapState, mapMutations } from 'vuex';
-import { groom1 } from '@/api/index.js';
-export default {
-	data() {
-		return {
-			bastList: [],
-			loadingType: 'more',
-			page: 1,
-			limit: 10,
-		}
-	},
-	filters: {
-		des(val) {
-			let str = ''
-			if(val) {
-				if(val <= 1000) {
-					 str = parseInt(val) + 'm'
-				}else {
-					 str = parseInt(val/1000) + 'km'
-				}
-			}
-			return str
-		}
-	},
-	onShow() {
-		this.getRecommend()
-		console.log(this.checkedStore)
-	},
-	computed: {
-		...mapState('user',['checkedStore'])
-	},
-	// 页面到底部
-	onReachBottom() {
-		console.log('到底')
-		this.getRecommend()
-	},
-	methods: {
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			})
-		},
-		getRecommend() {
-			let obj = this
-			if(obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
-				return 
-			}
-			obj.loadingType = 'loading' 
-			groom1({
-				page: obj.page,
-				limit: obj.limit
-			}).then( ({data}) => {
-				obj.bastList = obj.bastList.concat(data.list)
-				console.log(data.list,'groom1')
-				obj.page++
-				if(data.list.length == obj.limit) {
-					obj.loadingType = 'more' 
-				}else {
-					obj.loadingType = 'noMore' 
-				}
-				})
-		}
-	}
-}
-</script>
-
-<style lang="scss" scoped>
-	.re-list {
-		margin: 20rpx;
-		height: 280rpx;
-		background-color: #FFFFFF;
-		border-radius: 8rpx;
-		display: flex;
-		
-		$wi: 200rpx;
-		.re-img {
-			margin: auto 0;
-			image {
-				width: $wi;
-				height: $wi;
-				border-radius: 10rpx;
-				margin: 0 25rpx;
-			}
-		}
-		
-		.re-right {
-			height: $wi;
-			width: 100%;
-			margin: auto 0;
-			font-family: PingFang-SC-Medium;
-			position: relative;
-				
-			.re-right-top {
-				color: #333333;
-				font-size: 30rpx;
-				.good-name {
-					width: 380rpx;
-					font-size: 30rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #333333;
-				}
-				.store-name {
-					padding-top: 10rpx;
-					width: 300rpx;
-					font-size: 22rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #DCB876;
-				}
-				text {
-					color: #DCB876;
-					font-size: 22rpx;
-				}
-			}
-			
-			.re-right-bottom {
-				width: 450rpx;
-				display: flex;
-				justify-content:space-between;
-				position: absolute;
-				bottom: 0;
-					
-				.re-right-bottom-left {
-					height: 60rpx;
-					line-height: 60rpx;
-					margin: auto 0;
-					font-size: 32rpx;
-					color: #901B21;
-					.ot-price {
-						padding-left: 8rpx;
-						font-size: 20rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						text-decoration: line-through;
-						color: #9D9D9D;
-					}
-					// span {
-					// 	margin-left: 5rpx;
-					// 	color: #989B9F;
-					// 	font-size: 15rpx;
-					// 	text-decoration: line-through;
-					// }
-				}
-				
-				.re-right-bottom-right {
-					width: 160rpx;
-					line-height: 60rpx;
-					background: #901b21;
-					border-radius: 30rpx;
-					font-size: 28rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #FFFFFF;
-					text-align: center;
-				}
-			}
-		}
-	}
-</style>

BIN
static/img/domIcon.png