jufubao-base 1.0.56-beta9 → 1.0.56

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.
@@ -56,6 +56,17 @@
56
56
  </view>
57
57
  </view>
58
58
  </view>
59
+ <!--settle-->
60
+ <view class="settle" v-if="info.settleInfo !== null" :style="{marginBottom: jfbListSpacing + 'rpx',}">
61
+ <view class="settle-item" v-for="(settle,index) in info.settleInfo" :key="index">
62
+ <view>{{settle.label}}:</view>
63
+ <view v-if="settle.type === 'price'">
64
+ <xd-unit :price="settle.value" unit="" :is-old="false"></xd-unit>
65
+ </view>
66
+ <view v-else v-html="settle.value"></view>
67
+ </view>
68
+ </view>
69
+ <!--settle end-->
59
70
  <view class="jfb-base-success__body-other">
60
71
  <view
61
72
  v-if="info.codes && info.codes.length > 0 && is_show_code === 'Y'"
@@ -111,22 +122,8 @@
111
122
  v-for="(item, index) in info.codes"
112
123
  :key="index"
113
124
  >
114
- <view
115
- style="
116
- color: #999;
117
- background: #eee;
118
- border-radius: 20rpx;
119
- width: 80rpx;
120
- text-align: center;
121
- vertical-align: middle;
122
- font-size: 24rpx;
123
- padding: 10rpx 0;
124
- margin: 32rpx 0 32rpx 32rpx;
125
- "
126
- >{{
127
- info.codes.length > 10 ? index + 1 : `0${index + 1}`
128
- }}</view
129
- >
125
+ <view class="codes-index">{{info.codes.length > 10 ? index + 1 : `0${index + 1}` }}</view>
126
+ <!--codes-->
130
127
  <view
131
128
  class="jfb-base-success__body-card jfb-base-success__body-num"
132
129
  v-if="item.show_type === 'text' && !item.password"
@@ -137,31 +134,27 @@
137
134
  <view
138
135
  class="jfb-base-success__body-num-info-copy"
139
136
  @click="copy(item.code)"
140
- >复制</view
141
- >
137
+ >复制</view>
142
138
  <view
143
- v-if="item.code_end_time"
139
+ v-if="item['code_end_time']"
144
140
  class="jfb-base-success__body-cashier-code"
145
141
  :style="{
146
142
  borderColor: mainColor,
147
143
  color: mainColor,
148
144
  background: bgColor,
149
145
  }"
150
- >
151
- {{ item.code_end_time }}
152
- </view>
146
+ >{{ item['code_end_time'] }}</view>
153
147
  </view>
154
-
155
148
  <view
156
149
  class="jfb-base-success__body-card"
157
150
  v-if="item.show_type === 'text' && item.password"
158
151
  >
159
152
  <view
160
153
  class="jfb-base-success__body-num"
161
- style="
162
- border-bottom: 1px solid #f2f2f2;
163
- padding-bottom: 48rpx;
164
- "
154
+ :style="{
155
+ 'borderBottom': '1px solid #f2f2f2',
156
+ 'paddingBottom': '48rpx'
157
+ }"
165
158
  >
166
159
  <view class="jfb-base-success__body-num-info">
167
160
  <view>{{ item.can_read_code }}</view>
@@ -169,12 +162,11 @@
169
162
  <view
170
163
  class="jfb-base-success__body-num-info-copy"
171
164
  @click="copy(item.code)"
172
- >复制</view
173
- >
165
+ >复制</view>
174
166
  </view>
175
167
  <view
176
168
  class="jfb-base-success__body-num"
177
- style="padding-top: 48rpx"
169
+ :style="{paddingTop: '48rpx'}"
178
170
  >
179
171
  <view class="jfb-base-success__body-num-info">
180
172
  <view>{{ item.can_read_password }}</view>
@@ -182,10 +174,9 @@
182
174
  <view
183
175
  class="jfb-base-success__body-num-info-copy"
184
176
  @click="copy(item.password)"
185
- >复制</view
186
- >
177
+ >复制</view>
187
178
  <view
188
- v-if="item.code_end_time"
179
+ v-if="item['code_end_time']"
189
180
  class="jfb-base-success__body-cashier-code"
190
181
  :style="{
191
182
  borderColor: mainColor,
@@ -193,11 +184,10 @@
193
184
  background: bgColor,
