gxd-uni-library-editx 1.0.76 → 1.0.78
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
|
@@ -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;
|
|
@@ -101,7 +101,6 @@ export default {
|
|
|
101
101
|
return card
|
|
102
102
|
});
|
|
103
103
|
this.cardList = (this.cardList||[]).concat(arr);
|
|
104
|
-
this.cardPageNum++;
|
|
105
104
|
this.$xdHideLoading();
|
|
106
105
|
}).exec();
|
|
107
106
|
})
|
|
@@ -118,7 +117,8 @@ export default {
|
|
|
118
117
|
});
|
|
119
118
|
|
|
120
119
|
this.cardOrgList = this.$xdUniHelper.cloneDeep(validCardList);
|
|
121
|
-
|
|
120
|
+
console.warn(`cardOrgList:${this.cardOrgList.length}`)
|
|
121
|
+
this.cardComputedList = this.$xdUniHelper.cloneDeep(this.cardOrgList).slice(this.cardPageNum,this.cardPageLen);
|
|
122
122
|
if(this.cardComputedList.length < this.cardPageLen) {
|
|
123
123
|
this.hasContent = false;
|
|
124
124
|
}
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
143
143
|
setTimeout(()=>{
|
|
144
144
|
this.cardLoading = false;
|
|
145
145
|
this.$xdHideLoading();
|
|
146
|
-
this.cardComputedList = this.cardOrgList.slice(
|
|
146
|
+
this.cardComputedList = this.$xdUniHelper.cloneDeep(this.cardOrgList).slice(
|
|
147
147
|
this.cardPageNum*this.cardPageLen,
|
|
148
148
|
this.cardPageNum*this.cardPageLen + this.cardPageLen
|
|
149
149
|
);
|
package/src/utils/XdNetwork.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import helper from "@/utils/helper";
|
|
3
|
+
import {getJfbConfig,getColorBaseUrl} from "@/lib/conf.domain";
|
|
4
|
+
|
|
3
5
|
class XdNetwork {
|
|
4
6
|
constructor(){
|
|
5
7
|
this.eventObj = {
|
|
@@ -109,8 +111,8 @@ class XdNetwork {
|
|
|
109
111
|
getNetworkEnv(paths=[]){
|
|
110
112
|
if(paths.length === 0) {
|
|
111
113
|
paths = [
|
|
112
|
-
{path: '
|
|
113
|
-
{path: '
|
|
114
|
+
{path: `${getColorBaseUrl(getJfbConfig('apiBasePath'))}/common/10x10.png`, size:0.94},
|
|
115
|
+
{path: `${getColorBaseUrl(getJfbConfig('apiBasePath'))}/common/100x100.png`, size: 1.078},
|
|
114
116
|
]
|
|
115
117
|
}
|
|
116
118
|
let promiseArr= [];
|
package/src/utils/xd.common.js
CHANGED
|
@@ -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);
|