diff --git a/api/product.js b/api/product.js
index 506544f..bd27473 100644
--- a/api/product.js
+++ b/api/product.js
@@ -21,3 +21,10 @@ export function fetchProductDetail(id) {
url: '/product/detail/'+id
})
}
+
+export function fetchProductLuooDetail(id) {
+ return request({
+ method: 'GET',
+ url: '/product/luoo/detail/'+id
+ })
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 42485a5..fd9a7c8 100644
--- a/pages.json
+++ b/pages.json
@@ -48,8 +48,10 @@
"titleNView": {
"type": "transparent"
}
- }
+ },
+ "navigationStyle": "custom"
}
+
}, {
"path": "pages/set/set",
"style": {
diff --git a/pages/address/addressManage.vue b/pages/address/addressManage.vue
index 78a0a5c..619ae59 100644
--- a/pages/address/addressManage.vue
+++ b/pages/address/addressManage.vue
@@ -1,17 +1,17 @@
- 姓名
+ 收货姓名
手机号码
-
+
- 所在区域
-
+ 收货地区
+
详细地址
-
+
设为默认
-
+
@@ -60,9 +60,9 @@
}
},
onLoad(option) {
- let title = '新增收货地址';
+ let title = '新增地址';
if (option.type === 'edit') {
- title = '编辑收货地址'
+ title = '编辑地址'
fetchAddressDetail(option.id).then(response=>{
this.addressData = response.data;
this.addressData.prefixAddress = this.addressData.province+this.addressData.city+this.addressData.region;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 36c55a7..b6cd2f6 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -2,8 +2,8 @@
-
+
@@ -106,7 +106,9 @@
hotProductList: [],
recommendParams: {
pageNum: 1,
- pageSize: 4
+ pageSize: 4,
+ categoryId: '',
+ searchStr: '',
},
loadingType: 'more',
tagCurrent: 0,
@@ -124,7 +126,14 @@
},
//下拉刷新
onPullDownRefresh() {
- this.recommendParams.pageNum = 1;
+ this.recommendParams = {
+ pageNum: 1,
+ pageSize: 4,
+ searchStr: '',
+ categoryId: ''
+ };
+ this.tagCurrent = 0
+ this.keyword = ''
this.loadData();
},
//加载更多
@@ -167,7 +176,7 @@
});
fetchContentV2().then(response => {
this.categoryList = [{
- id: 0,
+ id: '',
name: "全部"
}].concat(response.data.categoryList)
});
@@ -220,8 +229,31 @@
}
},
changeTag(index) {
- console.log('index', index)
+ console.log('index', index, this.categoryList[index])
this.tagCurrent = index
+ const currentTag = this.categoryList[index]
+ this.recommendParams.pageNum = 1
+ this.recommendParams.pageSize = 4
+ this.recommendParams.categoryId = currentTag.id
+ this.getProductList()
+ },
+ search() {
+ this.recommendParams.searchStr = this.keyword
+ this.recommendParams.pageNum = 1
+ this.recommendParams.pageSize = 4
+ this.getProductList()
+ },
+ getProductList() {
+ fetchRecommendProductList(this.recommendParams).then(response => {
+ this.recommendProductList = response.data;
+ if (response.data.length === 0) {
+ this.loadingType = 'nomore';
+ } else {
+ this.loadingType = 'more';
+ }
+ uni.stopPullDownRefresh();
+ })
+
}
},
}
@@ -330,6 +362,7 @@
/* 标签列表 */
.tag-list {
+
// padding: 0 36upx;
.u-scroll-box {
view {
diff --git a/pages/product/product.vue b/pages/product/product.vue
index 6387760..45dab78 100644
--- a/pages/product/product.vue
+++ b/pages/product/product.vue
@@ -1,33 +1,39 @@
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
- {{product.name}}
- {{product.subTitle}}
¥
{{product.price}}
¥{{product.originalPrice}}
-
+ {{product.name}}
+ {{product.subTitle}}
+
+
-
+
@@ -78,7 +84,7 @@
-
+
@@ -123,22 +130,29 @@
-
-
- 首页
-
-
- 购物车
+
+
+
+
+
+
+
+
+
+
-
- 收藏
+
+
+
+
+
-
+
@@ -164,8 +178,9 @@
{{item.name}}
-
+
{{childItem.name}}
@@ -218,7 +233,8 @@