lhl 4 年之前
父節點
當前提交
277104d36b
共有 9 個文件被更改,包括 982 次插入478 次删除
  1. 391 348
      pages.json
  2. 108 95
      pages/index/index.vue
  3. 3 10
      pages/money/pay.vue
  4. 18 18
      pages/order/createOrder.vue
  5. 1 1
      pages/product/common/productBottom.vue
  6. 5 2
      pages/product/product.vue
  7. 452 0
      pages/product/search.vue
  8. 4 4
      pages/public/login.vue
  9. 二進制
      static/image/jifen.png

+ 391 - 348
pages.json

@@ -1,377 +1,420 @@
 {
 {
-		"pages": [{
-				"path": "pages/index/index",
-				"style": {
-					"enablePullDownRefresh": true,
-					"navigationStyle": "custom",
-					"navigationBarTitleText": "商城首页"
-				}
-			},
-			{
-				"path": "pages/category/category",
-				"style": {
-					// #ifdef APP-PLUS
-					"navigationStyle": "custom",
-					// #endif
-					// #ifndef MP
-					"app-plus": {
-						"bounce": "none",
-						"titleNView": {
-							"searchInput": {
-								"backgroundColor": "rgba(231, 231, 231,.7)",
-								"borderRadius": "16px",
-								"placeholder": "商品搜索",
-								"disabled": true,
-								"placeholderColor": "#606266",
-								"align": "left"
-							}
-						}
-					},
-					// #endif
-					"navigationBarTitleText": "分类",
-					"navigationBarBackgroundColor": "#FFFFFF"
-				}
-			},
-			{
-				"path": "pages/product/product",
-				"style": {
-					"navigationBarTitleText": "详情展示",
-					"app-plus": {
-						"titleNView": {
-							"type": "transparent"
+	"pages": [{
+			"path": "pages/index/index",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "商城首页"
+			}
+		},
+		{
+			"path": "pages/category/category",
+			"style": {
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP
+				"app-plus": {
+					"bounce": "none",
+					"titleNView": {
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "商品搜索",
+							"disabled": true,
+							"placeholderColor": "#606266",
+							"align": "left"
 						}
 						}
 					}
 					}
+				},
+				// #endif
+				"navigationBarTitleText": "分类",
+				"navigationBarBackgroundColor": "#FFFFFF"
+			}
+		},
+		{
+			"path": "pages/product/product",
+			"style": {
+				"navigationBarTitleText": "详情展示",
+				"navigationBarBackgroundColor": "#FFFFFF",
+				"navigationBarTextStyle": "black",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
 				}
 				}
-			},
-			{
-				"path": "pages/cart/cart",
-				"style": {
-					"navigationBarTitleText": "购物车",
-					"navigationBarBackgroundColor": "#fff",
-					"navigationBarTextStyle": "black"
-
-				}
-			},
-			{
-				"path": "pages/user/user",
-				"style": {
-					"navigationBarTitleText": "个人中心",
-					"navigationStyle": "custom"
-				}
-			},
-			{
-				"path": "pages/user/accounts",
-				"style": {
-						"navigationBarTextStyle": "black",
-						"navigationBarBackgroundColor": "transparent",
-						"app-plus": {
-								"titleNView": {
-										"type": "float",
-										"titleText": "我的佣金"
-									}
-							}
+			}
+		},
+		{
+			"path": "pages/product/search",
+			"style": {
+				"enablePullDownRefresh": true,
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP || APP-PLUS
+				"app-plus": {
+					"titleNView": {
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "请输入关键字",
+							"disabled": false,
+							"placeholderColor": "#606266",
+							"align": "left"
+						},
+						"buttons": [{
+							"text": "搜索",
+							"fontSize": "14",
+							"color": "#303133",
+							"background": "rgba(0,0,0,0)",
+							"width": "40px"
+						}]
 					}
 					}
 				},
 				},
-				{
-					"path": "pages/user/balance",
-					"style": {
-							"navigationBarTextStyle": "black",
-							"navigationBarBackgroundColor": "transparent",
-							"app-plus": {
-									"titleNView": {
-											"type": "float",
-											"titleText": "我的钱包"
-										}
-								}
-						}
-					},
-					{
-						"path": "pages/user/integral",
-						"style": {
-								"navigationBarTextStyle": "black",
-								"navigationBarBackgroundColor": "transparent",
-								"app-plus": {
-										"titleNView": {
-												"type": "float",
-												"titleText": "我的积分"
-											}
-									}
-							}
-						},
-						{
-							"path": "pages/user/extend",
-							"style": {
-									"navigationBarTextStyle": "black",
-									"navigationBarBackgroundColor": "transparent",
-									"app-plus": {
-											"titleNView": {
-													"type": "float",
-													"titleText": "我的推广"
-												}
-										}
-								}
-							},
-			{
-				"path": "pages/user/transfer",
-				"style": {
-					"navigationBarTitleText": "佣金转账",
-					"navigationBarBackgroundColor": "#fff",
-					"navigationBarTextStyle": "black"
-			
-				}
-			},
-			{
-				"path": "pages/user/submit",
-				"style": {
-					"navigationBarTitleText": "提交成功",
-					"navigationBarBackgroundColor": "#fff",
-					"navigationBarTextStyle": "black"
-			
-				}
-			},
-			{
-				"path": "pages/user/jiedian",
-				"style": {
-					"navigationBarTitleText": "我的接点"
-				}
-			},
-			{
-				"path": "pages/user/withdraw",
-				"style": {
-					"navigationBarTitleText": "提现",
-					"navigationBarBackgroundColor": "#fff",
-					"navigationBarTextStyle": "black"
-			
-				}
-			},
-			{
-				"path": "pages/user/refer",
-				"style": {
-					"navigationBarTitleText": "提交申请",
-					"navigationBarBackgroundColor": "#fff",
-					"navigationBarTextStyle": "black"
-				}
-			},
-			{
-				"path": "pages/user/shezhi",
-				"style": {
-					"navigationBarTitleText": "设置",
-					"navigationBarBackgroundColor": "#fff",
-					"navigationBarTextStyle": "black"
-				}
-			},
-			{
-				"path": "pages/story/story",
-				"style": {
-					"navigationBarTitleText": "品牌故事",
-					"navigationBarBackgroundColor": "#fff",
-					"navigationBarTextStyle": "black"
-			
-				}
-			},
-			{
-				"path": "pages/story/storyDetail",
-				"style": {
-					// "navigationBarTitleText": "品牌故事",
-					"navigationStyle": "custom"
-				}
-			},
-			{
-				"path": "pages/order/order",
-				"style": {
-					"navigationBarTextStyle": "black",
-					"navigationBarBackgroundColor": "transparent",
-					"app-plus": {
-						"titleNView": {
-								"type": "float",
-								"titleText": "我的订单"
-							}
+				// #endif
+				"navigationBarTitleText": "搜索",
+				"navigationBarBackgroundColor": "#FFFFFF",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/cart/cart",
+			"style": {
+				"navigationBarTitleText": "购物车",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/user/user",
+			"style": {
+				"navigationBarTitleText": "个人中心",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/user/accounts",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的佣金"
 					}
 					}
 				}
 				}
-			},
-			{
-				"path": "pages/order/expressInfo",
-				"style": {
-					"navigationBarTitleText": "快递详情"
-				}
-			},
-			{
-				"path": "pages/order/orderDetail",
-				"style": {
-					"navigationBarTitleText": "订单详情",
-					"app-plus": {
-						"bounce": "none"
+			}
+		},
+		{
+			"path": "pages/user/balance",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的钱包"
 					}
 					}
 				}
 				}
