storeBelieveInLight преди 1 година
родител
ревизия
7966f6eaa1

+ 5 - 4
commit/request.js

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

+ 3 - 3
manifest.json

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

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

@@ -3,57 +3,88 @@
3
     <!-- 差评标签和评分 -->
3
     <!-- 差评标签和评分 -->
4
     <view class="top-info">
4
     <view class="top-info">
5
       <text class="bad-comment">差评</text>
5
       <text class="bad-comment">差评</text>
6
-      <text class="score">商品评分{{score}}★</text>
6
+      <text class="score">商品评分{{ score }}★</text>
7
     </view>
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
     </view>
15
     </view>
12
     <!-- 图片展示,这里假设图片数组为imgList -->
16
     <!-- 图片展示,这里假设图片数组为imgList -->
13
     <view class="img-list">
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
     </view>
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
       </view>
36
       </view>
23
     </view>
37
     </view>
24
-   </view>
25
     <!-- 操作按钮 -->
38
     <!-- 操作按钮 -->
26
     <view class="action-buttons">
39
     <view class="action-buttons">
27
       <!-- <button class="order-btn">查看订单</button> -->
40
       <!-- <button class="order-btn">查看订单</button> -->
28
-      <button class="reply-btn">回复评论</button>
41
+      <button class="reply-btn" @click="replyHandler">回复评论</button>
29
     </view>
42
     </view>
43
+    <ReplyModal ref="ReplyRefs"></ReplyModal>
30
   </view>
44
   </view>
31
 </template>
45
 </template>
32
 <script>
46
 <script>
47
+import ReplyModal from "./ReplyModal.vue";
33
 export default {
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
   data() {
60
   data() {
35
     return {
61
     return {
36
       score: 1, // 假设差评情况下的评分,可根据实际逻辑调整
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
       productList: [
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
 </script>
88
 </script>
58
 
89
 
59
 <style lang="scss" scoped>
90
 <style lang="scss" scoped>
@@ -61,7 +92,7 @@ export default {
61
   background-color: #fff;
92
   background-color: #fff;
62
   border-radius: 10rpx;
93
   border-radius: 10rpx;
63
   box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
94
   box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
64
-//   margin: 15rpx;
95
+  //   margin: 15rpx;
65
   padding: 15rpx;
96
   padding: 15rpx;
66
   width: calc(100% - 30rpx);
97
   width: calc(100% - 30rpx);
67
 }
98
 }
@@ -101,18 +132,17 @@ export default {
101
   margin-right: 10rpx;
132
   margin-right: 10rpx;
102
   margin-bottom: 10rpx;
133
   margin-bottom: 10rpx;
103
 }
134
 }
104
-.product-info-content{
105
- background: #f3f5f7;
135
+.product-info-content {
136
+  background: #f3f5f7;
106
   border-radius: 10rpx;
137
   border-radius: 10rpx;
107
   padding: 10rpx 15rpx;
138
   padding: 10rpx 15rpx;
108
 }
139
 }
109
 .product-info-list {
140
 .product-info-list {
110
   display: flex;
141
   display: flex;
111
-//   align-items: center;
142
+  //   align-items: center;
112
   padding-bottom: 12rpx;
143
   padding-bottom: 12rpx;
113
   padding-top: 12rpx;
144
   padding-top: 12rpx;
114
   font-size: 26rpx;
145
   font-size: 26rpx;
115
- 
116
 }
146
 }
117
 
147
 
118
 .product-img {
148
 .product-img {
@@ -134,12 +164,10 @@ export default {
134
 .order-btn,
164
 .order-btn,
135
 .reply-btn {
165
 .reply-btn {
136
   flex: 1;
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
   margin-right: 0rpx;
171
   margin-right: 0rpx;
143
 }
172
 }
144
-    
145
 </style>
173
 </style>

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

@@ -20,7 +20,11 @@ export default {
20
       this.$refs.popup.open()
20
       this.$refs.popup.open()
21
     },
21
     },
22
     submit() {
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
       this.$refs.popup.close()
28
       this.$refs.popup.close()
25
     }
29
     }
26
   }
30
   }

+ 16 - 10
shop/productManagementModule/productevaluation.vue

@@ -12,7 +12,14 @@
12
     </view>
12
     </view>
13
 
13
 
14
     <view class="product-pingjia-content--list">
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
       <view
23
       <view
17
         class=""
24
         class=""
18
         v-if="tihsi == 0"
25
         v-if="tihsi == 0"
@@ -21,7 +28,7 @@
21
         —— 已经到最底部了哦 ——
28
         —— 已经到最底部了哦 ——
22
       </view>
29
       </view>
23
     </view>
30
     </view>
24
-    <!-- <ReplyModal ref="ReplyRefs"></ReplyModal> -->
31
+   
25
   </view>
32
   </view>
26
 </template>
33
 </template>
27
 
34
 
@@ -29,18 +36,18 @@
29
 //评价
36
 //评价
30
 import headersVue from "../components/headers/headers.vue";
37
 import headersVue from "../components/headers/headers.vue";
31
 import searchVue from "./components/search/search.vue";
38
 import searchVue from "./components/search/search.vue";
32
-import ReplyModal from "./components/productEvaluation/ReplyModal.vue"
39
+
33
 import ProductEvaluationItem from "./components/productEvaluation/ProductEvaluationItem.vue";
40
 import ProductEvaluationItem from "./components/productEvaluation/ProductEvaluationItem.vue";
34
 export default {
41
 export default {
35
   components: {
42
   components: {
36
     headersVue,
43
     headersVue,
37
     searchVue,
44
     searchVue,
38
     ProductEvaluationItem,
45
     ProductEvaluationItem,
39
-    ReplyModal
40
   },
46
   },
41
   data() {
47
   data() {
42
     return {
48
     return {
43
-        tihsi:""
49
+      tihsi: "",
50
+      listReplyData: [{}, {}, {}, {}],
44
     };
51
     };
45
   },
52
   },
46
   onPullDownRefresh() {},
53
   onPullDownRefresh() {},
@@ -55,10 +62,9 @@ export default {
55
   },
62
   },
56
   methods: {
63
   methods: {
57
     search(val) {},
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
     overflow: auto;
117
     overflow: auto;
112
   }
118
   }
113
 }
119
 }
114
-.mb-26{
115
-    margin-bottom: 26rpx;
120
+.mb-26 {
121
+  margin-bottom: 26rpx;
116
 }
122
 }
117
 </style>
123
 </style>