storeBelieveInLight пре 1 година
родитељ
комит
b5fa6fdef5

+ 272 - 0
shop/commodity/components/deliveryManModules/addSelectUser.vue

@@ -0,0 +1,272 @@
1
+<template>
2
+	<uni-popup ref="popup" type="center" :animation="true" :is-mask-click="false" class="popup-conter">
3
+	
4
+	
5
+	
6
+		<view class="popup_data__user">
7
+	
8
+	
9
+	
10
+			<view class="popup_data__user__headers">
11
+	
12
+	
13
+	
14
+				<image src="/static/images/new_ui/delivery_man_dialog.png" mode="" class="image-box"></image>
15
+	
16
+	
17
+	
18
+				<view class="title">
19
+	
20
+	
21
+	
22
+					{{ title }}
23
+	
24
+	
25
+	
26
+				</view>
27
+	
28
+	
29
+	
30
+			</view>
31
+	
32
+	
33
+	
34
+			<view class="popup_data__user__content">
35
+	
36
+	
37
+	
38
+				<view class="form-list">
39
+	
40
+	
41
+	
42
+					<view class="form-list__item">
43
+	
44
+	
45
+	
46
+						<view class="form-list__item--label">姓 名 </view>
47
+	
48
+	
49
+	
50
+						<view class="form-list__item--value">
51
+	
52
+	
53
+	
54
+							<input placeholder="请输入送货人姓名" :class="['input__custom',isUserName?'ishasValue':'']" v-model="user_name"></input>
55
+	
56
+	
57
+	
58
+						</view>
59
+	
60
+	
61
+	
62
+					</view>
63
+	
64
+	
65
+	
66
+					<view class="form-list__item">
67
+	
68
+	
69
+	
70
+						<view class="form-list__item--label">手机号</view>
71
+	
72
+	
73
+	
74
+						<view class="form-list__item--value">
75
+	
76
+	
77
+	
78
+							<input placeholder="请输入11位手机号" type="tel" :class="['input__custom',isPhoneValue?'ishasValue':'']" v-model="user_phone"></input>
79
+	
80
+	
81
+	
82
+						</view>
83
+	
84
+	
85
+	
86
+					</view>
87
+	
88
+	
89
+	
90
+					<view class="form-list__item" :class="[(isPhoneValue && isUserName) ?'isActiveBtn':'']">
91
+	
92
+						<view class="form-list__item--btn">提交</view>
93
+	
94
+					</view>
95
+	
96
+					<view class="form-list__item no-bg" @click="handleClose">
97
+	
98
+						<view class="form-list__item--text">取消</view>
99
+	
100
+					</view>
101
+	
102
+				</view>
103
+	
104
+	
105
+	
106
+			</view>
107
+	
108
+	
109
+	
110
+		</view>
111
+	
112
+	
113
+	
114
+	</uni-popup>
115
+</template>
116
+
117
+<script>
118
+export default {
119
+  props: {
120
+    title: {
121
+      type: String,
122
+      default: "添加送货人",
123
+    },
124
+  },
125
+  data() {
126
+    return {
127
+      user_name: "",
128
+      user_phone: "",
129
+    };
130
+  },
131
+  methods: {
132
+    handleClose() {
133
+      this.user_name = "";
134
+      this.user_phone = "";
135
+      this.close();
136
+    },
137
+    open(type = "center") {
138
+      this.$refs.popup.open(type);
139
+    },
140
+    close() {
141
+      this.$refs.popup.close();
142
+    },
143
+    setDataValue(val) {
144
+      this.user_name = val.user_name;
145
+      this.user_phone = val.user_phone;
146
+    },
147
+  },
148
+  computed: {
149
+    isPhoneValue() {
150
+      const phone = this.user_phone || "";
151
+      if (String(phone).trim()) {
152
+        return true;
153
+      }
154
+      return false;
155
+    },
156
+    isUserName() {
157
+      const phone = this.user_name || "";
158
+      if (String(phone).trim()) {
159
+        return true;
160
+      }
161
+
162
+      return false;
163
+    },
164
+  },
165
+};
166
+</script>
167
+
168
+<style lang="scss" scoped>
169
+.popup-conter {
170
+  width: 100%;
171
+  /deep/.uni-popup__wrapper {
172
+    width: 100% !important;
173
+  }
174
+}
175
+
176
+.popup_data__user {
177
+  height: 598rpx; // width: 616rpx;
178
+  margin: 0 67rpx;
179
+  background: #ffffff;
180
+  border-radius: 16rpx;
181
+  &__headers {
182
+    position: relative;
183
+    width: 100%;
184
+    height: 136rpx;
185
+    .image-box {
186
+      width: 100%;
187
+      height: 100%;
188
+      border-radius: 16rpx 16rpx 0 0;
189
+    }
190
+    .title {
191
+      width: 100%;
192
+      height: 100%;
193
+      display: flex;
194
+      align-items: center;
195
+      justify-content: center;
196
+      position: absolute;
197
+      font-family: PingFangSC, PingFang SC;
198
+      font-weight: 600;
199
+      font-size: 32rpx;
200
+      top: 0;
201
+      left: 0;
202
+      color: #333333;
203
+    }
204
+  }
205
+  &__content {
206
+    padding: 24rpx 36rpx 35rpx 36rpx;
207
+    height: calc(100% - 210rpx);
208
+    .form-list {
209
+      &__item {
210
+        display: flex;
211
+        align-items: center;
212
+        justify-content: space-between;
213
+        width: 100%;
214
+        height: 86rpx;
215
+        background: #f5f7f9;
216
+        border-radius: 12rpx;
217
+        margin-bottom: 26rpx;
218
+        &.isActiveBtn {
219
+          background: #1f7cff !important;
220
+          transition: all 600ms;
221
+          .form-list__item--btn {
222
+            color: #ffffff !important;
223
+          }
224
+        }
225
+        &.no-bg {
226
+          background: none !important;
227
+          margin-bottom: 0 !important;
228
+        }
229
+        &--label {
230
+          display: flex;
231
+          align-items: center;
232
+          justify-content: center;
233
+          width: 160rpx;
234
+          height: 100%;
235
+          font-weight: 400;
236
+          font-size: 30rpx;
237
+          color: #666666;
238
+        }
239
+        &--value {
240
+          flex: 1;
241
+          display: flex;
242
+          align-items: center;
243
+          height: 100%;
244
+          .input__custom {
245
+            height: 100%;
246
+            width: 100%;
247
+            font-weight: 400;
248
+            font-size: 30rpx;
249
+            color: #666666;
250
+            padding: 0 16rpx;
251
+          }
252
+          .ishasValue {
253
+            color: #333333;
254
+          }
255
+        }
256
+        &--btn,
257
+        &--text {
258
+          user-select: none;
259
+          display: flex;
260
+          align-items: center;
261
+          justify-content: center;
262
+          width: 100%;
263
+          height: 100%;
264
+          font-weight: 400;
265
+          font-size: 30rpx;
266
+          color: #333333;
267
+        }
268
+      }
269
+    }
270
+  }
271
+}
272
+</style>

