Jelajahi Sumber

图片显示修改

MS-IOHQJGHXZHQD\Administrator 5 bulan lalu
induk
melakukan
788172b22f

+ 4 - 7
src/points/productDetails/components/selectProduct.vue

@@ -11,7 +11,7 @@
                     }}</text>
                 <text class="addAddress" style="color: #999;position: absolute;right: 35rpx;top:0"
                     v-if='!defaultAddress'>添加收货地址</text>
-                <image style="width: 35rpx;height: 35rpx;position: absolute;right: 0;top: 0rpx;"
+                <image style="width: 35rpx;height: 35rpx;position: absolute;right: 0;top: 5rpx;"
                     @click="addressSelectFun" src="@/static/points/Keyboard_arrow_rifht.png" mode=""></image>
             </view>
 
@@ -24,12 +24,9 @@
             <view style="display:flex;justify-content: space-between;">
                 <view style="display:flex;">
                     <view style="display: flex;align-items: center;">
-                        <image v-if="selectedObj" style="width: 120rpx;height: 120rpx;"
+                        <image v-if="selectedObj" style="height: 120rpx;"
                             :src="$globalData.publicUrl + selectedObj.image" mode="heightFix">
                         </image>
-                        <image v-else style="width: 120rpx;height: 120rpx;"
-                            :src="$globalData.publicUrl + params.productMainImage" mode="">
-                        </image>
                     </view>
                     <view
                         style="margin-left: 24rpx;display: flex;flex-direction: column;justify-content: space-between;">
@@ -109,7 +106,7 @@
         </view>
 
 
-        <view class="footer-bar">
+        <view class="footer-bar"  v-if="params">
 
             <u-button v-if="!selectedObj" :customStyle="{
                 color: '#fff',
@@ -119,7 +116,7 @@
                 color: '#999999 ',
                 background: '#eee'
             }">库存不足</u-button>
-            <u-button :disabled="redeemNowBtnDisable" v-else-if="selectedObj.stock && params" :customStyle="{
+            <u-button :disabled="redeemNowBtnDisable" v-else :customStyle="{
                 color: '#fff',
                 background: '#03C1B8'
             }" @click="redeemNowFun">{{ params.paymentType == 1 ? '立即兑换' : '实付价' }} {{ params.paymentType == 1 ?

+ 19 - 16
src/points/productDetails/index.vue

@@ -46,14 +46,16 @@
             <view style="display: flex;align-items: center;justify-content: space-between;width: 100%;">
               <view style="display: flex;align-items: center;">
                 <text style="color: #666666;">规格</text>
-                <ImageItem v-if="selectedObj" class="imgClass" :src="$globalData.publicUrl + selectedObj.image" />
+                <image v-if="selectedObj" class="imgClass" :src="$globalData.publicUrl + selectedObj.image"
+                  mode="heightFix">
+                </image>
               </view>
               <view style="display: flex;align-items: center;position: relative;" @click="selectProductShowFun">
                 <text v-if="selectedObj" style="color: #666666;margin-right: 35rpx;">
                   已选:{{ selectedObj.specValueText }}</text>
                 <text v-else style="color: #999;margin-right: 35rpx;">选择商品</text>
                 <span style="position: absolute;right: 0;top: -5rpx;">
-                  <image style="width: 35rpx;height: 35rpx;" src="@/static/points/Keyboard_arrow_rifht.png" mode="">
+                  <image style="height: 35rpx;width: 35rpx;" src="@/static/points/Keyboard_arrow_rifht.png" mode="">
                   </image>
                 </span>
               </view>
@@ -62,14 +64,15 @@
           </view>
           <view class="arriveAddressClass">
             <text style="color: #666666;margin-right: 24rpx;">送至</text>
-            <view style="width: 80%; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;" @click="addressSelectFun">
+            <view style="width: 80%; white-space:nowrap; overflow: hidden; text-overflow: ellipsis;"
+              @click="addressSelectFun">
               <text v-if="defaultAddress">
                 {{ defaultAddress.address + defaultAddress.atlasAdd }}</text>
 
               <text v-else style="color: #999;position: absolute;right: 35rpx;top:0">添加收货地址</text>
               <span style="position: absolute;right: 0;top: -5rpx;">
-                <image style="width: 35rpx;height: 35rpx;"
-                  src="@/static/points/Keyboard_arrow_rifht.png" mode=""></image>
+                <image style="width: 35rpx;height: 35rpx;" src="@/static/points/Keyboard_arrow_rifht.png" mode="">
+                </image>
               </span>
             </view>
 
@@ -90,7 +93,7 @@
         <view class="produceDateil">
           <view style="font-weight: 800;font-size: 32rpx;color: #333333;">商品详情</view>
           <view v-for="img in params.productImage" style="margin-top: 20rpx;">
-            <image style="width: 100%;" :src="$globalData.publicUrl + img" mode="aspectFill"></image>
+            <image style="width: 100%;" :src="$globalData.publicUrl + img" mode="widthFix"></image>
           </view>
 
         </view>
@@ -194,31 +197,31 @@ export default {
       dBalance: 0.00,
       wxconfig: {},
       orderNo: null,
-      isGetAddrListFunLoaded:false,
+      isGetAddrListFunLoaded: false,
 
 
     }
   },
   onLoad(data) {
     console.log(data, 'onLoad66666')
-    if(data.selectedAddressId)this.selectedAddressId=data.selectedAddressId
+    if (data.selectedAddressId) this.selectedAddressId = data.selectedAddressId
     if (data.id) {
       this.productGetByIdFun(data.id)
       this.getAddrListFun()
-      this.isGetAddrListFunLoaded=true
+      this.isGetAddrListFunLoaded = true
       this.getinfo()
     }
 
   },
   onShow(onShow) {
-    console.log(onShow, this.isGetAddrListFunLoaded,'onShow55555')
-    if(!this.isGetAddrListFunLoaded){
-       this.getAddrListFun()
-    }else{
-      this.isGetAddrListFunLoaded=false
+    console.log(onShow, this.isGetAddrListFunLoaded, 'onShow55555')
+    if (!this.isGetAddrListFunLoaded) {
+      this.getAddrListFun()
+    } else {
+      this.isGetAddrListFunLoaded = false
     }
-   
-    
+
+
   },
   onPageScroll(e) {
     //console.log("滚动距离为:" + e.scrollTop);