storeBelieveInLight 1 anno fa
parent
commit
9a367154be

+ 32 - 0
commit/product.js

@@ -0,0 +1,32 @@
1
+
2
+import {
3
+    myRequest
4
+} from './request.js'
5
+
6
+
7
+const pre = ""
8
+const apiType = "php"
9
+/**
10
+ * 获取供应链tab
11
+ */
12
+export function getSupplyChainTab(data) {
13
+    return myRequest({
14
+        url: `${pre}mer/store/product/gong_lst_filter`,
15
+         method: 'GET',
16
+             data,
17
+             apiType
18
+    })
19
+    
20
+}
21
+/**
22
+ * 获取供应链tab
23
+ */
24
+export function getSupplyChainTab(data) {
25
+    return myRequest({
26
+        url: `${pre}mer/store/product/gong_lst_filter`,
27
+        method: 'GET',
28
+        data,
29
+        apiType
30
+    })
31
+
32
+}

+ 5 - 2
commit/request.js

@@ -30,9 +30,9 @@ let bas = Base64.encode(jmi + "," + Fzitem)
30 30
 export const myRequest = (options) => {
31 31
 	return new Promise((resolve, reject) => {
32 32
 		 if(options.apiType === 'php'){
33
-			baseURL = 'http://testshop.hxxfb.com/'
33
+			baseURL = '/'
34 34
 			// baseURL = '/'
35
-			// console.log('url = ',baseURL + options.url,"PHP")
35
+			console.log('url = ',baseURL + options.url,"PHP")
36 36
 		 }
37 37
 		uni.request({
38 38
 			url: baseURL + options.url, //接口地址:前缀+方法中传入的地址 
@@ -40,7 +40,10 @@ export const myRequest = (options) => {
40 40
 			data: options.data || {}, //传递参数:传入的参数或者默认传递空集合 
41 41
 			header: {
42 42
 				// 'Content-Type': 'application/x-www-form-urlencoded',
43
+				"Content-Type":"application/json; charset=utf-8",
43 44
 				'X-token': uni.getStorageSync('authorization'), //请求头信息
45
+				// "Access-Control-Allow-Methods":"GET,POST,PATCH,PUT,DELETE,OPTIONS,DELETE",
46
+				// "Access-Control-Allow-Headers":"	X-Token, user-token, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With",
44 47
 				// 'X-token':'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuaHh4ZmIuY29tIiwiYXVkIjoiYXBpLmh4eGZiLmNvbSIsImlhdCI6MTczOTk2NDIxMiwibmJmIjoxNzM5OTY0MjEyLCJleHAiOjE3NTA3NjQyMTIsImp0aSI6WzM1OSwibWVyIl19.IX8wt8Fc05VgshXbUFTusGag4KD__teryi13L-QrJQM',
45 48
 				'volunteerdes': bas // DES+B64加密 
46 49
 			},

+ 16 - 7
manifest.json

@@ -104,13 +104,22 @@
104 104
               // 	"^/gateway": ""
105 105
               // }
106 106
               // 自行修改下方的 /api
107
-              "/api": {
108
-                "target": "https://testapi.hxxfb.com",
109
-                "pathRewirte": {
110
-                  //路径重写
111
-                  "^/api": "/"
112
-                }
113
-              },
107
+    //           "/api": {
108
+    //             "target": "http://shop.hxxfb.com/",
109
+				// "changeOrigin": true,
110
+    //             "pathRewirte": {
111
+    //               //路径重写
112
+    //               "^/api": "/"
113
+    //             }
114
+    //           },
115
+			  "/mer":{
116
+				  "target": "http://testshop.hxxfb.com/",
117
+				  "changeOrigin": true,
118
+				  "pathRewirte": {
119
+				    //路径重写
120
+				    "^/mer": "/mer"
121
+				  }
122
+			  },
114 123
               "/gateway/api": {
115 124
                 "target": "http://testapi.hxxfb.com",
116 125
                 "pathRewirte": {

+ 63 - 58
pages/ordermanagement/index.vue

@@ -70,11 +70,11 @@
70 70
           class="ordermanagement-yisdf"
71 71
           v-for="(item, index) in dingdansss"
72 72
           :key="index + 'pp' + '__index__'"
73
-          @click="afterSalesClick(item.status, index+1)"
73
+          @click="afterSalesClick(item.status, index + 1)"
74 74
         >
75 75
           <view class="ordermanagement-img">
76 76
             <image :src="item.img" mode="widthFix"></image>
77
-             <view class="ordermanagement-img-biao" v-if="item.num > 0">
77
+            <view class="ordermanagement-img-biao" v-if="item.num > 0">
78 78
               {{ item.num }}
79 79
             </view>
80 80
           </view>
@@ -139,34 +139,40 @@ export default {
139 139
         {
140 140
           img: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812154932244.png",
141 141
           name: "审核中",
142
-          status:0,
143
-          num:0,
142
+          status: 0,
143
+          num: 0,
144 144
         },
145 145
         {
146 146
           img: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812154949118.png",
147 147
           name: "处理中",
148
-          num:0,
149
-           status:2,
148
+          num: 0,
149
+          status: 2,
150 150
         },
151 151
         {
152 152
           img: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812155008586.png",
153 153
           name: "已完成",
154
-          num:0,
155
-           status:3,
154
+          num: 0,
155
+          status: 3,
156 156
         },
157 157
       ],
158 158
     };
159 159
   },
160 160
   onLoad() {},
161 161
   async onShow() {
162
-    uni.showLoading({
163
-      title: "加载中",
164
-    });
162
+   
165 163
     let selectmerchant = uni.getStorageSync("selectmerchant");
166 164
     this.mer_id = selectmerchant.merId;
167
-    await this.getOrderListData();
168
-    await this.getOrderStatusNumberData();
169
-    await this.getAfterSaleListData()
165
+      uni.showLoading({
166
+      title: "加载中",
167
+    });
168
+    try {
169
+     
170
+      await this.getOrderListData();
171
+      await this.getOrderStatusNumberData();
172
+      await this.getAfterSaleListData();
173
+    } finally {
174
+      uni.hideLoading();
175
+    }
170 176
   },
171 177
   methods: {
172 178
     //售后管理
@@ -211,9 +217,10 @@ export default {
211 217
             this.orderSta[obj[item.name]] = item.count || undefined;
212 218
           });
213 219
         }
214
-      } catch (error) {}finally{
215
-		  uni.hideLoading()
216
-	  }
220
+      } catch (error) {
221
+      } finally {
222
+        // uni.hideLoading();
223
+      }
217 224
     },
218 225
 
219 226
     // 正向订单状态数
@@ -262,11 +269,11 @@ export default {
262 269
                 status: 4,
263 270
               },
264 271
             ];
265
-            uni.hideLoading();
272
+            // uni.hideLoading();
266 273
           }
