storeBelieveInLight 1 year ago
parent
commit
fa5b725a2d

+ 6 - 2
manifest.json

@@ -89,8 +89,12 @@
89 89
             "proxy" : {
90 90
                 // 自行修改下方的 /web
91 91
                 "/gateway" : {
92
-                    // "secure": false,
93
-                    "target" : "https://api.hxxfb.com"
92
+                  // "secure": false,
93
+                  "target": "https://api.hxxfb.com",
94
+                  "pathRewirte": {
95
+                    //路径重写
96
+                    "^/gateway": "/gateway"
97
+                  }
94 98
                 },
95 99
                 // "target" : "https://api.hebeiyhc.com"
96 100
                 // "target": "http://8.141.0.149:9000",

+ 62 - 63
openmerchant/amountopening/index.vue

@@ -78,10 +78,9 @@
78 78
 <script>
79 79
 	import {
80 80
 		updateActivationCode,
81
-		insterMerchantOrder,
81
+		insterMerchantOrder,
82 82
 		selectMerchant
83
-	} from '@/commit/api.js';
84
-	
83
+	} from '@/commit/api.js';
85 84
 	export default {
86 85
 		data() {
87 86
 			return {
@@ -146,7 +145,7 @@
146 145
 				updateActivationCode({
147 146
 					code: this.useCode,
148 147
 					uid: this.userinfo.uid
149
-				}).then(res => {
148
+				}).then(res => {
150 149
 					console.log('激活码激活 -->',res)
151 150
 					if (res.data.status == 200) {
152 151
 						this.useCode = "";
@@ -171,66 +170,66 @@
171 170
 					console.log('激活码激活 -->',fail)
172 171
 				})
173 172
 			},
174
-			payment() {
175
-				let userInfo = uni.getStorageSync('userinfo')
176
-				// 用户状态判断
177
-				selectMerchant({
178
-					uid: userInfo.uid
179
-				}).then(data => {
180
-					console.log('data = ',data)
181
-					if (data.data.status == 200) {
182
-						if (data.data.data.status == -1) {
183
-							this.pushToUserApplet()
184
-						} else {
185
-							uni.redirectTo({
186
-								url: '/openmerchant/shopentry/process?mer_id=' + data.data.data.merId //已开通商户未填写资料
187
-							});
188
-							return
189
-						}
190
-					}
191
-				}, fail => {
192
-					uni.showToast({
193
-						title: fail,
194
-						icon: "none"
195
-					})
196
-				}).catch(err => {
197
-					console.log(err)
198
-				})
199
-				
173
+			payment() {
174
+				let userInfo = uni.getStorageSync('userinfo')
175
+				// 用户状态判断
176
+				selectMerchant({
177
+					uid: userInfo.uid
178
+				}).then(data => {
179
+					console.log('data = ',data)
180
+					if (data.data.status == 200) {
181
+						if (data.data.data.status == -1) {
182
+							this.pushToUserApplet()
183
+						} else {
184
+							uni.redirectTo({
185
+								url: '/openmerchant/shopentry/process?mer_id=' + data.data.data.merId //已开通商户未填写资料
186
+							});
187
+							return
188
+						}
189
+					}
190
+				}, fail => {
191
+					uni.showToast({
192
+						title: fail,
193
+						icon: "none"
194
+					})
195
+				}).catch(err => {
196
+					console.log(err)
197
+				})
198
+				
200 199
 				
201
-			},
202
-			
203
-			pushToUserApplet() {
204
-				
205
-				uni.showToast({
206
-					title: '功能开发中,请使用激活码开通',
207
-					icon: "none"
208
-				})
209
-					
210
-				uni.navigateToMiniProgram({
211
-					// appid  写你要跳转的小程序的 appid
212
-					appId:'wx9082e5ac2fdb513f',
213
-					// 路径写  src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
214
-					// path: 'pagesA/oderPay/oder_nian',
215
-					path: 'pages/chuangke/index?type=100',
216
-					// 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
217
-					envVersion: 'trial',  // develop(开发版),trial(体验版),release(正式版)
218
-					// envVersion: 'release',  // develop(开发版),trial(体验版),release(正式版)
219
-					success(res) {
220
-						// 打开成功
221
-						uni.showToast({
222
-							title: '跳转成功'
223
-						})
224
-					},
225
-					fail(err) {
226
-						console.log(err)
227
-						// 打开失败/取消
228
-						uni.showToast({
229
-							title: '跳转不成功'
230
-						})
231
-					}
232
-				})
233
-			},
200
+			},
201
+			
202
+			pushToUserApplet() {
203
+				
204
+				uni.showToast({
205
+					title: '功能开发中,请使用激活码开通',
206
+					icon: "none"
207
+				})
208
+					
209
+				uni.navigateToMiniProgram({
210
+					// appid  写你要跳转的小程序的 appid
211
+					appId:'wx9082e5ac2fdb513f',
212
+					// 路径写  src下的路径,假如你跳转的是pages下的页面,就可以写pages/index
213
+					// path: 'pagesA/oderPay/oder_nian',
214
+					path: 'pages/chuangke/index?type=100',
215
+					// 这个不写的话会显示开发环境,不能正常跳转,写上就能正常跳转了
216
+					envVersion: 'trial',  // develop(开发版),trial(体验版),release(正式版)
217
+					// envVersion: 'release',  // develop(开发版),trial(体验版),release(正式版)
218
+					success(res) {
219
+						// 打开成功
220
+						uni.showToast({
221
+							title: '跳转成功'
222
+						})
223
+					},
224
+					fail(err) {
225
+						console.log(err)
226
+						// 打开失败/取消
227
+						uni.showToast({
228
+							title: '跳转不成功'
229
+						})
230
+					}
231
+				})
232
+			},
234 233
 			
235 234
 			pay(appId, timeStamp, nonceStr, pack, signType, paySign) {
236 235
 				wx.requestPayment({

+ 21 - 9
pages.json

@@ -5,7 +5,7 @@
5 5
         // "path" : "pages/my/index",
6 6
         "path": "pages/cashier/index",
7 7
         "style": {
8
-          // "navigationBarTitleText": "服务中心"
8
+          // "navigationBarTitleText": "收银台"
9 9
           "navigationStyle": "custom"
10 10
         }
11 11
       },
@@ -18,7 +18,8 @@
18 18
       {
19 19
         "path": "pages/my/index",
20 20
         "style": {
21
-          "navigationStyle": "custom"
21
+          "navigationStyle": "custom" 
22
+		  // "navigationBarTitleText": "服务中心"
22 23
         }
23 24
       },
24 25
       // "navigationBarBackgroundColor": "#FFFF"
@@ -256,6 +257,14 @@
256 257
                 	{
257 258
                 		"navigationStyle" : "custom"
258 259
                 	}
260
+                },
261
+                {
262
+                	"path" : "productManagementModule/index",
263
+                	"style" : 
264
+                	{
265
+                		// "navigationBarTitleText" : "",
266
+                		"navigationStyle" : "custom"
267
+                	}
259 268
                 }
260 269
             ]
261 270
         },
@@ -323,7 +332,9 @@
323 332
                 "text" : "收银台"
324 333
             },
325 334
             {
326
-                "pagePath" : "shop/productManagementModule/productManagement",
335
+                // "pagePath" : "shop/productManagementModule/productManagement",
336
+                "pagePath" : "shop/productManagementModule/index",
337
+               
327 338
                 "iconPath" : "static/tab/dian.png",
328 339
                 "selectedIconPath" : "static/tab/dian1.png",
329 340
                 "text" : "商品管理"
@@ -340,12 +351,13 @@
340 351
                 "selectedIconPath" : "static/tab/ding1.png",
341 352
                 "text" : "订单管理"
342 353
             },
343
-            {
344
-                "pagePath" : "pages/onlineproductselection/onlineproductselection",
345
-                "iconPath" : "static/tab/shangpin.png",
346
-                "selectedIconPath" : "static/tab/shangpin2.png",
347
-                "text" : "在线选品"
348
-            }
354
+			{
355
+				 "pagePath" :"pages/my/index",
356
+				 "iconPath" : "/static/tab/wo.png",
357
+				 "selectedIconPath" : "/static/tab/wo1.png",
358
+				  "text" : "服务中心"
359
+			}
360
+           
349 361
         ]
