jufubao-base 1.0.116 → 1.0.118
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 +1 -1
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +99 -18
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +1 -1
- package/src/components/JfbBaseCardInfo/Attr.js +21 -0
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +40 -4
- package/src/components/JfbBaseCardInfoEntry/Attr.js +11 -0
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +33 -4
- package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +10 -9
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +10 -10
- package/src/components/JfbBaseConDialog/XdCouCardBind.vue +2 -1
- package/src/components/JfbBaseConList/JfbBaseConList.vue +1 -1
- package/src/components/JfbBaseMySetting/Api.js +43 -0
- package/src/components/JfbBaseMySetting/Attr.js +23 -0
- package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +236 -0
- package/src/components/JfbBaseMySetting/JfbBaseMySettingLess.less +80 -0
- package/src/components/JfbBaseMySetting/JfbBaseMySettingMixin.js +30 -0
- package/src/components/JfbBaseMySetting/Mock.js +5 -0
- package/src/components/JfbBaseMySetting/XdListItem.vue +135 -0
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +33 -8
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +34 -8
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</view>
|
|
17
17
|
<!-- #endif -->
|
|
18
18
|
<view class="jfb-base-card-detail-entry__body" v-if="info!==null">
|
|
19
|
-
<view class="card-list" :style="{
|
|
19
|
+
<!-- <view class="card-list" :style="{
|
|
20
20
|
background: headerBg['color'],
|
|
21
21
|
backgroundSize: '100%'
|
|
22
22
|
}">
|
|
@@ -40,23 +40,44 @@
|
|
|
40
40
|
<view><text>购买其他物品可抵:</text><text>{{info.other_card_point}} {{ info.unit }}</text></view>
|
|
41
41
|
</view>
|
|
42
42
|
</view>
|
|
43
|
-
</view>
|
|
44
|
-
<view class="
|
|
45
|
-
<view>
|
|
46
|
-
<view>
|
|
47
|
-
<
|
|
43
|
+
</view> -->
|
|
44
|
+
<view class="qrcode_card">
|
|
45
|
+
<view class="jfb-base-card-detail-entry__body-qrcode">
|
|
46
|
+
<view class="qrcode_card-title">
|
|
47
|
+
<xd-font-icon style="margin-right: 24rpx;" icon="iconsaoma-02" size="32"></xd-font-icon>
|
|
48
|
+
向商家付款
|
|
49
|
+
</view>
|
|
50
|
+
<view class="barcode_wrap">
|
|
51
|
+
<view>
|
|
52
|
+
<image mode="aspectFit" :src="info.barcode"></image>
|
|
53
|
+
</view>
|
|
54
|
+
</view>
|
|
55
|
+
<view class="qrcode_wrap" style="position: relative">
|
|
56
|
+
<image
|
|
57
|
+
:style="{width: '300rpx', height: '300rpx'}"
|
|
58
|
+
:src="info.card_qrcode"
|
|
59
|
+
></image>
|
|
60
|
+
<image v-if="isBrandLogo" class="logo-icon" :src="brandLogo"></image>
|
|
61
|
+
</view>
|
|
62
|
+
<!-- <view :style="{marginTop: '20rpx'}" v-if="timeStr">消费二维码,有效期为{{ info["card_qrcode_expire"] / 60 }}分钟</view> -->
|
|
63
|
+
<view v-if="timeStr">{{ timeStr }}后自动刷新</view>
|
|
64
|
+
<view class="refresh_wrap" @click="handleRefresh">
|
|
65
|
+
<xd-font-icon icon="iconshuaxin"
|
|
66
|
+
style="margin-right: 24rpx;"
|
|
67
|
+
size="28"></xd-font-icon> 刷新二维码
|
|
48
68
|
</view>
|
|
49
69
|
</view>
|
|
50
|
-
<view
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<
|
|
70
|
+
<view class="card_info">
|
|
71
|
+
<view class="card_type">{{ info['card_type_name'] }}</view>
|
|
72
|
+
<view class="card_sec">券号:{{ info.card_number }}</view>
|
|
73
|
+
<view class="card_sec">有效期:{{ info.end_time }}</view>
|
|
74
|
+
<view class="card_sec">余额:{{ info.card_point }}{{ info.unit }}</view>
|
|
75
|
+
<view class="card_other" v-if="info.other_card_point && info.card_point_type === 2">
|
|
76
|
+
<text>购买其他物品可抵:</text><text>{{info.other_card_point}} {{ info.unit }}</text>
|
|
77
|
+
</view>
|
|
56
78
|
</view>
|
|
57
|
-
<view :style="{marginTop: '20rpx'}" v-if="timeStr">消费二维码,有效期为{{ info["card_qrcode_expire"] / 60 }}分钟</view>
|
|
58
|
-
<view v-if="timeStr">距离刷新还有{{ timeStr }}</view>
|
|
59
79
|
</view>
|
|
80
|
+
|
|
60
81
|
<view
|
|
61
82
|
v-if="info.site_entry_settings&&info.site_entry_settings.length>0"
|
|
62
83
|
class="jfb-base-card-detail-entry__body-business"
|
|
@@ -287,6 +308,11 @@ export default {
|
|
|
287
308
|
// this.$refs["pwPay"].clearPwd();
|
|
288
309
|
});
|
|
289
310
|
},
|
|
311
|
+
handleRefresh(){
|
|
312
|
+
clearInterval(this.timeer);
|
|
313
|
+
this.detail();
|
|
314
|
+
// this.refrush();
|
|
315
|
+
},
|
|
290
316
|
refrush() {
|
|
291
317
|
if (this.stopTimer) return;
|
|
292
318
|
if (this.time >= this.maxTime) {
|
|
@@ -558,6 +584,37 @@ export default {
|
|
|
558
584
|
.jfb-base-card-detail-entry {
|
|
559
585
|
&__body {
|
|
560
586
|
color: #333;
|
|
587
|
+
|
|
588
|
+
.qrcode_card{
|
|
589
|
+
background-color: #FF2121;
|
|
590
|
+
border-radius: 24rpx;
|
|
591
|
+
padding: 24rpx;
|
|
592
|
+
&-title{
|
|
593
|
+
display: flex;
|
|
594
|
+
font-size: 32rpx;
|
|
595
|
+
}
|
|
596
|
+
.card_info{
|
|
597
|
+
color: #FFFFFF;
|
|
598
|
+
font-size: 28rpx;
|
|
599
|
+
padding-left: 40rpx;
|
|
600
|
+
.card_type{
|
|
601
|
+
font-size: 40rpx;
|
|
602
|
+
font-weight: 600;
|
|
603
|
+
margin-top: 70rpx;
|
|
604
|
+
}
|
|
605
|
+
.card_sec{
|
|
606
|
+
margin: 12rpx 0;
|
|
607
|
+
}
|
|
608
|
+
.card_other{
|
|
609
|
+
background-color: rgba(255,255,255, 0.2);
|
|
610
|
+
border-radius: 8rpx;
|
|
611
|
+
padding: 8rpx 20rpx;
|
|
612
|
+
display: inline-block;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
|
|
561
618
|
.logo-icon {
|
|
562
619
|
width: unit(100, rpx) !important;
|
|
563
620
|
height: unit(100, rpx) !important;
|
|
@@ -784,9 +841,20 @@ export default {
|
|
|
784
841
|
line-height: unit(36, rpx);
|
|
785
842
|
background: #fff;
|
|
786
843
|
border-radius: unit(16,rpx);
|
|
787
|
-
|
|
788
|
-
padding: unit(20,rpx) unit(70,rpx) unit(70,rpx) unit(70,rpx);
|
|
844
|
+
padding: unit(20,rpx) unit(70,rpx) 0 unit(70,rpx);
|
|
789
845
|
color: #000;
|
|
846
|
+
position: relative;
|
|
847
|
+
&::after{
|
|
848
|
+
content: " ";
|
|
849
|
+
position: absolute;
|
|
850
|
+
left: 0;
|
|
851
|
+
bottom: -40rpx;
|
|
852
|
+
width: 100%;
|
|
853
|
+
height: 100rpx;
|
|
854
|
+
background: #FFFFFF;
|
|
855
|
+
border-radius: 100%;
|
|
856
|
+
z-index: 1;
|
|
857
|
+
}
|
|
790
858
|
|
|
791
859
|
& > view {
|
|
792
860
|
// margin-bottom: unit(20, rpx);
|
|
@@ -795,8 +863,21 @@ export default {
|
|
|
795
863
|
margin-bottom: 0;
|
|
796
864
|
}
|
|
797
865
|
}
|
|
866
|
+
.refresh_wrap{
|
|
867
|
+
width: 300rpx;
|
|
868
|
+
height: 80rpx;
|
|
869
|
+
display: flex;
|
|
870
|
+
align-items: center;
|
|
871
|
+
border: 1px solid #999999;
|
|
872
|
+
color: #999999;
|
|
873
|
+
border-radius: 40rpx;
|
|
874
|
+
justify-content: center;
|
|
875
|
+
margin: 36rpx auto 0;
|
|
876
|
+
position: relative;
|
|
877
|
+
z-index: 10;
|
|
878
|
+
}
|
|
798
879
|
|
|
799
|
-
|
|
880
|
+
.barcode_wrap {
|
|
800
881
|
display: flex;
|
|
801
882
|
justify-content: center;
|
|
802
883
|
align-items: center;
|
|
@@ -819,7 +900,7 @@ export default {
|
|
|
819
900
|
}
|
|
820
901
|
}
|
|
821
902
|
|
|
822
|
-
|
|
903
|
+
.qrcode_wrap {
|
|
823
904
|
display: flex;
|
|
824
905
|
justify-content: center;
|
|
825
906
|
align-items: center;
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
<text>券号:</text>
|
|
178
178
|
<text>{{item.card_number}}</text>
|
|
179
179
|
</view>
|
|
180
|
-
<view @click.stop="toDetail(item)"
|
|
180
|
+
<view @click.stop="toDetail(item)">
|
|
181
181
|
<view>
|
|
182
182
|
<xd-font-icon icon="iconerweima" width="56" height="56" size="50" color="#fff"></xd-font-icon>
|
|
183
183
|
</view>
|
|
@@ -15,6 +15,17 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
inline: false,
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
label: '我的票券跳转地址:', //label
|
|
20
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
21
|
+
valueKey: 'my_card_url', //form[valueKey]
|
|
22
|
+
placeholder: '请选择我的票券跳转地址',
|
|
23
|
+
value: null,
|
|
24
|
+
setting: {
|
|
25
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
26
|
+
},
|
|
27
|
+
inline: false,
|
|
28
|
+
},
|
|
18
29
|
{
|
|
19
30
|
label: '券号框自定义文案:',
|
|
20
31
|
ele: 'el-input',
|
|
@@ -33,5 +44,15 @@ export default {
|
|
|
33
44
|
placeholder: '请输入密码框自定义文案',
|
|
34
45
|
className: 'input80'
|
|
35
46
|
},
|
|
47
|
+
{
|
|
48
|
+
label: "票券过期是否展示余额",
|
|
49
|
+
ele: "xd-radio",
|
|
50
|
+
valueKey: "is_show_balance",
|
|
51
|
+
value: "N",
|
|
52
|
+
list: [
|
|
53
|
+
{label: "是", value: "Y"},
|
|
54
|
+
{label: "否", value: "N"},
|
|
55
|
+
]
|
|
56
|
+
}
|
|
36
57
|
],
|
|
37
58
|
};
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
info[item.key]
|
|
64
64
|
}}</view>
|
|
65
65
|
</view>
|
|
66
|
-
<view class="jfb-base-card-info__body-residue">
|
|
66
|
+
<view v-if="isShowBalance" class="jfb-base-card-info__body-residue">
|
|
67
67
|
<view class="jfb-base-card-info__body-residue-wrap">
|
|
68
68
|
<view class="jfb-base-card-info__body-residue-label">
|
|
69
69
|
<view :style="{ color: '#242424', fontSize: '28rpx' }"
|
|
@@ -166,12 +166,20 @@ export default {
|
|
|
166
166
|
|
|
167
167
|
//页面跳转地址
|
|
168
168
|
backUrl: "",
|
|
169
|
+
is_show_balance: "N", //是否显示余额
|
|
170
|
+
my_card_url: "", //我的票券跳转地址
|
|
169
171
|
};
|
|
170
172
|
},
|
|
171
173
|
computed: {
|
|
172
174
|
prod_bottom() {
|
|
173
175
|
return this.fixedStyle({ height: 0, zIndex: 111 });
|
|
174
176
|
},
|
|
177
|
+
isShowBalance(){
|
|
178
|
+
if(this.info.is_expired === "Y"){
|
|
179
|
+
return this.is_show_balance === "Y";
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
175
183
|
},
|
|
176
184
|
created() {},
|
|
177
185
|
methods: {
|
|
@@ -187,10 +195,11 @@ export default {
|
|
|
187
195
|
vm: this,
|
|
188
196
|
data: {
|
|
189
197
|
card_qrcode: this.qrcode,
|
|
198
|
+
is_show_pop: "Y"
|
|
190
199
|
},
|
|
191
200
|
})
|
|
192
201
|
.then((res) => {
|
|
193
|
-
this.handlerAfterBindCard();
|
|
202
|
+
this.handlerAfterBindCard(res);
|
|
194
203
|
})
|
|
195
204
|
.catch();
|
|
196
205
|
} else {
|
|
@@ -199,15 +208,21 @@ export default {
|
|
|
199
208
|
data: {
|
|
200
209
|
card_password: this.card_password,
|
|
201
210
|
card_number: this.card_number + "",
|
|
211
|
+
is_show_pop: "Y"
|
|
202
212
|
},
|
|
203
213
|
})
|
|
204
214
|
.then((res) => {
|
|
205
|
-
this.handlerAfterBindCard();
|
|
215
|
+
this.handlerAfterBindCard(res);
|
|
206
216
|
})
|
|
207
217
|
.catch();
|
|
208
218
|
}
|
|
209
219
|
},
|
|
210
|
-
handlerAfterBindCard(){
|
|
220
|
+
handlerAfterBindCard(res){
|
|
221
|
+
if(res.pop_info && res.pop_info.pop_code === '1001'){
|
|
222
|
+
this.handleBindConfirm();
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
211
226
|
if(this.hasCon){
|
|
212
227
|
this.toShowCouponDialog();
|
|
213
228
|
this.$bus.$on("onCloseConDialog",(container_id) => {
|
|
@@ -228,6 +243,25 @@ export default {
|
|
|
228
243
|
});
|
|
229
244
|
}
|
|
230
245
|
},
|
|
246
|
+
//卡券已被自己绑定时的弹框
|
|
247
|
+
handleBindConfirm(){
|
|
248
|
+
this.$xdConfirm({
|
|
249
|
+
$vm: this,
|
|
250
|
+
width: '90%',
|
|
251
|
+
content: '您已绑定该票券,无需再次绑定',
|
|
252
|
+
confirmText: '我的票券',
|
|
253
|
+
cancelText: '返回',
|
|
254
|
+
showClose: false,
|
|
255
|
+
success: (res) => {
|
|
256
|
+
if (res.confirm) {
|
|
257
|
+
this.$xdUniHelper.redirectTo({
|
|
258
|
+
url: this.my_card_url || this.backUrl,
|
|
259
|
+
});
|
|
260
|
+
}else{
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
},
|
|
231
265
|
init() {
|
|
232
266
|
this.backUrl = getContainerPropsValue(
|
|
233
267
|
this.container,
|
|
@@ -244,6 +278,8 @@ export default {
|
|
|
244
278
|
"content.card_pwd_placeholder",
|
|
245
279
|
"请输入密码"
|
|
246
280
|
);
|
|
281
|
+
this.is_show_balance = getContainerPropsValue(this.container, 'content.is_show_balance', "N");
|
|
282
|
+
this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
|
|
247
283
|
},
|
|
248
284
|
onJfbLoad(options) {
|
|
249
285
|
this.init();
|
|
@@ -15,6 +15,17 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
inline: false,
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
label: '我的票券跳转地址:', //label
|
|
20
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
21
|
+
valueKey: 'my_card_url', //form[valueKey]
|
|
22
|
+
placeholder: '请选择我的票券跳转地址',
|
|
23
|
+
value: null,
|
|
24
|
+
setting: {
|
|
25
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
26
|
+
},
|
|
27
|
+
inline: false,
|
|
28
|
+
},
|
|
18
29
|
{
|
|
19
30
|
label: '券号框自定义文案:',
|
|
20
31
|
ele: 'el-input',
|
|
@@ -162,6 +162,7 @@ export default {
|
|
|
162
162
|
//页面跳转地址
|
|
163
163
|
backUrl: "",
|
|
164
164
|
headerBg: {},
|
|
165
|
+
my_card_url: "", //我的票券跳转地址
|
|
165
166
|
};
|
|
166
167
|
},
|
|
167
168
|
watch: {
|
|
@@ -204,10 +205,11 @@ export default {
|
|
|
204
205
|
vm: this,
|
|
205
206
|
data: {
|
|
206
207
|
card_qrcode: this.qrcode,
|
|
208
|
+
is_show_pop: "Y",
|
|
207
209
|
},
|
|
208
210
|
})
|
|
209
211
|
.then((res) => {
|
|
210
|
-
this.handlerAfterBindCard();
|
|
212
|
+
this.handlerAfterBindCard(res);
|
|
211
213
|
})
|
|
212
214
|
.catch();
|
|
213
215
|
} else {
|
|
@@ -216,17 +218,24 @@ export default {
|
|
|
216
218
|
data: {
|
|
217
219
|
card_password: this.card_password,
|
|
218
220
|
card_number: this.card_number + "",
|
|
219
|
-
is_show_entry_settings: "Y"
|
|
221
|
+
is_show_entry_settings: "Y",
|
|
222
|
+
is_show_pop: "Y",
|
|
220
223
|
},
|
|
221
224
|
})
|
|
222
225
|
.then((res) => {
|
|
223
226
|
console.log(this.$xdAlert, "this.$xdAlertfsdfs");
|
|
224
|
-
this.handlerAfterBindCard();
|
|
227
|
+
this.handlerAfterBindCard(res);
|
|
225
228
|
})
|
|
226
229
|
.catch();
|
|
227
230
|
}
|
|
228
231
|
},
|
|
229
|
-
handlerAfterBindCard(){
|
|
232
|
+
handlerAfterBindCard(res){
|
|
233
|
+
|
|
234
|
+
if(res.pop_info && res.pop_info.pop_code === '1001'){
|
|
235
|
+
this.handleBindConfirm();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
|
|
230
239
|
if(this.hasCon){
|
|
231
240
|
this.toShowCouponDialog();
|
|
232
241
|
this.$bus.$on("onCloseConDialog",(container_id) => {
|
|
@@ -247,6 +256,25 @@ export default {
|
|
|
247
256
|
});
|
|
248
257
|
}
|
|
249
258
|
},
|
|
259
|
+
//卡券已被自己绑定时的弹框
|
|
260
|
+
handleBindConfirm(){
|
|
261
|
+
this.$xdConfirm({
|
|
262
|
+
$vm: this,
|
|
263
|
+
width: '90%',
|
|
264
|
+
content: '您已绑定该票券,无需再次绑定',
|
|
265
|
+
confirmText: '我的票券',
|
|
266
|
+
cancelText: '返回',
|
|
267
|
+
showClose: false,
|
|
268
|
+
success: (res) => {
|
|
269
|
+
if (res.confirm) {
|
|
270
|
+
this.$xdUniHelper.redirectTo({
|
|
271
|
+
url: this.my_card_url || this.backUrl,
|
|
272
|
+
});
|
|
273
|
+
}else{
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
})
|
|
277
|
+
},
|
|
250
278
|
init() {
|
|
251
279
|
this.backUrl = getContainerPropsValue(
|
|
252
280
|
this.container,
|
|
@@ -263,6 +291,7 @@ export default {
|
|
|
263
291
|
"content.card_pwd_placeholder",
|
|
264
292
|
"请输入密码"
|
|
265
293
|
);
|
|
294
|
+
this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
|
|
266
295
|
},
|
|
267
296
|
onJfbLoad(options) {
|
|
268
297
|
this.init();
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
content-align="left"
|
|
46
46
|
labelPosition="left"
|
|
47
47
|
labelAlign="left"
|
|
48
|
+
v-if="0"
|
|
48
49
|
>
|
|
49
50
|
<view class="flex align-center">
|
|
50
51
|
<xd-form-input
|
|
@@ -207,13 +208,13 @@ export default {
|
|
|
207
208
|
this.$set(this.mergeForm, "valid_token", valid_token);
|
|
208
209
|
},
|
|
209
210
|
handleToSubmit() {
|
|
210
|
-
if (!this.mergeForm.valid_code) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
211
|
+
// if (!this.mergeForm.valid_code) {
|
|
212
|
+
// uni.showToast({
|
|
213
|
+
// title: "验证码不能为空!",
|
|
214
|
+
// icon: "none",
|
|
215
|
+
// });
|
|
216
|
+
// return;
|
|
217
|
+
// }
|
|
217
218
|
this.$xdConfirm({
|
|
218
219
|
title: "是否确认合并卡",
|
|
219
220
|
isHtml: true,
|
|
@@ -237,8 +238,8 @@ export default {
|
|
|
237
238
|
data: {
|
|
238
239
|
from_card_number: this.mergeForm.from_card_number,
|
|
239
240
|
to_card_number: this.mergeForm.to_card_number,
|
|
240
|
-
valid_code: this.mergeForm.valid_code,
|
|
241
|
-
valid_token: this.mergeForm.valid_token
|
|
241
|
+
// valid_code: this.mergeForm.valid_code,
|
|
242
|
+
// valid_token: this.mergeForm.valid_token
|
|
242
243
|
},
|
|
243
244
|
})
|
|
244
245
|
.then((res) => {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</view>
|
|
63
63
|
</view>
|
|
64
64
|
</view>
|
|
65
|
-
<view class="code">
|
|
65
|
+
<view class="code" v-if="0">
|
|
66
66
|
<view>验证码:</view>
|
|
67
67
|
<view>
|
|
68
68
|
<input v-model="valid_code" class="uni-input" placeholder="请输入验证码"/>
|
|
@@ -248,13 +248,13 @@ export default {
|
|
|
248
248
|
},
|
|
249
249
|
|
|
250
250
|
handleToSubmit() {
|
|
251
|
-
if (!this.valid_code) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
251
|
+
// if (!this.valid_code) {
|
|
252
|
+
// uni.showToast({
|
|
253
|
+
// title: "验证码不能为空!",
|
|
254
|
+
// icon: "none",
|
|
255
|
+
// });
|
|
256
|
+
// return;
|
|
257
|
+
// }
|
|
258
258
|
|
|
259
259
|
let outPrice = this.$xdUniHelper.divisionFloatNumber(this.fromSelect.card_point, 100);
|
|
260
260
|
let outHtml = `${this.fromSelect.value}(剩余:${outPrice})`;
|
|
@@ -269,8 +269,8 @@ export default {
|
|
|
269
269
|
let params = {
|
|
270
270
|
from_card_number: this.fromSelect.value,
|
|
271
271
|
to_card_number: this.toSelect.value,
|
|
272
|
-
valid_code: this.valid_code,
|
|
273
|
-
valid_token: this.valid_token
|
|
272
|
+
// valid_code: this.valid_code,
|
|
273
|
+
// valid_token: this.valid_token
|
|
274
274
|
};
|
|
275
275
|
|
|
276
276
|
if (action.confirm) {
|
|
@@ -211,7 +211,7 @@ export default {
|
|
|
211
211
|
backgroundImage: `url(${getServiceUrl(
|
|
212
212
|
item.can_take_num === "Y" ? res.app_coupon_button_see_url : res.app_coupon_button_bg_url
|
|
213
213
|
)})`,
|
|
214
|
-
backgroundSize: "100%",
|
|
214
|
+
backgroundSize: "100% 100%",
|
|
215
215
|
backgroundRepeat: "no-repeat",
|
|
216
216
|
backgroundColor: '',
|
|
217
217
|
margin: "0",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description API模型
|
|
5
|
+
* 建议:Ffff=>模块 Xxxx=>自定义名字
|
|
6
|
+
* 获取单记录(getByIdFfffXxxx)
|
|
7
|
+
* 获取列表记录(getByListFfffXxxx)
|
|
8
|
+
* 添加列表记录(addFfffXxxxx)
|
|
9
|
+
* 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
|
|
10
|
+
* 更新列表记录(updateFfffXxxxx)
|
|
11
|
+
* @type {*[]}
|
|
12
|
+
*/
|
|
13
|
+
module.exports = [
|
|
14
|
+
{
|
|
15
|
+
mapFnName: 'getUserInfo',
|
|
16
|
+
title: '获取用户信息',
|
|
17
|
+
path: '/passport/v1/user/get',
|
|
18
|
+
params: {},
|
|
19
|
+
isRule: false,
|
|
20
|
+
isConsole: true,
|
|
21
|
+
disabled: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
mapFnName: 'getCardUserSetting',
|
|
25
|
+
title: '获取用户卡券配置',
|
|
26
|
+
path: '/card/v1/card-bind/get-card-user-setting',
|
|
27
|
+
params: {},
|
|
28
|
+
isRule: false,
|
|
29
|
+
isConsole: true,
|
|
30
|
+
disabled: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
mapFnName: 'setCardUserSetting',
|
|
34
|
+
title: '设置用户卡券配置',
|
|
35
|
+
path: '/card/v1/card-bind/set-card-user-setting',
|
|
36
|
+
data: {
|
|
37
|
+
is_entity_card_invalid: ['已绑卡实体卡是否失效', 'String Y N', '必选']
|
|
38
|
+
},
|
|
39
|
+
isRule: false,
|
|
40
|
+
isConsole: true,
|
|
41
|
+
disabled: true,
|
|
42
|
+
}
|
|
43
|
+
];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
style: [],
|
|
8
|
+
content: (data) => {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
label: '绑定手机号地址:', //label
|
|
12
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
13
|
+
valueKey: 'bind_phone_url', //form[valueKey]
|
|
14
|
+
value: data['bind_phone_url'] || {},
|
|
15
|
+
setting: {
|
|
16
|
+
router: XdBus.getParentApi('getPagesTree')
|
|
17
|
+
},
|
|
18
|
+
inline: false,
|
|
19
|
+
},
|
|
20
|
+
].filter(i=>i)
|
|
21
|
+
},
|
|
22
|
+
advanced: [],
|
|
23
|
+
};
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-my-setting"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-my-setting__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-my-setting__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view class="jfb-base-my-setting__body" :style="{
|
|
17
|
+
minHeight: layoutInfo.bodyMinHeightRpx + 'rpx'
|
|
18
|
+
}">
|
|
19
|
+
<view class="setting_list">
|
|
20
|
+
<xd-list-item label="已绑实体卡是否失效" :showRight="!showSwitch"
|
|
21
|
+
paddingLR="50rpx" paddingTB="32rpx"
|
|
22
|
+
style="margin-bottom: 8rpx;"
|
|
23
|
+
@click="handleToShowSwitch"
|
|
24
|
+
>
|
|
25
|
+
<view v-if="!showSwitch">去配置</view>
|
|
26
|
+
<view v-else class="switch_wrap">
|
|
27
|
+
<view :style="{
|
|
28
|
+
color: cardChecked ? mainColor : '#666666'
|
|
29
|
+
}">{{ cardChecked ? "开启" : "关闭" }}</view>
|
|
30
|
+
<xd-switch :checked="cardChecked" size="small" @change="handleCardChecked"></xd-switch>
|
|
31
|
+
</view>
|
|
32
|
+
</xd-list-item>
|
|
33
|
+
<view class="switch_tip">
|
|
34
|
+
<xd-font-icon size="24" icon="iconmingchengtubiao" style="margin-right: 8rpx;"></xd-font-icon>
|
|
35
|
+
<view>当卡被绑定后,实体卡的卡密与二维码都失效</view>
|
|
36
|
+
</view>
|
|
37
|
+
<xd-list-item :showRight="!phone_number" label="绑定手机号"
|
|
38
|
+
paddingLR="50rpx" paddingTB="32rpx"
|
|
39
|
+
@click="handleToBind"
|
|
40
|
+
>
|
|
41
|
+
{{phone_number ? phone_number : "去绑定"}}
|
|
42
|
+
</xd-list-item>
|
|
43
|
+
</view>
|
|
44
|
+
<view class="fixed_bottom">
|
|
45
|
+
<xd-button type="primary" @click="handleLogout">退出登录</xd-button>
|
|
46
|
+
</view>
|
|
47
|
+
</view>
|
|
48
|
+
</view>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
53
|
+
import XdListItem from "./XdListItem.vue";
|
|
54
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
55
|
+
import XdSwitch from "@/components/XdSwitch/XdSwitch"
|
|
56
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
57
|
+
import JfbBaseMySettingMixin from "./JfbBaseMySettingMixin";
|
|
58
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
59
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
60
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
61
|
+
import {mapState} from 'vuex';
|
|
62
|
+
import store from "@/store";
|
|
63
|
+
export default {
|
|
64
|
+
name: "JfbBaseMySetting",
|
|
65
|
+
components: {
|
|
66
|
+
XdFontIcon,
|
|
67
|
+
XdButton,
|
|
68
|
+
XdListItem,
|
|
69
|
+
XdSwitch
|
|
70
|
+
},
|
|
71
|
+
mixins: [
|
|
72
|
+
componentsMixins, extsMixins, JfbBaseMySettingMixin
|
|
73
|
+
],
|
|
74
|
+
computed: {
|
|
75
|
+
...mapState(['jfbAuthorize']),
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
cardChecked: false,
|
|
80
|
+
phone_number: "",
|
|
81
|
+
showSwitch: true,
|
|
82
|
+
|
|
83
|
+
//面板
|
|
84
|
+
bind_phone_url: "", //绑定手机号跳转地址
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
watch: {
|
|
88
|
+
container(value) {
|
|
89
|
+
this.init(value)
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
created() {
|
|
93
|
+
this.init(this.container);
|
|
94
|
+
|
|
95
|
+
//todo
|
|
96
|
+
},
|
|
97
|
+
methods: {
|
|
98
|
+
onJfbLoad(options) {
|
|
99
|
+
this.p_getUserInfo();
|
|
100
|
+
this.getCardConfig();
|
|
101
|
+
},
|
|
102
|
+
/**
|
|
103
|
+
* @description 监听事件变化
|
|
104
|
+
* @param container {object} 业务组件对象自己
|
|
105
|
+
*/
|
|
106
|
+
init(container) {
|
|
107
|
+
this.bind_phone_url = getContainerPropsValue(container, 'content.bind_phone_url', {value: ""}).value;
|
|
108
|
+
},
|
|
109
|
+
handleToBind(){
|
|
110
|
+
if(!this.phone_number){
|
|
111
|
+
this.$xdUniHelper.navigateTo({
|
|
112
|
+
url: this.bind_phone_url + `?callback_url=${encodeURIComponent(location.href)}`,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
handleToShowSwitch(){
|
|
117
|
+
if(!this.showSwitch){
|
|
118
|
+
this.showSwitch = true;
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
handleCardChecked(flag){
|
|
122
|
+
jfbRootExec("setCardUserSetting", {
|
|
123
|
+
vm: this,
|
|
124
|
+
data: {
|
|
125
|
+
is_entity_card_invalid: flag ? "Y" : "N"
|
|
126
|
+
}
|
|
127
|
+
}).then(res => {
|
|
128
|
+
this.cardChecked = flag;
|
|
129
|
+
}).catch(err => {
|
|
130
|
+
this.cardChecked = !flag;
|
|
131
|
+
})
|
|
132
|
+
},
|
|
133
|
+
p_getUserInfo(){
|
|
134
|
+
jfbRootExec("getUserInfo", {
|
|
135
|
+
vm: this,
|
|
136
|
+
data: {
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
}).then(res => {
|
|
140
|
+
let phone_number = res.phone_number;
|
|
141
|
+
//手机号脱敏
|
|
142
|
+
if(phone_number){
|
|
143
|
+
phone_number = phone_number.substr(0, 3) + "****" + phone_number.substr(7, 11);
|
|
144
|
+
}
|
|
145
|
+
this.phone_number = phone_number;
|
|
146
|
+
})
|
|
147
|
+
},
|
|
148
|
+
getCardConfig(){
|
|
149
|
+
jfbRootExec("getCardUserSetting", {
|
|
150
|
+
vm: this,
|
|
151
|
+
data: {}
|
|
152
|
+
}).then(res => {
|
|
153
|
+
let is_entity_card_invalid = res.is_entity_card_invalid; //Y失效 N: 有效
|
|
154
|
+
if(is_entity_card_invalid === ""){
|
|
155
|
+
this.showSwitch = false;
|
|
156
|
+
}
|
|
157
|
+
this.cardChecked = is_entity_card_invalid === "Y";
|
|
158
|
+
})
|
|
159
|
+
},
|
|
160
|
+
async handleLogout(){
|
|
161
|
+
// #ifdef H5
|
|
162
|
+
if (this.$configProject.isPreview) return;
|
|
163
|
+
// #endif
|
|
164
|
+
|
|
165
|
+
if (this.jfbAuthorize !== null) {
|
|
166
|
+
this.$xdShowLoading({});
|
|
167
|
+
store.dispatch('logout').then(res=>{
|
|
168
|
+
this.$xdHideLoading();
|
|
169
|
+
this.jfbAuthorize.removeToken('card');
|
|
170
|
+
this.jfbAuthorize.jumpToUserLogin(this, false);
|
|
171
|
+
}).catch(err=>{
|
|
172
|
+
console.error(err);
|
|
173
|
+
})
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
onJfbScroll(options) {
|
|
177
|
+
console.log('event.onJfbScroll', options)
|
|
178
|
+
},
|
|
179
|
+
onJfbReachBottom(options) {
|
|
180
|
+
console.log('event.onJfbReachBottom', options)
|
|
181
|
+
},
|
|
182
|
+
onJfbShow(options) {
|
|
183
|
+
console.log('event.onJfbShow', options)
|
|
184
|
+
},
|
|
185
|
+
onJfbHide(options) {
|
|
186
|
+
console.log('event.onJfbHide', options)
|
|
187
|
+
},
|
|
188
|
+
onJfbBack(options) {
|
|
189
|
+
console.log('event.onJfbBack', options)
|
|
190
|
+
},
|
|
191
|
+
onJfbUpdate(...data) {
|
|
192
|
+
console.log('event.onJfbUpdate', data)
|
|
193
|
+
},
|
|
194
|
+
onJfbCustomEvent(options) {
|
|
195
|
+
console.log('event.onJfbReachBottom', options)
|
|
196
|
+
},
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
</script>
|
|
201
|
+
|
|
202
|
+
<style scoped lang="less">
|
|
203
|
+
@import "./JfbBaseMySettingLess.less";
|
|
204
|
+
|
|
205
|
+
.jfb-base-my-setting {
|
|
206
|
+
&__body{
|
|
207
|
+
background: #FAFAFA;
|
|
208
|
+
.setting_list{
|
|
209
|
+
padding: 20rpx 0;
|
|
210
|
+
/deep/ .xd-my-list-item{
|
|
211
|
+
background: #FFFFFF;
|
|
212
|
+
margin: 24rpx 20rpx;
|
|
213
|
+
border-radius: 20rpx;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
.switch_wrap{
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
}
|
|
220
|
+
.switch_tip{
|
|
221
|
+
display: flex;
|
|
222
|
+
font-size: 24rpx;
|
|
223
|
+
color: #BBBBBB;
|
|
224
|
+
align-items: center;
|
|
225
|
+
padding-left: 80rpx;
|
|
226
|
+
}
|
|
227
|
+
.fixed_bottom{
|
|
228
|
+
position: absolute;
|
|
229
|
+
width: 600rpx;
|
|
230
|
+
bottom: 100rpx;
|
|
231
|
+
left: 50%;
|
|
232
|
+
transform: translateX(-50%);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc 获取绝对路径完整地址
|
|
3
|
+
* @param @path
|
|
4
|
+
**/
|
|
5
|
+
//例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
|
|
6
|
+
@basePath: 'business/';
|
|
7
|
+
@doMain: '//sandbox-img.jufubao.cn/';
|
|
8
|
+
|
|
9
|
+
.getBusinessImageUrl(@path, @size: 'size8') {
|
|
10
|
+
@url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
|
|
11
|
+
background-image: url(@url);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//start
|
|
15
|
+
.jfb-base-my-setting {
|
|
16
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
min-height: unit(50, rpx);
|
|
19
|
+
|
|
20
|
+
&__body{
|
|
21
|
+
position: relative;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
z-index: 2
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.editx {
|
|
27
|
+
position: relative;
|
|
28
|
+
border: 1px dashed blue;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
z-index: 3
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
border: 1px dashed blue;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.noBorder {
|
|
39
|
+
border-color: rgba(0,0,0,0);
|
|
40
|
+
border-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
&__edit {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
position: absolute;
|
|
47
|
+
right: unit(0, rpx);
|
|
48
|
+
top: unit(-52, rpx);
|
|
49
|
+
height: unit(50, rpx);
|
|
50
|
+
line-height: unit(50, rpx);
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
background: rgba(0, 0, 0, .6);
|
|
55
|
+
border-radius: unit(10, rpx);
|
|
56
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
57
|
+
color: #fff;
|
|
58
|
+
font-size: unit(22, rpx);
|
|
59
|
+
|
|
60
|
+
&-icon{
|
|
61
|
+
padding: 0 unit(20, rpx);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.editx {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**notPreview**/
|
|
74
|
+
.jfb-base-my-setting {
|
|
75
|
+
&:before {
|
|
76
|
+
content: " ";
|
|
77
|
+
display: table;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-base-my-setting'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="xd-my-list-item"
|
|
3
|
+
:class="'size_'+size"
|
|
4
|
+
:style="{
|
|
5
|
+
borderTop: showBottom ? '1px solid #eee':'none',
|
|
6
|
+
paddingLeft: paddingLR,
|
|
7
|
+
paddingRight: paddingLR,
|
|
8
|
+
paddingTop: paddingTB,
|
|
9
|
+
paddingBottom: paddingTB,
|
|
10
|
+
}"
|
|
11
|
+
@click="$emit('click')">
|
|
12
|
+
<view v-if="listIcon" class="my-list_icon">
|
|
13
|
+
<!-- <image mode="widthFix" :src="listIcon" /> -->
|
|
14
|
+
<xd-font-icon :icon="listIcon"></xd-font-icon>
|
|
15
|
+
</view>
|
|
16
|
+
<view class="my-list_label" v-html="label"></view>
|
|
17
|
+
<view class="my-list_value">
|
|
18
|
+
<slot></slot>
|
|
19
|
+
<xd-font-icon
|
|
20
|
+
v-if="showRight"
|
|
21
|
+
:style="{
|
|
22
|
+
marginLeft: '10rpx',
|
|
23
|
+
color: '#B1B1B1'
|
|
24
|
+
}"
|
|
25
|
+
size="24"
|
|
26
|
+
icon="iconxiangyou_xian"
|
|
27
|
+
></xd-font-icon>
|
|
28
|
+
</view>
|
|
29
|
+
|
|
30
|
+
</view>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
35
|
+
export default {
|
|
36
|
+
components: {
|
|
37
|
+
XdFontIcon
|
|
38
|
+
},
|
|
39
|
+
data(){
|
|
40
|
+
return {
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
props: {
|
|
45
|
+
size: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "default"
|
|
48
|
+
},
|
|
49
|
+
paddingTB:{
|
|
50
|
+
type: String,
|
|
51
|
+
default: "24rpx"
|
|
52
|
+
},
|
|
53
|
+
paddingLR: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "0rpx"
|
|
56
|
+
},
|
|
57
|
+
//是否显示border-bottom
|
|
58
|
+
showBottom: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
//是否显示右箭头
|
|
63
|
+
showRight: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
//是否显示图标
|
|
68
|
+
listIcon: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: ''
|
|
71
|
+
},
|
|
72
|
+
//label
|
|
73
|
+
label: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: ''
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<style lang="less" scoped>
|
|
83
|
+
.xd-my-list-item{
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
padding: 30rpx 0;
|
|
87
|
+
font-size: 28rpx;
|
|
88
|
+
background: #FFFFFF;
|
|
89
|
+
color: #666666;
|
|
90
|
+
|
|
91
|
+
&.size_large{
|
|
92
|
+
.my-list_value,
|
|
93
|
+
.my-list_label{
|
|
94
|
+
font-size: 28rpx;
|
|
95
|
+
font-weight: 400;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
&.size_default{
|
|
99
|
+
.my-list_value,
|
|
100
|
+
.my-list_label{
|
|
101
|
+
font-size: 28rpx;
|
|
102
|
+
font-weight: 400;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
&.size_small{
|
|
106
|
+
.my-list_value,
|
|
107
|
+
.my-list_label{
|
|
108
|
+
font-size: 24rpx;
|
|
109
|
+
font-weight: 400;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.my-list_icon{
|
|
114
|
+
width: 32rpx;
|
|
115
|
+
margin-right: 24rpx;
|
|
116
|
+
|
|
117
|
+
image{
|
|
118
|
+
width: 32rpx;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.my-list_label{
|
|
123
|
+
// flex: 1;
|
|
124
|
+
}
|
|
125
|
+
.my-list_value{
|
|
126
|
+
flex: 1;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: flex-end;
|
|
130
|
+
}
|
|
131
|
+
.arrow_right{
|
|
132
|
+
width: 44rpx;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
@@ -284,13 +284,16 @@
|
|
|
284
284
|
class="jfb-base-order-detail__body-card jfb-base-order-detail__body-cashier"
|
|
285
285
|
>
|
|
286
286
|
<view class="jfb-base-order-detail__body-cashier-text">{{info.codes[0].show_type === "qrcode" ? "二维码" : "条形码" }}</view>
|
|
287
|
-
<
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
287
|
+
<view style="position: relative">
|
|
288
|
+
<image
|
|
289
|
+
:style="{
|
|
290
|
+
height: info.codes[0].show_type === 'qrcode' ? '50vw' : '25vw',
|
|
291
|
+
width: info.codes[0].show_type === 'qrcode' ? '50vw' : '85vw',
|
|
292
|
+
}"
|
|
293
|
+
:src="info.codes[0].code_url"
|
|
294
|
+
></image>
|
|
295
|
+
<image v-if="info.codes[0].logo&&info.codes[0].show_type === 'qrcode'" class="logo-icon" :src="info.codes[0].logo"></image>
|
|
296
|
+
</view>
|
|
294
297
|
<view class="jfb-base-order-detail__body-cashier-text">
|
|
295
298
|
{{ info.codes[0].can_read_code }}
|
|
296
299
|
</view>
|
|
@@ -751,7 +754,17 @@
|
|
|
751
754
|
height: showType === 'qrcode' ? '70vw' : '35vw',
|
|
752
755
|
}"
|
|
753
756
|
>
|
|
754
|
-
|
|
757
|
+
<view style="position: relative">
|
|
758
|
+
<image :src="codeSrc" mode="aspectFit"></image>
|
|
759
|
+
<image v-if="logo&&showType === 'qrcode'" :src="logo" style="
|
|
760
|
+
width: 100rpx;
|
|
761
|
+
height: 100rpx;
|
|
762
|
+
position: absolute;
|
|
763
|
+
top: 50%;
|
|
764
|
+
left: 50%;
|
|
765
|
+
transform: translate(-50rpx, -50rpx);">
|
|
766
|
+
</image>
|
|
767
|
+
</view>
|
|
755
768
|
</view>
|
|
756
769
|
</xd-dailog>
|
|
757
770
|
</view>
|
|
@@ -828,6 +841,7 @@ export default {
|
|
|
828
841
|
bottom: 0,
|
|
829
842
|
},
|
|
830
843
|
is_hot: "Y",
|
|
844
|
+
logo: ""
|
|
831
845
|
};
|
|
832
846
|
},
|
|
833
847
|
watch: {
|
|
@@ -980,6 +994,9 @@ export default {
|
|
|
980
994
|
res.codes =
|
|
981
995
|
res.codes &&
|
|
982
996
|
res.codes.map((item) => {
|
|
997
|
+
if(item.logo) {
|
|
998
|
+
item.logo = getServiceUrl(item.logo)
|
|
999
|
+
}
|
|
983
1000
|
if (item.show_type === "qrcode" || item.show_type === "barcode") {
|
|
984
1001
|
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
985
1002
|
item.code_url = reg.test(item.code_url)? item.code_url:`${this.brandInfo['api_host']}${item.code_url}`
|
|
@@ -1125,6 +1142,7 @@ export default {
|
|
|
1125
1142
|
handleShowCode(item) {
|
|
1126
1143
|
this.codeSrc = item.code_url;
|
|
1127
1144
|
this.showType = item.show_type;
|
|
1145
|
+
this.logo = item.logo;
|
|
1128
1146
|
console.log(this.codeSrc, "this.codeSrc");
|
|
1129
1147
|
this.showCode = true;
|
|
1130
1148
|
},
|
|
@@ -1257,6 +1275,13 @@ export default {
|
|
|
1257
1275
|
.jfb-base-order-detail {
|
|
1258
1276
|
&__body {
|
|
1259
1277
|
color: #333;
|
|
1278
|
+
.logo-icon {
|
|
1279
|
+
width: unit(100, rpx) !important;
|
|
1280
|
+
height: unit(100, rpx) !important;
|
|
1281
|
+
position: absolute;
|
|
1282
|
+
top: 50%;
|
|
1283
|
+
transform: translate(-50rpx, -50rpx);
|
|
1284
|
+
}
|
|
1260
1285
|
&-show {
|
|
1261
1286
|
display: flex;
|
|
1262
1287
|
justify-content: center;
|
|
@@ -88,13 +88,16 @@
|
|
|
88
88
|
>
|
|
89
89
|
<view class="jfb-base-success__body-cashier-text"
|
|
90
90
|
>{{info.codes[0].show_type === "qrcode" ? "二维码" : "条形码" }}</view>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
<view style="position: relative">
|
|
92
|
+
<image
|
|
93
|
+
:style="{
|
|
94
|
+
height: info.codes[0].show_type === 'qrcode' ? '50vw' : '25vw',
|
|
95
|
+
width: info.codes[0].show_type === 'qrcode' ? '50vw' : '85vw',
|
|
96
|
+
}"
|
|
97
|
+
:src="info.codes[0].code_url"
|
|
98
|
+
></image>
|
|
99
|
+
<image v-if="info.codes[0].logo&&info.codes[0].show_type === 'qrcode'" class="logo-icon" :src="info.codes[0].logo"></image>
|
|
100
|
+
</view>
|
|
98
101
|
<view class="jfb-base-success__body-cashier-text">
|
|
99
102
|
{{ info.codes[0].can_read_code }}
|
|
100
103
|
</view>
|
|
@@ -309,7 +312,17 @@
|
|
|
309
312
|
class="jfb-base-success__body-dialog"
|
|
310
313
|
:style="{ height: showType === 'qrcode' ? '70vw' : '35vw' }"
|
|
311
314
|
>
|
|
312
|
-
<
|
|
315
|
+
<view style="position: relative">
|
|
316
|
+
<image :src="codeSrc" mode="aspectFit"></image>
|
|
317
|
+
<image v-if="logo&&showType === 'qrcode'" :src="logo" style="
|
|
318
|
+
width: 100rpx;
|
|
319
|
+
height: 100rpx;
|
|
320
|
+
position: absolute;
|
|
321
|
+
top: 50%;
|
|
322
|
+
left: 50%;
|
|
323
|
+
transform: translate(-50rpx, -50rpx);">
|
|
324
|
+
</image>
|
|
325
|
+
</view>
|
|
313
326
|
</view>
|
|
314
327
|
</xd-dailog>
|
|
315
328
|
</view>
|
|
@@ -329,6 +342,7 @@ import XdSuccess from "@/components/XdSuccess/XdSuccess";
|
|
|
329
342
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
330
343
|
import XdContentXss from "@/components/XdContentXss/XdContentXss";
|
|
331
344
|
import StyleForm from "@/utils/StyleForm";
|
|
345
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
332
346
|
import { Base64 } from "js-base64";
|
|
333
347
|
import { getNoUrl } from "@/utils/nourl";
|
|
334
348
|
import { mapState } from "vuex";
|
|
@@ -386,6 +400,7 @@ export default {
|
|
|
386
400
|
|
|
387
401
|
showCode: false,
|
|
388
402
|
codeSrc: "",
|
|
403
|
+
logo: "",
|
|
389
404
|
...styleForm.getDataItem(),
|
|
390
405
|
};
|
|
391
406
|
},
|
|
@@ -417,6 +432,7 @@ export default {
|
|
|
417
432
|
handleShowCode(item) {
|
|
418
433
|
this.codeSrc = item.code_url;
|
|
419
434
|
this.showType = item.show_type;
|
|
435
|
+
this.logo = item.logo;
|
|
420
436
|
this.showCode = true;
|
|
421
437
|
},
|
|
422
438
|
/**
|
|
@@ -545,6 +561,9 @@ export default {
|
|
|
545
561
|
info.codes =
|
|
546
562
|
info.codes &&
|
|
547
563
|
info.codes.map((item) => {
|
|
564
|
+
if(item.logo) {
|
|
565
|
+
item.logo = getServiceUrl(item.logo)
|
|
566
|
+
}
|
|
548
567
|
if (item.show_type === "qrcode" || item.show_type === "barcode") {
|
|
549
568
|
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
550
569
|
if (!reg.test(item.code_url)) item.code_url = `${this.brandInfo["api_host"]}${item.code_url}`;
|
|
@@ -672,6 +691,13 @@ export default {
|
|
|
672
691
|
|
|
673
692
|
.jfb-base-success {
|
|
674
693
|
&__body {
|
|
694
|
+
.logo-icon {
|
|
695
|
+
width: unit(100, rpx) !important;
|
|
696
|
+
height: unit(100, rpx) !important;
|
|
697
|
+
position: absolute;
|
|
698
|
+
top: 50%;
|
|
699
|
+
transform: translate(-50rpx, -50rpx);
|
|
700
|
+
}
|
|
675
701
|
&-card {
|
|
676
702
|
padding: unit(30, rpx);
|
|
677
703
|
}
|