267 274
         },
268 275
         (fail) => {
269
-			uni.hideLoading()
276
+          // uni.hideLoading();
270 277
           console.log(fail);
271 278
         }
272 279
       );
@@ -283,23 +290,23 @@ export default {
283 290
           order_sn: "",
284 291
           refund_type: "",
285 292
         });
286
-       
287
-        if(res.data.status == 200){
288
-          const data = res.data.data.stat
289
-           var num = data.refuse;
290
-          var num1 = data.end;
291
-          var num2 =data.agree;
292 293
 
294
+        if (res.data.status == 200) {
295
+          const data = res.data.data.stat;
296
+          var num = data.refuse;
297
+          var num1 = data.end;
298
+          var num2 = data.agree;
293 299
 
294
-       let finishOrder = num + num1 + num2;
295
-          this.dingdansss[0].num =data.audit || 0
296
-          this.dingdansss[1].num = data.backgood || 0
297
-          this.dingdansss[2].num = finishOrder || 0
300
+          let finishOrder = num + num1 + num2;
301
+          this.dingdansss[0].num = data.audit || 0;
302
+          this.dingdansss[1].num = data.backgood || 0;
303
+          this.dingdansss[2].num = finishOrder || 0;
298 304
         }
299
-        uni.hideLoading();
300
-      } catch (error) {}finally{
301
-		  uni.hideLoading()
302
-	  }
305
+        // uni.hideLoading();
306
+      } catch (error) {
307
+      } finally {
308
+        // uni.hideLoading();
309
+      }
303 310
     },