350 362
     }
351 363
 }

File diff suppressed because it is too large
+ 831 - 726
pages/cashier/index.vue


+ 8 - 1
pages/my/index.vue

@@ -57,6 +57,13 @@
57 57
 					// 	show:true,
58 58
 					// 	id: "0",
59 59
 					// }
60
+					{
61
+						name: "在线选品",
62
+						url: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812161733260.png",
63
+						pages:"/pages/onlineproductselection/onlineproductselection",
64
+						show:true,
65
+						id: "0",
66
+					}
60 67
 				],
61 68
 				uid: '',
62 69
 				authorization: ''
@@ -288,7 +295,7 @@
288 295
 				font-size: 46rpx;
289 296
 				font-weight: 500;
290 297
 				color: #333333;
291
-				top: 202rpx;
298
+				top: 60rpx;
292 299
 				left: 64rpx;
293 300
 			}
294 301
 

+ 2 - 1
pages/user/login/index.vue

@@ -224,7 +224,8 @@
224 224
 				setTimeout(function() {
225 225
 					console.log('暂不登录')
226 226
 					uni.switchTab({
227
-						url: '../../onlineproductselection/onlineproductselection'
227
+						// url: '../../onlineproductselection/onlineproductselection'
228
+						url: '../../my/index'
228 229
 					});
229 230
 				}, 300);
230 231
 			},

+ 197 - 7
shop/productManagementModule/addProduct.vue

@@ -1,27 +1,217 @@
1 1
 <template>
2 2
   <view class="product-add-wrapper">
3
-    <headersVue headerTitle="添加商品" @headerJump="headerJump"></headersVue>
3
+    <view class="headers">
4
+      <headersVue headerTitle="添加商品" @headerJump="headerJump"></headersVue>
5
+      <view class="headers-title">
6
+        <view class="content"> 该功能仅支持单规格商品快速添加,可在PC </view>
7
+      </view>
8
+    </view>
9
+    <view class="content-wrrapper">
10
+      <uploadVue formItemTitle="商品封面" :maxLimit="1"></uploadVue>
11
+      <uploadVue formItemTitle="商品轮播图"></uploadVue>
12
+      <view class="business-box">
13
+        <view class="business-box-txt">商品详情 </view>
14
+        <view class="business-box--arae">
15
+          <textarea
16
+            @blur="bindTextAreaBlur"
17
+            :maxlength="-1"
18
+            auto-height
19
+            class="araebox"
20
+          />
21
+        </view>
22
+        <uploadVue :maxLimit="200" class="upload-boxx"></uploadVue>
23
+      </view>
24
+      <view class="form-box">
25
+        <view class="form-item-box">
26
+          <view class="form-box-txt mustBox">商户商品分类</view>
27
+          <view class="form-box--arae"> 選擇 </view>
28
+		  <uni-icons type="right" size="30" class="icon-boxx"></uni-icons>
29
+        </view>
30
+		 <view class="form-item-box">
31
+          <view class="form-box-txt mustBox">商户商品分类</view>
32
+          <view class="form-box--arae"> 選擇 </view>
33
+        </view>
34
+      </view>
35
+    </view>
36
+    <view class="btn-list">
37
+      <view class="btn quxiao"> 保存草稿 </view>
38
+      <view class="btn primary"> 发布商品 </view>
39
+    </view>
4 40
   </view>
