Parcourir la source

fix: 下单页面显示距离

zhanghui il y a 2 ans
Parent
commit
647df09cd8

+ 1 - 1
myPages/familyCard/index.scss

@@ -35,7 +35,7 @@
   height: 96rpx;
   border-radius: 50rpx;
   box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,224,92,0.1);
-  border: 2rpx solid #FFFFFF;
+  //border: 2rpx solid #FFFFFF;
   margin-top: 26rpx;
   margin-left: 24rpx;
 }

+ 13 - 12
myPages/familyCard/index.vue

@@ -16,7 +16,7 @@
             </view>
 
             <view v-else>
-                <view class="loveCard" v-for="(item,index) in gotList" :key="index" @click="jumpToDetail(item)">
+                <view class="loveCard" v-for="(item,index) in gotList" :key="index" @click="jumpToDetail(item,2)">
                     <image src="/static/familyCard/shoudaoLove.png" class="imgBack"></image>
                     <view class="loveCardMsg">
                         <view class="flex-row">
@@ -69,7 +69,7 @@
             </view>
 
             <view v-else>
-                <view class="loveCard" v-for="(item, index) in giveList" :key="index" @click="jumpToDetail(item)">
+                <view class="loveCard" v-for="(item, index) in giveList" :key="index" @click="jumpToDetail(item,1)">
                     <image src="/static/familyCard/zengsLove.png" class="imgBack"></image>
                     <view class="loveCardMsg">
                         <view class="flex-row">
@@ -165,30 +165,30 @@
                     })
                 }
             },
-            jumpToDetail(item) {
+            jumpToDetail(item,number) {
                 uni.navigateTo({
-                    url: '/myPages/familyCard/unbindFamilyCard/unbindFamilyCard?data=' + JSON.stringify(item)
+                    url: '/myPages/familyCard/unbindFamilyCard/unbindFamilyCard?data=' + JSON.stringify(item) + '&type=' + number
                 })
             },
             getImgUrlByOssId(list, number) {
                 if (list) {
-                    list.forEach((e) => {
+                    for (let i=0;i<list.length;i++){
                         let data = null
                         if (number == 1) {
-                            data = e.presentUserPhoto
-
+                            data = list[i].userPhoto
                         } else {
-                            data = e.userPhoto
+                            data = list[i].presentUserPhoto
                         }
                         if (data) {
                             this.$api.getImage(data).then(res => {
-                                e.url = res.data.data[0].url.replace(/^http:/, "https:")
+                                list[i].url = res.data.data[0].url.replace(/^http:/, "https:")
+                                this.$set(list,i,list[i])
                             });
                         }
-                    })
-                    this.$forceUpdate()
+                    }
                 }
             },
+            //获取我赠送的亲情卡列表
             getGiveList() {
                 this.$api.getMyPresentList().then((res) => {
                     this.giveList = res.data.data
@@ -196,10 +196,11 @@
                 })
 
             },
+            //查询我收到的情亲卡列表
             getGotList() {
                 this.$api.getMyReceiveList().then((res) => {
                     this.gotList = res.data.data
-                    this.getImgUrlByOssId(this.giveList, 2)
+                    this.getImgUrlByOssId(this.gotList, 2)
                 })
             }
         }

+ 18 - 0
myPages/familyCard/unbindFamilyCard/familyCard.scss

@@ -58,6 +58,12 @@
             line-height: 26px;
           }
         }
+        .openUnbind{
+          position: absolute;
+          top:32rpx;
+          right: 32rpx;
+          color:#FFAF36
+        }
       }
 
     }
@@ -74,3 +80,15 @@
   padding: 20rpx;
   margin: 24rpx;
 }
+
+.cardMsg{
+  margin-top: 8rpx;
+  font-size: 28rpx;
+  color: #666666;
+}
+.record{
+  margin:24rpx 0;
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333333
+}

+ 14 - 5
myPages/familyCard/unbindFamilyCard/module/familyCard.scss