+ 44 - 0
shop/commodity/components/deliveryManModules/deliveryManEmpty.vue

@@ -0,0 +1,44 @@
1
+<template>
2
+  <view class="flex-col--empty">
3
+    <image class="image_wrapper" src="/static/images/new_ui/empty_user.png" />
4
+    <view class="text_tilte">{{ title }}</view>
5
+  </view>
6
+</template>
7
+
8
+<script>
9
+export default {
10
+  props: {
11
+    title: {
12
+      type: String,
13
+      default: "暂无送货人员",
14
+    },
15
+  },
16
+  data() {
17
+    return {};
18
+  },
19
+};
20
+</script>
21
+
22
+<style lang="scss">
23
+.flex-col--empty {
24
+  user-select: none;
25
+  text-align: center;
26
+  width: 100%;
27
+  position: absolute;
28
+  top: 30%;
29
+
30
+  .text_tilte {
31
+    font-family: PingFangSC, PingFang SC;
32
+    font-weight: 400;
33
+    font-size: 30rpx;
34
+    color: #333333;
35
+    line-height: 30rpx;
36
+    text-align: center;
37
+    font-style: normal;
38
+  }
39
+  .image_wrapper {
40
+    width: 327px;
41
+    height: 257px;
42
+  }
43
+}
44
+</style>

+ 1 - 1
shop/commodity/components/popupSelect.vue

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <uni-popup ref="popup" type="center" :animation="true" :mask-click="false">
2
+  <uni-popup ref="popup" type="center" :animation="true" :is-mask-click="false">
3 3
     <view class="popup_data">
