jufubao-base 1.0.162-beta7 → 1.0.162-beta9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.162-beta7",
3
+ "version": "1.0.162-beta9",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -40,11 +40,11 @@
40
40
  </view>
41
41
  <view :style="{height:bottomHeight+100+'rpx'}"></view>
42
42
  <view class="jfb-base-card-shift__body-footer" :style="prod_bottom">
43
+ <xd-button type="primary" width="360rpx" @click="handleChange">立即转换</xd-button>
43
44
  <view class="jfb-base-card-shift__body-agree">
44
45
  <xd-radio size="small" v-model="isCheck"></xd-radio>
45
46
  <view>我已经阅读和同意积分转换规则</view>
46
47
  </view>
47
- <xd-button type="primary" width="360rpx" @click="handleChange">立即转换</xd-button>
48
48
  </view>
49
49
  <xd-dailog
50
50
  class="dialog"
@@ -55,14 +55,22 @@
55
55
  :cancel="false"
56
56
  >
57
57
  <view class="jfb-base-card-shift__body-success">
58
- <xd-font-icon
59
- size="100"
60
- color="#52C41A"
61
- icon="icondui-01"
62
- ></xd-font-icon>
63
- <view class="jfb-base-card-shift__body-success-title">转换成功</view>
64
- <view class="jfb-base-card-shift__body-success-content">您已成功将{{ card_number }} 转换为{{ changeNumber }}已自动帮您绑定成功,可在卡列表查询</view>
65
- <xd-button type="primarys" width="360rpx" @click="handleToLink">返回列表</xd-button>
58
+ <view class="jfb-base-card-shift__body-success-head">
59
+ <xd-font-icon
60
+ size="42"
61
+ :color="mainColor"
62
+ icon="icondui-01"
63
+ ></xd-font-icon>
64
+ <view class="jfb-base-card-shift__body-success-title" :style="{
65
+ color: mainColor
66
+ }">票券转换成功</view>
67
+ </view>
68
+
69
+ <view class="jfb-base-card-shift__body-success-content">
70
+ 已成功将 <text class="b">{{ card_number }}</text><br/> 转换成为 <text class="b">{{ changeNumber }}</text><br/>
71
+ <text @click="handleToLink">可在券包中查看</text>
72
+ </view>
73
+ <!-- <xd-button type="primarys" width="360rpx" @click="handleToLink">返回列表</xd-button> -->
66
74
  </view>
67
75
  </xd-dailog>
68
76
  </view>