@@ -11,13 +11,22 @@
 }
 
 .useList {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
   border-top: 1px solid #EEEEEE;
-  padding: 20rpx;
-  margin: 24rpx;
+  padding-top: 24rpx;
+  margin: 24rpx 0;
 }
 .useList:first-child{
   border: none;
 }
+.remark{
+  width: 450rpx;
+}
+.time{
+  margin-top: 12rpx;
+  font-size: 24rpx;
+}
+.recordMsg{
+  width: 580rpx;
+  font-size: 28rpx;
+  color: #333333;
+}

+ 19 - 9
myPages/familyCard/unbindFamilyCard/module/mescrollUni-item.vue

@@ -8,17 +8,27 @@
   <mescroll-uni :ref="'mescrollRef' + i" @init="mescrollInit" :height="height" :down="downOption" @down="downCallback"
                 :up="upOption" @up="upCallback" @emptyclick="emptyClick">
     <view>
-      <view class="useList" v-for="(item,index) in list" :key="index">
-        <view style="display: flex;align-items: center">
-          <view class="icon">{{ item.type == 0 ? "消费" : "增加" }}</view>
-          <text>{{ item.createTime }}</text>
+      <view class="useList flex-row justify-start" v-for="(item,index) in list" :key="index">
+
+        <view class="icon">
+          <text> {{ item.type == 0 ? "消费" : "增加" }}</text>
         </view>
-        <view>
-          <view>
-            <text>{{ item.type == 0 ? "-" : "+"  }}</text>
-            {{ item.amount || 0 }}
+
+        <view class="recordMsg flex-col justify-between">
+          <view class="flex-row justify-between ">
+            <view class="remark">
+              <text>{{ item.remark}}</text>
+            </view>
+            <view class="amount">
+              <text>{{ item.type == 0 ? "-" : "+"  }}  {{ item.amount || 0 }}</text>
+            </view>
+          </view>
+          <view class="time">
+            <text>{{ item.createTime }}</text>
           </view>
+
         </view>
+
       </view>
     </view>
   </mescroll-uni>
@@ -146,7 +156,7 @@ export default {
   }
 }
 </script>
-<style>
+<style scoped lang="scss">
 @import '/common/css/common.css';
 @import './familyCard.scss';
 </style>

+ 8 - 5
myPages/familyCard/unbindFamilyCard/unbindFamilyCard.vue

@@ -10,18 +10,19 @@
               <view class="name">已用额度</view>
               <view class="Number" style="font-size: 48rpx">{{ data.amount || 0 }}</view>
             </view>
-            <text style="position: absolute;top:32rpx;right: 32rpx;color:#FFAF36" @click="openUnbindpopup">解绑</text>
+            <text class="openUnbind" @click="openUnbindpopup">解绑</text>
           </view>
-          <view style="display: flex;justify-content: space-between;margin: 8rpx 0rpx">
+          <view class="cardMsg flex-row">
             <text>赠送会员编号:</text>
             <text>{{ data.userNo }}</text>
           </view>
-          <view style="display: flex;justify-content: space-between;margin: 8rpx 0rpx">
-            <text>收到时间::</text>
+          <view  class="cardMsg flex-row ">
+            <text v-if="type == 1">赠送时间:</text>
+            <text v-if="type == 2">收到时间:</text>
             <text>{{ data.createTime }}</text>
           </view>
         </view>
-        <text style="margin:24rpx 0;overflow: hidden">使用记录</text>
+        <text class="record">使用记录</text>
         <view v-if="data.id">
           <mescroll-item ref="MescrollItem" :i="0" :index="0" :cardId="data.id" :height="scrollViewHeight">
           </mescroll-item>
@@ -46,11 +47,13 @@ export default {
   },
   data() {
     return {
+      type:0,
       data: {},
       scrollViewHeight: '',
     };
   },
   onLoad(option) {
+    this.type = option.type;
     this.data = JSON.parse(option.data)
     console.log(this.data)
     let sysInfo = uni.getSystemInfoSync()