304 311
     jiru(e, i) {
305 312
       let authorization = uni.getStorageSync("authorization");
@@ -483,37 +490,35 @@ page {
483 490
         font-size: 24rpx;
484 491
         font-weight: 400;
485 492
         color: #5f6060;
486
-
487
-      
488 493
       }
489 494
     }
490 495
   }
491 496
   .ordermanagement-img {
492
-          width: 48rpx;
493
-          height: 48rpx;
494
-          position: relative;
497
+    width: 48rpx;
498
+    height: 48rpx;
499
+    position: relative;
495 500
 
496
-          image {
497
-            width: 100%;
498
-            height: 100%;
499
-          }
501
+    image {
502
+      width: 100%;
503
+      height: 100%;
504
+    }
500 505
 
501
-          .ordermanagement-img-biao {
502
-            position: absolute;
503
-            left: 40rpx;
504
-            bottom: 31rpx;
505
-            width: 30rpx;
506
-            height: 30rpx;
507
-            border-radius: 50%;
508
-            background: #fe0032;
509
-            font-size: 20rpx;
510
-            font-weight: 400;
511
-            color: #ffffff;
512
-            display: flex;
513
-            justify-content: center;
514
-            align-items: center;
515
-          }
516
-        }
506
+    .ordermanagement-img-biao {
507
+      position: absolute;
508
+      left: 40rpx;
509
+      bottom: 31rpx;
510
+      width: 30rpx;
511
+      height: 30rpx;
512
+      border-radius: 50%;
513
+      background: #fe0032;
514
+      font-size: 20rpx;
515
+      font-weight: 400;
516
+      color: #ffffff;
517
+      display: flex;
518
+      justify-content: center;
519
+      align-items: center;
520
+    }
521
+  }
517 522
   .ordermanagement-dingsss {
518 523
     width: calc(100% - 52rpx);
519 524
     height: 216rpx;

+ 3 - 0
shop/productManagementModule/components/productEvaluation/ProductEvaluationItem.vue

@@ -81,6 +81,9 @@ export default {
81 81
   },
82 82
   methods: {
83 83
     replyHandler() {
84
+        this.$emit('handleReply',{
85
+
86
+        })
84 87
         this.$refs.ReplyRefs.open();
85 88
     },
86 89
   },

+ 73 - 18
shop/productManagementModule/components/productEvaluation/ReplyModal.vue

@@ -1,10 +1,23 @@
1 1
 <!-- components/ReplyModal.vue -->
2 2
 <template>
3
-  <uni-popup ref="popup">
3
+  <uni-popup ref="popup" :animation="true" :is-mask-click="false">
4
+   <view class="content">
5
+     <view class="popup_data__headers">
6
+      <view class="popup_data__headers--title">回复评论</view>
7
+      <uni-icons
8
+        type="closeempty"
9
+        class="custom_icons"
10
+        size="30"
11
+      
12
+
13
+        @click="handleClose"
14
+      ></uni-icons>
15
+    </view>
4 16
     <view class="reply-modal">
5
-      <textarea v-model="replyContent" placeholder="输入回复内容"/>
17
+      <textarea v-model="replyContent" placeholder="输入回复内容"   :maxlength="-1" :focus="true" cursor-color="#007aff"/>
6 18
       <button @click="submit">提交</button>
7 19
     </view>
20
+   </view>
8 21
   </uni-popup>
9 22
 </template>
10 23
 
@@ -12,44 +25,64 @@
12 25
 export default {
13 26
   data() {
14 27
     return {
15
-      replyContent: ''
16
-    }
28
+      replyContent: "",
29
+    };
17 30
   },
18 31
   methods: {
32
+    handleClose() {
33
+      this. close()
34
+    },
19 35
     open() {
20
-      this.$refs.popup.open()
36
+       uni.stopPullDownRefresh();
37
+      this.$refs.popup.open();
38
+    },
39
+    close() {
40
+      this.replyContent = "";
41
+      this.$refs.popup.close();
21 42
     },
22 43
     submit() {
44
+      if(!this.replyContent) {
45
+        uni.showToast({
46
+          title: '请输入回复内容',
47
+          icon: 'none'
48
+        })
49
+        return
50
+      }
23 51
       // this.$emit('submit', {
24 52
       //   content: this.replyContent,
25 53
       //   index: this.index,
26 54
       //   item: this.item
27 55
       // })
28
-      this.$refs.popup.close()
29
-    }
30
-  }
31
-}
56
+      // this.$refs.popup.close();
57
+    },
58
+  },
59
+};
32 60
 </script>