-			},
-			{
-				"path": "pages/order/evaluate",
-				"style": {
-					"navigationBarTitleText": "评论"
-				}
-			},
-			{
-				"path": "pages/order/orderRefund",
-				"style": {
-					"navigationBarTitleText": "申请退款"
-				}
-			},
-			{
-				"path": "pages/order/createOrder",
-				"style": {
-					"navigationBarTitleText": "创建订单"
-				}
-			},
-			{
-				"path": "pages/set/address",
-				"style": {
-					"navigationBarTitleText": "收货地址"
-				}
-			},
-			{
-				"path": "pages/set/addressManage",
-				"style": {
-					"navigationBarTitleText": ""
+			}
+		},
+		{
+			"path": "pages/user/integral",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的积分"
+					}
 				}
 				}
-			},
-			{
-				"path": "pages/set/phone",
-				"style": {
-					"navigationBarTitleText": "实名认证"
+			}
+		},
+		{
+			"path": "pages/user/extend",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的推广"
+					}
 				}
 				}
-			},
-			{
-				"path": "pages/set/password",
-				"style": {
-					"navigationBarTitleText": "修改密码"
+			}
+		},
+		{
+			"path": "pages/user/transfer",
+			"style": {
+				"navigationBarTitleText": "佣金转账",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/user/submit",
+			"style": {
+				"navigationBarTitleText": "提交成功",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/user/jiedian",
+			"style": {
+				"navigationBarTitleText": "我的接点"
+			}
+		},
+		{
+			"path": "pages/user/withdraw",
+			"style": {
+				"navigationBarTitleText": "提现",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/user/refer",
+			"style": {
+				"navigationBarTitleText": "提交申请",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/user/shezhi",
+			"style": {
+				"navigationBarTitleText": "设置",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/story/story",
+			"style": {
+				"navigationBarTitleText": "品牌故事",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/story/storyDetail",
+			"style": {
+				// "navigationBarTitleText": "品牌故事",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/order/order",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的订单"
+					}
 				}
 				}
-			},
-			{
-				"path": "pages/set/userinfo",
-				"style": {
-					"navigationBarTitleText": "修改资料"
+			}
+		},
+		{
+			"path": "pages/order/expressInfo",
+			"style": {
+				"navigationBarTitleText": "快递详情"
+			}
+		},
+		{
+			"path": "pages/order/orderDetail",
+			"style": {
+				"navigationBarTitleText": "订单详情",
+				"navigationBarBackgroundColor": "#FFFFFF",
+				"navigationBarTextStyle": "black",
+				"app-plus": {
+					"bounce": "none"
 				}
 				}
-			},
-			{
-				"path": "pages/money/pay",
-				"style": {
-					"navigationBarTitleText": "支付"
+			}
+		},
+		{
+			"path": "pages/order/evaluate",
+			"style": {
+				"navigationBarTitleText": "评论"
+			}
+		},
+		{
+			"path": "pages/order/orderRefund",
+			"style": {
+				"navigationBarTitleText": "申请退款"
+			}
+		},
+		{
+			"path": "pages/order/createOrder",
+			"style": {
+				"navigationBarTitleText": "创建订单",
+				"navigationBarBackgroundColor": "#FFFFFF",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/set/address",
+			"style": {
+				"navigationBarTitleText": "收货地址",
+				"navigationBarBackgroundColor": "#FFFFFF",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/set/addressManage",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationBarBackgroundColor": "#FFFFFF",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/set/phone",
+			"style": {
+				"navigationBarTitleText": "实名认证"
+			}
+		},
+		{
+			"path": "pages/set/password",
+			"style": {
+				"navigationBarTitleText": "修改密码"
+			}
+		},
+		{
+			"path": "pages/set/userinfo",
+			"style": {
+				"navigationBarTitleText": "修改资料"
+			}
+		},
+		{
+			"path": "pages/money/pay",
+			"style": {
+				"navigationBarTitleText": "支付"
+			}
+		},
+		{
+			"path": "pages/money/paySuccess",
+			"style": {
+				"navigationBarTitleText": "支付成功"
+			}
+		},
+		{
+			"path": "pages/money/wallet",
+			"style": {
+				"navigationBarTitleText": "我的钱包",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
 				}
 				}
-			},
-			{
-				"path": "pages/money/paySuccess",
-				"style": {
-					"navigationBarTitleText": "支付成功"
+			}
+		},
+		{
+			"path": "pages/money/account",
+			"style": {
+				"navigationBarTitleText": "提现账号"
+			}
+		},
+		{
+			"path": "pages/money/withdrawal",
+			"style": {
+				"navigationBarTitleText": "提现"
+			}
+		},
+		{
+			"path": "pages/money/recharge",
+			"style": {
+				"navigationBarTitleText": "充值"
+			}
+		},
+		{
+			"path": "pages/public/register",
+			"style": {
+				"navigationBarTitleText": "注册",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
 				}
 				}
-			},
-			{
-				"path": "pages/money/wallet",
-				"style": {
-					"navigationBarTitleText": "我的钱包",
-					"app-plus": {
-						"titleNView": {
-							"type": "transparent"
-						}
+			}
+		}, {
+			"path": "pages/public/login",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
 					}
 					}
 				}
 				}
-			},
-			{
-				"path": "pages/money/account",
-				"style": {
-					"navigationBarTitleText": "提现账号"
+			}
+		},
+		{
+			"path": "pages/public/wxLogin",
+			"style": {
+				"navigationBarTitleText": "微信登录",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
 				}
 				}
-			},
-			{
-				"path": "pages/money/withdrawal",
-				"style": {
-					"navigationBarTitleText": "提现"
+			}
+		},
+		{
+			"path": "pages/public/forget",
+			"style": {
+				"navigationBarTitleText": "忘记密码",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
 				}
 				}