5 41
 </template>
6 42
 
7 43
 <script>
8 44
 //添加商品
9 45
 import headersVue from "../components/headers/headers.vue";
46
+import uploadVue from "./components/upload.vue";
10 47
 export default {
11 48
   components: {
12
-    headersVue
49
+    headersVue,
50
+    uploadVue,
13 51
   },
14 52
   data() {
15 53
     return {};
16 54
   },
17 55
   methods: {
18 56
     headerJump() {
19
-      uni.switchTab({
20
-        url: "./productManagement"
57
+      uni.redirectTo({
58
+        url: "/shop/productManagementModule/productManagement",
21 59
       });
22
-    }
23
-  }
60
+    },
61
+    bindTextAreaBlur(e) {
62
+      console.log(e.detail.value);
63
+    },
64
+  },
24 65
 };
25 66
 </script>
67
+<style>
68
+page {
69
+  background-color: #f7f8fc;
70
+  height: 100%;
71
+}
72
+</style>
73
+<style lang="scss" scoped>
74
+.product-add-wrapper {
75
+  height: 100%;
76
+  overflow: hidden;
77
+  .headers {
78
+    .headers-title {
79
+      display: flex;
80
+      align-items: center;
81
+      width: 100%;
82
+      background: #fff9ed;
83
+      padding: 16px 20rpx;
84
+      margin-top: 88rpx;
85
+      .content {
86
+        font-family: PingFangSC, PingFang SC;
87
+        font-weight: 400;
88
+        font-size: 26rpx;
89
+        color: #ff6010;
90
+      }
91
+    }
92
+  }
93
+}
94
+.content-wrrapper {
95
+  height: calc(100% - 350rpx);
96
+  overflow-y: auto;
97
+  padding-bottom: 60rpx;
98
+  .business-box {
99
+    width: calc(100% - 0rpx);
100
+    // border: 2rpx solid #f00;
101
+    margin: 26rpx 0;
102
+    display: flex;
103
+    flex-direction: column;
104
+    justify-content: space-between;
105
+    align-items: flex-start;
106
+    padding: 32rpx 32rpx 0;
107
+    box-sizing: border-box;
108
+    background-color: #ffffff;
109
+    min-height: 500rpx;
110
+    .business-box-txt {
111
+      width: 100%;
112
+      font-weight: 600;
113
+      font-size: 30rpx;
114
+      color: #333333;
115
+      margin-bottom: 20rpx;
116
+      &::after {
117
+        content: "*";
118
+        color: #f00;
119
+        padding-left: 10rpx;
120
+      }
121
+    }
122
+    .upload-boxx {
123
+      padding: 19rpx 0 !important;
124
+    }
125
+    .business-box--arae {
126
+      width: 100%;
127
+      //  border: 2rpx solid #f00;
128
+      background: #f8f8f8;
129
+      border-radius: 9rpx;
130
+      min-height: 208rpx;
131
+      .araebox {
132
+        padding: 20rpx 18rpx 20rpx 26rpx;
133
+        width: calc(100% - 46rpx);
134
+        height: 100%;
135
+      }
136
+    }
137
+  }
138
+}
26 139
 
27
-<style lang="scss"></style>
140
+.btn-list {
141
+  background-color: #fff;
142
+  display: flex;
143
+  gap: 26rpx;
144
+  user-select: none;
145
+  padding: 15rpx 26rpx 0rpx;
146
+  height: 126rpx;
147
+  .btn {
148
+    flex: 1;
149
+    flex-shrink: 0;
150
+    height: 78rpx;
151
+    border-radius: 8rpx;
152
+    font-weight: 400;
153
+    font-size: 30rpx;
154
+    display: flex;
155
+    align-items: center;
156
+    justify-content: center;
157
+  }
158
+  .quxiao {
159
+    border: 1rpx solid #999999;
160
+    color: #333333;
161
+  }
162
+  .primary {
163
+    color: #ffffff;
164
+    background: #1f7cff;
165
+  }
166
+}
167
+.form-box {
168
+  min-height: 217rpx;
169
+  background: #ffffff;
170
+  border: 2rpx solid #f00;
171
+  padding: 0 32rpx;
172
+  .form-item-box {
173
+	display: flex;
174
+    align-items: center;
175
+    padding: 26rpx 0;
176
+    border-bottom: 2rpx solid #f8f8f8;
177
+	position: relative;
178
+    &:last-child {
179
+      border-bottom: none;
180
+    }
181
+	.icon-boxx{
182
+		position: absolute;
183
+		right: -26rpx;
184
+		top: 28rpx;
185
+	}
186
+    .form-box-txt {
187
+      font-family: PingFangSC, PingFang SC;
188
+      font-weight: 400;
189
+      font-size: 30rpx;
190
+      color: #333333;
191
+	//   height: 100%;
192
+      line-height: 42rpx;
193
+
194
+
195
+	  width: 230rpx;
196
+	  flex-shrink: 0;
197
+    }
198
+    .form-box--arae {
199
+		display: flex;
200
+    align-items: center;
201
+	justify-content: flex-end;
202
+      font-weight: 400;
203
+      font-size: 30rpx;
204
+      color: #333333;
205
+	  flex: 1;
206
+	  padding-right: 20rpx;
207
+    }
208
+  }
209
+}
210
+.mustBox {
211
+  &::after {
212
+    content: "*";
213
+    color: #f00;
214
+    padding-left: 10rpx;
215
+  }
216
+}
217
+</style>

