diff --git a/api/mall.js b/api/mall.js index 7f8adc2..3f7aba9 100644 --- a/api/mall.js +++ b/api/mall.js @@ -7,7 +7,11 @@ const baseUrl = "http://192.168.0.26:3000" export const mallAPI = { getMallList: (params) => http.get(baseUrl + '/api/products', params), getCategory: () => http.get(baseUrl + '/api/category'), - getMallDetail: (id) => http.get(baseUrl + '/api/products/' + id) + getMallDetail: (id) => http.get(baseUrl + '/api/products/' + id), + getRecommended: (id) => http.get(baseUrl + `/api/products/${id}/recommended`), // 推荐商品 + addCart: (data) => http.post(baseUrl +"/api/cart/add", data), // 添加购物车 + createOrder: (data) => http.post(baseUrl + `/api/orders/create-from-cart`,data), // 创建订单 + getOrder: (orderId) => http.get(baseUrl + `/api/orders/pending-payment/${orderId}`), // 获取订单 } export default { diff --git a/manifest.json b/manifest.json index 7a16b5a..fc9f83d 100644 --- a/manifest.json +++ b/manifest.json @@ -53,6 +53,38 @@ "__platform__" : [ "android" ] } } + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } } } }, diff --git a/pages.json b/pages.json index ca5cfcc..774aef9 100644 --- a/pages.json +++ b/pages.json @@ -136,13 +136,20 @@ "navigationBarTitleText": "商品详情", "navigationStyle": "custom" } + }, + { + "path" : "pages/home/pay", + "style" : + { + "navigationBarTitleText" : "确认订单", + "backgroundColor": "#E4ECFF" + } } ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8" + "backgroundColor": "#f5f8ff" }, "uniIdRouter": {}, "tabBar": { diff --git a/pages/home/index.vue b/pages/home/index.vue index 2b68abd..8001f36 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -203,7 +203,6 @@ // 加载数据 const loadMallData = () => { - console.log(111); if (loadStatus.value == 'nomore') return mallAPI.getMallList(params.value).then((res) => { mallList.value = mallList.value.concat(res.data.products) diff --git a/pages/home/mallDetail.vue b/pages/home/mallDetail.vue index 6ea0e42..09ab07e 100644 --- a/pages/home/mallDetail.vue +++ b/pages/home/mallDetail.vue @@ -7,15 +7,101 @@ - 111 + + + + + + + + + + + {{dataInfo.name}} + + + {{dataInfo.description}} + + + + + + {{dataInfo.rongdou_price}} + + + + {{dataInfo.points_price}} + + + + + + + 已售{{dataInfo.sales}} + 剩余{{dataInfo.stock}} + + + + 评分: + + +

具体描述

+ +
+ +

推荐商品

+ + + + + + +
+
- + 客服 @@ -26,19 +112,95 @@ - 加入购物车 - 领券购买 + 加入购物车 + 领券购买 + + + + + {{popTitle}} + + + + 张三 | + 浙江省 宁波市 海曙区 + + + + + + + + + + + + + + + 实付 + {{dataInfo.price * order.count}} + + + {{dataInfo.points * order.count}} + + + + + + + + + + {{item + "("+specOptions.get(item).size+")"}} + + + + {{specOptions.get(item).get(key)}} + + + + + + 订单备注 + + + + + + + {{popTitle}} + + + + + + - + + \ No newline at end of file diff --git a/static/icon/Map pin2.png b/static/icon/Map pin2.png new file mode 100644 index 0000000..3372b5e Binary files /dev/null and b/static/icon/Map pin2.png differ