ソースを参照

fix:java接口代理

storeBelieveInLight 1 年間 前
コミット
7966f6eaa1

+ 5 - 4
commit/request.js

@@ -5,10 +5,11 @@ var baseURL = 'https://api.hxxfb.com/gateway/' // API访问的地址
5 5
  }else if(is==2){
6 6
 	 // baseURL = 'https://api.hebeiyhc.com/gateway/'; //生产环境
7 7
 	 // baseURL = 'https://api.hebeiyhc.com/gateway/'; //生产环境
8
-	   baseURL = 'http://api.hxxfb.com/gateway/'; //预生产环境
8
+	   // baseURL = 'https://testapi.hxxfb.com/gateway/'; //预生产环境
9
+	   baseURL = '/gateway/'; //预生产环境
9 10
 	
10 11
  }else{
11
-	  baseURL = 'http://api.hxxfb.com/gateway/'; //预生产环境
12
+	  baseURL = 'https://api.hxxfb.com/gateway/'; //预生产环境
12 13
  }
13 14
 let token = ''; // 用户的token
14 15
 let volunteerToken = ''; // DES+B64加密
@@ -29,7 +30,7 @@ let bas = Base64.encode(jmi + "," + Fzitem)
29 30
 export const myRequest = (options) => {
30 31
 	return new Promise((resolve, reject) => {
31 32
 		 if(options.apiType === 'php'){
32
-			baseURL = 'https://shop.hxxfb.com/'
33
+			baseURL = 'http://testshop.hxxfb.com/'
33 34
 			// baseURL = '/'
34 35
 			// console.log('url = ',baseURL + options.url,"PHP")
35 36
 		 }
@@ -41,7 +42,7 @@ export const myRequest = (options) => {
41 42
 				// 'Content-Type': 'application/x-www-form-urlencoded',
42 43
 				'X-token': uni.getStorageSync('authorization'), //请求头信息
43 44
 				// 'X-token':'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuaHh4ZmIuY29tIiwiYXVkIjoiYXBpLmh4eGZiLmNvbSIsImlhdCI6MTczOTk2NDIxMiwibmJmIjoxNzM5OTY0MjEyLCJleHAiOjE3NTA3NjQyMTIsImp0aSI6WzM1OSwibWVyIl19.IX8wt8Fc05VgshXbUFTusGag4KD__teryi13L-QrJQM',
44
-				// 'volunteerdes': bas // DES+B64加密 
45
+				'volunteerdes': bas // DES+B64加密 
45 46
 			},
46 47
 
47 48
 			success: (res) => {

+ 3 - 3
manifest.json

@@ -90,7 +90,7 @@
90 90
               // 自行修改下方的 /web
91 91
               "/gateway": {
92 92
                 // "secure": false,
93
-                "target": "https://api.hxxfb.com",
93
+                "target": "https://testapi.hxxfb.com",
94 94
                 "pathRewirte": {
95 95
                   //路径重写
96 96
                   "^/gateway": "/gateway"
@@ -105,14 +105,14 @@
105 105
               // }
106 106
               // 自行修改下方的 /api
107 107
               "/api": {
108
-                "target": "https://api.hxxfb.com",
108
+                "target": "https://testapi.hxxfb.com",
109 109
                 "pathRewirte": {
110 110
                   //路径重写
111 111
                   "^/api": "/"
112 112
                 }
113 113
               },
114 114
               "/gateway/api": {
115
-                "target": "http://api.hxxfb.com",
115
+                "target": "http://testapi.hxxfb.com",
116 116
                 "pathRewirte": {
117 117
                   //路径重写
118 118
                   "^/api": "/"

+ 62 - 34
shop/productManagementModule/components/productEvaluation/ProductEvaluationItem.vue

@@ -3,57 +3,88 @@
3 3
     <!-- 差评标签和评分 -->
4 4
     <view class="top-info">
5 5
       <text class="bad-comment">差评</text>
6
-      <text class="score">商品评分{{score}}★</text>
6
+      <text class="score">商品评分{{ score }}★</text>
7 7
     </view>
8 8
     <!-- 遍历展示每条差评内容 -->
9
-    <view class="comment-content" v-for="(subComment, index) in commentList" :key="index">
10
-      <text>{{subComment}}</text>
9
+    <view
10
+      class="comment-content"
11
+      v-for="(subComment, index) in commentList"
12
+      :key="index"
13
+    >
14
+      <text>{{ subComment }}</text>
11 15
     </view>
12 16
     <!-- 图片展示,这里假设图片数组为imgList -->
13 17
     <view class="img-list">
14
-      <image v-for="(img, index) in imgList" :key="index" :src="img" mode="aspectFill"></image>
18
+      <image
19
+        v-for="(img, index) in imgList"
20
+        :key="index"
21
+        :src="img"
22
+        mode="aspectFill"
23
+      ></image>
15 24
     </view>
16 25
     <!-- 遍历展示产品信息数组 -->
17
-   <view class="product-info-content">
18
-     <view class="product-info-list" v-for="(product, index) in productList" :key="index">
19
-      <image class="product-img" :src="product.img" mode="aspectFill"></image>
20
-      <view class="product-detail">
21
-        <text>{{product.detail}}</text>
26
+    <view class="product-info-content">
27
+      <view
28
+        class="product-info-list"
29
+        v-for="(product, index) in productList"
30
+        :key="index"
31
+      >
32
+        <image class="product-img" :src="product.img" mode="aspectFill"></image>
33
+        <view class="product-detail">
34
+          <text>{{ product.detail }}</text>
35
+        </view>
22 36
       </view>
23 37
     </view>
24
-   </view>
25 38
     <!-- 操作按钮 -->
26 39
     <view class="action-buttons">
27 40
       <!-- <button class="order-btn">查看订单</button> -->
28
-      <button class="reply-btn">回复评论</button>
41
+      <button class="reply-btn" @click="replyHandler">回复评论</button>
29 42
     </view>
43
+    <ReplyModal ref="ReplyRefs"></ReplyModal>
30 44
   </view>
31 45
 </template>
32 46
 <script>
47
+import ReplyModal from "./ReplyModal.vue";
33 48
 export default {
49
+  components: { ReplyModal },
50
+  props: {
51
+    item: {
52
+      type: Object,
53
+      default: () => {},
54
+    },
55
+  },
56
+  index: {
57
+    type: Number,
58
+    default: 0,
59
+  },
34 60
   data() {
35 61
     return {
36 62
       score: 1, // 假设差评情况下的评分,可根据实际逻辑调整
37
-      commentList: [
38
-        '包装破损', 
39
-        '物流速度极慢', 
40
-        '与描述不符'
41
-      ], // 差评信息数组,可从后端获取
42
-      imgList: ['/static/images/new_ui/delivery_man_dialog.png', '/static/images/new_ui/delivery_man_dialog.png'], // 图片地址数组,需替换为实际地址
63
+      commentList: ["包装破损", "物流速度极慢", "与描述不符"], // 差评信息数组,可从后端获取
64
+      imgList: [
65
+        "/static/images/new_ui/delivery_man_dialog.png",
66
+        "/static/images/new_ui/delivery_man_dialog.png",
67
+      ], // 图片地址数组,需替换为实际地址
43 68
       productList: [
44 69
         {
45
-          img: '/static/images/new_ui/qcode.png',
46
-          detail: '【直播现装】DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款'
70
+          img: "/static/images/new_ui/qcode.png",
71
+          detail:
72
+            "【直播现装】DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款",
47 73
         },
48 74
         {
49
-          img: '/static/logo.png',
50
-          detail: '小瓶子混装DIY 女孩玩具夜光大白DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款'
51
-        }
52
-      ] // 产品信息数组,包含图片和详细信息
75
+          img: "/static/logo.png",
76
+          detail:
77
+            "小瓶子混装DIY 女孩玩具夜光大白DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款DIY配件多种夜光款",
78
+        },
79
+      ], // 产品信息数组,包含图片和详细信息
53 80
     };
54 81
   },
82
+  methods: {
83
+    replyHandler() {
84
+        this.$refs.ReplyRefs.open();
85
+    },
86
+  },
55 87
 };
56
-
57 88
 </script>
58 89
 
59 90
 <style lang="scss" scoped>
@@ -61,7 +92,7 @@ export default {
61 92
   background-color: #fff;
62 93
   border-radius: 10rpx;
63 94
   box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
64
-//   margin: 15rpx;
95
+  //   margin: 15rpx;
65 96
   padding: 15rpx;
66 97
   width: calc(100% - 30rpx);
67 98
 }
@@ -101,18 +132,17 @@ export default {
101 132
   margin-right: 10rpx;
102 133
   margin-bottom: 10rpx;
103 134
 }
104
-.product-info-content{
105
- background: #f3f5f7;
135
+.product-info-content {
136
+  background: #f3f5f7;
106 137
   border-radius: 10rpx;
107 138
   padding: 10rpx 15rpx;
108 139
 }
109 140
 .product-info-list {
110 141
   display: flex;
111
-//   align-items: center;
142
+  //   align-items: center;
112 143
   padding-bottom: 12rpx;
113 144
   padding-top: 12rpx;
114 145
   font-size: 26rpx;
115
- 
116 146
 }
117 147
 
118 148
 .product-img {
@@ -134,12 +164,10 @@ export default {
134 164
 .order-btn,
135 165
 .reply-btn {
136 166
   flex: 1;
137
- 
138 167
 }
139
-.reply-btn{
140
- background: #187fdf;
141
- color: #fff;
168
+.reply-btn {
169
+  background: #187fdf;
170
+  color: #fff;
142 171
   margin-right: 0rpx;
143 172
 }
144
-    
145 173
 </style>

+ 5 - 1
shop/productManagementModule/components/productEvaluation/ReplyModal.vue

@@ -20,7 +20,11 @@ export default {
20 20
       this.$refs.popup.open()
21 21
     },
22 22
     submit() {
23
-      this.$emit('submit', this.replyContent)
23
+      // this.$emit('submit', {
24
+      //   content: this.replyContent,
25
+      //   index: this.index,
26
+      //   item: this.item
27
+      // })
24 28
       this.$refs.popup.close()
25 29
     }
26 30
   }

+ 16 - 10
shop/productManagementModule/productevaluation.vue

@@ -12,7 +12,14 @@
12 12
     </view>
13 13
 
14 14
     <view class="product-pingjia-content--list">
15
-      <ProductEvaluationItem  @reply="ReplyHandler" v-for="item in 10" :key="item" class="mb-26"/>
15
+      <ProductEvaluationItem
16
+        @reply="ReplyHandler"
17
+        v-for="(item, index) in listReplyData"
18
+        :index="index"
19
+        :item="item"
20
+        :key="index + '_index_'"
21
+        class="mb-26"
22
+      />
16 23
       <view
17 24
         class=""
18 25
         v-if="tihsi == 0"
@@ -21,7 +28,7 @@
21 28
         —— 已经到最底部了哦 ——
22 29
       </view>
23 30
     </view>
24
-    <!-- <ReplyModal ref="ReplyRefs"></ReplyModal> -->
31
+   
25 32
   </view>
26 33
 </template>
27 34
 
@@ -29,18 +36,18 @@
29 36
 //评价
30 37
 import headersVue from "../components/headers/headers.vue";
31 38
 import searchVue from "./components/search/search.vue";
32
-import ReplyModal from "./components/productEvaluation/ReplyModal.vue"
39
+
33 40
 import ProductEvaluationItem from "./components/productEvaluation/ProductEvaluationItem.vue";
34 41
 export default {
35 42
   components: {
36 43
     headersVue,
37 44
     searchVue,
38 45
     ProductEvaluationItem,
39
-    ReplyModal
40 46
   },
41 47
   data() {
42 48
     return {
43
-        tihsi:""
49
+      tihsi: "",
50
+      listReplyData: [{}, {}, {}, {}],
44 51
     };
45 52
   },
46 53
   onPullDownRefresh() {},
@@ -55,10 +62,9 @@ export default {
55 62
   },
56 63
   methods: {
57 64
     search(val) {},
58
-    
59
-    ReplyHandler(item){
60
-        this.ReplyRefs.open(item)
61 65
 
66
+    ReplyHandler(item) {
67
+      this.ReplyRefs.open(item);
62 68
     },
63 69
   },
64 70
 };
@@ -111,7 +117,7 @@ page {
111 117
     overflow: auto;
112 118
   }
113 119
 }
114
-.mb-26{
115
-    margin-bottom: 26rpx;
120
+.mb-26 {
121
+  margin-bottom: 26rpx;
116 122
 }
117 123
 </style>