jufubao-base 1.0.209-beta1 → 1.0.209-beta100
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/JfbBaseCardInfo/JfbBaseCardInfo.vue +5 -5
- package/src/components/JfbBaseConList/JfbBaseConList.vue +1 -5
- package/src/components/JfbBaseNotice/Attr.js +1 -0
- package/src/components/JfbBaseRecharge/Api.js +0 -21
- package/src/components/JfbBaseRecharge/Attr.js +1 -0
- package/src/components/JfbBaseRecharge/JfbBaseRecharge.vue +67 -169
- package/src/components/JfbBaseSweep/JfbBaseSweep.vue +37 -21
- package/src/components/JfbBaseRechargeNew/Api.js +0 -74
- package/src/components/JfbBaseRechargeNew/Attr.js +0 -301
- package/src/components/JfbBaseRechargeNew/JfbBaseRechargeNew.vue +0 -468
- package/src/components/JfbBaseRechargeNew/JfbBaseRechargeNewLess.less +0 -79
- package/src/components/JfbBaseRechargeNew/JfbBaseRechargeNewMixin.js +0 -30
- package/src/components/JfbBaseRechargeNew/Mock.js +0 -5
package/package.json
CHANGED
|
@@ -198,11 +198,11 @@ export default {
|
|
|
198
198
|
},
|
|
199
199
|
methods: {
|
|
200
200
|
handleLabel(el){
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
this.card_password_focus = false;
|
|
202
|
+
this.card_number_focus = false;
|
|
203
|
+
setTimeout(()=>{
|
|
204
|
+
this[`${el}_focus`] = true;
|
|
205
|
+
},50)
|
|
206
206
|
},
|
|
207
207
|
handleIcon(){
|
|
208
208
|
this.isPassword = !this.isPassword
|
|
@@ -280,8 +280,7 @@ export default {
|
|
|
280
280
|
btn_txt: "",
|
|
281
281
|
btn_style: {},
|
|
282
282
|
btnTextSize: '',
|
|
283
|
-
is_blank_page: 'Y'
|
|
284
|
-
foreign_id: null
|
|
283
|
+
is_blank_page: 'Y'
|
|
285
284
|
};
|
|
286
285
|
},
|
|
287
286
|
computed: {
|
|
@@ -534,7 +533,6 @@ export default {
|
|
|
534
533
|
namespace: this.pageBusinessCode,
|
|
535
534
|
activity_id: this.activity_id,
|
|
536
535
|
prize_id: item.prize_id,
|
|
537
|
-
foreign_id: this.foreign_id
|
|
538
536
|
},
|
|
539
537
|
})
|
|
540
538
|
.then((res) => {
|
|
@@ -568,7 +566,6 @@ export default {
|
|
|
568
566
|
distribution_method: this.method,
|
|
569
567
|
namespace: this.pageBusinessCode,
|
|
570
568
|
activity_id: this.activity_id,
|
|
571
|
-
foreign_id: this.foreign_id
|
|
572
569
|
},
|
|
573
570
|
})
|
|
574
571
|
.then((res) => {
|
|
@@ -663,7 +660,6 @@ export default {
|
|
|
663
660
|
console.log(this.pageBusinessCode, "pageNamespace");
|
|
664
661
|
this.options = options;
|
|
665
662
|
this.activity_id = options.activity_id;
|
|
666
|
-
this.foreign_id = options.foreign_id;
|
|
667
663
|
this.method = options.distribution_method
|
|
668
664
|
? options.distribution_method
|
|
669
665
|
: "entry";
|
|
@@ -50,25 +50,4 @@ module.exports = [
|
|
|
50
50
|
isConsole: true,
|
|
51
51
|
disabled: true,
|
|
52
52
|
},
|
|
53
|
-
{
|
|
54
|
-
mapFnName: "cardRechargeNew",
|
|
55
|
-
title: "获取卡券套餐列表",
|
|
56
|
-
path: "/card/v1/new-card-recharge/create-order",
|
|
57
|
-
isRule: false,
|
|
58
|
-
data: {
|
|
59
|
-
package_id: ['套餐ID', "String", "必填"]
|
|
60
|
-
},
|
|
61
|
-
isConsole: true,
|
|
62
|
-
disabled: true
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
mapFnName: "cardRechargeList",
|
|
66
|
-
title: "卡券充值下单",
|
|
67
|
-
path: "/card/v1/new-card-recharge/list",
|
|
68
|
-
isRule: false,
|
|
69
|
-
params: {},
|
|
70
|
-
isConsole: true,
|
|
71
|
-
disabled: true
|
|
72
|
-
},
|
|
73
|
-
|
|
74
53
|
];
|
|
@@ -14,47 +14,43 @@
|
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
16
|
<view class="jfb-base-recharge__body">
|
|
17
|
-
<view class="
|
|
18
|
-
<view
|
|
19
|
-
<view class="
|
|
20
|
-
<
|
|
21
|
-
<view>
|
|
22
|
-
<view class="jfb-base-recharge__body-form">
|
|
23
|
-
<input v-model="cardNumber" :placeholder="card_num_placeholder" />
|
|
24
|
-
</view>
|
|
25
|
-
<view class="jfb-base-recharge__body-form">
|
|
26
|
-
<input v-model="card_point" :placeholder="point_placeholder" />
|
|
27
|
-
</view>
|
|
28
|
-
<view
|
|
29
|
-
v-if="amount && card_point"
|
|
30
|
-
:style="{
|
|
31
|
-
color: mainColor,
|
|
32
|
-
fontSize: '24rpx',
|
|
33
|
-
paddingBottom: '32rpx',
|
|
34
|
-
}"
|
|
35
|
-
>支付金额:{{ amount }} 元</view>
|
|
36
|
-
<xd-button
|
|
37
|
-
size="medium"
|
|
38
|
-
type="primary"
|
|
39
|
-
:bgColor="mainColor"
|
|
40
|
-
@click="handleToRecharge"
|
|
41
|
-
:disabled="!amount || !card_point || !cardNumber"
|
|
42
|
-
>提交</xd-button>
|
|
43
|
-
</view>
|
|
44
|
-
</view>
|
|
17
|
+
<view class="jfb-base-recharge__body-card">
|
|
18
|
+
<view>
|
|
19
|
+
<view class="jfb-base-recharge__body-form">
|
|
20
|
+
<input v-model="cardNumber" :placeholder="card_num_placeholder" />
|
|
45
21
|
</view>
|
|
22
|
+
<view class="jfb-base-recharge__body-form">
|
|
23
|
+
<input v-model="card_point" :placeholder="point_placeholder" />
|
|
24
|
+
</view>
|
|
25
|
+
<view
|
|
26
|
+
v-if="amount&&card_point"
|
|
27
|
+
:style="{
|
|
28
|
+
color: mainColor,
|
|
29
|
+
fontSize: '24rpx',
|
|
30
|
+
paddingBottom: '32rpx',
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
支付金额:{{ amount }} 元
|
|
34
|
+
</view>
|
|
35
|
+
<xd-button
|
|
36
|
+
size="medium"
|
|
37
|
+
type="primary"
|
|
38
|
+
:bgColor="mainColor"
|
|
39
|
+
@click="handleToRecharge"
|
|
40
|
+
:disabled="!amount || !card_point || !cardNumber"
|
|
41
|
+
>提交</xd-button>
|
|
46
42
|
</view>
|
|
47
|
-
<view class="xd-notice-content" v-if="content">
|
|
48
|
-
<view>注意事项:</view>
|
|
49
|
-
<view v-html="content" class="prod_info"></view>
|
|
50
|
-
</view>
|
|
51
|
-
<view
|
|
52
|
-
v-if="isPreview && statusContent === true && content === '' "
|
|
53
|
-
class="xd-notice"
|
|
54
|
-
:style="{ color: dangerColor,fontSize: 24 + 'rpx',backgroundColor:noticeBgc }"
|
|
55
|
-
>注意事项未配置数据,因此改模块在正式环境将不显示</view>
|
|
56
|
-
<view class="bottom_btn-mask"></view>
|
|
57
43
|
</view>
|
|
44
|
+
<view class="xd-notice-content" v-if="content">
|
|
45
|
+
<view>注意事项:</view>
|
|
46
|
+
<view v-html="content" class="prod_info"></view>
|
|
47
|
+
</view>
|
|
48
|
+
<view
|
|
49
|
+
v-if="isPreview && statusContent === true && content === '' "
|
|
50
|
+
class="xd-notice"
|
|
51
|
+
:style="{ color: dangerColor,fontSize: 24 + 'rpx',backgroundColor:noticeBgc }"
|
|
52
|
+
>注意事项未配置数据,因此改模块在正式环境将不显示</view>
|
|
53
|
+
<view class="bottom_btn-mask"></view>
|
|
58
54
|
</view>
|
|
59
55
|
</view>
|
|
60
56
|
</template>
|
|
@@ -62,27 +58,24 @@
|
|
|
62
58
|
<script>
|
|
63
59
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
64
60
|
import XdButton from "@/components/XdButton/XdButton";
|
|
65
|
-
import XdUnit from "@/components/XdUnit/XdUnit.vue";
|
|
66
61
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
67
62
|
import JfbBaseRechargeMixin from "./JfbBaseRechargeMixin";
|
|
68
63
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
69
64
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
70
65
|
import extsMixins from "@/mixins/extsMixins";
|
|
71
66
|
import Color from "color";
|
|
72
|
-
import getServiceUrl from "@/common/getServiceUrl";
|
|
73
67
|
export default {
|
|
74
68
|
name: "JfbBaseRecharge",
|
|
75
69
|
components: {
|
|
76
70
|
XdFontIcon,
|
|
77
71
|
XdButton,
|
|
78
|
-
XdUnit
|
|
79
72
|
},
|
|
80
73
|
mixins: [componentsMixins, extsMixins, JfbBaseRechargeMixin],
|
|
81
74
|
data() {
|
|
82
75
|
return {
|
|
83
|
-
closeMask: true,
|
|
84
76
|
card_num_placeholder: "",
|
|
85
77
|
point_placeholder: "",
|
|
78
|
+
|
|
86
79
|
cardNumber: "",
|
|
87
80
|
card_point: "",
|
|
88
81
|
payPath: "",
|
|
@@ -124,12 +117,20 @@ export default {
|
|
|
124
117
|
* @param container {object} 业务组件对象自己
|
|
125
118
|
*/
|
|
126
119
|
init(container) {
|
|
127
|
-
this.card_num_placeholder = getContainerPropsValue(
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
this.card_num_placeholder = getContainerPropsValue(
|
|
121
|
+
this.container,
|
|
122
|
+
"content.card_num_placeholder",
|
|
123
|
+
"输入券号"
|
|
124
|
+
);
|
|
125
|
+
this.point_placeholder = getContainerPropsValue(
|
|
126
|
+
this.container,
|
|
127
|
+
"content.point_placeholder",
|
|
128
|
+
"充值点数"
|
|
129
|
+
);
|
|
130
|
+
this.payPath = getContainerPropsValue(container, "content.payPath", {
|
|
131
|
+
value: "",
|
|
132
|
+
}).value;
|
|
130
133
|
},
|
|
131
|
-
|
|
132
|
-
|
|
133
134
|
getContent() {
|
|
134
135
|
jfbRootExec("getListRechargeNewsContent", {
|
|
135
136
|
vm: this,
|
|
@@ -148,13 +149,6 @@ export default {
|
|
|
148
149
|
console.error(error);
|
|
149
150
|
});
|
|
150
151
|
},
|
|
151
|
-
|
|
152
|
-
toLink(pay_order_id, order_id){
|
|
153
|
-
this.$xdUniHelper.redirectTo({
|
|
154
|
-
url: `${this.payPath}?order_id=${pay_order_id}&main_order_id=${order_id}&type=recharge`,
|
|
155
|
-
}, false, true);
|
|
156
|
-
},
|
|
157
|
-
|
|
158
152
|
handleToRecharge() {
|
|
159
153
|
if (!this.cardNumber) {
|
|
160
154
|
this.$xdAlert({ content: "请输入卡券号" });
|
|
@@ -164,12 +158,7 @@ export default {
|
|
|
164
158
|
this.$xdAlert({ content: "请输入充值点数" });
|
|
165
159
|
return;
|
|
166
160
|
}
|
|
167
|
-
|
|
168
|
-
if( this.$configProject.isPreview) {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
this.$xdShowLoading({});
|
|
161
|
+
// this.$xdShowLoading({})
|
|
173
162
|
jfbRootExec("cardRecharge", {
|
|
174
163
|
vm: this,
|
|
175
164
|
data: {
|
|
@@ -179,47 +168,41 @@ export default {
|
|
|
179
168
|
})
|
|
180
169
|
.then((res) => {
|
|
181
170
|
this.$xdHideLoading();
|
|
182
|
-
this.
|
|
171
|
+
this.$xdUniHelper.navigateTo({
|
|
172
|
+
url: `${this.payPath}?order_id=${res.pay_order_id}&main_order_id=${res.order_id}&type=recharge`,
|
|
173
|
+
});
|
|
183
174
|
})
|
|
184
175
|
.catch((err) => {
|
|
185
176
|
this.$xdHideLoading();
|
|
186
177
|
console.log(err, "err");
|
|
187
178
|
});
|
|
188
179
|
},
|
|
189
|
-
|
|
190
180
|
handleGetPrice(e) {
|
|
191
|
-
//未填写值
|
|
192
181
|
if (!this.cardNumber || !this.card_point) {
|
|
193
182
|
return;
|
|
194
183
|
}
|
|
195
|
-
|
|
196
|
-
//预览模式
|
|
197
|
-
if( this.$configProject.isPreview) {
|
|
198
|
-
this.amount = this.card_point;
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
|
|
184
|
+
this.$xdShowLoading({});
|
|
202
185
|
jfbRootExec("getRechargeAmount", {
|
|
203
186
|
vm: this,
|
|
204
187
|
data: {
|
|
205
188
|
card_number: this.cardNumber, //页面ID
|
|
206
|
-
card_point: this
|
|
189
|
+
card_point: this.card_point * 100, //组件ID
|
|
207
190
|
},
|
|
208
191
|
})
|
|
209
192
|
.then((res) => {
|
|
210
|
-
this
|
|
193
|
+
this.$xdHideLoading();
|
|
194
|
+
this.amount = res.amount / 100;
|
|
211
195
|
})
|
|
212
196
|
.catch((err) => {
|
|
197
|
+
this.$xdHideLoading();
|
|
213
198
|
});
|
|
214
199
|
},
|
|
215
|
-
|
|
216
200
|
onJfbUpdate(data) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
201
|
+
this.getContent();
|
|
202
|
+
},
|
|
203
|
+
onJfbScroll(options) {
|
|
204
|
+
console.log("event.onJfbScroll", options);
|
|
221
205
|
},
|
|
222
|
-
|
|
223
206
|
onJfbShow(options) {
|
|
224
207
|
this.onJfbLoad(options);
|
|
225
208
|
},
|
|
@@ -236,16 +219,17 @@ export default {
|
|
|
236
219
|
.jfb-base-recharge {
|
|
237
220
|
&__body {
|
|
238
221
|
&-card {
|
|
239
|
-
box-shadow:
|
|
222
|
+
box-shadow: 0px unit(16, rpx) unit(60, rpx) 0px rgba(227, 227, 227, 0.37);
|
|
223
|
+
background: #ffffff;
|
|
224
|
+
padding: unit(48, rpx);
|
|
225
|
+
margin: unit(40, rpx);
|
|
240
226
|
border-radius: unit(20, rpx);
|
|
241
|
-
background: #fff;
|
|
242
|
-
padding: 30rpx;
|
|
243
227
|
}
|
|
244
228
|
&-form {
|
|
245
229
|
input {
|
|
246
230
|
background: #eeeeee;
|
|
247
231
|
border-radius: unit(16, rpx);
|
|
248
|
-
padding: unit(30, rpx);
|
|
232
|
+
padding: unit(30, rpx) unit(40, rpx);
|
|
249
233
|
margin-bottom: unit(30, rpx);
|
|
250
234
|
}
|
|
251
235
|
}
|
|
@@ -274,96 +258,10 @@ export default {
|
|
|
274
258
|
}
|
|
275
259
|
}
|
|
276
260
|
.xd-notice {
|
|
277
|
-
margin-top: unit(
|
|
261
|
+
margin-top: unit(20, rpx);
|
|
278
262
|
padding: unit(40, rpx);
|
|
279
263
|
border-radius: unit(15, rpx)
|
|
280
264
|
}
|
|
281
265
|
}
|
|
282
266
|
}
|
|
283
|
-
|
|
284
|
-
.recharge {
|
|
285
|
-
padding: 30rpx;
|
|
286
|
-
|
|
287
|
-
&-tab {
|
|
288
|
-
height: 100rpx;
|
|
289
|
-
margin-bottom: 15rpx;
|
|
290
|
-
display:flex;
|
|
291
|
-
justify-content: flex-start;
|
|
292
|
-
align-items: center;
|
|
293
|
-
& > view {
|
|
294
|
-
margin: 0 50rpx 0 0;
|
|
295
|
-
font-size: 32rpx;
|
|
296
|
-
position: relative;
|
|
297
|
-
height: 100%;
|
|
298
|
-
line-height: 100rpx;
|
|
299
|
-
cursor: pointer;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
&-index {
|
|
303
|
-
height: 6rpx;
|
|
304
|
-
overflow: hidden;
|
|
305
|
-
border-radius: 4rpx;
|
|
306
|
-
position: absolute;
|
|
307
|
-
left: 0;
|
|
308
|
-
right: 0;
|
|
309
|
-
bottom: 16rpx;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.recharge-pack {
|
|
314
|
-
height: 330rpx;
|
|
315
|
-
background-position: top left;
|
|
316
|
-
background-size: 100% 100%;
|
|
317
|
-
background-repeat: no-repeat;
|
|
318
|
-
color: #fff;
|
|
319
|
-
padding: 30rpx;
|
|
320
|
-
box-sizing: border-box;
|
|
321
|
-
border-radius: 16rpx;
|
|
322
|
-
margin-bottom: 30rpx;
|
|
323
|
-
&:last-child {
|
|
324
|
-
margin-bottom: 0;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
& .name {
|
|
328
|
-
font-size: 32rpx;
|
|
329
|
-
font-weight: 500;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
& .price {
|
|
333
|
-
font-size: 28rpx;
|
|
334
|
-
font-weight: 400;
|
|
335
|
-
padding: 20rpx 0 10rpx;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
& .time {
|
|
339
|
-
font-size: 28rpx;
|
|
340
|
-
font-weight: 400;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
& .line {
|
|
344
|
-
margin: 20rpx 0;
|
|
345
|
-
height: 2rpx;
|
|
346
|
-
background: rgba(255,255,255,.2);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
& .buy {
|
|
350
|
-
display: flex;
|
|
351
|
-
justify-content: space-between;
|
|
352
|
-
align-items: center;
|
|
353
|
-
|
|
354
|
-
& > view:nth-child(2) {
|
|
355
|
-
height: 60rpx;
|
|
356
|
-
min-width: 120rpx;
|
|
357
|
-
text-align: center;
|
|
358
|
-
border-radius: 40rpx;
|
|
359
|
-
line-height: 60rpx;
|
|
360
|
-
border: 4rpx solid #fff;
|
|
361
|
-
padding: 0 25rpx;
|
|
362
|
-
font-size: 28rpx;
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
267
|
</style>
|
|
@@ -17,12 +17,6 @@
|
|
|
17
17
|
:style="{ height: layoutInfo.bodyMinHeightRpx + 'rpx' }"
|
|
18
18
|
class="jfb-base-sweep__body"
|
|
19
19
|
>
|
|
20
|
-
<view
|
|
21
|
-
:style="{ background: backgroundColor, color: warningColor }"
|
|
22
|
-
class="jfb-base-sweep__body-pop"
|
|
23
|
-
v-if="isPreview"
|
|
24
|
-
>设置背景模式方便编辑(占位),在线上此模块不显</view
|
|
25
|
-
>
|
|
26
20
|
<view class="jfb-base-sweep__body-other" v-if="other">
|
|
27
21
|
<view>
|
|
28
22
|
<xd-font-icon
|
|
@@ -33,19 +27,15 @@
|
|
|
33
27
|
<view class="jfb-base-sweep__body-other-text">无法识别该界面</view>
|
|
34
28
|
</view>
|
|
35
29
|
<view class="jfb-base-sweep__body-footer" :style="prod_bottom">
|
|
36
|
-
<
|
|
37
|
-
>重试</XdButton
|
|
38
|
-
>
|
|
30
|
+
<xd-button @click="scan" type="primary" radius="50rpx" width="50%">重试</xd-button>
|
|
39
31
|
</view>
|
|
40
32
|
</view>
|
|
41
|
-
|
|
33
|
+
<view class="jfb-base-sweep__body-other" v-if="show || isPreview">
|
|
42
34
|
<view>
|
|
43
35
|
<image style="width: 500rpx;height:500rpx" src="https://img0.jufubao.cn/common/qrcode-dome.png?ver=1"></image>
|
|
44
36
|
</view>
|
|
45
37
|
<view class="jfb-base-sweep__body-footer" :style="prod_bottom">
|
|
46
|
-
<
|
|
47
|
-
>扫一扫</XdButton
|
|
48
|
-
>
|
|
38
|
+
<xd-button @click="scan" type="primary" radius="50rpx" width="50%">扫一扫</xd-button>
|
|
49
39
|
</view>
|
|
50
40
|
</view>
|
|
51
41
|
</view>
|
|
@@ -77,7 +67,8 @@ export default {
|
|
|
77
67
|
backgroundColor: "",
|
|
78
68
|
other: false,
|
|
79
69
|
show: false,
|
|
80
|
-
flag: true
|
|
70
|
+
flag: true,
|
|
71
|
+
isBack: false, //是否启动返回逻辑
|
|
81
72
|
};
|
|
82
73
|
},
|
|
83
74
|
computed: {
|
|
@@ -118,6 +109,7 @@ export default {
|
|
|
118
109
|
},
|
|
119
110
|
methods: {
|
|
120
111
|
onJfbLoad(options) {
|
|
112
|
+
this.isBack = options.isBack?options.isBack:false;
|
|
121
113
|
if (!this.isPreview) {
|
|
122
114
|
this.$xdShowLoading({
|
|
123
115
|
isMask: true
|
|
@@ -133,6 +125,7 @@ export default {
|
|
|
133
125
|
const matches = hostname.match(/[^.]+\.[^.]+$/);
|
|
134
126
|
return matches ? matches[0] : hostname;
|
|
135
127
|
},
|
|
128
|
+
//#ifdef H5
|
|
136
129
|
handleH5() {
|
|
137
130
|
// 判断jwxSDK是否为空
|
|
138
131
|
if (this.jwxSDK !== null) {
|
|
@@ -200,7 +193,7 @@ export default {
|
|
|
200
193
|
},
|
|
201
194
|
// 扫描失败后的回调函数
|
|
202
195
|
fail: (error) => {
|
|
203
|
-
console.log(44444,'fail');
|
|
196
|
+
console.log(44444,'fail',error);
|
|
204
197
|
this.other = false;
|
|
205
198
|
this.show = true;
|
|
206
199
|
// 如果error是字符串类型,则将其转换为对象类型
|
|
@@ -211,14 +204,22 @@ export default {
|
|
|
211
204
|
// 调用$xdLog的setARMSError方法,记录错误信息
|
|
212
205
|
this.$xdLog.setARMSError(error);
|
|
213
206
|
},
|
|
214
|
-
cancel: ()=>{
|
|
215
|
-
console.log(44444,'fail');
|
|
207
|
+
cancel: (e)=>{
|
|
208
|
+
console.log(44444,'fail',e.errMsg);
|
|
216
209
|
this.other = false;
|
|
217
210
|
this.show = true;
|
|
211
|
+
|
|
212
|
+
//取消扫描并且需要返回页面时候调用
|
|
213
|
+
if(this.isBack && e.errMsg.indexOf(':cancel') !== -1) {
|
|
214
|
+
this.onJfbBack();
|
|
215
|
+
}
|
|
216
|
+
|
|
218
217
|
}
|
|
219
218
|
});
|
|
220
219
|
}
|
|
221
220
|
},
|
|
221
|
+
//#endif
|
|
222
|
+
//#ifdef MP-WEIXIN
|
|
222
223
|
handleMP() {
|
|
223
224
|
// 调用uni.scanCode方法,扫描二维码
|
|
224
225
|
uni.scanCode({
|
|
@@ -244,6 +245,7 @@ export default {
|
|
|
244
245
|
});
|
|
245
246
|
return;
|
|
246
247
|
}
|
|
248
|
+
//带pa参数出来
|
|
247
249
|
if (queryobjArr["pa"]) {
|
|
248
250
|
// 如果queryobjArr中有pa属性,则获取pa属性的值,并将其拼接到bind_url后面,然后使用navigateTo方法跳转到该路径
|
|
249
251
|
let qrcode = encodeURIComponent(res.result)
|
|
@@ -277,14 +279,24 @@ export default {
|
|
|
277
279
|
this.flag = false;
|
|
278
280
|
},
|
|
279
281
|
fail: (error) => {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
//取消扫描并且需要返回页面时候调用
|
|
283
|
+
if(error.errMsg === 'scanCode:fail cancel') {
|
|
284
|
+
if(this.isBack) {
|
|
285
|
+
this.onJfbBack();
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
this.$xdLog.setARMSError(error);
|
|
290
|
+
this.other = false;
|
|
291
|
+
this.show = true;
|
|
292
|
+
}
|
|
293
|
+
|
|
284
294
|
}
|
|
285
295
|
});
|
|
286
296
|
},
|
|
297
|
+
//#endif
|
|
287
298
|
scan() {
|
|
299
|
+
if(this.$configProject.isPreview) return;
|
|
288
300
|
try {
|
|
289
301
|
//#ifdef H5
|
|
290
302
|
this.handleH5();
|
|
@@ -317,6 +329,10 @@ export default {
|
|
|
317
329
|
}
|
|
318
330
|
console.log("event.onJfbShow", options);
|
|
319
331
|
},
|
|
332
|
+
onJfbBack(){
|
|
333
|
+
if(this.$configProject["isPreview"]) return;
|
|
334
|
+
this.$xdUniHelper.navigateBack();
|
|
335
|
+
}
|
|
320
336
|
},
|
|
321
337
|
};
|
|
322
338
|
</script>
|
|
@@ -1,74 +0,0 @@
|
|
|
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: "cardRecharge",
|
|
16
|
-
title: "卡券充值下单",
|
|
17
|
-
path: "/card/v1/card-recharge/create-order",
|
|
18
|
-
isRule: false,
|
|
19
|
-
data: {
|
|
20
|
-
card_number: ['卡券号', "String", "必填"],
|
|
21
|
-
card_point: ['充值点数 单位是分', "String", '必选']
|
|
22
|
-
},
|
|
23
|
-
isConsole: true,
|
|
24
|
-
disabled: true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
mapFnName: "getRechargeAmount",
|
|
28
|
-
title: "获得充值点数需要支付的钱",
|
|
29
|
-
path: "/card/v1/card-recharge/get-amount",
|
|
30
|
-
isRule: false,
|
|
31
|
-
params: {
|
|
32
|
-
card_number: ['卡券号', "String", "必填"],
|
|
33
|
-
card_point: ['充值点数 单位是分', "String", '必选']
|
|
34
|
-
},
|
|
35
|
-
isConsole: true,
|
|
36
|
-
disabled: true
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
mapFnName: 'getListRechargeNewsContent', //自定义方法名字(必选)
|
|
40
|
-
title: '获取内容',
|
|
41
|
-
path: '/cms/v1/news-content',
|
|
42
|
-
isRule: false,
|
|
43
|
-
params: {
|
|
44
|
-
scene: ['使用场景', 'String', '选填'],
|
|
45
|
-
container_id: ['插件ID', 'String', '必填'],
|
|
46
|
-
page_id: ['页面ID', 'String', '必填'],
|
|
47
|
-
page_size: ['记录条数', 'Number', '必填', 1],
|
|
48
|
-
code: ['业务线id', 'String', '选填'],
|
|
49
|
-
},
|
|
50
|
-
isConsole: true,
|
|
51
|
-
disabled: true,
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
mapFnName: "cardRechargeNew",
|
|
55
|
-
title: "获取卡券套餐列表",
|
|
56
|
-
path: "/card/v1/new-card-recharge/create-order",
|
|
57
|
-
isRule: false,
|
|
58
|
-
data: {
|
|
59
|
-
package_id: ['套餐ID', "String", "必填"]
|
|
60
|
-
},
|
|
61
|
-
isConsole: true,
|
|
62
|
-
disabled: true
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
mapFnName: "cardRechargeList",
|
|
66
|
-
title: "卡券充值下单",
|
|
67
|
-
path: "/card/v1/new-card-recharge/list",
|
|
68
|
-
isRule: false,
|
|
69
|
-
params: {},
|
|
70
|
-
isConsole: true,
|
|
71
|
-
disabled: true
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
];
|