gxd-uni-library-editx 1.0.75 → 1.0.77

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": "gxd-uni-library-editx",
3
- "version": "1.0.75",
3
+ "version": "1.0.77",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -28,7 +28,7 @@
28
28
  </view>
29
29
  <view class="checklist-content" :class="{'list-content':mode === 'list' && icon ==='left'}">
30
30
  <view class="checklist-text" :style="item.styleIconText">
31
- <!-- #ifdef h5 -->
31
+ <!-- #ifdef H5 -->
32
32
  <slot :name="'a' +item.value">{{item[map.text]}}</slot>
33
33
  <!-- #endif -->
34
34
  <!-- #ifdef MP-WEIXIN -->
@@ -12,7 +12,7 @@
12
12
  fontSize: fontSize + 'rpx',
13
13
  fontWeight: fontWeight,
14
14
  textDecoration: deleteLine ? 'line-through': 'none',
15
- color: uiColor
15
+ color: isGray?'#999':uiColor
16
16
  }"
17
17
  >{{uiPrice}}</view>
18
18
  <view class="xd-unit__image" v-if="uiIcon && isShowIcon && (unit === null)">
@@ -25,7 +25,7 @@
25
25
  :style=" {
26
26
  lineHeight: fontSize + 'rpx',
27
27
  fontSize: unitFontSize > 0 ? (unitFontSize + 'rpx') :(fontSize - 8) + 'rpx',
28
- color: uiColor
28
+ color: isGray?'#999':uiColor
29
29
  }"
30
30
  v-if="unit">{{unit}}</view>
31
31
  <view v-else>
@@ -113,7 +113,7 @@
113
113
  type: Number,
114
114
  default: 0
115
115
  },
116
-
116
+
117
117
  isOld: {
118
118
  type: Boolean,
119
119
  default: true,
@@ -138,8 +138,8 @@
138
138
  },
139
139
  },
140
140
  async created() {
141
-
142
-
141
+
142
+
143
143
 
144
144
  //配置中获取
145
145
  let optionsIcon = null;
@@ -152,7 +152,7 @@
152
152
  if (this.brandInfo && this.brandInfo['unit_icon']) {
153
153
  brandIncon = this.brandInfo['unit_icon'];
154
154
  }
155
-
155
+
156
156
  //保留几位小数
157
157
  if ((this.brandInfo && this.brandInfo['unit_float'])) {
158
158
  let unit_float = this.brandInfo['unit_float'];
@@ -165,23 +165,23 @@
165
165
  if (unit_float > 2) unit_float = null;
166
166
  this.fixedNum = unit_float;
167
167
  }
168
-
169
-
168
+
169
+
170
170
 
171
171
  //项目配置中获取
172
172
  let projectIcon;
173
173
  if (this.webUnitIcon) {
174
174
  projectIcon = this.webUnitIcon;
175
175
  }
176
-
176
+
177
177
  if (this.colorNew) this.uiColor = this.colorNew;
178
-
178
+
179
179
  this.uiIcon = projectIcon || brandIncon || optionsIcon;
180
-
180
+
181
181
  if(this.unit === null) {
182
182
  this.uiIcon = projectIcon || brandIncon || optionsIcon;
183
183
  }
184
-
184
+
185
185
  //设置显示数字
186
186
  this.initPrice();
187
187
  },
@@ -195,7 +195,7 @@
195
195
  this.show = false;
196
196
  return;
197
197
  }
198
-
198
+
199
199
  //设置显示数字
200
200
  if (this.isOld) this.uiPrice = this.price;
201
201
  else {
@@ -203,7 +203,7 @@
203
203
  if(this.$xdUniHelper.checkVarType(price) === 'string') {
204
204
  price = Number(price);
205
205
  }
206
-
206
+
207
207
  this.uiPrice = this.$xdUniHelper.divisionFloatNumber(price, 100);
208
208
  if(this.fixedNum !== null) {
209
209
  this.uiPrice = this.uiPrice.toFixed(this.fixedNum);
@@ -231,7 +231,7 @@
231
231
  margin-right: unit(12, rpx);
232
232
  font-weight: normal;
233
233
  }
234
-
234
+
235
235
  &__image {
236
236
  display: flex;
237
237
  justify-content: center;
@@ -187,6 +187,32 @@ const uriIgnoreErrors = (url, useTime)=>{
187
187
  return reg.test(url) || useTime < useTimeMax;
188
188
  }
189
189
 
190
+ /**
191
+ * @description 体验模式报错处理
192
+ */
193
+ const noticeExperience= ($vm)=>{
194
+ $vm.$xdConfirm({
195
+ title:'体验模式暂不支持该功能',
196
+ content:"您可以退出体验模式并登录正式账号使用完整功能",
197
+ cancelText:'继续体验',
198
+ confirmText:'去登陆',
199
+ styles: store.state.styleCommon,
200
+ success:(res)=>{
201
+ if(res.confirm){
202
+ $vm.$xdShowLoading({});
203
+ store.dispatch('logout').then(res=>{
204
+ $vm.$xdHideLoading();
205
+ store.state.jfbAuthorize.removeToken('card');
206
+ store.state.jfbAuthorize.jumpToUserLogin($vm, false);
207
+ }).catch(err=>{
208
+ console.error(err);
209
+ $vm.$xdHideLoading();
210
+ })
211
+ }
212
+ }
213
+ })
214
+ }
215
+
190
216
  /**
191
217
  * @description 异步请求统一处理
192
218
  * @param request {Request}
@@ -225,6 +251,17 @@ export function handlePesponse(
225
251
  getApp().saveLogs(requestInfo, 'alert', 'ajax');
226
252
  }
227
253
 
254
+ //非200状态体检报错处理
255
+ if(response['statusCode'] !== 200
256
+ && response.data
257
+ && response.data.message
258
+ && response.data.message.indexOf('体验模式')!==-1
259
+ ){
260
+ noticeExperience($vm);
261
+ reject(response);
262
+ return;
263
+ }
264
+
228
265
  //200
229
266
  if (response['statusCode'] === 200) {
230
267
  //当前卡卡去不支持当前业务线
@@ -245,6 +282,14 @@ export function handlePesponse(
245
282
 
246
283
  //400
247
284
  else if (response['statusCode'] === 400) {
285
+ if(response.data.code === 'RefuseUserExperience' ||
286
+ response.data.message.indexOf('体验模式')!==-1
287
+ ) {
288
+ noticeExperience($vm);
289
+ reject(response);
290
+ return
291
+ }
292
+
248
293
  if (!$vm) {
249
294
  reject(response);
250
295
  throw new Error(response.data.message);