Просмотр исходного кода

Merge branch 'master' of http://git.huaml.com/zhh/front-end

shish 10 месяцев назад
Родитель
Сommit
e680f3c462

+ 3 - 2
hdApp/src/admin/chat/list.vue

@@ -6,7 +6,7 @@
           <tui-list-cell :arrow="true" @click="handleItemClick(item)">
             <view class="user-card">
               <view class="user-avatar">
-                <image :src="item.avatar || getDefaultImage()" class="avatar-img" mode="aspectFill" />
+                <image :src="item.smallAvatar || getDefaultImage()" class="avatar-img" mode="aspectFill" />
               </view>
               <view class="user-info">
                 <view class="user-main">
@@ -83,7 +83,8 @@ export default {
     ...mapGetters(["getLoginInfo"]),
   },
   onLoad(options) {
-    this.shopAvatar = this.getLoginInfo.avatar != '' ? this.getLoginInfo.avatar : this.$constant.imgUrl + '/retail/default-img.png';
+    const avatar = uni.getStorageSync('shopAvatar');
+    this.shopAvatar = avatar != '' ? this.$constant.imgUrl +'/'+ avatar + '?x-oss-process=image/resize,m_fill,h_130,w_130' : this.$constant.imgUrl + '/retail/default-img.png';
   },
   onShow() {
     this.getMyCustomList();

+ 5 - 0
hdApp/src/admin/home/workbench.vue

@@ -682,6 +682,11 @@ export default {
 					let title = shopName == '首店' ? sjName : sjName+' '+shopName
 					uni.setNavigationBarTitle({ title: title })
           this.shopInfo = res.data?res.data:[]
+          if(this.shopInfo.avatar) {
+            uni.setStorageSync('shopAvatar', this.shopInfo.avatar);
+          }else{
+            uni.setStorageSync('shopAvatar', '');
+          }
 				}
 			})
 		},

+ 2 - 2
hdApp/src/components/RichMediaEditor/index.vue

@@ -25,7 +25,7 @@
           
           <view class="big-image-container">
             <image 
-              :src="item.content.startsWith('http') ? item.content : IMGHOST + '/' + item.content"
+              :src="(item.content.startsWith('http') ? item.content : IMGHOST + '/' + item.content) + '?x-oss-process=image/resize,w_1000'"
               mode="widthFix" 
               class="big-image"
               @error="onImageError"
@@ -54,7 +54,7 @@
               class="small-image-wrapper"
             >
               <image 
-                :src="img.startsWith('http') ? img : IMGHOST + '/' + img" 
+                :src="(img.startsWith('http') ? img : IMGHOST + '/' + img) + '?x-oss-process=image/resize,w_150'" 
                 mode="aspectFill" 
                 class="small-image"
                 @error="onImageError"

+ 3 - 2
hdApp/src/components/RichMediaViewer/index.vue

@@ -15,7 +15,7 @@
             <!-- 实际图片 -->
             <image
               v-show="item.loaded"
-              :src="item.shouldLoad ? getImageUrl(item.content) : ''"
+              :src="item.shouldLoad ? resizeImage(item.content, '1000') : ''"
               mode="widthFix"
               class="big-image"
               @error="onImageError(index)"
@@ -355,7 +355,8 @@ export default {
 
     // 预览单张大图
     previewImage(imageUrl) {
-      const fullImageUrl = this.getImageUrl(imageUrl);
+      let fullImageUrl = this.getImageUrl(imageUrl);
+      fullImageUrl = this.resizeImage(fullImageUrl, '1000');
       this.currentPreviewImage = fullImageUrl;
       this.currentImageList = [fullImageUrl];
       this.currentImageIndex = 0;

+ 4 - 3
mallApp/src/components/RichMediaViewer/index.vue

@@ -15,7 +15,7 @@
             <!-- 实际图片 -->
             <image
               v-show="item.loaded"
-              :src="item.shouldLoad ? getImageUrl(item.content) : ''"
+              :src="item.shouldLoad ? resizeImage(item.content, '1000') : ''"
               mode="widthFix"
               class="big-image"
               @error="onImageError(index)"
@@ -304,8 +304,9 @@ export default {
     // 预览单张大图
     previewImage(imageUrl) {
       const fullImageUrl = this.getImageUrl(imageUrl)
-      this.currentPreviewImage = fullImageUrl
-      this.currentImageList = [fullImageUrl]
+      const resizeImageUrl = this.resizeImage(fullImageUrl, '1000')
+      this.currentPreviewImage = resizeImageUrl
+      this.currentImageList = [resizeImageUrl]
       this.currentImageIndex = 0
       this.showImagePreview = true
       // 初始化预览图片状态