+ 242 - 0
shop/productManagementModule/components/upload.vue

@@ -0,0 +1,242 @@
1
+<template>
2
+  <view class="upload-wrapper">
3
+    <view class="upload-wrapper-text ismust" v-if="formItemTitle"> {{ formItemTitle }} </view>
4
+    <view class="upload-wrapper-upload">
5
+      <view class="upload-files-content">
6
+        <template v-if="fileListData.length > 0">
7
+          <view
8
+            class="upload-files"
9
+            v-for="(item, index) in fileListData"
10
+            :key="index+item.path"
11
+          >
12
+            <view class="image-box">
13
+              <image :src="item.path" class="show-image-box"></image>
14
+              <image
15
+                src="/static/images/new_ui/guanbi.png"
16
+                class="close-box"
17
+                v-if="!disabledDetele"
18
+                @click="onHandleDelete(item, index)"
19
+              ></image>
20
+            </view>
21
+          </view>
22
+        </template>
23
+        <view class="upload-no-files" :style="getUploadClass" v-if="isHidden"  @click="uploadDataFiles">
24
+          <image src="/static/images/new_ui/xiangji.png"></image>
25
+          <view class="upload-no-files__text"> {{ setImageTitle }} </view>
26
+        </view>
27
+      </view>
28
+    </view>
29
+  </view>
30
+</template>
31
+
32
+<script>
33
+export default {
34
+  props: {
35
+    maxLimit: {
36
+      type: Number,
37
+      default: 5,
38
+    },
39
+    disabled: {
40
+      type: Boolean,
41
+      default: false,
42
+    },
43
+    disabledDetele: {
44
+      type: Boolean,
45
+      default: false,
46
+    },
47
+    formItemTitle: {
48
+      type: String,
49
+      default: "",
50
+    },
51
+    isMust: {
52
+      type: Boolean,
53
+      default: false,
54
+    },
55
+	imageTitle:{
56
+		type: String,
57
+		default: "",
58
+	},
59
+	index:{
60
+		type: Number,
61
+		default: 0,
62
+	}
63
+  },
64
+  data() {
65
+    return {
66
+      fileListData: [],
67
+    };
68
+  },
69
+  methods: {
70
+	emitChangeFiles(data){
71
+		this.$emit('changeFiles',{
72
+			fileList:data || [],
73
+			index:this.index
74
+		})
75
+		// console.log(data,"emitChangeFiles")
76
+	},
77
+    uploadDataFiles() {
78
+		if(this.disabled || this.maxLimit == 0){
79
+			return ;
80
+		}
81
+      let that = this;
82
+      uni.chooseImage({
83
+        count:1, // 最多可以选择的图片张数,默认9
84
+        // sizeType: ["compressed"], // original 原图,compressed 压缩图,默认二者都有
85
+        sourceType: ["album", "camera"], // album 从相册选图,camera 使用相机,默认二者都有
86
+        success: function (res) {
87
+          console.log(res, "456456465");
88
+          if (that.maxLimit.length === 0) {
89
+          	that.fileListData.push({
90
+				path:res.tempFilePaths[0],
91
+				Files:res.tempFiles[0]
92
+			})
93
+          } else if (that.fileListData.length < that.maxLimit) {
94
+          	that.fileListData = that.fileListData.concat({
95
+				path:res.tempFilePaths[0],
96
+				Files:res.tempFiles[0]
97
+			}); //concat追加到数组
98
+          }
99
+		   that.emitChangeFiles(that.fileListData)
100
+		//   console.log(that.fileListData,"that.fileListData")
101
+        },
102
+		fail() {
103
+			  that.emitChangeFiles([])
104
+		}
105
+		
106
+      });
107
+	 
108
+      // let that = this;
109
+      // that.$time.uploadPictures((res) => {
110
+      //   console.log(res);
111
+      //   // that.merchantsIn.business_license = res;
112
+      // });
113
+    },
114
+    onHandleDelete(item, index) {
115
+      if (!this.disabledDetele) {
116
+        this.fileListData.splice(index, 1);
117
+		console.log(this.fileListData,"this.fileListData")
118
+		 this.emitChangeFiles(this.fileListData)
119
+      }
120
+    },
121
+  },
122
+  computed: {
123
+    isHidden() {
124
+      return this.fileListData.length < this.maxLimit;
125
+    },
126
+    setImageTitle() {
127
+      if (this.disabled || this.maxLimit == 0) {
128
+        return "禁止上传图片";
129
+      } else if (
130
+        this.fileListData.length < this.maxLimit &&
131
+        this.fileListData.length > 0 && this.imageTitle
132
+      ) {
133
+        return `${this.fileListData.length} / ${this.maxLimit}`;
134
+      } else {
135
+        return "添加图片";
136
+      }
137
+    },
138
+    getUploadClass() {
139
+      let isZeo = this.fileListData.length > 0;
140
+      let styles = {};
141
+      if (isZeo) {
142
+        styles = {
143
+          width: "208rpx",
144
+        };
145
+      } else {
146
+        styles = {
147
+          width: "100%",
148
+        };
149
+      }
150
+      return styles;
151
+    },
152
+  },
153
+};
154
+</script>
155
+
156
+<style lang="scss" scoped>
157
+.upload-wrapper {
158
+  width: calc(100% - 0rpx);
159
+  // border: 2rpx solid #f00;
160
+  display: flex;
161
+  flex-direction: column;
162
+  justify-content: space-between;
163
+  align-items: flex-start;
164
+  padding: 32rpx;
165
+  box-sizing: border-box;
166
+  background-color: #ffffff;
167
+  .upload-wrapper-text {
168
+    width: 100%;
169
+    font-weight: 600;
170
+    font-size: 30rpx;
171
+    color: #333333;
172
+    margin-bottom: 20rpx;
173
+    &.ismust {
174
+      &::after {
175
+        content: "*";
176
+        color: #f00;
177
+        padding-left: 10rpx;
178
+      }
179
+    }
180
+  }
181
+  .upload-wrapper-upload {
182
+    width: 100%;
183
+    user-select: none;
184
+    border-radius: 8rpx;
185
+    display: flex;
186
+    justify-content: flex-start;
187
+    align-items: center;
188
+    .upload-files-content {
189
+      // border: 2rpx solid #f00;
190
+
191
+      display: flex;
192
+      flex-wrap: wrap;
193
+      gap: 20rpx;
194
+      width: 100%;
195
+    }
196
+    .upload-no-files {
197
+      height: 208rpx;
198
+      width: 100%;
199
+      // background: #f00;
200
+      background: #f8f8f8;
201
+      display: flex;
202
+      justify-content: center;
203
+      align-items: center;
204
+      flex-direction: column;
205
+      flex-shrink: 0;
206
+      border-radius: 16rpx;
207
+      .upload-no-files__text {
208
+        font-weight: 400;
209
+        font-size: 26rpx;
210
+        color: #333333;
211
+      }
212
+      image {
213
+        width: 72rpx;
214
+        height: 72rpx;
215
+      }
216
+    }
217
+
218
+    .upload-files {
219
+      display: flex;
220
+      // border: 2rpx solid #ff0;
221
+      gap: 26rpx;
222
+      flex-wrap: wrap;
223
+      border-radius: 16rpx;
224
+      .image-box {
225
+        position: relative;
226
+        border-radius: 16rpx;
227
+        .show-image-box {
228
+          width: 208rpx;
229
+          height: 210rpx;
230
+        }
231
+        .close-box {
232
+          position: absolute;
233
+          right: 0rpx;
234
+          top: 0;
235
+          width: 42rpx;
236
+          height: 42rpx;
237
+        }
238
+      }
239
+    }
240
+  }
241
+}
242
+</style>

