jufubao-base 1.0.162-beta7 → 1.0.162-beta8

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-beta8",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -38,6 +38,16 @@
38
38
  >
39
39
  </view>
40
40
  </view>
41
+ <view class="jfb-base-sweep__body-other" v-if="show">
42
+ <view @click="scan">
43
+ <xd-font-icon
44
+ color="#ccc"
45
+ size="240"
46
+ icon="iconsaoma"
47
+ ></xd-font-icon>
48
+ <view class="jfb-base-sweep__body-other-text">点击扫码</view>
49
+ </view>
50
+ </view>
41
51
  </view>
42
52
  </view>
43
53
  </template>
@@ -66,6 +76,7 @@ export default {
66
76
  isPreview: false,
67
77
  backgroundColor: "",
68
78
  other: false,
79
+ show: true
69
80
  };
70
81
  },
71
82
  computed: {
@@ -90,17 +101,32 @@ export default {
90
101
  },
91
102
  },
92
103
  created() {
93
- console.log(this.layoutInfo, "layoutInfo");
94
104
  this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
95
105
  this.isPreview = this.$configProject["isPreview"];
96
106
  this.init(this.container);
97
-
98
- //todo
107
+ //#ifdef H5
108
+ if (!this.$configProject.isPreview) {
109
+ jfbRootExec("getH5WxAuthorize", {
110
+ vm: this,
111
+ data: {site_id: "wx_pub"},
112
+ })
113
+ .then(res => {
114
+ console.log(0)
115
+ })
116
+ .catch(error=>{
117
+ this.$xdAlert({
118
+ content: error,
119
+ });
120
+ })
121
+ }
122
+ // #endif
99
123
  },
100
124
  methods: {
101
125
  onJfbLoad(options) {
102
126
  if (!this.isPreview) {
103
- this.$xdShowLoading({});
127
+ this.$xdShowLoading({
128
+ isMask: true
129
+ });
104
130
  //#ifdef MP-WEIXIN
105
131
  this.$xdHideLoading();
106
132
  this.scan();
@@ -171,9 +197,13 @@ export default {
171
197
  }
172
198
  }
173
199
  this.other = true;
200
+ this.show = false;
174
201
  },
175
202
  // 扫描失败后的回调函数
176
203
  fail: (error) => {
204
+ console.log(44444);
205
+ this.other = true;
206
+ this.show = false;
177
207
  // 如果error是字符串类型,则将其转换为对象类型
178
208
  if (typeof error === "string") error = { error: error };
179
209
  // 如果window["jwxJfbSDKParams"]存在,则将error对象与window["jwxJfbSDKParams"]合并
@@ -182,6 +212,11 @@ export default {
182
212
  // 调用$xdLog的setARMSError方法,记录错误信息
183
213
  this.$xdLog.setARMSError(error);
184
214
  },
215
+ error: ()=>{
216
+ console.log(44444);
217
+ this.other = true;
218
+ this.show = false;
219
+ }
185
220
  });
186
221
  }
187
222
  },
@@ -238,9 +273,12 @@ export default {
238
273
  }
239
274
  }
240
275
  this.other = true;
276
+ this.show = false;
241
277
  },
242
278
  fail: (error) => {
243
279
  // 如果扫描失败,则调用$xdLog.setARMSError方法记录错误信息
280
+ this.other = true;
281
+ this.show = false;
244
282
  this.$xdLog.setARMSError(error);
245
283
  },
246
284
  });