jufubao-base 1.0.158 → 1.0.159-beta1
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/common/authorize.js +201 -70
- package/src/components/JfbBaseAddress/JfbBaseAddress.vue +4 -4
- package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +2 -1
- package/src/components/JfbBaseBack/JfbBaseBack.vue +7 -6
- package/src/components/JfbBaseCard/JfbBaseCard.vue +4 -1
- package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +54 -24
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +14 -14
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +313 -394
- package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +1 -1
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +4 -5
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +1 -0
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +15 -19
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +5 -2
- package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +1 -1
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +20 -16
- package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +1 -1
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +1 -1
- package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +34 -18
- package/src/components/JfbBaseEntry/Attr.js +22 -0
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +76 -13
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +27 -18
- package/src/components/JfbBaseFastLink/XdFastNav.vue +2 -2
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +2 -2
- package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +1 -1
- package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +3 -3
- package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlay.vue +13 -0
- package/src/components/JfbBaseMapOverlay/XdMapOverlay.vue +52 -37
- package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +2 -1
- package/src/components/JfbBaseNotice/Attr.js +0 -2
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +30 -10
- package/src/components/JfbBaseNotice/XdNoticeBar.vue +17 -1
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +2 -2
- package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +1 -1
- package/src/components/JfbBasePoster/JfbBasePoster.vue +118 -18
- package/src/components/JfbBasePoster/MoreScreen.vue +155 -37
- package/src/components/JfbBasePosterBigSmall/Attr.js +1 -4
- package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +191 -67
- package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +90 -20
- package/src/components/JfbBasePosterType/FourScreen.vue +156 -18
- package/src/components/JfbBasePosterType/JfbBasePosterType.vue +0 -35
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +2 -1
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -1
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +8 -7
- package/src/components/JfbBaseVideo/XdVideo.vue +0 -4
- package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +4 -13
- package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +5 -4
- package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +2 -2
- package/src/mixins/colorCardMixins.js +1 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
13
|
<view class="jfb-base-card-disabled-entry__edit-icon" @click="delEdit"
|
|
14
|
-
|
|
14
|
+
>删除</view
|
|
15
15
|
>
|
|
16
16
|
</view>
|
|
17
17
|
<!-- #endif -->
|
|
@@ -178,7 +178,7 @@ export default {
|
|
|
178
178
|
return this.fixedStyle({height: 0, zIndex: 111});
|
|
179
179
|
},
|
|
180
180
|
emptyBg() {
|
|
181
|
-
|
|
181
|
+
return this.getNoData();
|
|
182
182
|
},
|
|
183
183
|
},
|
|
184
184
|
watch: {
|
|
@@ -195,7 +195,6 @@ export default {
|
|
|
195
195
|
this.getCardList();
|
|
196
196
|
},
|
|
197
197
|
|
|
198
|
-
|
|
199
198
|
getCardList() {
|
|
200
199
|
this.$xdShowLoading({});
|
|
201
200
|
jfbRootExec("getDisableCardListEntry", {vm: this, data: {is_all: "Y", is_show_entry_settings: 'Y'},})
|
|
@@ -226,7 +225,7 @@ export default {
|
|
|
226
225
|
|
|
227
226
|
handleAllUnBindCard(){
|
|
228
227
|
this.$xdConfirm({
|
|
229
|
-
|
|
228
|
+
styles: this.styles,
|
|
230
229
|
content: "您确定要解除绑定所有票券吗?",
|
|
231
230
|
title: "系统提示",
|
|
232
231
|
width: "80%",
|
|
@@ -259,7 +258,7 @@ export default {
|
|
|
259
258
|
|
|
260
259
|
handleUnBindCard(item) {
|
|
261
260
|
this.$xdConfirm({
|
|
262
|
-
|
|
261
|
+
styles: this.styles,
|
|
263
262
|
content: "您确定要解除绑定票券吗?",
|
|
264
263
|
title: "系统提示",
|
|
265
264
|
width: "80%",
|
|
@@ -37,15 +37,13 @@
|
|
|
37
37
|
:placeholder="card_pwd_placeholder"
|
|
38
38
|
/>
|
|
39
39
|
<xd-font-icon
|
|
40
|
-
@click="
|
|
40
|
+
@click="handleIcon()"
|
|
41
41
|
:icon="isPassword ? 'iconbiyan' : 'iconchakan'"
|
|
42
42
|
></xd-font-icon>
|
|
43
43
|
</view>
|
|
44
44
|
</view>
|
|
45
45
|
<view class="jfb-base-card-info__body-footer" :style="prod_bottom">
|
|
46
|
-
<xd-button type="primary" width="360rpx" @click="handleGetInfo"
|
|
47
|
-
>确认</xd-button
|
|
48
|
-
>
|
|
46
|
+
<xd-button type="primary" width="360rpx" @click="handleGetInfo">确认</xd-button>
|
|
49
47
|
</view>
|
|
50
48
|
</view>
|
|
51
49
|
|
|
@@ -78,15 +76,12 @@
|
|
|
78
76
|
<view
|
|
79
77
|
v-if="info.other_card_point && info.card_point_type !== 1"
|
|
80
78
|
class="jfb-base-card-info__body-residue-reach"
|
|
81
|
-
|
|
82
|
-
>
|
|
79
|
+
>购买其他物品可抵:{{ info.other_card_point }}</view>
|
|
83
80
|
</view>
|
|
84
81
|
<view
|
|
85
82
|
class="jfb-base-card-info__body-residue-business"
|
|
86
83
|
v-if="info.card_point_type !== 1"
|
|
87
|
-
>
|
|
88
|
-
所属业务线:{{ info.main_business_code_name }}
|
|
89
|
-
</view>
|
|
84
|
+
>所属业务线:{{ info.main_business_code_name }}</view>
|
|
90
85
|
</view>
|
|
91
86
|
<view :style="{ height: '100rpx' }"></view>
|
|
92
87
|
</view>
|
|
@@ -129,18 +124,10 @@ export default {
|
|
|
129
124
|
label: "票券号码",
|
|
130
125
|
key: "card_number",
|
|
131
126
|
},
|
|
132
|
-
// {
|
|
133
|
-
// label: "票券类型",
|
|
134
|
-
// key: "unit",
|
|
135
|
-
// },
|
|
136
127
|
{
|
|
137
128
|
label: "票券状态",
|
|
138
129
|
key: "card_status_name",
|
|
139
130
|
},
|
|
140
|
-
// {
|
|
141
|
-
// label: "票券转换",
|
|
142
|
-
// key: "is_exchange_name",
|
|
143
|
-
// },
|
|
144
131
|
{
|
|
145
132
|
label: "有效期",
|
|
146
133
|
key: "end_time",
|
|
@@ -177,7 +164,7 @@ export default {
|
|
|
177
164
|
return true;
|
|
178
165
|
},
|
|
179
166
|
showValueKey(){
|
|
180
|
-
if(this.info.is_expired === "Y"){
|
|
167
|
+
if(this.info && this.info.is_expired === "Y"){
|
|
181
168
|
return this.valueKey.filter(item => item.key !== "end_time");
|
|
182
169
|
}
|
|
183
170
|
return this.valueKey;
|
|
@@ -185,6 +172,9 @@ export default {
|
|
|
185
172
|
},
|
|
186
173
|
created() {},
|
|
187
174
|
methods: {
|
|
175
|
+
handleIcon(){
|
|
176
|
+
this.isPassword = !this.isPassword
|
|
177
|
+
},
|
|
188
178
|
toShowCouponDialog(){
|
|
189
179
|
if(this.info){
|
|
190
180
|
jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.info.card_number})
|
|
@@ -256,7 +246,7 @@ export default {
|
|
|
256
246
|
//卡券已被自己绑定时的弹框
|
|
257
247
|
handleBindConfirm(){
|
|
258
248
|
this.$xdConfirm({
|
|
259
|
-
|
|
249
|
+
styles: this.styles,
|
|
260
250
|
width: '90%',
|
|
261
251
|
content: '您已绑定该票券,无需再次绑定',
|
|
262
252
|
confirmText: '我的票券',
|
|
@@ -293,6 +283,12 @@ export default {
|
|
|
293
283
|
onJfbLoad(options) {
|
|
294
284
|
this.init();
|
|
295
285
|
this.qrcode = options.qrcode;
|
|
286
|
+
//#ifdef MP-WEIXIN
|
|
287
|
+
if(options.qrcode) {
|
|
288
|
+
this.qrcode = decodeURIComponent(options.qrcode);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
//#endif
|
|
296
292
|
if(options.inCallback) {
|
|
297
293
|
this.inCallbackUrlOrg = options.inCallback;
|
|
298
294
|
}
|
|
@@ -194,7 +194,7 @@ export default {
|
|
|
194
194
|
handleToLink() {
|
|
195
195
|
if(this.info.card_point===0) {
|
|
196
196
|
this.$xdConfirm({
|
|
197
|
-
|
|
197
|
+
styles: this.styles,
|
|
198
198
|
content: "票券余额为0,是否确认绑定?",
|
|
199
199
|
width: "80%",
|
|
200
200
|
success: (res) => {
|
|
@@ -269,7 +269,7 @@ export default {
|
|
|
269
269
|
//卡券已被自己绑定时的弹框
|
|
270
270
|
handleBindConfirm(){
|
|
271
271
|
this.$xdConfirm({
|
|
272
|
-
|
|
272
|
+
styles: this.styles,
|
|
273
273
|
width: '90%',
|
|
274
274
|
content: '您已绑定该票券,无需再次绑定',
|
|
275
275
|
confirmText: '我的票券',
|
|
@@ -308,6 +308,9 @@ export default {
|
|
|
308
308
|
onJfbLoad(options) {
|
|
309
309
|
this.init();
|
|
310
310
|
this.qrcode = options.qrcode;
|
|
311
|
+
//#ifdef MP-WEIXIN
|
|
312
|
+
this.qrcode = decodeURIComponent(options.qrcode);
|
|
313
|
+
//#endif
|
|
311
314
|
if(options.inCallback) {
|
|
312
315
|
this.inCallbackUrlOrg = options.inCallback;
|
|
313
316
|
}
|
|
@@ -40,13 +40,14 @@
|
|
|
40
40
|
</view>
|
|
41
41
|
</view>
|
|
42
42
|
<view class="merge-item" :style="{background: themeInStyle['color']}">
|
|
43
|
-
<view class="merge-item-box" :style="{backgroundImage: `url(
|
|
44
|
-
<view class="merge-item-title">
|
|
43
|
+
<view class="merge-item-box" :style="{backgroundImage: `url(//img.jufubao.cn/component/card/mergbg.jpg)`}">
|
|
44
|
+
<view class="merge-item-title" :style="{background: themeOutStyle['color']}">
|
|
45
45
|
<xd-font-icon icon="iconzhuanru"></xd-font-icon>
|
|
46
46
|
<view>转入的票券</view>
|
|
47
47
|
</view>
|
|
48
48
|
<view>
|
|
49
49
|
<xd-select
|
|
50
|
+
v-if="toListLoading"
|
|
50
51
|
:disabled="toList.length === 0"
|
|
51
52
|
:key="randomKey"
|
|
52
53
|
:height="66"
|
|
@@ -88,10 +89,11 @@
|
|
|
88
89
|
<view class="bottom_btn-mask"></view>
|
|
89
90
|
<view class="bottom_btn" :style="prod_bottom">
|
|
90
91
|
<xd-button
|
|
92
|
+
v-if="btnLoading"
|
|
91
93
|
:key="disabledKey"
|
|
92
94
|
:disabled="disabled"
|
|
93
95
|
@click="handleToSubmit"
|
|
94
|
-
|
|
96
|
+
style="width: 90%"
|
|
95
97
|
:type="disabled ?'info': 'primary'"
|
|
96
98
|
>合并</xd-button>
|
|
97
99
|
</view>
|
|
@@ -137,9 +139,11 @@ export default {
|
|
|
137
139
|
toList: [],
|
|
138
140
|
fromSelect: null,
|
|
139
141
|
toSelect: null,
|
|
140
|
-
randomKey:
|
|
142
|
+
randomKey:'randomKey',
|
|
141
143
|
valid_code:'',
|
|
142
144
|
valid_token: 'valid_token',
|
|
145
|
+
toListLoading: true,
|
|
146
|
+
btnLoading: true,
|
|
143
147
|
|
|
144
148
|
|
|
145
149
|
content: "",
|
|
@@ -178,7 +182,10 @@ export default {
|
|
|
178
182
|
},
|
|
179
183
|
|
|
180
184
|
disabled(){
|
|
181
|
-
this.
|
|
185
|
+
this.btnLoading = false;
|
|
186
|
+
setTimeout(()=>{
|
|
187
|
+
this.btnLoading = true;
|
|
188
|
+
},10)
|
|
182
189
|
return this.fromSelect === null || this.toSelect === null;
|
|
183
190
|
},
|
|
184
191
|
},
|
|
@@ -194,7 +201,6 @@ export default {
|
|
|
194
201
|
this.switchValidToken();
|
|
195
202
|
this.validImageAPIUrl = this.brandInfo["api_host"] + "/common/v1/valid_code/image/show";
|
|
196
203
|
this.contentBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
197
|
-
|
|
198
204
|
},
|
|
199
205
|
methods: {
|
|
200
206
|
onJfbLoad(options) {
|
|
@@ -251,14 +257,6 @@ export default {
|
|
|
251
257
|
},
|
|
252
258
|
|
|
253
259
|
handleToSubmit() {
|
|
254
|
-
// if (!this.valid_code) {
|
|
255
|
-
// uni.showToast({
|
|
256
|
-
// title: "验证码不能为空!",
|
|
257
|
-
// icon: "none",
|
|
258
|
-
// });
|
|
259
|
-
// return;
|
|
260
|
-
// }
|
|
261
|
-
|
|
262
260
|
let outPrice = this.$xdUniHelper.divisionFloatNumber(this.fromSelect.card_point, 100);
|
|
263
261
|
let outHtml = `${this.fromSelect.value}(剩余:${outPrice})`;
|
|
264
262
|
let inPrice = this.$xdUniHelper.divisionFloatNumber(this.toSelect.card_point, 100);
|
|
@@ -266,7 +264,7 @@ export default {
|
|
|
266
264
|
this.$xdConfirm({
|
|
267
265
|
title: "是否确认合并票券",
|
|
268
266
|
isHtml: true,
|
|
269
|
-
|
|
267
|
+
styles: this.styles,
|
|
270
268
|
content: `<div class="label-value"><div><span>转出票券:</span><span>${outHtml}</span></div><div><span>转入票券:</span><span>${inHtml}</span></div></div>`,
|
|
271
269
|
success: (action) => {
|
|
272
270
|
let params = {
|
|
@@ -295,6 +293,8 @@ export default {
|
|
|
295
293
|
});
|
|
296
294
|
},
|
|
297
295
|
handleChangeFrom(select) {
|
|
296
|
+
this.toListLoading = false;
|
|
297
|
+
this.randomKey = null;
|
|
298
298
|
this.fromSelect = select.item;
|
|
299
299
|
jfbRootExec("toCardListEntry", {vm: this, data: {card_number: select.item.value,},})
|
|
300
300
|
.then((res) => {
|
|
@@ -308,7 +308,11 @@ export default {
|
|
|
308
308
|
name: item.card_type_name
|
|
309
309
|
};
|
|
310
310
|
});
|
|
311
|
-
this.randomKey =
|
|
311
|
+
this.randomKey = this.$xdUniHelper.randomChar(20);
|
|
312
|
+
setTimeout(()=>{
|
|
313
|
+
this.toListLoading = true;
|
|
314
|
+
},50)
|
|
315
|
+
|
|
312
316
|
})
|
|
313
317
|
.catch((err) => {
|
|
314
318
|
this.$xdLog.catch(err)
|
|
@@ -82,22 +82,13 @@
|
|
|
82
82
|
</view>
|
|
83
83
|
<view class="jfb-base-card__body-card-item-right-bottom">
|
|
84
84
|
<view class="jfb-base-card__body-card-item-right-bottom-info">
|
|
85
|
-
<view
|
|
86
|
-
|
|
87
|
-
>
|
|
88
|
-
剩余{{ item.unit }}数:{{ item.card_point }}{{ item.unit }}
|
|
89
|
-
</view>
|
|
90
|
-
<view
|
|
91
|
-
class="jfb-base-card__body-card-item-right-bottom-info-deduction"
|
|
92
|
-
>
|
|
93
|
-
购买其他物品可抵:{{ item.other_card_point }}
|
|
94
|
-
</view>
|
|
85
|
+
<view class="jfb-base-card__body-card-item-right-bottom-info-residue">剩余{{ item.unit }}数:{{ item.card_point }}{{ item.unit }}</view>
|
|
86
|
+
<view class="jfb-base-card__body-card-item-right-bottom-info-deduction">购买其他物品可抵:{{ item.other_card_point }}</view>
|
|
95
87
|
</view>
|
|
96
88
|
<view
|
|
97
89
|
@click.stop="toDetail(item)"
|
|
98
90
|
:style="{ background: mainColor }"
|
|
99
|
-
|
|
100
|
-
>
|
|
91
|
+
>查看</view>
|
|
101
92
|
</view>
|
|
102
93
|
</view>
|
|
103
94
|
</view>
|
|
@@ -106,8 +97,14 @@
|
|
|
106
97
|
<view :style="{height:'128rpx'}"></view>
|
|
107
98
|
<view class="bottom_fix" :style="button_bottom">
|
|
108
99
|
<view>
|
|
100
|
+
<!-- #ifdef MP-WEIXIN-->
|
|
101
|
+
<view><xd-button type="primary" @click="toBindCard">绑定新卡</xd-button></view>
|
|
102
|
+
<view><xd-button type="primary" @click="toOrderList">我的订单</xd-button></view>
|
|
103
|
+
<!-- #endif-->
|
|
104
|
+
<!-- #ifdef H5-->
|
|
109
105
|
<xd-button type="primary" @click="toBindCard">绑定新卡</xd-button>
|
|
110
106
|
<xd-button type="primary" @click="toOrderList">我的订单</xd-button>
|
|
107
|
+
<!-- #endif-->
|
|
111
108
|
</view>
|
|
112
109
|
</view>
|
|
113
110
|
</view>
|
|
@@ -123,6 +120,7 @@
|
|
|
123
120
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
124
121
|
import extsMixins from "@/mixins/extsMixins";
|
|
125
122
|
import {Base64} from "js-base64";
|
|
123
|
+
import {mapState} from "vuex";
|
|
126
124
|
|
|
127
125
|
export default {
|
|
128
126
|
name: "JfbBaseCardV2",
|
|
@@ -137,6 +135,7 @@
|
|
|
137
135
|
return {
|
|
138
136
|
cardList: [],
|
|
139
137
|
inCallback: "",
|
|
138
|
+
|
|
140
139
|
//面板
|
|
141
140
|
cardInfoPath: "", //卡券详情
|
|
142
141
|
cardBindPath: "",
|
|
@@ -154,11 +153,14 @@
|
|
|
154
153
|
}
|
|
155
154
|
},
|
|
156
155
|
watch: {
|
|
157
|
-
container(value) {
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
container(value,oldValue) {
|
|
157
|
+
if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
158
|
+
if (this.$configProject['isPreview']) this.init(value)
|
|
159
|
+
},
|
|
160
160
|
},
|
|
161
161
|
computed: {
|
|
162
|
+
...mapState(['jfbAuthorize']),
|
|
163
|
+
|
|
162
164
|
button_bottom() {
|
|
163
165
|
return this.fixedStyle({paddingBottom: 0, zIndex: 111})
|
|
164
166
|
},
|
|
@@ -204,6 +206,7 @@
|
|
|
204
206
|
}).filter((item) => item["is_valid"] === "Y");
|
|
205
207
|
})
|
|
206
208
|
},
|
|
209
|
+
|
|
207
210
|
/**
|
|
208
211
|
* @description 监听事件变化
|
|
209
212
|
* @param container {object} 业务组件对象自己
|
|
@@ -215,6 +218,7 @@
|
|
|
215
218
|
this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
|
|
216
219
|
this.margin = getContainerPropsValue(container, 'content.margin', {top: 0, left: 0, bottom: 0, right: 0});
|
|
217
220
|
},
|
|
221
|
+
|
|
218
222
|
handleBindLogin(item){
|
|
219
223
|
this.$xdShowLoading({});
|
|
220
224
|
jfbRootExec("loginCardBind", {
|
|
@@ -222,8 +226,8 @@
|
|
|
222
226
|
data: { card_number: item["card_number"] },
|
|
223
227
|
})
|
|
224
228
|
.then((res) => {
|
|
225
|
-
console.log(res);
|
|
226
229
|
this.$xdHideLoading();
|
|
230
|
+
|
|
227
231
|
//#ifdef MP-WEIXIN
|
|
228
232
|
if (this.jfbAuthorize !== null) {
|
|
229
233
|
this.jfbAuthorize.setCardToken(res);
|
|
@@ -232,13 +236,16 @@
|
|
|
232
236
|
|
|
233
237
|
if (this.$configProject.isPreview) {
|
|
234
238
|
console.log("handleBindLogin", "预览模式不跳转", this.inCallback);
|
|
235
|
-
}
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
console.warn(`handleBindLogin: ${this.inCallback}`);
|
|
236
242
|
this.$xdUniHelper.redirectTo({
|
|
237
243
|
url: this.inCallback,
|
|
238
244
|
});
|
|
239
245
|
}
|
|
240
246
|
})
|
|
241
247
|
.catch((res) => {
|
|
248
|
+
console.error(res);
|
|
242
249
|
this.$xdHideLoading();
|
|
243
250
|
});
|
|
244
251
|
},
|
|
@@ -284,13 +291,22 @@
|
|
|
284
291
|
box-shadow: 0px 0px 8rpx 0px rgba(179, 193, 196, 0.5);
|
|
285
292
|
z-index: 111;
|
|
286
293
|
|
|
287
|
-
|
|
294
|
+
& > view {
|
|
288
295
|
width: 100%;
|
|
289
296
|
display: flex;
|
|
290
297
|
justify-content: center;
|
|
291
298
|
align-items: center;
|
|
292
299
|
padding: unit(24, rpx);
|
|
293
300
|
box-sizing: border-box;
|
|
301
|
+
|
|
302
|
+
/* #ifdef MP-WEIXIN */
|
|
303
|
+
& > view {
|
|
304
|
+
flex: 1;
|
|
305
|
+
display: flex;
|
|
306
|
+
justify-content: center;
|
|
307
|
+
align-items: center;
|
|
308
|
+
}
|
|
309
|
+
/* #endif */
|
|
294
310
|
}
|
|
295
311
|
}
|
|
296
312
|
}
|
|
@@ -7,6 +7,28 @@ export default {
|
|
|
7
7
|
style: [],
|
|
8
8
|
content: (data) => {
|
|
9
9
|
return [
|
|
10
|
+
{
|
|
11
|
+
label: '选择综合入口类型:',
|
|
12
|
+
ele: 'xd-site-select-list',
|
|
13
|
+
valueKey: 'entryType',
|
|
14
|
+
value: data['entryType'],
|
|
15
|
+
placeholder: '请选择综合入口类型',
|
|
16
|
+
multiple: false,
|
|
17
|
+
groupKey:'content',
|
|
18
|
+
className: 'input50',
|
|
19
|
+
rules: [
|
|
20
|
+
{required: true, message: '请选择综合入口类型', trigger: ['blur', 'change']}
|
|
21
|
+
],
|
|
22
|
+
handleCustom({action, data}) {
|
|
23
|
+
XdBus.getParentApi('getEntryGroupOption')({key: Date.now()})
|
|
24
|
+
.then(res => {
|
|
25
|
+
data.cb(res.list)
|
|
26
|
+
})
|
|
27
|
+
.catch(error => {
|
|
28
|
+
console.error(error);
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
},
|
|
10
32
|
{
|
|
11
33
|
label: '每行显示数量',
|
|
12
34
|
ele: 'xd-radio',
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
50
50
|
import extsMixins from "@/mixins/extsMixins";
|
|
51
51
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
52
|
-
import {
|
|
52
|
+
import {mapState} from "vuex";
|
|
53
53
|
export default {
|
|
54
54
|
name: "JfbBaseEntry",
|
|
55
55
|
components: {
|
|
@@ -66,9 +66,11 @@
|
|
|
66
66
|
paddingInput: 20,
|
|
67
67
|
loadingList: true,
|
|
68
68
|
margin: {},
|
|
69
|
+
entryType: '',
|
|
69
70
|
}
|
|
70
71
|
},
|
|
71
72
|
computed: {
|
|
73
|
+
...mapState(['brandInfo']),
|
|
72
74
|
bodyStyle(){
|
|
73
75
|
return {
|
|
74
76
|
backgroundColor: this.bgcolor,
|
|
@@ -111,17 +113,67 @@
|
|
|
111
113
|
this.rowNum = getContainerPropsValue(container, 'content.rowNum', 1);
|
|
112
114
|
this.paddingInput = getContainerPropsValue(container, 'content.paddingInput', 20);
|
|
113
115
|
this.margin = getContainerPropsValue(container, 'content.margin', {});
|
|
116
|
+
this.entryType = getContainerPropsValue(container, 'content.entryType', 'default');
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
getCardPath(custom_redirect_data = {}){
|
|
120
|
+
//#ifdef H5
|
|
121
|
+
return null;
|
|
122
|
+
//#endif
|
|
123
|
+
//#ifdef MP-WEIXIN
|
|
124
|
+
const dir = custom_redirect_data.dir;
|
|
125
|
+
const actDir = this.projectAttr['deploy_dir'];
|
|
126
|
+
if(custom_redirect_data.appType === 'wxmp') {
|
|
127
|
+
if(dir === actDir) {
|
|
128
|
+
return {
|
|
129
|
+
cardPath: custom_redirect_data.path,
|
|
130
|
+
cardSelf: 'wxmp',
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
else return null;
|
|
134
|
+
}
|
|
135
|
+
else if(custom_redirect_data.appType === 'h5'){
|
|
136
|
+
return {
|
|
137
|
+
cardPath: custom_redirect_data.site_url,
|
|
138
|
+
cardSelf: 'h5',
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
else return null;
|
|
142
|
+
//#endif
|
|
114
143
|
},
|
|
115
144
|
getEntrySetting(){
|
|
116
145
|
this.$xdShowLoading({});
|
|
117
146
|
jfbRootExec("getEntrySetting", {
|
|
118
147
|
vm: this,
|
|
119
|
-
data: {
|
|
148
|
+
data: {
|
|
149
|
+
group_id:this.entryType || 'default'
|
|
150
|
+
}
|
|
120
151
|
}).then(res => {
|
|
121
152
|
this.loadingList = false;
|
|
122
153
|
this.$xdHideLoading();
|
|
123
|
-
|
|
124
|
-
|
|
154
|
+
let isH5FilterEntryList = [];
|
|
155
|
+
let isMpFilterEntryList = [];
|
|
156
|
+
this.entryList = res.list.filter(item=>{
|
|
157
|
+
//#ifdef H5
|
|
158
|
+
//在H5平台应用中不可跳转到微信小程序应用
|
|
159
|
+
if(item.redirect_data.appType === 'wxmp'){
|
|
160
|
+
isH5FilterEntryList.push(item)
|
|
161
|
+
}
|
|
162
|
+
return item.redirect_data.appType !== 'wxmp';
|
|
163
|
+
//#endif
|
|
164
|
+
|
|
165
|
+
//#ifdef MP-WEIXIN
|
|
166
|
+
const dir = item['redirect_data'].dir;
|
|
167
|
+
const actDir = this.projectAttr['deploy_dir'];
|
|
168
|
+
if(item.redirect_data.appType === 'wxmp') {
|
|
169
|
+
if(dir !== actDir) isMpFilterEntryList.push(item)
|
|
170
|
+
return dir === actDir;
|
|
171
|
+
}
|
|
172
|
+
return true
|
|
173
|
+
//#endif
|
|
174
|
+
}).map(item => {
|
|
175
|
+
const {dir, path, host,appType} = item['redirect_data'];
|
|
176
|
+
if(appType === undefined) item.redirect_data.appType = 'h5';
|
|
125
177
|
item['image_url'] = getServiceUrl(item.image_url);
|
|
126
178
|
item['image_url2'] = item.image_url2 ? getServiceUrl(item.image_url2) : "";
|
|
127
179
|
item['image_url3'] = item.image_url3 ? getServiceUrl(item.image_url3) : "";
|
|
@@ -139,24 +191,35 @@
|
|
|
139
191
|
let jumpUrl = path;
|
|
140
192
|
|
|
141
193
|
//域名相同并且应用路径不相同时候处理
|
|
142
|
-
if(host === this.projectAttr.host
|
|
143
|
-
&& this.projectAttr['deploy_dir'] !== dir
|
|
144
|
-
){
|
|
194
|
+
if(host === this.projectAttr.host && this.projectAttr['deploy_dir'] !== dir){
|
|
145
195
|
jumpUrl = `//${host}/${dir}${path}`;
|
|
146
196
|
//#ifdef MP-WEIXIN
|
|
147
197
|
jumpUrl = `https:${jumpUrl}`;
|
|
148
198
|
//#endif
|
|
149
199
|
}
|
|
150
200
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
item['
|
|
201
|
+
//获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
|
|
202
|
+
let cardPathStr = '';
|
|
203
|
+
//#ifdef MP-WEIXIN
|
|
204
|
+
if(item.redirect_data.appType === 'h5') {
|
|
205
|
+
const custom_redirect_data = this.$xdUniHelper.checkVarType(item['custom_redirect_data']) === 'object'?item['custom_redirect_data']:{};
|
|
206
|
+
const cardPathObject = this.getCardPath(custom_redirect_data);
|
|
207
|
+
if(cardPathObject !== null) {
|
|
208
|
+
const {cardPath, cardSelf} =cardPathObject
|
|
209
|
+
if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
|
|
210
|
+
}
|
|
156
211
|
}
|
|
212
|
+
//#endif
|
|
213
|
+
item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
|
|
157
214
|
return item;
|
|
158
215
|
});
|
|
159
|
-
|
|
216
|
+
//#ifdef MP-WEIXIN
|
|
217
|
+
console.warn(`微信小程序端被过滤的入口列表:${JSON.stringify(isMpFilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
|
|
218
|
+
//#endif
|
|
219
|
+
//#ifdef H5
|
|
220
|
+
console.warn(`H5端被过滤的入口列表:${JSON.stringify(isH5FilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
|
|
221
|
+
//#endif
|
|
222
|
+
console.warn(`福利入口链接列表:${JSON.stringify(this.entryList.map(item=> `${item.redirect_data.appType}:${item.redirect_data['path']}`),null,2)}`);
|
|
160
223
|
if(res.list.length === 1) this.toLink(this.entryList[0]);
|
|
161
224
|
if(res.list.length === 0) {
|
|
162
225
|
this.$xdAlert({content: '当前票券暂无支持服务'})
|