Browse Source

添加二级分类里的列表

LXT-NJ\Admin 1 year ago
parent
commit
b84e35fdc2
3 changed files with 224 additions and 85 deletions
  1. 60 51
      pages.json
  2. 9 34
      pages/gengduo/index.vue
  3. 155 0
      pages/sort/index.vue

+ 60 - 51
pages.json

@@ -6,7 +6,7 @@
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -15,7 +15,7 @@
 			"path": "pages/wardrobe/index",
 			"style": {
 				"navigationBarTitleText": "衣厨",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -24,7 +24,7 @@
 			"path": "pages/dapei/index",
 			"style": {
 				"navigationBarTitleText": "消息",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -33,7 +33,7 @@
 			"path": "pages/shop/index",
 			"style": {
 				"navigationBarTitleText": "商场",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -42,7 +42,7 @@
 			"path": "pages/user/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -51,7 +51,7 @@
 			"path": "pages/shouye/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -60,7 +60,7 @@
 			"path": "pages/putstorage/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -69,7 +69,7 @@
 			"path": "pages/registered/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -78,7 +78,7 @@
 			"path": "pages/login/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -87,7 +87,7 @@
 			"path": "pages/xieyi/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -96,7 +96,7 @@
 			"path": "pages/zhaohui/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -105,7 +105,7 @@
 			"path": "pages/zhtijiao/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -114,7 +114,7 @@
 			"path": "pages/chuanghome/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -123,7 +123,7 @@
 			"path": "pages/qiehuan/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -132,7 +132,7 @@
 			"path": "pages/sousuo/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -141,7 +141,7 @@
 			"path": "pages/fankui/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -150,7 +150,7 @@
 			"path": "pages/xiaoxi/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -159,7 +159,7 @@
 			"path": "pages/yifu/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -168,7 +168,7 @@
 			"path": "pages/luru/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -177,7 +177,7 @@
 			"path": "pages/quchu/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -186,7 +186,7 @@
 			"path": "pages/gouwuche/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -195,7 +195,7 @@
 			"path": "pages/gengduo/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -204,7 +204,7 @@
 			"path": "pages/shopsoso/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -213,7 +213,7 @@
 			"path": "pages/weizhi/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -222,7 +222,7 @@
 			"path": "pages/shouyedetail/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -231,7 +231,7 @@
 			"path": "pages/guanzhu/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -240,7 +240,7 @@
 			"path": "pages/dingdan/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -249,7 +249,7 @@
 			"path": "pages/pingjia/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -258,7 +258,7 @@
 			"path": "pages/qianbao/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -267,7 +267,7 @@
 			"path": "pages/shopdetail/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -276,7 +276,7 @@
 			"path": "pages/zidingyi/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -285,7 +285,7 @@
 			"path": "pages/changan/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -294,7 +294,7 @@
 			"path": "pages/dapeizidingyi/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -303,7 +303,7 @@
 			"path": "pages/dizhi/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -312,7 +312,7 @@
 			"path": "pages/shouhuodi/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -321,7 +321,7 @@
 			"path": "pages/bianji/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -330,7 +330,7 @@
 			"path": "pages/chengyuan/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -339,7 +339,7 @@
 			"path": "pages/zidingyikan/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -348,7 +348,7 @@
 			"path": "pages/genghuan/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -357,7 +357,7 @@
 			"path": "pages/baocun/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
@@ -366,13 +366,24 @@
 			"path": "pages/bianjigh/index",
 			"style": {
 				"navigationBarTitleText": "我的",
-				"app-plus":{
+				"app-plus": {
 					"titleNView": false
 				}
 			}
 		}
-	],
-	"tabBar": { 
+	    ,{
+            "path" : "pages/sort/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "列表",
+								"app-plus": {
+									"titleNView": false
+								}
+            }
+            
+        }
+    ],
+	"tabBar": {
 		"color": "#999",
 		"selectedColor": "#82cfd5",
 		"borderStyle": "#fff",
@@ -385,14 +396,12 @@
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8"
 	},
-	"condition" : { //模式配置,仅开发期间生效
+	"condition": { //模式配置,仅开发期间生效
 		"current": 0, //当前激活的模式(list 的索引项)
-		"list": [
-			{
-				"name": "", //模式名称
-				"path": "", //启动页面,必选
-				"query": "" //启动参数,在页面的onLoad函数里面得到
-			}
-		]
+		"list": [{
+			"name": "", //模式名称
+			"path": "", //启动页面,必选
+			"query": "" //启动参数,在页面的onLoad函数里面得到
+		}]
 	}
 }

+ 9 - 34
pages/gengduo/index.vue

@@ -14,7 +14,7 @@
 							<image src="/static/img/88.png" mode="widthFix"></image>
 							<text class="text-white">精选推荐</text>
 						</view>
-						<view class="yiguicla mt-20 ml-20 fl" v-for="item in quanbuList" @click="yifu()">
+						<view class="yiguicla mt-20 ml-20 fl" v-for="item in quanbuList" @click="sort(item.id)">
 							<image :src="item.src" mode="widthFix"></image>
 							<view class="wenzi text-align-center text-size-m mt-8">{{item.text}}</view>
 						</view>
@@ -41,39 +41,7 @@
 					// 	src: '/static/img/45.png',
 					// 	text: 'NEO CITY 涂鸦',
 					// 	type: '手提包'
-					// }, {
-					// 	src: '/static/img/46.png',
-					// 	text: '满印迷你标识',
-					// 	type: '围巾'
-					// }, {
-					// 	src: '/static/img/47.png',
-					// 	text: '大号版型夹克',
-					// 	type: '新品'
-					// }, {
-					// 	src: '/static/img/45.png',
-					// 	text: 'NEO CITY 涂鸦',
-					// 	type: '手提包'
-					// }, {
-					// 	src: '/static/img/46.png',
-					// 	text: '满印迷你标识',
-					// 	type: '围巾'
-					// }, {
-					// 	src: '/static/img/47.png',
-					// 	text: '大号版型夹克',
-					// 	type: '新品'
-					// }, {
-					// 	src: '/static/img/46.png',
-					// 	text: '满印迷你标识',
-					// 	type: '围巾'
-					// }, {
-					// 	src: '/static/img/47.png',
-					// 	text: '大号版型夹克',
-					// 	type: '新品'
-					// }, {
-					// 	src: '/static/img/45.png',
-					// 	text: 'NEO CITY 涂鸦',
-					// 	type: '手提包'
-					// }
+					// }, 
 				]
 			};
 		},