194
185
  }"
195
186
  >
196
- {{ item.code_end_time }}
187
+ {{ item['code_end_time'] }}
197
188
  </view>
198
189
  </view>
199
190
  </view>
200
-
201
191
  <view
202
192
  class="jfb-base-success__body-card"
203
193
  v-if="item.show_type === 'qrcode'"
@@ -209,10 +199,9 @@
209
199
  <view
210
200
  class="jfb-base-success__body-num-info-copy"
211
201
  @click="handleShowCode(item)"
212
- >查看二维码</view
213
- >
202
+ >查看二维码</view>
214
203
  <view
215
- v-if="item.code_end_time"
204
+ v-if="item['code_end_time']"
216
205
  class="jfb-base-success__body-cashier-code"
217
206
  :style="{
218
207
  borderColor: mainColor,
@@ -220,11 +209,10 @@
220
209
  background: bgColor,
221
210
  }"
222
211
  >
223
- {{ item.code_end_time }}
212
+ {{ item['code_end_time'] }}
224
213
  </view>
225
214
  </view>
226
215
  </view>
227
-
228
216
  <view
229
217
  class="jfb-base-success__body-card"
230
218
  v-if="item.show_type === 'barcode'"
@@ -236,10 +224,9 @@
236
224
  <view
237
225
  class="jfb-base-success__body-num-info-copy"
238
226
  @click="handleShowCode(item)"
239
- >查看一维码</view
240
- >
227
+ >查看一维码</view>
241
228
  <view
242
- v-if="item.code_end_time"
229
+ v-if="item['code_end_time']"
243
230
  class="jfb-base-success__body-cashier-code"
244
231
  :style="{
245
232
  borderColor: mainColor,
@@ -247,11 +234,10 @@
247
234
  background: bgColor,
248
235
  }"
249
236
  >
250
- {{ item.code_end_time }}
237
+ {{ item['code_end_time'] }}
251
238
  </view>
252
239
  </view>
253
240
  </view>
254
-
255
241
  <view
256
242
  class="jfb-base-success__body-card jfb-base-success__body-num"
257
243
  v-if="item.show_type === 'url'"
@@ -263,14 +249,14 @@
263
249
  <view
264
250
  class="jfb-base-success__body-num-info-copy"
265
251
  @click="handleToLink(item.code)"
266
- >访问</view>
252
+ >访问</view>
267
253
  </view>
268
254
  <view
269
255
  class="jfb-base-success__body-num-info-copy"
270
256
  @click="copy(item.code)"
271
257
  >复制</view>
272
258
  <view
273
- v-if="item.code_end_time"
259
+ v-if="item['code_end_time']"
274
260
  class="jfb-base-success__body-cashier-code"
275
261
  :style="{
276
262
  borderColor: mainColor,
@@ -278,9 +264,10 @@
278
264
  background: bgColor,
279
265
  }"
280
266
  >
281
- {{ item.code_end_time }}
267
+ {{ item['code_end_time'] }}
282
268
  </view>
283
269
  </view>
270
+ <!--codes end-->
284
271
  </view>
285
272
  </view>
286
273
  </view>
@@ -330,6 +317,7 @@
330
317
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
331
318
  import XdDailog from "@/components/XdDailog/XdDailog";
332
319
  import XdButton from "@/components/XdButton/XdButton";
320
+ import XdUnit from "@/components/XdUnit/XdUnit";
333
321
  import { jfbRootExec } from "@/utils/xd.event";
334
322
  import JfbBaseSuccessMixin from "./JfbBaseSuccessMixin";
335
323
  import componentsMixins from "@/mixins/componentsMixins";
@@ -367,6 +355,7 @@ export default {
367
355
  XdDailog,
368
356
  XdButton,
369
357
  XdContentXss,
358
+ XdUnit
370
359
  },
371
360
  mixins: [componentsMixins, extsMixins, JfbBaseSuccessMixin],
372
361
  data() {
@@ -499,7 +488,7 @@ export default {
499
488
  this.handleOrderResolve(res);
500
489
  })
501
490
  .catch((err) => {
502
- console.log(err, "err");
491
+ this.$xdLog.catch(err)
503
492
  });
504
493
  },
505
494
 
@@ -565,11 +554,17 @@ export default {
565
554
  info["productDetail"] = res.content;
566
555
  })
