lhl 4 years ago
parent
commit
cda9bf861e
83 changed files with 937 additions and 1533 deletions
  1. 5 4
      pages.json
  2. 728 427
      pages/cart/cart.vue
  3. 0 513
      pages/index/index.vue
  4. 121 113
      pages/integral/index.vue
  5. 73 43
      pages/product/product.vue
  6. 9 0
      static/css/cmy.css
  7. BIN
      static/icon/dhq.png
  8. BIN
      static/icon/down.png
  9. BIN
      static/icon/in1.png
  10. BIN
      static/icon/in2.png
  11. BIN
      static/icon/in3.png
  12. BIN
      static/icon/in4.png
  13. BIN
      static/icon/indexbg.png
  14. BIN
      static/icon/jf.png
  15. BIN
      static/icon/jfg.png
  16. BIN
      static/icon/jxhh.png
  17. BIN
      static/icon/searchw.png
  18. BIN
      static/icon/where.png
  19. BIN
      static/icon/xfzq.png
  20. 0 432
      static/static/css/cmy.css
  21. BIN
      static/static/error/emptyCart.jpg
  22. BIN
      static/static/error/emptyCart.png
  23. BIN
      static/static/error/errorImage.jpg
  24. BIN
      static/static/error/missing-face.png
  25. BIN
      static/static/icon/appleIcon.png
  26. BIN
      static/static/icon/c3.png
  27. BIN
      static/static/icon/c5.png
  28. BIN
      static/static/icon/c6.png
  29. BIN
      static/static/icon/c7.png
  30. BIN
      static/static/icon/c8.png
  31. BIN
      static/static/icon/i1.png
  32. BIN
      static/static/icon/i2.png
  33. BIN
      static/static/icon/i3.png
  34. BIN
      static/static/icon/i4.png
  35. BIN
      static/static/icon/i5.png
  36. BIN
      static/static/icon/i6.png
  37. BIN
      static/static/icon/i7.png
  38. BIN
      static/static/icon/i8.png
  39. BIN
      static/static/icon/img01.png
  40. BIN
      static/static/icon/img02.png
  41. BIN
      static/static/icon/img03.png
  42. BIN
      static/static/icon/img04.png
  43. BIN
      static/static/icon/img05.png
  44. BIN
      static/static/icon/img06.png
  45. BIN
      static/static/icon/img07.png
  46. BIN
      static/static/icon/img08.png
  47. BIN
      static/static/icon/img09.png
  48. BIN
      static/static/icon/img10.png
  49. BIN
      static/static/icon/img11.png
  50. BIN
      static/static/icon/select.png
  51. BIN
      static/static/icon/selected.png
  52. BIN
      static/static/icon/u1.png
  53. BIN
      static/static/icon/u2.png
  54. BIN
      static/static/icon/u3.png
  55. BIN
      static/static/icon/u4.png
  56. BIN
      static/static/icon/u5.png
  57. BIN
      static/static/img/arc.png
  58. BIN
      static/static/img/img01.png
  59. BIN
      static/static/img/img02.png
  60. BIN
      static/static/img/img03.png
  61. BIN
      static/static/img/img05.png
  62. BIN
      static/static/img/img07.png
  63. BIN
      static/static/img/img08.png
  64. BIN
      static/static/img/img09.png
  65. BIN
      static/static/img/img10.png
  66. BIN
      static/static/img/img14.jpg
  67. BIN
      static/static/img/logo.png
  68. BIN
      static/static/img/vip-card-bg.png
  69. BIN
      static/static/tabBar/tab-cart-current.png
  70. BIN
      static/static/tabBar/tab-cart.png
  71. BIN
      static/static/tabBar/tab-cate-current.png
  72. BIN
      static/static/tabBar/tab-cate.png
  73. BIN
      static/static/tabBar/tab-home-current.png
  74. BIN
      static/static/tabBar/tab-home.png
  75. BIN
      static/static/tabBar/tab-my-current.png
  76. BIN
      static/static/tabBar/tab-my.png
  77. BIN
      static/static/xuan-popup/err.png
  78. BIN
      static/static/xuan-popup/info.png
  79. BIN
      static/static/xuan-popup/loading.png
  80. BIN
      static/static/xuan-popup/success.png
  81. BIN
      static/static/xuan-popup/warn.png
  82. BIN
      static/static/yticon.ttf
  83. 1 1
      uni.scss

+ 5 - 4
pages.json