+			}
+		}
+	],
+	"tabBar": {
+		"color": "#C0C4CC",
+		"selectedColor": "#3F7C1F",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"iconPath": "static/tabBar/tab-home.png",
+				"selectedIconPath": "static/tabBar/tab-home-current.png",
+				"text": "首页"
 			},
 			},
 			{
 			{
-				"path": "pages/money/recharge",
-				"style": {
-					"navigationBarTitleText": "充值"
-				}
+				"pagePath": "pages/category/category",
+				"iconPath": "static/tabBar/tab-cate.png",
+				"selectedIconPath": "static/tabBar/tab-cate-current.png",
+				"text": "分类"
 			},
 			},
 			{
 			{
-				"path": "pages/public/register",
-				"style": {
-					"navigationBarTitleText": "注册",
-					"app-plus": {
-						"titleNView": {
-							"type": "transparent"
-						}
-					}
-				}
-			}, {
-				"path": "pages/public/login",
-				"style": {
-					"navigationBarTitleText": "登录",
-					"app-plus": {
-						"titleNView": {
-							"type": "transparent"
-						}
-					}
-				}
+				"pagePath": "pages/story/story",
+				"iconPath": "static/tabBar/tab-cart.png",
+				"selectedIconPath": "static/tabBar/tab-cart-current.png",
+				"text": "品牌故事"
 			},
 			},
 			{
 			{
-				"path": "pages/public/wxLogin",
-				"style": {
-					"navigationBarTitleText": "微信登录",
-					"app-plus": {
-						"titleNView": {
-							"type": "transparent"
-						}
-					}
-				}
+				"pagePath": "pages/cart/cart",
+				"iconPath": "static/tabBar/tab-cart.png",
+				"selectedIconPath": "static/tabBar/tab-cart-current.png",
+				"text": "购物车"
 			},
 			},
 			{
 			{
-				"path": "pages/public/forget",
-				"style": {
-					"navigationBarTitleText": "忘记密码",
-					"app-plus": {
-						"titleNView": {
-							"type": "transparent"
-						}
-					}
-				}
+				"pagePath": "pages/user/user",
+				"iconPath": "static/tabBar/tab-my.png",
+				"selectedIconPath": "static/tabBar/tab-my-current.png",
+				"text": "我的"
 			}
 			}
-		],
-		"tabBar": {
-			"color": "#C0C4CC",
-			"selectedColor": "#3F7C1F",
-			"borderStyle": "black",
-			"backgroundColor": "#ffffff",
-			"list": [{
-					"pagePath": "pages/index/index",
-					"iconPath": "static/tabBar/tab-home.png",
-					"selectedIconPath": "static/tabBar/tab-home-current.png",
-					"text": "首页"
-				},
-				{
-					"pagePath": "pages/category/category",
-					"iconPath": "static/tabBar/tab-cate.png",
-					"selectedIconPath": "static/tabBar/tab-cate-current.png",
-					"text": "分类"
-				},
-				{
-					"pagePath": "pages/story/story",
-					"iconPath": "static/tabBar/tab-cart.png",
-					"selectedIconPath": "static/tabBar/tab-cart-current.png",
-					"text": "品牌故事"
-				},
-				{
-					"pagePath": "pages/cart/cart",
-					"iconPath": "static/tabBar/tab-cart.png",
-					"selectedIconPath": "static/tabBar/tab-cart-current.png",
-					"text": "购物车"
-				},
-				{
-					"pagePath": "pages/user/user",
-					"iconPath": "static/tabBar/tab-my.png",
-					"selectedIconPath": "static/tabBar/tab-my-current.png",
-					"text": "我的"
-				}
-			]
-		}
-		}
+		]
+	}
+}

+ 108 - 95
pages/index/index.vue

@@ -12,11 +12,12 @@
 					<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
 					<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
 				</view>
 				</view>
 			</view>
 			</view>
+			<!-- 轮播图 -->
 			<swiper class="carousel" autoplay="true" :interval="5000" :duration="400">
 			<swiper class="carousel" autoplay="true" :interval="5000" :duration="400">
-				<swiper-item @click="carouselList" class="carousel-item" v-for="(item,index) in carouselList"
+				<swiper-item @click="swiperClick" class="carousel-item" v-for="(item,index) in carouselList"
 					:key="index">
 					:key="index">
 					<image :src="item.pic"></image>
 					<image :src="item.pic"></image>
-				</swiper-item <!-- 自定义swiper指示器 -->
+				</swiper-item>
 				<view class="swiper-dots">
 				<view class="swiper-dots">
 				</view>
 				</view>
 			</swiper>
 			</swiper>
@@ -33,11 +34,11 @@
 					</view>
 					</view>
 					<view class="customstext">
 					<view class="customstext">
 						<view class="customstext1">
 						<view class="customstext1">
-							<view class="customstext-title">
-								竹胎酵素健康饮
+							<view class="customstext-title clamp">
+								竹胎酵素健康饮竹胎酵素健康饮竹胎酵素健康饮
 							</view>
 							</view>
-							<view class="customstext-product">
-								健康生态饮品纯植物无香精
+							<view class="customstext-product clamp">
+								健康生态饮品纯植物无香精竹胎酵素健康饮竹胎酵素健康饮
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="customsprice">
 						<view class="customsprice">
@@ -53,35 +54,26 @@
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
-				
+
 			</view>
 			</view>
-			
+
 			<view class="customs">
 			<view class="customs">
 				<image src="../../static/image/jifen.png" mode=""></image>
 				<image src="../../static/image/jifen.png" mode=""></image>
 			</view>
 			</view>
 			<view class="jifen-content">
 			<view class="jifen-content">
-				
-				
-				
-				<view class="jifen-box">
+				<view class="jifen-box" v-for="(item,index) in bastList" :key="index" @click="navTo('/pages/product/product?id=' + item.id)">
 					<view class="img">
 					<view class="img">
-						<image src="../../static/image/jifen1.png" mode=""></image>
+						<image :src="item.image" mode=""></image>
 					</view>
 					</view>
 					<view class="jifen-list">
 					<view class="jifen-list">
 						<view class="box-title">
 						<view class="box-title">
-							<view class="top">
-								竹胎酵素健康饮
-							</view>
-							<view class="button">
-								健康生态饮品纯植物
+							<view class="top clamp2">
+								{{item.store_name}}
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="box-price">
 						<view class="box-price">
-							<view class="pricebox">
-								<image src="../../static/image/search.png" mode=""></image>
-							</view>
 							<view class="price-left">
 							<view class="price-left">
-								2690
+								¥2690
 							</view>
 							</view>
 							<view class="price-right">
 							<view class="price-right">
 								¥360
 								¥360
