diff --git a/common/js/api.js b/common/js/api.js
index 54d83de..05e8744 100644
--- a/common/js/api.js
+++ b/common/js/api.js
@@ -14,6 +14,9 @@ export default {
productqueryProduct(data) { //获取商品信息
return uni.api.post("/product/queryProduct", data, false);
},
+ productquerySpec(data) { //获取已上架商品规格
+ return uni.api.post("/product/querySpec", data, false);
+ },
cartAdd(data) { //添加到购物车
return uni.api.post("/product/addCart", data);
},
diff --git a/pages.json b/pages.json
index 5ab0d1d..f10dba5 100644
--- a/pages.json
+++ b/pages.json
@@ -88,13 +88,7 @@
"navigationBarBackgroundColor": "#FFD158"
}
},
- {
- "path": "pages/order/confirm_order",
- "style": {
- "navigationBarTitleText": "确认订单",
- "navigationBarBackgroundColor": "#E8AD7B"
- }
- },
+
{
"path": "pages/order/order_detail",
"style": {
@@ -165,7 +159,13 @@
"navigationBarTextStyle": "balck"
}
},
-
+ {
+ "path": "pages/order_food/confirm_order",
+ "style": {
+ "navigationBarTitleText": "确认订单",
+ "navigationBarBackgroundColor": "#E8AD7B"
+ }
+ },
{
"path": "pages/make/list",
"style": {
diff --git a/pages/order/order_detail - 副本.vue b/pages/order/order_detail - 副本.vue
deleted file mode 100644
index a5e0318..0000000
--- a/pages/order/order_detail - 副本.vue
+++ /dev/null
@@ -1,605 +0,0 @@
-
-
-
-
-
- {{listinfo.name}}
-
-
- 待支付
-
-
- 待发货
-
-
- 订单完成
-
-
- 已发
-
-
- 申请退单
-
-
- 退单
-
-
- 已取消
-
-
- 合台
-
-
-
-
- 快递
- 外卖
- 自提
- 堂食
-
-
- 桌号:{{listinfo.tableName}}
-
-
- 取餐号
- {{listinfo.outNumber}}
-
-
-
-
-
- 点单详情
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.productName}}
- {{item.productSkuName}}
- x{{item.num}}
-
-
-
- ¥
- {{item.priceAmount}}
-
-
-
-
-
- 合计:
- ¥
- {{listinfo.payAmount}}
-
-
-
-
-
- 订单信息
-
-
-
- 订单信息:
- {{listinfo.orderNo}}(点击复制)
-
-
- 创建时间:
- {{$u.timeFormat(listinfo.time, 'yyyy-mm-dd hh:MM:ss')}}
-
-
-
-
-
-
-
-
-
-
- 支付方式
-
-
-
-
-
-
-
-
- 微信支付
-
-
-
-
-
-
-
-
-
-
- 会员卡支付
-
-
-
-
- 会员卡余额{{ amountVIP?amountVIP.amount:0}} 去充值
-
-
-
-
-
-
-
-
-
-
- 实付金额:
-
-
- ¥{{listinfo.payAmount}}
-
-
-
- 立即付款
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/order/confirm_order.vue b/pages/order_food/confirm_order.vue
similarity index 100%
rename from pages/order/confirm_order.vue
rename to pages/order_food/confirm_order.vue
diff --git a/pages/order_food/order_food - 副本.vue b/pages/order_food/order_food - 副本.vue
deleted file mode 100644
index 03e33d2..0000000
--- a/pages/order_food/order_food - 副本.vue
+++ /dev/null
@@ -1,1883 +0,0 @@
-
-
-
-
-
- 加载中
-
-
-
-
-
-
-
-
- {{ shopInfo.storeInfo.shopName }}
-
-
- 距离您{{ shopInfo.distance }}
-
-
-
- 营业时间:{{ shopInfo.storeInfo.businessStartDay +'至'+ shopInfo.storeInfo.businessEndDay +' '+ shopInfo.storeInfo.businessTime }}
-
-
- 查看
-
-
-
-
- 本店招牌菜
-
-
-
-
-
-
-
- {{ item.name }}
-
-
- 本店回头客第{{index+1}}名
-
-
- 招牌
-
-
- {{item.shortTitle?item.shortTitle:''}}
-
-
- 月售{{item.stockNumber}}
-
-
-
- ¥
- {{item.lowPrice}}
- /份
- 「{{item.suit}}份起点」
-
-
-
-
-
-
- 选规格
- {{item.cartNumber<99?item.cartNumber:'99+'}}
-
-
-
-
-
- {{ item.cartNumber }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
- TOP{{index1+1}}
-
-
- {{ item1.name }}
- 本店回头客第{{index1+1}}名
- {{item1.shortTitle?item1.shortTitle:''}}
- 月售{{item1.stockNumber}}
- ¥{{ item1.lowPrice }}/份「{{item1.suit}}份起点」
-
-
-
- 选规格
- {{item1.cartNumber<99?item1.cartNumber:'99+'}}
-
-
-
-
-
-
-
- {{ item1.cartNumber }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{cartLists_count<99?cartLists_count:'99+'}}
-
-
- ¥
- {{cartLists.amount||'0.00'}}
-
-
- 去结算
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
- {{ item.skuName }}
-
-
-
- ¥
- {{ item.salePrice }}
-
-
-
-
-
- {{ item.number }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ shopInfo.storeInfo.shopName }}
-
-
-
-
- 商家信息
-
-
- 营业时间:
- {{ shopInfo.storeInfo.businessStartDay +'至'+ shopInfo.storeInfo.businessEndDay +' '+ shopInfo.storeInfo.businessTime }}
-
-
- 商家地址:
- {{ shopInfo.storeInfo.address }}
-
-
- 商家电话:
- {{ shopInfo.storeInfo.phone }}
-
-
- 商家公告
-
-
- 公告:
- {{ shopInfo.storeInfo.detail }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{specifications.name}}
-
- 本店回头客第{{specifications.indexb+1}}名
- {{specifications.shortTitle?specifications.shortTitle:''}}
-
-
-
- {{item.name}}
-
-
-
- {{item1}}
-
-
-
-
-
-
-
-
- ¥
- {{salePrice}}
- /杯
-
-
-
-
-
-
- {{amountcartNumber}}
-
-
-
-
-
-
- {{skuidname.toString()}}
-
-
- 添加到购物车
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue
index fd8b4e0..a3860fc 100644
--- a/pages/order_food/order_food.vue
+++ b/pages/order_food/order_food.vue
@@ -307,7 +307,7 @@
{{skuidname.toString()}}
-
添加到购物车
@@ -348,6 +348,8 @@
}, // 规格信息
socketTicket: null,
amountcartNumber: 0,
+ isSpec: true,
+ skuBtnText: "添加到购物车",
skuNumber: 0,
skuSuit: 0,
salePrice: '', //钱数
@@ -535,7 +537,7 @@
* 添加购物车
*/
addShopping(item, index, index1, a, b) {
- if (this.amountcartNumber <= 0) {
+ if (this.amountcartNumber <= 0 && isSpec) {
return;
}
let num = 0;
@@ -695,8 +697,24 @@
* @param {Object} item
*/
async morloe(e, index, index1, item) {
- this.specifications.tagSnap[index]['start'] = index1
- this.skuidname.splice(index, 1, e) //替换skuidname的数据
+ this.specifications.tagSnap[index]['start'] = index1;
+ this.skuidname.splice(index, 1, e); //替换skuidname的数据
+ this.isSpec = true;
+ let querySpecList = [];
+ this.specifications.tagSnap.forEach((v,e) => {
+ querySpecList.push({
+ name: v.name,
+ value : v.children[v.start],
+ })
+ })
+ let res = await this.api.productquerySpec({
+ productId: item.id, //商品id
+ querySpecList: querySpecList,
+ })
+ if( res.code == 0 ){
+ // this.isSpec = false;
+ // this.skuBtnText = "";
+ }
this.hodgepodge(item, 2)
},
@@ -713,7 +731,8 @@
code: uni.cache.get('tableCode'),
shopId: uni.cache.get('shopUser'),
productId: item.id, //商品id
- spec_tag: this.skuidname.join(",")
+ spec_tag: this.skuidname.join(","),
+ querySpecList: [],
})
this.salePrice = res.data.salePrice // 价格
let data = null;
@@ -753,7 +772,7 @@
return false
}
uni.navigateTo({
- url: '/pages/order/confirm_order?storeInfo=' + JSON.stringify(this.shopInfo.storeInfo)
+ url: '/pages/order_food/confirm_order?storeInfo=' + JSON.stringify(this.shopInfo.storeInfo)
});
},
diff --git a/pages/order_food/order_foodscroll-view.vue b/pages/order_food/order_foodscroll-view.vue
deleted file mode 100644
index 9d2b37c..0000000
--- a/pages/order_food/order_foodscroll-view.vue
+++ /dev/null
@@ -1,1899 +0,0 @@
-
-
-
-
-
- 加载中
-
-
-
-
-
-
-
-
- {{ shopInfo.storeInfo.shopName }}
-
-
- 距离您{{ shopInfo.distance }}
-
-
-
- 营业时间:{{ shopInfo.storeInfo.businessStartDay +'至'+ shopInfo.storeInfo.businessEndDay +' '+ shopInfo.storeInfo.businessTime }}
-
-
- 查看
-
-
-
-
- 本店招牌菜
-
-
-
-
-
-
-
- {{ item.name }}
-
-
- 本店回头客第{{index+1}}名
-
-
- 招牌
-
-
- {{item.shortTitle?item.shortTitle:''}}
-
-
- 月售{{item.stockNumber}}
-
-
-
- ¥
- {{item.lowPrice}}
- /份
- 「{{item.suit}}份起点」
-
-
-
-
-
-
- 选规格
- {{item.cartNumber<99?item.cartNumber:'99+'}}
-
-
-
-
-
- {{ item.cartNumber }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
- TOP{{index1+1}}
-
-
- {{ item1.name }}
- 本店回头客第{{index1+1}}名
- {{item1.shortTitle?item1.shortTitle:''}}
- 月售{{item1.stockNumber}}
- ¥{{ item1.lowPrice }}/份「{{item1.suit}}份起点」
-
-
-
- 选规格
- {{item1.cartNumber<99?item1.cartNumber:'99+'}}
-
-
-
-
-
-
-
- {{ item1.cartNumber }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{cartLists_count<99?cartLists_count:'99+'}}
-
-
- ¥
- {{cartLists.amount||'0.00'}}
-
-
- 去结算
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
- {{ item.skuName }}
-
-
-
- ¥
- {{ item.salePrice }}
-
-
-
-
-
- {{ item.number }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ shopInfo.storeInfo.shopName }}
-
-
-
-
- 商家信息
-
-
- 营业时间:
- {{ shopInfo.storeInfo.businessStartDay +'至'+ shopInfo.storeInfo.businessEndDay +' '+ shopInfo.storeInfo.businessTime }}
-
-
- 商家地址:
- {{ shopInfo.storeInfo.address }}
-
-
- 商家电话:
- {{ shopInfo.storeInfo.phone }}
-
-
- 商家公告
-
-
- 公告:
- {{ shopInfo.storeInfo.detail }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{specifications.name}}
-
- 本店回头客第{{specifications.indexb+1}}名
- {{specifications.shortTitle?specifications.shortTitle:''}}
-
-
-
- {{item.name}}
-
-
-
- {{item1}}
-
-
-
-
-
-
-
-
- ¥
- {{salePrice}}
- /杯
-
-
-
-
-
-
- {{amountcartNumber}}
-
-
-
-
-
-
- {{skuidname.toString()}}
-
-
- 添加到购物车
-
-
-
-
-
-
-
-
-
\ No newline at end of file