Przeglądaj źródła

Merge branch 'master' of ssh://gogs.zfire.top:2222/zfire-front/recycle-mobile

linwenxin 1 rok temu
rodzic
commit
1d7cce5d5e

+ 1 - 0
src/components/zj-dialog/zj-dialog-remark.vue

@@ -34,6 +34,7 @@
 			return {
         name: '',
 				value: '',
+        replyItem: null,
 			}
 		},
 

+ 33 - 6
src/pages/goods/detail.vue

@@ -162,10 +162,10 @@
         refresherTriggered: false,
         isShowRemarkDialog: false,
         actionList: [
-          {name: '已卖出'},
-          {name: '下架'},
-          {name: '重新上架'},
-          {name: '编辑'},
+          {name: '已卖出', value: 1},
+          {name: '下架', value: 2},
+          {name: '重新上架', value: 3},
+          {name: '编辑', value: 4},
         ],
         isShowActionDialog: false,
         replyId: '',
@@ -291,6 +291,8 @@
       },
 
       confirmReportDialog() {
+        if(!this.reportForm.reason) return this.$toast('请输入举报原因');
+
         this.$api.postJson('/reportGoods/report', {
           goodsId: this.id,
           reportNote: this.reportForm.reason,
@@ -301,8 +303,33 @@
         })
       },
 
-      selectAction() {
-        if(!this.reportForm.reason) return this.$toast('请输入举报原因');
+      selectAction(e) {
+        // 已卖出/下架
+        if(e.value === 1 || e.value === 2) {
+          this.$modal({
+            content: `确定要${e.name}吗?`
+          }).then(() => {
+            this.$api.post('/goods/upOrDel', {
+              id: this.id,
+              status: e.value === 1 ? 4 : 0,
+            }).then(res => {
+              this.$successToast();
+              this.getDetail();
+            })
+          }).catch(() => {})
+        }
+        // 重新上架
+        else if(e.value === 3) {
+          this.$navToPage({
+            url: `/pages/issue/index?goodsId=${this.id}&type=1`
+          })
+        }
+        // 编辑
+        else if(e.value === 4) {
+          this.$navToPage({
+            url: `/pages/issue/index?goodsId=${this.id}&type=2`
+          })
+        }
       }
     }
 

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

@@ -56,16 +56,16 @@
           <view class="left-location"><text class="iconfont icon-dingwei"></text>{{item.city}} {{item.area}}</view>
           <view class="right-stats">
             <view class="it">
-              <text class="iconfont icon-dianzan"></text>
-              <text class="text">2</text>
+              <text class="iconfont icon-liulan"></text>
+              <text class="text">{{item.visit || 0}}</text>
             </view>
             <view class="it">
-              <text class="iconfont icon-pinglun"></text>
-              <text class="text">2</text>
+              <text class="iconfont icon-dianzan"></text>
+              <text class="text">{{item.up || 0}}</text>
             </view>
             <view class="it">
-              <text class="iconfont icon-liulan"></text>
-              <text class="text">2</text>
+              <text class="iconfont icon-shoucang"></text>
+              <text class="text">{{item.collectNum || 0}}</text>
             </view>
           </view>
         </view>

+ 5 - 3
src/pages/mine/myIssue/list.vue

@@ -32,7 +32,7 @@
             <image src="@/static/common/logo.png"></image>
             <view class="user">
               <view class="name">{{item.userName}}</view>
-              <view class="time">{{item.goodsCreateTime}}</view>
+              <view class="time">{{item.createTime | timeFilter}}发布</view>
             </view>
             <view class="status">{{item.status | statusFilter}}</view>
           </view>
@@ -45,9 +45,11 @@
             </view>
           </view>
           <view class="bottom">
-            <view class="left-location"><text class="iconfont icon-dingwei"></text>{{item.address}}</view>
+            <view class="left-location"><text class="iconfont icon-dingwei"></text>{{item.city}} {{item.area}}</view>
             <view class="right-btn" @tap.stop>
-              <u-button text="确认发货" shape="circle" @click="openDeliver(item.id)"></u-button>
+              <block v-if="item.status === 4">
+                <u-button text="确认发货" shape="circle" @click="openDeliver(item.id)"></u-button>
+              </block>
             </view>
           </view>
         </view>

+ 1 - 0
src/styles/common.scss

@@ -63,6 +63,7 @@
       }
       .price {
         color: $assist-color;
+        font-weight: 500;
       }
     }
     .title {