567
556
  .catch((err) => {
568
- console.log(err, "err");
557
+ this.$xdLog.catch(err)
569
558
  });
570
559
  }
571
560
  this.info = info;
572
-
561
+
562
+ //显示核销信息
563
+ info['settleInfo'] = null;
564
+ if(info['settle_info'] && info['settle_info'].length > 0) {
565
+ info['settleInfo'] = info['settle_info']
566
+ }
567
+
573
568
  //订单完成
574
569
  if (this.info.status.status_type === "success") {
575
570
  if (this.timeer) {
@@ -799,4 +794,38 @@ export default {
799
794
  }
800
795
  }
801
796
  }
797
+
798
+ .codes-index {
799
+ color: #999;
800
+ background: #eee;
801
+ border-radius: unit(20, rpx);
802
+ width: unit(80, rpx);
803
+ text-align: center;
804
+ vertical-align: middle;
805
+ font-size: unit(24, rpx);
806
+ padding: unit(10, rpx) 0;
807
+ margin: unit(32, rpx) 0 unit(32, rpx) unit(32, rpx);
808
+ }
809
+
810
+ .settle {
811
+ padding: 0 unit(30, rpx);
812
+ &-item {
813
+ display: flex;
814
+ justify-content: space-between;
815
+ align-items: center;
816
+ font-size: unit(26, rpx);
817
+ line-height: unit(80, rpx);
818
+ border-bottom: 1px solid rgba(238, 238, 238, 1);
819
+ &:last-child {
820
+ border-bottom:0;
821
+ }
822
+
823
+ &>view:first-child {
824
+ color: #666;
825
+ font-size: unit(28, rpx);
826
+ }
827
+ }
828
+
829
+ margin-bottom: unit(20, rpx);
830
+ }
802
831
  </style>
@@ -10,6 +10,11 @@ module.exports = {
10
10
  "comment": "非常感谢您购买我们的产品",
11
11
  "loading": false
12
12
  },
13
+ "settle_info":[
14
+ {"label": "核销门店", "value": "安德鲁森中航城店", "type": "text"},
15
+ {"label": "核销时间", "value": "2023-09-04 19:09:12", "type": "text"},
16
+ {"label": "核销金额", "value": 10000, "type": "price"},
17
+ ],
13
18
  "codes": [
14
19
  {
15
20
  "code": "tp0KPZnFPDJ8Zffw-pY52|323455",
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+ import {mapActions, mapMutations} from 'vuex';
3
+ import storage from "@/common/storage";
4
+ import getServiceUrl from "@/common/getServiceUrl";
5
+
6
+ export default {
7
+ data() {
8
+ return {
9
+
10
+ }
11
+ },
12
+
13
+ created(){
14
+ debugger
15
+ },
16
+
17
+ methods: {
18
+ stringToNumber(str) {
19
+ let result = 0;
20
+ let len = str.length;
21
+ for (let i = 0; i < len; i++) {
22
+ result = result + str.charCodeAt(i) + i;
23
+ }
24
+ return result;
25
+ },
26
+ getCardThemes(name) {
27
+ let colorLen = this.cardThemesColor.length;
28
+ let imgLen = this.cardThemesImage.length;
29
+ let colorIndex = this.stringToNumber(name) % colorLen;
30
+ let imgIndex = this.stringToNumber(name) % imgLen;
31
+ return {
32
+ color: this.cardThemesColor[colorIndex],
33
+ image: this.cardThemesImage[imgIndex],
34
+ }
35
+ },
36
+ getEntry(codes = [], allEntry = []) {
37
+ //无支持业务线或者未配置业务入口
38
+ if (codes.length === 0 || allEntry.length === 0) return [];
39
+
40
+ let support = [];
41
+ codes.map(bus => {
42
+ allEntry.map(it => {
43
+ it['image_url'] = getServiceUrl(it['image_url'])
44
+ if (bus === it['business_code']) {
45
+ support.push(it);
46
+ }
47
+ })
48
+ });
49
+ return support
50
+ },
51
+ getCardGroupItem(list, allEntry) {
52
+ list.map(item => {
53
+ //设置卡片样式
54
+ item['theme'] = this.getCardThemes(item['card_type_name'] + item['card_type']);
55
+ item['entries'] = this.getEntry(item['business_codes'], allEntry)
56
+ });
57
+ return list
58
+ },
59
+ }
60
+ }