cb-biz-ui 1.6.6 → 1.6.7

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.
@@ -9,7 +9,7 @@
9
9
  :placeholder="imagePlaceholder"
10
10
  backgroundColor="#f9f9f9"
11
11
  :mode="imageMode"
12
- :src="entity.image || ''"
12
+ :src="goodsImage"
13
13
  sizeType="previewImage"
14
14
  ></ui-lazyload-img>
15
15
  <!-- <view
@@ -249,6 +249,19 @@ const errStatusText = computed(() => {
249
249
  }
250
250
  return '';
251
251
  });
252
+ const goodsImage = computed(() => {
253
+ if (props?.entity?.image?.includes('static.tanshuapi.com')) {
254
+ return urlConversion(props?.entity?.image || '');
255
+ }
256
+ return props?.entity?.image || '';
257
+ });
258
+
259
+ function urlConversion(path) {
260
+ let reg =
261
+ /^(https?:\/\/)([0-9a-z.]+)(:[0-9]+)?([/0-9a-z.]+)?(\?[0-9a-z&=]+)?(#[0-9-a-z]+)?/i;
262
+ path = path.replace(reg, 'https://$2$3$4$5$6');
263
+ return path;
264
+ }
252
265
 
253
266
  const state = reactive({
254
267
  windowWidth: 375,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cb-biz-ui",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "cb-biz-ui",
5
5
  "main": "index.js",
6
6
  "keywords": [