@@ -124,6 +92,7 @@
 						that.quanbuList = [];
 						res.data.data.forEach(item => {
 							that.quanbuList.push({
+								id:item.id,
 								src: item.image,
 								text: item.category_name
 							})
@@ -136,6 +105,12 @@
 					}
 				})
 				// uni.$tm.toast(`您选中了:${e}`)
+			},
+			sort(id){
+				console.log(id);
+				uni.navigateTo({
+					url:'/pages/sort/index?id='+id
+				})
 			}
 		},
 	}

+ 155 - 0
pages/sort/index.vue

@@ -0,0 +1,155 @@
+<template>
+	<view :style="{ minHeight: sys.windowHeight + 'px' }" :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
+		<tm-menubars title="消息列表" :shadow="0" :showback="true"></tm-menubars>
+	<!-- 	<view class="C1b1b1b pb-10">
+			<view class="sousuo">
+				<tm-pickersCity class="dingwei fl" btn-color="bg-gradient-blue-accent" @confirm="okCity" :default-value="addr">
+					<view>
+						<text class="text-size-n">{{addr[1]}}</text>
+						<tm-icons :size="24" color="white" name="icon-angle-down"></tm-icons>
+					</view>
+				</tm-pickersCity>
+				<view>
+					<tm-search @confirm="sosoFun" class="fl" v-model="soso" color="white" confirm-text=""></tm-search>
+					<text class="quxiao fr" @click="goindex()">取消</text>
+				</view>
+			</view>
+			<view style="clear: both;"></view>
+			<tm-dropDownMenu @change="change" :type="typeclick" un-color="white" :list="list2"></tm-dropDownMenu>
+		</view> -->
+		<div class="zhuti">
+			<tm-sheet class="kuang" style="padding-bottom: 30px !important;">
+				<view style="width: 94%;margin:0 auto;" class="remen">
+					<view v-for="(item,index) in listdata"  class="round-5 contone black mt-20" :class="index%2==0?'fl':'fr'">
+						<image class="logo" :src="item.image" mode="widthFix"></image>
+						<view class="pa-15 text-size-s">
+							<view class="text-overflow-2">
+								<text class="text-size-lg">{{item.goods_name}}</text>
+								<!-- <view class="text-gray mt-6">销量:{{item.xiaol}}</view> -->
+							</view>
+							<view class="mt-2 flex-between flex-center">
+								<view class="touxiang mt-30">
+									<text class="text-white text-size-m text-weight-b">{{item.sale_price}}</text>
+								</view>
+								<view >
+									<image @click="jiarufuFun(item)" class="remenzan" src="/static/img/86.png" mode="widthFix"></image>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view style="clear: both;"></view>
+					<view style="clear: both;" class="more ma-40 pt-40" @click="gengmore()">
+						<image src="/static/img/30.png" mode="widthFix"></image>
+						<text class="text-size-s">下拉加载更多~</text>
+					</view>
+				</view>
+			</tm-sheet>
+			<view style="height:60px"></view>
+		</div>
+		<!-- 弹出层消息 -->
+		<tm-message ref="toast"></tm-message>
+	</view>
+</template>	
+<script>
+import{myRequest} from '@/api/request.js'
+export default {
+	data() {
+		return {
+			typeclick:1,
+			listdata:[],
+			soId:'',
+			page:1,
+			pagesize:8
+		};
+	},
+	onLoad(op) {
+		console.log(op);
+		this.soId=op.id
+	},
+	created() {
+		this.sys = uni.getSystemInfoSync();
+		this.randouh()
+		this.getSort()
+	},
+	methods: {
+		gengmore(){
+			// this.randouh()
+		},
+		jiarufuFun(data){
+			uni.navigateTo({
+				url: "/pages/gouwuche/index",
+			})
+			// console.log(data)
+			// this.gouwuche.push(data)
+		},
+		getSort(){
+			let that=this;
+			myRequest({
+				url:'/api/ShopGoods/childrenClassificationList',
+				method:'post',
+				data:{id:that.soId,page:that.page,pagesize:that.pagesize}
+			}).then(res=>{
+				if(res.data.code==200){
+					console.log(res.data.data.data,'liebiao');
+					that.listdata=res.data.data.data;
+				}else{
+					that.$refs.toast.show({
+						model: 'error',
+						label: res.data.msg
+					})
+				}
+			})
+		},
+		randouh(){
+			// let list2 = [],that=this;
+			// for(let i=0;i<8;i++){
+			// 	list2.push({
+			// 		image:'../../static/img/90.png',
+			// 		text:'帽子',
+			// 		jiage:'¥ 359.00',
+			// 		xiaol:'128'
+			// 	})
+			// }
+			// this.listdata=this.listdata.concat(list2)
+			// console.log(this.listdata)
+		},
+		goindex(){
+			uni.navigateBack();
+		},
+		change(e){
+			console.log(e)
+		},
+		sosoFun(){
+		}
+	},
+}
+</script>
+
+<style lang="scss">
+	/deep/ .tm-menubars .body{
+		background-color: #1b1b1b !important;
+	}
+	/deep/ .zhuti{padding: 10px 10px;}
+	/deep/ .kuang{margin:0 !important;padding: 0px !important;}
+	/deep/ .icon-search{
+		font-size: 23px !important;
+		color: #8E8E93 !important;
+	}
+	/deep/ .tm-search{
+		width: 66%;
+		background-color: #414141 !important;
+		border-radius: 10px;
+	}
+	/deep/ .tm-search .grey-darken-5{
+		background-color: #414141 !important;
+	}
+	.dingwei{width: 21%;margin-top:3%;}
+	.shuruk{width: 77%;}
+	.sousuo{width:94%;margin:0 auto;}
+	.quxiao{color: #707070;line-height: 47px;}
+	.contone{width: 48%;}
+	.logo{width: 100%;}
+	.remenzan{width: 18px !important;margin-top: 10px;}
+	.more{text-align: center;}
+	.more image{margin-right: 10px;vertical-align: middle;width: 30px;}
+</style>