@@ -339,16 +339,17 @@
 		}, {
 			"path": "pages/category/category",
 			"style": {
-				"navigationBarTitleText": "分类",
+				"navigationBarTitleText": "分类",
+				"navigationBarBackgroundColor":"#52C696",
 				"app-plus": {
 					"bounce": "none",
 					"titleNView": {
 						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"backgroundColor": "#ffffff",
 							"borderRadius": "16px",
 							"placeholder": "商品搜索",
 							"disabled": true,
-							"placeholderColor": "#606266",
+							"placeholderColor": "#999999",
 							"align": "left"
 						}
 					}
@@ -431,7 +432,7 @@
 		{
 			"path": "pages/integral/index",
 			"style": {
-				"navigationBarTitleText": "积分商城"
+				"navigationBarTitleText": "积分兑换"
 			}
 		},
 		{

+ 728 - 427
pages/cart/cart.vue

@@ -1,428 +1,729 @@
-<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>
-							<text class="price">¥{{ item.productInfo.price }}</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>
-						</view>
-						<text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text>
-					</view>
-				</block>
-			</view>
-			<!-- 底部菜单栏 -->
-			<view class="action-section">
-				<view class="checkbox">
-					<image :src="allChecked ? '/static/icon/selected.png' : '/static/icon/select.png'" mode="aspectFit" @click="check('all')"></image>
-					<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/cart.js';
-import { mapState } from 'vuex';
-import uniNumberBox from '@/components/uni-number-box.vue';
-export default {
-	components: {
-		uniNumberBox
-	},
-	data() {
-		return {
-			total: 0, //总价格
-			allChecked: false, //全选状态  true|false
-			empty: false, //空白页现实  true|false
-			cartList: []
-		};
-	},
-	onShow() {
-		// 只有登录时才加载数据
-		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: {
-		//请求数据
-		async 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() {
-			let url = '/pages/public/login';
-			// #ifdef H5
-			let weichatBrowser = uni.getStorageSync('weichatBrowser');
-			// 判断是否为微信浏览器
-			if (weichatBrowser) {
-				url = '/pages/public/wxLogin';
-			}
-			// #endif
-			// #ifdef MP-WEIXIN
-			url = '/pages/public/wxLogin';
-			// #endif
-			uni.navigateTo({
-				url: url
-			});
-		},
-		//选中状态处理
-		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 });
-			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">
-	page{
-		height: 100%;
-		background-color: $page-color-base;
-	}
-.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;
-			}
-		}
-	}
-}
-/* 购物车列表项 */
-.cart-item {
-	display: flex;
-	position: relative;
-	padding: 30rpx 40rpx;
-	.image-wrapper {
-		width: 230rpx;
-		height: 230rpx;
-		flex-shrink: 0;
-		position: relative;
-		image {
-			border-radius: 8rpx;
-		}
-	}
-	.checkbox {
-		position: absolute;
-		left: -16rpx;
-		top: -16rpx;
-		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;
-		.title,
-		.price {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			height: 40rpx;
-			line-height: 40rpx;
-		}
-		.attr {
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-			height: 50rpx;
-			line-height: 50rpx;
-		}
-		.price {
-			height: 50rpx;
-			line-height: 50rpx;
-		}
-		.step {
-			margin-top: 20rpx;
-		}
-	}
-	.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;
-		image {
-			border-radius: 50rpx;
-			background-color: #ffffff;
-			width: 52rpx;
-			height: 100%;
-			position: relative;
-			z-index: 5;
-		}
-	}
-	.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;
-}
+<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-hand flex">
+				<view class="hand-tit">
+					购物车共 <text>{{ ' '+cartList.length}} 件</text>商品
+				</view>
+				<view class="hand-btn" @click="clearCart()">
+					清空购物车
+				</view>
+			</view>
+			<!-- 列表 -->
+			<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.productInfo.attrInfo.suk }}</text> -->
+							<text class="price">¥{{ item.productInfo.price }}</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> -->
+							<view class="munbox flex">
+								<image src="../../static/icon/reduce.png" mode="" @click="reduce(item,index)"></image>
+								<input type="number" :value="item.cart_num" disabled />
+								<image src="../../static/icon/add.png" mode="" @click="add(item)"></image>
+							</view>
+						</view>
+						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
+					</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/cart.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: [],
+				code: '', //商品条码
+			};
+		},
+		onShow() {
+			// 只有登录时才加载数据
+			if (this.hasLogin) {
+				this.loadData();
+			}
+		},
+		watch: {
+			//显示空白页
+			cartList(e) {
+				let empty = e.length === 0 ? true : false;
+				if (this.empty !== empty) {
+					this.empty = empty;
+				}
+			}
+		},
+		computed: {
+			...mapState(['weichatObj']),
+			...mapState('user', ['hasLogin'])
+		},
+		methods: {
+			reduce(item, index) {
+				if (item.cart_num == 1) {
+					uni.showModal({
+						content: '删除该商品?',
+						success: e => {
+							if (e.confirm) {
+								this.deleteCartItem(index)
+							}
+						}
+					});
+
+				} else {
+					item.cart_num--
+					this.newNumberChange(item)
+				}
+			},
+			add(item) {
+				console.log(item)
+				if (item.productInfo.stock > item.cart_num) {
+					item.cart_num++
+					this.newNumberChange(item)
+				} else {
+					return
+				}
+			},
+			//请求数据
+			async 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();
+			},
+			newNumberChange(item) {
+				getCartNum({
+						id: item.id,
+						number: item.cart_num
+					})
+					.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;
+				}
+			}
+		}
+	}
+
+	/* 购物车列表项 */
+	.cart-item {
+		width: 710rpx;
+		height: 210rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 10rpx 0rpx rgba(0, 0, 0, 0.1);
+		border-radius: 10rpx;
+		margin: 20rpx auto;
+
+		display: flex;
+		position: relative;
+		padding: 30rpx 26rpx 30rpx 80rpx;
+
+		.image-wrapper {
+			width: 150rpx;
+			height: 150rpx;
+			flex-shrink: 0;
+			position: relative;
+
+			image {
+				border-radius: 8rpx;
+			}
+		}
+
+		.checkbox {
+			display: flex;
+			position: absolute;
+			top: 0;
+			bottom: 0;
+			left: -65rpx;
+			margin: auto 0;
+			height: 50rpx;
+			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;
+
+			.munbox {
+				width: 144rpx;
+				height: 44rpx;
+				position: absolute;
+				bottom: 0;
+				right: 0;
+
+				input {
+					display: inline-block;
+					text-align: center;
+				}
+
+				image {
+					flex-shrink: 0;
+					width: 44rpx;
+					height: 44rpx;
+				}
+			}
+
+			.title,
+			.price {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+
+			.attr {
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+				height: 50rpx;
+				line-height: 50rpx;
+
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.price {
+				// height: 50rpx;
+				// line-height: 50rpx;
+				padding-top: 20rpx;
+				font-size: 34rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF4C4C;
+			}
+
+			.step {
+				margin-top: 20rpx;
+			}
+
+			.title {
+				font-size: 34rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+
+		.del-btn {
+			padding: 4rpx 10rpx;
+			font-size: 34rpx;
+			height: 50rpx;
+			color: $font-color-light;
+		}
+	}
+
+	/* 底部栏 */
+	.action-section {
+		/* #ifdef H5 */
+		margin-bottom: 97rpx;
+		/* #endif */
+		position: fixed;
+		left: 0rpx;
+		bottom: 0rpx;
+		z-index: 95;
+		display: flex;
+		align-items: center;
+		width: 750rpx;
+		height: 100rpx;
+		padding: 0 30rpx;
+		// background: rgba(255, 255, 255, 0.9);
+		background: #fff;
+
+		// 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;
+
+				&::after {
+					content: '全选';
+					width: 100rpx;
+					position: absolute;
+					top: 0;
+					bottom: 0;
+					margin: auto;
+					line-height: 1.5;
+					padding-left: 10rpx;
+					font-size: 32rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #767477;
+				}
+			}
+
+			.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;
+			color: #FF6F0F;
+			font-weight: bold;
+
+			.price {
+				font-size: 32rpx;
+
+				// font-size: $font-lg;
+				// color: $font-color-dark;
+
+			}
+
+			.coupon {
+				font-size: $font-sm;
+
+				// color: $font-color-light;
+				text {
+					font-weight: bold;
+					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;
+			font-weight: bold;
+		}
+	}
+
+	/* 复选框选中状态 */
+	.action-section .checkbox.checked,
+	.cart-item .checkbox.checked {
+		color: $base-color;
+	}
+
+	.cart-hand {
+		width: 750rpx;
+		height: 88rpx;
+		background: #FFFFFF;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+		line-height: 88rpx;
+		padding-left: 28rpx;
+		padding-right: 26rpx;
+		position:sticky;
+		top: 44px;
+		z-index: 99;
+		.hand-tit {
+			text {
+				color: #FF4C4C;
+			}
+
+		}
+
+		.hand-btn {
+			width: 164rpx;
+			height: 62rpx;
+			border: 2rpx solid #FF4C4C;
+			border-radius: 31rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FF4C4C;
+			line-height: 62rpx;
+			text-align: center;
+		}
+	}
+
+	.btm-btn {
+		z-index: 95;
+		display: flex;
+		position: fixed;
+		bottom: 0;
+		text-align: center;
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		line-height: 97rpx;
+		width: 750rpx;
+
+		.btn-item {
+			height: 100%;
+			width: 50%;
+			background-color: #31332d;
+		}
+
+		.btn-item1 {
+			background-color: #5DBC7C;
+		}
+	}
+
+	.cart-list {
+		// padding-top: 88rpx;
+		padding-bottom: 97rpx;
+	}
+
+	.hx-wrapper {
+		width: 536rpx;
+		height: 630rpx;
+		position: relative;
+
+		// background-color: #fff;
+		.hx-img {
+			width: 536rpx;
+			height: 281rpx;
+
+			image {
+				width: 536rpx;
+				height: 281rpx;
+			}
+		}
+
+		.hx-close {
+			position: absolute;
+			left: 243rpx;
+			bottom: -80rpx;
+			width: 52rpx;
+			height: 52rpx;
+
+			image {
+				width: 52rpx;
+				height: 52rpx;
+			}
+		}
+
+		.hx-body {
+			width: 536rpx;
+			height: 349rpx;
+			background-color: #fff;
+			border-radius: 0 0 10rpx 10rpx;
+
+			.hx-title {
+				width: 536rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #333333;
+				line-height: 1;
+				padding-top: 42rpx;
+				text-align: center;
+			}
+
+			input {
+				width: 439rpx;
+				height: 68rpx;
+				background: #DBF3E9;
+				border-radius: 10rpx;
+				margin: 39rpx auto 0;
+				padding-left: 26rpx;
+
+				.hx-placeholder {
+					font-size: 26rpx;
+					font-weight: 500;
+					color: #52C696;
+				}
+			}
+
+			.hx-btn {
+				margin: 44rpx auto 0;
+				width: 353rpx;
+				height: 71rpx;
+				background: #52C696;
+				border-radius: 34rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #F8F9F9;
+				line-height: 71rpx;
+				text-align: center;
+			}
+
+
+		}
+	}
 </style>

File diff suppressed because it is too large
+ 0 - 513
pages/index/index.vue


+ 121 - 113
pages/integral/index.vue

@@ -1,43 +1,31 @@
 <template>
 	<view class="container">
-		<!-- 头部轮播 -->
-		<view class="carousel-section">
-			<swiper class="carousel" autoplay="true" duration="400" interval="5000">
-				<swiper-item v-for="(item, index) in bannerImg" :key="index" class="carousel-item" @click="bannerNavToUrl(item)">
-					<image :src="item.img" mode=" scaleToFill" />
-				</swiper-item>
-			</swiper>
-		</view>
-		<view class="goodsList-box">
-			<view class="goodsList-item" :key="ind" v-for="(ls, ind) in list" @click="navToDetailPage(ls)">
-				<navigator :url="'/pages/product/product?id=' + ls.id">
-					<image :src="ls.image" mode=" scaleToFill"></image>
-					<view class="goodsList-content">
-						<view class="title clamp">
-							<text>{{ ls.store_name }}</text>
-						</view>
-						<view class="goods-money flex">
-							<view class="money-box flex">
-								<view v-if="ls.use_max_integral != 0">
-									<text class="money">{{ ls.use_max_integral }}</text>
-									<text class="font-size-sm">积分</text>
-								</view>
-								<view v-else>
-									<text class="money">¥{{ ls.price }}</text>
-								</view>
-								<view class="otMoney-box" v-if="ls.use_max_integral != 0">
-									<text class="otMoney" v-if="ls.price - ls.use_max_integral > 0">+¥{{ (ls.price - ls.use_max_integral) | toFixed }}</text>
-								</view>
-							</view>
-							<view class="otprice">
-								<text>¥{{ ls.price }}</text>
-							</view>
-						</view>
-					</view>
-				</navigator>
-			</view>
-		</view>
-	</view>
+		<view class="jg"></view>
+		<view class="good-wrapper flex" v-for="(good ,index) in list" :key="good.id">
+			<image :src="good.image" mode="" class="good-img"></image>
+			<view class="good-info flex">
+				<view class="tit clamp2">
+					{{good.store_name  }}
+				</view>
+				<view class="price-wrap">
+					<view class="old-price">
+						<text class="old">¥{{good.ot_price}}</text>
+						<image src="../../static/icon/down.png" mode=""></image>
+						<text class="zj">直降{{good.ot_price - good.use_max_integral}}元</text>
+					</view>
+					<view class="integral-wrap">
+						<image src="../../static/icon/jf.png" mode=""></image>
+						<text class="price">{{good.use_max_integral}}</text>
+					</view>
+				</view>
+				<view class="btn">
+					立即购买
+				</view>
+			</view>
+		</view>
+		<view class="jg"></view>
+	</view>
+	
 </template>
 
 <script>
@@ -103,83 +91,103 @@ export default {
 };
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 page {
 	background: $page-color-base;
 }
-.carousel-section {
-	margin-bottom: 30rpx;
-	padding: 0;
-	.titleNview-placing {
-		padding-top: 0;
-		height: 0;
-	}
-	.swiper-dots {
-		left: 45rpx;
-		bottom: 40rpx;
-	}
-	.carousel {
-		width: 100%;
-		height: 360rpx;
-		.carousel-item {
-			width: 100%;
-			height: 100%;
-			overflow: hidden;
-		}
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-}
-// 商品列表
-.goodsList-box {
-	padding: 0 25rpx;
-	display: flex;
-	flex-wrap: wrap;
-	.goodsList-item {
-		width: 340rpx;
-		margin-bottom: 30rpx;
-		background-color: #ffffff;
-		border-radius: $border-radius-sm;
-		image {
-			flex-shrink: 0;
-			height: 340rpx;
-			width: 340rpx;
-		}
-		&:nth-child(2n + 1) {
-			margin-right: 20rpx;
-		}
-		.goodsList-content {
-			padding-left: 20rpx;
-			flex-grow: 1;
-			padding: 20rpx;
-			.title {
-				font-size: $font-base;
-				color: $font-color-dark;
-				font-weight: 500;
-			}
-			.goods-money {
-				line-height: 1;
-				margin-top: 10rpx;
-				font-size: $font-sm - 4rpx;
-				.money {
-					color: $color-red;
-					font-weight: bold;
-				}
-				.font-size-sm {
-					color: $font-color-light;
-				}
-				.otMoney {
-					background-color: #ffeae2;
-					color: $color-red;
-				}
-				.otprice {
-					text-decoration: line-through;
-					color: $font-color-light;
-				}
-			}
-		}
-	}
+.jg {
+	height: 20rpx;
+}
+.good-wrapper {
+	width: 690rpx;
+	height: 276rpx;
+	justify-content: flex-start;
+	align-items: flex-start;
+	margin: 0 auto 20rpx;
+	// &:last-of-type {
+	// 	margin-bottom: 0;
+	// }
+	background: #FFFFFF;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 10rpx;
+	padding: 20rpx 25rpx 20rpx 15rpx;
+	.good-img {
+		flex-shrink: 0;
+		background-color: #eee;
+		width: 236rpx;
+		height: 236rpx;
+		border-radius: 10rpx;
+		margin-right: 20rpx;
+	}
+	.good-info {
+		flex-direction: column;
+		align-items: flex-start;
+		width: 100%;
+		height: 100%;
+		position: relative;
+		.tit {
+			padding-top: 10rpx;
+			padding-right: 15rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+		}
+		.btn {
+			width: 137rpx;
+			line-height: 52rpx;
+			background: linear-gradient(0deg, #52C696 0%, #52C696 100%);
+			border-radius: 26rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			text-align: center;
+			color: #FFFFFF;
+			position: absolute;
+			bottom: 0;
+			right: 0;
+		}
+		.price-wrap {
+			.old-price {
+				
+				.old {
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #999999;
+				}
+				image {
+					display: inline-block;
+					width: 14rpx;
+					height: 20rpx;
+					margin: 0 6rpx 0 10rpx;
+				}
+				.zj {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #B59467;
+				}
+			}
+			.integral-wrap {
+				display: flex;
+				justify-content: flex-start;
+				padding-top: 14rpx;
+				image {
+					width: 40rpx;
+					height: 40rpx;
+					margin-right: 8rpx;
+				}
+				.price {
+					font-size: 36rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF6F0F;
+					line-height: 40rpx;
+				}
+			}
+		}
+		
+	}
 }
 </style>

+ 73 - 43
pages/product/product.vue

@@ -32,7 +32,6 @@
 		</view>
 
 		<view class="introduce-section">
-			<text class="title" v-if="goodsType == 0">{{ goodsObjact.store_name }}</text>
 			<text class="title" v-if="goodsType == 1">{{ goodsObjact.title }}</text>
 			<view class="price-box" v-if="goodsType == 0">
 				<text class="price-tip">¥</text>
@@ -40,11 +39,11 @@
 				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
 				<!-- <text class="coupon-tip">7折</text> -->
 			</view>
-
-			<view class="bot-row">
-				<text>销量: {{ goodsObjact.sales }}</text>
-				<text>库存: {{ goodsObjact.stock }}</text>
-				<text>邮费: {{ goodsObjact.postage }}</text>
+			<text class="title" v-if="goodsType == 0">{{ goodsObjact.store_name }}</text>
+			<view class="bot-row">
+				<text>快递: {{ goodsObjact.postage }}</text>
+				<text style="text-align: center;">销量: {{ goodsObjact.sales }}</text>
+				<text style="text-align: right;">{{ storeObjact.address | address}}</text>
 			</view>
 		</view>
 		<!-- 评价 -->
@@ -122,14 +121,14 @@
 		</view>
 		<!-- 底部操作菜单 -->
 		<view class="page-bottom" v-if="goodsType == 0">
-			<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
+			<!-- <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
 				<text class="iconfont iconhome"></text>
 				<text>首页</text>
 			</navigator>
 			<navigator url="/pages/cart/cart" open-type="switchTab" class="p-b-btn">
 				<text class="iconfont iconcart"></text>
 				<text>购物车</text>
-			</navigator>
+			</navigator> -->
 			<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
 				<text class="iconfont " :class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
 				<text>收藏</text>
@@ -163,13 +162,14 @@
 			<view class="layer attr-content" @click.stop="stopPrevent">
 				<view class="a-t">
 					<image :src="actionImage"></image>
-					<view class="right">
+					<view class="right">
+						<view class="good-name clamp">{{goodsObjact.store_name}}999999999999999999999999999999999999</view>
 						<text class="price">¥{{ actionPrice }}</text>
-						<text class="stock">库存:{{ goodsObjact.stock }}件</text>
-						<view class="selected" v-if="goodsType == 0">
+						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
+						<!-- <view class="selected" v-if="goodsType == 0">
 							已选:
 							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
-						</view>
+						</view> -->
 					</view>
 				</view>
 				<view v-for="(item, index) in specList" :key="index" class="attr-list">
@@ -216,6 +216,15 @@ export default {
 		share,
 		uniNumberBox,
 		uniCountdown
+	},
+	filters: {
+		address(val) {
+			let str = ''
+			if(val) {
+				str = val[0] + ' ' + val[1]
+			}
+			return str
+		}
 	},
 	data() {
 		return {
@@ -226,7 +235,8 @@ export default {
 			goodsid: '', //商品id
 			specClass: 'none', //显示隐藏弹窗
 			shareList: [], //分享列表
-			goodsObjact: {}, //保存商品数据
+			goodsObjact: {}, //保存商品数据
+			storeObjact: {},//保存店铺数据
 			//图片循环
 			imgList: [],
 			specList: [],
@@ -414,7 +424,10 @@ export default {
 			let obj = this;
 			goodsDetail({}, this.goodsid).then(function({ data }) {
 				obj.details = data;
-				let goods = data.storeInfo;
+				let goods = data.storeInfo;
+				let store_info = data.system_store// 保存店铺信息
+				console.log(store_info)
+				obj.storeObjact = store_info
 				obj.goodsObjact = goods;
 				obj.reply = data.reply; //保存评论列表
 				obj.imgList = goods.slider_image; //保存轮播图
@@ -613,7 +626,8 @@ page {
 		display: flex;
 		justify-content: center;
 		align-content: center;
-		height: 750rpx;
+		// height: 750rpx;
+		height: 710rpx;
 		overflow: hidden;
 		image {
 			width: 100%;
@@ -976,11 +990,25 @@ page {
 			padding-left: 24rpx;
 			font-size: $font-sm + 2rpx;
 			color: $font-color-base;
-			line-height: 42rpx;
-			.price {
-				font-size: $font-lg;
-				color: $uni-color-primary;
-				margin-bottom: 10rpx;
+			line-height: 42rpx;
+			.good-name {
+				padding-top: 20rpx;
+				max-width: 320rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #1D2023;
+				line-height: 42rpx;
+				margin-bottom: 15rpx;
+			}
+			.price {
+				font-size: 60rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF6F0F;
+				// font-size: $font-lg;
+				// color: $uni-color-primary;
+				// margin-bottom: 10rpx;
 			}
 			.selected-text {
 				margin-right: 10rpx;
@@ -1069,7 +1097,8 @@ page {
 			height: 66rpx;
 			line-height: 66rpx;
 			border-radius: 100rpx;
-			background: $uni-color-primary;
+			// background: $uni-color-primary;
+			background: $base-color;
 			font-size: $font-base + 2rpx;
 			color: #fff;
 			margin: 30rpx auto 20rpx;
@@ -1112,17 +1141,17 @@ page {
 /* 底部操作菜单 */
 .page-bottom {
 	position: fixed;
-	left: 30rpx;
-	bottom: 30rpx;
+	left: 0rpx;
+	bottom: 0rpx;
 	z-index: 95;
 	display: flex;
 	justify-content: center;
 	align-items: center;
-	width: 690rpx;
-	height: 100rpx;
+	width: 750rpx;
+	height: 98rpx;
 	background: rgba(255, 255, 255, 0.9);
 	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	border-radius: 16rpx;
+	// border-radius: 16rpx;
 	.p-b-btn {
 		display: flex;
 		flex-direction: column;
@@ -1130,8 +1159,8 @@ page {
 		justify-content: center;
 		font-size: $font-sm;
 		color: $font-color-base;
-		width: 96rpx;
-		height: 80rpx;
+		width: 100rpx;
+		height: 98rpx;
 		.iconfont {
 			font-size: 40rpx;
 			line-height: 48rpx;
@@ -1151,31 +1180,32 @@ page {
 	}
 	.action-btn-group {
 		display: flex;
-		height: 76rpx;
-		border-radius: 100px;
+		height: 98rpx;
+		// border-radius: 100px;
 		overflow: hidden;
-		margin-left: 20rpx;
+		// margin-left: 20rpx;
 		position: relative;
-		&:after {
-			content: '';
-			position: absolute;
-			top: 50%;
-			right: 50%;
-			transform: translateY(-50%);
-			height: 28rpx;
-			width: 0;
-			border-right: 1px solid rgba(255, 255, 255, 0.5);
-		}
+		// &:after {
+		// 	content: '';
+		// 	position: absolute;
+		// 	top: 50%;
+		// 	right: 50%;
+		// 	transform: translateY(-50%);
+		// 	height: 28rpx;
+		// 	width: 0;
+		// 	border-right: 1px solid rgba(255, 255, 255, 0.5);
+		// }
 		.action-btn {
 			display: flex;
 			align-items: center;
 			justify-content: center;
-			width: 180rpx;
+			width: 350rpx;
 			height: 100%;
 			font-size: $font-base;
 			padding: 0;
 			border-radius: 0;
-			background: transparent;
+			// background: transparent;
+			background: #31332D;
 			&.buy-now-btn {
 				background-color: #303e49;
 			}

+ 9 - 0
static/css/cmy.css

@@ -258,6 +258,15 @@
 	text-overflow: ellipsis;
 	white-space: nowrap;
 	display: block;
+}
+
+/* 二行显示 */
+.clamp2 {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	-webkit-box-orient: vertical;
 }
 
 .common-hover {

BIN
static/icon/dhq.png


BIN
static/icon/down.png


BIN
static/icon/in1.png


BIN
static/icon/in2.png


BIN
static/icon/in3.png


BIN
static/icon/in4.png


BIN
static/icon/indexbg.png


BIN
static/icon/jf.png


BIN
static/icon/jfg.png


BIN
static/icon/jxhh.png


BIN
static/icon/searchw.png


BIN
static/icon/where.png


BIN
static/icon/xfzq.png


+ 0 - 432
static/static/css/cmy.css

@@ -1,432 +0,0 @@
-/*初始化类*/
-@font-face {
-	font-family: 'iconfont';
-	/* project id 1482221 */
-	src: url('http://at.alicdn.com/t/font_1482221_x9emymthrxs.eot');
-	src: url('http://at.alicdn.com/t/font_1482221_x9emymthrxs.eot?#iefix') format('embedded-opentype'),
-		url('http://at.alicdn.com/t/font_1482221_x9emymthrxs.woff2') format('woff2'),
-		url('http://at.alicdn.com/t/font_1482221_x9emymthrxs.woff') format('woff'),
-		url('http://at.alicdn.com/t/font_1482221_x9emymthrxs.ttf') format('truetype'),
-		url('http://at.alicdn.com/t/font_1482221_x9emymthrxs.svg#iconfont') format('svg');
-}
-
-.iconfont {
-	font-family: "iconfont" !important;
-	font-size: 34rpx;
-	font-style: normal;
-	-webkit-font-smoothing: antialiased;
-	-webkit-text-stroke-width: 0rpx;
-	-moz-osx-font-smoothing: grayscale;
-}
-
-.iconedit:before {
-	content: "\e649";
-}
-
-.iconfavorfill:before {
-	content: "\e64b";
-}
-
-.iconfavor:before {
-	content: "\e64c";
-}
-
-.iconlocation:before {
-	content: "\e651";
-}
-
-.iconroundcheckfill:before {
-	content: "\e656";
-}
-
-.iconroundcheck:before {
-	content: "\e657";
-}
-
-.iconunfold:before {
-	content: "\e661";
-}
-
-.iconlikefill:before {
-	content: "\e668";
-}
-
-.iconlike:before {
-	content: "\e669";
-}
-
-.iconshop:before {
-	content: "\e676";
-}
-
-.iconcart:before {
-	content: "\e6af";
-}
-
-.icondelete:before {
-	content: "\e6b4";
-}
-
-.iconhome:before {
-	content: "\e6b8";
-}
-
-.iconcartfill:before {
-	content: "\e6b9";
-}
-
-.iconhomefill:before {
-	content: "\e6bb";
-}
-
-.iconlock:before {
-	content: "\e6c0";
-}
-
-.iconfriendadd:before {
-	content: "\e6ca";
-}
-
-.iconfold:before {
-	content: "\e6de";
-}
-
-.iconapps:before {
-	content: "\e729";
-}
-
-.iconadd:before {
-	content: "\e767";
-}
-
-.iconmove:before {
-	content: "\e768";
-}
-
-.icontriangledownfill:before {
-	content: "\e79b";
-}
-
-.icontriangleupfill:before {
-	content: "\e79c";
-}
-
-.iconshaixuan:before {
-	content: "\e74a";
-}
-
-.iconyanzhengma:before {
-	content: "\e684";
-}
-
-.iconjifen:before {
-	content: "\e60f";
-}
-
-.iconwuliuxinxi:before {
-	content: "\e62b";
-}
-
-.iconmessage:before {
-	content: "\e78a";
-}
-
-.iconsetting:before {
-	content: "\e78e";
-}
-
-.iconaddition:before {
-	content: "\e6e0";
-}
-
-.iconclose:before {
-	content: "\e6e9";
-}
-
-.iconenter:after {
-	content: "\e6f8";
-}
-
-.iconprompt:before {
-	content: "\e71b";
-}
-
-.iconreturn:before {
-	content: "\e720";
-}
-
-.iconsearch:before {
-	content: "\e741";
-}
-
-.iconpengyouquan:before {
-	content: "\e62c";
-}
-
-.iconweixin:before {
-	content: "\e60e";
-}
-
-.iconzhifubao:before {
-	content: "\e673";
-}
-
-.iconyue:before {
-	content: "\e618";
-}
-
-.iconweixin1:before {
-	content: "\e622";
-}
-
-.iconlock1:before {
-	content: "\e64d";
-}
-
-.iconuser:before {
-	content: "\e64e";
-}
-
-.iconchenggongtixianshouyi:before {
-	content: "\e64f";
-}
-
-.iconviptuiguangdingdan:before {
-	content: "\e650";
-}
-
-.icondaifukuan:before {
-	content: "\e652";
-}
-
-.icondaijiesuanshouyi:before {
-	content: "\e653";
-}
-
-.icondaidakuanshouyi:before {
-	content: "\e654";
-}
-
-.icondaifahuo:before {
-	content: "\e655";
-}
-
-.icondaishouhuoshouyi:before {
-	content: "\e658";
-}
-
-.icondaishouhuo:before {
-	content: "\e659";
-}
-
-.iconwuxiaoshouyi:before {
-	content: "\e65a";
-}
-
-.icontixianmingxi:before {
-	content: "\e65b";
-}
-
-.iconshouyi:before {
-	content: "\e65c";
-}
-
-.iconkouchutixianshouxufei:before {
-	content: "\e65d";
-}
-
-.iconyishenqingshouyi:before {
-	content: "\e65e";
-}
-
-.icontuihuanhuo:before {
-	content: "\e65f";
-}
-
-
-/*水平线*/
-.hr {
-	width: 100%;
-	position: relative;
-	border-bottom: 1px solid #dddddd;
-	/* height: 0.5rpx; */
-}
-
-/* 一行显示 */
-.clamp {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	white-space: nowrap;
-	display: block;
-}
-
-.common-hover {
-	background: #f5f5f5;
-}
-
-/* 角标 */
-.corner{
-	background-color:#e51c23;
-	position: absolute;
-	right: -18rpx;
-	top: -18rpx;
-	color:#FFFFFF;
-	text-align: center;
-	border-radius: 999px;
-	font-size: 24rpx !important;
-	min-width: 35rpx;
-	min-height: 35rpx;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	line-height: 1;
-}
-/*文字对齐*/
-.text-left {
-	text-align: left !important;
-}
-
-.text-center {
-	text-align: center !important;
-}
-
-.text-justify {
-	text-align: justify !important;
-}
-
-.text-right {
-	text-align: right !important;
-}
-
-.text-default {
-	color: #212121 !important;
-}
-
-.text-white {
-	color: #ffffff !important;
-}
-
-.text-primary {
-	color: #00bcd4 !important;
-}
-
-.text-success {
-	color: #009688 !important;
-}
-
-.text-info {
-	color: #03a9f4 !important;
-}
-
-.text-warning {
-	color: #ffc107 !important;
-}
-
-.text-danger {
-	color: #e51c23 !important;
-}
-
-.text-pink {
-	color: #e91e63 !important;
-}
-
-.text-purple {
-	color: #673ab7 !important;
-}
-
-.text-indigo {
-	color: #3f51b5 !important;
-}
-
-.text-gray {
-	color: #999999 !important;
-}
-
-.bg-default {
-	background-color: #f5f5f5 !important;
-}
-
-.bg-primary {
-	background-color: #00bcd4 !important;
-}
-
-.bg-success {
-	background-color: #009688 !important;
-}
-
-.bg-info {
-	background-color: #03a9f4 !important;
-}
-
-.bg-warning {
-	background-color: #f1c40f !important;
-}
-
-.bg-danger {
-	background-color: #e51c23 !important;
-}
-
-.bg-pink {
-	background-color: #e91e63 !important;
-}
-
-.bg-purple {
-	background-color: #673ab7 !important;
-}
-
-.bg-indigo {
-	background-color: #3f51b5 !important;
-}
-
-.bg-white {
-	background-color: white !important;
-}
-
-.bg-gray {
-	background-color: #e3e3e3 !important;
-}
-
-/* 边框 */
-.border-radius-15 {
-	border-radius: 15rpx;
-}
-
-.border-radius-10 {
-	border-radius: 10rpx;
-}
-
-.border-radius-all {
-	border-radius: 1000rpx;
-}
-
-/* 底部边线 */
-.borde-b {
-	border-bottom: 1px solid #dddddd;
-}
-
-/* 弹性盒子 */
-.flex {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-}
-
-.items-left {
-	justify-content: flex-start;
-}
-
-.items-right {
-	justify-content: flex-end;
-}
-
-.flex-shrink-false {
-	flex-shrink: 0;
-}
-
-.flex-grow-true {
-	flex-grow: 1;
-}
-
-.position-relative {
-	position: relative;
-}

BIN
static/static/error/emptyCart.jpg


BIN
static/static/error/emptyCart.png


BIN
static/static/error/errorImage.jpg


BIN
static/static/error/missing-face.png


BIN
static/static/icon/appleIcon.png


BIN
static/static/icon/c3.png


BIN
static/static/icon/c5.png


BIN
static/static/icon/c6.png


BIN
static/static/icon/c7.png


BIN
static/static/icon/c8.png


BIN
static/static/icon/i1.png


BIN
static/static/icon/i2.png


BIN
static/static/icon/i3.png


BIN
static/static/icon/i4.png


BIN
static/static/icon/i5.png


BIN
static/static/icon/i6.png


BIN
static/static/icon/i7.png


BIN
static/static/icon/i8.png


BIN
static/static/icon/img01.png


BIN
static/static/icon/img02.png


BIN
static/static/icon/img03.png


BIN
static/static/icon/img04.png


BIN
static/static/icon/img05.png


BIN
static/static/icon/img06.png


BIN
static/static/icon/img07.png


BIN
static/static/icon/img08.png


BIN
static/static/icon/img09.png


BIN
static/static/icon/img10.png


BIN
static/static/icon/img11.png


BIN
static/static/icon/select.png


BIN
static/static/icon/selected.png


BIN
static/static/icon/u1.png


BIN
static/static/icon/u2.png


BIN
static/static/icon/u3.png


BIN
static/static/icon/u4.png


BIN
static/static/icon/u5.png


BIN
static/static/img/arc.png


BIN
static/static/img/img01.png


BIN
static/static/img/img02.png


BIN
static/static/img/img03.png


BIN
static/static/img/img05.png


BIN
static/static/img/img07.png


BIN
static/static/img/img08.png


BIN
static/static/img/img09.png


BIN
static/static/img/img10.png


BIN
static/static/img/img14.jpg


BIN
static/static/img/logo.png


BIN
static/static/img/vip-card-bg.png


BIN
static/static/tabBar/tab-cart-current.png


BIN
static/static/tabBar/tab-cart.png


BIN
static/static/tabBar/tab-cate-current.png


BIN
static/static/tabBar/tab-cate.png


BIN
static/static/tabBar/tab-home-current.png


BIN
static/static/tabBar/tab-home.png


BIN
static/static/tabBar/tab-my-current.png


BIN
static/static/tabBar/tab-my.png


BIN
static/static/xuan-popup/err.png


BIN
static/static/xuan-popup/info.png


BIN
static/static/xuan-popup/loading.png


BIN
static/static/xuan-popup/success.png


BIN
static/static/xuan-popup/warn.png


BIN
static/static/yticon.ttf


+ 1 - 1
uni.scss

@@ -4,7 +4,7 @@ $page-row-spacing: 30rpx;
 $page-color-base: #f8f8f8;//页面背景颜色
 $page-color-light: #f8f6fc;
 // 主题颜色
-$base-color: #5dbc7c;//项目颜色
+$base-color: #52C696;//项目颜色
 $box-shadow-color:#5dbc7c;//阴影颜色
 $font-color:#5dbc7c;//字体颜色
 $font-color-spec: #5dbc7c;//可操作文字颜色

Some files were not shown because too many files changed in this diff