Kaynağa Gözat

feat: 修改

Moss 1 yıl önce
ebeveyn
işleme
edfe0e639f

+ 10 - 4
src/pages/goods/detail.vue

@@ -22,8 +22,8 @@
         </view>
         <view class="btns">
           <u-button type="warning" text="分享好友" class="share"></u-button>
-          <u-button type="error" text="立即联系" class="contact" @click="toContact"></u-button>
-          <u-button type="primary" text="立即购买" class="buy" @click="toBuy"></u-button>
+          <u-button type="error" text="立即联系" class="contact" @click="toContact" v-if="!isMine"></u-button>
+          <u-button type="primary" text="立即购买" class="buy" @click="toBuy" v-if="!isMine"></u-button>
         </view>
       </view>
 
@@ -67,7 +67,7 @@
       <view class="remark-container">
         <view class="title">
           <view class="tit">全部留言</view>
-          <view class="right">内容违规,我要举报</view>
+          <view class="right" v-if="!isMine">内容违规,我要举报</view>
         </view>
         <view class="item" v-for="(item, index) in remarkList" :key="index">
           <view class="top">
@@ -90,7 +90,7 @@
       <template slot="footer">
         <view class="bottom-container">
           <u-button text="留言" type="primary" shape="circle" @click="openRemark()"></u-button>
-          <u-button text="操作" type="primary" shape="circle" @click="isShowActionDialog = true"></u-button>
+          <u-button text="操作" type="primary" shape="circle" @click="isShowActionDialog = true" v-if="isMine"></u-button>
         </view>
       </template>
     </zj-page-layout>
@@ -146,6 +146,12 @@
       }
     },
 
+    computed: {
+      isMine() {
+        return this.$store.state.user.userId === this.detail.userId;
+      }
+    },
+
     onLoad({id}) {
       this.id = id;
       this.getDetail();

+ 2 - 2
src/pages/goods/list.vue

@@ -195,7 +195,7 @@
 
       toGoodsDetail(id) {
         this.$navToPage({
-          url: `/pages/goods/detail?${id}`
+          url: `/pages/goods/detail?id=${id}`
         })
       },
 
@@ -209,7 +209,7 @@
         pam: {},
       }
     },
-  
+
     onLoad(pam) {
       this.pam = pam;
     },

+ 22 - 2
src/pages/mine/myEarnings/list.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- #ifdef H5 -->
   <zj-page-layout
   	:hasFooter="false"
   	:isScroll="true"
@@ -27,7 +28,7 @@
         <view class="left">
           <view class="row">订单编号:{{item.orderId}}</view>
           <view class="row">订单金额:¥{{item.payment | priceFilter}}</view>
-          <view class="row">支付时间:{{item.createTime}}</view>
+          <view class="row">支付时间:{{item.createTime || ''}}</view>
         </view>
         <view class="right">
           <view class="status">{{item.status | statusFilter}}</view>
@@ -38,9 +39,14 @@
 
     <Loading :loadStatus="loadStatus" :dataList="dataList" />
   </zj-page-layout>
+  <!-- #endif -->
+  <!-- #ifndef H5 -->
+  <web-view :src="webViewHref('/pages/mine/myEarnings/list', pam)"></web-view>
+  <!-- #endif -->
 </template>
 
 <script>
+  // #ifdef H5
   export default {
     filters: {
       statusFilter(val) {
@@ -127,6 +133,20 @@
 
     }
   }
+  // #endif
+  // #ifndef H5
+  export default {
+    data() {
+      return {
+        pam: {},
+      }
+    },
+  
+    onLoad(pam) {
+      this.pam = pam;
+    },
+  }
+  // #endif
 </script>
 
 <style lang="scss" scoped>
@@ -198,7 +218,7 @@
       display: flex;
       flex-direction: column;
       justify-content: space-between;
-      align-items: end;
+      align-items: flex-end;
       .status {
         color: $minor-color;
       }