jufubao-base 1.0.209-beta3 → 1.0.209-beta6
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
|
@@ -104,7 +104,8 @@ export default {
|
|
|
104
104
|
/**
|
|
105
105
|
* @description 获取套餐列表
|
|
106
106
|
*/
|
|
107
|
-
getNewCardList(){
|
|
107
|
+
getNewCardList(reload = false){
|
|
108
|
+
if(reload) this.$xdShowLoading({});
|
|
108
109
|
jfbRootExec("cardRechargeList", {
|
|
109
110
|
vm: this,
|
|
110
111
|
data: {},
|
|
@@ -118,9 +119,10 @@ export default {
|
|
|
118
119
|
}
|
|
119
120
|
return item;
|
|
120
121
|
});
|
|
122
|
+
if(reload) this.$xdHideLoading();
|
|
121
123
|
})
|
|
122
124
|
.catch((error) => {
|
|
123
|
-
|
|
125
|
+
if(reload) this.$xdHideLoading();
|
|
124
126
|
});
|
|
125
127
|
},
|
|
126
128
|
|
|
@@ -134,6 +136,21 @@ export default {
|
|
|
134
136
|
})
|
|
135
137
|
.then((res) => {
|
|
136
138
|
this.$xdHideLoading();
|
|
139
|
+
|
|
140
|
+
//数据不存在做刷新列表
|
|
141
|
+
if(res.code === 'NotFound') {
|
|
142
|
+
this.$xdConfirm({
|
|
143
|
+
title:'温馨提示',
|
|
144
|
+
content: res.message || '记录不存在',
|
|
145
|
+
cancel: false,
|
|
146
|
+
confirmText: '我知道了',
|
|
147
|
+
success:(res)=>{
|
|
148
|
+
this.getNewCardList(true);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
return
|
|
152
|
+
}
|
|
153
|
+
|
|
137
154
|
this.toLink(res.pay_order_id, res.order_id)
|
|
138
155
|
})
|
|
139
156
|
.catch((err) => {
|
|
@@ -144,25 +161,6 @@ export default {
|
|
|
144
161
|
},
|
|
145
162
|
//==套餐购买=============
|
|
146
163
|
|
|
147
|
-
getContent() {
|
|
148
|
-
jfbRootExec("getListRechargeNewsContent", {
|
|
149
|
-
vm: this,
|
|
150
|
-
data: {
|
|
151
|
-
page_id: this.pageAttr["page_id"], //页面ID
|
|
152
|
-
container_id: this.containerId, //组件ID
|
|
153
|
-
},
|
|
154
|
-
})
|
|
155
|
-
.then((res) => {
|
|
156
|
-
if(res && res.list && res.list.length > 0) {
|
|
157
|
-
this.content = res.list[0].content;
|
|
158
|
-
}
|
|
159
|
-
this.statusContent = true;
|
|
160
|
-
})
|
|
161
|
-
.catch((error) => {
|
|
162
|
-
console.error(error);
|
|
163
|
-
});
|
|
164
|
-
},
|
|
165
|
-
|
|
166
164
|
toLink(pay_order_id, order_id){
|
|
167
165
|
if(!this.payPath) {
|
|
168
166
|
this.$xdAlert({
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
cardRecharge: {"amount":10000,"request_id":"1d4ab6e96e7fd54d"}
|
|
4
|
+
cardRecharge: {"amount":10000,"request_id":"1d4ab6e96e7fd54d"},
|
|
5
|
+
cardRechargeList: {
|
|
6
|
+
"list":[
|
|
7
|
+
{"package_id":65,"package_name":"聚福宝福利卡","package_image":"\/\/sandbox-img.jufubao.cn\/uploads\/20241202\/4802cc982695196c86b7aed865cd97cb.jpg","delay_days":1,"valid_date":"2024-12-04","card_point":14000,"card_amount":1,"card_unit":"点"},
|
|
8
|
+
{"package_id":57,"package_name":"聚福宝福利礼包卡","package_image":"\/\/sandbox-img.jufubao.cn\/uploads\/20241127\/e017b49c59e929290787883947ee08f4.jpg","delay_days":2,"valid_date":"2024-12-05","card_point":200,"card_amount":200,"card_unit":"点"},
|
|
9
|
+
{"package_id":56,"package_name":"聚福宝福利礼电影卡","package_image":"\/\/sandbox-img.jufubao.cn\/uploads\/20241127\/825db706a1706fd011df3ba5bb66319a.png","delay_days":1,"valid_date":"2024-12-04","card_point":200,"card_amount":200,"card_unit":"点"},
|
|
10
|
+
{"package_id":55,"package_name":"聚福宝福利礼中秋礼品卡","package_image":"\/\/sandbox-img.jufubao.cn\/uploads\/20241127\/4946a15dab8ec885415eb9e69d09e90f.jpg","delay_days":1,"valid_date":"2024-12-04","card_point":100,"card_amount":100,"card_unit":"点"},
|
|
11
|
+
],
|
|
12
|
+
"request_id":"059b2a0cda4142f0"}
|
|
13
|
+
|
|
5
14
|
}
|
|
@@ -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>
|