4 4
       <view class="popup_data__headers">
5 5
         <view class="popup_data__headers--title">{{ title }}</view>

+ 219 - 4
shop/commodity/deliveryman.vue

@@ -1,19 +1,234 @@
1 1
 <template>
2 2
 	<view class="delivery-man">
3
-		选择送货人
3
+		 <headersVue @headerJump="topgi" header-title="选择送货人"></headersVue>
4
+	 <view class="delivery-man__content">
5
+		 <view class="delivery-man__list" v-if="userData.length===0">
6
+			 <view class="delivery-man__list--top">
7
+		    <template v-for="index in 5">
8
+				<view class="delivery-man__list--top-item">
9
+				<view class="delivery-man__list--top-item--left">
10
+					<label class="radio">
11
+					<radio value="1" checked="true" />
12
+					<text>配送人姓名1</text>
13
+					</label>
14
+				</view>
15
+				<view class="delivery-man__list--top-item--middle">
16
+					<view class="user-phone">
17
+						15000000000
18
+					</view>
19
+					</view>
20
+				
21
+				<view class="delivery-man__list--top-item--right">
22
+				 
23
+				  <view class="user-icon">
24
+				  	<uni-icons type="compose" size="28" @click="handleAddUser('edit',index)"></uni-icons>
25
+				  	<uni-icons type="trash" size="28"></uni-icons>
26
+
27
+				  </view>
28
+				</view>
29
+				</view>
30
+			</template>
31
+						
32
+			 </view>
33
+			 <view class="delivery-man__list--bottom">
34
+			 			<view class="btn-list">
35
+							<button
36
+							 @click="handleAddUser('add')"
37
+							  class="btn-default"
38
+							>
39
+							 添加送货人
40
+							</button>
41
+							<button
42
+							  type="primary"
43
+							  class="btn-primary"
44
+							  @click="handleConfirm"
45
+							>
46
+							确  认
47
+							</button>
48
+			 				
49
+			 			</view>
50
+			 </view>
51
+		 </view>
52
+		<view class="empty__info" v-else>
53
+			<deliveryManEmptyVue />
54
+			<view class="delivery-man_btn">
55
+				<button
56
+				  type="primary"
57
+				  class="elivery-man_btn-item"
58
+				  @click="handleAddUser('add')"
59
+				>
60
+				 添加送货人
61
+				</button>
62
+			</view>
63
+		</view>
64
+		</view>
65
+		<addSelectUserVue ref="addUserRefs"/>
4 66
 	</view>
5 67
 </template>
6 68
 
7 69
 <script>
70
+	import headersVue from "../components/headers/headers.vue";
71
+	import addSelectUserVue from "./components/deliveryManModules/addSelectUser.vue";
72
+	import deliveryManEmptyVue from "./components/deliveryManModules/deliveryManEmpty.vue";
73
+	import {copy,toQueryString} from "@/utils/index.js"
8 74
 	export default {
75
+		components:{headersVue,deliveryManEmptyVue,addSelectUserVue},
9 76
 		data() {
10 77
 			return {
11
-				
78
+				indexs: "",
79
+				status: "",
80
+				order_id: "", //订单ID
81
+				goodsCustomType:"",
82
+				userData:[]
12 83
 			};
84
+		},
85
+		onLoad(e) {
86
+		  this.order_id = e.order_id;
87
+		  this.indexs = e.indexs;
88
+		  this.status = e.status;
89
+		  this.goodsCustomType = e.goodsCustomType;
90
+		},
91
+		methods:{
92
+			handleConfirm(){
93
+				console.log("选择确定")
94
+			},
95
+			handleAddUser(type,index){
96
+				if(type === 'add'){
97
+					this.$refs.addUserRefs.open()
98
+				}else{//编辑
99
+				this.$refs.addUserRefs.setDataValue({
100
+					user_name:'佛系少年'+index,
101
+					user_phone:"99995231231313"
102
+				})
103
+					this.$refs.addUserRefs.open()
104
+				}
105
+				
106
+			},
107
+			topgi(){
108
+				const urlParams = {
109
+					status:this.status,
110
+					index:this.indexs,
111
+					goodsCustomType:this.goodsCustomType,
112
+					order_id:this.order_id
113
+				}
114
+				const url = toQueryString(urlParams)
115
+				uni.redirectTo({
116
+				  url:`./sendoutgoods?${url}`,
117
+				});
118
+			}
13 119
 		}
14 120
 	}