+ 316 - 0
shop/productManagementModule/index.vue

@@ -0,0 +1,316 @@
1
+<template>
2
+	<view class="storemanagement">
3
+		<view class="storemanagement-header">
4
+			<view class="storemanagement-header-text">
5
+				商品管理
6
+			</view>
7
+			<view class="storemanagement-list">
8
+				<view class="storemanagement-list-yi" v-for="(item,index) in mnu" :key="index" @click="jinru(item.pages,item.name)" v-if="item.show">
9
+					<view class="storemanagement-list-yi-text">
10
+						{{item.name}}
11
+					</view>
12
+					<view class="storemanagement-list-yi-image">
13
+						<image :src="item.url" mode="widthFix"></image>
14
+					</view>
15
+				</view>
16
+			</view>
17
+		</view>
18
+	</view>
19
+</template>
20
+
21
+<script>
22
+	import readAppInfo from '@/utils/readAppInfo.js';
23
+	export default {
24
+		data() {
25
+			return {
26
+				mnu: [
27
+					// {
28
+					// 	name: "分润设置",
29
+					// 	url: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812161807687.png",
30
+					// 	pages:"/shop/services/setting",
31
+					// 	show:true,
32
+					// 	id: "3",
33
+					// },
34
+					// {
35
+					// 	name: "我的音响",
36
+					// 	url: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812161749139.png",
37
+					// 	pages:"/shop/services/mystereo",
38
+					// 	show:true,
39
+					// 	id: "0",
40
+					// },
41
+					// {
42
+					// 	name: "锁定用户",
43
+					// 	url: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812161733260.png",
44
+					// 	pages:"/shop/services/lockuser",
45
+					// 	show:true,
46
+					// 	id: "0",
47
+					// },
48
+					// {
49
+					// 	name: "商品管理",
50
+					// 	url: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812161733260.png",
51
+					// 	pages:"/shop/productManagementModule/productManagement",
52
+					// 	show:true,
53
+					// 	id: "0",
54
+					// }
55
+					{
56
+						name: "在线选品",
57
+						url: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812161733260.png",
58
+						pages:"/pages/onlineproductselection/onlineproductselection",
59
+						show:true,
60
+						id: "0",
61
+					},
62
+					{
63
+						name: "商品列表",
64
+						url: "https://cdn.bjtdba.com/vod/image/2022-08-12/20220812161733260.png",
65
+						pages:"/shop/productManagementModule/productManagement",
66
+						show:true,
67
+						id: "0",
68
+					}
69
+				],
70
+				uid: '',
71
+				authorization: ''
72
+			}
73
+		},
74
+		async onLoad() {
75
+			console.log('进了我的页面了')
76
+			// uni.showLoading({
77
+			// 	title: '加载中',
78
+			// 	mask: true
79
+			// });
80
+			
81
+			await readAppInfo();
82
+			
83
+			let jurisdiction = uni.getStorageSync('jurisdiction')
84
+			console.log('jurisdiction', jurisdiction)
85
+			let mnuList = this.mnu
86
+			if (jurisdiction) {
87
+				jurisdiction.forEach((res, index) => {
88
+					mnuList.forEach((result, i) => {
89
+						if (res == result.id) {
90
+							result.show = true
91
+						}
92
+						return result
93
+					})
94
+					return res
95
+				})
96
+				this.mnu = mnuList
97
+			}
98
+			
99
+			console.log(this.mnu)
100
+			
101
+			setTimeout(function() {
102
+				uni.hideLoading();
103
+			}, 700);
104
+			
105
+			
106
+			console.log('我的show===>>>>>>')
107
+			
108
+			
109
+			this.authorization = uni.getStorageSync('authorization')
110
+			let userinfo = uni.getStorageSync('userinfo')
111
+			this.uid = userinfo.uid
112
+			console.log('onshow')
113
+			
114
+			let authorization = uni.getStorageSync('authorization')
115
+			// let userinfo = uni.getStorageSync('userinfo')
116
+			let selectmerchant = uni.getStorageSync('selectmerchant')
117
+			let uid = userinfo.uid
118
+			console.log(selectmerchant, authorization, userinfo)
119
+			if (authorization && uid) {
120
+				if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
121
+					uni.redirectTo({
122
+						url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
123
+					});
124
+					return
125
+				} else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
126
+					
127
+					return
128
+				} else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
129
+					uni.redirectTo({
130
+						url: '/openmerchant/shopentry/process?mer_id=' + selectmerchant.merId //已开通商户未填写资料
131
+					});
132
+					return
133
+				} else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
134
+					uni.redirectTo({
135
+						url: '/openmerchant/shopentry/processaudit?submitCode=' + 3 //已开通商户待审核
136
+					});
137
+					return
138
+				} else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
139
+					uni.redirectTo({
140
+						url: '/openmerchant/shopentry/processaudit?submitCode=' + 2 //已开通商户审核拒绝
141
+					});
142
+					return
143
+				}
144
+			
145
+			} 
146
+		},
147
+		onShow() {
148
+			return;
149
+			
150
+			// 以下逻辑在onload处理
151
+			
152
+			this.authorization = uni.getStorageSync('authorization')
153
+			let userinfo = uni.getStorageSync('userinfo')
154
+			this.uid = userinfo.uid
155
+			
156
+			let authorization = uni.getStorageSync('authorization')
157
+			// let userinfo = uni.getStorageSync('userinfo')
158
+			let selectmerchant = uni.getStorageSync('selectmerchant')
159
+			let uid = userinfo.uid
160
+			console.log(selectmerchant, authorization, userinfo)
161
+			if (authorization && uid) {
162
+				if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
163
+					uni.redirectTo({
164
+						url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
165
+					});
166
+					return
167
+				} else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
168
+					
169
+					return
170
+				} else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
171
+					uni.redirectTo({
172
+						url: '/openmerchant/shopentry/process?mer_id=' + selectmerchant.merId //已开通商户未填写资料
173
+					});
174
+					return
175
+				} else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
176
+					uni.redirectTo({
177
+						url: '/openmerchant/shopentry/processaudit?submitCode=' + 3 //已开通商户待审核
178
+					});
179
+					return
180
+				} else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
181
+					uni.redirectTo({
182
+						url: '/openmerchant/shopentry/processaudit?submitCode=' + 2 //已开通商户审核拒绝
183
+					});
184
+					return
185
+				}
186
+			
187
+			} 
188
+			
189
+			
190
+		},
191
+		methods: {
192
+			jinru(n,p){
193
+				let name = p
194
+				let page = n
195
+				if(name=="分润设置") {
196
+					let authorization = uni.getStorageSync('authorization')
197
+					let userinfo = uni.getStorageSync('userinfo')
198
+					let selectmerchant = uni.getStorageSync('selectmerchant')
199
+					let uid = userinfo.uid
200
+					if (authorization && uid) {
201
+						if (selectmerchant.merId >= 0 && selectmerchant.status == -1) {
202
+							uni.redirectTo({
203
+								url: "/openmerchant/guide/index" //有或者没有商户 没有金额支付and激活码支付
204
+							});
205
+							return
206
+						} else if (selectmerchant.merId > 0 && (selectmerchant.status == 1 || selectmerchant.status == 5)) {
207
+							uni.redirectTo({
208
+								url:page
209
+							})
210
+							return
211
+						} else if (selectmerchant.merId >= 0 && (selectmerchant.status == 3 || selectmerchant.status == 4)) {
212
+							uni.redirectTo({
213
+								url: '/openmerchant/shopentry/process?mer_id=' + selectmerchant.merId //已开通商户未填写资料
214
+							});
215
+							return
216
+						} else if (selectmerchant.merId > 0 && selectmerchant.status == 0) {
217
+							uni.redirectTo({
218
+								url: '/openmerchant/shopentry/processaudit?submitCode=' + 3 //已开通商户待审核
219
+							});
220
+							return
221
+						} else if (selectmerchant.merId > 0 && selectmerchant.status == 2) {
222
+							uni.redirectTo({
223
+								url: '/openmerchant/shopentry/processaudit?submitCode=' + 2 //已开通商户审核拒绝
224
+							});
225
+							return
226
+						}
227
+					
228
+					} else {
229
+						uni.navigateTo({
230
+							url: "/pages/user/login/index?type=1"
231
+						});
232
+						return
233
+					}
234
+					
235
+				}else if(name=="锁定用户"){
236
+					uni.redirectTo({
237
+						url:page
238
+					})
239
+				}else{
240
+					uni.redirectTo({
241
+						url:page
242
+					})
243
+				}
244
+			}
245
+		}
246
+	}
247
+</script>
248
+<style>
249
+	page {
250
+		background-color: #F7F8FC;
251
+	}
252
+</style>
253
+<style lang="scss" scoped>
254
+	.storemanagement {
255
+		width: 100%;
256
+		height: 100%;
257
+		display: flex;
258
+		flex-direction: column;
259
+		align-items: center;
260
+
261
+		.storemanagement-header {
262
+			width: 100%;
263
+			height: 328rpx;
264
+			background: linear-gradient(180deg, rgba(31, 124, 255, 0.2200) 0%, rgba(255, 255, 255, 0.1500) 100%);
265
+			position: relative;
266
+			display: flex;
267
+			justify-content: center;
268
+
269
+			.storemanagement-header-text {
270
+				position: absolute;
271
+				font-size: 46rpx;
272
+				font-weight: 500;
273
+				color: #333333;
274
+				top: 60rpx;
275
+				left: 64rpx;
276
+			}
277
+
278
+			.storemanagement-list {
279
+				width: 690rpx;
280
+				height: 262rpx;
281
+				position: absolute;
282
+				top: 298rpx;
283
+				display: flex;
284
+				flex-flow: wrap;
285
+				justify-content: space-between;
286
+
287
+				.storemanagement-list-yi {
288
+					margin-bottom: 26rpx;
289
+					width: 330rpx;
290
+					height: 118rpx;
291
+					background: #FFFFFF;
292
+					border-radius: 8rpx;
293
+					display: flex;
294
+					justify-content: space-around;
295
+					align-items: center;
296
+
297
+					.storemanagement-list-yi-text {
298
+						font-size: 26rpx;
299
+						font-weight: 500;
300
+						color: #333333;
301
+					}
302
+
303
+					.storemanagement-list-yi-image {
304
+						width: 92rpx;
305
+						height: 92rpx;
306
+
307
+						image {
308
+							width: 100%;
309
+							height: 100%;
310
+						}
311
+					}
312
+				}
313
+			}
314
+		}
315
+	}
316
+</style>

