jufubao-base 1.0.164 → 1.0.165-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
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
|
|
66
66
|
<script>
|
|
67
67
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
68
|
-
import { jfbRootExec } from "@/utils/xd.event";
|
|
68
|
+
import { jfbRootExec, jfbRootFnExec } from "@/utils/xd.event";
|
|
69
69
|
import JfbBaseCardSweepInfoMixin from "./JfbBaseCardSweepInfoMixin";
|
|
70
70
|
import XdButton from "@/components/XdButton/XdButton";
|
|
71
71
|
import XdUnit from "@/components/XdUnit/XdUnit";
|
|
@@ -111,6 +111,7 @@ export default {
|
|
|
111
111
|
|
|
112
112
|
inCallbackUrlOrg:'',//是否带有回调地址
|
|
113
113
|
is_show_balance: "N", //是否显示余额
|
|
114
|
+
hasCon: "", //是否有优惠券
|
|
114
115
|
};
|
|
115
116
|
},
|
|
116
117
|
watch: {
|
|
@@ -143,6 +144,11 @@ export default {
|
|
|
143
144
|
|
|
144
145
|
},
|
|
145
146
|
methods: {
|
|
147
|
+
toShowCouponDialog(){
|
|
148
|
+
if(this.info){
|
|
149
|
+
jfbRootFnExec(this, 'onCustomEvent')("@showBaseConDialog", {user_card_number: this.info.card_number})
|
|
150
|
+
}
|
|
151
|
+
},
|
|
146
152
|
handleToLink(path) {
|
|
147
153
|
if (this.pa) {
|
|
148
154
|
jfbRootExec("qrCardBind", {
|
|
@@ -152,30 +158,56 @@ export default {
|
|
|
152
158
|
},
|
|
153
159
|
})
|
|
154
160
|
.then((res) => {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
//有优惠券处理
|
|
162
|
+
if(this.hasCon){
|
|
163
|
+
this.toShowCouponDialog();
|
|
164
|
+
this.$bus.$on("onCloseConDialog",(container_id) => {
|
|
165
|
+
if(container_id === this.hasCon){
|
|
166
|
+
//#ifdef H5
|
|
167
|
+
let base = this.jfbAuthorize.getBasePath(this);
|
|
168
|
+
let url = `${location.origin}${base}${this.backUrl}`;
|
|
169
|
+
url = this.getUrlCallback(url)
|
|
170
|
+
this.$xdLog.setARMSInfo({url}, 'static_qr_card_bind');
|
|
163
171
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
172
|
+
setTimeout(()=>{
|
|
173
|
+
window.location.href = url;
|
|
174
|
+
},50);
|
|
175
|
+
// #endif
|
|
168
176
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
//#ifndef H5
|
|
178
|
+
let wPath = this.getUrlCallback(this.backUrl)
|
|
179
|
+
this.$xdUniHelper.redirectTo({
|
|
180
|
+
url:wPath,
|
|
181
|
+
});
|
|
182
|
+
// #endif
|
|
183
|
+
}
|
|
184
|
+
})
|
|
185
|
+
} else {
|
|
186
|
+
this.$xdAlert({
|
|
187
|
+
content: "绑定成功",
|
|
188
|
+
close: () => {
|
|
189
|
+
//#ifdef H5
|
|
190
|
+
let base = this.jfbAuthorize.getBasePath(this);
|
|
191
|
+
let url = `${location.origin}${base}${this.backUrl}`;
|
|
192
|
+
url = this.getUrlCallback(url)
|
|
193
|
+
this.$xdLog.setARMSInfo({url}, 'static_qr_card_bind');
|
|
175
194
|
|
|
195
|
+
setTimeout(()=>{
|
|
196
|
+
window.location.href = url;
|
|
197
|
+
},50);
|
|
198
|
+
// #endif
|
|
176
199
|
|
|
177
|
-
|
|
178
|
-
|
|
200
|
+
//#ifndef H5
|
|
201
|
+
let wPath = this.getUrlCallback(this.backUrl)
|
|
202
|
+
this.$xdUniHelper.redirectTo({
|
|
203
|
+
url:wPath,
|
|
204
|
+
});
|
|
205
|
+
// #endif
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
}
|
|
179
211
|
})
|
|
180
212
|
.catch();
|
|
181
213
|
}
|
|
@@ -233,6 +265,12 @@ export default {
|
|
|
233
265
|
onJfbShow(options) {
|
|
234
266
|
this.onJfbLoad(options);
|
|
235
267
|
},
|
|
268
|
+
onJfbCustomEvent({action, data}){
|
|
269
|
+
if(action === 'baseConDialog@hasCon'){
|
|
270
|
+
this.hasCon = data;
|
|
271
|
+
}
|
|
272
|
+
console.log('onJfbCustomEvent',action, data);
|
|
273
|
+
}
|
|
236
274
|
},
|
|
237
275
|
};
|
|
238
276
|
</script>
|
|
@@ -69,11 +69,35 @@
|
|
|
69
69
|
:color="item.iconColor"
|
|
70
70
|
:icon="item.icon"
|
|
71
71
|
></xd-font-icon>
|
|
72
|
-
<view class="btn">
|
|
72
|
+
<view v-if="item.can_take_num==='Y'" class="btn">
|
|
73
73
|
<xd-button
|
|
74
74
|
size="small"
|
|
75
75
|
type="primary"
|
|
76
|
-
:
|
|
76
|
+
:style="{
|
|
77
|
+
backgroundImage: item.btnImage,
|
|
78
|
+
backgroundSize: '100% 100%',
|
|
79
|
+
}"
|
|
80
|
+
@click="getCoupont(item)"
|
|
81
|
+
>{{ item.btn_txt }}</xd-button
|
|
82
|
+
>
|
|
83
|
+
</view>
|
|
84
|
+
<view class="btn" v-else>
|
|
85
|
+
<xd-button
|
|
86
|
+
v-if="item.remain_card_count == 0"
|
|
87
|
+
size="small"
|
|
88
|
+
type="primary"
|
|
89
|
+
:disabled="true"
|
|
90
|
+
:style="{
|
|
91
|
+
backgroundImage: item.btnImage,
|
|
92
|
+
backgroundSize: '100% 100%',
|
|
93
|
+
}"
|
|
94
|
+
@click="getCoupont(item)"
|
|
95
|
+
>{{ item.btn_txt }}</xd-button
|
|
96
|
+
>
|
|
97
|
+
<xd-button
|
|
98
|
+
v-else
|
|
99
|
+
size="small"
|
|
100
|
+
type="primary"
|
|
77
101
|
:style="{
|
|
78
102
|
backgroundImage: item.btnImage,
|
|
79
103
|
backgroundSize: '100% 100%',
|