15 121
 </script>
16
-
122
+<style>
123
+page {
124
+  background-color: #f7f8fc;
125
+  height: 100%;
126
+}
127
+</style>
17 128
 <style lang="scss">
18
-
129
+.delivery-man{
130
+	width: 100%;
131
+	height: 100%;
132
+	display: flex;
133
+	flex-direction: column;
134
+	align-items: center;
135
+	&__content {
136
+	  width: 100%;
137
+	   margin: 95rpx 0 0rpx;
138
+	   height: calc(100% - 0rpx);
139
+	   overflow:hidden;
140
+	   .delivery-man__list{
141
+		   box-sizing: border-box;
142
+		   background: #FFFFFF;
143
+		   height: calc(100% - 0rpx);
144
+		  
145
+		   display: flex;
146
+		   flex-direction: column;
147
+		    justify-content: space-between;
148
+		   &--top{
149
+			  overflow-y: auto;
150
+			   // border:2rpx solid #f00;
151
+			   flex-shrink: 0;
152
+			    flex:1;
153
+				padding:10rpx 32rpx 30rpx;
154
+				&-item{
155
+					padding: 26rpx 0;
156
+					border-bottom: 2rpx solid  #E5E5E5;
157
+					display: flex;
158
+					justify-content: flex-start;
159
+					&:last-child{
160
+						border-bottom: none;
161
+					}
162
+					&--left{
163
+						flex: 0 0 35%;
164
+					}
165
+					&--middle{
166
+						flex: 1;
167
+					display: flex;
168
+					align-items: center;
169
+					justify-content: flex-end;
170
+					flex-wrap: wrap;
171
+					padding:0 15rpx;
172
+						.user-phone{
173
+							word-break:break-all;
174
+							word-wrap: break-word;
175
+						}
176
+					}
177
+					&--right{
178
+						width: 90rpx;
179
+                        
180
+						.user-icon{
181
+							display: flex;
182
+							align-items: center;
183
+							justify-content: flex-end;
184
+						}
185
+					}
186
+				}
187
+		   }
188
+		   &--bottom{
189
+				 height: 120rpx;
190
+				 flex-shrink: 0;
191
+				 
192
+			   .btn-list{
193
+				   user-select: none;
194
+				   display: flex;
195
+				   padding: 10rpx 26rpx 0;
196
+				    gap:26rpx;
197
+				   
198
+			   }
199
+			 
200
+				.btn-default,.btn-primary{
201
+					height: 78rpx;
202
+					flex:1;
203
+					font-weight: 400;
204
+					font-size: 30rpx;
205
+					border-radius: 8rpx;
206
+				}
207
+				.btn-default{
208
+					color: #333333;
209
+				}
210
+				.btn-primary{
211
+					color: #FFFFFF;
212
+				}
213
+		   }
214
+	   }
215
+	  .delivery-man_btn {
216
+	    width: 100%;
217
+	    position: fixed;
218
+	    bottom: 0rpx;
219
+		height: 160rpx;
220
+		background: #FFFFFF;
221
+	    .elivery-man_btn-item{
222
+			height: 78rpx;
223
+			margin: 10rpx 32rpx 0;
224
+			font-weight: 400;
225
+			font-size: 30rpx;
226
+			color: #FFFFFF;
227
+			display: flex;
228
+			justify-content: center;
229
+			align-items: center;
230
+		}
231
+	  }
232
+	}
233
+}
19 234
 </style>

+ 30 - 5
shop/commodity/sendoutgoods.vue

@@ -25,7 +25,7 @@
25 25
 		:selectData="selectData"
26 26
 		@click-tabs="clickTabs"
27 27
 		>
28
-		<view class="upop" slot="right">
28
+		<view class="upop" slot="right" @click="selectUserInfo">
29 29
 			<view class="title xcv">{{ deliveryMan }}</view>
30 30
 			<image src="/static/images/new_ui/arrow-right.png" mode=""></image>
31 31
 		</view>
@@ -58,7 +58,7 @@ import fillLogisticsInfoVue from "./components/fillLogisticsInfo.vue";
58 58
 import headersVue from "../components/headers/headers.vue";