+ 197 - 20
shop/productManagementModule/productManagement.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <view class="product-manger-wrapper">
3
-    <!-- <headersVue headerTitle="商品管理" @headerJump="headerJump"></headersVue> -->
3
+    <headersVue headerTitle="商品管理" @headerJump="headerJump"></headersVue>
4 4
     <view class="product-manger-content">
5 5
       <view class="product-manger-content--top">
6 6
         <searchVue @search="search" class="search-box"></searchVue>
@@ -13,7 +13,57 @@
13 13
         </view>
14 14
       </view>
15 15
       <view class="product-manger-content--tab">
16
-        <tabsVue :category="dataList"  />
16
+        <tabsVue :category="dataList" />
17
+      </view>
18
+    </view>
19
+    <view class="product-manger-content--list">
20
+      <view class="list-card" v-for="(item, index) in dataList" :key="index">
21
+        <view class="list-card-top">
22
+          <view class="list-card-top--left">
23
+             <image
24
+                src="/static/images/new_ui/tianjiachanpin.png"
25
+                mode="scaleToFill"
26
+              />
27
+          </view>
28
+          <view class="list-card-top--right">
29
+            <view class="list-card-top--right-title">此处显示商品名称最多一行,显示不下此处显示商品名称最多一行,显示不下</view>
30
+            <view class="list-card-top--right-description">
31
+              <view class="list-card-top--right-description--left">
32
+                <text class="title">销量</text>
33
+                <text>5000</text>
34
+              </view>
35
+              <view class="list-card-top--right-description--right">
36
+                <text class="title">库存</text>
37
+                <text>5000</text>
38
+              </view>
39
+            </view>
40
+            <view class="list-card-top--right-price">
41
+              <view class="list-card-top--right-price--left">
42
+                <text>¥</text>
43
+                <text class="price">5000</text>
44
+              </view>
45
+            </view>
46
+          </view>
47
+        </view>
48
+        <view class="list-card-bottom-btn">
49
+          <view class="list-card-bottom-btn-list">
50
+            <view class="list-card-bottom-btn-list--item">推荐</view>
51
+            <view class="list-card-bottom-btn-list--item">驳回原因</view>
52
+            <view class="list-card-bottom-btn-list--item">上架</view>
53
+            <view class="list-card-bottom-btn-list--item">下架</view>
54
+            <view class="list-card-bottom-btn-list--item">删除草稿</view>
55
+          </view>
56
+
57
+          </view>
58
+
59
+        </view>
60
+              <view
61
+        class=""
62
+        v-if="tihsi == 0"
63
+        style="margin: 60rpx 0 30rpx 0; color: #999999; font-size: 26rpx"
64
+      >
65
+        —— 已经到最底部了哦 ——
66
+      </view>
17 67
       </view>