@@ -91,14 +83,15 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
+	<!-- 	
 		<view class="fiexd">
 		<view class="fiexd">
 			<image src="../../static/image/background03.png" mode=""></image>
 			<image src="../../static/image/background03.png" mode=""></image>
-		</view>
+		</view> -->
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
 	// import seckill from '../../components/seckill/seckill.vue';
 	// import seckill from '../../components/seckill/seckill.vue';
-	// import { loadIndexs } from '@/api/index.js';
+	import { loadIndexs } from '@/api/index.js';
 	// import { getUserInfo } from '@/api/user.js';
 	// import { getUserInfo } from '@/api/user.js';
 	// import { setCoupons } from '@/api/functionalUnit.js';
 	// import { setCoupons } from '@/api/functionalUnit.js';
 	// import { getBargainList } from '@/api/product.js';
 	// import { getBargainList } from '@/api/product.js';
@@ -129,41 +122,54 @@
 				}
 				}
 			},
 			},
 			// 初次加载页面高度时修改页面高度
 			// 初次加载页面高度时修改页面高度
-			bastList(newValue, oldValue) {
-				let obj = this;
-				let bHeight = Math.ceil(newValue.length / 2);
-				obj.$nextTick(function() {
-					uni.createSelectorQuery()
-						.select('#list-box')
-						.fields({
-								size: true
-							},
-							function(data) {
-								obj.pageProportion = data.width / 750;
-								obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
-							}
-						)
-						.exec();
-				});
-			}
+			
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				carouselList: [{
-						pic: '../../static/image/background02.png'
-					},
-					{
-						pic: '../../static/image/baodan.png'
-					}
-				], //轮播列表
-				page: 1,
-				limit: 5,
-
-			};
+				carouselList: [], //轮播列表
+				couponArray: '',
+				bastList: [],//精品推荐
+			}
+		},
+		onLoad() {
+			this.loadData()
 		},
 		},
 		methods: {
 		methods: {
-			carouselList(item) {
-
+			// 请求载入数据
+			async loadData() {
+				loadIndexs({})
+					.then(({ data }) => {
+						console.log(data,'dddd')
+						let goods = data.info;
+						this.carouselList = data.banner;
+						this.swiperLength = this.carouselList.length;
+						this.menusList = data.menus;
+						this.goodsList = goods.firstList; //最新商品
+						this.bastList = goods.bastList; //精品推荐
+						console.log(this.bastList, 'this.bastList6666666666666666666666');
+						this.bastBanner = data.benefit; //促销单品
+						this.$set(this, 'couponArray', data.couponList); //保存卡包券
+			
+						uni.stopPullDownRefresh();
+					})
+					.catch(e => {
+						uni.stopPullDownRefresh();
+					});
+			},
+			swiperClick() {
+				
+			},
+			// 点击搜索框
+			clickSearch() {
+				console.log('点击')
+				uni.navigateTo({
+					url: '/pages/product/search'
+				});
+			},
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
 			}
 			}
 		}
 		}
 
 
@@ -172,10 +178,7 @@
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 	page {
 	page {
-		margin: 0;
-		padding: 0;
-		height: 100%;
-
+		height: auto;
 		background-color: #D4FDF9;
 		background-color: #D4FDF9;
 	}
 	}
 
 
@@ -197,17 +200,17 @@
 		}
 		}
 	}
 	}
 
 