59 59
 import reInputItemVue from "./components/reInputItem/reInputItem.vue";
60 60
 import popupSelectItemVue from "./components/popupSelectItem/popupSelectItem.vue";
61
-import {copy} from "@/utils/index.js"
61
+import {copy,toQueryString} from "@/utils/index.js"
62 62
 export default {
63 63
   components: {
64 64
     shipmentGoodsCardVue,
@@ -119,11 +119,29 @@ export default {
119 119
 		  copy(val)
120 120
 	  },
121 121
     topgi() {
122
+		const url = toQueryString({
123
+			status:this.status,
124
+			index:this.indexs,
125
+			// goodsCustomType:this.goodsCustomType
126
+		})
122 127
       uni.redirectTo({
123
-        url: "./order?status=" + this.status + "&index=" + this.indexs,
124
-        // url: './order'
128
+        url: `./order?${url}`
125 129
       });
126 130
     },
131
+	selectUserInfo(){
132
+		console.log("选择用户信息")
133
+		const urlParams = {
134
+			status:this.status,
135
+			index:this.indexs,
136
+			goodsCustomType:this.goodsCustomType,
137
+			order_id:this.order_id
138
+		}
139
+		const url = toQueryString(urlParams)
140
+		console.log(url)
141
+		uni.redirectTo({
142
+		  url:`./deliveryman?${url}`,
143
+		});
144
+	},
127 145
 	clickTabs({ selected, item, index }){
128 146
 		console.log("clickTabs", selected, item, index)
129 147
 	}
@@ -151,7 +169,14 @@ page {
151 169
 
152 170
       bottom: 30rpx;
153 171
       .send-goods {
154
-        margin: 0 32rpx;
172
+       height: 78rpx;
173
+       margin: 0 32rpx;
174
+       font-weight: 400;
175
+       font-size: 30rpx;
176
+       color: #FFFFFF;
177
+       display: flex;
178
+       justify-content: center;
179
+       align-items: center;
155 180
       }
156 181
     }
157 182
   }

+ 4 - 5
shop/components/emptyData/emptyData.vue

@@ -4,7 +4,7 @@
4 4
 	        class="image_wrapper"
5 5
 	        src="/static/images/new_ui/empty_data.png"
6 6
 	      />
7
-	      <text class="text_tilte">{{title}}</text>
7
+	      <view class="text_tilte">{{title}}</view>
8 8
 	    </view>
9 9
 </template>
10 10
 
@@ -27,11 +27,10 @@
27 27
 <style lang="scss">
28 28
 .flex-col{
29 29
 	user-select: none;
30
+	text-align: center;
31
+	width:100%;
30 32
 	position: absolute;
31
-	top:50%;
32
-	margin-top: -30%;
33
-	display: flex;
34
-	flex-direction: column;
33
+	top:30%;
35 34
 	.text_tilte{
36 35
 		font-family: PingFangSC, PingFang SC;
37 36
 		font-weight: 400;

+ 74 - 73
shop/components/headers/headers.vue

@@ -1,81 +1,82 @@
1 1
 <template>
2
-		<view class="common-header">
3
-			<view class="common-header-text">
4
-				<view class="common-header-text-neishi" @click="topgi">
5
-					<view class="common-header-text-neishi-icon">
6
-						<image src="https://cdn.bjtdba.com/vod/image/2022-08-11/20220811133828415.png" mode="widthFix">
7
-						</image>
8
-					</view>
9
-				</view>
10
-				<view class="common-header-text-title">
11
-					{{headerTitle}}
12
-				</view>
13
-			</view>
14
-		</view>
2
+  <view class="common-header">
3
+    <view class="common-header-text">
4
+      <view class="common-header-text-neishi" @click="topgi">
5
+        <view class="common-header-text-neishi-icon">
6
+          <image
7
+            src="https://cdn.bjtdba.com/vod/image/2022-08-11/20220811133828415.png"
8
+            mode="widthFix"
9
+          >
10
+          </image>
11
+        </view>
12
+      </view>
13
+      <view class="common-header-text-title">
14
+        {{ headerTitle }}
15
+      </view>
16
+    </view>
17
+  </view>
15 18
 </template>
16 19
 
17 20
 <script>
18
-	export default {
19
-		props:{
20
-			headerTitle:{
21
-				type:String,
22
-				default:"发货"
23
-			}
24
-		},
25
-		data() {
26
-			return {
27
-				
28
-			};
29
-		},
30
-		methods:{
31
-			topgi(){
32
-				this.$emit("headerJump")
33
-			}
34
-		}
35
-	}
21
+export default {
22
+  props: {
23
+    headerTitle: {
24
+      type: String,
25
+      default: "发货",
26
+    },
27
+  },
28
+  data() {
29
+    return {};
30
+  },
31
+  methods: {
32
+    topgi() {
33
+      this.$emit("headerJump");
34
+    },
35
+  },
36
+};
36 37
 </script>
37 38
 
38 39
 <style lang="scss">
39
-		// 头部 start 
40
-		.common-header {
41
-			position: fixed;
42
-			top: 0;
43
-			left: 0;
44
-			z-index: 111;
45
-			width: 100%;
46
-			// height: 176rpx;
47
-			background: #FFFFFF;
48
-			display: flex;
49
-			// justify-content: center;
50
-			padding-left:20rpx;
51
-		    white-space: nowrap;
52
-			&-text {
53
-				width: 686rpx;
54
-				font-size: 36rpx;
55
-				font-weight: 500;
56
-				color: #333333;
57
-				display: flex;
58
-				// margin-top: 107rpx;
59
-				padding:30rpx 0 20rpx;
60
-				align-items: center;
61
-		
62
-				&-neishi {
63
-					width: 45rpx;
64
-					height: 45rpx;
65
-					margin-right: 10rpx;
66
-		
67
-					&-icon {
68
-						width: 36rpx;
69
-						height: 36rpx;
70
-						margin-top: 2rpx;
71
-		
72
-						image {
73
-							width: 100%;
74
-							height: 100%;
75
-						}
76
-					}
77
-				}
78
-			}
79
-		}
80
-	   // 头部 end
40
+// 头部 start
41
+.common-header {
42
+  position: fixed;
43
+  top: 0;
44
+  left: 0;
45
+  z-index: 111;
46
+  width: 100%;
47
+  // height: 176rpx;
48
+  background: #ffffff;
49
+  display: flex;
50
+  // justify-content: center;
51
+  padding-left: 20rpx;
52
+  white-space: nowrap;
53
+  &-text {
54
+    width: 686rpx;
55
+    font-size: 36rpx;
56
+    font-weight: 500;
57
+    color: #333333;
58
+    display: flex;
59
+    // margin-top: 107rpx;
60
+    padding: 30rpx 0 20rpx;
61
+    align-items: center;
62
+
63
+    &-neishi {
64
+      width: 45rpx;
65
+      height: 45rpx;
66
+      margin-right: 10rpx;
67
+
68
+      &-icon {
69
+        width: 36rpx;
70
+        height: 36rpx;
71
+        margin-top: 2rpx;
72
+
73
+        image {
74
+          width: 100%;
75
+          height: 100%;
76
+        }
77
+      }
78
+    }
79
+  }
80
+}
81
+// 头部 end
81 82
 </style>

+ 26 - 0
utils/index.js

@@ -112,4 +112,30 @@ const maskedData = {
112 112
 	idCard: MaskRules.idCard(sensitiveData.idCard), // 110101********7654
113 113
 	bankCard: MaskRules.bankCard(sensitiveData.bankCard), // 622588******5321
114 114
 	name: MaskRules.name(sensitiveData.name) // 张*丰
115
+}
116
+
117
+
118
+/**
119
+ * 对象转查询字符串
120
+ * @param {object} params - 输入对象
121
+ * @param {boolean} [encode=true] - 是否进行URL编码
122
+ * @returns {string} 转换后的字符串
123
+ */
124
+export  function toQueryString(params, encode = true) {
125
+  const processValue = (value) => {
126
+    if (value === null || value === undefined) return ''
127
+    if (Array.isArray(value)) return value.join(',')
128
+    if (typeof value === 'object') return JSON.stringify(value)
129
+    return String(value)
130
+  }
131
+
132
+  return Object.entries(params)
133
+    .filter(([_, value]) => value !== null && value !== undefined)
134
+    .map(([key, value]) => {
135
+      const processed = processValue(value)
136
+      return encode ? 
137
+        `${encodeURIComponent(key)}=${encodeURIComponent(processed)}` :
138
+        `${key}=${processed}`
139
+    })
140
+    .join('&')
115 141
 }