18 68
     </view>
19 69
   </view>
@@ -28,60 +78,78 @@ export default {
28 78
   components: {
29 79
     headersVue,
30 80
     searchVue,
31
-	tabsVue
81
+    tabsVue,
32 82
   },
33 83
   methods: {
84
+    		onPullDownRefresh() {
85
+			uni.showLoading({
86
+				title: '加载中',
87
+			});
88
+			this.page = 1
89
+			this.is_panudn = true
90
+			this.list = []
91
+			// this.orderList();
92
+		},
93
+		onReachBottom() {
94
+      console.log('onReachBottom')
95
+			// if (this.is_panudn == true) {
96
+			// 	this.page++;
97
+			// 	this.orderList();
98
+			// } else {
99
+			// 	return
100
+			// }
101
+		},
34 102
     headerJump() {
35
-      uni.switchTab({ url: "/pages/my/index" });
103
+      uni.switchTab({ url: "/shop/productManagementModule/index" });
36 104
     },
37 105
     onHandleAddProduct() {
38
-		uni.redirectTo({
39
-			url:`./addProduct`
40
-		})
41
-	}
106
+      uni.redirectTo({
107
+        url: `./addProduct`,
108
+      });
109
+    },
42 110
   },
43 111
   data() {
44 112
     return {
113
+      tihsi: 0,
45 114
       dataList: [
46 115
         {
47 116
           type: 1,
48 117
           name: "出售中商品",
49
-          count: 10
118
+          count: 10,
50 119
         },
51 120
         {
52 121
           type: 2,
53 122
           name: "仓库中商品",
54
-          count: 31
123
+          count: 31,
55 124
         },
56 125
         {
57 126
           type: 3,
58 127
           name: "已售罄商品",
59
-          count: 0
128
+          count: 0,
60 129
         },
61 130
         {
62 131
           type: 4,
63 132
           name: "警戒库存",
64
-          count: 0
133
+          count: 0,
65 134
         },
66 135
         {
67 136
           type: 5,
68 137
           name: "回收站商品",
69
-          count: 0
138
+          count: 0,
70 139
         },
71 140
         {
72 141
           type: 6,
73 142
           name: "待审核商品",
74
-          count: 0
143
+          count: 0,
75 144
         },
76 145
         {
77 146
           type: 7,
78 147
           name: "审核未通过商品",
79
-          count: 0
80
-        }
148
+          count: 0,
149
+        },
81 150
       ],
82
-
83 151
     };
