ソースを参照

页面undefined修复

chenrong 1 年間 前
コミット
793164f7ce

+ 1 - 0
pages/drawCard_box/drawCard_box.vue

@@ -149,6 +149,7 @@ export default {
       grid-gap: 4rpx;
 
       .box {
+        height: calc(70vw / 3 - 4rpx);
         background: linear-gradient(139deg, #a292e9 0%, #a0dfff 100%);
         border-radius: 8rpx 8rpx 8rpx 8rpx;
         opacity: 1;

+ 23 - 7
pages/drawCard_first/drawCard_first.vue

@@ -25,16 +25,14 @@
         <div class="flex pt-3 px-3">
           <image :src="detail.icon" style="width: 168rpx; height: 169rpx; border-radius: 16rpx" mode="aspectFill" />
           <div class="flex-1 pl-2">
-            <div class="" style="font-weight: 900">{{ detail.name }}</div>
+            <div class="" style="font-weight: 900; height: 42rpx">{{ detail.name || '' }}</div>
             <div class="flex justify-between">
               <div>
                 <span class="bold" style="color: #ff2c43; font-size: 24rpx">¥</span>
                 <span class="bold" style="color: #ff2c43; font-size: 38rpx">
-                  {{ ('' + detail.price).split('.')[0] }}
-                </span>
-                <span class="bold" style="color: #ff2c43; font-size: 28rpx">
-                  .{{ ('' + detail.price).split('.')[1] }}
+                  {{ priceLeft }}
                 </span>
+                <span class="bold" style="color: #ff2c43; font-size: 28rpx">.{{ priceRight }}</span>
                 <span style="color: #4e504f; font-size: 28rpx">/张明信片</span>
               </div>
               <div class="pt-2">
@@ -108,7 +106,7 @@
                   class="relative right-2"
                   style="width: 32rpx; height: 32rpx; display: inline-block"
                 />
-                <span style="color: #fc5b20" class="fs11">{{ detail.hotNum }}</span>
+                <span style="color: #fc5b20" class="fs11">{{ detail.hotNum || '' }}</span>
               </div>
             </div>
           </div>
@@ -356,7 +354,9 @@ export default {
         limit: 999,
         page: 1,
       },
-      detail: {},
+      detail: {
+        price: 0.0,
+      },
       cardList: [],
       selectIndex: [],
       prizeList: [],
@@ -381,6 +381,22 @@ export default {
   mounted() {
     this.getSafeAreaTop()
   },
+  computed: {
+    priceLeft() {
+      let num = 0
+      if (this.detail.price) {
+        num = ('' + this.detail.price).split('.')[0]
+      }
+      return num
+    },
+    priceRight() {
+      let num = 0
+      if (this.detail.price) {
+        num = ('' + this.detail.price).split('.')[1]
+      }
+      return num
+    },
+  },
   methods: {
     init() {
       // 获取卡牌商品列表

+ 4 - 3
pages/drawCard_fullSet/drawCard_fullSet.vue

@@ -6,11 +6,11 @@
         <image class="img" :src="detail.icon" mode="aspectFill"></image>
         <view class="info">
           <view class="title row">
-            {{ detail.name }}
+            {{ detail.name || '' }}
           </view>
           <view class="row">
             <view class="price">
-              ¥{{ detail.price }}
+              ¥{{ detail.price || '' }}
               <span class="text">/张明信片</span>
             </view>
             <image
@@ -32,7 +32,7 @@
             </view>
             <view class="hot">
               <image :src="'https://file.rongcyl.cn/festatic/bkm/imgv2' + '/first/hot.png'" mode="widthFix"></image>
-              {{ detail.hotNum }}
+              {{ detail.hotNum || '' }}
             </view>
           </view>
         </view>
@@ -614,6 +614,7 @@ export default {
 
       .title {
         font-weight: 600;
+        height: 64rpx;
         color: #000;
       }
 

+ 3 - 2
pages/drawCard_infinite/drawCard_infinite.vue

@@ -4,11 +4,11 @@
       <image class="img" :src="detail.icon" mode="aspectFill"></image>
       <view class="info">
         <view class="title row">
-          {{ detail.name }}
+          {{ detail.name || '' }}
         </view>
         <view class="row">
           <view class="price">
-            ¥{{ detail.price }}
+            ¥{{ detail.price || 0 }}
             <span class="text fontPFR">/张明信片</span>
           </view>
           <image
@@ -497,6 +497,7 @@ export default {
       }
 
       .title {
+        height: 42rpx;
         font-weight: 600;
         color: #000;
       }

+ 17 - 5
pages/drawCard_last/drawCard_last.vue

@@ -26,16 +26,14 @@
         <div class="flex pt-3 px-3">
           <image :src="detail.icon" style="width: 168rpx; height: 169rpx; border-radius: 16rpx" mode="aspectFill" />
           <div class="flex-1 pl-2">
-            <div class="" style="font-weight: 900">{{ detail.name }}</div>
+            <div style="font-weight: 900; height: 42rpx">{{ detail.name || '' }}</div>
             <div class="flex justify-between">
               <div>
                 <span class="bold" style="color: #ff2c43; font-size: 24rpx">¥</span>
                 <span class="bold" style="color: #ff2c43; font-size: 38rpx">
-                  {{ ('' + detail.price).split('.')[0] }}
-                </span>
-                <span class="bold" style="color: #ff2c43; font-size: 28rpx">
-                  .{{ ('' + detail.price).split('.')[1] }}
+                  {{ priceLeft }}
                 </span>
+                <span class="bold" style="color: #ff2c43; font-size: 28rpx">.{{ priceRight }}</span>
                 <span style="color: #4e504f; font-size: 28rpx">/张明信片</span>
               </div>
               <div class="pt-2">
@@ -409,6 +407,20 @@ export default {
     numImg,
   },
   computed: {
+    priceLeft() {
+      let num = 0
+      if (this.detail.price) {
+        num = ('' + this.detail.price).split('.')[0]
+      }
+      return num
+    },
+    priceRight() {
+      let num = 0
+      if (this.detail.price) {
+        num = ('' + this.detail.price).split('.')[1]
+      }
+      return num
+    },
     // 锁箱小时
     lockHour() {
       let tiem = this.lockTime * 1000

+ 4 - 1
pages/knapsack/knapsack.vue

@@ -475,7 +475,10 @@ export default {
 
 <style scoped lang="scss">
 .container {
-  background: #9ec8f9;
+  background-image: url(https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_box/bk.png);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  background-color: #9ec8f9;
   overflow: auto;
 
   .tabs {

+ 4 - 1
pages/knapsackTab/knapsack.vue

@@ -475,7 +475,10 @@ export default {
 
 <style scoped lang="scss">
 .container {
-  background: #9ec8f9;
+  background-image: url(https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_box/bk.png);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  background-color: #9ec8f9;
   overflow: auto;
 
   .tabs {

+ 1 - 1
pages/vip/vip.vue

@@ -4,7 +4,7 @@
       <view class="userInfo">
         <image class="userPhoto" :src="userInfo.avatar"></image>
         <view class="name">
-          {{ userInfo.nickname }}
+          {{ userInfo.nickname || '' }}
         </view>
       </view>
       <view class="vip">

+ 4 - 1
pages/winningRecord/winningRecord.vue

@@ -65,7 +65,10 @@ export default {
 
 <style scoped lang="scss">
 .container {
-  background: #9ec8f9;
+  background-image: url(https://file.rongcyl.cn/festatic/bkm/imgv2/drawCard_box/bk.png);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  background-color: #9ec8f9;
   overflow: auto;
   .card {
     margin: 20rpx 20rpx 0 20rpx;