33 61
 
34 62
 <style lang="scss" scoped>
35
-.reply-modal {
36
-  width: 680rpx;
63
+.content{
64
+  // width: 680rpx;
65
+  width: 600rpx;
37 66
   background: #fff;
38 67
   border-radius: 24rpx;
39
-  padding: 40rpx;
40
-  
68
+  padding: 30rpx 40rpx 40rpx;
69
+}
70
+.reply-modal {
71
+
72
+
41 73
   textarea {
42
-    width: 100%;
43
-    height: 240rpx;
74
+    width: calc(100% - 48rpx);
75
+    min-height: 240rpx;
76
+    max-height: 640rpx;
44 77
     background: #f8f8f8;
45 78
     border-radius: 12rpx;
46 79
     padding: 24rpx;
47 80
     font-size: 28rpx;
48 81
     margin-bottom: 40rpx;
49 82
   }
50
-  
83
+
51 84
   button {
52
-    background: #007AFF;
85
+    background: #007aff;
53 86
     color: white;
54 87
     height: 88rpx;
55 88
     line-height: 88rpx;
@@ -60,9 +93,31 @@ export default {
60 93
 
61 94
 /* 覆盖uni-popup默认样式 */
62 95
 /deep/ .uni-popup__wrapper {
63
-  background: rgba(0,0,0,0.5);
96
+  background: rgba(0, 0, 0, 0.5);
64 97
   display: flex;
65 98
   align-items: center;
66 99
   justify-content: center;
67 100
 }
101
+.popup_data__headers {
102
+    // height: 40rpx;
103
+    display: flex;
104
+    justify-content: space-between;
105
+    align-items: center;
106
+    // border-bottom: 2rpx solid #e5e5e5;
107
+    padding-bottom: 20rpx;
108
+    &--title {
109
+      flex: 1;
110
+      display: -webkit-box;
111
+      -webkit-box-orient: vertical;
112
+      -webkit-line-clamp: 1;
113
+      overflow: hidden;
114
+      justify-content: space-between;
115
+      padding-right: 60rpx;
116
+      font-size: 32rpx;
117
+      font-weight: 600;
118
+    }
119
+    .custom_icons {
120
+      flex-shrink: 0;
121
+    }
122
+  }
68 123
 </style>

+ 11 - 3
shop/productManagementModule/productevaluation.vue

@@ -13,7 +13,7 @@
13 13
 
14 14
     <view class="product-pingjia-content--list">
15 15
       <ProductEvaluationItem
16
-        @reply="ReplyHandler"
16
+        @handleReply="ReplyHandler"
17 17
         v-for="(item, index) in listReplyData"
18 18
         :index="index"
19 19
         :item="item"
@@ -48,9 +48,13 @@ export default {
48 48
     return {
49 49
       tihsi: "",
50 50
       listReplyData: [{}, {}, {}, {}],
51
+      isFullResh:true
51 52
     };
52 53
   },
53
-  onPullDownRefresh() {},
54
+  onPullDownRefresh() {
55
+ console.log(this.isFullResh,"this.isFullResh")
56
+   
57
+  },
54 58
   onReachBottom() {
55 59
     console.log("onReachBottom");
56 60
     // if (this.is_panudn == true) {
@@ -64,7 +68,11 @@ export default {
64 68
     search(val) {},
65 69
 
66 70
     ReplyHandler(item) {
67
-      this.ReplyRefs.open(item);
71
+        console.log(item);
72
+     uni.stopPullDownRefresh()
73
+    },
74
+    headerJump(){
75
+        uni.switchTab({ url: './index' })
68 76
     },
69 77
   },
70 78
 };