jufubao-food 1.0.12-beta6 → 1.0.12-beta7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
height: bottomBtnHeight + 'rpx',
|
|
152
152
|
lineHeight: bottomBtnHeight + 'rpx',
|
|
153
153
|
}"
|
|
154
|
-
@click="
|
|
154
|
+
@click="handleCardPay"
|
|
155
155
|
>{{bottomPayText}}</xd-button>
|
|
156
156
|
</view>
|
|
157
157
|
</view>
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
</view>
|
|
214
214
|
<view slot="btn" style="display: flex;margin-top: 40rpx;">
|
|
215
215
|
<xd-button type="info" size="small" @click="handleChangeStop">更换门店</xd-button>
|
|
216
|
-
<xd-button type="primary" size="small" style="margin-left: 40rpx;" @click="
|
|
216
|
+
<xd-button type="primary" size="small" style="margin-left: 40rpx;" @click="handleCreatePayConfirm">就是这家</xd-button>
|
|
217
217
|
</view>
|
|
218
218
|
</XdDailog>
|
|
219
219
|
|
|
@@ -606,10 +606,6 @@
|
|
|
606
606
|
this.showDialogChangeShop = true;
|
|
607
607
|
this.showDialogConfirmShop = false;
|
|
608
608
|
},
|
|
609
|
-
handlePayConfirm(){
|
|
610
|
-
if(!this.getCreateOrderParams()) return false;
|
|
611
|
-
this.showDialogConfirmShop = true;
|
|
612
|
-
},
|
|
613
609
|
async handleCardPay(){
|
|
614
610
|
if(!this.getCreateOrderParams()) return false;
|
|
615
611
|
this.checkUseNewPay();
|
|
@@ -650,8 +646,22 @@
|
|
|
650
646
|
}
|
|
651
647
|
}
|
|
652
648
|
}
|
|
649
|
+
this.showDialogConfirmShop = true;
|
|
650
|
+
// this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
|
|
651
|
+
},
|
|
652
|
+
//去创建订单
|
|
653
|
+
handleCreatePayConfirm(){
|
|
654
|
+
//已选卡
|
|
655
|
+
let selected_card_list = []
|
|
656
|
+
if(this.choseCard) {
|
|
657
|
+
selected_card_list = this.choseCard ? this.choseCard.selectedCardList : [];
|
|
658
|
+
} else if(this.choseCoupon) {
|
|
659
|
+
selected_card_list = this.choseCoupon ? this.choseCoupon.selectedCardList : [];
|
|
660
|
+
}
|
|
661
|
+
let selected_wallet_list = this.choseWallet ? this.choseWallet.selectedWalletList : []
|
|
653
662
|
this.useTickAndWalletPay(selected_card_list, selected_wallet_list);
|
|
654
663
|
},
|
|
664
|
+
|
|
655
665
|
//使用钱包跟票券一同支付
|
|
656
666
|
useTickAndWalletPay(selected_card_list, selected_wallet_list){
|
|
657
667
|
this.createSettleOrder({
|
|
@@ -55,7 +55,29 @@
|
|
|
55
55
|
<view class="group_title">{{ cate.category_name }}</view>
|
|
56
56
|
<view class="product_list" v-if="cate.productList.length">
|
|
57
57
|
<view v-for="item in cate.productList" :key="item.key" :style="[contProductStyles]">
|
|
58
|
-
<
|
|
58
|
+
<view class="product_item">
|
|
59
|
+
<view class="prod_img">
|
|
60
|
+
<image :src="item.thumb"/>
|
|
61
|
+
</view>
|
|
62
|
+
<view class="prod_info">
|
|
63
|
+
<view class="prod_tit"
|
|
64
|
+
:class="{
|
|
65
|
+
prod_tit_one:item.product_sku_name
|
|
66
|
+
}">{{item.product_name}}</view>
|
|
67
|
+
<!-- <view class="prod_brand" :style="{color:brandTextColor}" v-if="prod.brand_name">{{prod.brand_name}}</view> -->
|
|
68
|
+
<view class="prod_specs" v-if="item.sub_name">{{item.sub_name}}</view>
|
|
69
|
+
<view class="prod_price">
|
|
70
|
+
<view style="display:flex;align-items:center">
|
|
71
|
+
<CusPrice :isPlus="is_plus_site" type="order" :showPrice="item.show_prices"></CusPrice>
|
|
72
|
+
</view>
|
|
73
|
+
<view style="font-size: 28rpx;color:#999" @click="toProductDetail(item)">
|
|
74
|
+
<view v-if="item.has_choose" class="chose_spu">选规格</view>
|
|
75
|
+
<xd-font-icon v-else icon="iconaddcart" :color="mainColor" size="46"></xd-font-icon>
|
|
76
|
+
</view>
|
|
77
|
+
</view>
|
|
78
|
+
</view>
|
|
79
|
+
</view>
|
|
80
|
+
<!-- <cus-product
|
|
59
81
|
:image-radius="imageRadius"
|
|
60
82
|
:brand-color="brandColor"
|
|
61
83
|
:height="200"
|
|
@@ -67,7 +89,7 @@
|
|
|
67
89
|
:row-spacing="rowSpacing"
|
|
68
90
|
:cell-spacing="itemSpacing"
|
|
69
91
|
@on-product-detail="toProductDetail"
|
|
70
|
-
></cus-product>
|
|
92
|
+
></cus-product> -->
|
|
71
93
|
</view>
|
|
72
94
|
</view>
|
|
73
95
|
<view class="product_list" v-else>
|
|
@@ -168,6 +190,7 @@
|
|
|
168
190
|
],
|
|
169
191
|
data() {
|
|
170
192
|
return {
|
|
193
|
+
closeMask: true,
|
|
171
194
|
resource_shop_id: "",
|
|
172
195
|
xnamespace: "",
|
|
173
196
|
consume_mode: "",
|
|
@@ -561,7 +584,8 @@
|
|
|
561
584
|
}
|
|
562
585
|
}
|
|
563
586
|
}).then(res => {
|
|
564
|
-
|
|
587
|
+
this.p_getFoodCartList();
|
|
588
|
+
this.p_getFoodCartCount();
|
|
565
589
|
})
|
|
566
590
|
},
|
|
567
591
|
//获取购物车列表
|
|
@@ -723,6 +747,68 @@
|
|
|
723
747
|
color: #999999;
|
|
724
748
|
min-height: 200px;
|
|
725
749
|
}
|
|
750
|
+
.product_item{
|
|
751
|
+
box-sizing: border-box;
|
|
752
|
+
height: auto;
|
|
753
|
+
background: #FFFFFF;
|
|
754
|
+
display: flex;
|
|
755
|
+
|
|
756
|
+
.chose_spu{
|
|
757
|
+
padding: 12rpx 16rpx;
|
|
758
|
+
background-color: var(--main-color);
|
|
759
|
+
color: #FFFFFF;
|
|
760
|
+
font-size: 24rpx;
|
|
761
|
+
border-radius: 40rpx;
|
|
762
|
+
box-sizing: border-box;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.prod_img{
|
|
766
|
+
width: 200rpx;
|
|
767
|
+
height: 200rpx;
|
|
768
|
+
margin-right: 32rpx;
|
|
769
|
+
// background: #f8f8f8;
|
|
770
|
+
// border-radius: 16rpx;
|
|
771
|
+
image{
|
|
772
|
+
width: 100%;
|
|
773
|
+
height: 100%;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
.prod_info{
|
|
777
|
+
flex: 1;
|
|
778
|
+
display: flex;
|
|
779
|
+
flex-direction: column;
|
|
780
|
+
justify-content: space-between;
|
|
781
|
+
width: 100rpx;
|
|
782
|
+
}
|
|
783
|
+
.prod_tit{
|
|
784
|
+
font-size: 28rpx;
|
|
785
|
+
color: #333333;
|
|
786
|
+
.uni-max-cut(2, 80);
|
|
787
|
+
line-height: unit(40, rpx);
|
|
788
|
+
}
|
|
789
|
+
.prod_tit_one {
|
|
790
|
+
.uni-max-cut(1, 40);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.prod_brand {
|
|
794
|
+
font-size: 26rpx;
|
|
795
|
+
padding-top: unit(10, rpx);
|
|
796
|
+
line-height: unit(32, rpx);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.prod_specs{
|
|
800
|
+
padding-top: unit(10, rpx);
|
|
801
|
+
display: block;
|
|
802
|
+
font-size: 26rpx;
|
|
803
|
+
color: #999999;
|
|
804
|
+
line-height: unit(32, rpx);
|
|
805
|
+
}
|
|
806
|
+
.prod_price{
|
|
807
|
+
display: flex;
|
|
808
|
+
align-items: flex-end;
|
|
809
|
+
justify-content: space-between;
|
|
810
|
+
}
|
|
811
|
+
}
|
|
726
812
|
}
|
|
727
813
|
}
|
|
728
814
|
}
|
|
@@ -775,7 +861,7 @@
|
|
|
775
861
|
width: 200rpx;
|
|
776
862
|
height: 200rpx;
|
|
777
863
|
margin-right: 24rpx;
|
|
778
|
-
background: #DDD;
|
|
864
|
+
// background: #DDD;
|
|
779
865
|
image{
|
|
780
866
|
width: 100%;
|
|
781
867
|
height: 100%;
|
|
@@ -789,7 +875,8 @@
|
|
|
789
875
|
width: 100rpx;
|
|
790
876
|
}
|
|
791
877
|
.prod_tit{
|
|
792
|
-
font-size:
|
|
878
|
+
font-size: 28rpx;
|
|
879
|
+
color: #333333;
|
|
793
880
|
.uni-max-cut(2, 80);
|
|
794
881
|
line-height: unit(40, rpx);
|
|
795
882
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
getFoodShopDetail: {"resource_shop_id":8003557,"shop_id":1170110,"shop_name":"星巴克(平谷国泰店)","shop_icon":"","province_code":"","province_name":"","city_code":"jfb1","city_name":"北京","area_code":"","area_name":"","street_code":"","street_name":"","address":"平谷区文化北街13号国泰商场一层","about":"","latitude":"40.146809614188","longitude":"117.11770942955","distance":
|
|
4
|
+
getFoodShopDetail: {"resource_shop_id":8003557,"shop_id":1170110,"shop_name":"星巴克(平谷国泰店)","shop_icon":"","province_code":"","province_name":"","city_code":"jfb1","city_name":"北京","area_code":"","area_name":"","street_code":"","street_name":"","address":"平谷区文化北街13号国泰商场一层","about":"","latitude":"40.146809614188","longitude":"117.11770942955","distance":"519.5km","meal_method":["in_store","take_away"],"phone":"(010)89968048","request_id":"e32700aa4017803f"},
|
|
5
5
|
getFoodShopCategory: {"categories":[{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","category_name":"限时特惠","cart_num":1},{"category_id":"c3e817f29eca3343734ef1e5e644b211","category_name":"夏日心动推荐","cart_num":0},{"category_id":"4700b6e5b19a9ff788b3dd421421ab6b","category_name":"真味无糖","cart_num":0},{"category_id":"54e63a4221698549900f442105821a95","category_name":"浓缩咖啡","cart_num":0},{"category_id":"b083cfcac8944b26225edbcdff22b0e3","category_name":"金烘浓缩","cart_num":0},{"category_id":"834cd2779458568a5278538eb3cb6920","category_name":"冷萃咖啡","cart_num":0},{"category_id":"af722afe78ed62dbe365b5d2360df690","category_name":"植物基咖啡","cart_num":0},{"category_id":"d6f14098f1d00bf849edef62f29ea094","category_name":"星巴克冰震浓缩","cart_num":0},{"category_id":"6af82de72ee20bbc204e4c25cac7326b","category_name":"浓小杯","cart_num":0},{"category_id":"8e39244d99a7b8ea0192842005be5ff4","category_name":"软雪星冰乐","cart_num":0},{"category_id":"61077dd3605a7bc2b8f4eb1ba3e6367b","category_name":"咖啡星冰乐","cart_num":0},{"category_id":"3c18282df5e406c82571de20d1e22f28","category_name":"无咖啡星冰乐","cart_num":0},{"category_id":"b88f8211c9249db7e85949fc8fc8c6f5","category_name":"冰摇茶","cart_num":0},{"category_id":"07378726d90bf8bf36a4e1a67bfbe904","category_name":"茶拿铁","cart_num":0},{"category_id":"258c7f91f59a21564947fc89a4c8fce3","category_name":"冰摇","cart_num":0},{"category_id":"04a8025f45c4b4bbe07d7021c0773538","category_name":"巧克力","cart_num":0},{"category_id":"4ee301588298388e3886cbda9673e6e6","category_name":"蒸气奶","cart_num":0}],"request_id":"2ff41432222daffd"},
|
|
6
|
-
getFoodProductList: {"lists":[{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":707,"product_name":"双杯抹茶星冰乐®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/7b45d7de7c684b48b14725c7816c4ec9!img","has_choose":
|
|
7
|
-
getFoodCartList: {"total":
|
|
6
|
+
getFoodProductList: {"lists":[{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":707,"product_name":"双杯抹茶星冰乐®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/7b45d7de7c684b48b14725c7816c4ec9!img","has_choose":false,"cart_num":0,"show_prices":[{"p":6960,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":708,"product_name":"双杯红茶拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/c54d777ee7c34cd29a800c2e219249b0!img","has_choose":true,"cart_num":0,"show_prices":[{"p":6240,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":709,"product_name":"双杯摩卡可可碎片星冰乐®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/%E5%8F%8C%E6%9D%AF%E6%91%A9%E5%8D%A1%E5%8F%AF%E5%8F%AF%E7%A2%8E%E7%89%87%E6%98%9F%E5%86%B0%E4%B9%90.png!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7920,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":710,"product_name":"双杯拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/23787b1d58a7459086048182e9be4e22!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":711,"product_name":"双杯美式咖啡","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/58026111f5ab4091ade3a931b9f07648!img","has_choose":true,"cart_num":0,"show_prices":[{"p":6480,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":712,"product_name":"双杯馥芮白®","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/%E5%8F%8C%E6%9D%AF%E9%A6%A5%E8%8A%AE%E7%99%BD.png!img","has_choose":true,"cart_num":0,"show_prices":[{"p":8400,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":713,"product_name":"双杯焦糖玛奇朵","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/49e18ceb560c476292bea632b8e7c63f!img","has_choose":true,"cart_num":0,"show_prices":[{"p":8160,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":714,"product_name":"双杯燕麦拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/5298306078e742a3bbc2a951c26e6a23!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":715,"product_name":"双杯燕麦焦糖玛奇朵","thumb":"https:\/\/starbucks.quanma51.com\/MopPics\/202012\/209-MOPCatalog-0-342x324_2-zh.png?resize=p_4,w_228&image_process=image\/resize,w_228","has_choose":true,"cart_num":0,"show_prices":[{"p":8160,"n":"","t":"S"}]},{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","product_id":716,"product_name":"双杯巴旦木拿铁","thumb":"https:\/\/image.quanma51.com\/self\/mahua\/sbk\/product\/07468ac20918497c99984ae4ad51ddd7!img","has_choose":true,"cart_num":0,"show_prices":[{"p":7200,"n":"","t":"S"}]}],"total_size":27,"next_page_token":"2","request_id":"542b04590116772b"},
|
|
7
|
+
getFoodCartList: {"total":2,"total_amount":1185,"products":[{"product_id":794,"product_name":"鲜萃轻轻茉莉","product_sku":"SP3257-00010","specs":[],"sub_name":"温度\/咖啡液\/糖度\/杯型","num":1,"thumb":"https:\/\/img06.luckincoffeecdn.com\/group5\/M01\/24\/1D\/Ct1rZGhuSDGATZFPAAIB35XSyG4945.png","show_prices":[{"p":560,"n":"","t":"S"}],"max_buy":-1,"min_buy":-1,"status":"ok","tip":"","category_id":"45bff8619cf053e8697ba1d8ba8884bb"},{"product_id":1135,"product_name":"金桂花香拿铁","product_sku":"SP3414-00018","specs":[],"sub_name":"奶基\/温度\/糖度\/杯型","num":1,"thumb":"https:\/\/img02.luckincoffeecdn.com\/group5\/M00\/82\/F0\/Ct1rZGiN4-aAWpYOAA4lXwBx92g639.gif","show_prices":[{"p":625,"n":"","t":"S"}],"max_buy":-1,"min_buy":-1,"status":"ok","tip":"","category_id":"45bff8619cf053e8697ba1d8ba8884bb"}],"total_discount_price":0,"total_market_price":5500,"request_id":"35cb6f5a0db2a311"},
|
|
8
8
|
getFoodCartCount: {"categories":[{"category_id":"a0aacaff0fb278c5f8127cec63ec3a53","card_num":1}],"total_num":1,"request_id":"9c2bfb2c0f6817fd"}
|
|
9
9
|
}
|
|
@@ -45,95 +45,5 @@ export default function (data, gValue,gColor,oldData){
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
|
|
48
|
-
{
|
|
49
|
-
ele: 'title',
|
|
50
|
-
label: '组件样式',
|
|
51
|
-
size: 'small',
|
|
52
|
-
groupKey:'content',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: "列表布局",
|
|
56
|
-
ele: "xd-style-image",
|
|
57
|
-
groupKey: 'content',
|
|
58
|
-
valueKey: "row_num",
|
|
59
|
-
value: dataVal({data, key:'row_num', dValue:2, gValue}),
|
|
60
|
-
labelInline:true,
|
|
61
|
-
className: 'input100',
|
|
62
|
-
handleCustom(cusRes) {
|
|
63
|
-
XdBus.getParentApi('getCompStylesOptions')({
|
|
64
|
-
layout_ids: 'FzCwxOH7MQpT5ISYs8Xm6',
|
|
65
|
-
key: Date.now()
|
|
66
|
-
})
|
|
67
|
-
.then(res => {
|
|
68
|
-
res.list.map(item=>{
|
|
69
|
-
item.value = Number(item.value)
|
|
70
|
-
return item;
|
|
71
|
-
})
|
|
72
|
-
cusRes.data.cb(res)
|
|
73
|
-
})
|
|
74
|
-
.catch(error => {
|
|
75
|
-
console.error(error);
|
|
76
|
-
});
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label: "商品样式",
|
|
81
|
-
ele: "xd-style-image",
|
|
82
|
-
groupKey: 'content',
|
|
83
|
-
valueKey: "productStyle",
|
|
84
|
-
cusStyle:{marginBottom: '5px'},
|
|
85
|
-
value: customVal({
|
|
86
|
-
data,
|
|
87
|
-
key: 'productStyle',
|
|
88
|
-
fields: { 'itemBgcColorStatus':['itemBgcColor'],'bgBorder':['contBorder','bs']},
|
|
89
|
-
gValue,
|
|
90
|
-
sValue:"{\"border\":0,\"backgroundColor\":\"#fff\"}",
|
|
91
|
-
}),
|
|
92
|
-
labelInline:true,
|
|
93
|
-
className: 'input100',
|
|
94
|
-
isTplRef:true,
|
|
95
|
-
handleCustom(cusRes) {
|
|
96
|
-
XdBus.getParentApi('getCompStylesOptions')({
|
|
97
|
-
layout_ids: 'Y4oxNuIUOgVMaTD1LeWxp',
|
|
98
|
-
key: Date.now()
|
|
99
|
-
})
|
|
100
|
-
.then(res => {
|
|
101
|
-
cusRes.data.cb(res)
|
|
102
|
-
})
|
|
103
|
-
.catch(error => {
|
|
104
|
-
console.error(error);
|
|
105
|
-
});
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
label: "分类样式",
|
|
110
|
-
ele: "xd-style-image",
|
|
111
|
-
groupKey: 'content',
|
|
112
|
-
valueKey: "titleFooterStyle",
|
|
113
|
-
value: titleFooterStyle,
|
|
114
|
-
labelInline:true,
|
|
115
|
-
hidden: !(dataVal({data, key:'navStatus', dValue:'Y', gValue}) === 'Y'),
|
|
116
|
-
cusStyle:{marginBottom: '0'},
|
|
117
|
-
className: 'input100',
|
|
118
|
-
handleCustom(cusRes) {
|
|
119
|
-
XdBus.getParentApi('getCompStylesOptions')({
|
|
120
|
-
layout_ids: 'GRiS78vhPtfNXlac1WA63',
|
|
121
|
-
filter: false,
|
|
122
|
-
})
|
|
123
|
-
.then(res => {
|
|
124
|
-
cusRes.data.cb(res)
|
|
125
|
-
})
|
|
126
|
-
.catch(error => {
|
|
127
|
-
console.error(error);
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
ele: 'title',
|
|
133
|
-
label: '展示内容',
|
|
134
|
-
size: 'small',
|
|
135
|
-
groupKey:'content',
|
|
136
|
-
},
|
|
137
|
-
...ProductAttr(data,gValue,gColor,oldData),
|
|
138
48
|
].filter(i=>i)
|
|
139
49
|
}
|