@@ -270,8 +278,7 @@ export default {
270
278
  justify-content: center;
271
279
  font-size: unit(24, rpx);
272
280
  color: #bbb;
273
- padding: unit(20, rpx) 0;
274
- margin-bottom: unit(40,rpx);
281
+ margin: unit(40,rpx) 0;
275
282
 
276
283
  & > view {
277
284
  margin-left: unit(25, rpx);
@@ -284,13 +291,21 @@ export default {
284
291
  right: 0;
285
292
  // bottom: unit(120,rpx) !important;
286
293
  height: unit(100, rpx);
294
+ background: #FFFFFF;
295
+ padding-top: unit(20, rpx);
287
296
  }
288
297
 
289
298
  &-success {
290
299
  padding: unit(70, rpx);
291
300
  &-title {
292
- font-size: unit(42, rpx);
301
+ font-size: unit(36, rpx);
293
302
  color: #242424;
303
+ margin-left: 8px;
304
+ }
305
+ &-head{
306
+ display: flex;
307
+ align-items: center;
308
+ justify-content: center;
294
309
  }
295
310
 
296
311
  &-content {
@@ -298,7 +313,11 @@ export default {
298
313
  color: #5a5a5a;
299
314
  text-align: center;
300
315
  line-height: unit(42, rpx);
301
- margin: unit(50, rpx) 0;
316
+ margin: unit(40, rpx) 0 0;
317
+ .b{
318
+ font-weight: bold;
319
+ margin-left: 8rpx;
320
+ }
302
321
  }
303
322
  }
304
323
 
@@ -33,11 +33,22 @@
33
33
  <view class="jfb-base-sweep__body-other-text">无法识别该界面</view>
34
34
  </view>
35
35
  <view class="jfb-base-sweep__body-footer" :style="prod_bottom">
36
- <XdButton @click="scan" type="primary" radius="20" width="40%"
36
+ <XdButton @click="scan" type="primary" radius="50rpx" width="50%"
37
37
  >重试</XdButton
38
38
  >
39
39
  </view>
40
40
  </view>
41
+ <view class="jfb-base-sweep__body-other" v-if="show">
42
+ <view>
43
+ <image style="width: 500rpx;height:500rpx" src="https://img0.jufubao.cn/common/qrcode-dome.png?ver=1"></image>
44
+ <view style="color:#000000;font-size:48rpx" class="jfb-base-sweep__body-other-text">重新扫码</view>
45
+ </view>
46
+ <view class="jfb-base-sweep__body-footer" :style="prod_bottom">
47
+ <XdButton @click="scan" type="primary" radius="50rpx" width="50%"
48
+ >扫一扫</XdButton
49
+ >
50
+ </view>
51
+ </view>
41
52
  </view>
42
53
  </view>
43
54
  </template>
@@ -66,6 +77,7 @@ export default {
66
77
  isPreview: false,
67
78
  backgroundColor: "",
68
79
  other: false,
80
+ show: true
69
81
  };
70
82
  },
71
83
  computed: {
@@ -80,27 +92,36 @@ export default {
80
92
  container(value) {
81
93
  this.init(value);
82
94
  },
83
- jwxSDK(value) {
84
- //#ifdef H5
85
- if (value) {
86
- this.$xdHideLoading();
87
- this.scan();
88
- }
89
- //#endif
90
- },
91
95
  },
92
96
  created() {
93
- console.log(this.layoutInfo, "layoutInfo");
94
97
  this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
95
98
  this.isPreview = this.$configProject["isPreview"];
96
99
  this.init(this.container);
97
-
98
- //todo
100
+ //#ifdef H5
101
+ if (!this.$configProject.isPreview) {
102
+ jfbRootExec("getH5WxAuthorize", {
103
+ vm: this,
104
+ data: {site_id: "wx_pub"},
105
+ })
106
+ .then(res => {
107
+ console.log(0)
108
+ this.$xdHideLoading();
109
+ this.scan();
110
+ })
111
+ .catch(error=>{
112
+ this.$xdAlert({
113
+ content: error,
114
+ });
115
+ })
116
+ }
117
+ // #endif
99
118
  },
100
119
  methods: {
101
120
  onJfbLoad(options) {
102
121
  if (!this.isPreview) {
103
- this.$xdShowLoading({});
122
+ this.$xdShowLoading({
123
+ isMask: true
124
+ });
104
125
  //#ifdef MP-WEIXIN
105
126
  this.$xdHideLoading();
106
127
  this.scan();
@@ -147,7 +168,8 @@ export default {
147
168
  }
148
169
  if (queryobjArr["pa"]) {
149
170
  // 如果queryobjArr中有pa属性,则获取pa属性的值,并将其拼接到bind_url后面,然后使用navigateTo方法跳转到该路径
150
- let path = `${this.bind_url}?pa=${queryobjArr["pa"]}`;
171
+ console.log(this.bind_url,'pathpath');
172
+ let path = `${this.bind_url}?pa=${res.resultStr}`;
151
173
  this.$xdUniHelper.navigateTo({
152
174
  url: path,
153
175
  });
@@ -171,9 +193,13 @@ export default {
171
193
  }
172
194
  }
173
195
  this.other = true;
196
+ this.show = false;
174
197
  },
175
198
  // 扫描失败后的回调函数
176
199
  fail: (error) => {
200
+ console.log(44444);
201
+ this.other = true;
202
+ this.show = false;
177
203
  // 如果error是字符串类型,则将其转换为对象类型
178
204
  if (typeof error === "string") error = { error: error };
179
205
  // 如果window["jwxJfbSDKParams"]存在,则将error对象与window["jwxJfbSDKParams"]合并
@@ -182,6 +208,11 @@ export default {
182
208
  // 调用$xdLog的setARMSError方法,记录错误信息
183
209
  this.$xdLog.setARMSError(error);
184
210
  },
211
+ error: ()=>{
212
+ console.log(44444);
213
+ this.other = true;
214
+ this.show = false;
215
+ }
185
216
  });
186
217
  }
187
218
  },
@@ -212,7 +243,7 @@ export default {
212
243
  }
213
244
  if (queryobjArr["pa"]) {
214
245
  // 如果queryobjArr中有pa属性,则获取pa属性的值,并将其拼接到bind_url后面,然后使用navigateTo方法跳转到该路径
215
- let path = `${this.bind_url}?pa=${queryobjArr["pa"]}`;
246
+ let path = `${this.bind_url}?pa=${res.result}`;
216
247
  this.$xdUniHelper.navigateTo({
217
248
  url: path,
218
249
  });
@@ -238,9 +269,12 @@ export default {
238
269
  }
239
270
  }
240
271
  this.other = true;
272
+ this.show = false;
241
273
  },
242
274
  fail: (error) => {
243
275
  // 如果扫描失败,则调用$xdLog.setARMSError方法记录错误信息
276
+ this.other = true;
277
+ this.show = false;
244
278
  this.$xdLog.setARMSError(error);
245
279
  },
246
280
  });
@@ -310,7 +344,7 @@ export default {
310
344
  position: fixed;
311
345
  left: 0;
312
346
  right: 0;
313
- height: unit(110, rpx);
347
+ height: unit(200, rpx);
314
348
  }
315
349
  }
316
350
  }