jufubao-base 1.0.297-beta23 → 1.0.297

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.
@@ -1,220 +1,22 @@
1
- "use strict";
1
+ 'use strict';
2
2
 
3
3
  module.exports = {
4
- getConsumpCode: {
5
- payment_code: "h.161.v80313631074495",
6
- expiration_time: 1763083163,
7
- expiration_sec: 60,
8
- temp_order_id: "quickpay-5000433-XhWJn-MdO8Iheuu6lgSAX",
9
- confirm_notice: true,
10
- notice: "请询问店员核销金额",
11
- cash_order_id: "",
12
- code_url:
13
- "/common/v1/image/qrcode?code_content=h.161.v80313631074495&size=240",
14
- plus_discount: 8100,
15
- is_st_flow: "Y",
16
- barcode_url: "/common/v1/image/barcode?code_content=h.161.v80313631074495",
17
- shop_name: "分账测试门店-固定标签",
18
- resource_shop_name: "分账测试门店-固定标签",
19
- qrcode_icon:
20
- "https://img1.jufubao.cn/uploads/20230802/7a4f98f153282ef1cb089393c5b7f64e.png?x-oss-process=style/size8&ver=1735028642567",
21
- shop_icon: "/uploads/20230710/44f645b06fe4da358f7b0ee06259afcd.jpg",
22
- consume_options: [
23
- {
24
- consume_mode: "WB",
25
- desc: "到店扫码消费任意金额可用",
26
- icon: "iconduihuan",
27
- show_price: ""
28
- },
29
- {
30
- consume_mode: "JHD",
31
- desc: "到店消费任意金额可用",
32
- icon: "iconduihuan",
33
- show_price: ""
34
- },
35
- {
36
- consume_mode: "QP",
37
- desc: "到店展码消费任意金额可用",
38
- icon: "iconduihuan",
39
- show_price: ""
40
- }
41
- ],
42
- default_consume_type: "QP",
43
- request_id: "3346ee37f1347085"
44
- },
45
4
 
46
- getConsumpCodeScanStatus: {
47
- status: "P",
48
- message: "",
49
- order_data:
50
- '{"total_amount":"0","pay_expire_time":"0","message":"","status":"P","cash_order_id":"","user_id":"5000358","channel_order_id":"","cart_order_id":""}',
51
- seconds: 0,
52
- request_id: "a54ac53ad31312d6"
53
- },
5
+ getConsumpCode: { "payment_code": "h.161.v71913434717194", "expiration_time": 1744971193, "expiration_sec": 60, "temp_order_id": "quickpay-5000358-DBeMnvrvInuINYeTqbCXw", "confirm_notice": false, "notice": "", "cash_order_id": "", "code_url": "\/common\/v1\/image\/qrcode?code_content=h.161.v71913434717194&size=240", "plus_discount": 0, "is_st_flow": "张三", "barcode_url": "\/common\/v1\/image\/barcode?code_content=h.161.v71913434717194", "shop_name": "六九豆浆饺子(石门市场店)", "request_id": "52ebf80c255ebcb5" },
54
6
 
55
- getConsumpListUserPayChannel: {
56
- list: [
57
- {
58
- channel_provider_id: "1rRq74ACKJj5nIx5CgLpb",
59
- channel_provider_name: "微信",
60
- channel_code: "wxpay",
61
- channel_logo:
62
- "https://jfb-public-images.oss-cn-qingdao.aliyuncs.com/system-paychannel-logo-wxpay.png?x-oss-process=style/200_200"
63
- }
64
- ],
65
- request_id: "e142d26c3d24c060"
66
- },
7
+ getConsumpCodeScanStatus: { "status": "P", "message": "", "order_data": "{\"total_amount\":\"0\",\"pay_expire_time\":\"0\",\"message\":\"\",\"status\":\"P\",\"cash_order_id\":\"\",\"user_id\":\"5000358\",\"channel_order_id\":\"\",\"cart_order_id\":\"\"}", "seconds": 0, "request_id": "a54ac53ad31312d6" },
67
8
 
68
- batchConsumpUseCardCreated: {
69
- request_order_id: "quickpay-5000358-DBeMnvrvInuINYeTqbCXw",
70
- request_id: "e17499843ece44b1"
71
- },
9
+ getConsumpListUserPayChannel: { "list": [{ "channel_provider_id": "1rRq74ACKJj5nIx5CgLpb", "channel_provider_name": "微信", "channel_code": "wxpay", "channel_logo": "https:\/\/jfb-public-images.oss-cn-qingdao.aliyuncs.com\/system-paychannel-logo-wxpay.png?x-oss-process=style\/200_200" }], "request_id": "e142d26c3d24c060" },
72
10
 
73
- getConsumpAsyncSubmitStatus: {
74
- hand_status: "U",
75
- hand_status_msg: "异步下单中",
76
- order_id: "",
77
- pay_order_id: "",
78
- need_pay_price: "0",
79
- request_id: "fddff0af4216825d"
80
- },
11
+ batchConsumpUseCardCreated: { "request_order_id": "quickpay-5000358-DBeMnvrvInuINYeTqbCXw", "request_id": "e17499843ece44b1" },
81
12
 
82
- getConsumpShopList: {
83
- categories: [
84
- { label: "商超", value: 100518 },
85
- { label: "蛋糕店", value: 100519 }
86
- ],
87
- namespaces: [{ label: "蛋糕(勿改)", value: "cake" }],
88
- brands: [
89
- {
90
- label: "测试1111",
91
- value: 14,
92
- icon: "/uploads/20230324/3265afeb6a1f2a94f25c968a09275574.png"
93
- },
94
- {
95
- label: "好利来",
96
- value: 3,
97
- icon: "/uploads/20230524/b18190a6d80ae31a84a1ed53fc0dc8aa.jpg"
98
- }
99
- ],
100
- list: [
101
- {
102
- brand_id: 14,
103
- brand_name: "测试1111",
104
- brand_type: "MA",
105
- business_status: "OPEN_BUSINESS",
106
- consume_mode: ["SELL"],
107
- consume_mode_name: "",
108
- distance: "37km",
109
- distance_conversion: "36.8km",
110
- default_consume_type: "CV",
111
- consume_type: ["CV"],
112
- is_support_jhd: false,
113
- address: "通州区马驹桥镇北京通州区",
114
- province_name: "",
115
- city_name: "",
116
- area_name: "",
117
- street_name: "",
118
- phone: "13152565898",
119
- resource_shop_id: 8003538,
120
- exts_params:
121
- "eyJyZXNvdXJjZV9zaG9wX2lkIjo4MDAzNTM4LCJzaG9wX2lkIjoxMDUwMzQyLCJ2ZXJzaW9uIjoyfQ",
122
- resource_shop_name: "新建559",
123
- shop_icon:
124
- "https://sandbox-img2.jufubao.cn/uploads/20230324/3265afeb6a1f2a94f25c968a09275574.png",
125
- shop_id: 1050342,
126
- shop_tags: [],
127
- stars: 0,
128
- time_slot_name: "-",
129
- business_code: "",
130
- longitude: "116.6634126629373",
131
- latitude: "39.91601857510662",
132
- discount_ratio: 7200
133
- },
134
- {
135
- brand_id: 14,
136
- brand_name: "测试1111",
137
- brand_type: "MA",
138
- business_status: "CLOSED",
139
- consume_mode: ["SELL"],
140
- consume_mode_name: "",
141
- distance: "38km",
142
- distance_conversion: "37.9km",
143
- default_consume_type: "CV",
144
- consume_type: ["CV"],
145
- is_support_jhd: true,
146
- address: "顺义区东六环与顺于路交叉口东150米",
147
- province_name: "",
148
- city_name: "",
149
- area_name: "",
150
- street_name: "",
151
- phone: "(010)89430806",
152
- resource_shop_id: 8003489,
153
- exts_params:
154
- "eyJyZXNvdXJjZV9zaG9wX2lkIjo4MDAzNDg5LCJzaG9wX2lkIjoxMTUzNTIwLCJ2ZXJzaW9uIjoyfQ",
155
- resource_shop_name: "六九豆浆饺子(石门市场店)",
156
- shop_icon:
157
- "https://sandbox-img2.jufubao.cn/uploads/20230324/3265afeb6a1f2a94f25c968a09275574.png",
158
- shop_id: 1153520,
159
- shop_tags: [],
160
- stars: 0,
161
- time_slot_name: "-",
162
- business_code: "",
163
- longitude: "116.65307505295904",
164
- latitude: "40.07088305940431",
165
- discount_ratio: 7200
166
- }
167
- ],
168
- total_size: 6,
169
- next_page_token: "2",
170
- request_id: "d7071936733ed3f5"
171
- },
13
+ getConsumpAsyncSubmitStatus: { "hand_status": "U", "hand_status_msg": "异步下单中", "order_id": "", "pay_order_id": "", "need_pay_price": "0", "request_id": "fddff0af4216825d" },
14
+
15
+ getConsumpShopList: {"categories":[{"label":"商超","value":100518},{"label":"蛋糕店","value":100519}],"namespaces":[{"label":"蛋糕(勿改)","value":"cake"}],"brands":[{"label":"测试1111","value":14,"icon":"\/uploads\/20230324\/3265afeb6a1f2a94f25c968a09275574.png"},{"label":"好利来","value":3,"icon":"\/uploads\/20230524\/b18190a6d80ae31a84a1ed53fc0dc8aa.jpg"}],"list":[{"brand_id":14,"brand_name":"测试1111","brand_type":"MA","business_status":"OPEN_BUSINESS","consume_mode":["SELL"],"consume_mode_name":"","distance":"37km","distance_conversion":"36.8km","default_consume_type":"CV","consume_type":["CV"],"is_support_jhd":false,"address":"通州区马驹桥镇北京通州区","province_name":"","city_name":"","area_name":"","street_name":"","phone":"13152565898","resource_shop_id":8003538,"exts_params":"eyJyZXNvdXJjZV9zaG9wX2lkIjo4MDAzNTM4LCJzaG9wX2lkIjoxMDUwMzQyLCJ2ZXJzaW9uIjoyfQ","resource_shop_name":"新建559","shop_icon":"https://sandbox-img2.jufubao.cn\/uploads\/20230324\/3265afeb6a1f2a94f25c968a09275574.png","shop_id":1050342,"shop_tags":[],"stars":0,"time_slot_name":"-","business_code":"","longitude":"116.6634126629373","latitude":"39.91601857510662","discount_ratio":7200},{"brand_id":14,"brand_name":"测试1111","brand_type":"MA","business_status":"CLOSED","consume_mode":["SELL"],"consume_mode_name":"","distance":"38km","distance_conversion":"37.9km","default_consume_type":"CV","consume_type":["CV"],"is_support_jhd":true,"address":"顺义区东六环与顺于路交叉口东150米","province_name":"","city_name":"","area_name":"","street_name":"","phone":"(010)89430806","resource_shop_id":8003489,"exts_params":"eyJyZXNvdXJjZV9zaG9wX2lkIjo4MDAzNDg5LCJzaG9wX2lkIjoxMTUzNTIwLCJ2ZXJzaW9uIjoyfQ","resource_shop_name":"六九豆浆饺子(石门市场店)","shop_icon":"https://sandbox-img2.jufubao.cn\/uploads\/20230324\/3265afeb6a1f2a94f25c968a09275574.png","shop_id":1153520,"shop_tags":[],"stars":0,"time_slot_name":"-","business_code":"","longitude":"116.65307505295904","latitude":"40.07088305940431","discount_ratio":7200}],"total_size":6,"next_page_token":"2","request_id":"d7071936733ed3f5"},
172
16
 
173
- getConsumpSettleMainInfo: {
174
- shop_id: 1037266,
175
- shop_logo: "/uploads/20230710/44f645b06fe4da358f7b0ee06259afcd.jpg",
176
- shop_name: "a加盟商-185",
177
- shop_brand: 100003,
178
- shop_partner_name: "A加盟商-余额测试",
179
- settle_tag_list: [
180
- {
181
- label: "幸福西饼、goodlike品牌",
182
- value: 262,
183
- price: 0,
184
- price_yuan: "0.00",
185
- is_static_price: false,
186
- icon_url:
187
- "https://sandbox-img.jufubao.cn/uploads/20230728/70f4dd90cdf2681e71ccf41d332d71a0.jpeg"
188
- }
189
- ],
190
- request_id: "a4a6cfe9db905597"
191
- },
17
+ getConsumpSettleMainInfo: { "shop_id": 1037266, "shop_logo": "\/uploads\/20230710\/44f645b06fe4da358f7b0ee06259afcd.jpg", "shop_name": "a加盟商-185", "shop_brand": 100003, "shop_partner_name": "A加盟商-余额测试", "settle_tag_list": [{ "label": "幸福西饼、goodlike品牌", "value": 262, "price": 0, "price_yuan": "0.00", "is_static_price": false, "icon_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230728\/70f4dd90cdf2681e71ccf41d332d71a0.jpeg" }], "request_id": "a4a6cfe9db905597" },
192
18
 
193
- getConsumpBaseUserInfo: {
194
- user_name: "",
195
- user_code: "WuE5Wotf08",
196
- nickname: "张三",
197
- real_name: "",
198
- head_url:
199
- "https://thirdwx.qlogo.cn/mmopen/vi_32/AOqEDeiaxss8GR4jD1GicIgyqWSOZV8xN23Iw3DOzFjVBzTFbdv21X7u9ZASQJYsTNm07XSq6ebzp4K4qu1JT26qGZ0qYFMe1nHdQjFZib83Fg/132",
200
- province_code: "",
201
- city_code: "",
202
- province_name: "",
203
- city_name: "",
204
- sex: "1",
205
- sex_name: "男",
206
- birthday_date: "2025-04-16",
207
- phone_number: "177****7945",
208
- show_user_name: "张三",
209
- user_level: "VIP",
210
- vip_expire_time: 1776157293,
211
- request_id: "f1dbb1c0bb8da893"
212
- },
19
+ getConsumpBaseUserInfo: { "user_name": "", "user_code": "WuE5Wotf08", "nickname": "张三", "real_name": "", "head_url": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/AOqEDeiaxss8GR4jD1GicIgyqWSOZV8xN23Iw3DOzFjVBzTFbdv21X7u9ZASQJYsTNm07XSq6ebzp4K4qu1JT26qGZ0qYFMe1nHdQjFZib83Fg\/132", "province_code": "", "city_code": "", "province_name": "", "city_name": "", "sex": "1", "sex_name": "男", "birthday_date": "2025-04-16", "phone_number": "177****7945", "show_user_name": "张三", "user_level": "VIP", "vip_expire_time": 1776157293, "request_id": "f1dbb1c0bb8da893" },
213
20
 
214
- addConsumpCashierTempOrderData: {
215
- cart_order_id: "c08f38347ec8bc5b",
216
- request_id: "779bf62e988587ce"
217
- },
218
-
219
- getMyPayOrderConfig: {"configs":[{"pay_method":"card","pay_method_name":"会享卡","priority_rules":["end_time","bind_time"],"options":[{"label":"优先使用即将到期","value":"end_time","wallet_amount":0},{"label":"按绑定时间","value":"bind_time","wallet_amount":0}],"wallet_amount":0},{"pay_method":"wallet","pay_method_name":"余额","priority_rules":[],"options":[{"label":"综合元宝","value":"fVun9HAuF47_waUq8F0RA","wallet_amount":0}],"wallet_amount":0}],"request_id":"5365d0f0e73f8c69"}
220
- };
21
+ addConsumpCashierTempOrderData: { "cart_order_id": "c08f38347ec8bc5b", "request_id": "779bf62e988587ce" }
22
+ }
@@ -26,7 +26,10 @@
26
26
  </view>