-	.fiexd {
-		position: fiexd;
-		bottom: 0;
-		width: 750rpx;
-		height: 750rpx;
+	// .fiexd {
+	// 	position: fiexd;
+	// 	bottom: 0;
+	// 	width: 750rpx;
+	// 	height: 750rpx;
 
 
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
+	// 	image {
+	// 		width: 100%;
+	// 		height: 100%;
+	// 	}
+	// }
 
 
 	.content {
 	.content {
 		flex-direction: column;
 		flex-direction: column;
@@ -294,40 +297,45 @@
 				.customstext {
 				.customstext {
 					margin-left: 14rpx;
 					margin-left: 14rpx;
 					height: 200rpx;
 					height: 200rpx;
-					display: flex;
-					flex-direction: column;
-					justify-content: space-around;
-
+					// display: flex;
+					// flex-direction: column;
+					// justify-content: space-around;
+					position: relative;
 					.customstext1 {
 					.customstext1 {
 						.customstext-title {
 						.customstext-title {
+							width: 350rpx;
 							font-size: 34rpx;
 							font-size: 34rpx;
 							font-family: PingFang SC;
 							font-family: PingFang SC;
 							font-weight: bold;
 							font-weight: bold;
 							color: #3F7C1F;
 							color: #3F7C1F;
-							line-height: 20rpx;
+							
 						}
 						}
 
 
 						.customstext-product {
 						.customstext-product {
-							margin-top: 25rpx;
+							// margin-top: 25rpx;
+							width: 400rpx;
+							padding-top: 10rpx;
 							font-size: 26rpx;
 							font-size: 26rpx;
 							font-family: PingFang SC;
 							font-family: PingFang SC;
 							font-weight: bold;
 							font-weight: bold;
 							color: #ABD56F;
 							color: #ABD56F;
-							line-height: 20rpx;
 						}
 						}
 					}
 					}
 
 
 					.customsprice {
 					.customsprice {
+						position: absolute;
+						bottom: 0;
+						left: 0;
 						display: flex;
 						display: flex;
 						align-items: center;
 						align-items: center;
-						justify-content: space-between;
-
+						justify-content: flex-start;
+						width: 100%;
 						.customsprice-left {
 						.customsprice-left {
 							font-size: 28rpx;
 							font-size: 28rpx;
 							font-family: PingFang SC;
 							font-family: PingFang SC;
 							font-weight: 500;
 							font-weight: 500;
 							color: #FF0000;
 							color: #FF0000;
-							line-height: 20rpx;
+							flex-shrink: 0;
 						}
 						}
 
 
 						.customsprice-between {
 						.customsprice-between {
@@ -335,22 +343,23 @@
 							font-family: PingFang SC;
 							font-family: PingFang SC;
 							font-weight: 500;
 							font-weight: 500;
 							color: #FF0000;
 							color: #FF0000;
-							line-height: 20rpx;
+							flex-shrink: 0;
 						}
 						}
 
 
 						.customsprice-right {
 						.customsprice-right {
-							margin-left: 80rpx;
-							display: flex;
-							justify-content: center;
-							align-items: center;
+							text-align: center;
 							width: 137rpx;
 							width: 137rpx;
 							height: 52rpx;
 							height: 52rpx;
+							line-height: 52rpx;
 							background: #3F7C1F;
 							background: #3F7C1F;
 							border-radius: 26rpx;
 							border-radius: 26rpx;
 							font-size: 26rpx;
 							font-size: 26rpx;
 							font-family: PingFang SC;
 							font-family: PingFang SC;
 							font-weight: 400;
 							font-weight: 400;
 							color: #FFFFFF;
 							color: #FFFFFF;
+							position: absolute;
+							right: 0;
+							bottom: 0;
 						}
 						}
 					}
 					}
 				}
 				}
@@ -358,44 +367,47 @@
 		}
 		}
 
 
 		.jifen-content {
 		.jifen-content {
-			
 			width: 700rpx;
 			width: 700rpx;
+			padding-bottom: 20rpx;
 			display: flex;
 			display: flex;
-
 			flex-wrap: wrap;
 			flex-wrap: wrap;
-			justify-content: space-around;
-
-
+			justify-content: space-between;
 			.jifen-box {
 			.jifen-box {
 				margin: 20rpx 0;
 				margin: 20rpx 0;
 				display: flex;
 				display: flex;
 				flex-direction: column;
 				flex-direction: column;
 				align-items: center;
 				align-items: center;
-				width: 336rpx;
+				width: 342rpx;
 				height: 512rpx;
 				height: 512rpx;
+				padding-top: 20rpx;
 				background: #E6FCFA;
 				background: #E6FCFA;
 				box-shadow: 0px 7px 10px 1px #8BAFAB;
 				box-shadow: 0px 7px 10px 1px #8BAFAB;
 				.img {
 				.img {
-					margin-top: 20rpx;
+					flex-shrink: 0;
+					// margin-top: 20rpx;
 					height: 312rpx;
 					height: 312rpx;
 					width: 312rpx;
 					width: 312rpx;
+					background-color: #eee;
 					image {
 					image {
 						height: 100%;
 						height: 100%;
 						width: 100%;
 						width: 100%;
 					}
 					}
 				}
 				}
 				.jifen-list {
 				.jifen-list {
-					margin-left: -80rpx;
+					// margin-left: -80rpx;
+					width: 312rpx;
+					height: 100%;
+					position: relative;
 					.box-title {
 					.box-title {
 						.top {
 						.top {
-							padding: 20rpx 0 10rpx 0;
+							margin: 20rpx 0 10rpx 0;
+							// padding: 20rpx 0 10rpx 0;
 							font-size: 30rpx;
 							font-size: 30rpx;
 							font-family: PingFang SC;
 							font-family: PingFang SC;
 							font-weight: bold;
 							font-weight: bold;
 							color: #3F7C1F;
 							color: #3F7C1F;
 							line-height: 35rpx;
 							line-height: 35rpx;
 						}
 						}
-
 						.button {
 						.button {
 							padding-bottom: 20rpx;
 							padding-bottom: 20rpx;
 							font-size: 26rpx;
 							font-size: 26rpx;
@@ -409,15 +421,17 @@
 					.box-price {
 					.box-price {
 						display: flex;
 						display: flex;
 						align-items: center;
 						align-items: center;
+						position: absolute;
+						bottom: 20rpx;
 						.pricebox {
 						.pricebox {
 							height: 25rpx;
 							height: 25rpx;
 							width: 25rpx;
 							width: 25rpx;
+
 							image {
 							image {
 								height: 100%;
 								height: 100%;
 								width: 100%;
 								width: 100%;
 							}
 							}
 						}
 						}
-
 						.price-left {
 						.price-left {
 							font-size: 36rpx;
 							font-size: 36rpx;
 							font-family: PingFang SC;
 							font-family: PingFang SC;
@@ -425,7 +439,6 @@
 							color: #FF0000;
 							color: #FF0000;
 							line-height: 35rpx;
 							line-height: 35rpx;
 						}
 						}
-
 						.price-right {
 						.price-right {
 							font-size: 26rpx;
 							font-size: 26rpx;
 							font-family: PingFang SC;
 							font-family: PingFang SC;

+ 3 - 10
pages/money/pay.vue

@@ -61,7 +61,7 @@ export default {
 			payType: 3,
 			payType: 3,
 			payName: 'yue',
 			payName: 'yue',
 			// #endif
 			// #endif
-			orderInfo: {},
+			// orderInfo: {},
 			money: 0.0, //订单金额
 			money: 0.0, //订单金额
 			now_money: 0.0, //余额
 			now_money: 0.0, //余额
 			orderKey: '',
 			orderKey: '',
@@ -74,7 +74,6 @@ export default {
 			pinkid: '', //保存拼团商品id
 			pinkid: '', //保存拼团商品id
 			checkedAuto: 0, //判断是否为自动拼团
 			checkedAuto: 0, //判断是否为自动拼团
 			topify: '',
 			topify: '',
-			is_drop: '',
 		};
 		};
 	},
 	},
 	computed: {
 	computed: {
@@ -84,9 +83,6 @@ export default {
 		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
 		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {
-		if(options.isdrop) {
-			this.is_drop = options.isdrop
-		}
  		this.checkedAuto = options.checked || 0;
  		this.checkedAuto = options.checked || 0;
 		this.topify = options.topify || 0;
 		this.topify = options.topify || 0;
 		if (options.type == 1) {
 		if (options.type == 1) {
@@ -100,8 +96,7 @@ export default {
 				orderkey: this.orderKey,
 				orderkey: this.orderKey,
 				couponId: prepage.couponChecked.id, //优惠券编号
 				couponId: prepage.couponChecked.id, //优惠券编号
 				addressId: prepage.addressData.id, //地址编号
 				addressId: prepage.addressData.id, //地址编号
-				useIntegral: prepage.checkedPoints ? 1 : 0,
-				is_drop: this.is_drop
+				useIntegral: prepage.checkedPoints ? 1 : 0
 			}).then(({ data }) => {
 			}).then(({ data }) => {
 				// 获取支付金额
 				// 获取支付金额
 				this.money = data.result.pay_price;
 				this.money = data.result.pay_price;
@@ -154,7 +149,6 @@ export default {
 				from: 'app', //来源
 				from: 'app', //来源
 				// #endif
 				// #endif
 				paytype: obj.payName ,//支付类型  weixin-微信 yue-余额
 				paytype: obj.payName ,//支付类型  weixin-微信 yue-余额
-				is_drop: obj.is_drop
 			})
 			})
 				.then(e => {
 				.then(e => {
 					console.log(e,'zhifu+++++++++')
 					console.log(e,'zhifu+++++++++')
@@ -284,8 +278,7 @@ export default {
 				// #endif
 				// #endif
 				shipping_type: 1, //提货方式 1 快递 2自提
 				shipping_type: 1, //提货方式 1 快递 2自提
 				automatic: obj.checkedAuto,
 				automatic: obj.checkedAuto,
-				topify: this.topify,
-				is_drop: obj.is_drop
+				topify: this.topify
 			};
 			};
 			// 判断是否拼团商品
 			// 判断是否拼团商品
 			if (obj.pinkid) {
 			if (obj.pinkid) {

+ 18 - 18
pages/order/createOrder.vue

@@ -46,10 +46,10 @@
 			</view>
 			</view>
 
 
 			<image class="a-bg" :src="addressImg"></image>
 			<image class="a-bg" :src="addressImg"></image>
-		</navigator> -->
+		</navigator> -->
 		<!-- 选择安装位置 -->
 		<!-- 选择安装位置 -->
-	<!-- 	<view class="">
-			选择安装地址
+	<!-- 	<view class="">
+			选择安装地址
 		</view> -->
 		</view> -->
 		<view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
 		<view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
 			<!-- <view class="g-header b-b">
 			<!-- <view class="g-header b-b">
@@ -96,10 +96,10 @@
 				<text class="cell-tit clamp">优惠金额</text>
 				<text class="cell-tit clamp">优惠金额</text>
 				<text class="cell-tip red">-¥35</text>
 				<text class="cell-tip red">-¥35</text>
 			</view> -->
 			</view> -->
-			<!-- <view class="yt-list-cell b-b">
+			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
 				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
 				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
 				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
-			</view> -->
+			</view>
 			
 			
 			<view class="yt-list-cell b-b">
 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">备注</text>
 				<text class="cell-tit clamp">备注</text>
@@ -110,15 +110,15 @@
 			<view class="yt-list-cell b-b">
 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">商品总价</text>
 				<text class="cell-tit clamp">商品总价</text>
 				<text class="cell-tip">¥{{ payAllMoney }}</text>
 				<text class="cell-tip">¥{{ payAllMoney }}</text>
+			</view>
+			<view class="yt-list-cell b-b">
+				<text class="cell-tit clamp">运费</text>
+				<text class="cell-tip">{{ Postage }}</text>
 			</view>
 			</view>
-			<view class="yt-list-cell b-b">
-				<text class="cell-tit clamp">运费</text>
-				<text class="cell-tip">{{ Postage }}</text>
-			</view>
-			<!-- <view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
+			<view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
 				<text class="cell-tit clamp">积分抵扣</text>
 				<text class="cell-tit clamp">积分抵扣</text>
 				<text class="cell-tip">-¥{{ integralMoney }}</text>
 				<text class="cell-tip">-¥{{ integralMoney }}</text>
-			</view> -->
+			</view>
 			<view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
 			<view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
 				<text class="cell-tit clamp">会员折扣</text>
 				<text class="cell-tit clamp">会员折扣</text>
 				<text class="cell-tip">-¥{{ moneyAll.vipPrice }}</text>
 				<text class="cell-tip">-¥{{ moneyAll.vipPrice }}</text>
@@ -216,7 +216,7 @@ export default {
 			integralMoney: 0, //积分抵扣金额
 			integralMoney: 0, //积分抵扣金额
 			integralShow: false, //是否显示积分抵扣金额
 			integralShow: false, //是否显示积分抵扣金额
 			payType: true, //是否可支付
 			payType: true, //是否可支付
-			pinkid: '', //保存拼团商品id
+			pinkid: '', //保存拼团商品id
 			isdrop: 0,
 			isdrop: 0,
 		};
 		};
 	},
 	},
@@ -229,10 +229,10 @@ export default {
 			// 保存当前商品在购物车中的id
 			// 保存当前商品在购物车中的id
 			this.cartId = option.id;
 			this.cartId = option.id;
 			this.loadData();
 			this.loadData();
-		}
-		if(option.isdrop) {
-			this.isdrop = option.isdrop*1
-			console.log(this.isdrop,)
+		}
+		if(option.isdrop) {
+			this.isdrop = option.isdrop*1
+			console.log(this.isdrop,)
 		}
 		}
 		this.userinfo();
 		this.userinfo();
 	},
 	},
@@ -289,7 +289,7 @@ export default {
 				orderkey: this.orderKey,
 				orderkey: this.orderKey,
 				useIntegral: this.checkedPoints ? 1 : 0, //是否积分抵扣
 				useIntegral: this.checkedPoints ? 1 : 0, //是否积分抵扣
 				couponId: this.couponChecked.id, //优惠券编号
 				couponId: this.couponChecked.id, //优惠券编号
-				addressId: this.addressData.id ,//地址编号
+				addressId: this.addressData.id ,//地址编号
 				is_drop: this.isdrop
 				is_drop: this.isdrop
 			})
 			})
 				.then(({ data }) => {
 				.then(({ data }) => {
@@ -367,7 +367,7 @@ export default {
 			if (!this.addressData.real_name) {
 			if (!this.addressData.real_name) {
 				this.$api.msg('请选择收货地址');
 				this.$api.msg('请选择收货地址');
 				return false;
 				return false;
-			}
+			}
 			console.log(this.isdrop,'dddddddddddddddddddddddddd')
 			console.log(this.isdrop,'dddddddddddddddddddddddddd')
 			let url =  '/pages/money/pay?key='+ this.orderKey + '&isdrop=' + this.isdrop
 			let url =  '/pages/money/pay?key='+ this.orderKey + '&isdrop=' + this.isdrop
 			if(this.pinkid){
 			if(this.pinkid){

+ 1 - 1
pages/product/common/productBottom.vue

@@ -48,7 +48,7 @@ export default {
 	justify-content: center;
 	justify-content: center;
 	align-items: center;
 	align-items: center;
 	width: 750rpx;
 	width: 750rpx;
-	height: 120rpx;
+	height: 97rpx;
 	background-color: #ffffff;
 	background-color: #ffffff;
 	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
 	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
 	border-radius: 16rpx; */
 	border-radius: 16rpx; */

+ 5 - 2
pages/product/product.vue

@@ -220,7 +220,10 @@
 			obj.userInfo = uni.getStorageSync('userInfo');
 			obj.userInfo = uni.getStorageSync('userInfo');
 			//保存商品id
 			//保存商品id
 			this.goodsid = options.id;
 			this.goodsid = options.id;
-			this.goodsType = options.type * 1;
+			if(options.type) {
+				this.goodsType = options.type * 1;
+			}
+			
 			if (this.goodsType == 2) {
 			if (this.goodsType == 2) {
 				this.showAdd = false
 				this.showAdd = false
 				console.log('不显示', this.showAdd)
 				console.log('不显示', this.showAdd)
@@ -826,7 +829,7 @@
 
 
 	//秒杀、拼团底部高度
 	//秒杀、拼团底部高度
 	.contentBottomHeight {
 	.contentBottomHeight {
-		height: 130rpx;
+		height: 120rpx;
 	}
 	}
 
 
 	//默认商品底部高度
 	//默认商品底部高度

+ 452 - 0
pages/product/search.vue

@@ -0,0 +1,452 @@
+<template>
+	<view class="content">
+		<!-- 兼容小程序搜索 -->
+		<!-- #ifdef MP || APP-PLUS -->
+		<view class="vheight"></view>
+		<view class="input-box flex">
+			<view class=" input-content flex">
+				<view class="iconfont iconsearch"></view>
+				<view class="input"><input type="text" v-model="keyword" placeholder="请输入搜索内容" /></view>
+			</view>
+			<view class="input-button flex" @click="navTo"><text>搜索</text></view>
+		</view>
+		<!-- #endif -->
+		<swiper :current="tabCurrentIndex" class="swiper-box " duration="300">
+			<swiper-item class="search-hot">
+				<view class="title"><text>热门搜索</text></view>
+				<view class="hot-list">
+					<view @click="clickHotText(ls)" class="list-item" :key="ind" v-for="(ls, ind) in list">
+						<text>{{ ls }}</text>
+					</view>
+				</view>
+			</swiper-item>
+			<swiper-item class="search-hot position-relative">
+				<view class="navbar">
+					<view class="nav-item" @click="defaultSearch()">默认</view>
+					<view class="nav-item" :class="{ current: searchType === 1 }" @click="sortTab(1)">
+						<text>销量优先</text>
+						<view class="p-box">
+							<text :class="{ active: searchType === 1 && numberOrder === 1 }" class="iconfont iconfold"></text>
+							<text :class="{ active: searchType === 1 && numberOrder === 2 }" class="iconfont iconfold xia"></text>
+						</view>
+					</view>
+					<view class="nav-item" :class="{ current: searchType === 2 }" @click="sortTab(2)">
+						<text>价格</text>
+						<view class="p-box">
+							<text :class="{ active: searchType === 2 && priceOrder === 1 }" class="iconfont iconfold"></text>
+							<text :class="{ active: searchType === 2 && priceOrder === 2 }" class="iconfont iconfold xia"></text>
+						</view>
+					</view>
+					<view class="nav-item" :class="{ current: newOrder == 1 }" @click="newGoodsTab()">新品</view>
+				</view>
+				<scroll-view scroll-y class="cate-list" @scrolltolower='getProducts'>
+					<view class="guess-section">
+						<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
+							<view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
+							<text class="title clamp margin-c-20">{{ item.store_name }}</text>
+							<view class="cmy-hr"></view>
+							<view class="price margin-c-20 flex">
+								<view>
+									<text class="font-size-sm ">¥</text>
+									{{ item.price }}
+								</view>
+								<view class="font-size-sm">
+									<text class="font-color-gray">{{ item.sales }}人购买</text>
+								</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import { searchKeyword, getProducts } from '@/api/product.js';
+export default {
+	components: {
+		uniLoadMore
+	},
+	data() {
+		return {
+			arrlist: [], //热门关键词
+			keyword: '', //关键字
+			list: [], //搜索内容
+			tabCurrentIndex: 0, //切换
+			goodsList: [],
+			limit: 6, //每次加载数据条数
+			page: 1, //当前页数
+			loadingType: 'more', //加载更多状态
+			numberOrder: 1, //1 销量从低到高 2销量从高到低
+			priceOrder: 1, //1 价格从低到高 2价格从高到低
+			newOrder: 0, //0 不是新品 1是新品
+			searchType: 0 //0为默认查询 1为销量 2 为价格
+		};
+	},
+	// #ifndef MP
+	//点击导航栏 buttons 时触发
+	onNavigationBarButtonTap(e) {
+		const index = e.index;
+		if (index === 0) {
+			this.navTo();
+		}
+	},
+	// 点击键盘搜索事件
+	onNavigationBarSearchInputConfirmed(e) {
+		this.navTo();
+	},
+	// 搜索栏内容变化事件
+	onNavigationBarSearchInputChanged(e) {
+		this.keyword = e.text;
+	},
+	// #endif
+	onLoad() {
+		this.loadData();
+	},
+	//下拉刷新
+		onPullDownRefresh() {
+			this.page = 1
+			this.getProducts('refresh');
+		},
+	methods: {
+		// 加载商品
+		async getProducts(type, loading) {
+			let obj = this;
+			// 判断是否为加载数据
+			if (type !== 'refresh') {
+				//没有更多数据直接跳出方法
+				if (obj.loadingType === 'nomore') {
+					return;
+				} else {
+					// 设置当前为数据载入中
+					obj.loadingType = 'loading';
+				}
+			} else {
+				//当重新加载数据时更新状态为可继续添加数据
+				obj.loadingType = 'more';
+			}
+			let data = {
+				page: obj.page,
+				limit: obj.limit,
+				news: obj.newOrder,
+				keyword: this.keyword
+			};
+			// 判断是否为销售数量排序
+			if (this.searchType === 1) {
+				data.salesOrder = obj.numberOrder === 1 ? 'asc' : 'desc';
+			}
+			// 判断是否为金额排序
+			if (this.searchType === 2) {
+				data.priceOrder = obj.priceOrder === 1 ? 'asc' : 'desc';
+			}
+			getProducts(data).then(e => {
+				if (type === 'refresh') {
+					obj.goodsList = [];
+				}
+				obj.goodsList = obj.goodsList.concat(e.data);
+				//判断是否还有下一页,有是more  没有是nomore
+				if (obj.limit == e.data.length) {
+					obj.page++;
+					obj.loadingType = 'more';
+				} else {
+					obj.loadingType = 'nomore';
+				}
+				// 判断是否为刷新数据
+				if (type === 'refresh') {
+					// 判断是否为点击搜索按钮跳转加载
+					if (loading == 1) {
+						uni.hideLoading();
+					} else {
+						uni.stopPullDownRefresh();
+					}
+				}
+			});
+		},
+		// 点击关键词触发事件
+		clickHotText(e) {
+			this.keyword = e;
+			this.navTo();
+		},
+		// 加载搜索关键字
+		async loadData() {
+			searchKeyword({})
+				.then(e => {
+					this.list = e.data;
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 点击触发搜索事件
+		navTo() {
+			this.tabCurrentIndex = 1;
+			this.infoData()
+		},
+		// 默认搜索
+		defaultSearch() {
+			// 初始化查询
+			this.numberOrder = '';
+			this.priceOrder = '';
+			this.newOrder = 0;
+			this.searchType = 0;
+			this.infoData();
+		},
+		// 是否为新品
+		newGoodsTab() {
+			this.newOrder = this.newOrder === 1 ? 0 : 1;
+			this.infoData();
+		},
+		// 排序
+		sortTab(nub) {
+			this.searchType = nub;
+			if (this.searchType === 1) {
+				this.numberOrder = this.numberOrder === 1 ? 2 : 1;
+			}
+			if (this.searchType === 2) {
+				this.priceOrder = this.priceOrder === 1 ? 2 : 1;
+			}
+			this.infoData();
+		},
+		// 查询切换后初始化
+		infoData() {
+			// 初始化页数
+			this.page = 1;
+			// 初始化数组
+			uni.pageScrollTo({
+				duration: 300,
+				scrollTop: 0
+			});
+			// 加载数据
+			this.getProducts('refresh', 1);
+			uni.showLoading({
+				title: '正在加载'
+			});
+		},
+		navToDetailPage(item) {
+			//测试数据没有写id,用title代替
+			let id = item.id;
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + id
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	height: 100%;
+	background-color: $page-color-base;
+}
+/* #ifdef MP || APP-PLUS */
+.vheight{
+	height: var(--status-bar-height);
+	background-color: #FFFFFF;
+}
+.input-box {
+	padding: 25rpx;
+	background-color: #ffffff;
+	height: 44px;
+	.iconsearch {
+		font-size: 50rpx;
+	}
+	.input-content {
+		border-radius: 99rpx;
+		flex-grow: 1;
+		padding: 10rpx 30rpx;
+		background-color: rgba(231, 231, 231, 0.7);
+		.input {
+			flex-grow: 1;
+			input {
+				font-size: $font-lg;
+			}
+		}
+	}
+	.input-button {
+		padding-left: 20rpx;
+		font-size: $font-lg;
+		height: 100%;
+	}
+}
+/* #endif */
+
+.swiper-box {
+	/* #ifndef MP */
+	height: 100%;
+	/* #endif */
+	/* #ifdef MP */
+	height: calc(100% - 44px);
+	/* #endif */
+	.search-hot {
+		padding: 25rpx;
+		.title {
+			font-size: $font-lg;
+			color: $font-color-light;
+		}
+		.hot-list {
+			display: flex;
+			flex-wrap: wrap;
+			margin-top: 30rpx;
+			.list-item {
+				padding: 10rpx 20rpx;
+				border: 1px solid $border-color-dark;
+				color: $font-color-dark;
+				font-size: $font-base;
+				margin-right: 20rpx;
+				margin-bottom: 20rpx;
+			}
+		}
+	}
+}
+
+// 订单
+%icon {
+	margin-right: 10rpx;
+	display: inline-block;
+	padding: 2rpx 10rpx;
+	border: 1rpx solid $color-yellow;
+	color: $color-yellow;
+	line-height: 1;
+	font-size: $font-base;
+	border-radius: 10rpx;
+}
+.guess-section {
+	display: flex;
+	flex-wrap: wrap;
+	.guess-item {
+		overflow: hidden;
+		display: flex;
+		flex-direction: column;
+		width: 48%;
+		margin-bottom: 4%;
+		border-radius: $border-radius-sm;
+		background-color: white;
+		box-shadow: $box-shadow;
+		&:nth-child(2n + 1) {
+			margin-right: 4%;
+		}
+	}
+	.image-wrapper {
+		width: 100%;
+		height: 330rpx;
+		border-radius: 3px;
+		overflow: hidden;
+		image {
+			width: 100%;
+			height: 100%;
+			opacity: 1;
+		}
+	}
+	.title {
+		font-size: $font-base;
+		color: $font-color-dark;
+		font-weight: bold;
+		line-height: 80rpx;
+	}
+	.price {
+		font-size: $font-lg;
+		color: $font-color-base;
+		font-weight: bold;
+		line-height: 1;
+		line-height: 80rpx;
+	}
+
+	.icon {
+		@extend %icon;
+	}
+
+	.detail {
+		line-height: 1;
+	}
+	.tip {
+		color: white;
+		background-color: $color-yellow;
+		line-height: 1.5;
+		font-size: $font-sm;
+		padding-left: 20rpx;
+	}
+}
+
+.navbar {
+	position: absolute;
+	top: 0;
+	left: 0;
+	display: flex;
+	width: 100%;
+	height: 40px;
+	background: #fff;
+	box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 30rpx;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 120rpx;
+				height: 0;
+				border-bottom: 4rpx solid $base-color;
+			}
+		}
+	}
+	.p-box {
+		display: flex;
+		flex-direction: column;
+		.iconfont {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 30rpx;
+			height: 14rpx;
+			line-height: 1;
+			margin-left: 4rpx;
+			font-size: 26rpx;
+			color: #888;
+			&.active {
+				color: $base-color;
+			}
+		}
+		.xia {
+			transform: scaleY(-1);
+		}
+	}
+	.cate-item {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		width: 80rpx;
+		position: relative;
+		font-size: 44rpx;
+		&:after {
+			content: '';
+			position: absolute;
+			left: 0;
+			top: 50%;
+			transform: translateY(-50%);
+			border-left: 1px solid #ddd;
+			width: 0;
+			height: 36rpx;
+		}
+	}
+}
+.cate-list {
+	height: 100%;
+	padding-top: 40px;
+}
+</style>

+ 4 - 4
pages/public/login.vue

@@ -294,7 +294,7 @@ page {
 	width: 100%;
 	width: 100%;
 	height: 500rpx;
 	height: 500rpx;
 	top: 0rpx;
 	top: 0rpx;
-	background-color: #ff4c4c;
+	background-color: #6EAB4E;
 	.banner-img {
 	.banner-img {
 		width: 100%;
 		width: 100%;
 		height: 100%;
 		height: 100%;
@@ -360,15 +360,15 @@ page {
 
 
 	.uni-button-green {
 	.uni-button-green {
 		color: #ffffff;
 		color: #ffffff;
-		background-color: #ff4c4c;
+		background-color: #6EAB4E;
 		margin: 40rpx 10rpx;
 		margin: 40rpx 10rpx;
 		border-radius: 50rpx;
 		border-radius: 50rpx;
 	}
 	}
 	.uni-button-green-plain {
 	.uni-button-green-plain {
-		border: 1px solid #ff4c4c;
+		border: 1px solid #6EAB4E;
 		margin: 40rpx 10rpx;
 		margin: 40rpx 10rpx;
 		border-radius: 50rpx;
 		border-radius: 50rpx;
-		color: #ff4c4c;
+		color: #6EAB4E;
 		background-color: #ffffff;
 		background-color: #ffffff;
 	}
 	}
 	.uni-button {
 	.uni-button {

二進制
static/image/jifen.png