jufubao-base 1.0.334 → 1.0.335-beta2
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/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +154 -111
- package/src/components/JfbBaseConsumpCode/cusAttr/advanced.js +49 -0
- package/src/components/JfbBaseLogin/Attr.js +14 -0
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +40 -0
- package/src/components/JfbBasePay/Attr.js +49 -0
- package/src/components/JfbBasePay/JfbBasePay.vue +160 -116
package/package.json
CHANGED
|
@@ -5,141 +5,147 @@
|
|
|
5
5
|
<view class="jfb-base-consump-code__edit-icon" @click="delEdit">删除</view>
|
|
6
6
|
</view>
|
|
7
7
|
<!-- #endif -->
|
|
8
|
-
<view v-if="
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
<view v-if="isShowFulfillment">
|
|
9
|
+
<image :src="fulfillmentImg" style="width:100%;" mode="widthFix"></image>
|
|
10
|
+
</view>
|
|
11
|
+
<template v-else>
|
|
12
|
+
<view v-if="!showMask" class="jfb-base-consump-code__body" :style="[bodyStyleComp]">
|
|
13
|
+
<view class="content-box">
|
|
14
|
+
<view class="logo-box">
|
|
15
|
+
<image v-if="shopLogo" :src="shopLogo" class="logo"></image>
|
|
16
|
+
<image v-else class="logo" src="https://img1-b.jufubao.cn/uploads/20250528/e88bb70d4ccdcdd01a277bdf6b66c488.jpg"></image>
|
|
17
|
+
</view>
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
<view @click="handleToShop" class="shop">
|
|
20
|
+
<view>{{shopName}}</view>
|
|
21
|
+
<XdFontIcon size="20" icon="iconxiangyou_xian"></XdFontIcon>
|
|
22
|
+
</view>
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
<template v-if="curConsumeType === 'QP'">
|
|
25
|
+
<view class="justify-center">
|
|
26
|
+
<image mode="aspectFit" class="bar-code" :src="barcode_url">
|
|
27
|
+
</image>
|
|
28
|
+
<view class="bar-code-text">{{barCode}}</view>
|
|
29
|
+
<view style="position: relative">
|
|
30
|
+
<image mode="aspectFit" class="qrcode" :src="code_url"></image>
|
|
31
|
+
<image v-if="qrcode_icon" class="logo-icon" :src="qrcode_icon"></image>
|
|
32
|
+
</view>
|
|
33
|
+
<view class="code-refresh">{{expiration_sec_str}}后自动更新</view>
|
|
34
|
+
<view v-if="isShowPaySoft === 'Y'" class="pay_way">
|
|
35
|
+
<view class="pay_title">此二维码优先使用以下账户进行支付</view>
|
|
36
|
+
<view class="pay_select" @click="showSortDialog">
|
|
37
|
+
<view>{{ curPaySelectShow }}</view>
|
|
38
|
+
<xd-font-icon icon="iconxia_down" size="28" style="margin-left: 24rpx;"></xd-font-icon>
|
|
39
|
+
</view>
|
|
35
40
|
</view>
|
|
36
41
|
</view>
|
|
37
|
-
</
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
</template>
|
|
43
|
+
<view v-else style="padding-bottom: 40rpx;">
|
|
44
|
+
<view class="verification-item">
|
|
45
|
+
<view class="verification-item-label">提货标签</view>
|
|
46
|
+
<view class="verification-item-tags">
|
|
47
|
+
<view :style="{color:tag_id===item.value?mainColor:'',borderColor: tag_id===item.value?mainColor:''}"
|
|
48
|
+
v-for="(item,index) in settle_tag_list" :key="index" @click="handlerTagRadio(item)">{{item.label}}
|
|
49
|
+
</view>
|
|
45
50
|
</view>
|
|
51
|
+
<view class="nodata" v-if="settle_tag_list_status">结算标签为空,请联系店员设置后重试</view>
|
|
46
52
|
</view>
|
|
47
|
-
<view class="
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<view :style="{color:mainColor}" class="tip">*提货点数请咨询店员,提货成功后无法退换</view>
|
|
53
|
+
<view class="verification-item">
|
|
54
|
+
<view class="verification-item-label">提货点数</view>
|
|
55
|
+
<view class="verification-item-input">
|
|
56
|
+
<input v-model="total_price" @input="(value)=>handlerPrice(value)" type="text">
|
|
57
|
+
<!-- <xd-number v-if="curTag.is_static_price" class="xd-number" :min="1" :max="999" v-model="num"
|
|
58
|
+
@change="handleNumberChange"></xd-number> -->
|
|
59
|
+
<view :style="{color:mainColor}" class="tip">*提货点数请咨询店员,提货成功后无法退换</view>
|
|
60
|
+
</view>
|
|
56
61
|
</view>
|
|
62
|
+
<XdButton v-if="btnDisabled" style="margin-top: 100rpx;display:block" width="260rpx" type="primary" disabled>
|
|
63
|
+
下一步</XdButton>
|
|
64
|
+
<XdButton v-else style="margin-top: 100rpx;display:block" width="260rpx" type="primary" @click="toPayOrder">
|
|
65
|
+
下一步</XdButton>
|
|
57
66
|
</view>
|
|
58
|
-
<XdButton v-if="btnDisabled" style="margin-top: 100rpx;display:block" width="260rpx" type="primary" disabled>
|
|
59
|
-
下一步</XdButton>
|
|
60
|
-
<XdButton v-else style="margin-top: 100rpx;display:block" width="260rpx" type="primary" @click="toPayOrder">
|
|
61
|
-
下一步</XdButton>
|
|
62
|
-
</view>
|
|
63
67
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
<view v-if="plusDiscount" style="width: 100%;">
|
|
69
|
+
<view class="vip" v-if="is_vip==='N'">
|
|
70
|
+
<view class="vip-title">
|
|
71
|
+
<view class="vip-title-left">PLUS会员专享</view>
|
|
72
|
+
<view class="vip-title-right">
|
|
73
|
+
<text>{{plusDiscount/1000}}</text>折
|
|
74
|
+
</view>
|
|
75
|
+
</view>
|
|
76
|
+
<view class="vip-open" @click="handleToOpen">
|
|
77
|
+
<xd-font-icon color="#FCBF28" size="20" icon="iconPLUShuiyuan"></xd-font-icon>
|
|
78
|
+
<text>立即开通</text>
|
|
79
|
+
<xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon>
|
|
70
80
|
</view>
|
|
71
81
|
</view>
|
|
72
|
-
<view class="vip
|
|
73
|
-
<
|
|
74
|
-
<text>立即开通</text>
|
|
75
|
-
<xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon>
|
|
82
|
+
<view class="is-vip" v-else>
|
|
83
|
+
<text>PLUS</text>会员核销最低可享 <text>{{plusDiscount/1000}}</text>折
|
|
76
84
|
</view>
|
|
77
85
|
</view>
|
|
78
|
-
<view class="is-vip" v-else>
|
|
79
|
-
<text>PLUS</text>会员核销最低可享 <text>{{plusDiscount/1000}}</text>折
|
|
80
|
-
</view>
|
|
81
86
|
</view>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
<view class="consume_list">
|
|
88
|
+
<template v-for="item in consume_options">
|
|
89
|
+
<view v-if="item.consume_mode==='WB' && showScan === 'Y'" :key="item.consume_mode"
|
|
90
|
+
class="consume_item"
|
|
91
|
+
@click="handleConsumeType(item.consume_mode)"
|
|
92
|
+
>
|
|
93
|
+
<view class="consume_title">
|
|
94
|
+
<view class="consume_icon">
|
|
95
|
+
<xd-font-icon v-if="scanIconType==='icon'" :size="28" :icon="scanIcon"></xd-font-icon>
|
|
96
|
+
<view v-else class="_img">
|
|
97
|
+
<image :src="scanImg" mode="aspectFill"></image>
|
|
98
|
+
</view>
|
|
94
99
|
</view>
|
|
100
|
+
<view >{{ scanName }}</view>
|
|
95
101
|
</view>
|
|
96
|
-
<
|
|
102
|
+
<xd-font-icon :size="28" icon="iconxiangyou_xian"></xd-font-icon>
|
|
97
103
|
</view>
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<image :src="JHDImg" mode="aspectFill"></image>
|
|
104
|
+
<view v-if="item.consume_mode==='JHD' && showJHD === 'Y' && (isPreview || (!isPreview && curConsumeType !== 'JHD'))" :key="item.consume_mode"
|
|
105
|
+
class="consume_item"
|
|
106
|
+
@click="handleConsumeType(item.consume_mode)"
|
|
107
|
+
>
|
|
108
|
+
<view class="consume_title">
|
|
109
|
+
<view class="consume_icon">
|
|
110
|
+
<xd-font-icon v-if="JHDIconType==='icon'" :size="28" :icon="JHDIcon"></xd-font-icon>
|
|
111
|
+
<view v-else class="_img">
|
|
112
|
+
<image :src="JHDImg" mode="aspectFill"></image>
|
|
113
|
+
</view>
|
|
109
114
|
</view>
|
|
115
|
+
<view >{{ JHDName }}</view>
|
|
110
116
|
</view>
|
|
111
|
-
<
|
|
117
|
+
<xd-font-icon :size="28" icon="iconxiangyou_xian"></xd-font-icon>
|
|
112
118
|
</view>
|
|
113
|
-
<xd-font-icon :size="28" icon="iconxiangyou_xian"></xd-font-icon>
|
|
114
|
-
</view>
|
|
115
119
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
<view v-if="item.consume_mode==='QP' && showQP==='Y' && (isPreview || (!isPreview && curConsumeType !== 'QP')) " :key="item.consume_mode"
|
|
121
|
+
class="consume_item"
|
|
122
|
+
@click="handleConsumeType(item.consume_mode)"
|
|
123
|
+
>
|
|
124
|
+
<view class="consume_title">
|
|
125
|
+
<view class="consume_icon">
|
|
126
|
+
<xd-font-icon v-if="QPIconType==='icon'" :size="28" :icon="QPIcon"></xd-font-icon>
|
|
127
|
+
<view v-else class="_img">
|
|
128
|
+
<image :src="QPImg" mode="aspectFill"></image>
|
|
129
|
+
</view>
|
|
125
130
|
</view>
|
|
131
|
+
<view >{{ QPName }}</view>
|
|
126
132
|
</view>
|
|
127
|
-
<
|
|
133
|
+
<xd-font-icon :size="28" icon="iconxiangyou_xian"></xd-font-icon>
|
|
128
134
|
</view>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</template>
|
|
135
|
+
</template>
|
|
136
|
+
</view>
|
|
132
137
|
</view>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</
|
|
138
|
+
<view :style="{
|
|
139
|
+
minHeight: layoutInfo.bodyMinHeightRpx + 'rpx',
|
|
140
|
+
backgroundImage: 'url(https://img1-b.jufubao.cn/uploads/20250507/1a97fda8cd8804f9bcf984da10e0a666.png?x-oss-process=style/size8)',
|
|
141
|
+
backgroundSize: '100% 100%'
|
|
142
|
+
}" v-else>
|
|
143
|
+
<view
|
|
144
|
+
style="display: flex;justify-content: center;align-items: center;height: 100vh;font-size: 30rpx;color: #333">
|
|
145
|
+
{{tip}}</view>
|
|
146
|
+
</view>
|
|
147
|
+
</template>
|
|
148
|
+
|
|
143
149
|
<XdDialog width="80%" :show.sync="showDialog" :showClose="false" :showTitle="true">
|
|
144
150
|
<view class="dialog-title" slot="title">门店确认</view>
|
|
145
151
|
<view class="dialog-content">
|
|
@@ -220,6 +226,7 @@
|
|
|
220
226
|
import JHDMixin from "./JHDMixin"; //聚好兑
|
|
221
227
|
import shopListMixin from "./shopListMixin";
|
|
222
228
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
229
|
+
import { getAttrPath } from "@/utils/JumpTo";
|
|
223
230
|
import { getContainerPropsValue, isWechat, isWechatTools, gCPVal } from "@/utils/xd.base";
|
|
224
231
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
225
232
|
import extsMixins from "@/mixins/extsMixins";
|
|
@@ -265,6 +272,7 @@
|
|
|
265
272
|
default_consume_type: '', //默认核销方式
|
|
266
273
|
baseInfo: {}, //基础接口返回信息 - 展码及门店基本信息
|
|
267
274
|
curConsumeType: "JHD", //当前选择的核销方式, 默认聚好兑
|
|
275
|
+
is_need_jump: "",
|
|
268
276
|
|
|
269
277
|
bodyBgImg: "",
|
|
270
278
|
contBgcColor: "#fff",
|
|
@@ -296,6 +304,10 @@
|
|
|
296
304
|
QPImg: "",
|
|
297
305
|
openVipBtnBgImg: "",
|
|
298
306
|
openVipBgImg: "",
|
|
307
|
+
|
|
308
|
+
showFulfillment: "",
|
|
309
|
+
fulfillmentPath: "", //履约分账跳转路径
|
|
310
|
+
fulfillmentImg: "", //履约分账图片
|
|
299
311
|
}
|
|
300
312
|
},
|
|
301
313
|
watch: {
|
|
@@ -328,7 +340,13 @@
|
|
|
328
340
|
},
|
|
329
341
|
showVipOpenDialog() {
|
|
330
342
|
return this.isGVipSite && this.is_vip === 'N';
|
|
331
|
-
}
|
|
343
|
+
},
|
|
344
|
+
isShowFulfillment(){
|
|
345
|
+
//如果是预览模式,根据属性showFulfillment决定是否展示履约分账
|
|
346
|
+
if(this.$configProject.isPreview) return this.showFulfillment === 'Y';
|
|
347
|
+
//非预览模式,根据is_need_jump&showFulfillment决定是否展示履约分账
|
|
348
|
+
else return this.is_need_jump === 'Y' && this.showFulfillment === 'Y';
|
|
349
|
+
},
|
|
332
350
|
},
|
|
333
351
|
created() {
|
|
334
352
|
this.isPreview = this.$configProject['isPreview']
|
|
@@ -426,6 +444,9 @@
|
|
|
426
444
|
this.openVipBtnBgImg = getServiceUrl(
|
|
427
445
|
getContainerPropsValue(container, "content.openVipBtnBgImg", { url: "" }).url
|
|
428
446
|
);
|
|
447
|
+
this.showFulfillment = getContainerPropsValue(container, 'content.showFulfillment', "");
|
|
448
|
+
this.fulfillmentPath = getAttrPath(gCPVal, container, 'fulfillmentPath');
|
|
449
|
+
this.fulfillmentImg = getServiceUrl(getContainerPropsValue(container, 'content.fulfillmentImg', {url: ""}).url);
|
|
429
450
|
console.log("this.scanImg", this.scanImg);
|
|
430
451
|
},
|
|
431
452
|
handleConsumeType(consumeType){
|
|
@@ -475,6 +496,28 @@
|
|
|
475
496
|
this.consume_options = res.consume_options;
|
|
476
497
|
this.default_consume_type = res.default_consume_type;
|
|
477
498
|
this.shopName = res.resource_shop_name;
|
|
499
|
+
this.is_need_jump = res.is_need_jump;
|
|
500
|
+
|
|
501
|
+
//开启履约分账, 跳转到另一个小程序支付
|
|
502
|
+
if(res.is_need_jump === 'Y' && this.showFulfillment === 'Y'){
|
|
503
|
+
if(!this.fulfillmentPath){
|
|
504
|
+
this.$xdAlert({
|
|
505
|
+
content: '请选择履约分账跳转路径',
|
|
506
|
+
time: 2500,
|
|
507
|
+
isClose: false,
|
|
508
|
+
zIndex: 5000
|
|
509
|
+
});
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
let searchStr = "";
|
|
513
|
+
for(let key in this.options){
|
|
514
|
+
searchStr += `&${key}=${this.options[key]}`
|
|
515
|
+
}
|
|
516
|
+
this.fulfillmentPath.url = this.fulfillmentPath.url + `?${searchStr.substring(1)}`;
|
|
517
|
+
this.$xdUniHelper.navigateTo(this.fulfillmentPath);
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
|
|
478
521
|
//当前的核销方式
|
|
479
522
|
if(isFirst){
|
|
480
523
|
this.curConsumeType = res.default_consume_type;
|
|
@@ -81,6 +81,55 @@ export default (data)=>{
|
|
|
81
81
|
},
|
|
82
82
|
inline: false,
|
|
83
83
|
},
|
|
84
|
+
{
|
|
85
|
+
label: "履约分账跳转:",
|
|
86
|
+
ele: "xd-radio",
|
|
87
|
+
valueKey: "showFulfillment",
|
|
88
|
+
value: data.showFulfillment || 'N',
|
|
89
|
+
groupKey: "advanced",
|
|
90
|
+
inline: true,
|
|
91
|
+
list: [
|
|
92
|
+
{ label: "开启", value: "Y" },
|
|
93
|
+
{ label: "关闭", value: "N" },
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: '', //label
|
|
98
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
99
|
+
valueKey: 'fulfillmentPath', //form[valueKey]
|
|
100
|
+
placeholder: '请选择履约分账跳转路径',
|
|
101
|
+
value: data.fulfillmentPath || null,
|
|
102
|
+
hidden: data.showFulfillment !== 'Y',
|
|
103
|
+
groupKey:'advanced',
|
|
104
|
+
setting: {
|
|
105
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
106
|
+
},
|
|
107
|
+
inline: false,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: '', //label
|
|
111
|
+
ele: 'xd-upload', //package 名称
|
|
112
|
+
valueKey: 'fulfillmentImg', //form[valueKey]
|
|
113
|
+
value: data.fulfillmentImg || null, //v-model
|
|
114
|
+
defaultValue: data.fulfillmentImg || null, //默认图片对象
|
|
115
|
+
hidden: data.showFulfillment !== 'Y',
|
|
116
|
+
groupKey: "advanced",
|
|
117
|
+
slot: true, //按钮是否使用slot
|
|
118
|
+
oneWidth: 375/3, //单个图片显示宽度
|
|
119
|
+
oneHeight: 672/3, //单个图片显示高度
|
|
120
|
+
elinputClassName: 'input40',
|
|
121
|
+
tipsformet: '上传履约分账图片;上传文件格式:@imageType@,不超过@size@MB.',
|
|
122
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
123
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
124
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
125
|
+
size: 5, //5M
|
|
126
|
+
action: 'aliyun',
|
|
127
|
+
sort: true, //当上传图片列表时候,是否启用排序
|
|
128
|
+
maxlen: 100, //当上传图片列表时候,最大数量数量
|
|
129
|
+
rules: [
|
|
130
|
+
{ required: true, message: '请上传履约分账图片', trigger: ['blur', 'change'] },
|
|
131
|
+
]
|
|
132
|
+
},
|
|
84
133
|
{
|
|
85
134
|
label: '版本号:',
|
|
86
135
|
ele: 'el-input',
|
|
@@ -1239,6 +1239,20 @@ export default {
|
|
|
1239
1239
|
notice: "首次快捷登录,将自动跳转至该地址",
|
|
1240
1240
|
inline: false,
|
|
1241
1241
|
},
|
|
1242
|
+
{
|
|
1243
|
+
label: '是否开启静默登录:', //label
|
|
1244
|
+
ele: "xd-radio",
|
|
1245
|
+
valueKey: "isSilentLogin",
|
|
1246
|
+
value: data.isSilentLogin || "N",
|
|
1247
|
+
groupKey: 'advanced',
|
|
1248
|
+
placeholder: "请选择是否开启静默登录",
|
|
1249
|
+
multiple: false,
|
|
1250
|
+
className: 'input80',
|
|
1251
|
+
list: [
|
|
1252
|
+
{label: '开启', value: "Y"},
|
|
1253
|
+
{label: '关闭', value: "N"},
|
|
1254
|
+
],
|
|
1255
|
+
},
|
|
1242
1256
|
].filter(i => i)
|
|
1243
1257
|
}
|
|
1244
1258
|
}
|
|
@@ -361,6 +361,7 @@ export default {
|
|
|
361
361
|
mpAuthPhoneUrl: "",
|
|
362
362
|
|
|
363
363
|
previewCurrent: 'auth', //当前预览调试模块,auth:授权登录 account:账号登录
|
|
364
|
+
isSilentLogin: "N", //是否开启静默登录
|
|
364
365
|
|
|
365
366
|
//logo样式设置
|
|
366
367
|
logoWrapHeight: 480,
|
|
@@ -606,6 +607,12 @@ export default {
|
|
|
606
607
|
},
|
|
607
608
|
|
|
608
609
|
onJfbLoad(options) {
|
|
610
|
+
//如果开启静默登录
|
|
611
|
+
if(this.isSilentLogin === "Y"){
|
|
612
|
+
this.wxMpSilentLogin();
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
|
|
609
616
|
// T3634 通过二维码进入体验模式
|
|
610
617
|
if(options.preview_code || options.experience_code){
|
|
611
618
|
this.previewAccout = options.preview_code || options.experience_code;
|
|
@@ -700,6 +707,7 @@ export default {
|
|
|
700
707
|
this.showLogo = getContainerPropsValue(value, "content.showLogo", 'Y');
|
|
701
708
|
this.customLogoUrl = getContainerPropsValue(value, "content.customLogoUrl", {});
|
|
702
709
|
this.loginMenuMargin = getContainerPropsValue(value, "content.loginMenuMargin", {});
|
|
710
|
+
this.isSilentLogin = getContainerPropsValue(value, "content.isSilentLogin", 'N');
|
|
703
711
|
|
|
704
712
|
if(this.customLogoUrl && this.customLogoUrl.path){
|
|
705
713
|
logo = this.customLogoUrl.path;
|
|
@@ -729,6 +737,38 @@ export default {
|
|
|
729
737
|
this.formRenderKey = Date.now();
|
|
730
738
|
}
|
|
731
739
|
},
|
|
740
|
+
//静默登录, 微信登录获取code, wx.login => {code: 'xxx'},再根据code获取用户信息
|
|
741
|
+
wxMpSilentLogin() {
|
|
742
|
+
this.$xdShowLoading({});
|
|
743
|
+
uni.login({
|
|
744
|
+
provider: "weixin",
|
|
745
|
+
success: (loginRes) => {
|
|
746
|
+
jfbRootExec("loginThirdLogin", {
|
|
747
|
+
vm: this,
|
|
748
|
+
data: {
|
|
749
|
+
third_auth_code: loginRes.code,
|
|
750
|
+
},
|
|
751
|
+
})
|
|
752
|
+
.then((res) => {
|
|
753
|
+
if (this.jfbAuthorize !== null) {
|
|
754
|
+
this.jfbAuthorize.setAllToken(res["login_info"], () => {
|
|
755
|
+
this.toHomeAfterLogin();
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
this.$xdHideLoading();
|
|
759
|
+
})
|
|
760
|
+
.catch((error) => {
|
|
761
|
+
this.$xdHideLoading();
|
|
762
|
+
console.error(error);
|
|
763
|
+
});
|
|
764
|
+
},
|
|
765
|
+
fail: (error) => {
|
|
766
|
+
console.error(error);
|
|
767
|
+
this.$xdHideLoading();
|
|
768
|
+
},
|
|
769
|
+
});
|
|
770
|
+
},
|
|
771
|
+
|
|
732
772
|
/**
|
|
733
773
|
* @description 获取到登录方式之后处理
|
|
734
774
|
*/
|
|
@@ -85,6 +85,55 @@ export default {
|
|
|
85
85
|
},
|
|
86
86
|
inline: false,
|
|
87
87
|
},
|
|
88
|
+
{
|
|
89
|
+
label: "履约分账跳转:",
|
|
90
|
+
ele: "xd-radio",
|
|
91
|
+
valueKey: "showFulfillment",
|
|
92
|
+
value: data.showFulfillment || 'N',
|
|
93
|
+
groupKey: "advanced",
|
|
94
|
+
inline: true,
|
|
95
|
+
list: [
|
|
96
|
+
{ label: "开启", value: "Y" },
|
|
97
|
+
{ label: "关闭", value: "N" },
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: '', //label
|
|
102
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
103
|
+
valueKey: 'fulfillmentPath', //form[valueKey]
|
|
104
|
+
placeholder: '请选择履约分账跳转路径',
|
|
105
|
+
value: data.fulfillmentPath || null,
|
|
106
|
+
hidden: data.showFulfillment !== 'Y',
|
|
107
|
+
groupKey:'advanced',
|
|
108
|
+
setting: {
|
|
109
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
110
|
+
},
|
|
111
|
+
inline: false,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
label: '', //label
|
|
115
|
+
ele: 'xd-upload', //package 名称
|
|
116
|
+
valueKey: 'fulfillmentImg', //form[valueKey]
|
|
117
|
+
value: data.fulfillmentImg || null, //v-model
|
|
118
|
+
defaultValue: data.fulfillmentImg || null, //默认图片对象
|
|
119
|
+
hidden: data.showFulfillment !== 'Y',
|
|
120
|
+
groupKey: "advanced",
|
|
121
|
+
slot: true, //按钮是否使用slot
|
|
122
|
+
oneWidth: 375/3, //单个图片显示宽度
|
|
123
|
+
oneHeight: 672/3, //单个图片显示高度
|
|
124
|
+
elinputClassName: 'input40',
|
|
125
|
+
tipsformet: '上传履约分账图片;上传文件格式:@imageType@,不超过@size@MB.',
|
|
126
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
127
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
128
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
129
|
+
size: 5, //5M
|
|
130
|
+
action: 'aliyun',
|
|
131
|
+
sort: true, //当上传图片列表时候,是否启用排序
|
|
132
|
+
maxlen: 100, //当上传图片列表时候,最大数量数量
|
|
133
|
+
rules: [
|
|
134
|
+
{ required: true, message: '请上传履约分账图片', trigger: ['blur', 'change'] },
|
|
135
|
+
]
|
|
136
|
+
},
|
|
88
137
|
].filter(i=>i)
|
|
89
138
|
},
|
|
90
139
|
}
|
|
@@ -17,145 +17,151 @@
|
|
|
17
17
|
</view>
|
|
18
18
|
<!-- #endif -->
|
|
19
19
|
<view class="jfb-base-pay__body">
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
我的票券
|
|
36
|
-
<view class="label_sub">(已使用{{ cardList.length }}张票券)</view>
|
|
37
|
-
</view>
|
|
38
|
-
<view class="column_value">
|
|
39
|
-
<!-- <xd-button width="220rpx" radius="60rpx" type="primary" size="small" @click="xdDownDrawer=true">使用新票券</xd-button> -->
|
|
40
|
-
<xd-unit
|
|
41
|
-
:price="payInfo.card_amount"
|
|
42
|
-
:isOld="false"
|
|
43
|
-
:font-size="28"
|
|
44
|
-
:icon-size="0.28"
|
|
45
|
-
></xd-unit>
|
|
46
|
-
</view>
|
|
47
|
-
</view>
|
|
48
|
-
</view>
|
|
49
|
-
<view class="ticket_list" v-if="cardList.length">
|
|
50
|
-
<view
|
|
51
|
-
:style="{
|
|
52
|
-
backgroundColor:jfbPayBgColor
|
|
53
|
-
}"
|
|
54
|
-
class="ticket_item"
|
|
55
|
-
v-for="ticket in cardList"
|
|
56
|
-
:key="ticket.card_number"
|
|
57
|
-
>
|
|
58
|
-
<view class="_header">
|
|
59
|
-
<view class="flex align-center">
|
|
60
|
-
<view class="margin-right">
|
|
61
|
-
<xd-font-icon
|
|
62
|
-
icon="iconkaquan"
|
|
63
|
-
color="#ffc65d"
|
|
64
|
-
size="32"
|
|
65
|
-
></xd-font-icon>
|
|
66
|
-
</view>
|
|
67
|
-
<text> {{ ticket.card_type_name }}</text>
|
|
20
|
+
<template v-if="isShowFulfillment">
|
|
21
|
+
<image :src="fulfillmentImg" class="fulfillment_img" mode="widthFix"></image>
|
|
22
|
+
</template>
|
|
23
|
+
<template v-else>
|
|
24
|
+
<view>
|
|
25
|
+
<view class="column-group">
|
|
26
|
+
<view class="column-item" style="margin-bottom: 5rpx">
|
|
27
|
+
<view class="column_label"> 订单总额 </view>
|
|
28
|
+
<view class="column_value text-gray">
|
|
29
|
+
<xd-unit
|
|
30
|
+
:price="payInfo.total_amount"
|
|
31
|
+
:isOld="false"
|
|
32
|
+
:font-size="28"
|
|
33
|
+
:icon-size="0.28"
|
|
34
|
+
></xd-unit>
|
|
68
35
|
</view>
|
|
69
|
-
<!-- <xd-radio size="mini" @change="flat => handlerTicketSelect(flat, ticket.card_number)" :value="checkedCards.includes(ticket.card_number)"></xd-radio> -->
|
|
70
|
-
</view>
|
|
71
|
-
<view class="_cont">
|
|
72
|
-
<view>ID:{{ ticket.card_number }}</view>
|
|
73
|
-
<view>有效期至:{{ ticket.end_time }}</view>
|
|
74
36
|
</view>
|
|
75
|
-
<view class="
|
|
76
|
-
<view class="
|
|
77
|
-
|
|
37
|
+
<view v-if="cardList.length" class="column-item" style="padding-bottom: 0;">
|
|
38
|
+
<view class="column_label">
|
|
39
|
+
我的票券
|
|
40
|
+
<view class="label_sub">(已使用{{ cardList.length }}张票券)</view>
|
|
41
|
+
</view>
|
|
42
|
+
<view class="column_value">
|
|
43
|
+
<!-- <xd-button width="220rpx" radius="60rpx" type="primary" size="small" @click="xdDownDrawer=true">使用新票券</xd-button> -->
|
|
78
44
|
<xd-unit
|
|
79
|
-
:price="
|
|
45
|
+
:price="payInfo.card_amount"
|
|
80
46
|
:isOld="false"
|
|
81
47
|
:font-size="28"
|
|
82
48
|
:icon-size="0.28"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
49
|
+
></xd-unit>
|
|
50
|
+
</view>
|
|
51
|
+
</view>
|
|
52
|
+
</view>
|
|
53
|
+
<view class="ticket_list" v-if="cardList.length">
|
|
54
|
+
<view
|
|
55
|
+
:style="{
|
|
56
|
+
backgroundColor:jfbPayBgColor
|
|
57
|
+
}"
|
|
58
|
+
class="ticket_item"
|
|
59
|
+
v-for="ticket in cardList"
|
|
60
|
+
:key="ticket.card_number"
|
|
61
|
+
>
|
|
62
|
+
<view class="_header">
|
|
63
|
+
<view class="flex align-center">
|
|
64
|
+
<view class="margin-right">
|
|
65
|
+
<xd-font-icon
|
|
66
|
+
icon="iconkaquan"
|
|
67
|
+
color="#ffc65d"
|
|
68
|
+
size="32"
|
|
69
|
+
></xd-font-icon>
|
|
70
|
+
</view>
|
|
71
|
+
<text> {{ ticket.card_type_name }}</text>
|
|
72
|
+
</view>
|
|
73
|
+
<!-- <xd-radio size="mini" @change="flat => handlerTicketSelect(flat, ticket.card_number)" :value="checkedCards.includes(ticket.card_number)"></xd-radio> -->
|
|
74
|
+
</view>
|
|
75
|
+
<view class="_cont">
|
|
76
|
+
<view>ID:{{ ticket.card_number }}</view>
|
|
77
|
+
<view>有效期至:{{ ticket.end_time }}</view>
|
|
78
|
+
</view>
|
|
79
|
+
<view class="_footer" :style="{borderTop:'1px solid ' + borderColor }">
|
|
80
|
+
<view class="_item">
|
|
81
|
+
<text>剩余:</text>
|
|
82
|
+
<xd-unit
|
|
83
|
+
:price="ticket.card_point"
|
|
84
|
+
:isOld="false"
|
|
85
|
+
:font-size="28"
|
|
86
|
+
:icon-size="0.28"
|
|
87
|
+
:unit="ticket.unit"
|
|
88
|
+
></xd-unit
|
|
89
|
+
></view>
|
|
90
|
+
<view v-if="ticket.use_card_point" class="_item text-primary">
|
|
91
|
+
<text>使用:</text>
|
|
92
|
+
<xd-unit
|
|
93
|
+
:price="ticket.use_card_point"
|
|
94
|
+
:isOld="false"
|
|
95
|
+
:font-size="28"
|
|
96
|
+
:icon-size="0.28"
|
|
97
|
+
:unit="ticket.unit"
|
|
98
|
+
></xd-unit>
|
|
99
|
+
</view>
|
|
100
|
+
</view>
|
|
101
|
+
</view>
|
|
102
|
+
</view>
|
|
103
|
+
</view>
|
|
104
|
+
<view class="remain_pay" v-if="payInfo.channel_amount > 0">
|
|
105
|
+
<view style="border-bottom: 2rpx solid #eee;" class="column-group">
|
|
106
|
+
<view class="column-item" style="padding: 30rpx 60rpx">
|
|
107
|
+
<view class="column_label">{{text1}}<text v-if="showText2==='Y'" class="label_sub">{{ text2 }}</text></view>
|
|
108
|
+
<view class="column_value text-primary">
|
|
88
109
|
<xd-unit
|
|
89
|
-
:price="
|
|
110
|
+
:price="payInfo.channel_amount"
|
|
90
111
|
:isOld="false"
|
|
91
112
|
:font-size="28"
|
|
92
113
|
:icon-size="0.28"
|
|
93
|
-
:unit="ticket.unit"
|
|
94
114
|
></xd-unit>
|
|
95
115
|
</view>
|
|
96
116
|
</view>
|
|
97
117
|
</view>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<view class="column-item" style="padding: 30rpx 60rpx">
|
|
103
|
-
<view class="column_label">{{text1}}<text v-if="showText2==='Y'" class="label_sub">{{ text2 }}</text></view>
|
|
104
|
-
<view class="column_value text-primary">
|
|
118
|
+
<view class="remain_header">
|
|
119
|
+
<view>{{ text3 }}</view>
|
|
120
|
+
<view v-if="showContinuePay==='Y'" class="flex align-center text-primary">
|
|
121
|
+
<view class="margin-right">继续补差</view>
|
|
105
122
|
<xd-unit
|
|
106
123
|
:price="payInfo.channel_amount"
|
|
124
|
+
:is-show-icon="false"
|
|
125
|
+
unit="元"
|
|
107
126
|
:isOld="false"
|
|
108
|
-
:font-size="
|
|
109
|
-
:icon-size="0.
|
|
127
|
+
:font-size="24"
|
|
128
|
+
:icon-size="0.3"
|
|
110
129
|
></xd-unit>
|
|
111
130
|
</view>
|
|
112
131
|
</view>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
132
|
+
<view class="pay_list">
|
|
133
|
+
<view
|
|
134
|
+
v-for="item in payChannels"
|
|
135
|
+
:key="item.channel_provider_id"
|
|
136
|
+
class="pay_item"
|
|
137
|
+
@click="handlerPayCheck(item.channel_provider_id)"
|
|
138
|
+
>
|
|
139
|
+
<view class="icon">
|
|
140
|
+
<image mode="scaleToFill" :src="item['channel_logo']" style="height:64rpx; width: 64rpx" />
|
|
141
|
+
</view>
|
|
142
|
+
<view class="pay_name">{{ item.channel_provider_name }}</view>
|
|
143
|
+
<xd-radio
|
|
144
|
+
:value="channel_provider_id === item.channel_provider_id"
|
|
145
|
+
:isClickEvent="false"
|
|
146
|
+
size="mini"
|
|
147
|
+
></xd-radio>
|
|
148
|
+
</view>
|
|
126
149
|
</view>
|
|
127
150
|
</view>
|
|
128
|
-
<view class="
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
151
|
+
<view class="bottom_btn-mask"></view>
|
|
152
|
+
<view v-if="is_can_pay==='Y'" class="bottom_btn" :style="prod_bottom">
|
|
153
|
+
<xd-button
|
|
154
|
+
width="480rpx"
|
|
155
|
+
type="primary"
|
|
156
|
+
radius="50rpx"
|
|
157
|
+
@click="doThirdPay"
|
|
134
158
|
>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
<view class="pay_name">{{ item.channel_provider_name }}</view>
|
|
139
|
-
<xd-radio
|
|
140
|
-
:value="channel_provider_id === item.channel_provider_id"
|
|
141
|
-
:isClickEvent="false"
|
|
142
|
-
size="mini"
|
|
143
|
-
></xd-radio>
|
|
144
|
-
</view>
|
|
159
|
+
确认支付
|
|
160
|
+
¥{{ $xdUniHelper.divisionFloatNumber(payInfo.channel_amount, 100) }}
|
|
161
|
+
</xd-button>
|
|
145
162
|
</view>
|
|
146
|
-
</
|
|
147
|
-
|
|
148
|
-
<view v-if="is_can_pay==='Y'" class="bottom_btn" :style="prod_bottom">
|
|
149
|
-
<xd-button
|
|
150
|
-
width="480rpx"
|
|
151
|
-
type="primary"
|
|
152
|
-
radius="50rpx"
|
|
153
|
-
@click="doThirdPay"
|
|
154
|
-
>
|
|
155
|
-
确认支付
|
|
156
|
-
¥{{ $xdUniHelper.divisionFloatNumber(payInfo.channel_amount, 100) }}
|
|
157
|
-
</xd-button>
|
|
158
|
-
</view>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
159
165
|
</view>
|
|
160
166
|
</view>
|
|
161
167
|
</template>
|
|
@@ -166,7 +172,8 @@ import { jfbRootExec } from "@/utils/xd.event";
|
|
|
166
172
|
import JfbBasePayMixin from "./JfbBasePayMixin";
|
|
167
173
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
168
174
|
import extsMixins from "@/mixins/extsMixins";
|
|
169
|
-
import {
|
|
175
|
+
import { getAttrPath } from "@/utils/JumpTo";
|
|
176
|
+
import { getContainerPropsValue, gCPVal} from "@/utils/xd.base";
|
|
170
177
|
import XdButton from "@/components/XdButton/XdButton";
|
|
171
178
|
import XdForm from "@/components/XdForm/XdForm";
|
|
172
179
|
import XdFormItem from "@/components/XdFormItem/XdFormItem";
|
|
@@ -179,6 +186,7 @@ import color from "color";
|
|
|
179
186
|
const Color = require('color');
|
|
180
187
|
let styleForm = new StyleForm({bgColor: '#fafafa'}, getContainerPropsValue, 'pay', true);
|
|
181
188
|
import { mapState } from "vuex";
|
|
189
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
182
190
|
|
|
183
191
|
export default {
|
|
184
192
|
name: "JfbBasePay",
|
|
@@ -212,6 +220,7 @@ export default {
|
|
|
212
220
|
channel_amount: 0,
|
|
213
221
|
card_amount: 0,
|
|
214
222
|
},
|
|
223
|
+
is_need_jump: "",
|
|
215
224
|
//面板
|
|
216
225
|
paySuccessPath: "", //支付成功
|
|
217
226
|
rechargeSuccessPath: "", //充值成功
|
|
@@ -223,6 +232,9 @@ export default {
|
|
|
223
232
|
text3: "",
|
|
224
233
|
showText2: "Y",
|
|
225
234
|
showContinuePay: "",
|
|
235
|
+
showFulfillment: "",
|
|
236
|
+
fulfillmentPath: "", //履约分账跳转路径
|
|
237
|
+
fulfillmentImg: "", //履约分账图片
|
|
226
238
|
};
|
|
227
239
|
},
|
|
228
240
|
watch: {
|
|
@@ -245,6 +257,12 @@ export default {
|
|
|
245
257
|
}
|
|
246
258
|
return url
|
|
247
259
|
},
|
|
260
|
+
isShowFulfillment(){
|
|
261
|
+
//如果是预览模式,根据属性showFulfillment决定是否展示履约分账
|
|
262
|
+
if(this.$configProject.isPreview) return this.showFulfillment === 'Y';
|
|
263
|
+
//非预览模式,根据is_need_jump&showFulfillment决定是否展示履约分账
|
|
264
|
+
else return this.is_need_jump === 'Y' && this.showFulfillment === 'Y';
|
|
265
|
+
},
|
|
248
266
|
...styleForm.getComputedItem(),
|
|
249
267
|
},
|
|
250
268
|
created() {
|
|
@@ -292,6 +310,10 @@ export default {
|
|
|
292
310
|
).value;
|
|
293
311
|
styleForm.getInitItem(this, container);
|
|
294
312
|
this.borderColor = color(this.jfbPayBgColor).lighten(0.5).hex();
|
|
313
|
+
this.showFulfillment = getContainerPropsValue(container, 'content.showFulfillment', "");
|
|
314
|
+
this.fulfillmentPath = getAttrPath(gCPVal, container, 'fulfillmentPath');
|
|
315
|
+
this.fulfillmentImg = getServiceUrl(getContainerPropsValue(container, 'content.fulfillmentImg', {url: ""}).url);
|
|
316
|
+
console.log("fulfillmentImg", this.fulfillmentImg);
|
|
295
317
|
},
|
|
296
318
|
getTimeFormat(time) {
|
|
297
319
|
let date = null;
|
|
@@ -347,6 +369,25 @@ export default {
|
|
|
347
369
|
item["end_time"] = this.getTimeFormat(item.end_time);
|
|
348
370
|
return item;
|
|
349
371
|
});
|
|
372
|
+
this.is_need_jump = res.is_need_jump;
|
|
373
|
+
//跳转到另一个小程序支付
|
|
374
|
+
if(res.is_need_jump === 'Y' && this.showFulfillment === 'Y'){
|
|
375
|
+
if(!this.fulfillmentPath){
|
|
376
|
+
this.$xdAlert({
|
|
377
|
+
content: '请选择履约分账跳转路径',
|
|
378
|
+
time: 2500,
|
|
379
|
+
isClose: false,
|
|
380
|
+
zIndex: 5000
|
|
381
|
+
});
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
let searchStr = "";
|
|
385
|
+
for(let key in this.options){
|
|
386
|
+
searchStr += `&${key}=${this.options[key]}`
|
|
387
|
+
}
|
|
388
|
+
this.fulfillmentPath.url = this.fulfillmentPath.url + `?${searchStr.substring(1)}`;
|
|
389
|
+
this.$xdUniHelper.navigateTo(this.fulfillmentPath)
|
|
390
|
+
}
|
|
350
391
|
});
|
|
351
392
|
},
|
|
352
393
|
p_getListUserPayChannel() {
|
|
@@ -546,6 +587,9 @@ export default {
|
|
|
546
587
|
&__body {
|
|
547
588
|
color: #333;
|
|
548
589
|
// padding-bottom: 150rpx;
|
|
590
|
+
.fulfillment_img{
|
|
591
|
+
width: 100%;
|
|
592
|
+
}
|
|
549
593
|
.column-group {
|
|
550
594
|
.column-item {
|
|
551
595
|
background: #ffffff;
|