27
27
  </view>
28
28
  <view v-else class="entry_list" :style="entryStyle">
29
- <view v-for="(item,i) in entryList" :key="i"
29
+ <view
30
+ v-if="entryList.length > 0"
31
+ v-for="(item,i) in entryList"
32
+ :key="i"
30
33
  class="entry_item"
31
34
  :class="'row_num_'+rowNum"
32
35
  @click="toLink(item)"
@@ -35,6 +38,11 @@
35
38
  <image v-if="rowNum == 2" :src="item.image_url2" mode="widthFix"/>
36
39
  <image v-if="rowNum == 3" :src="item.image_url3" mode="widthFix"/>
37
40
  </view>
41
+ <xd-no-data
42
+ icon-type="empty"
43
+ :scale-size="2"
44
+ v-if="entryList.length === 0"
45
+ >暂无数据</xd-no-data>
38
46
  </view>
39
47
  </view>
40
48
  </view>
@@ -49,11 +57,13 @@
49
57
  import componentsMixins from "@/mixins/componentsMixins";
50
58
  import extsMixins from "@/mixins/extsMixins";
51
59
  import getServiceUrl from "@/common/getServiceUrl";
60
+ import XdNoData from "@/components/XdNoData/XdNoData.vue";
52
61
  import {mapState} from "vuex";