84
-  }
152
+  },
85 153
 };
86 154
 </script>
87 155
 <style>
@@ -92,9 +160,14 @@ page {
92 160
 <style lang="scss" scoped>
93 161
 .product-manger-wrapper {
94 162
   // margin-top: 96rpx;
95
-  // border: 2rpx solid #f00;
96
-  background: #fff;
163
+ 
164
+
97 165
   .product-manger-content {
166
+    background: #fff;
167
+    position: fixed;
168
+    top: 80rpx;
169
+    width: 100%;
170
+    z-index: 666;
98 171
     &--top {
99 172
       display: flex;
100 173
       .search-box {
@@ -120,5 +193,109 @@ page {
120 193
       }
121 194
     }
122 195
   }
196
+  .product-manger-content--list {
197
+    display: flex;
198
+    flex-direction: column;
199
+    align-items: center;
200
+    width: calc(100% - 52rpx);
201
+    // border: 2rpx solid #f00;
202
+    margin: 328rpx 26rpx 26rpx;
203
+    overflow: auto;
204
+    .list-card {
205
+      width: 100%;
206
+      min-height: 274rpx;
207
+      background: #ffffff;
208
+      border-radius: 8rpx;
209
+      margin-bottom: 26rpx;
210
+      box-sizing: border-box;
211
+      padding: 22rpx 20rpx 22rpx;
212
+      .list-card-top {
213
+        display: flex;
214
+        gap: 20rpx;
215
+        .list-card-top--left {
216
+          width: 150rpx;
217
+          height: 150rpx;
218
+          flex-shrink: 0;
219
+          border-radius: 7rpx;
220
+          background: #d8d8d8;
221
+          // text-align: center;
222
+          image {
223
+            width: 100%;
224
+            height: 100%;
225
+            border-radius: 7rpx;
226
+          }
227
+        }
228
+        .list-card-top--right {
229
+          flex: 1;
230
+
231
+          .list-card-top--right-title {
232
+            font-family: PingFangSC, PingFang SC;
233
+            font-weight: 400;
234
+            font-size: 26rpx;
235
+            color: #333333;
236
+            line-height: 37rpx;
237
+            display: -webkit-box;
238
+            -webkit-box-orient: vertical;
239
+            -webkit-line-clamp: 1;
240
+            overflow: hidden;
241
+          }
242
+          .list-card-top--right-description {
243
+            font-family: PingFangSC, PingFang SC;
244
+            font-weight: 400;
245
+            font-size: 22rpx;
246
+            color: #666666;
247
+            line-height: 30rpx;
248
+            word-break: break-all;
249
+            display: flex;
250
+            gap: 20rpx;
251
+            justify-content: flex-start;
252
+            padding: 13rpx 0 20rpx 0;
253
+          }
254
+          .list-card-top--right-description--left,
255
+          .list-card-top--right-description--right {
256
+            flex: 40%;
257
+            .title {
258
+              padding-right: 16rpx;
259
+            }
260
+          }
261
+          .list-card-top--right-price {
262
+            font-family: PingFangSC, PingFang SC;
263
+            .list-card-top--right-price--left {
264
+              word-break: break-all;
265
+              .price {
266
+                font-weight: 600;
267
+                font-size: 36rpx;
268
+                color: #333333;
269
+                line-height: 38rpx;
270
+              }
271
+            }
272
+          }
273
+        }
274
+      }
275
+      .list-card-bottom-btn {
276
+        padding-top: 30rpx;
277
+        .list-card-bottom-btn-list {
278
+          display: flex;
279
+          justify-content: flex-end;
280
+          align-items: center;
281
+          flex-wrap: wrap;
282
+          gap: 20rpx;
283
+          user-select: none;
284
+          .list-card-bottom-btn-list--item {
285
+            display: flex;
286
+            justify-content: center;
287
+            align-items: center;
288
+            width: 146rpx;
289
+            height: 60rpx;
290
+            border-radius: 8rpx;
291
+            border: 1rpx solid #e5e5e5;
292
+            font-weight: 400;
293
+            font-size: 24rpx;
294
+            color: #333333;
295
+          }
296
+        }
297
+      }
298
+    }
299
+  }
123 300
 }
124 301
 </style>