53
62
  export default {
54
63
  name: "JfbBaseEntry",
55
64
  components: {
56
- XdFontIcon
65
+ XdFontIcon,
66
+ XdNoData
57
67
  },
58
68
  mixins: [
59
69
  componentsMixins, extsMixins, JfbBaseEntryMixin
@@ -491,6 +491,11 @@
491
491
  //登录成功调整地址优先级
492
492
  this.inCallback = inCallback || this.allEntryPath || this.settings.index;
493
493
 
494
+ //检查是否为小程序环境
495
+ //#ifdef H5
496
+ if(this.jfbAuthorize.checkIsH5ToMpEnv(this, this.inCallback ,'card')) return;
497
+ // #endif
498
+
494
499
  this.getCardList();
495
500
  },
496
501
  /**
@@ -1,176 +0,0 @@
1
- 'use strict';
2
- import { jfbRootExec } from "@/utils/xd.event";
3
- export default {
4
- data() {
5
- return {
6
- settle_tag_list: [],
7
- settle_tag_list_status: false,
8
- tag_id: "",
9
- price: "",
10
- total_price: "",
11
- num: 1,
12
- }
13
- },
14
- computed: {
15
- curTag() {
16
- return this.settle_tag_list.find(item => item.value === this.tag_id) || {}
17
- },
18
- curTagPrice() {
19
- const curTag = this.curTag;
20
- if (this.$xdUniHelper.isEmpty(curTag)) return 0;
21
- if (curTag.is_static_price) {
22
- return curTag.price_yuan;
23
- } else {
24
- return this.total_price;
25
- }
26
- },
27
- },
28
- methods: {
29
- // 核销金额输入框事件
30
- handlerPrice(e) {
31
- this.$nextTick(() => {
32
- this.total_price = e.detail.value.replace(/^\D*([0-9]\d*\.?\d{0,2})?.*$/, '$1');
33
- if (this.total_price > 10000) {
34
- this.total_price = 10000
35
- uni.showToast(
36
- {
37
- title: '核销金额不能超过10000',
38
- icon: 'none'
39
- }
40
- )
41
- }
42
- })
43
- },
44
- //选卡弹出项
45
- useCardPop(data) {
46
- return new Promise((resolve, reject) => {
47
- uni.showModal({
48
- title: '提示',
49
- content: data.msg,
50
- // confirmText: data.confirm_text,
51
- // cancelText: data.cancel_text,
52
- success: function (res) {
53
- if (res.confirm) {
54
- resolve(2);
55
- } else if (res.cancel) {
56
- resolve();
57
- }
58
- },
59
- fail: function (res) {
60
- reject(res);
61
- }
62
- });
63
- })
64
- },
65
- //聚好兑 - 创建临时订单数据,并跳转支付页面
66
- toPayOrder(options = {}) {
67
- let { tag_id, total_price, curTag, num = 1, shop_id } = this;
68
- let err_tip = "";
69
- if (!curTag.is_static_price) this.price = total_price;
70
- if (curTag.is_static_price) {
71
- if (total_price > 10000) {
72
- err_tip = '金额不能超过10000'
73
- }
74
- }
75
- let price = this.price;
76
- if (!price) err_tip = "请填写正确的提货金额";
77
- if (!tag_id) err_tip = "请选择结算标签";
78
- if (err_tip) {
79
- uni.showToast({
80
- title: err_tip,
81
- icon: 'none'
82
- });
83
- return false;
84
- }
85
- if (this.total_price == 0) {
86
- uni.showToast(
87
- {
88
- title: '核销金额不能为0',
89
- icon: 'none'
90
- }
91
- )
92
- return
93
- }
94
- jfbRootExec("addConsumpCashierTempOrderData", {
95
- vm: this,
96
- data: {
97
- shop_id: this.shop_id,
98
- settle_tag_id: this.tag_id,
99
- num: this.num,
100
- settle_tag_price: this.curTagPrice,
101
- total_price: this.total_price,
102
- ...options
103
- }
104
- })
105
- .then(res => {
106
- if (res.confirm_notice) {
107
- return this.useCardPop(res).then(data => {
108
- if (data == 2) {
109
- this.toPayOrder({
110
- is_ignore_unique_check: "Y"
111
- })
112
- }
113
- })
114
- } else {
115
- this.price = "";
116
- let params = {
117
- ...this.options,
118
- price: price,
119
- num: num,
120
- tag: tag_id,
121
- shop_id: shop_id,
122
- cart_order_id: res.cart_order_id
123
- };
124
- params = this.$xdUniHelper.jsonToParams(params)
125
- this.$xdUniHelper.navigateTo({
126
- url: this.cashPayPath + `?${params}`
127
- })
128
- }
129
- })
130
- .catch(error => {
131
- console.error(error);
132
- })
133
- },
134
- //固定标签数量变化
135
- handleNumberChange(num) {
136
- let curTag = this.curTag;
137
- this.total_price = this.$xdUniHelper.multiplyFloatNumber(curTag.price_yuan, num);
138
- },
139
- //选择核销标签
140
- handlerTagRadio(item) {
141
- this.tag_id = item.value;
142
- this.canEdit = !item.is_static_price;
143
- this.num = 1;
144
- if (item.is_static_price) {
145
- this.total_price = item.price_yuan
146
- this.price = item.price_yuan
147
- } else {
148
- this.total_price = "";
149
- this.price = "";
150
- }
151
- },
152
- //门店核销 - 展示主界面数据 - 核销标签列表
153
- getSettleTagList() {
154
- this.$xdShowLoading({});
155
-
156
- jfbRootExec("getConsumpSettleMainInfo", {
157
- vm: this,
158
- data: {
159
- shop_id: this.shop_id,
160
- }
161
- }).then(res => {
162
- this.$xdHideLoading();
163
- const { settle_tag_list } = res;
164
- this.settle_tag_list = settle_tag_list;
165
- if (settle_tag_list.length > 0) {
166
- this.handlerTagRadio(settle_tag_list[0]);
167
- this.settle_tag_list_status = false;
168
- }
169
- else this.settle_tag_list_status = true;
170
- }).catch(err => {
171
- this.$xdHideLoading();
172
- this.$xdLog.catch(error)
173
- })
174
- },
175
- }
176
- }